1、表阀一体机新协议解析优化;
2、取水口实体编辑更新逻辑修改,去除引起bug的代码。
10个文件已修改
119 ■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_92_A2_Down.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_93_A3_Down.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_93_A3_Up.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlCreate.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCd93_A3Vo.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-simulate-rtu202404/src/main/java/com/dy/simRtu202404/tcpClient/upData/UpOpenCloseValve.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-simulate-rtu202404/src/main/resources/config.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_92_A2_Down.java
@@ -94,11 +94,7 @@
            bs[index] = cvo.projectNo.byteValue() ;
            index ++ ;
            if(cvo.controllerType.equals("01")){
                bs[index] = (byte)0xF0 ;
            }else{
                bs[index] = (byte)0x00 ;
            }
            GlCreate.createValveOrPump(cvo.controllerType, bs, index) ;
            index ++ ;
            GlCreate.createIcCardNo(cvo.icCardNo, bs, index);
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_93_A3_Down.java
@@ -73,11 +73,7 @@
            bs[index] = cvo.projectNo.byteValue() ;
            index ++ ;
            if(cvo.controllerType.equals("01")){
                bs[index] = (byte)0xF0 ;
            }else{
                bs[index] = (byte)0x00 ;
            }
            GlCreate.createValveOrPump(cvo.controllerType, bs, index) ;
            index ++ ;
            GlCreate.createIcCardNo(cvo.icCardNo, bs, index);
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_93_A3_Up.java
@@ -48,7 +48,7 @@
        if(para.data != null && para.data.getSubData() != null){
            DataCd93_A3Vo subData = (DataCd93_A3Vo)((DataV202404)para.data.getSubData()).subData ;
            //opResult ;//关泵/阀结果: 0x00:成功 0x81:失败
            callback.notify(new ValveStateInfo(subData.opResult.byteValue()==0?false:true));
            callback.notify(new ValveStateInfo(subData.clResult.byteValue()==0?false:true));
        }
        return new MidResult[]{midRs} ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlCreate.java
