| | |
| | | } |
| | | |
| | | /** |
| | | * 获取熏蒸作业人员信息表 |
| | | * gDApi1023PR#peopleList |
| | | */ |
| | | @DataProvider |
| | | public List<GdApi1023People> peopleList(String code) { |
| | | return JSON.parseArray(code, GdApi1023People.class); |
| | | } |
| | | |
| | | /** |
| | | * 获取熏蒸备案方式表表信息 |
| | | * gDApi1023PR#wayList |
| | | */ |
| | | @DataProvider |
| | | public List<GdApi1023Way> wayList(String code) { |
| | | return JSON.parseArray(code, GdApi1023Way.class); |
| | | } |
| | | |
| | | /** |
| | | * 实施熏蒸作业的储粮粮情明细表 |
| | | * gDApi1023PR#dtlList |
| | | */ |
| | | @DataProvider |
| | | public List<GdApi1023Dtl> dtlList(String code) { |
| | | return JSON.parseArray(code, GdApi1023Dtl.class); |
| | | } |
| | | |
| | | /** |
| | | * gDApi1023PR#saveData |
| | | */ |
| | | @DataResolver |
| | | public void saveData(GdApi1023 data) { |
| | | data.setDtlList(JSON.toJSONString(data.getDtls())); |
| | | data.setWayList(JSON.toJSONString(data.getWays())); |
| | | data.setPeopleList(JSON.toJSONString(data.getPeoples())); |
| | | ApiInfoData infoData; |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm(), data.getKqdm()); |
| | | if (apiInfoList.size() != 0) { |
| | | infoData = apiInfoList.get(0); |
| | | infoData.setData(JSON.toJSONString(data)); |
| | | } else { |
| | | infoData = new ApiInfoData(); |
| | | infoData.setId(ContextUtil.getUUID()); |
| | | infoData.setId(data.getXzbm()); |
| | | infoData.setKqdm(data.getKqdm()); |
| | | infoData.setInteId(ApiCodeConstant.API_1023); |
| | | infoData.setUpdateTime(new Date()); |
| | |
| | | */ |
| | | @Expose |
| | | public void delData(GdApi1023 data) { |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm(), data.getKqdm()); |
| | | apiInfoDataRep.deleteById(apiInfoList.get(0).getId()); |
| | | } |
| | | |
| | |
| | | if (null == data) { |
| | | return "无数据执行"; |
| | | } |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm(), data.getKqdm()); |
| | | data.setCzbz(Constant.CZBZ_D); |
| | | apiInfoDataRep.updateStatus(apiInfoList.get(0).getId(), JSON.toJSONString(data), Constant.CZBZ_D); |
| | | return null; |
| | |
| | | return "系统没有当前推送协议配置,执行失败"; |
| | | } |
| | | |
| | | //推送,数据为集合形式 |
| | | responseDto = apiService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | |
| | | ApiInfoData infoData; |
| | | for (GdApi1023 data : items) { |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm()); |
| | | ApiInfoData infoData; |
| | | for (GdApi1023 data : items) { |
| | | //推送,数据为集合形式 |
| | | responseDto = apiService.pushData(param, apiConf, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(ApiCodeConstant.API_1023, data.getXzbm(), data.getKqdm()); |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | infoData = apiInfoList.get(0); |
| | | infoData.setUpdateTime(new Date()); |