| | |
| | | package com.fzzy.gateway.service; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.GatewayDeviceType; |
| | | import com.fzzy.api.utils.DateUtil; |
| | | import com.fzzy.async.fzzy40.Fzzy40CommonService; |
| | | import com.fzzy.async.fzzy40.entity.Fz40Grain; |
| | | import com.fzzy.gateway.api.GatewayDeviceReportService; |
| | | import com.fzzy.gateway.api.GatewayRemoteManager; |
| | |
| | | |
| | | @Resource |
| | | private GatewayDeviceRep gatewayDeviceRep; |
| | | // @Resource |
| | | // private Fzzy40CommonService fzzy40CommonService; |
| | | @Resource |
| | | private Fzzy40CommonService fzzy40CommonService; |
| | | @Resource |
| | | private GatewayRemoteManager gatewayRemoteManager; |
| | | // @Resource |
| | |
| | | } |
| | | |
| | | |
| | | private String pushByV40(List<GatewayDevice> list, Date start, Date end) { |
| | | public String pushByV40(List<GatewayDevice> list, Date start, Date end) { |
| | | |
| | | String depotIdSys; |
| | | List<Fz40Grain> listGrain; |
| | |
| | | } |
| | | |
| | | //TODO ----》 |
| | | // listGrain = fzzy40CommonService.listGrain(depotIdSys, start, end); |
| | | listGrain = null; |
| | | listGrain = fzzy40CommonService.listGrain(depotIdSys, start, end); |
| | | //listGrain = null; |
| | | if (null == listGrain || listGrain.isEmpty()) { |
| | | log.info("---------设备---{}--未同步到粮情信息,请确认当前条件下是否有数据", device.getDeviceName()); |
| | | continue; |
| | |
| | | } |
| | | |
| | | |
| | | // deviceReportService.pushGrainData2Cloud(pushData); |
| | | // deviceReportService.reportGrainDataByHand(pushData); |
| | | |
| | | } |
| | | |
| | |
| | | @Expose |
| | | public String ajaxTestWeight(Map<String,Object> data) throws Exception { |
| | | double weigh = (double) data.get("weight"); |
| | | double deviceId = (double) data.get("deviceId"); |
| | | |
| | | |
| | | List<GatewayDevice> devices = listAll(); |
| | |
| | | log.info("-----------test-------------------"); |
| | | return "SUCCESS"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * gatewayDeviceTestPR#testIde |
| | | * 测试下行分机 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @Expose |
| | | public String testIde(Map<String,Object> data) throws Exception { |
| | | String deviceId = (String) data.get("deviceId"); |
| | | String bizType = (String) data.get("bizType"); |
| | | |
| | | log.info("-----------下行分机调试-设备={},事件={}",deviceId,bizType); |
| | | |
| | | return "SUCCESS"; |
| | | } |
| | | |
| | | } |