| | |
| | | @Component |
| | | public class Fzzy40Sync2104 { |
| | | |
| | | private final static String INOUT_TYPE_IN = "IN"; |
| | | |
| | | @Autowired |
| | | private Fzzy40Sync1202Rep fzzy40Sync1202Rep; |
| | | @Autowired |
| | |
| | | List<ApiInfoData> apiInfoDataList; |
| | | List<Api1102> api1102List = api1102Rep.findPushData(kqdm); |
| | | String bjw = ""; |
| | | String mappingCode = ""; |
| | | if (null != api1102List && api1102List.size() > 0) { |
| | | bjw = ShAreaBjw.getBjw(api1102List.get(0).getXzqhdm()); |
| | | } |
| | | for (Fz40InoutRecord sysData : list) { |
| | | |
| | | List<ApiInfoData> apiInfoData = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_2104, sysData.getId().substring(2)); |
| | | if (null != apiInfoData && apiInfoData.size() > 0) { |
| | | continue; |
| | | } |
| | | sh2023Api2104 = new SH2023Api2104(); |
| | | sh2023Api2104.setBydh(sysData.getId().substring(2)); |
| | | sh2023Api2104.setKqdm(kqdm); |
| | | sh2023Api2104.setJzrq(sysData.getCompleteTime()); |
| | | |
| | | sh2023Api2104.setCch(sysData.getPlateNum()); |
| | | sh2023Api2104.setLspzdm(sysData.getFoodVariety()); |
| | | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodType()); |
| | | |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodType()); |
| | | sh2023Api2104.setLsxzdm(mappingCode); |
| | | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety()); |
| | | sh2023Api2104.setLspzdm(mappingCode); |
| | | |
| | | sh2023Api2104.setLldm(kqdm); |
| | | |
| | |
| | | sh2023Api2104.setPch(api1105.getHwdm() + sysData.getFoodYear()); |
| | | sh2023Api2104.setBjw(bjw); |
| | | |
| | | |
| | | //持久化保存,单独存入非国标接口表 |
| | | ApiInfoData infoData = new ApiInfoData(); |
| | | infoData.setId(sh2023Api2104.getBydh()); |
| | | infoData.setId(ContextUtil.getUUID()); |
| | | infoData.setKqdm(kqdm); |
| | | infoData.setInteType(Constant.API_CATEGORY_12); |
| | | infoData.setInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | |
| | | infoData.setData(JSON.toJSONString(sh2023Api2104)); |
| | | apiInfoDataRep.save(infoData); |
| | | |
| | | log.info("2103---市储驳运单-同步数据:{}", sh2023Api2104.toString()); |
| | | log.info("2104---市储驳运单-同步数据:{}", sh2023Api2104.toString()); |
| | | |
| | | } |
| | | |