| | |
| | | private Api1202Rep api1202Rep; |
| | | @Autowired |
| | | private Api1205Rep api1205Rep; |
| | | @Autowired |
| | | private Api1404Rep api1404Rep; |
| | | |
| | | @Override |
| | | public String getProtocol() { |
| | |
| | | reqData.setData(ShRSAUtils.encryptByPubKey(jsonData, conf.getPublicKey())); |
| | | //摘要,数据主体的MD5值 |
| | | reqData.setDigst(MyMD5Util.encrypt(jsonData)); |
| | | |
| | | log.info("上报数据信息=" + JSON.toJSONString(reqData)); |
| | | SH2023RespDto responseDto = SH2023HttpClientUtil.postPushData(conf.getApiUrl() + inteId, JSON.toJSONString(reqData), conf); |
| | | |
| | | apiLog.setStatus(responseDto.getCode() == 200 ? 0 : responseDto.getCode()); |
| | |
| | | api1202.setRkjsdh("0"); |
| | | } |
| | | |
| | | //设置粮食轮换年度 |
| | | List<Api1404> api1404List = api1404Rep.getDataByJhmxdh(apiData.getJhmxh()); |
| | | if(null != api1404List && api1404List.size() >0){ |
| | | api1202.setLhnd(api1404List.get(0).getShnd()); |
| | | } |
| | | |
| | | //设置批次号 |
| | | api1202.setPch(apiData.getHwdm() + apiData.getShnd()); |
| | | //设置空属性为默认值 |
| | |
| | | if (StringUtils.isEmpty(api1205.getCkjsdh())) { |
| | | api1205.setCkjsdh("0"); |
| | | } |
| | | |
| | | //设置粮食轮换年度 |
| | | List<Api1404> api1404List = api1404Rep.getDataByJhmxdh(apiData.getJhmxh()); |
| | | if(null != api1404List && api1404List.size() >0){ |
| | | api1205.setLhnd(api1404List.get(0).getShnd()); |
| | | } |
| | | |
| | | //设置批次号 |
| | | api1205.setPch(apiData.getHwdm() + DateFormatUtils.format(apiData.getCmsj(), "yyyy")); |
| | | api1205.setPch(apiData.getHwdm() + apiData.getShnd()); |
| | | |
| | | //设置空属性为默认值 |
| | | changeObject(api1205); |
| | |
| | | Api1206 apiData = (Api1206) data; |
| | | BeanUtils.copyProperties(apiData, api1206); |
| | | api1206.setBjw(ShAreaBjw.getBjw(code)); |
| | | List<Api1205> api1205List = api1205Rep.getDataById(apiData.getCkjsdh()); |
| | | // List<Api1205> api1205List = api1205Rep.getDataById(apiData.getCkjsdh()); |
| | | //设置批次号 |
| | | api1206.setPch(api1205List.get(0).getHwdm() + DateFormatUtils.format(api1205List.get(0).getCmsj(), "yyyy")); |
| | | // api1206.setPch(api1205List.get(0).getHwdm() + DateFormatUtils.format(api1205List.get(0).getCmsj(), "yyyy")); |
| | | |
| | | //设置空属性为默认值 |
| | | changeObject(api1206); |