@@ -34,6 +34,21 @@
        return bsHead ;
    }
    /**
     * 0xf0阀门 0x00水泵
     * @param controllerTypeByHex
     * @param bs
     * @param index
     */
    public static void createValveOrPump(String controllerTypeByHex, byte[] bs, int index){
        if(controllerTypeByHex != null && controllerTypeByHex.equals("57")){
            bs[index] = (byte)0x00 ;
        }else{
            bs[index] = (byte)0xF0 ;
        }
    }
    /**
     * 生成控制器地址
     * 6字节BCD码(12位行政区划) + 2字节HEX
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java
@@ -299,10 +299,10 @@
        cdData.projectNo = (int)bs[index];
        index ++ ;
        cdData.opResult = bs[index];
        cdData.clResult = bs[index];
        index ++ ;
        cdData.opType = bs[index];
        cdData.clType = bs[index];
        index++ ;
        cdData.icCardAddr = ByteUtil.bytes2Hex(bs, false, index, 4) ;
@@ -316,7 +316,7 @@
        index += 8 ;
        cdData.startDt  = GlParse.parseRtuDt(bs, index) ;
        if(cdData.opResult == (byte)0x81){
        if(cdData.clResult == (byte)0x81){
            //失败了,下面就没有数据了
            return ;
        }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/upVos/DataCd93_A3Vo.java
@@ -11,8 +11,8 @@
    public String controllerType;//控制器类型
    public Integer projectNo ;//项目编号
    public Byte opResult ;//关泵/阀结果: 0x00:成功 0x81:失败
    public Byte opType ;//关泵/阀方式:  0x00:刷卡闭 0x01:平台关 0x02:APP关  0x03:非法卡关 0x04:水表异常关 0x05:电表异常关 0x06:剩余水量不足关 0x07:剩余金额不足关 0x08:开泵/阀后管道没有流量关 0x09:掉电再上电。
    public Byte clResult;//关泵/阀结果: 0x00:成功 0x81:失败
    public Byte clType;//关泵/阀方式:  0x00:刷卡闭 0x01:平台关 0x02:APP关  0x03:非法卡关 0x04:水表异常关 0x05:电表异常关 0x06:剩余水量不足关 0x07:剩余金额不足关 0x08:开泵/阀后管道没有流量关 0x09:掉电再上电。
    public String icCardAddr ;//IC卡地址(远程关闭时为0)
    public String icCardNo ;//IC卡编号(17位数字)
    public String orderNo ;//订单号(16位数字)
@@ -43,10 +43,10 @@
        sb.append(projectNo == null?"未知":projectNo) ;
        sb.append("\n") ;
        sb.append("      关泵/阀类型 : ") ;
        sb.append(opType == null?"未知":(opType.byteValue() == 0x00 ? "刷卡":(opType.byteValue() == 0x01 ? "平台":(opType.byteValue() == 0x02 ? "APP":(opType.byteValue() == 0x03 ? "非法卡":(opType.byteValue() == 0x04 ? "水表异常":(opType.byteValue() == 0x05 ? "电表异常":(opType.byteValue() == 0x06 ? "剩余水量不足":(opType.byteValue() == 0x07 ? "剩余金额不足":(opType.byteValue() == 0x08 ? "无流量":(opType.byteValue() == 0x09 ? "掉电再上电":"未知"))))))))))) ;
        sb.append(clType == null?"未知":(clType.byteValue() == 0x00 ? "刷卡":(clType.byteValue() == 0x01 ? "平台":(clType.byteValue() == 0x02 ? "APP":(clType.byteValue() == 0x03 ? "非法卡":(clType.byteValue() == 0x04 ? "水表异常":(clType.byteValue() == 0x05 ? "电表异常":(clType.byteValue() == 0x06 ? "剩余水量不足":(clType.byteValue() == 0x07 ? "剩余金额不足":(clType.byteValue() == 0x08 ? "无流量":(clType.byteValue() == 0x09 ? "掉电再上电":"未知"))))))))))) ;
        sb.append("\n") ;
        sb.append("      关启泵/阀结果 : ") ;
        sb.append(opResult == null?"未知":(opResult.byteValue() == 0x01 ? "成功":"失败")) ;
        sb.append(clResult == null?"未知":(clResult.byteValue() == 0x01 ? "成功":"失败")) ;
        sb.append("\n") ;
        sb.append("      IC卡地址 : ") ;
        sb.append(icCardAddr == null?"未知":icCardAddr) ;
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -83,12 +83,12 @@
pipIrr:
    global:
        dev: true  #是否开发阶段,true或false
        dev: false  #是否开发阶段,true或false
        dsName: ym  #开发阶段,设置临时的数据库名称
    nginx:
        root: E:/apps/pipIrr/nginx-1.27.0
        root: D:/apps/pipIrr/nginx-1.27.0
        webPort: 54321
        webFilePort: 19913
        webFilePort: 64321
    mw:
        webPort: 8070 #通信中间件中应用,不能在web模块系统中应用
        actutorPort: 9070 #通信中间件中应用,不能在web模块系统中应用
@@ -204,8 +204,8 @@
            hashStart: 0
            hashEnd: 5461
            restUrl: http://127.0.0.1:${pipIrr.file1.webPort}/file #file是上下文,ip为局域网ip或本地IP
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv2:
            id: dyFile2
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -213,8 +213,8 @@
            hashStart: 5462
            hashEnd: 10923
            restUrl: http://127.0.0.1:${pipIrr.file2.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv3:
            id: dyFile3
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -222,8 +222,8 @@
            hashStart: 10924
            hashEnd: 16385
            restUrl: http://127.0.0.1:${pipIrr.file3.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv4:
            id: dyFile4
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -231,8 +231,8 @@
            hashStart: 16386
            hashEnd: 21847
            restUrl: http://127.0.0.1:${pipIrr.file4.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv5:
            id: dyFile5
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -240,8 +240,8 @@
            hashStart: 21848
            hashEnd: 27309
            restUrl: http://127.0.0.1:${pipIrr.file5.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv6:
            id: dyFile6
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -249,8 +249,8 @@
            hashStart: 27310
            hashEnd: 32767
            restUrl: http://127.0.0.1:${pipIrr.file6.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv7:
            id: dyFile7
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -258,8 +258,8 @@
            hashStart: 32768
            hashEnd: 38229
            restUrl: http://127.0.0.1:${pipIrr.file7.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv8:
            id: dyFile8
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -267,8 +267,8 @@
            hashStart: 38230
            hashEnd: 43691
            restUrl: http://127.0.0.1:${pipIrr.file8.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv9:
            id: dyFile9
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -276,8 +276,8 @@
            hashStart: 43692
            hashEnd: 49153
            restUrl: http://127.0.0.1:${pipIrr.file9.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv10:
            id: dyFile10
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -285,8 +285,8 @@
            hashStart: 49154
            hashEnd: 54615
            restUrl: http://127.0.0.1:${pipIrr.file10.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv11:
            id: dyFile11
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -294,8 +294,8 @@
            hashStart: 54616
            hashEnd: 60077
            restUrl: http://127.0.0.1:${pipIrr.file11.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
        sv12:
            id: dyFile12
            absolutePath: ${pipIrr.nginx.root}/html/webfiles/
@@ -303,8 +303,8 @@
            hashStart: 60078
            hashEnd: 65535
            restUrl: http://127.0.0.1:${pipIrr.file12.webPort}/file
            webUrl: http://no253541tf71.vicp.fun:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://no253541tf71.vicp.fun:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
            webUrl: http://8.130.130.233:${pipIrr.nginx.webFilePort}/webfiles/ #nginx服务路径,安装部署时IP改成外网IP或域名
            webDownloadPath: http://8.130.130.233:${pipIrr.nginx.webPort}/file/download/down?id=  #安装部署时IP改成外网IP或域名
#项目编号
#projectCode:
pipIrr-platform/pipIrr-mw/pipIrr-mw-simulate-rtu202404/src/main/java/com/dy/simRtu202404/tcpClient/upData/UpOpenCloseValve.java
@@ -19,8 +19,8 @@
    private static String orderNo = null ;
    private static String openValveDt = null ;
    private static Double totalWaterAmount = 1234.56 ;//累计流量
    private static Double remainMoney = 65.4321 ;//剩余金额
    private static Double totalWaterAmount = 12345.67 ;//累计流量
    private static Double remainMoney = 8765.4321 ;//剩余金额
    private static Double thisWaterAmount = 100.00 ;//本次使用水量
    private static Double thisMoney = 10.00 ;//本次使用金额
pipIrr-platform/pipIrr-mw/pipIrr-mw-simulate-rtu202404/src/main/resources/config.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <server name="RTU模拟器(王江海)" showStartInfo="true" company="http://www.dyjs.com"/>
    <server name="RTU模拟器(表阀一体机)" showStartInfo="true" company="http://www.dyjs.com"/>
</config>        
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -119,14 +119,14 @@
     */
    public int update(PrIntake po) {
        if (po.getTownId() == null || po.getTownId() == 0) {
            Long townId = getSupperByVillageId(po.getVillageId());
            po.setTownId(townId);
        }
        if (po.getCountyId() == null || po.getCountyId() == 0) {
            Long countyId = getSupperByVillageId(getSupperByVillageId(po.getVillageId()));
            po.setCountyId(countyId);
        }
//        if (po.getTownId() == null || po.getTownId() == 0) {
//            Long townId = getSupperByVillageId(po.getVillageId());
//            po.setTownId(townId);
//        }
//        if (po.getCountyId() == null || po.getCountyId() == 0) {
//            Long countyId = getSupperByVillageId(getSupperByVillageId(po.getVillageId()));
//            po.setCountyId(countyId);
//        }
        return this.prIntakeMapper.updateByPrimaryKeySelective(po);
//        return this.prIntakeMapper.updateByPrimaryKey(po);
    }