| | |
| | | public class ComPushService13 { |
| | | |
| | | @Autowired |
| | | private Api1301Rep apiRep1301; |
| | | @Autowired |
| | | private Api1302Rep apiRep1302; |
| | | @Autowired |
| | | private Api1303Rep apiRep1303; |
| | |
| | | private Api1304Rep apiRep1304; |
| | | @Autowired |
| | | private Api1305Rep apiRep1305; |
| | | @Autowired |
| | | @Autowired |
| | | private Api1306Rep apiRep1306; |
| | | @Autowired |
| | | private Api1307Rep apiRep1307; |
| | | @Autowired |
| | | private Api1308Rep apiRep1308; |
| | | @Autowired |
| | | private Api1309Rep apiRep1309; |
| | | @Autowired |
| | | private Api1310Rep apiRep1310; |
| | | |
| | |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | apiRep1302.updateStatus(data.getWsdjcdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void pushData1303(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | |
| | | //获取需要推送的数据 |
| | | List<Api1303> items = apiRep1303.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | log.info("-------------没有虫害检测数据表表需要推送-----------"); |
| | | return; |
| | | } |
| | | |
| | | param.setInteCategory(Constant.API_CATEGORY_13); |
| | | param.setInteId(Constant.API_CODE_1302); |
| | | |
| | | ResponseDto responseDto; |
| | | |
| | | for (Api1303 data : items) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | apiRep1303.updateStatus(data.getHcjcdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public void pushData1303(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | public void pushData1307(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | |
| | | //获取需要推送的数据 |
| | | List<Api1303> items = apiRep1303.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | List<Api1307> items = apiRep1307.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | log.info("-------------没有虫害检测数据表表需要推送-----------"); |
| | | log.info("-------------没有仓内图像作业数据需要推送-----------"); |
| | | return; |
| | | } |
| | | |
| | | param.setInteCategory(Constant.API_CATEGORY_13); |
| | | param.setInteId(Constant.API_CODE_1302); |
| | | param.setInteId(Constant.API_CODE_1307); |
| | | |
| | | ResponseDto responseDto; |
| | | |
| | | for (Api1303 data : items) { |
| | | for (Api1307 data : items) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | apiRep1303.updateStatus(data.getHcjcdh(), Constant.CZBZ_U); |
| | | data.setCzbz("u"); |
| | | apiRep1307.save(data); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void pushData1308(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | |
| | | //获取需要推送的数据 |
| | | List<Api1308> items = apiRep1308.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | log.info("-------------没有视频监控异常事件数据需要推送-----------"); |
| | | return; |
| | | } |
| | | |
| | | param.setInteCategory(Constant.API_CATEGORY_13); |
| | | param.setInteId(Constant.API_CODE_1308); |
| | | |
| | | ResponseDto responseDto; |
| | | |
| | | for (Api1308 data : items) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | data.setCzbz("u"); |
| | | apiRep1308.save(data); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void pushData1309(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | |
| | | //获取需要推送的数据 |
| | | List<Api1309> items = apiRep1309.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | log.info("-------------没有违规预警数据需要推送-----------"); |
| | | return; |
| | | } |
| | | |
| | | param.setInteCategory(Constant.API_CATEGORY_13); |
| | | param.setInteId(Constant.API_CODE_1309); |
| | | |
| | | ResponseDto responseDto; |
| | | |
| | | for (Api1309 data : items) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | data.setCzbz("u"); |
| | | apiRep1309.save(data); |
| | | } |
| | | } |
| | | } |