CZT
2023-11-14 13391e649a65a374e390066a35b52c61a6feaa3f
调整心跳指令返回
已修改6个文件
279 ■■■■ 文件已修改
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 82 ●●●●● 补丁 | 查看 | 原始文档 | 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());
@@ -352,13 +369,13 @@
            //设置粮食轮换年度
            List<Api1404> api1404List = api1404Rep.getDataByJhmxdh(apiData.getJhmxh());
            if(null != api1404List && api1404List.size() >0){
            if (null != api1404List && api1404List.size() > 0) {
                api1202.setLhnd(api1404List.get(0).getShnd());
            }
            //设置批次号
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1202.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1202.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
            //设置空属性为默认值
@@ -384,7 +401,7 @@
            }
            //设置批次号
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1203.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1203.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -399,13 +416,19 @@
            api1204.setBjw(ShAreaBjw.getBjw(code));
            //设置批次号
            if(StringUtils.isNotEmpty(api1204.getHth())){
            if (StringUtils.isNotEmpty(api1204.getHth())) {
                List<Api1202> api1202List = api1202Rep.getDataByRkjsdh(api1204.getRkjsdh());
                if(null != api1202List && api1202List.size() > 0){
                if (null != api1202List && api1202List.size() > 0) {
                    List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1202List.get(0).getHwdm());
                    if(null != api1208List && api1208List.size() > 0){
                    if (null != api1208List && api1208List.size() > 0) {
                        api1204.setPch(api1208List.get(0).getHwdm() + api1208List.get(0).getShnd());
                    }
                }
            }
            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());
                }
            }
@@ -430,13 +453,13 @@
            //设置粮食轮换年度
            List<Api1404> api1404List = api1404Rep.getDataByJhmxdh(apiData.getJhmxh());
            if(null != api1404List && api1404List.size() >0){
            if (null != api1404List && api1404List.size() > 0) {
                api1205.setLhnd(api1404List.get(0).getShnd());
            }
            //设置批次号
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1205.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1205.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -450,16 +473,15 @@
            BeanUtils.copyProperties(apiData, api1206);
            api1206.setBjw(ShAreaBjw.getBjw(code));
            //批次号
            if(StringUtils.isNotEmpty(api1206.getHth())){
            if (StringUtils.isNotEmpty(api1206.getHth())) {
                List<Api1205> api1205List = api1205Rep.getDataByCkjsdh(api1206.getCkjsdh());
                if(null != api1205List && api1205List.size() > 0){
                if (null != api1205List && api1205List.size() > 0) {
                    List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1205List.get(0).getHwdm());
                    if(null != api1208List && api1208List.size() > 0){
                    if (null != api1208List && api1208List.size() > 0) {
                        api1206.setPch(api1208List.get(0).getHwdm() + api1208List.get(0).getShnd());
                    }
                }
            }
            //设置空属性为默认值
            changeObject(api1206);
            return api1206;
@@ -474,7 +496,7 @@
            api1207.setBjw(ShAreaBjw.getBjw(code));
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1207.getDchwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1207.setPch(api1207.getDchwdm() + api1208List.get(0).getShnd());
            }
@@ -510,7 +532,7 @@
            api1209.setBjw(ShAreaBjw.getBjw(code));
            api1209.setJzrq(apiData.getYwrq());
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1209.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1209.setPch(api1209.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -525,7 +547,7 @@
            BeanUtils.copyProperties(apiData, api1210);
            api1210.setBjw(ShAreaBjw.getBjw(code));
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1210.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1210.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -542,7 +564,7 @@
            api1211.setBjw(ShAreaBjw.getBjw(code));
            api1211.setPch(apiData.getHwdm() + DateFormatUtils.format(apiData.getYwrq(), "yyyyMM"));
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1211.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1211.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -580,7 +602,7 @@
            api1302.setLwmx(apiData.getLswdzjh());
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1302.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1302.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -594,7 +616,7 @@
            BeanUtils.copyProperties(apiData, api1303);
            api1303.setBjw(ShAreaBjw.getBjw(code));
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1303.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1303.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
            //设置空属性为默认值
@@ -607,7 +629,7 @@
            BeanUtils.copyProperties(apiData, api1304);
            api1304.setBjw(ShAreaBjw.getBjw(code));
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(api1304.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                api1304.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
            }
@@ -693,8 +715,8 @@
            String lsxzdm = "122";
            String pch = "";
            List<Api1208> api1208List = api1208Rep.getDataByHwdm(api1310.getHwdm());
            if(null != api1208List && api1208List.size() > 0){
                if(StringUtils.isNotEmpty(api1208List.get(0).getLsxzdm())){
            if (null != api1208List && api1208List.size() > 0) {
                if (StringUtils.isNotEmpty(api1208List.get(0).getLsxzdm())) {
                    lsxzdm = api1208List.get(0).getLsxzdm();
                    pch = apiData.getHwdm() + api1208List.get(0).getShnd();
                }
@@ -702,16 +724,16 @@
            //设置批次号
            api1310.setPch(pch);
            api1310.setLsxzdm(lsxzdm);
            if (api1310.getYpsl() == 0.0){
            if (api1310.getYpsl() == 0.0) {
                api1310.setYpsl(5.0);
            }
            if(StringUtils.isEmpty(api1310.getQyrxm())){
            if (StringUtils.isEmpty(api1310.getQyrxm())) {
                api1310.setQyrxm("扦样人");
            }
            if(StringUtils.isEmpty(api1310.getJdrxm())){
            if (StringUtils.isEmpty(api1310.getJdrxm())) {
                api1310.setJdrxm("监督人");
            }
            if(StringUtils.isEmpty(api1310.getShrxm())){
            if (StringUtils.isEmpty(api1310.getShrxm())) {
                api1310.setShrxm("审核人");
            }
@@ -779,7 +801,7 @@
            SH2023Api2102 apiData = new SH2023Api2102();
            BeanUtils.copyProperties(data, apiData);
            List<Api1208> api1208List = api1208Rep.findDataByHwdm(apiData.getDrhwdm());
            if(null != api1208List && api1208List.size() > 0){
            if (null != api1208List && api1208List.size() > 0) {
                apiData.setPch(apiData.getDrhwdm() + api1208List.get(0).getShnd());
            }
            //设置空属性为默认值
@@ -814,12 +836,12 @@
        return data;
    }
    private String getWjmc(String wjlx, String wjmc){
        if("2".equals(wjlx) || "3".equals(wjlx) || "4".equals(wjlx) || "5".equals(wjlx)){
            if(wjmc.endsWith(".jpg")) {
    private String getWjmc(String wjlx, String wjmc) {
        if ("2".equals(wjlx) || "3".equals(wjlx) || "4".equals(wjlx) || "5".equals(wjlx)) {
            if (wjmc.endsWith(".jpg")) {
                wjmc = wjmc.replaceAll(".jpg", "_00.jpg");
            }
            if(wjmc.endsWith(".png")) {
            if (wjmc.endsWith(".png")) {
                wjmc = wjmc.replaceAll(".png", "_00.png");
            }
        }
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;