| | |
| | | |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.data.jpa.repository.Query; |
| | | import org.springframework.data.repository.query.Param; |
| | | import java.util.List; |
| | | |
| | | |
| | | public interface ApiConfsRep extends JpaRepository<ApiConfs, String> { |
| | | |
| | | /** |
| | | * æ ¹æ®åºåºç¼ç è·åé
ç½®ä¿¡æ¯ |
| | | * @param kqdm |
| | | * @return |
| | | */ |
| | | @Query("from ApiConfs where kqdm =:kqdm ") |
| | | List<ApiConfs> getDataByKqdm(@Param("kqdm") String kqdm); |
| | | } |
| | |
| | | |
| | | apiData.setQdrq(sysData.getSigningTime()); |
| | | |
| | | if(StringUtils.isEmpty(sysData.getFoodVariety())){ |
| | | continue; |
| | | } |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety().substring(0,3)); |
| | | apiData.setLspzdm(mappingCode); |
| | | |
| | | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodVariety()); |
| | | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodType()); |
| | | apiData.setLsxzdm(mappingCode); |
| | | |
| | | //åä»·ï¼å
/å¨ |
| | |
| | | if(StringUtils.isNotEmpty(sysData.getCardId())){ |
| | | apiData.setLxrsfzh(sysData.getCardId()); |
| | | } |
| | | if(StringUtils.isNotEmpty(sysData.getYzbm())){ |
| | | apiData.setYzbm(sysData.getYzbm()); |
| | | } |
| | | apiData.setYzbm(StringUtils.isEmpty(sysData.getYzbm()) ? "000000" :sysData.getYzbm()); |
| | | apiData.setDzyx(StringUtils.isEmpty(sysData.getDzyx()) ? "" :sysData.getDzyx()); |
| | | // apiData.setKhfkhh(StringUtils.isEmpty(sysData.getBank()) ? "" :sysData.getBank()); |
| | | apiData.setKhfkhh(StringUtils.isEmpty(sysData.getBank()) ? "999" :sysData.getBank()); |
| | | apiData.setKhfzh(StringUtils.isEmpty(sysData.getBankNum()) ? "" :sysData.getBankNum()); |
| | | apiData.setZhgxsj(sysData.getUpdateTime() == null ? new Date() : sysData.getUpdateTime()); |
| | | apiData.setBizId(sysData.getId()); |
| | |
| | | fzzySync1207.syncData(kqdm, deptId, start, end); |
| | | |
| | | //åºå
¥åºæä»¶ä¿¡æ¯åæ¥ |
| | | fzzySync1109.syncData(kqdm, deptId, start, end); |
| | | // fzzySync1109.syncData(kqdm, deptId, start, end); |
| | | |
| | | //ç²®é£åºå忥 |
| | | fzzySync1208.syncData(kqdm, deptId, start, end); |
| | |
| | | fzzySync1210.syncData(kqdm, deptId, start, end); |
| | | |
| | | /*-----åçç¬ææ¥å£ä¿¡æ¯åæ¥-----*/ |
| | | if (StringUtils.isNotEmpty(param.getPushProtocol()) && PushProtocol.SB_SH_2023.getCode().equals(param.getPushProtocol())) { |
| | | //䏿µ·å¸å¹³å°2023çï¼éè¦åæ¥å¸å¨æ£æ¤åï¼åæ¥å¸å¨é©³è¿å |
| | | //忥å¸å¨æ£æ¤å |
| | | fzzySync2101.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd()); |
| | | //忥å¸å¨é©³è¿å |
| | | fzzySync2104.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd()); |
| | | } |
| | | // if (StringUtils.isNotEmpty(param.getPushProtocol()) && PushProtocol.SB_SH_2023.getCode().equals(param.getPushProtocol())) { |
| | | // //䏿µ·å¸å¹³å°2023çï¼éè¦åæ¥å¸å¨æ£æ¤åï¼åæ¥å¸å¨é©³è¿å |
| | | // //忥å¸å¨æ£æ¤å |
| | | // fzzySync2101.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd()); |
| | | // //忥å¸å¨é©³è¿å |
| | | // fzzySync2104.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd()); |
| | | // } |
| | | //è´¦é¢åºåä¿¡æ¯åæ¥ TODO |
| | | |
| | | } |
| | |
| | | //çè¸å¤æ¡æ°æ®åæ¥ |
| | | fzzySync1023.syncData(param.getKqdm(), param.getDeptId(), param.getStart(), param.getEnd()); |
| | | } |
| | | if (StringUtils.isNotEmpty(param.getPushProtocol()) && PushProtocol.SB_SH_2023.equals(param.getPushProtocol())) { |
| | | if (StringUtils.isNotEmpty(param.getPushProtocol()) && PushProtocol.SB_SH_2023.getCode().equals(param.getPushProtocol())) { |
| | | //䏿µ·å¸å¹³å°2023çï¼éè¦åæ¥ç²®æ
设å¤é
ç½®ä¿¡æ¯ |
| | | |
| | | //åæ¥ç²®æ
设å¤é
ç½®ä¿¡æ¯ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.async.fzzy40.entity; |
| | | |
| | | import com.bstek.dorado.annotation.PropertyDef; |
| | | import lombok.Data; |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | | import javax.persistence.Id; |
| | | import javax.persistence.Table; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * åºå
¥åºæµæ°´å表 |
| | | * @author |
| | | */ |
| | | @Data |
| | | @Entity |
| | | @Table(name = "D_INOUT_RECORD_ITEM") |
| | | public class Fz40InoutRecordItem { |
| | | |
| | | @Id |
| | | @Column(name = "ID_", length = 40) |
| | | @PropertyDef(label = "主é®id", description = "æ ¹æ®ä¸å®çè§åçæ") |
| | | private String id; |
| | | |
| | | @Column(name = "RECORD_ID_", length = 40) |
| | | @PropertyDef(label = "æµæ°´Id") |
| | | private String recordId; |
| | | |
| | | @Column(name = "DEPOT_ID_", length = 50) |
| | | @PropertyDef(label = "è£
å¸ä»åº") |
| | | private String depotId; |
| | | |
| | | @Column(name = "CAR_NUM_", length = 20) |
| | | @PropertyDef(label = "è¹è¿è½¦è¾åºå·") |
| | | private String carNum; |
| | | |
| | | @Column(name = "CAR_NAME_", length = 20) |
| | | @PropertyDef(label = "è¹è¿è½¦è¾åç§°") |
| | | private String carName; |
| | | |
| | | @Column(name = "TYPE_", length = 10) |
| | | @PropertyDef(label = "åºå
¥åºç±»å", description = "åºåºï¼å
¥åº") |
| | | private String type; |
| | | |
| | | @Column(name = "PROGRESS_", length = 20) |
| | | @PropertyDef(label = "æµç¨è¿åº¦") |
| | | private String progress; |
| | | |
| | | @Column(name = "RECORD_STATUS_", length = 10) |
| | | @PropertyDef(label = "æ°æ®ç¶æ", description = "æ°æ®ç¶æï¼æ£å¸¸ï¼å¼å¸¸ï¼2å°æ¶å
éå¤åºå
¥åºçï¼ï¼è¡¥å½") |
| | | private String recordStatus; |
| | | |
| | | @Column(name = "DE_") |
| | | @PropertyDef(label = "æ£é", description = "åä½KG") |
| | | private Double de = 0.0; |
| | | |
| | | @Column(name = "FULL_WEIGHT_") |
| | | @PropertyDef(label = "满车称é", description = "å
¥åºæ¶åè¡¨ç¤ºç¬¬ä¸æ¬¡ç§°éï¼åºåºæ¶åè¡¨ç¤ºç¬¬äºæ¬¡ç§°éï¼åä½KG") |
| | | private Double fullWeight = 0.0; |
| | | |
| | | @Column(name = "FULL_WEIGHT_TIME_") |
| | | @PropertyDef(label = "æ»¡è½¦ç§°éæ¶é´") |
| | | private Date fullWeightTime; |
| | | |
| | | @Column(name = "FULL_WEIGHT_USER_", length = 40) |
| | | @PropertyDef(label = "满车称é人") |
| | | private String fullWeightUser; |
| | | |
| | | @Column(name = "EMPTY_WEIGHT_") |
| | | @PropertyDef(label = "空车称é", description = "å
¥åºæ¶è¡¨ç¤ºç¬¬äºæ¬¡ç§°éï¼åºåºæ¶åè¡¨ç¤ºç¬¬ä¸æ¬¡ç§°éï¼åä½KG") |
| | | private Double emptyWeight = 0.0; |
| | | |
| | | @Column(name = "EMPTY_WEIGHT_TIME_") |
| | | @PropertyDef(label = "ç©ºè½¦ç§°éæ¶é´") |
| | | private Date emptyWeightTime; |
| | | |
| | | @Column(name = "EMPTY_WEIGHT_USER_") |
| | | @PropertyDef(label = "空车称é人") |
| | | private String emptyWeightUser; |
| | | |
| | | @Column(name = "NET_WEIGHT_") |
| | | @PropertyDef(label = "åé", description = "åä½KG") |
| | | private Double netWeight = 0.0; |
| | | |
| | | @Column(name = "SETTLE_WEIGHT_") |
| | | @PropertyDef(label = "ç»ç®åé", description = "æ£éååéï¼ç»ç®åéï¼åä½KG") |
| | | private Double settleWeight = 0.0; |
| | | |
| | | @Column(name = "RECORD_WEIGHT_") |
| | | @PropertyDef(label = "å
¥åºéé", description = "æ£éååéï¼ç»ç®åéï¼è¡¥å
æ¬å¢éï¼åä½KG") |
| | | private Double recordWeight = 0.0; |
| | | |
| | | @Column(name = "CREATE_TIME_") |
| | | @PropertyDef(label = "å建æ¶é´") |
| | | private Date createTime; |
| | | |
| | | // 夿³¨ |
| | | @Column(name = "REMARKS_", length = 200) |
| | | @PropertyDef(label = "夿³¨ä¿¡æ¯") |
| | | private String remarks; |
| | | } |
| | |
| | | |
| | | @PropertyDef(label = "æ ·åæ°é", required = true) |
| | | @Column(name = "ypsl", precision = 20, scale = 6) |
| | | private double ypsl; |
| | | private Double ypsl; |
| | | |
| | | @PropertyDef(label = "代表æ°é") |
| | | @Column(name = "dbsl", precision = 20, scale = 6) |
| | | private double dbsl; |
| | | private Double dbsl; |
| | | |
| | | @PropertyDef(label = "æ ·åç级") |
| | | @Column(name = "ypdj", length = 2) |
| | |
| | | @Column(name = "UPDATE_TIME_") |
| | | @PropertyDef(label = "æ°æ®æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | // |
| | | // /** |
| | | // * åéªé¡¹ç®æç» |
| | | // */ |
| | | // @Transient |
| | | // private List<CheckItemData> checkItems; |
| | | |
| | | } |
| | |
| | | |
| | | apiData.setQdrq(sysData.getSigningTime()); |
| | | |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety()); |
| | | if(StringUtils.isEmpty(sysData.getFoodVariety())){ |
| | | continue; |
| | | } |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety().substring(0,3)); |
| | | apiData.setLspzdm(mappingCode); |
| | | |
| | | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodVariety()); |
| | | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodType()); |
| | | apiData.setLsxzdm(mappingCode); |
| | | |
| | | //åä»·ï¼å
/å¨ |
| | |
| | | import com.fzzy.api.view.repository.ApiLogRep; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutNoticeIn; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecord; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecordItem; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1202Rep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40SyncInoutRecordItemRep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40SyncNoticeInRep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private Fzzy40Sync1202Rep fzzySync1202Rep; |
| | | @Autowired |
| | | private Fzzy40SyncInoutRecordItemRep fzzy40SyncInoutRecordItemRep; |
| | | @Autowired |
| | | private Fzzy40SyncNoticeInRep fzzySyncNoticeInRep; |
| | | @Autowired |
| | |
| | | Api1105 api1105; |
| | | List<Fz40InoutNoticeIn> listInoutNotice; |
| | | List<Api1202> api1202List; |
| | | List<Fz40InoutRecordItem> listInoutRecordItem; |
| | | for (Fz40InoutRecord sysData : list) { |
| | | if(sysData.getRecordStatus().equals("DEL") || sysData.getRecordStatus().equals("ERROR")){ |
| | | continue; |
| | | } |
| | | if(null == sysData.getRecordWeight() || sysData.getRecordWeight() == 0){ |
| | | sysData.setRecordWeight(sysData.getSettleWeight()); |
| | | } |
| | |
| | | |
| | | apiData.setRkywdh(Constant.INOUT_TYPE_14 + sysData.getId().substring(4)); |
| | | |
| | | //夿ä¸å¡æ¶é´ä¸åæ®å·æ¯å¦å¹é
ï¼è¥ä¸å¹é
ï¼åæ´æ¹ä¸å¡æ¶é´ä¸ºåæ®å·æå¨çæ¶é´ |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | | Date time = dateFormat.parse(sysData.getId().substring(2, 10)); |
| | | int numDay = DateUtil.difDay(DateUtil.getCurZero(sysData.getCompleteTime()), DateUtil.getCurZero(time)); |
| | | if(numDay != 0){ |
| | | sysData.setFullWeightTime(DateUtils.addDays(sysData.getFullWeightTime(), numDay)); |
| | | sysData.setEmptyWeightTime(DateUtils.addDays(sysData.getEmptyWeightTime(), numDay)); |
| | | sysData.setCompleteTime(DateUtils.addDays(sysData.getCompleteTime(), numDay)); |
| | | } |
| | | |
| | | //è´§ä½ä»£ç |
| | | apiData.setHwdm(api1105.getHwdm()); |
| | | apiData.setYwlx(Constant.INOUT_TYPE_2); |
| | | apiData.setYwrq(sysData.getCompleteTime()); |
| | | apiData.setYwrq(DateUtils.parseDate(sysData.getId().substring(2, 10), new String[] { "yyyyMMdd" })); |
| | | apiData.setCyr(sysData.getUserName()); |
| | | |
| | | //é»è®¤ä¸ä¸ªéä¾¿å¼ |
| | |
| | | apiData.setSfzh(null == sysData.getUserId() ? "410183200010100000" : sysData.getUserId().trim()); |
| | | |
| | | //è·åååå· |
| | | apiData.setHth(api1105.getHwdm().substring(0,18) + apiData.getRkywdh()); |
| | | listInoutNotice = fzzySyncNoticeInRep.listInoutNoticeInById(sysData.getNoticeId()); |
| | | if(null != listInoutNotice && listInoutNotice.size() >0){ |
| | | if(StringUtils.isNotEmpty(listInoutNotice.get(0).getContractId())){ |
| | | apiData.setHth(api1105.getHwdm().substring(0,18) + listInoutNotice.get(0).getContractId()); |
| | | }else { |
| | | apiData.setHth(api1105.getHwdm().substring(0,18) + apiData.getRkywdh()); |
| | | } |
| | | if(StringUtils.isNotEmpty(listInoutNotice.get(0).getPlanId())){ |
| | | apiData.setJhmxh(listInoutNotice.get(0).getPlanId()); |
| | | } |
| | | } |
| | | |
| | | apiData.setXxdz(StringUtils.isEmpty(sysData.getUserAddress()) ? "详ç»å°å":sysData.getUserAddress()); |
| | |
| | | apiData.setDjsj(sysData.getRegisterTime()); |
| | | |
| | | //ç²®é£åç§ |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety()); |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety().substring(0,3)); |
| | | apiData.setLspzdm(mappingCode); |
| | | |
| | | //ç²®é£æ§è´¨ |
| | |
| | | }else { |
| | | apiData.setCzbz(api1202List.get(0).getCzbz()); |
| | | } |
| | | //夿æ¯å¦ä¸ºè¹è¿ |
| | | if(StringUtils.isNotEmpty(sysData.getTransType()) && sysData.getTransType().equals("3")){ |
| | | listInoutRecordItem = fzzy40SyncInoutRecordItemRep.findDataByRecordId(sysData.getId()); |
| | | if(null == listInoutRecordItem || listInoutRecordItem.isEmpty()){ |
| | | api1202Rep.save(apiData); |
| | | continue; |
| | | } |
| | | |
| | | int idNum = Integer.valueOf(sysData.getId().substring(12))*100 + 10001; |
| | | for (Fz40InoutRecordItem fz40InoutRecordItem : listInoutRecordItem) { |
| | | apiData.setRkywdh(Constant.INOUT_TYPE_14 + sysData.getId().substring(4,10) + String.valueOf(idNum).substring(1)); |
| | | apiData.setMz(fz40InoutRecordItem.getFullWeight()); |
| | | apiData.setPz(fz40InoutRecordItem.getEmptyWeight()); |
| | | apiData.setJz(fz40InoutRecordItem.getSettleWeight()); |
| | | |
| | | api1202Rep.save(apiData); |
| | | idNum ++; |
| | | } |
| | | }else { |
| | | //ä¿åæ°æ® |
| | | api1202Rep.save(apiData); |
| | | } |
| | | |
| | | log.info("1202---åæ¥æ°æ®ï¼{}", apiData.toString()); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | import com.fzzy.api.view.repository.GbCheckItemRep; |
| | | import com.fzzy.async.fzzy40.entity.Fz40CheckItem; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecord; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecordItem; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1202Rep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1203Rep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40SyncInoutRecordItemRep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | |
| | | |
| | | @Autowired |
| | | private Fzzy40Sync1202Rep fzzySync1202Rep; |
| | | @Autowired |
| | | private Fzzy40SyncInoutRecordItemRep fzzy40SyncInoutRecordItemRep; |
| | | @Autowired |
| | | private Fzzy40Sync1203Rep fzzySync1203Rep; |
| | | @Autowired |
| | |
| | | String zkl; |
| | | List<Api1203> api1203List; |
| | | List<Api1202> api1102List; |
| | | List<Fz40InoutRecordItem> listInoutRecordItem; |
| | | List<String> listIds; |
| | | for (Fz40InoutRecord sysData : list) { |
| | | //æ¥è¯¢ç²®é£å
¥åºä¿¡æ¯ï¼è¥ä¸ºç©ºåä¸è¿è¡åæ¥ä¸ä¼ |
| | | api1102List = api1202Rep.getDataByBizId(sysData.getId()); |
| | | if(null == api1102List || api1102List.isEmpty()){ |
| | | continue; |
| | | listIds = new ArrayList<>(); |
| | | //夿æ¯å¦ä¸ºè¹è¿ |
| | | if(StringUtils.isNotEmpty(sysData.getTransType()) && sysData.getTransType().equals("3")){ |
| | | listInoutRecordItem = fzzy40SyncInoutRecordItemRep.findDataByRecordId(sysData.getId()); |
| | | if(null != listInoutRecordItem && listInoutRecordItem.size() > 0){ |
| | | int idNum = Integer.valueOf(sysData.getId().substring(12))*100 + 10001; |
| | | |
| | | for (Fz40InoutRecordItem fz40InoutRecordItem : listInoutRecordItem) { |
| | | listIds.add(Constant.INOUT_TYPE_14 + sysData.getId().substring(4,10) + String.valueOf(idNum).substring(1)); |
| | | idNum ++; |
| | | } |
| | | }else { |
| | | listIds.add(Constant.INOUT_TYPE_14 + sysData.getId().substring(4)); |
| | | } |
| | | }else { |
| | | listIds.add(Constant.INOUT_TYPE_14 + sysData.getId().substring(4)); |
| | | } |
| | | |
| | | //è·åå
¥åºè´¨æ£ä¿¡æ¯ |
| | | fz40CheckItems = fzzySync1203Rep.listInoutCheckItem(sysData.getCheckId(), deptId.substring(0, 4)); |
| | | if (null == fz40CheckItems || fz40CheckItems.isEmpty()) { |
| | | log.info("-------------没æè·åå°å½åå
¥åºè´¨æ£ä¿¡æ¯--------------"); |
| | | continue; |
| | | } |
| | | |
| | | for (String listId : listIds) { |
| | | //æ¥è¯¢ç²®é£å
¥åºä¿¡æ¯ï¼è¥ä¸ºç©ºåä¸è¿è¡åæ¥ä¸ä¼ |
| | | api1102List = api1202Rep.getDataById(listId); |
| | | if(null == api1102List || api1102List.isEmpty()){ |
| | | continue; |
| | | } |
| | | |
| | |
| | | |
| | | apiData.setJyxm(jyxm); |
| | | apiData.setJyz(jyz); |
| | | apiData.setZkj(zkj.substring(1)); |
| | | apiData.setZkl(zkl.substring(1)); |
| | | apiData.setZkj(StringUtils.isEmpty(zkj)?"":zkj.substring(1)); |
| | | apiData.setZkl(StringUtils.isEmpty(zkl)?"":zkl.substring(1)); |
| | | if("UNPASS".equals(sysData.getCheckStatus())){ |
| | | apiData.setJyjg("0"); |
| | | } |
| | |
| | | apiData.setJysj(DateUtils.addMinutes(sysData.getRegisterTime(), 30)); |
| | | |
| | | //ç²®é£åç§ |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety()); |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety().substring(0,3)); |
| | | apiData.setLspzdm(mappingCode); |
| | | |
| | | //ä¿ç®¡å夿 ¸ |
| | |
| | | apiData.setCzbz(api1203List.get(0).getCzbz()); |
| | | } |
| | | |
| | | //ä¿åæ°æ® |
| | | api1203Rep.save(apiData); |
| | | log.info("1203---åæ¥æ°æ®ï¼{}", apiData.toString()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("---åæ¥å¤±è´¥----{}", e); |
| | | apiLog.setResult("åæ¥å¤±è´¥ï¼" + e.getMessage()); |
| | |
| | | import com.fzzy.api.view.repository.ApiLogRep; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutNoticeOut; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecord; |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecordItem; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1202Rep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40SyncInoutRecordItemRep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40SyncNoticeOutRep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | private final static String INOUT_TYPE_OUT = "OUT"; |
| | | @Autowired |
| | | private Fzzy40Sync1202Rep fzzySync1202Rep; |
| | | @Autowired |
| | | private Fzzy40SyncInoutRecordItemRep fzzy40SyncInoutRecordItemRep; |
| | | @Autowired |
| | | private Fzzy40SyncNoticeOutRep fzzySyncNoticeOutRep; |
| | | @Autowired |
| | |
| | | Api1105 api1105; |
| | | List<Fz40InoutNoticeOut> listInoutNotice; |
| | | List<Api1205> api1205List; |
| | | List<Fz40InoutRecordItem> listInoutRecordItem; |
| | | for (Fz40InoutRecord sysData : list) { |
| | | if(sysData.getRecordStatus().equals("DEL") || sysData.getRecordStatus().equals("ERROR")){ |
| | | continue; |
| | | } |
| | | if(null == sysData.getRecordWeight() || sysData.getRecordWeight() == 0){ |
| | | sysData.setRecordWeight(sysData.getSettleWeight()); |
| | | } |
| | |
| | | } |
| | | apiData = new Api1205(); |
| | | apiData.setCkywdh(Constant.INOUT_TYPE_15 + sysData.getId().substring(4)); |
| | | //夿ä¸å¡æ¶é´ä¸åæ®å·æ¯å¦å¹é
ï¼è¥ä¸å¹é
ï¼åæ´æ¹ä¸å¡æ¶é´ä¸ºåæ®å·æå¨çæ¶é´ |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | | Date time = dateFormat.parse(sysData.getId().substring(2, 10)); |
| | | int numDay = DateUtil.difDay(DateUtil.getCurZero(sysData.getCompleteTime()), DateUtil.getCurZero(time)); |
| | | if(numDay != 0){ |
| | | sysData.setFullWeightTime(DateUtils.addDays(sysData.getFullWeightTime(), numDay)); |
| | | sysData.setEmptyWeightTime(DateUtils.addDays(sysData.getEmptyWeightTime(), numDay)); |
| | | sysData.setCompleteTime(DateUtils.addDays(sysData.getCompleteTime(), numDay)); |
| | | } |
| | | |
| | | //è´§ä½ä»£ç |
| | | apiData.setHwdm(api1105.getHwdm()); |
| | |
| | | //éç¥åå· |
| | | apiData.setCktzdh(sysData.getNoticeId()); |
| | | |
| | | apiData.setYwrq(sysData.getRegisterTime()); |
| | | apiData.setYwrq(DateUtils.parseDate(sysData.getId().substring(2, 10), new String[] { "yyyyMMdd" })); |
| | | |
| | | //è·åååå· |
| | | apiData.setHth(api1105.getHwdm().substring(0,18) + apiData.getCkywdh()); |
| | | listInoutNotice = fzzySyncNoticeOutRep.listInoutNoticeOutById(sysData.getNoticeId()); |
| | | if(null != listInoutNotice && listInoutNotice.size() >0){ |
| | | if(StringUtils.isNotEmpty(listInoutNotice.get(0).getContractId())){ |
| | | apiData.setHth(api1105.getHwdm().substring(0,18) + listInoutNotice.get(0).getContractId()); |
| | | }else { |
| | | apiData.setHth(api1105.getHwdm().substring(0,18) + apiData.getCkywdh()); |
| | | } |
| | | |
| | | if(StringUtils.isNotEmpty(listInoutNotice.get(0).getPlanId())){ |
| | | apiData.setJhmxh(listInoutNotice.get(0).getPlanId()); |
| | | } |
| | | } |
| | | |
| | | //è¿è¾å·¥å
·ï¼è¥ä¸ºç©ºï¼åé»è®¤ç»1-汽车 |
| | | apiData.setYsgj(StringUtils.isEmpty(sysData.getTransType()) ? "1":sysData.getTransType()); |
| | |
| | | apiData.setDjsj(sysData.getRegisterTime()); |
| | | |
| | | //ç²®é£åç§ |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety()); |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, sysData.getFoodVariety().substring(0,3)); |
| | | apiData.setLspzdm(mappingCode); |
| | | |
| | | //ç²®é£ç级 |
| | |
| | | }else { |
| | | apiData.setCzbz(api1205List.get(0).getCzbz()); |
| | | } |
| | | //夿æ¯å¦ä¸ºè¹è¿ |
| | | if(StringUtils.isNotEmpty(sysData.getTransType()) && sysData.getTransType().equals("3")){ |
| | | listInoutRecordItem = fzzy40SyncInoutRecordItemRep.findDataByRecordId(sysData.getId()); |
| | | if(null == listInoutRecordItem || listInoutRecordItem.isEmpty()){ |
| | | api1205Rep.save(apiData); |
| | | continue; |
| | | } |
| | | |
| | | int idNum = Integer.valueOf(sysData.getId().substring(12))*100 + 10001; |
| | | for (Fz40InoutRecordItem fz40InoutRecordItem : listInoutRecordItem) { |
| | | apiData.setCkywdh(Constant.INOUT_TYPE_15 + sysData.getId().substring(4,10) + String.valueOf(idNum).substring(1)); |
| | | apiData.setMz(fz40InoutRecordItem.getFullWeight()); |
| | | apiData.setPz(fz40InoutRecordItem.getEmptyWeight()); |
| | | apiData.setJz(fz40InoutRecordItem.getSettleWeight()); |
| | | api1205Rep.save(apiData); |
| | | idNum ++; |
| | | } |
| | | }else { |
| | | //ä¿åæ°æ® |
| | | api1205Rep.save(apiData); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("---åæ¥å¤±è´¥----{}", e); |
| | | apiLog.setResult("åæ¥å¤±è´¥ï¼" + e.getMessage()); |
| | |
| | | apiData.setHwdm(api1105.getHwdm()); |
| | | |
| | | //ç²®é£åç§ |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, fz40DepotStore.getFoodVariety()); |
| | | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, fz40DepotStore.getFoodVariety().substring(0,3)); |
| | | apiData.setLspzdm(mappingCode); |
| | | |
| | | //ç²®é£æ§è´¨ |
| | |
| | | if(StringUtils.isNotEmpty(sysData.getCardId())){ |
| | | apiData.setLxrsfzh(sysData.getCardId()); |
| | | } |
| | | if(StringUtils.isNotEmpty(sysData.getYzbm())){ |
| | | apiData.setYzbm(sysData.getYzbm()); |
| | | } |
| | | apiData.setYzbm(StringUtils.isEmpty(sysData.getYzbm()) ? "000000" :sysData.getYzbm()); |
| | | apiData.setDzyx(StringUtils.isEmpty(sysData.getDzyx()) ? "" :sysData.getDzyx()); |
| | | apiData.setKhfkhh(StringUtils.isEmpty(sysData.getBank()) ? "999" :sysData.getBank()); |
| | | apiData.setKhfzh(StringUtils.isEmpty(sysData.getBankNum()) ? "" :sysData.getBankNum()); |
| | |
| | | import com.fzzy.push.sh2023.SH2023Constant; |
| | | import com.fzzy.push.sh2023.dto.SH2023Api1311; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import java.util.Date; |
| | |
| | | sh2023Api1311.setJkcs("9"); |
| | | } |
| | | sh2023Api1311.setJkxlh(sysData.getSn()); |
| | | if(StringUtils.isNotEmpty(sysData.getAzwzlx())){ |
| | | if (sysData.getAzwzlx().equals("08")) { |
| | | sh2023Api1311.setSpjklx("1"); |
| | | } else if (secType.indexOf(sysData.getAzwzlx()) >= 0) { |
| | |
| | | } else { |
| | | sh2023Api1311.setSpjklx("3"); |
| | | } |
| | | } |
| | | sh2023Api1311.setSblxbm("1"); |
| | | sh2023Api1311.setAzwzlx(sysData.getAzwzlx()); |
| | | sh2023Api1311.setZsqy("Y"); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.fzzy.api.Constant; |
| | | import com.fzzy.api.entity.Api1102; |
| | | import com.fzzy.api.entity.Api1105; |
| | | import com.fzzy.api.entity.ApiInfoData; |
| | | import com.fzzy.api.entity.ApiLog; |
| | | import com.fzzy.api.entity.*; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.api.view.repository.Api1102Rep; |
| | | import com.fzzy.api.view.repository.ApiConfsRep; |
| | | import com.fzzy.api.view.repository.ApiInfoDataRep; |
| | | import com.fzzy.api.view.repository.ApiLogRep; |
| | | import com.fzzy.async.fzzy40.entity.Fz40Depot; |
| | |
| | | @Autowired |
| | | private ApiCommonService commonService; |
| | | @Autowired |
| | | private Api1102Rep api1102Rep; |
| | | @Autowired |
| | | private ApiLogRep apiLogRep; |
| | | @Autowired |
| | | private ApiConfsRep apiConfsRep; |
| | | @Autowired |
| | | private ApiInfoDataRep apiInfoDataRep; |
| | | |
| | |
| | | apiLog.setStatus(99); |
| | | apiLog.setId(ContextUtil.getUUID()); |
| | | try { |
| | | //ç±äºdepotConfè¡¨ä¸æ²¡æåºåºç¼ç ï¼å
æ¥è¯¢ä»åºè¡¨ |
| | | List<Fz40Depot> list = fzzy40SyncDepotRep.listDepotList(deptId); |
| | | |
| | | if (null == list || list.isEmpty()) { |
| | | log.info("2103---ç²®æ
设å¤é
ç½®åæ¥æ°æ®ï¼æ²¡ææ¥è¯¢å°ä»åºä¿¡æ¯"); |
| | | return; |
| | | } |
| | | |
| | | List<Api1102> api1102List = api1102Rep.findPushData(kqdm); |
| | | List<ApiConfs> apiConf = apiConfsRep.getDataByKqdm(kqdm); |
| | | String bjw = ""; |
| | | if (null != api1102List && api1102List.size() > 0) { |
| | | bjw = ShAreaBjw.getBjw(api1102List.get(0).getXzqhdm()); |
| | | if (null != apiConf && apiConf.size() > 0) { |
| | | bjw = apiConf.get(0).getUserName(); |
| | | } |
| | | |
| | | SH2023Api2103 sh2023Api2103; |
| | |
| | | // 1-3-5 |
| | | // 8-8-8 |
| | | //çä»è§å |
| | | sh2023Api2103.setDlqs("0"); |
| | | if (StringUtils.isNotEmpty(depotConf.getCableCir())) { |
| | | sh2023Api2103.setDlqs(String.valueOf(strs.length)); |
| | | sh2023Api2103.setDlhs(null); |
| | | sh2023Api2103.setDlls(null); |
| | | sh2023Api2103.setDlhs("0"); |
| | | sh2023Api2103.setDlls("0"); |
| | | |
| | | //çµç¼åæå详æ
|
| | | listItem = new ArrayList<>(); |
| | |
| | | apiInfoDataList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_2103, infoData.getDataId(),kqdm); |
| | | if (null == apiInfoDataList || apiInfoDataList.isEmpty()) { |
| | | infoData.setCzbz(Constant.CZBZ_I); |
| | | sh2023Api2103.setCzbz(Constant.CZBZ_I); |
| | | } else { |
| | | infoData.setCzbz(apiInfoDataList.get(0).getCzbz()); |
| | | sh2023Api2103.setCzbz(apiInfoDataList.get(0).getCzbz()); |
| | | } |
| | | |
| | | infoData.setData(JSON.toJSONString(sh2023Api2103)); |
| | |
| | | /** |
| | | * æ¥è¯¢è´¨æ£æ°æ® |
| | | * |
| | | * @author chen |
| | | * @author czt |
| | | * @date 2023-05-14 19:55 |
| | | */ |
| | | public interface Fzzy40Sync1310Rep extends JpaRepository<Fz40Quality, String> { |
| | |
| | | * @param end |
| | | * @return |
| | | */ |
| | | @Query("from Fz40Quality where time >=:start and time <:end order by time ") |
| | | @Query("from Fz40Quality where updateTime >=:start and updateTime <:end order by updateTime ") |
| | | List<Fz40Quality> findDateByTime(@Param("start") Date start, @Param("end") Date end); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.fzzy.async.fzzy40.repository; |
| | | |
| | | import com.fzzy.async.fzzy40.entity.Fz40InoutRecordItem; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.data.jpa.repository.Query; |
| | | import org.springframework.data.repository.query.Param; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¹è¿æµæ°´åè¡¨ä¿¡æ¯ |
| | | * |
| | | * @author czt |
| | | * |
| | | * @date 2023-08-21 |
| | | */ |
| | | public interface Fzzy40SyncInoutRecordItemRep extends JpaRepository<Fz40InoutRecordItem, String> { |
| | | |
| | | /** |
| | | * æ ¹æ®ä»åºç¼ç è·åç²®æ
åæ°é
ç½®ä¿¡æ¯ |
| | | * @param recordId |
| | | * @return |
| | | */ |
| | | @Query("from Fz40InoutRecordItem where recordId =:recordId order by createTime ") |
| | | List<Fz40InoutRecordItem> findDataByRecordId(@Param("recordId") String recordId); |
| | | } |
| | |
| | | <Property name="dataType">Date</Property> |
| | | <Property name="label">æåæ´æ°æ¶é´</Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="czbz"> |
| | | <Property name="label">æä½æ å¿</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues">${dorado.getDataProvider("apiTriggerService#trigger").getResult("CZBZ")}</Property> |
| | | <Property name="keyProperty">code</Property> |
| | | <Property name="valueProperty">name</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <Reference name="sh2023Api2103Items"> |
| | | <Property name="dataType">[dtItem]</Property> |
| | | <Property name="dataProvider">sHApi2103PR#itemList</Property> |
| | |
| | | <Property name="property">bjw</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="czbz"> |
| | | <Property name="property">czbz</Property> |
| | | <Property name="align">center</Property> |
| | | </DataColumn> |
| | | <DataColumn name="zhgxsj"> |
| | | <Property name="property">zhgxsj</Property> |
| | | <Property name="align">center</Property> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">bjw</Property> |
| | | <Property name="property">bjw</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">czbz</Property> |
| | | <Property name="property">czbz</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dlcs</Property> |
| | | <Property name="property">dlcs</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dlhs</Property> |
| | | <Property name="property">dlhs</Property> |
| | | <Editor/> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dlcs</Property> |
| | | <Property name="property">dlcs</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dlqs</Property> |
| | | <Property name="property">dlqs</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">scqd</Property> |
| | | <Property name="property">scqd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">sczd</Property> |
| | | <Property name="property">sczd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">zczd</Property> |
| | | <Property name="property">zczd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">xcqd</Property> |
| | | <Property name="property">xcqd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">sczd</Property> |
| | | <Property name="property">sczd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">zczd</Property> |
| | | <Property name="property">zczd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">xczd</Property> |
| | | <Property name="property">xczd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">dlqs</Property> |
| | | <Property name="property">dlqs</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | |
| | | <Property name="property">yxfwjsc</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">bjw</Property> |
| | | <Property name="property">bjw</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | |
| | | <AutoFormElement> |
| | | <Property name="name">zhgxsj</Property> |
| | | <Property name="property">zhgxsj</Property> |
| | |
| | | |
| | | @Expose |
| | | public String pushData(List<SH2023Api2103> items) { |
| | | ResponseDto responseDto; |
| | | |
| | | String result = ""; |
| | | |
| | | String kqdm = items.get(0).getHwdm().substring(0, 21); |
| | |
| | | } |
| | | |
| | | //å°è£
åæ° |
| | | ApiParam param = new ApiParam(apiConf, "21", SH2023Constant.SH_2023_API_CODE_2103); |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, SH2023Constant.SH_2023_API_CODE_2103); |
| | | |
| | | //è·åå®ç°æ¥å£ |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | |
| | | return "ç³»ç»æ²¡æå½åæ¨éåè®®é
ç½®ï¼æ§è¡å¤±è´¥"; |
| | | } |
| | | |
| | | //æ¨éï¼æ°æ®ä¸ºéåå½¢å¼ |
| | | responseDto = apiService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //æ¨éæåï¼æ´æ°æ°æ®ä¸ä¼ ç¶æ |
| | | |
| | | ResponseDto responseDto; |
| | | ApiInfoData infoData; |
| | | for (SH2023Api2103 data : items) { |
| | | |
| | | responseDto = apiService.pushData(param, apiConf, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | infoData = new ApiInfoData(); |
| | | infoData.setId(data.getHwdm()); |
| | | infoData.setKqdm(data.getHwdm().substring(0, 21)); |
| | |
| | | |
| | | infoData.setCzbz(Constant.CZBZ_U); |
| | | infoData.setData(JSON.toJSONString(data)); |
| | | |
| | | apiInfoDataRep.save(infoData); |
| | | |
| | | } |
| | | result += responseDto.toString(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | return api1404; |
| | | } |
| | | if (SH2023Constant.SH_2023_API_CODE_2101.equals(inteId)) { |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(data); |
| | | return data; |
| | | } |
| | | if (SH2023Constant.SH_2023_API_CODE_2102.equals(inteId)) { |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(data); |
| | | return data; |
| | | } |
| | | if (SH2023Constant.SH_2023_API_CODE_2103.equals(inteId)) { |
| | | SH2023Api2103 api2103 = new SH2023Api2103(); |
| | | BeanUtils.copyProperties(data, api2103); |
| | | List<SH2023Api2103Item> listItems = castList(api2103.getDlqplxq(), SH2023Api2103Item.class); |
| | | api2103.setSh2023Api2103Items(listItems); |
| | | return api2103; |
| | | SH2023Api2103 apiData = new SH2023Api2103(); |
| | | BeanUtils.copyProperties(data, apiData); |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(apiData); |
| | | return apiData; |
| | | } |
| | | if (SH2023Constant.SH_2023_API_CODE_2104.equals(inteId)) { |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(data); |
| | | return data; |
| | | } |
| | | if (SH2023Constant.SH_2023_API_CODE_2203.equals(inteId)) { |
| | | |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(data); |
| | | return data; |
| | | } |
| | | if (SH2023Constant.SH_2023_API_CODE_2204.equals(inteId)) { |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(data); |
| | | return data; |
| | | } |
| | | //è®¾ç½®ç©ºå±æ§ä¸ºé»è®¤å¼ |
| | | changeObject(data); |
| | | return data; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void pushData2101(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //è·å æ£æ¤åä¿¡æ¯ |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2101); |
| | | |
| | | param.setInteCategory(Constant.API_CATEGORY_12); |
| | | param.setInteId(SH2023Constant.SH_2023_API_CODE_2101); |
| | | |
| | | ResponseDto responseDto; |
| | | SH2023Api2101 shApi2101; |
| | | for (ApiInfoData infoData : items) { |
| | | shApi2101 = JSONObject.parseObject(infoData.getData(), SH2023Api2101.class); |
| | | shApi2101.setCzbz(infoData.getCzbz()); |
| | | shApi2101.setZhgxsj(infoData.getUpdateTime()); |
| | | param.setBizId(infoData.getDataId()); |
| | | responseDto = apiRemoteService.pushData(param, shApi2101); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(infoData.getCzbz())) { |
| | | infoData.setCzbz(Constant.CZBZ_U); |
| | | apiInfoDataRep.save(infoData); |
| | | } |
| | | } |
| | | } |
| | | // List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2101); |
| | | // |
| | | // param.setInteCategory(Constant.API_CATEGORY_12); |
| | | // param.setInteId(SH2023Constant.SH_2023_API_CODE_2101); |
| | | // |
| | | // ResponseDto responseDto; |
| | | // SH2023Api2101 shApi2101; |
| | | // for (ApiInfoData infoData : items) { |
| | | // shApi2101 = JSONObject.parseObject(infoData.getData(), SH2023Api2101.class); |
| | | // shApi2101.setCzbz(infoData.getCzbz()); |
| | | // shApi2101.setZhgxsj(infoData.getUpdateTime()); |
| | | // param.setBizId(infoData.getDataId()); |
| | | // responseDto = apiRemoteService.pushData(param, shApi2101); |
| | | // if (responseDto.getSuccess() == 0) { |
| | | // if (Constant.CZBZ_I.equals(infoData.getCzbz())) { |
| | | // infoData.setCzbz(Constant.CZBZ_U); |
| | | // apiInfoDataRep.save(infoData); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public void pushData2104(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //è·å æ£æ¤åä¿¡æ¯ |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | | // List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | | |
| | | param.setInteCategory(Constant.API_CATEGORY_12); |
| | | param.setInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | | |
| | | ResponseDto responseDto; |
| | | SH2023Api2104 shApi2104; |
| | | for (ApiInfoData infoData : items) { |
| | | shApi2104 = JSONObject.parseObject(infoData.getData(), SH2023Api2104.class); |
| | | shApi2104.setCzbz(infoData.getCzbz()); |
| | | shApi2104.setZhgxsj(infoData.getUpdateTime()); |
| | | |
| | | param.setBizId(infoData.getDataId()); |
| | | responseDto = apiRemoteService.pushData(param, shApi2104); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(infoData.getCzbz())) { |
| | | infoData.setCzbz(Constant.CZBZ_U); |
| | | apiInfoDataRep.save(infoData); |
| | | } |
| | | } |
| | | } |
| | | // param.setInteCategory(Constant.API_CATEGORY_12); |
| | | // param.setInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | | // |
| | | // ResponseDto responseDto; |
| | | // SH2023Api2104 shApi2104; |
| | | // for (ApiInfoData infoData : items) { |
| | | // shApi2104 = JSONObject.parseObject(infoData.getData(), SH2023Api2104.class); |
| | | // shApi2104.setCzbz(infoData.getCzbz()); |
| | | // shApi2104.setZhgxsj(infoData.getUpdateTime()); |
| | | // |
| | | // param.setBizId(infoData.getDataId()); |
| | | // responseDto = apiRemoteService.pushData(param, shApi2104); |
| | | // if (responseDto.getSuccess() == 0) { |
| | | // if (Constant.CZBZ_I.equals(infoData.getCzbz())) { |
| | | // infoData.setCzbz(Constant.CZBZ_U); |
| | | // apiInfoDataRep.save(infoData); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | |
| | | */ |
| | | public void pushData2203(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //è·å交æä¸å¿åå |
| | | List<Api1201> list = api1201Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == list || list.isEmpty()) { |
| | | log.error("-----䏿µ·å¸å¹³å°2023çï¼æªè·åå°è½®æ¢è®¡åæç»ï¼ä¸æ¨é-----"); |
| | | return; |
| | | } |
| | | param.setInteCategory(Constant.API_CATEGORY_14); |
| | | param.setInteId(SH2023Constant.SH_2023_API_CODE_2203); |
| | | |
| | | ResponseDto responseDto; |
| | | for (Api1201 data : list) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | //æ´æ°ç¶æ |
| | | api1201Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | // List<Api1201> list = api1201Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | // |
| | | // if (null == list || list.isEmpty()) { |
| | | // log.error("-----䏿µ·å¸å¹³å°2023çï¼æªè·åå°è½®æ¢è®¡åæç»ï¼ä¸æ¨é-----"); |
| | | // return; |
| | | // } |
| | | // param.setInteCategory(Constant.API_CATEGORY_14); |
| | | // param.setInteId(SH2023Constant.SH_2023_API_CODE_2203); |
| | | // |
| | | // ResponseDto responseDto; |
| | | // for (Api1201 data : list) { |
| | | // param.setBizId(data.getBizId()); |
| | | // responseDto = apiRemoteService.pushData(param, data); |
| | | // if (responseDto.getSuccess() == 0) { |
| | | // if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | // data.setCzbz(Constant.CZBZ_U); |
| | | // //æ´æ°ç¶æ |
| | | // api1201Rep.save(data); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public void pushData2204(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //è·åå®åæ°´æ£éª |
| | | List<Api1310> list = api1310Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == list || list.isEmpty()) { |
| | | log.error("-----䏿µ·å¸å¹³å°2023çï¼æªè·åå°å®åæ°´æ£éªï¼ä¸æ¨é-----"); |
| | | return; |
| | | } |
| | | param.setInteCategory(Constant.API_CATEGORY_14); |
| | | param.setInteId(SH2023Constant.SH_2023_API_CODE_2204); |
| | | |
| | | ResponseDto responseDto; |
| | | for (Api1310 data : list) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | //æ´æ°ç¶æ |
| | | api1310Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | // List<Api1310> list = api1310Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | // |
| | | // if (null == list || list.isEmpty()) { |
| | | // log.error("-----䏿µ·å¸å¹³å°2023çï¼æªè·åå°å®åæ°´æ£éªï¼ä¸æ¨é-----"); |
| | | // return; |
| | | // } |
| | | // param.setInteCategory(Constant.API_CATEGORY_14); |
| | | // param.setInteId(SH2023Constant.SH_2023_API_CODE_2204); |
| | | // |
| | | // ResponseDto responseDto; |
| | | // for (Api1310 data : list) { |
| | | // param.setBizId(data.getBizId()); |
| | | // responseDto = apiRemoteService.pushData(param, data); |
| | | // if (responseDto.getSuccess() == 0) { |
| | | // if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | // |
| | | // data.setCzbz(Constant.CZBZ_U); |
| | | // //æ´æ°ç¶æ |
| | | // api1310Rep.save(data); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | |
| | | private Date zhgxsj; |
| | | |
| | | @Transient |
| | | @JsonIgnore |
| | | @JSONField(serialize = false) |
| | | private List<SH2023Api2103Item> sh2023Api2103Items; |
| | | |
| | | } |