CZT
2023-11-14 13391e649a65a374e390066a35b52c61a6feaa3f
调整心跳指令返回
已修改6个文件
221 ■■■■ 文件已修改
src/main/java/com/fzzy/api/view/repository/Api1104Rep.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1204.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1206.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/order/OrderServer.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1104.java 172 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/fzzy/api/view/repository/Api1104Rep.java
@@ -46,4 +46,11 @@
     */
    @Query("from Api1104 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ")
    List<Api1104> findPushDataTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end);
    /**
     * @param
     * @return
     */
    @Query("from Api1104 where cfbh=:cfbh ")
    List<Api1104> findDataByCfbh(@Param("cfbh") String cfbh);
}
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1204.java
@@ -1,6 +1,7 @@
package com.fzzy.async.fzzy40.impl;
import com.fzzy.api.Constant;
import com.fzzy.api.entity.Api1102;
import com.fzzy.api.entity.Api1105;
import com.fzzy.api.entity.Api1204;
import com.fzzy.api.entity.ApiLog;
@@ -36,6 +37,8 @@
    @Autowired
    private ApiLogRep apiLogRep;
    @Autowired
    private Api1102Rep api1102Rep;
    @Autowired
    private Api1204Rep api1204Rep;
    @Autowired
    private ApiCommonService commonService;
@@ -68,6 +71,8 @@
                log.info("-------------没有获取到粮食入库结算信息------------------");
                return;
            }
            //根据库区代码获取库区信息
            Api1102 api1102 = api1102Rep.findById(kqdm).get();
            Api1204 apiData;
            Api1105 api1105;
@@ -78,6 +83,11 @@
                //入库结算单号:库区代码 + yyyyMMdd + 4为顺序号
                apiData.setRkjsdh(kqdm + sysData.getId());
                //合同号
                if(StringUtils.isNotEmpty(sysData.getContractId())){
                    apiData.setHth(api1102.getDwdm() + sysData.getContractId());
                }
                if(StringUtils.isNotEmpty(sysData.getDepotId())){
                    api1105 = commonService.getApi1105Cache(sysData.getDepotId());
                    //货位代码
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1206.java
@@ -67,7 +67,7 @@
            }
            //根据库区代码获取库区信息
            Api1102 api1201 = api1102Rep.findById(kqdm).get();
            Api1102 api1102 = api1102Rep.findById(kqdm).get();
            Api1206 apiData;
            List<Api1206> api1206List;
@@ -79,7 +79,7 @@
                //合同号
                if(StringUtils.isNotEmpty(sysData.getContractId())){
                    apiData.setHth(api1201.getDwdm() + sysData.getContractId());
                    apiData.setHth(api1102.getDwdm() + sysData.getContractId());
                }
                //结算重量、结算单价、结算金额、结算时间
src/main/java/com/fzzy/order/OrderServer.java
@@ -40,7 +40,9 @@
        //心跳指令,直接返回
        if(OrderConstant.ORDER_TYPE_0.equals(req.getType())){
            return new OrderResp(OrderResult.ORDER_CODE_500.getCode(), OrderResult.ORDER_CODE_500.getResult());
            OrderResp resp = new OrderResp(OrderResult.ORDER_CODE_200.getCode(), OrderResult.ORDER_CODE_500.getResult());
            log.info("心跳指令返回信息={}", resp);
            return resp;
        }
        try {
src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
@@ -47,6 +47,8 @@
    @Autowired
    private Api1102Rep api1102Rep;
    @Autowired
    private Api1103Rep api1103Rep;
    @Autowired
    private Api1104Rep api1104Rep;
    @Autowired
    private Api1208Rep api1208Rep;
@@ -221,6 +223,21 @@
        if (SH2023Constant.SH_2023_API_CODE_1104.equals(inteId)) {
            SH2023Api1104 api1104 = new SH2023Api1104();
            Api1104 apiData = (Api1104) data;
            //查询仓房信息
            List<Api1103> api1103List = api1103Rep.findPushDataByCfdm(apiData.getCfbh());
            List<Api1104> api1104List = api1104Rep.findDataByCfbh(apiData.getCfbh());
            int num = 2;
            if (null != api1104List && api1104List.size() > 0) {
                num = api1104List.size();
            }
            if (null != api1103List && api1103List.size() > 0) {
                Api1103 api1103 = api1103List.get(0);
                BeanUtils.copyProperties(api1103, api1104);
                api1104.setCwc(api1103.getCwc() / num);
                api1104.setCnc(api1103.getCnc() / num);
                api1104.setSjcr(api1103.getSjcr() / num);
            }
            BeanUtils.copyProperties(apiData, api1104);
            api1104.setAjdm(apiData.getAjdh());
            api1104.setCfdm(apiData.getCfbh());
@@ -408,6 +425,12 @@
                    }
                }
            }
            if (StringUtils.isNotEmpty(api1204.getHwdm())) {
                List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1204.getHwdm());
                if (null != api1208List && api1208List.size() > 0) {
                    api1204.setPch(api1208List.get(0).getHwdm() + api1208List.get(0).getShnd());
                }
            }
            //设置空属性为默认值
            changeObject(api1204);
