|  |  |  | 
|---|
|  |  |  | import com.fzzy.api.service.ApiRemoteService; | 
|---|
|  |  |  | import com.fzzy.api.service.ApiTriggerService; | 
|---|
|  |  |  | import com.fzzy.api.utils.*; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.Api1208Rep; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.Api1404Rep; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.ApiLogRep; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.lang.reflect.Field; | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | private ApiCommonService apiCommonService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiTriggerService apiTriggerService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private Api1208Rep api1208Rep; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiLogRep apiLogRep; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | String key = RedisConst.buildKey(RedisConst.KYE_ORDER, conf.getKqdm()); | 
|---|
|  |  |  | String orderId = (String) redisUtil.get(key); | 
|---|
|  |  |  | if (StringUtils.isEmpty(orderId)) { | 
|---|
|  |  |  | log.error("指令id失效"); | 
|---|
|  |  |  | ResponseDto responseDto = new ResponseDto(99, "指令id失效"); | 
|---|
|  |  |  | apiLog.setStatus(99); | 
|---|
|  |  |  | apiLog.setResult("指令id失效"); | 
|---|
|  |  |  | apiLogRep.save(apiLog); | 
|---|
|  |  |  | return responseDto; | 
|---|
|  |  |  | //陕西2024接口,取消指令校验 | 
|---|
|  |  |  | orderId = ContextUtil.getUUID(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //封装推送数据 | 
|---|
|  |  |  | 
|---|
|  |  |  | BeanUtils.copyProperties(data, apiData); | 
|---|
|  |  |  | //设置統一仓房编码 | 
|---|
|  |  |  | if (StringUtils.isEmpty(apiData.getTycfbm())) { | 
|---|
|  |  |  | String tycfbm = apiCommonService.getTykqbm(apiData.getCfbh()); | 
|---|
|  |  |  | String tycfbm = apiCommonService.getTycfbm(apiData.getCfbh()); | 
|---|
|  |  |  | apiData.setTycfbm(tycfbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置統一廒间名称 | 
|---|
|  |  |  | 
|---|
|  |  |  | if (StringUtils.isEmpty(apiData.getFKFS())) { | 
|---|
|  |  |  | apiData.setFKFS("4"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | apiData.setHtzje(api1201.getHtzje().toPlainString()); | 
|---|
|  |  |  | apiData.setJszje(api1201.getJszje().toPlainString()); | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1202.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置合同号:统一库区编码加三维顺序号 | 
|---|
|  |  |  | if (apiData.getHth().startsWith(apiData.getHwdm().substring(0, 21))) { | 
|---|
|  |  |  | apiData.setHth(apiData.getHth().replace(apiData.getHwdm().substring(0, 21), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getHth())) { | 
|---|
|  |  |  | if (apiData.getHth().startsWith(apiData.getHwdm().substring(0, 21))) { | 
|---|
|  |  |  | apiData.setHth(apiData.getHth().replace(apiData.getHwdm().substring(0, 21), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置入库结算单号:统一库区编码+yyyyMMdd+三位顺序号 | 
|---|
|  |  |  | if (apiData.getRkjsdh().startsWith(api1202.getKqdm())) { | 
|---|
|  |  |  | apiData.setRkjsdh(apiData.getRkjsdh().replace(api1202.getKqdm(), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getRkjsdh())) { | 
|---|
|  |  |  | //设置入库结算单号:统一库区编码+yyyyMMdd+三位顺序号 | 
|---|
|  |  |  | if (apiData.getRkjsdh().startsWith(api1202.getKqdm())) { | 
|---|
|  |  |  | apiData.setRkjsdh(apiData.getRkjsdh().replace(api1202.getKqdm(), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyhwbm(tyhwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置入库结算单号:统一库区编码+yyyyMMdd+三位顺序号 | 
|---|
|  |  |  | if (apiData.getRkjsdh().startsWith(api1204.getKqdm())) { | 
|---|
|  |  |  | apiData.setRkjsdh(apiData.getRkjsdh().replace(api1204.getKqdm(), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getRkjsdh())) { | 
|---|
|  |  |  | if (apiData.getRkjsdh().startsWith(api1204.getKqdm())) { | 
|---|
|  |  |  | apiData.setRkjsdh(apiData.getRkjsdh().replace(api1204.getKqdm(), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //设置合同号:统一库区编码加三维顺序号 | 
|---|
|  |  |  | if (apiData.getHth().startsWith(api1204.getKqdm().substring(0, 18))) { | 
|---|
|  |  |  | apiData.setHth(apiData.getHth().replace(api1204.getKqdm().substring(0, 18), apiData.getTyhwbm().substring(0, 20))); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getHth())) { | 
|---|
|  |  |  | if (apiData.getHth().startsWith(api1204.getKqdm().substring(0, 18))) { | 
|---|
|  |  |  | apiData.setHth(apiData.getHth().replace(api1204.getKqdm().substring(0, 18), apiData.getTyhwbm().substring(0, 20))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1205.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置合同号:统一库区编码加三维顺序号 | 
|---|
|  |  |  | if (apiData.getHth().startsWith(apiData.getHwdm().substring(0, 21))) { | 
|---|
|  |  |  | apiData.setHth(apiData.getHth().replace(apiData.getHwdm().substring(0, 21), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getHth())) { | 
|---|
|  |  |  | if (apiData.getHth().startsWith(apiData.getHwdm().substring(0, 21))) { | 
|---|
|  |  |  | apiData.setHth(apiData.getHth().replace(apiData.getHwdm().substring(0, 21), apiData.getTyhwbm().substring(0, 22))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置出库结算单号:统一库区编码+yyyyMMdd+三位顺序号 | 
|---|
|  |  |  | if (apiData.getCkjsdh().startsWith(apiData.getHwdm().substring(0, 21))) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(apiData.getHwdm().substring(0, 21)); | 
|---|
|  |  |  | apiData.setCkjsdh(apiData.getCkjsdh().replace(apiData.getHwdm().substring(0, 21), tykqbm)); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getCkjsdh())) { | 
|---|
|  |  |  | if (apiData.getCkjsdh().startsWith(apiData.getHwdm().substring(0, 21))) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(apiData.getHwdm().substring(0, 21)); | 
|---|
|  |  |  | apiData.setCkjsdh(apiData.getCkjsdh().replace(apiData.getHwdm().substring(0, 21), tykqbm)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setDrhwtybm(drhwtybm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置倒仓单号:统一库区编码+yyyyMMdd+4位顺序号 | 
|---|
|  |  |  | if (apiData.getDcdh().startsWith(api1207.getKqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1207.getKqdm()); | 
|---|
|  |  |  | apiData.setDcdh(apiData.getDcdh().replace(api1207.getKqdm(), tykqbm)); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getDcdh())) { | 
|---|
|  |  |  | if (apiData.getDcdh().startsWith(api1207.getKqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1207.getKqdm()); | 
|---|
|  |  |  | apiData.setDcdh(apiData.getDcdh().replace(api1207.getKqdm(), tykqbm)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置粮权单位統一编码 | 
|---|
|  |  |  | if (StringUtils.isEmpty(apiData.getLqgstydwbm())) { | 
|---|
|  |  |  | String tydwbm = apiCommonService.getTydwbm(apiData.getHwdm()); | 
|---|
|  |  |  | String tydwbm = apiCommonService.getTydwbm(apiData.getLqgsdwdm()); | 
|---|
|  |  |  | apiData.setLqgstydwbm(tydwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyhwbm(tyhwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置损益单号:统一货位编码+yyyyMMdd+3位顺序号 | 
|---|
|  |  |  | if (apiData.getSydh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setSydh(apiData.getSydh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getSydh())) { | 
|---|
|  |  |  | if (apiData.getSydh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setSydh(apiData.getSydh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //实际损耗数量赋值 | 
|---|
|  |  |  | apiData.setSjsysl(api1209.getJzsysl()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //设置品种、性质、等级、年度 | 
|---|
|  |  |  | List<Api1208> api1208List = api1208Rep.findDataByHwdm(apiData.getHwdm()); | 
|---|
|  |  |  | if (null != api1208List && api1208List.size() > 0) { | 
|---|
|  |  |  | apiData.setLspzdm(api1208List.get(0).getLspzdm()); | 
|---|
|  |  |  | apiData.setLsxzdm(api1208List.get(0).getLsxzdm()); | 
|---|
|  |  |  | apiData.setLsdjdm(api1208List.get(0).getLsdjdm()); | 
|---|
|  |  |  | apiData.setShnd(api1208List.get(0).getShnd()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1210.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyhwbm(tyhwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置性质变更单号:统一货位编码+yyyyMMdd+3位顺序号 | 
|---|
|  |  |  | if (apiData.getLsxzzbdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setLsxzzbdh(apiData.getLsxzzbdh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getLsxzzbdh())) { | 
|---|
|  |  |  | if (apiData.getLsxzzbdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setLsxzzbdh(apiData.getLsxzzbdh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyhwbm(tyhwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置单号:统一货位编码+yyyyMMdd+4位顺序号 | 
|---|
|  |  |  | if (apiData.getWsdjcdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setWsdjcdh(apiData.getWsdjcdh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getWsdjcdh())) { | 
|---|
|  |  |  | if (apiData.getWsdjcdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setWsdjcdh(apiData.getWsdjcdh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyajbm(tyajbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置单号:统一廒间编码+yyyyMMdd+4位顺序号 | 
|---|
|  |  |  | if (apiData.getHcjcdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setHcjcdh(apiData.getHcjcdh().replace(apiData.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getHcjcdh())) { | 
|---|
|  |  |  | if (apiData.getHcjcdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setHcjcdh(apiData.getHcjcdh().replace(apiData.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1304.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyajbm(tyajbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置单号:统一廒间编码+yyyyMMdd+4位顺序号 | 
|---|
|  |  |  | if (apiData.getQtndjcdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setQtndjcdh(apiData.getQtndjcdh().replace(apiData.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getQtndjcdh())) { | 
|---|
|  |  |  | if (apiData.getQtndjcdh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setQtndjcdh(apiData.getQtndjcdh().replace(apiData.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1305.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyajbm(tyajbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置通风作业单号:统一廒间编码+yyyyMMdd+3位顺序号 | 
|---|
|  |  |  | if (apiData.getTfzydh().startsWith(api1305.getHwdm())) { | 
|---|
|  |  |  | apiData.setTfzydh(apiData.getTfzydh().replace(api1305.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getTfzydh())) { | 
|---|
|  |  |  | if (apiData.getTfzydh().startsWith(api1305.getHwdm())) { | 
|---|
|  |  |  | apiData.setTfzydh(apiData.getTfzydh().replace(api1305.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1306.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setTyajbm(tyajbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置熏蒸作业单号:统一廒间编码+yyyyMMdd+3位顺序号 | 
|---|
|  |  |  | if (apiData.getXzzydh().startsWith(apiData.getCfdm())) { | 
|---|
|  |  |  | apiData.setXzzydh(apiData.getXzzydh().replace(apiData.getCfdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getXzzydh())) { | 
|---|
|  |  |  | if (apiData.getXzzydh().startsWith(apiData.getCfdm())) { | 
|---|
|  |  |  | apiData.setXzzydh(apiData.getXzzydh().replace(apiData.getCfdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //设置单号:统一廒间编码+yyyyMMdd+4位顺序号 | 
|---|
|  |  |  | if (apiData.getHcjcdh().startsWith(api1306.getHwdm())) { | 
|---|
|  |  |  | apiData.setHcjcdh(apiData.getHcjcdh().replace(api1306.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getHcjcdh())) { | 
|---|
|  |  |  | if (apiData.getHcjcdh().startsWith(api1306.getHwdm())) { | 
|---|
|  |  |  | apiData.setHcjcdh(apiData.getHcjcdh().replace(api1306.getHwdm(), apiData.getTyajbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1307.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | //设置文件流 | 
|---|
|  |  |  | apiData.setCntxwjl(FileUtils.fileToByteString(api1307.getWjdz())); | 
|---|
|  |  |  | //预置位 | 
|---|
|  |  |  | if (apiData.getYzwbh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setYzwbh(apiData.getYzwbh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getYzwbh())) { | 
|---|
|  |  |  | if (apiData.getYzwbh().startsWith(apiData.getHwdm())) { | 
|---|
|  |  |  | apiData.setYzwbh(apiData.getYzwbh().replace(apiData.getHwdm(), apiData.getTyhwbm())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1308.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setWgdwtybm(tydwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置预警信息代码:统一库区编码+yyyyMMdd+3位顺序号 | 
|---|
|  |  |  | if (apiData.getYjxxdm().startsWith(api1309.getKqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1309.getKqdm()); | 
|---|
|  |  |  | apiData.setYjxxdm(apiData.getYjxxdm().replace(api1309.getKqdm(), tykqbm)); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getYjxxdm())) { | 
|---|
|  |  |  | if (apiData.getYjxxdm().startsWith(api1309.getKqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1309.getKqdm()); | 
|---|
|  |  |  | apiData.setYjxxdm(apiData.getYjxxdm().replace(api1309.getKqdm(), tykqbm)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1310.equals(inteId)) { | 
|---|
|  |  |  | 
|---|
|  |  |  | apiData.setLhhwtybm(tyhwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //计划明细号:更换为轮换计划单号+统一库区编码+4为顺序号 | 
|---|
|  |  |  | if (apiData.getJhmxdh().startsWith(apiData.getLhjhdh() + api1404.getKqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1404.getKqdm()); | 
|---|
|  |  |  | apiData.setJhmxdh(apiData.getJhmxdh().replace(apiData.getLhjhdh() + api1404.getKqdm(), apiData.getLhjhdh() + tykqbm)); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(apiData.getJhmxdh())) { | 
|---|
|  |  |  | if (apiData.getJhmxdh().startsWith(apiData.getLhjhdh() + api1404.getKqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1404.getKqdm()); | 
|---|
|  |  |  | apiData.setJhmxdh(apiData.getJhmxdh().replace(apiData.getLhjhdh() + api1404.getKqdm(), apiData.getLhjhdh() + tykqbm)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1504.equals(inteId)) { | 
|---|
|  |  |  | Api1504 api1504 = (Api1504)data; | 
|---|
|  |  |  | SX2024Api1504 apiData = new SX2024Api1504(); | 
|---|
|  |  |  | BeanUtils.copyProperties(api1504, apiData); | 
|---|
|  |  |  | //设置統一单位编码 | 
|---|
|  |  |  | if (StringUtils.isEmpty(apiData.getXqydm())) { | 
|---|
|  |  |  | String tydwbm = apiCommonService.getTydwbm(apiData.getCOrgCode()); | 
|---|
|  |  |  | apiData.setXqydm(tydwbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //设置統一库区编码 | 
|---|
|  |  |  | if (StringUtils.isEmpty(apiData.getXkqdm())) { | 
|---|
|  |  |  | String tykqbm = apiCommonService.getTykqbm(api1504.getKqdm()); | 
|---|
|  |  |  | apiData.setXkqdm(tykqbm); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1505.equals(inteId)) { | 
|---|
|  |  |  | Api1505 api1505 = (Api1505)data; | 
|---|
|  |  |  | SX2024Api1505 apiData = new SX2024Api1505(); | 
|---|
|  |  |  | BeanUtils.copyProperties(data, apiData); | 
|---|
|  |  |  | BeanUtils.copyProperties(api1505, apiData); | 
|---|
|  |  |  | apiData.setCqunit(api1505.getCqunit() + ""); | 
|---|
|  |  |  | return apiData; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Constant.API_CODE_1506.equals(inteId)) { | 
|---|