| | |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.*; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiTriggerService; |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.api.view.repository.*; |
| | | import com.fzzy.async.fzzy40.entity.*; |
| | |
| | | private ApiCommonService commonService; |
| | | @Autowired |
| | | private ApiInfoDataRep apiInfoDataRep; |
| | | @Autowired |
| | | private ApiTriggerService apiTriggerService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param end |
| | | */ |
| | | public void syncData(String kqdm, String deptId, Date start, Date end) { |
| | | log.info("-------------1023æ¥å£è®¾å¤ä¿¡æ¯å¼å§åæ¥------------------"); |
| | | log.info("-------------1023æ¥å£çè¸å¤æ¡ä¿¡æ¯å¼å§åæ¥------------------"); |
| | | |
| | | //åæ¥æ°æ®ï¼åªè®°å½å¤±è´¥çä¿¡æ¯ |
| | | ApiLog apiLog = new ApiLog(); |
| | |
| | | GD2022Api1023.setYjlx(data.getDrugType()); |
| | | GD2022Api1023.setLqrq(data.getLqsj()); |
| | | GD2022Api1023.setZhgxsj(data.getUpdateTime()); |
| | | if(data.getLqr().contains("ã")){ |
| | | GD2022Api1023.setLqr(data.getLqr().replace('ã', '|')); |
| | | } |
| | | |
| | | //å¨ç²®ç²®æ
æç»è¡¨ |
| | | List<Fz40DrugLogDtl> dtls = drugLogDtlRep.listDrugLogDtl(data.getXzbm()); |
| | |
| | | BeanUtils.copyProperties(data, gd2022Api1023Dtl); |
| | | if (null != api1105) { |
| | | gd2022Api1023Dtl.setCfmc(api1105.getHwmc()); |
| | | gd2022Api1023Dtl.setCfdm(api1105.getHwdm().substring(0,25)); |
| | | gd2022Api1023Dtl.setCfdm(api1105.getHwdm().substring(0, 25)); |
| | | } |
| | | |
| | | gd2022Api1023Dtl.setLspzdm(data.getFoodVariety()); |
| | | //ç²®é£åç§ |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, data.getFoodVariety()); |
| | | gd2022Api1023Dtl.setLspzdm(mappingCode); |
| | | gd2022Api1023Dtl.setLsxzdm(data.getFoodType()); |
| | | gd2022Api1023Dtl.setLsdjdm(data.getFoodLevel()); |
| | | gd2022Api1023Dtl.setLssl(data.getNumber()); |
| | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | log.error("---设å¤ä¿¡æ¯åæ¥æ§è¡å¤±è´¥----{}", e.toString()); |
| | | apiLog.setResult("设å¤ä¿¡æ¯åæ¥æ§è¡å¤±è´¥ï¼" + e.getMessage()); |
| | | log.error("---çè¸å¤æ¡åæ¥æ§è¡å¤±è´¥----{}", e.toString()); |
| | | apiLog.setResult("çè¸å¤æ¡ä¿¡æ¯åæ¥æ§è¡å¤±è´¥ï¼" + e.getMessage()); |
| | | apiLogRep.save(apiLog); |
| | | } |
| | | } |