@@ -459,7 +482,6 @@
                    }
                }
            }
            //设置空属性为默认值
            changeObject(api1206);
            return api1206;
src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1104.java
@@ -29,30 +29,159 @@
    @PropertyDef(label = "仓房(或油罐)编码")
    private String cfdm;
    @PropertyDef(label = "廒间长度")
    private Double ajcd;
    @PropertyDef(label = "仓房类型代码")
    private String cflxdm;
    @PropertyDef(label = "廒间宽度")
    private Double ajkd;
    @PropertyDef(label = "廒间高度")
    private Double ajgd;
    @PropertyDef(label = "廒间设计仓容")
    private Double ajsjcr;
    @PropertyDef(label = "廒间联系电话")
    private String ajlxdh;
    @PropertyDef(label = "交付使用日期")
    @JSONField(format = "yyyy-MM-dd")
    @PropertyDef(label = "廒间启用日期")
    private Date ajqyrq;
    private Date jfsyrq;
    @PropertyDef(label = "使用库区代码")
    private String sykqdm;
    @PropertyDef(label = "建设单位")
    private String jsdw;
    @PropertyDef(label = "廒间状态")
    private String ajzt;
    @PropertyDef(label = "设计使用年限")
    private String sjsynx;
    @PropertyDef(label = "设计单位")
    private String sjdw;
    @PropertyDef(label = "监理单位")
    private String jldw;
    @PropertyDef(label = "墙体结构")
    private String qtjg;
    @PropertyDef(label = "房顶结构")
    private String fdjg;
    @PropertyDef(label = "房架结构")
    private String fjjg;
    @PropertyDef(label = "地面结构")
    private String dmjg;
    @PropertyDef(label = "设计仓容")
    private Double sjcr;
    @PropertyDef(label = "仓外长")
    private Double cwc;
    @PropertyDef(label = "仓外宽")
    private Double cwk;
    @PropertyDef(label = "仓外檐高")
    private Double cwyg;
    @PropertyDef(label = "仓外顶高")
    private Double cwdg;
    @PropertyDef(label = "筒仓外径")
    private Double tcwj;
    @PropertyDef(label = "仓内长")
    private Double cnc;
    @PropertyDef(label = "仓内宽")
    private Double cnk;
    @PropertyDef(label = "仓内檐高")
    private Double cnyg;
    @PropertyDef(label = "仓内装粮线高")
    private Double cnzlxg;
    @PropertyDef(label = "筒仓内径")
    private Double tcnj;
    @PropertyDef(label = "仓内体积")
    private Double cntj;
    @PropertyDef(label = "仓门数量")
    private Integer cmsl;
    @PropertyDef(label = "仓门位置")
    private String cmwz;
    @PropertyDef(label = "仓门高度")
    private Double cmgd;
    @PropertyDef(label = "仓门宽度")
    private Double cmkd;
    @PropertyDef(label = "挡粮门型式")
    private String dlmxs;
    @PropertyDef(label = "仓房是否完好")
    private String cfsfwh;
    @PropertyDef(label = "储粮功效")
    private String clgx;
    @PropertyDef(label = "能否隔热保温")
    private String nfgrbw;
    @PropertyDef(label = "隔热保温措施")
    private String grbwcs;
    @PropertyDef(label = "隔热性能")
    private String grxn;
    @PropertyDef(label = "结构材料")
    private String jgcl;
    @PropertyDef(label = "气密性")
    private String qmx;
    @PropertyDef(label = "是否已进行信息化改造")
    private String sfyjxxxhgz;
    @PropertyDef(label = "粮情技术")
    private String lqjs;
    @PropertyDef(label = "能否散装储存")
    private String nfszcc;
    @PropertyDef(label = "有无防鼠防雀防虫装置及设施")
    private String ywfsfqfczz;
    @PropertyDef(label = "有无防火防爆防盗设施")
    private String ywfhfbfdss;
    @PropertyDef(label = "有无机械通风设施")
    private String ywjxtfss;
    @PropertyDef(label = "通风系统型式")
    private String tfxtxs;
    @PropertyDef(label = "通风技术")
    private String tfjs;
    @PropertyDef(label = "能否环流熏蒸杀虫")
    private String nfhlxzsc;
    @PropertyDef(label = "杀虫技术")
    private String scjs;
    @PropertyDef(label = "能否富氮低氧气调储粮")
    private String nffddyqtcl;
    @PropertyDef(label = "控温技术")
    private String kwjs;
    @PropertyDef(label = "害虫检测方式")
    private String hcjcfs;
    @PropertyDef(label = "仓房状态")
    private String cfzt;
    @PropertyDef(label = "保管员")
    private String bgr;
    @PropertyDef(label = "仓房经度")
    private Double jd;
    @PropertyDef(label = "仓房纬度")
    private Double wd;
    @PropertyDef(label = "操作标志")
    private String czbz;
@@ -61,6 +190,9 @@
    @PropertyDef(label = "最后更新时间")
    private Date zhgxsj;
    @PropertyDef(label = "粮食性质代码")
    private String lsxzdm;
    @PropertyDef(label = "标记位")
    private String bjw;