| | |
| | | private Api1202Rep api1202Rep; |
| | | @Autowired |
| | | private Api1205Rep api1205Rep; |
| | | @Autowired |
| | | private Api1404Rep api1404Rep; |
| | | |
| | | @Override |
| | | public String getProtocol() { |
| | |
| | | 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); |