| | |
| | | @Component |
| | | public class Fzzy40Sync1023 { |
| | | @Autowired |
| | | private Api1101Rep api1101Rep; |
| | | @Autowired |
| | | private Api1102Rep api1102Rep; |
| | | @Autowired |
| | | private Fzzy40Sync1023Rep fzzy40Sync1023Rep; |
| | | @Autowired |
| | | private Fzzy40SyncDrugLogPeopleRep drugLogPeopleRep; |
| | |
| | | BeanUtils.copyProperties(data, gdApi1023); |
| | | gdApi1023.setXzbm(data.getXzbm().substring(8)); |
| | | gdApi1023.setKqdm(kqdm); |
| | | List<Api1102> api1102List = api1102Rep.findPushData(kqdm); |
| | | if(null != api1102List && api1102List.size() > 0){ |
| | | gdApi1023.setKqmc(api1102List.get(0).getKqmc()); |
| | | } |
| | | |
| | | gdApi1023.setDwdm(kqdm.substring(0, 18)); |
| | | List<Api1101> api1101List = api1101Rep.findPushData(kqdm); |
| | | if(null != api1101List && api1101List.size() > 0){ |
| | | gdApi1023.setDwmc(api1101List.get(0).getDwmc()); |
| | | } |
| | | gdApi1023.setYjmc(data.getDrugName()); |
| | | gdApi1023.setYjlx(data.getDrugType()); |
| | | gdApi1023.setLqrq(data.getLqsj()); |
| | | gdApi1023.setZhgxsj(data.getUpdateTime()); |
| | | |
| | | //储粮粮情明细表 |
| | |
| | | for (Fz40DrugLogPeople people : peoples) { |
| | | gdApi1023People = new GdApi1023People(); |
| | | BeanUtils.copyProperties(people, gdApi1023People); |
| | | gdApi1023People.setXm(people.getMx()); |
| | | peopleList.add(gdApi1023People); |
| | | } |
| | | gdApi1023.setPeoples(peopleList); |
| | | } |
| | | //持久化保存,单独存入非国标接口表 |
| | | infoData = new ApiInfoData(); |
| | | infoData.setId(ContextUtil.getUUID()); |
| | | |
| | | infoData.setKqdm(kqdm); |
| | | infoData.setInteType(Constant.API_CATEGORY_13); |
| | | infoData.setInteId(ApiCodeConstant.API_1023); |
| | |
| | | if (null == apiInfoList || apiInfoList.isEmpty()) { |
| | | gdApi1023.setCzbz(Constant.CZBZ_I); |
| | | infoData.setCzbz(Constant.CZBZ_I); |
| | | infoData.setId(ContextUtil.getUUID()); |
| | | } else { |
| | | gdApi1023.setCzbz(apiInfoList.get(0).getCzbz()); |
| | | infoData.setCzbz(apiInfoList.get(0).getCzbz()); |
| | | infoData.setId(apiInfoList.get(0).getId()); |
| | | } |
| | | |
| | | infoData.setData(JSON.toJSONString(gdApi1023)); |