liurunyu
2023-12-04 d6670149331bbdeda4b0573927c13d36225a09c1
Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

 Conflicts:
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java
60个文件已修改
27个文件已删除
2个文件已添加
3951 ■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/TcpIoSessionAttrIdIsRtuAddr.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreThread.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/AnnotationScan.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Command.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Data.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Driver.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/DriverParserDataCallback.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/MidResultError.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/MidResultFromRtu.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/MidResultToRtu.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/OnLine.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/OnLineHandle.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/PrefixedDataAvailableHandleImp.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/ProtocolCache.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/ProtocolUnit.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CodeV1_0_1.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataAlarmVo.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd02Vo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd71Vo.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd83CloseVo.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd83OpenVo.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd84Vo.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataStateVo.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/OnLineV1_0_1.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/ParseParamsForDownV1_0_1.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/ParseParamsForUpV1_0_1.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_02_Up.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_71_Up.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_83_Up.java 253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_84_Up.java 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java 224 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnitConfigVo.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/AsciiPic.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java 444 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/DateTime.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/pom.xml 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaClient.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDistrict.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDivide.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaIntake.java 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaRTU.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/ServerProperties.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/forTcp/MidResultActionToRtu.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/forTcp/TcpDownCommandCache.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/forTcp/TcpDownCommandObj.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/RtuDownTask.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/RtuUpTask.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/resources/config.xml 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/AdapterImp_RmiUnit.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/ResRegisterVo.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/ResStartVo.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/RmiRequestedCallback.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/pom.xml 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockSv.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictVo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java 244 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-gis/pom.xml 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/pom.xml 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/pom.xml 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/pom.xml 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pom.xml 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/Git操作.txt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/Maven 打包插件 maven-jar-plugin.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/Maven打包.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/Maven的maven-compiler-plugin插件.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/在线需求文件访问地址.txt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/增加一个应用机构.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/编码设计.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/fastjson/FastJsonConfig.java
@@ -20,7 +20,7 @@
    /**
     * é…ç½®fastjson输出格式
     **/
    @SuppressWarnings("unused")
    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        // 1. é…ç½®fastjson
        com.alibaba.fastjson2.support.config.FastJsonConfig config = new com.alibaba.fastjson2.support.config.FastJsonConfig();
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/TcpIoSessionAttrIdIsRtuAddr.java
@@ -7,5 +7,5 @@
 */
public class TcpIoSessionAttrIdIsRtuAddr {
    public static final String sessionArrIdKey = "key_rtuAddr" ; //这个key存储的是Rtu地址
    public static final String sessionArrIdKey = "key_rtuAddr" ; //这个key存储的是IMEI号
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/core/CoreThread.java
@@ -10,7 +10,7 @@
    
    private static CoreThread instance = new CoreThread() ;
    private static Long sleepBigBusy = 100L ;//大忙时(除了恒久任务,还有其他任务),核心线程暂停间隔
    private static Long sleepBigBusy = 100L ;//大忙时(除了恒久任务,还是其他任务),核心线程暂停间隔
    private static Long sleepSmallBusy = 500L ;//小忙时(只有恒久任务,无其他任务),核心线程暂停间隔
    
    private CoreThread(){
@@ -22,8 +22,8 @@
    
    /**
     * è®¾ç½®æš‚停时长
     * @param sleepBigBusy å¤§å¿™æ—¶ï¼ˆé™¤äº†æ’久任务,还有其他任务),核心线程暂停间隔
     * @param sleepSmallBusy å°å¿™æ—¶ï¼ˆåªæœ‰æ’久任务,无其他任务),核心线程暂停间隔
     * @param sleepWorking
     * @param sleepIdel
     */
    public void setSleep(Long sleepBigBusy, Long sleepSmallBusy){
        CoreThread.sleepBigBusy = sleepBigBusy ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/AnnotationScan.java
@@ -65,9 +65,9 @@
                    int onLineDataMinLength;
                    int headMinLength ;
                    HashMap<String, AnnotationDriverVo> driverMap = ProtocolCache.getDriverMap() ;
                    HashMap<String, AnnotationPrefixedDataAvailableVo> prefixedDataAvailableMap = ProtocolCache.getPrefixedDataAvailableMap() ;
                    HashMap<String, AnnotationOnLineVo> onLineMap = ProtocolCache.getOnLineMap() ;
                    HashMap<String, AnnotationDriverVo> driverMap = ProtocolCach.getDriverMap() ;
                    HashMap<String, AnnotationPrefixedDataAvailableVo> prefixedDataAvailableMap = ProtocolCach.getPrefixedDataAvailableMap() ;
                    HashMap<String, AnnotationOnLineVo> onLineMap = ProtocolCach.getOnLineMap() ;
                    for(String cName : classNames){
                        String className = cName.substring(0,  cName.lastIndexOf('.')) ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Command.java
@@ -32,7 +32,25 @@
     * RTU åœ°å€
     */
    public String rtuAddr ;
    /**
     * æ°´è¡¨å·
     * åº”用电信平台时有效
     */
    public String meterNo ;
    /**
     * ç”µä¿¡å¹³å°ä¸Šçš„产品ID,当不在电信平台上运行时,为null
     * åº”用电信平台时有效
     */
    public Integer productId ;
    /**
     * ç”µä¿¡å¹³å°ä¸Šçš„设备ID,当不在电信平台上运行时,为null
     * åº”用电信平台时有效
     */
    public String deviceId ;
    /**
     * å‘½ä»¤ç±»åž‹:Rtu命令、针对监控中间件的命令
     * ç”±com.dy.common.mw.protocol.CommandType类定义
@@ -62,7 +80,14 @@
    public String toString(){
        String s = "命令id=" + id + "\n" ;
        s += (protocol == null ? "" : ("协议=" + protocol + "\n"));
        s += (rtuAddr == null ? "" : ("Rtu地址=" + rtuAddr + "\n"));
        s += (rtuAddr == null ? "" : ("IMEI号=" + rtuAddr + "\n"));
        s += (meterNo == null ? "" : ("水表号=" + meterNo + "\n"));
        if(productId != null){
            s +=  "电信平台产品ID=" + productId + "\n" ;
        }
        if(deviceId != null && !deviceId.trim().equals("")){
            s +=  "电信平台设备ID=" + deviceId + "\n" ;
        }
        s += "命令类型=" + (type.equals(CommandType.innerCommand)?"内部命令":"终端命令") + "\n" ;
        s += (code == null ? "" : ("功能码=" + code + "\n")) ;
        s += "返回中间件对命令处理结果=" + (noRtMwDealRes == null?"返回":(noRtMwDealRes?"不返回":"返回") + "\n") ;
@@ -174,6 +199,24 @@
    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }
    public String getMeterNo() {
        return meterNo;
    }
    public void setMeterNo(String meterNo) {
        this.meterNo = meterNo;
    }
    public Integer getProductId() {
        return productId;
    }
    public void setProductId(Integer productId) {
        this.productId = productId;
    }
    public String getDeviceId() {
        return deviceId;
    }
    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }
    public String getType() {
        return type;
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Data.java
@@ -6,6 +6,7 @@
/**
 * æ•°æ®æ ¹
 * @author Administrator
 *
 */
public class Data  implements java.io.Serializable{
@@ -14,6 +15,7 @@
    private String commandId ;//命令ID,可能为null
    private String rtuAddr ;//终端地址
    private String meterNo ;//水表号
    private String protocol ;//数据所对应的协议名称
    private String code ;//数据所对应的功能码:
    private Object subData ;//对应各个功能码的具体数据
@@ -22,7 +24,8 @@
    public String toString() {
        StringBuilder sb = new StringBuilder() ;
        sb.append("上行报文(十六进制): ").append((hex == null?"":hex)).append("\n") ; //
        sb.append("Rtu地址 : ").append((rtuAddr==null?"":rtuAddr)).append("\n") ;
        sb.append("IMEI号 : ").append((rtuAddr==null?"":rtuAddr)).append("\n") ;
        sb.append("水表号 : ").append((meterNo==null?"":meterNo)).append("\n") ;
        if(commandId != null){
            sb.append("命令ID : ").append(commandId).append("\n") ; //命令ID
        }
@@ -83,6 +86,12 @@
        this.rtuAddr = rtuAddr;
    }
    
    public String getMeterNo() {
        return meterNo;
    }
    public void setMeterNo(String meterNo) {
        this.meterNo = meterNo;
    }
    public String getCode() {
        return code;
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Driver.java
@@ -142,7 +142,7 @@
        return codeParse ;
    }
    /**
     * è§£æžç”µä¿¡å¹³å°ä¸Šè¡Œæ•°æ®
     * è§£æžä¸Šè¡Œæ•°æ®
     * @param isLowPower æ˜¯å¦åœ¨ä½ŽåŠŸè€—çŽ¯å¢ƒä¸‹è¿è¡Œ
     * @param rtuAddr æŽ§åˆ¶å™¨åœ°å€
     * @param upBuffer å­—节数组
@@ -151,6 +151,18 @@
     * @return MidResult[]
     */
    public abstract MidResult[] parseData(Boolean isLowPower, String rtuAddr, byte[] upBuffer, String upHex, DriverParserDataCallback callback, Object... params) ;
    /**
     * è§£æžç”µä¿¡å¹³å°ä¸Šè¡Œæ•°æ®
     * @param isLowPower æ˜¯å¦åœ¨ä½ŽåŠŸè€—çŽ¯å¢ƒä¸‹è¿è¡Œ
     * @param rtuAddr æŽ§åˆ¶å™¨åœ°å€
     * @param productId ç”µä¿¡å¹³å°äº§å“ID,当不在电信平台中运行时,为null
     * @param deviceId ç”µä¿¡å¹³å°è®¾å¤‡ID,当不在电信平台中运行时,为null
     * @param upBuffer å­—节数组
     * @param upHex å­—节数组16进制形式
     * @param callback å›žè°ƒ
     * @return MidResult[]
     */
    public abstract MidResult[] parseData(Boolean isLowPower, String rtuAddr, Integer productId, String deviceId, byte[] upBuffer, String upHex, DriverParserDataCallback callback, Object... params) ;
    
    /**
     * æž„造下行数据(命令)
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/DriverParserDataCallback.java
@@ -4,19 +4,23 @@
    /**
     * è§£æžä¸Šè¡Œæ•°æ®åŽå›žè°ƒ
     * @param rtuAddr ä¸Šè¡Œæ•°æ®åè®®å¤´ä¸­RtuAddr
     * @param rtuAddr ä¸Šè¡Œæ•°æ®åè®®å¤´ä¸­çš„IMEI号
     * @param meterNo ä¸Šè¡Œæ•°æ®åè®®å¤´ä¸­çš„æ°´è¡¨å·
     * @param code ä¸Šè¡Œæ•°æ® åŠŸèƒ½ç 
     * @param upHex ä¸Šè¡Œæ•°æ®
     * @param reportOrResponse_trueOrFalse ä¸Šè¡Œæ•°æ®æ˜¯ä¸»åŠ¨ä¸ŠæŠ¥è¿˜æ˜¯å‘½ä»¤ç»“æžœ
     * @param parseFail ä¸Šè¡Œæ•°æ®è§£æžæ˜¯å¦å¤±è´¥
     * @param rtuAddrInData ä¸Šè¡Œæ•°æ®ä¸­åœ¨åè®®æ•°æ®ä¸­çš„Rtu地址,
     *     â€œä¿®æ”¹RTU终端管理配置参数”命令的返回数据,其协议头中的Rtu地址与数据中的Rtu地址不一样,
     *  å¦‚æžœRTU不能关闭网络,那么sessionCach中的Rtu地址总是用修改前的Rtu地址,使得以后上行数据的不能找到缓存中的Session
     * @param rtuAddrInData ä¸Šè¡Œæ•°æ®ä¸­åœ¨åè®®æ•°æ®ä¸­çš„IMEI号,
     * @param meterNoInData ä¸Šè¡Œæ•°æ®ä¸­åœ¨åè®®æ•°æ®ä¸­çš„æ°´è¡¨å·ï¼Œ
     *     â€œä¿®æ”¹RTU终端管理配置参数”命令的返回数据,其协议头中的IMEI号与数据中的IMEI号不一样,
     *  å¦‚æžœRTU不能关闭网络,那么sessionCach中的IMEI号总是用修改前的IMEI号,使得以后上行数据的不能找到缓存中的Session
     */
    void callback(String rtuAddr,
            String code,
            String meterNo,
            String code,
            String upHex, 
            Boolean reportOrResponse_trueOrFalse, 
            boolean parseFail,
            String rtuAddrInData) ;
            String rtuAddrInData,
            String meterNoInData) ;
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/MidResultError.java
@@ -11,13 +11,15 @@
    }
    public String protocolName ;//协议名称
    public String rtuAddr ;//Rtu地址,注意rtuAddr可能为null
    public String rtuAddr ;//IMEI号,注意rtuAddr可能为null
    public String meterNo ;//水表号,注意meterNo可能为null
    public String message ;//出错消息
    public Exception e ;//异常
    
    public MidResultError(String protocolName, String rtuAddr, String message, Exception e){
    public MidResultError(String protocolName, String rtuAddr, String meterNo, String message, Exception e){
        this.protocolName = protocolName ;
        this.rtuAddr = rtuAddr ;
        this.meterNo = meterNo ;
        this.message = message ;
        this.e = e ;
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/MidResultFromRtu.java
@@ -13,7 +13,10 @@
    public String commandId ;//发送命令的ID,如果是命令结果,并且匹配了下发命令,此值不为空
    
    public String protocolName ;//协议名称
    public String rtuAddr ;//Rtu地址
    public String rtuAddr ;//IMEI号
    public String meterNo ;//水表号
    public Integer productId ;//电信平台产品ID,当不在电信平台运行时,为null
    public String deviceId ;//电信平台设备ID,当不在电信平台运行时,为null
    public String upCode ;//上行数据中的功能码
    public String upHex ;//上行数据十六进制形式
    public byte[] upBuffer ;//上行数据字节数组
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/MidResultToRtu.java
@@ -11,7 +11,10 @@
    }
    public String protocolName ;//协议名称
    public String rtuAddr ;//Rtu地址
    public String rtuAddr ;//IMEI号(电信平台IMEI)
    public String meterNo ;//水表号
    public Integer productId ;//电信平台产品ID
    public String deviceId ;//电信平台设备ID
    public String commandId ;//命令ID,发起命令的客户端(web端)生成,以匹配命令结果
    public String downCode ;//下行命令功能码;
    public byte[] downBuffer ;//下行命令数据
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/OnLine.java
@@ -16,17 +16,19 @@
    class OnLineResult{
        public int result ;//分析结果
        public String protocolName ;//协议名称
        public String rtuAddr ;//Rtu地址
        public String rtuAddr ;//IMEI号
        public String meterNo ;//水表号
        public byte[] remoteData;//需要向Rtu回写的数据
        public OnLineResult(){
            result = OnLineAction_fail ;
            rtuAddr = null ;
            meterNo = null ;
            remoteData = null ;
        }
    }
    
    int OnLineAction_fail = 0; //分析上线数据失败,如提供的数据为null等原因
    int OnLineAction_success = 1; //分析上线数据成功,并能得到Rtu地址
    int OnLineAction_success = 1; //分析上线数据成功,并能得到IMEI号
    int OnLineAction_success_noMe = 2; //分析上线数据成功,识别出不是本协议数据
    int OnLineAction_success_response = 3; //分析上线数据成功,并需要向Rtu回写数据
    
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/OnLineHandle.java
@@ -6,13 +6,13 @@
public class OnLineHandle {
    
    /**
     * è§£æžä¸Šçº¿æ•°æ®ï¼Œå¾—到RtuAddr
     * è§£æžä¸Šçº¿æ•°æ®ï¼Œå¾—到IMEI号
     * @param bs å­—节数组
     * @return OnLine.OnLineResult
     */
    public OnLine.OnLineResult parse(byte[] bs)throws Exception{
        OnLine.OnLineResult rs = null ;
        HashMap<String, AnnotationOnLineVo> onLineMap = ProtocolCache.getOnLineMap() ;
        HashMap<String, AnnotationOnLineVo> onLineMap = ProtocolCach.getOnLineMap() ;
        Collection<AnnotationOnLineVo> set = onLineMap.values() ;
        if(set.size() == 0){
            throw new Exception("处理上线时,得到的协议集合为空。") ;
@@ -47,7 +47,7 @@
            }
        }
        if(rs == null){
            throw new Exception("处理上线时出错,未能成功分析出Rtu地址!") ;
            throw new Exception("处理上线时出错,未能成功分析出IMEI号!") ;
        }
        return rs ;
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/PrefixedDataAvailableHandleImp.java
@@ -30,18 +30,18 @@
            try{
                PrefixedDataAvailableStatus pds = null ;
                
                HashMap<String, AnnotationPrefixedDataAvailableVo> prefixedDataAvailableMap = ProtocolCache.getPrefixedDataAvailableMap() ;
                HashMap<String, AnnotationPrefixedDataAvailableVo> prefixedDataAvailableMap = ProtocolCach.getPrefixedDataAvailableMap() ;
                Collection<AnnotationPrefixedDataAvailableVo> set = prefixedDataAvailableMap.values() ;
                if(set.size() == 0){
                    throw new Exception("上线数据完整性检查时,得到的协议完整性检查类集合为空。") ;
                }
                int priority = ProtocolConstant.firstPriority ;
                int prority = ProtocolConstant.firstPriority ;
                while(true){
                    Object[] objs = this.getClassObjAndAnnotationVo(priority, set) ;
                    Object[] objs = this.getClassObjAndAnnotationVo(prority, set) ;
                    PrefixedDataAvailable pda = (PrefixedDataAvailable)objs[0] ;
                    if(pda == null && priority == ProtocolConstant.firstPriority){
                        throw new Exception("上线数据完整性检查时,未得到优先级为" + priority + "上线数据完整性检查类!") ;
                    if(pda == null && prority == ProtocolConstant.firstPriority){
                        throw new Exception("上线数据完整性检查时,未得到优先级为" + prority + "上线数据完整性检查类!") ;
                    }else if(pda == null){
                        //说明上线数据完整性检查类集合已经遍历完了。
                        break ;
@@ -53,7 +53,7 @@
                    if(pds == null){
                        //说明不是对应的协议数据,需要另外的协议来处理上线
                        //循环继续
                        priority++ ;
                        prority++ ;
                    }else{
                        //停止循环,返回结果
                        break ;
@@ -90,7 +90,7 @@
            try{
               PrefixedDataAvailableStatus pds = null ;
                
                HashMap<String, AnnotationPrefixedDataAvailableVo> prefixedDataAvailableMap = ProtocolCache.getPrefixedDataAvailableMap() ;
                HashMap<String, AnnotationPrefixedDataAvailableVo> prefixedDataAvailableMap = ProtocolCach.getPrefixedDataAvailableMap() ;
                Collection<AnnotationPrefixedDataAvailableVo> set = prefixedDataAvailableMap.values() ;
                if(set.size() == 0){
                    throw new Exception("上线数据完整性检查时,得到的协议集合为空。") ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/ProtocolCache.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/ProtocolUnit.java
@@ -44,7 +44,7 @@
        AnnotationScan.getIntance() ;
        
        //各个协议驱动类扫描自己的功能码注解
        HashMap<String, AnnotationDriverVo> drivers =  ProtocolCache.getDriverMap() ;
        HashMap<String, AnnotationDriverVo> drivers =  ProtocolCach.getDriverMap() ;
        Collection<String> colDrivers = drivers.keySet() ;
        StringBuilder totalProtocols = new StringBuilder() ;
        for(String protocolName : colDrivers){
@@ -52,7 +52,7 @@
                totalProtocols.append(",") ;
            }
            totalProtocols.append(protocolName) ;
            Driver dri = ProtocolCache.getDriver(protocolName) ;
            Driver dri = ProtocolCach.getDriver(protocolName) ;
            if(dri != null){
                dri.scanAnnotationCode();
            }
@@ -70,7 +70,7 @@
     */
    @SuppressWarnings("unused")
    public boolean isOnlyOneProtocol(){
        HashMap<String, AnnotationDriverVo> drivers =  ProtocolCache.getDriverMap() ;
        HashMap<String, AnnotationDriverVo> drivers =  ProtocolCach.getDriverMap() ;
        return drivers.size() == 1 ;
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CodeV1_0_1.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataAlarmVo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd02Vo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd71Vo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd83CloseVo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd83OpenVo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataCd84Vo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DataStateVo.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/OnLineV1_0_1.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/ParseParamsForDownV1_0_1.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/ParseParamsForUpV1_0_1.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_02_Up.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_71_Up.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_83_Up.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_84_Up.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_C0_Up.java
File was deleted
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java
@@ -39,36 +39,31 @@
    public void start(UnitStartedCallbackInterface callback) throws Exception {
        if(!started){
            started = true ;
            if(confVo.enableShortThreadPool) {
                TreadPoolFactory.initThreadPoolShort("短任务工作线程池",
                        this.confVo.short_maxThread,
                        this.confVo.short_minThread,
                        this.confVo.short_freeTimeout,
            if(confVo.enableThreadPool){
                TreadPoolFactory.initThreadPoolShort("短任务工作线程池",
                        this.confVo.short_maxThread,
                        this.confVo.short_minThread,
                        this.confVo.short_freeTimeout,
                        this.confVo.short_busyTimeout);
            }else{
                System.out.println("短线程池配置不启动");
            }
            if(confVo.enableLongThreadPool) {
                TreadPoolFactory.initThreadPoolLong("长任务工作线程池",
                        this.confVo.long_maxThread,
                        this.confVo.long_minThread,
                        this.confVo.long_freeTimeout,
                TreadPoolFactory.initThreadPoolLong("长任务工作线程池",
                        this.confVo.long_maxThread,
                        this.confVo.long_minThread,
                        this.confVo.long_freeTimeout,
                        this.confVo.long_busyTimeout);
            }else{
                System.out.println("长线程池配置不启动");
                if(this.confVo.showStartInfo){
                    System.out.println("线程池模块成功启动");
                }
            }
            if(this.confVo.showStartInfo){
                System.out.println("线程池模块成功启动");
            }
            callback.call(null);
        }
        callback.call(null);
    }
    @Override
    public void stop(UnitStartedCallbackInterface callback) {
    public void stop(UnitStartedCallbackInterface callback) throws Exception {
    }
    
    /*
    public static void main(String[] args) throws Exception{
        SupportUnitConfigVo supVo = new SupportUnitConfigVo() ;
        //短工作时长线程池,线程负责用时较短的工作任务
@@ -87,9 +82,8 @@
            supVo.long_busyTimeout = -1 ;
        }
        
        supVo.enableShortThreadPool = true ;
        supVo.enableLongThreadPool = true ;
        supVo.enableThreadPool = true ;
        supVo.showStartInfo = true ;
        SupportUnit supUnit = SupportUnit.getInstance() ;
@@ -100,7 +94,6 @@
        supUnit.start(obj -> {
        });
    }
    private static class AdapterImp_SupportUnit implements SupportUnitAdapter {
        
        private SupportUnitConfigVo configVo = null ;
@@ -113,6 +106,7 @@
        public void setConfig(SupportUnitConfigVo configVo) {
            this.configVo = configVo;
        }
    }
    */
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnitConfigVo.java
@@ -1,10 +1,8 @@
package com.dy.common.mw.support;
public class SupportUnitConfigVo {
    public boolean enableShortThreadPool ;
    public boolean enableLongThreadPool ;
    public boolean enableThreadPool ;
    //短任务线程池
    public int short_maxThread ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java
@@ -4,7 +4,7 @@
import org.apache.logging.log4j.Logger;
/**
 * é˜Ÿåˆ—,先进先出,非线程安全
 * é˜Ÿåˆ—,先进先出
 */
public class Queue {
    @SuppressWarnings("unfinal")
@@ -62,7 +62,6 @@
     */
    @SuppressWarnings("unused")
    public void pushHead(NodeObj obj)throws Exception{
        //两个线程环境,需要同步锁
        synchronized(synObj){
            if(obj == null){
                return ;
@@ -90,7 +89,6 @@
     * @param obj å…¥åˆ—的对象
     */
    public void pushTail(NodeObj obj)throws Exception{
        //两个线程环境,需要同步锁
        synchronized(synObj){
            if(obj == null){
                return ;
@@ -118,7 +116,6 @@
     * @return å‡ºåˆ—对象
     */
    public NodeObj pop(){
        //两个线程环境,需要同步锁
        synchronized(synObj){
            NodeObj obj = null ;
            if(this.size > 0){
@@ -142,14 +139,11 @@
     */
    @SuppressWarnings("unused")
    public Node getFirstNode(){
        //两个线程环境,需要同步锁
        synchronized(synObj) {
            Node node = this.head.next;
            if (node != this.tail) {
                return node;
            }
            return null;
        Node node = this.head.next ;
        if(node != this.tail){
            return node ;
        }
        return null ;
    }
    /**
     * å¾—到最后一个节点,但不把节点从队列中清除
@@ -157,14 +151,11 @@
     */
    @SuppressWarnings("unused")
    public Node getLastNode(){
        //两个线程环境,需要同步锁
        synchronized(synObj) {
            Node node = this.tail.pre;
            if (node != this.head) {
                return node;
            }
            return null;
        Node node = this.tail.pre ;
        if(node != this.head){
            return node ;
        }
        return null ;
    }
    
    /**
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java
@@ -8,9 +8,9 @@
    
    /**
     * åˆå§‹åŒ–线程池
     * @param poolName çº¿ç¨‹æ± å’Œçº¿ç¨‹åç§°
     * @param maxNum çº¿ç¨‹æ± æœ€å¤§çº¿ç¨‹æ•° ï¼Œè‹¥ä¸º-1,不受限制
     * @param minNum çº¿ç¨‹æ± æœ€å°çº¿ç¨‹æ•°ï¼Œæˆ–初始线程数
     * @param threadPoolName çº¿ç¨‹æ± å’Œçº¿ç¨‹åç§°
     * @param maxThreadNum çº¿ç¨‹æ± æœ€å¤§çº¿ç¨‹æ•° ï¼Œè‹¥ä¸º-1,不受限制
     * @param minThreadNum çº¿ç¨‹æ± æœ€å°çº¿ç¨‹æ•°ï¼Œæˆ–初始线程数
     * @param freeTimeout ç©ºé—²çº¿ç¨‹è¶…æ—¶æ—¶é•¿(秒)
     * @param busyTimeout å¿™ç¢Œçº¿ç¨‹è¶…æ—¶æ—¶é•¿(秒),若为-1,不受限制
     * @return çº¿ç¨‹æ± å®žä¾‹
@@ -30,9 +30,9 @@
    
    /**
     * åˆå§‹åŒ–线程池
     * @param poolName çº¿ç¨‹æ± å’Œçº¿ç¨‹åç§°
     * @param maxNum çº¿ç¨‹æ± æœ€å¤§çº¿ç¨‹æ•°ï¼Œè‹¥ä¸º-1,不受限制
     * @param minNum çº¿ç¨‹æ± æœ€å°çº¿ç¨‹æ•°ï¼Œæˆ–初始线程数
     * @param threadPoolName çº¿ç¨‹æ± å’Œçº¿ç¨‹åç§°
     * @param maxThreadNum çº¿ç¨‹æ± æœ€å¤§çº¿ç¨‹æ•°ï¼Œè‹¥ä¸º-1,不受限制
     * @param minThreadNum çº¿ç¨‹æ± æœ€å°çº¿ç¨‹æ•°ï¼Œæˆ–初始线程数
     * @param freeTimeout ç©ºé—²çº¿ç¨‹è¶…æ—¶æ—¶é•¿(秒)
     * @param busyTimeout å¿™ç¢Œçº¿ç¨‹è¶…æ—¶æ—¶é•¿(秒),若为-1,不受限制
     * @return çº¿ç¨‹æ± å®žä¾‹
@@ -51,6 +51,8 @@
    }
    /**
     * å¾—到唯一线程池实例
     * @param dataSourceName
     * @return
     * @throws Exception
     */
    public final static ThreadPool.Pool getThreadPoolShort()
@@ -62,6 +64,9 @@
    }
    /**
     * å¾—到唯一线程池实例
     * @param dataSourceName
     * @return
     * @throws Exception
     */
    public final static ThreadPool.Pool getThreadPoolLong()
        throws Exception {
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/AsciiPic.java
@@ -81,7 +81,6 @@
        }
    }
    /*
    public static void main(final String[] args) {
        try {
            AsciiPic.createAsciiPic(toBufferedImage(creatImage("DY.png")));
@@ -89,5 +88,4 @@
            e.printStackTrace();
        }
    }
    */
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java
@@ -9,7 +9,7 @@
     * å°†å­—节数组合并到字节数组上
     * @param bGroup1 è¢«åˆå¹¶æ•°ç»„
     * @param bGroup2 åˆå¹¶æ•°ç»„
     * @return è¿”回 åˆå¹¶åŽæ•°ç»„
     * @return åˆå¹¶åŽæ•°ç»„
     */
    public static byte[] bytesMerge(byte[] bGroup1, byte[] bGroup2){
        if(bGroup1 == null && bGroup2 == null){
@@ -29,11 +29,11 @@
    /**
     * åˆ¤æ–­æ‰€æœ‰å­—节是否为0xFF
     * @param bs å­—节数组
     * @param index ä¸‹æ ‡ä½
     * @param len é•¿åº¦
     * @return è¿”回 è¿”回
     * @throws Exception å¼‚常
     * @param bs
     * @param index
     * @param len
     * @return
     * @throws Exception
     */
    public static boolean bytesIsAll0xFF(byte[] bs, int index, int len)throws Exception {
        int count = 0 ;
@@ -42,14 +42,14 @@
                count++ ;
            }
        }
        return count == len;
        return count==len?true:false ;
    }
    /**
     * äºŒè¿›åˆ¶è½¬åè¿›åˆ¶æ•°
     * @param str
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static int binary2Int(String str) throws Exception {
        int cnt=0;
@@ -69,13 +69,13 @@
        return sum;
    }
    /**
     * å­—节转存二进制
     *
     *
     * @param b byte
     * @throws Exception å¼‚常
     * @return è¿”回 String
     * @throws Exception
     * @return String
     */
    public static String byte2Binary(byte b) throws Exception {
        int n = (b + 256) % 256 + 256;
@@ -87,11 +87,11 @@
    }
    /**
     * å­—节转存8位二进制
     *
     *
     * @param b
     *            byte
     * @throws Exception å¼‚常
     * @return è¿”回 String
     * @throws Exception
     * @return String
     */
    public static String byte2bit8Binary(byte b) throws Exception {
        String s = byte2Binary(b);
@@ -101,13 +101,13 @@
        }
        return s;
    }
    /**
     * å­—节取bit
     * @param b
     * @param b
     * @throws Exception å¼‚常
     * @return è¿”回 String
     * @param index
     * @throws Exception
     * @return String
     */
    public static byte[] getBit(byte b) throws Exception {
        byte[] bs = new byte[8] ;
@@ -125,9 +125,9 @@
    /**
     * å­—节取bit
     * @param b
     * @param index ä¸‹æ ‡ä½
     * @throws Exception å¼‚常
     * @return è¿”回 String
     * @param index
     * @throws Exception
     * @return String
     */
    public static byte getBit(byte b, byte index) throws Exception {
        if(index == 0){
@@ -153,11 +153,11 @@
    /**
     * ä¸€ä¸ªå­—节转正整数
     *
     *
     * @param b
     *            byte
     * @throws Exception å¼‚常
     * @return è¿”回 String
     * @throws Exception
     * @return String
     */
    public static Short byte2PlusInt(byte b) throws Exception {
        short v = b ;
@@ -167,13 +167,13 @@
        return v ;
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * double转换byte
     * @param bs å­—节数组 byte[]
     * @param bs byte[]
     * @param value double double类型的参数
     * @param from å¼€å§‹ä½ int
     * @param from int
     */
    public static void double2Bytes_BE(byte[] bs, double value, int from)throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 8);
@@ -188,9 +188,9 @@
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * double转换byte,字节顺序是倒的
     * @param bs å­—节数组 byte[]
     * @param bs byte[]
     * @param value double double类型的参数
     * @param from å¼€å§‹ä½ int
     * @param from int
     */
    public static void double2Bytes_LE(byte[] bs, double value, int from)throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 8);
@@ -205,8 +205,8 @@
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * byte转换double
     * @param bs å­—节数组 byte[]
     * @param from å¼€å§‹ä½ int
     * @param bs byte[]
     * @param from int
     */
    public static double bytes2Double_BE(byte[] bs, int from) throws Exception {
        long l = bytes2Long_BE(bs, from);
@@ -216,8 +216,8 @@
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * byte转换double,字节顺序是倒的
     * @param bs å­—节数组 byte[]
     * @param from å¼€å§‹ä½ int
     * @param bs byte[]
     * @param from int
     */
    public static double bytes2Double_LE(byte[] bs, int from) throws Exception {
        long l = bytes2Long_LE(bs, from);
@@ -306,7 +306,7 @@
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * è½¬æ¢long型为byte数组
     * è½¬æ¢long型为byte数组
     * @value bs byte[]
     * @value value long
     * @value from int
@@ -315,8 +315,8 @@
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 8);
        if (b) {
            for (int i = 0; i < 8; i++) {
                bs[from + i] = Long.valueOf(value & 0xff).byteValue();
                value = value >> 8;
                bs[from + i] = Long.valueOf(value & 0xff).byteValue();
                value = value >> 8;
            if(value == 0){
                break ;
            }
@@ -325,12 +325,12 @@
            throw new Exception("long2Bytes时数组越界");
        }
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * 8位字节数组转换为长整型
     * @param bs å­—节数组 byte[]
     * @return è¿”回
     * @param bs byte[]
     * @return
     */
    public static long bytes2Long_BE(byte[] bs) {
        int len = bs.length ;
@@ -347,16 +347,16 @@
                l = l | ls[i] ;
            }
            return l;
        }
        }
        return 0L ;
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * 8位字节数组转换为长整型
     * @param bs å­—节数组 byte[]
     * @param from å¼€å§‹ä½ int
     * @return è¿”回
     * @param bs byte[]
     * @param from int
     * @return
     */
    public static long bytes2Long_BE(byte[] bs, int from) throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 8);
@@ -388,10 +388,10 @@
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * 8位字节数组转换为长整型
     * @param bs å­—节数组 byte[]
     * @param from å¼€å§‹ä½ int
     * @param bs byte[]
     * @param from int
     * @param end int
     * @return è¿”回
     * @return
     */
    public static long bytes2Long_BE(byte[] bs, int from, int end) throws Exception {
        boolean b = isOutOfArrLength(bs.length, end);
@@ -414,13 +414,13 @@
        }
    }
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * 8位字节数组转换为长整型
     * @param bs å­—节数组 byte[]
     * @return è¿”回
     * @param bs byte[]
     * @return
     */
    public static long bytes2Long_LE(byte[] bs) {
        int len = bs.length ;
@@ -437,16 +437,16 @@
                l = l | ls[i] ;
            }
            return l;
        }
        }
        return 0L ;
    }
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * 8位字节数组转换为长整型
     * @param bs å­—节数组 byte[]
     * @param from å¼€å§‹ä½ int
     * @return è¿”回
     * 8位字节数组转换为长整型
     * @param bs byte[]
     * @param from int
     * @return
     */
    public static long bytes2Long_LE(byte[] bs, int from) throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 8);
@@ -479,10 +479,10 @@
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * 8位字节数组转换为长整型
     * @param bs å­—节数组 byte[]
     * @param from å¼€å§‹ä½ int
     * @param bs byte[]
     * @param from int
     * @param end int
     * @return è¿”回
     * @return
     */
    public static long bytes2Long_LE(byte[] bs, int from, int end) throws Exception {
        boolean b = isOutOfArrLength(bs.length, end);
@@ -551,9 +551,8 @@
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * 4位字节数组转换为整型
     * @param bs å­—节数组
     * @param from å¼€å§‹ä½
     * @return è¿”回
     * @param b
     * @return
     */
    public static int bytes2Int_BE(byte[] bs, int from) throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 4);
@@ -574,13 +573,13 @@
            throw new Exception("byte2Int时数组越界");
        }
    }
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * 4位字节数组转换为整型,字节顺序是倒的
     * @param bs å­—节数组 å­—节数组
     * @return è¿”回
     * @param b
     * @return
     */
    public static int bytes2Int_LE(byte[] bs, int from) throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 4);
@@ -601,7 +600,7 @@
            throw new Exception("byte2Int时数组越界");
        }
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
@@ -675,14 +674,14 @@
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * 2位字节数组转换为短整型
     * @param bs å­—节数组 å­—节数组
     * @return è¿”回
     * @param b
     * @return
     */
    public static short bytes2Short_BE(byte[] bs, int from) throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 2);
        if (b) {
            int s = 0;
            int s0 = bs[from + 0] ;
            int s0 = bs[from + 0] ;
            int s1 = bs[from + 1] ;
            // s1不变
@@ -698,14 +697,14 @@
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * 2位字节数组转换为短整型,字节顺序是倒的
     * @param bs å­—节数组 å­—节数组
     * @return è¿”回
     * @param b
     * @return
     */
    public static short bytes2Short_LE(byte[] bs, int from) throws Exception {
        boolean b = isOutOfArrLength(bs.length, (from - 1) + 2);
        if (b) {
            int s = 0;
            int s0 = bs[from + 0] ;
            int s0 = bs[from + 0] ;
            int s1 = bs[from + 1] ;
            // s0不变
@@ -719,11 +718,11 @@
    }
    /**
     * å­—符到一字节转换
     *
     *
     * @value bs byte[]
     * @value ch char char类型的参数
     * @value index int
     * @return è¿”回
     * @return
     */
    public static void char2Bytes(byte[] bs, char ch, int index)throws Exception {
        boolean b = isOutOfArrLength(bs.length, index);
@@ -736,9 +735,10 @@
    /**
     * ä¸€å­—节转换为字符
     * @param bs å­—节数组 å­—节数组
     *
     * @param b
     * @value index int
     * @return è¿”回
     * @return
     */
    public static char bytes2Char(byte[] bs, int index) throws Exception {
        boolean b = isOutOfArrLength(bs.length, index);
@@ -751,13 +751,13 @@
    /**
     * å­—符串型数字转成byte
     *
     *
     * @param s
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static byte string2byte(String s) throws Exception {
        int n ;
        int n = 0;
        try {
            n = Integer.parseInt(s);
        } catch (Exception e) {
@@ -772,7 +772,7 @@
     * @value bs byte[]
     * @value str String
     * @value from int
     * @return è¿”回
     * @return
     * @throws java.io.UnsupportedEncodingException
     */
    public static int string2Bytes_BE(byte[] bs, String str, int from, int end)throws Exception {
@@ -798,7 +798,7 @@
     * @value bs byte[]
     * @value str String
     * @value from int
     * @return è¿”回
     * @return
     * @throws java.io.UnsupportedEncodingException
     */
    public static int string2Bytes_LE(byte[] bs, String str, int from, int end)throws Exception {
@@ -824,7 +824,7 @@
     * @value bs byte[]
     * @value str String
     * @value from int
     * @return è¿”回
     * @return
     * @throws java.io.UnsupportedEncodingException
     */
    public static int string2Bytes_BE(byte[] bs, String str, int from)throws Exception {
@@ -846,7 +846,7 @@
     * @value bs byte[]
     * @value str String
     * @value from int
     * @return è¿”回
     * @return
     * @throws java.io.UnsupportedEncodingException
     */
    public static int string2Bytes_LE(byte[] bs, String str, int from)throws Exception {
@@ -898,10 +898,10 @@
    /**
     * åˆ¤æ–­æ•°ç»„下标是否越界
     *
     *
     * @value bsLength æ•°ç»„总长度
     * @value toSite æ•°ç»„偏移量
     * @return è¿”回
     * @return
     */
    private static boolean isOutOfArrLength(int bsLength, int toSite) {
        if (bsLength > toSite) {
@@ -911,104 +911,104 @@
        }
    }
    /**
     * å­—节数组转换成十六进制的字符串
     *
     * @param src byte[]
     * å­—节数组转换成十六进制的字符串
     *
     * @param b byte[]
     * @param hasBlank 16进制是否用空格分隔
     * @return è¿”回 String
     * @return String
     */
    public static String bytes2Hex(byte[] src, boolean hasBlank){
        StringBuilder stringBuilder = new StringBuilder("");
        if (src == null || src.length <= 0) {
            return null;
        }
        for (int i = 0; i < src.length; i++) {
            int v = src[i] & 0xFF;
            String str = Integer.toHexString(v);
            if (str.length() < 2) {
    public static String bytes2Hex(byte[] src, boolean hasBlank){
        StringBuilder stringBuilder = new StringBuilder("");
        if (src == null || src.length <= 0) {
            return null;
        }
        for (int i = 0; i < src.length; i++) {
            int v = src[i] & 0xFF;
            String str = Integer.toHexString(v);
            if (str.length() < 2) {
                str = "0" + str;
            }
            }
            if (hasBlank) {
                if (i == 0) {
                    stringBuilder.append(str);
                    stringBuilder.append(str);
                } else {
                    stringBuilder.append(" " + str);
                    stringBuilder.append(" " + str);
                }
            } else {
                stringBuilder.append(str);
                stringBuilder.append(str);
            }
        }
        }
        return stringBuilder.toString().toUpperCase(Locale.US);
    }
    }
    /**
     * å­—节数组转换成十六进制的字符串
     *
     * @param src byte[]
     * å­—节数组转换成十六进制的字符串
     *
     * @param b byte[]
     * @param hasBlank 16进制是否用空格分隔
     * @param from å¼€å§‹ä½
     * @param len é•¿åº¦
     * @return è¿”回 String
     * @param from
     * @param len
     * @return String
     */
    public static String bytes2Hex(byte[] src, boolean hasBlank, int from, int len){
        if (src == null || src.length <= 0 || src.length < from + len) {
            return null;
        }
    public static String bytes2Hex(byte[] src, boolean hasBlank, int from, int len){
        if (src == null || src.length <= 0 || src.length < from + len) {
            return null;
        }
        byte[] bb = new byte[len];
        for (int i = 0 ; i < len; i++) {
            bb[i] = src[from + i];
        }
        return bytes2Hex(bb, hasBlank) ;
    }
    /**
    }
    /**
     * åå…­è¿›åˆ¶è½¬å­—节数组
     * @param hex the hex string
     * @return è¿”回 byte[]
     */
    public static byte[] hex2Bytes(String hex) {
        if (hex == null || hex.equals("")) {
            return null;
        }
        hex = hex.toUpperCase(Locale.ENGLISH);
        int length = hex.length() / 2;
        char[] hexChars = hex.toCharArray();
        byte[] d = new byte[length];
        for (int i = 0; i < length; i++) {
            int pos = i * 2;
            d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
        }
        return d;
    }
    /**
     * @param hexString the hex string
     * @return byte[]
     */
    public static byte[] hex2Bytes(String hex) {
        if (hex == null || hex.equals("")) {
            return null;
        }
        hex = hex.toUpperCase(Locale.ENGLISH);
        int length = hex.length() / 2;
        char[] hexChars = hex.toCharArray();
        byte[] d = new byte[length];
        for (int i = 0; i < length; i++) {
            int pos = i * 2;
            d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
        }
        return d;
    }
    /**
     * åå…­è¿›åˆ¶è½¬å­—节数组
     * @param hex the hex string
     * @return è¿”回 byte[]
     */
    public static int hex2Bytes(String hex, byte[] bs, int fromIndex) {
        if (hex == null || hex.equals("")) {
            return fromIndex;
        }
        hex = hex.toUpperCase(Locale.ENGLISH);
        int length = hex.length() / 2;
        char[] hexChars = hex.toCharArray();
        byte[] d = new byte[length];
        for (int i = 0; i < length; i++) {
            int pos = i * 2;
            d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
     * @param hexString the hex string
     * @return byte[]
     */
    public static int hex2Bytes(String hex, byte[] bs, int fromIndex) {
        if (hex == null || hex.equals("")) {
            return fromIndex;
        }
        hex = hex.toUpperCase(Locale.ENGLISH);
        int length = hex.length() / 2;
        char[] hexChars = hex.toCharArray();
        byte[] d = new byte[length];
        for (int i = 0; i < length; i++) {
            int pos = i * 2;
            d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
        }
        for(int i = 0 ; i < d.length; i++){
            bs[fromIndex++] = d[i] ;
        }
        return fromIndex ;
    }
        return fromIndex ;
    }
    private static final char[] HEX_CHAR = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
    /**
     * å°†byte[]转换为16进制字符串
     *
     * @param bytes å¾…转换byte[]
     * @return è¿”回 è½¬æ¢åŽçš„字符串
     * @return è½¬æ¢åŽçš„字符串
     */
    public static String bytesToHex(byte[] bytes) {
        //一个byte为8位,可用两个十六进制位标识
@@ -1027,40 +1027,12 @@
        }
        return new String(buf);
    }
    /**
     * å°†byte[]转换为16进制字符串
     *
     * @param bytes å¾…转换byte[]
     * @return è¿”回 è½¬æ¢åŽçš„字符串
     */
    public static String bytesToHex(byte[] bytes, int startIndex, int endIndex) {
        byte[] bs = new byte[endIndex - startIndex + 1] ;
        byte j = 0 ;
        for(int i = startIndex; i <= endIndex; i++){
            bs[j++] = bytes[i] ;
        }
        //一个byte为8位,可用两个十六进制位标识
        char[] buf = new char[bs.length * 2];
        int a = 0;
        int index = 0;
        for (byte b : bs) { // ä½¿ç”¨é™¤ä¸Žå–余进行转换
            if (b < 0) {
                a = 256 + b;
            } else {
                a = b;
            }
            buf[index++] = HEX_CHAR[a / 16];
            buf[index++] = HEX_CHAR[a % 16];
        }
        return new String(buf);
    }
    /**
     * å°†16进制字符串转换为byte[]
     *
     * @param str å¾…转换字符串
     * @return è¿”回 è½¬æ¢åŽçš„byte[]
     * @return è½¬æ¢åŽçš„byte[]
     */
    public static byte[] hexToBytes(String str) {
        if (str == null || "".equals(str.trim())) {
@@ -1079,18 +1051,18 @@
    /**
     * Convert char to byte
     * @param c char
     * @return è¿”回 byte
     * @return byte
     */
    private static byte charToByte(char c) {
        return (byte) "0123456789ABCDEF".indexOf(c);
    }
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * æ•´å½¢è½¬æˆBCD编码
     * @param i
     * @return è¿”回
     * @param l
     * @return
     */
    public static byte[] int2BCD_BE(int i)throws Exception {
        String str = "" + i;
@@ -1107,8 +1079,8 @@
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * æ•´å½¢è½¬æˆBCD编码,字节顺序是倒的
     * @param i
     * @return è¿”回
     * @param l
     * @return
     */
    public static byte[] int2BCD_LE(int i)throws Exception {
        String str = "" + i;
@@ -1127,7 +1099,7 @@
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * é•¿æ•´å½¢è½¬æˆBCD编码
     * @param l
     * @return è¿”回
     * @return
     */
    public static byte[] long2BCD_BE(long l)throws Exception {
        String str = "" + l;
@@ -1146,7 +1118,7 @@
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * é•¿æ•´å½¢è½¬æˆBCD编码,字节顺序是倒的
     * @param l
     * @return è¿”回
     * @return
     */
    public static byte[] long2BCD_LE(long l) throws Exception {
        String str = "" + l;
@@ -1165,30 +1137,30 @@
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * å­—符串型数字转成BCD编码
     * @param s
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static byte[] string2BCD_BE(String s) throws Exception {
        byte[] b ;
        byte[] b = null;
        if (s.length() % 2 == 0) {
            b = new byte[s.length() / 2];
        } else {
            b = new byte[(s.length() / 2) + 1];
        }
        encodeBCD_BE(s, b, 0, b.length);
        return b ;
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * å­—符串转换成byte数组
     * @value bs byte[]
     * @value str String
     * @value fromIndex int
     * @return è¿”回
     * @throws Exception å¼‚常 å¼‚常
     * @return
     * @throws java.io.Exception
     */
    public static int string2BCD_BE(byte[] bs, String str, int fromIndex)throws Exception {
        byte[] bb = string2BCD_BE(str);
@@ -1207,8 +1179,8 @@
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * å­—符串型数字转成BCD编码,字节顺序是倒的
     * @param s
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static byte[] string2BCD_LE(String s) throws Exception {
        byte[] b = null;
@@ -1221,15 +1193,15 @@
        return b;
    }
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * å­—符串转换成byte数组
     * @value bs byte[]
     * @value str String
     * @value fromIndex int
     * @return è¿”回
     * @throws Exception å¼‚常 å¼‚常
     * @return
     * @throws java.io.Exception
     */
    public static int string2BCD_LE(byte[] bs, String str, int fromIndex)throws Exception {
        byte[] bb = string2BCD_LE(str);
@@ -1249,8 +1221,10 @@
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * BCD编码转成整型
     * @param b
     * @return è¿”回
     * @throws Exception å¼‚常
     * @param startIndex
     * @param endIndex
     * @return
     * @throws Exception
     */
    public static int BCD2Int_BE(byte b) throws Exception {
        String str = "";
@@ -1263,8 +1237,10 @@
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * BCD编码转成整型,字节顺序是倒的
     * @param b
     * @return è¿”回
     * @throws Exception å¼‚常
     * @param startIndex
     * @param endIndex
     * @return
     * @throws Exception
     */
    public static int BCD2Int_LE(byte b) throws Exception {
        String str = "";
@@ -1279,8 +1255,8 @@
     * @param b
     * @param startIndex
     * @param endIndex
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static int BCD2Int_BE(byte[] b, int startIndex, int endIndex)throws Exception {
        String str = "";
@@ -1295,8 +1271,8 @@
     * @param b
     * @param startIndex
     * @param endIndex
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static int BCD2Int_LE(byte[] b, int startIndex, int endIndex)throws Exception {
        String str = "";
@@ -1311,8 +1287,8 @@
     * @param b
     * @param startIndex
     * @param endIndex
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static long BCD2Long_BE(byte[] b, int startIndex, int endIndex)throws Exception {
        String str = "";
@@ -1328,8 +1304,8 @@
     * @param b
     * @param startIndex
     * @param endIndex
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static long BCD2Long_LE(byte[] b, int startIndex, int endIndex)throws Exception {
        String str = "";
@@ -1344,8 +1320,8 @@
     * @param b
     * @param startIndex
     * @param endIndex
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static String BCD2String_BE(byte[] b, int startIndex, int endIndex) throws Exception {
        return decodeBCD_BE(b, startIndex, endIndex - startIndex + 1);
@@ -1357,8 +1333,8 @@
     * @param b
     * @param startIndex
     * @param endIndex
     * @return è¿”回
     * @throws Exception å¼‚常
     * @return
     * @throws Exception
     */
    public static String BCD2String_LE(byte[] b, int startIndex, int endIndex) throws Exception {
        return decodeBCD_LE(b, startIndex, endIndex - startIndex + 1);
@@ -1366,17 +1342,17 @@
    /**
     * å¤§ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„高字节》
     * ç¼–码BCD,例如1387编码成  13  87,顺序是正的
     * ç¼–码BCD,例如1387编码成  13  87,顺序是正的
     * @param value
     * @param dest
     * @param startIndex
     * @param length é•¿åº¦
     * @param length
     */
    private static void encodeBCD_BE(String value, byte[] dest, int startIndex, int length)throws Exception {
        if (value == null || !value.matches("\\d*")) {
            throw new Exception("数字转成BCD编码时出错,不是合法数字:" + value, null);
        }
        int[] tmpInts = new int[2 * length];
        int index = value.length() - 1;
        for (int i = tmpInts.length - 1; i >= 0 && index >= 0; i--, index--) {
@@ -1386,20 +1362,20 @@
            dest[i] = (byte) (tmpInts[2 * j] * 16 + tmpInts[2 * j + 1]);
        }
    }
    /**
     * å°ç«¯æ¨¡å¼ã€Šæ•°æ®ä½Žä½åœ¨æ•°ç»„低字节》
     * ç¼–码BCD,例如1387编码成  87  13,顺序是倒的
     * ç¼–码BCD,例如1387编码成  87  13,顺序是倒的
     * @param value
     * @param dest
     * @param startIndex
     * @param length é•¿åº¦
     * @param length
     */
    private static void encodeBCD_LE(String value, byte[] dest, int startIndex, int length)throws Exception {
        if (value == null || !value.matches("\\d*")) {
            throw new Exception("数字转成BCD编码时出错,不是合法数字:" + value, null);
        }
        int[] tmpInts = new int[2 * length];
        int index = value.length() - 1;
        for (int i = 0; i <= tmpInts.length - 1 && index >= 0; i++, index--) {
@@ -1417,8 +1393,8 @@
     * è§£ç BCD,顺序是正的
     * @param src
     * @param startIndex
     * @param length é•¿åº¦
     * @return è¿”回
     * @param length
     * @return
     */
    private static String decodeBCD_BE(byte[] src, int startIndex, int length)throws Exception {
        StringBuilder sb = new StringBuilder();
@@ -1439,8 +1415,8 @@
      * ç¼–码BCD,顺序是倒的
     * @param src
     * @param startIndex
     * @param length é•¿åº¦
     * @return è¿”回
     * @param length
     * @return
     */
    private static String decodeBCD_LE(byte[] src, int startIndex, int length)throws Exception {
        StringBuilder sb = new StringBuilder();
@@ -1486,7 +1462,6 @@
//        System.out.println(v5);
//
//    }
    /*
    public static void main(String[] args) throws Exception {
        byte[] bs = new byte[]{0x38, 0x36, 0x39, 0x31} ; 
        String s = bytes2String_BE(bs, 0, 3) ;
@@ -1500,6 +1475,5 @@
        }
        System.out.println(v);
    }
    */
    
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/DateTime.java
@@ -1619,7 +1619,7 @@
    }
    
    /*
    public static void main(String[] args){
        Long now = getTime() ;
        System.out.println(now);
@@ -1631,6 +1631,6 @@
        String s = yyyy_MM_dd_HH_mm_ss(dt);
        System.out.println(s);
    }
    */
}
pipIrr-platform/pipIrr-global/pom.xml
@@ -21,19 +21,23 @@
            <groupId>com.dy</groupId>
            <artifactId>pipIrr-common</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
            <!-- optional=true,不传递依赖,即pipIrr-web-base依赖pipIrr-global,但不会传递依赖到pipIrr-common -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>3.1.3</version>
            <exclusions>
                <exclusion>
                    <!-- æŽ’除掉pipIrr-common的所有依赖,本模块自己定义依赖 -->
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-json</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- è¾“入参数据验证 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
@@ -49,19 +53,47 @@
            <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <version>3.1.3</version>
            <scope>runtime</scope>
        </dependency>
        <!-- lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.28</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.9.20</version>
        </dependency>
        <!--log4j2日志-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
            <version>2.7.9</version>
        </dependency>
        <!-- ç”¨äºŽè¾¨è®¤log4j2.yml文件 -->
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <version>2.15.2</version>
        </dependency>
        <!--mybatis-plus-spring-boot-->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.5.3.2</version>
        </dependency>
        <!-- é˜¿é‡Œfastjson -->
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba.fastjson2</groupId>
            <artifactId>fastjson2</artifactId>
@@ -86,81 +118,27 @@
            <version>1.5.5.Final</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <!-- è¯¥æ’件不会将项目中引入的依赖打进最终的 Jar æ–‡ä»¶ -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <!-- spring boot提供的maven打包插件 -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- ç”Ÿæˆçš„jar中,不要包含pom.xml和pom.properties这两个文件 -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <!-- è¿™éƒ¨åˆ†å¯æœ‰å¯æ— ,加上的话则直接生成可运行jar包
                        <manifest>
                            <mainClass>com.dy.Main</mainClass>
                            <useUniqueVersions>false</useUniqueVersions>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                        </manifest>
                        -->
                        <!-- manifestEntries的作用是指定本地(自己下载的lib下的)jar包添加到MANIFEST.MF文件中去
                        <manifestEntries>
                            <Class-Path>.lib/alipay-sdk.java.jar</Class-Path>
                        </manifestEntries>
                        -->
                    </archive>
                    <!-- æŽ’除某个文件
                    <excludes>
                        <exclude>com/dy/App.class</exclude>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                    -->
                    <!-- å¯æ‰§è¡Œjar进行命名。这样会打包成两个jar包,不会对普通jar重新命名。
                    <classifier>exec</classifier>
                     -->
                </configuration>
            </plugin>
            <plugin>
                <!-- å½“项目中依赖比较多时,我们可以借助 maven-dependency-plugin æ’件自动帮我们下载依赖的 Jar æ–‡ä»¶ï¼ŒæŽ¨èå°†è¯¥æ’件绑定到package生命周期上 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- ç»‘定生命周期 -->
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <!-- è®¾ç½®ä¾èµ–的存放路径 -->
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
@@ -169,7 +147,11 @@
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- å¼ºåˆ¶è®¾å®š java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaClient.java
@@ -95,7 +95,7 @@
     * ç¼–号
     */
    @Schema(description = "农户编号(系统自动生成)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String num ;
    public Integer num;
    /**
     * æ‰‹æœºå·
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDistrict.java
@@ -55,9 +55,9 @@
    /**
     * è¡Œæ”¿åŒºç¼–号
     */
    @Schema(description = "行政区编号(省市县2位,镇村3位)", requiredMode = Schema.RequiredMode.REQUIRED)
    @Schema(description = "行政区编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "行政区编号不能为空") //不能为空也不能为null
    @Max(message = "行政区编号不大于99", value = 999)
    @Max(message = "行政区编号不大于99", value = 99)
    @Min(message = "行政区编号不小于0",value = 0)
    public String num;
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaDivide.java
@@ -9,6 +9,7 @@
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.hibernate.validator.constraints.Length;
@@ -36,7 +37,7 @@
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在县ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在县不能为空") //不能为空也不能为null
    @NotNull(message = "所在县不能为空") //不能为空也不能为null
    public Long countyId;
    /**
@@ -44,7 +45,7 @@
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在镇ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在镇不能为空") //不能为空也不能为null
    @NotNull(message = "所在镇不能为空") //不能为空也不能为null
    public Long townId;
    /**
@@ -52,7 +53,7 @@
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在村不能为空") //不能为空也不能为null
    @NotNull(message = "所在村不能为空") //不能为空也不能为null
    public Long villageId;
    /**
@@ -60,7 +61,7 @@
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "所在片区不能为空") //不能为空也不能为null
    @NotNull(message = "所在片区不能为空") //不能为空也不能为null
    public Long blockId;
    /**
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaIntake.java
New file
@@ -0,0 +1,122 @@
package com.dy.pipIrrGlobal.pojoBa;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.hibernate.validator.constraints.Length;
/**
 * å–水口实体
 */
@TableName(value = "ba_intake", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "取水口实体")
public class BaIntake implements BaseEntity {
    public static final long serialVersionUID = 202312010953001L;
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id;
    /**
     * å–水口名称或编号
     */
    @Schema(description = "取水口名称或编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "取水口名称或编号不能为空") //不能为空也不能为null
    @Length(message = "取水口名称或编号不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
    /**
     * å¤–键,指向片区
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所在片区不能为空") //不能为null
    public Long blockId;
    /**
     * å¤–键,指向分水口
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所在分水口ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所在分水口不能为空") //不能为null
    public Long divideId;
    /**
     * è´Ÿè´£äºº
     */
    @Schema(description = "负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "负责人不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String header;
    /**
     * è”系电话
     */
    @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "联系电话不能为空") //不能为空也不能为null
    @Length(message = "联系电话必须{max}位数据", min = 11, max = 11)
    public String phone;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所在县ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所在县不能为空") //不能为空也不能为null
    public Long countyId;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所在镇ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所在镇不能为空") //不能为空也不能为null
    public Long townId;
    /**
     * å¤–键,指向行政区
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所在村不能为空") //不能为空也不能为null
    public Long villageId;
    /**
     * ç»åº¦
     */
    @Schema(description = "经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lng;
    /**
     * çº¬åº¦
     */
    @Schema(description = "纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lat;
    /**
     * å¤‡æ³¨
     */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 50)
    public String remark;
    /**
     * åˆ é™¤æ ‡å¿—
     */
    @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaRTU.java
New file
@@ -0,0 +1,109 @@
package com.dy.pipIrrGlobal.pojoBa;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.hibernate.validator.constraints.Length;
/**
 * æŽ§åˆ¶å™¨å®žä½“,RTU阀控一体机
 */
@TableName(value = "ba_intake", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "RTU阀控一体机实体")
public class BaRTU implements BaseEntity {
    public static final long serialVersionUID = 202312011021001L;
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id;
    /**
     * æŽ§åˆ¶å™¨ç¼–号
     */
    @Schema(description = "控制器编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "控制器编号不能为空") //不能为空也不能为null
    @Length(message = "控制器编号不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String num;
    /**
     * å¤–键,指向取水口
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所在取水口ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所在取水口不能为空") //不能为null
    public Long intakeId;
    /**
     * å¤–键,指向农户(用水户)
     */
    @JSONField(serializeUsing = ObjectWriterImplToString.class)
    @Schema(description = "所属农户ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所属农户不能为空") //不能为null
    public Long clientId;
    /**
     * è´Ÿè´£äºº
     */
    @Schema(description = "负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "负责人不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String header;
    /**
     * è”系电话
     */
    @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "联系电话不能为空") //不能为空也不能为null
    @Length(message = "联系电话必须{max}位数据", min = 11, max = 11)
    public String phone;
    /**
     * å¼€å…³é˜€
     */
    @Schema(description = "开关阀", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "0关阀,1开阀") //不能为空也不能为null
    @Length(message = "联系电话必须{max}位数据", min = 1, max = 1)
    public Byte isOpen;
    /**
     * æŽ§åˆ¶å™¨åç§°
     */
    @Schema(description = "控制器名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "控制器名称非必填") //不能为空也不能为null
    @Length(message = "控制器名称不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String name;
    /**
     * åŽ‚å®¶åç§°
     */
    @Schema(description = "厂家名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "厂家名称非必填") //不能为空也不能为null
    @Length(message = "厂家名称不大于{max}字,不小于{min}字", min = 1, max = 25)
    public String manufacturer;
    /**
     * å¤‡æ³¨
     */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 50)
    public String remark;
    /**
     * åˆ é™¤æ ‡å¿—
     */
    @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoBa/BaUser.java
@@ -2,13 +2,14 @@
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.mybatis.envm.Deleted;
import com.dy.common.mybatis.envm.Disabled;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
@@ -94,8 +95,6 @@
     * æ˜¯å¦ç¦ç”¨ 0:否,1:是
     */
    @Schema(description = "是否禁用", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Max(message = "是否禁用只能0或1", value = 1)
    @Min(message = "是否禁用只能0或1",value = 0)
    public Disabled disabled;
    /**
@@ -117,4 +116,10 @@
    @TableField(exist = false)
    public List<Integer> privileges;
    //public transient List<Integer> privileges;//此种方式变量不存库, ä¹Ÿä¸å‚与序列化了
    /**
     * ç”¨æˆ·æ‰€å±žè§’色Id
     */
    @TableField(exist = false)
    public String[] roleIds ;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java
@@ -15,7 +15,6 @@
 */
public enum DistrictLevel implements IEnum {
    Province((byte)0, "省"),
    City((byte)1, "市"),
    County((byte)2, "县"),
    Town((byte)3,  "镇"),
@@ -53,9 +52,7 @@
    }
    public static DistrictLevel get(Byte code){
        if(code.byteValue() == Province.code.byteValue()){
            return Province ;
        }if(code.byteValue() == City.code.byteValue()){
        if(code.byteValue() == City.code.byteValue()){
            return City ;
        }else if(code.byteValue() == County.code.byteValue()){
            return County ;
pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -77,7 +77,7 @@
        commandCallback:  http://127.0.0.1:8079/remote/rtu/comCallback
        webPort: 8070
        actutorPort: 9070
        idSuffix: 0 #此处只是占位,具体设置在通信中间件的config.xml中设置
        idSuffix: 0
    sso:
        checkUrl: http://127.0.0.1:8079/sso/sso/ssoCheck
        webPort: 8079
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
@@ -4,12 +4,9 @@
        <!-- å¤šä¸ªç»„织,用编号区分,编号从1开始 -->
        <org1 name="ym">
            <districts>
                <!-- çœçº§è¡Œæ”¿åŒºåœ¨ä¸šåŠ¡éœ€æ±‚ä¸­æ²¡æœ‰ä½“çŽ°ï¼Œåªåœ¨çŽ‹æ±Ÿæµ·IC卡设计中用到,所以这里把其level设置为0 -->
                <province name="云南省" num="53" level="0">
                    <city name="楚雄彝族自治州" num="23" level="1">
                        <country name="元谋县" num="28" level="2" />
                    </city>
                </province>
                <city name="楚雄彝族自治州" num="23" level="1">
                    <country name="元谋县" num="28" level="2" />
                </city>
            </districts>
            <user name="超级管理员" phone="admin" password="admin" supperAdmin="1" />
        </org1>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaClientMapper.xml
@@ -12,7 +12,7 @@
    <result column="divideId" jdbcType="BIGINT" property="divideId" />
    <result column="typeId" jdbcType="BIGINT" property="typeId" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="num" jdbcType="VARCHAR" property="num" />
    <result column="num" jdbcType="INTEGER" property="num" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="idCard" jdbcType="VARCHAR" property="idcard" />
    <result column="area" jdbcType="FLOAT" property="area" />
@@ -29,9 +29,8 @@
  </sql>
  <sql id="part_Column_List">
    <!--@mbg.generated-->
      ${alias}.id, ${alias}.countyId, ${alias}.townId, ${alias}.villageId, ${alias}.blockId, ${alias}.divideId, ${alias}.typeId,
      ${alias}.`name`, ${alias}.num, ${alias}.phone, ${alias}.idCard, ${alias}.area, ${alias}.district,${alias}.address,
      ${alias}.remark, ${alias}.disabled
      ${alias}.id, ${alias}.countyId, ${alias}.townId, ${alias}.villageId, ${alias}.blockId, ${alias}.divideId, ${alias}.typeId, ${alias}.name, ${alias}.num, ${alias}.phone, ${alias}.idCard, ${alias}.area, ${alias}.district,${alias}.address, ${alias}.remark,
      ${alias}.disabled
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -130,7 +129,7 @@
        values (#{id,jdbcType=BIGINT}, #{countyId,jdbcType=BIGINT},
          #{townId,jdbcType=BIGINT}, #{villageId,jdbcType=BIGINT},
          #{blockId,jdbcType=BIGINT}, #{divideId,jdbcType=BIGINT}, #{typeId,jdbcType=BIGINT},
          #{name,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR},
          #{name,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
          #{phone,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR},
          #{area,jdbcType=FLOAT}, #{district,jdbcType=VARCHAR},
          #{address,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},
@@ -220,7 +219,7 @@
            #{name,jdbcType=VARCHAR},
          </if>
          <if test="num != null">
            #{num,jdbcType=VARCHAR},
            #{num,jdbcType=INTEGER},
          </if>
          <if test="phone != null">
            #{phone,jdbcType=VARCHAR},
@@ -273,7 +272,7 @@
                'name' = #{name,jdbcType=VARCHAR},
            </if>
            <if test="num != null">
                num = #{num,jdbcType=VARCHAR},
                num = #{num,jdbcType=INTEGER},
            </if>
            <if test="phone != null">
                phone = #{phone,jdbcType=VARCHAR},
@@ -313,7 +312,7 @@
            blockId = #{blockId,jdbcType=BIGINT},
            typeId = #{typeId,jdbcType=BIGINT},
            `name` = #{name,jdbcType=VARCHAR},
            num = #{num,jdbcType=VARCHAR},
            num = #{num,jdbcType=INTEGER},
            phone = #{phone,jdbcType=VARCHAR},
            idcard = #{idcard,jdbcType=VARCHAR},
            area = #{area,jdbcType=FLOAT},
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/PipIrrMwAcceptApplication.java
@@ -6,6 +6,7 @@
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/ServerProperties.java
@@ -25,12 +25,6 @@
    public static Long lastUpDataTimeLive = 1000L ;
    
    //数据库数据id生成器的id后缀,0是默认的后缀,一般web系统应用,数据中间件id后缀大于等于1
    public static Integer dbDataIdSuffix = 1 ;
    //上下行数据缓存队列中缓存数据个数的报警量,这个与实体项目所接水表数相关
    public static Integer cacheUpDownDataWarnCount = 1000000 ;
    //上下行数据缓存队列中缓存数据个数的最大值,这个与实体项目所接水表数相关
    public static Integer cacheUpDownDataMaxCount = 1100000 ;
    public static Integer dbDataIdSuffix = 1 ;
}
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/forTcp/MidResultActionToRtu.java
@@ -15,7 +15,7 @@
        if(result != null && result instanceof MidResultToRtu){
            try {
                MidResultToRtu resToRtu = (MidResultToRtu)result ;
                TcpDownCommandCache.cacheCommand(resToRtu);
                TcpDownCommandCach.cachCommand(resToRtu);
                log.info("下行命令(toRtu)" + resToRtu.downCode + "中间结果已经放入下行命令缓存中");
            } catch (Exception e) {
                log.error(e);
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/forTcp/TcpDownCommandCache.java
File was deleted
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/forTcp/TcpDownCommandObj.java
@@ -73,8 +73,8 @@
        }
        Long lastSendStamp = tcpSe.lastDownComTime ;
        if(this.result.isQuickSend || lastSendStamp == null || (now - lastSendStamp >= ServerProperties.commandSendInterval)){
            //未收到命令结果,未达到最大发送次数,RTU在线,速发命令或超过命令下发间隔,以上满足发送命令条件,执行发送命令
        if(lastSendStamp == null || (now - lastSendStamp >= ServerProperties.commandSendInterval)){
            //未收到命令结果,未达到最大发送次数,RTU在线,超过命令间下发间隔,以上满足发送命令条件,执行发送命令
            tcpSe.ioSession.write(this.result.downBuffer) ;
            tcpSe.lastDownComTime = now ;
            if(!this.result.hasResponse){
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/RtuDownTask.java
@@ -7,7 +7,7 @@
import com.dy.common.mw.protocol.MidResult;
import com.dy.common.mw.protocol.Command;
import com.dy.common.mw.protocol.Driver;
import com.dy.common.mw.protocol.ProtocolCache;
import com.dy.common.mw.protocol.ProtocolCach;
import com.dy.aceMw.server.ServerProperties;
import com.dy.aceMw.server.forTcp.TcpSessionCach;
@@ -34,7 +34,8 @@
    
    /**
     * å¤„理命令
     * @param com å‘½ä»¤
     * @param webJgroupName
     * @param com
     * @throws Exception
     */
    private void deal(Command com) throws Exception{
@@ -44,13 +45,13 @@
        String protocolName = TcpSessionCach.getTcpProtocolName(rtuAddr) ;
        if(protocolName == null){
            //RTU未曾上线
            int count = ProtocolCache.driverCount() ;
            int count = ProtocolCach.driverCount() ;
            if(count == 1){
                //只有一个协议
                dri = ProtocolCache.getFirstDriver() ;
                dri = ProtocolCach.getFirstDriver() ;
            }
        }else{
            dri = ProtocolCache.getDriver(protocolName) ;
            dri = ProtocolCach.getDriver(protocolName) ;
        }    
        if(dri == null){
            log.error("严重错误,未能得到协议" + protocolName + "驱动类实例!");
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/RtuUpTask.java
@@ -14,7 +14,7 @@
import com.dy.common.mw.protocol.Driver;
import com.dy.common.mw.protocol.OnLine;
import com.dy.common.mw.protocol.OnLineHandle;
import com.dy.common.mw.protocol.ProtocolCache;
import com.dy.common.mw.protocol.ProtocolCach;
import com.dy.aceMw.server.ServerProperties;
import com.dy.aceMw.server.forTcp.RtuLogDealer;
import com.dy.aceMw.server.forTcp.RtuStatusDealer;
@@ -144,13 +144,13 @@
     * @throws Exception å¼‚常
     */
    private void dealUpData(IoSession session, String rtuAddrAtHead, String protocolName, boolean isOnLine, byte[] upBuf, String upHex) throws Exception{
        Driver dri = ProtocolCache.getDriver(protocolName) ;
        Driver dri = ProtocolCach.getDriver(protocolName) ;
        if(dri == null){
            log.error("严重错误,未能得到协议" + protocolName + "驱动类实例!");
        }else{
            MidResult[] midRs = dri.parseData(ServerProperties.isLowPower, rtuAddrAtHead, upBuf, upHex, new DriverParserDataCallback(){
                @Override
                public void callback(String rtuAddrAtHead, String code, String upHex, Boolean reportOrResponse_trueOrFalse, boolean parseFail, String rtuAddrInData) {
                public void callback(String rtuAddrAtHead, String meterNoAtHead, String code, String upHex, Boolean reportOrResponse_trueOrFalse, boolean parseFail, String rtuAddrInData, String meterNoInData) {
                    //更新终端状态
                    if(rtuAddrInData != null && !rtuAddrInData.equals(rtuAddrAtHead)){
                        //数据头中的RTU地址与数据中的RTU地址不一致,更换成数据中的RTU地址
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java
@@ -5,7 +5,7 @@
import com.dy.common.queue.Node;
import com.dy.common.mw.core.CoreTask;
import com.dy.aceMw.server.forTcp.TcpDownCommandCache;
import com.dy.aceMw.server.forTcp.TcpDownCommandCach;
import com.dy.aceMw.server.forTcp.TcpDownCommandObj;
import com.dy.aceMw.server.forTcp.TcpSessionCach;
@@ -40,12 +40,16 @@
     * å¤„理下行命令
     */
    public Integer dealDownCommand(Long now) {
        Node first = TcpDownCommandCache.getFirstQueueNode() ;
        if(first != null){
            Integer count = TcpDownCommandCache.size() ;
            Node last = TcpDownCommandCache.getLastQueueNode() ;
            this.doDealDownCommand(now, first, last);
            return count ;
        try{
            Node first = TcpDownCommandCach.getFirstQueueNode() ;
            if(first != null){
                Integer count = TcpDownCommandCach.size() ;
                Node last = TcpDownCommandCach.getLastQueueNode() ;
                this.doDealDownCommand(now, first, last);
                return count ;
            }
        }catch(Exception e){
            log.error(e);
        }
        return null ;
    }
@@ -53,9 +57,9 @@
     * å¤„理缓存的下行命令节点
     * @param now å½“前时刻
     * @param first ç¬¬ä¸€ä¸ªèŠ‚ç‚¹
     * @param last æœ€åŽä¸€ä¸ªèŠ‚ç‚¹
     * @param last æ˜¯åŽä¸€ä¸ªèŠ‚ç‚¹
     */
    private void doDealDownCommand1(Long now, Node first, Node last){
    private void doDealDownCommand(Long now, Node first, Node last){
        if(first != null){
            //在dealNode方法中,可能要把first从队列中移除,这时first.next为空,所以提前把first.next取出来
            Node next = first.next ;
@@ -70,28 +74,6 @@
            }
        }
    }
    /**
     * å¤„理缓存的下行命令节点
     * @param now å½“前时刻
     * @param first ç¬¬ä¸€ä¸ªèŠ‚ç‚¹
     * @param last æœ€åŽä¸€ä¸ªèŠ‚ç‚¹
     */
    private void doDealDownCommand(Long now, Node first, Node last){
        if(last != null){
            //在dealNode方法中,可能要把last从队列中移除,这时last.pre为空,所以提前把last.pre取出来
            Node pre = last.pre ;
            dealNode(now, last) ;
            if(first != null && first != last){
                doDealDownCommand(now, first, pre) ;
            }else if(first != null && first == last){
                //停止
            }else if(first == null){
                //这种情况不会存在
                doDealDownCommand(now, null, pre) ;
            }
        }
    }
    
    /**
     * å¤„理一个节点
@@ -102,7 +84,7 @@
        TcpDownCommandObj obj = (TcpDownCommandObj)node.obj ;
        boolean removeNode = obj.dealSelf(now) ;
        if(removeNode){
            TcpDownCommandCache.removeNode(node);
            TcpDownCommandCach.removeNode(node);
        }
    }
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/resources/config.xml
@@ -14,24 +14,20 @@
        offLineCachTimeout: ä¸åœ¨çº¿ç¼“存的命令最大缓存时长(秒)
        lastUpDataTimeLive: TCP上行数据时刻缓存时长(秒),当达到时长时,TCP上行数据时刻被清空,采用TCP上行数据时刻目的是,阻止上行数据同时下发数据,因为RTU处理不过来(经初次实验,1秒还是有问题,2秒无问题)
        dbDataIdSuffix:数据库数据id生成器的id后缀,0是默认的后缀,一般web系统应用,数据中间件id后缀大于等于1 
        cacheUpDownDataWarnCount:上下行数据缓存队列中缓存数据个数的报警量,这个与现实项目所接水表数相关
        cacheUpDownDataMaxCount:上下行数据缓存队列中缓存数据个数的最大值,这个与现实项目所接水表数相关
         -->
        <base 
            isLowPower="false"
            onlyOneProtocol="true"
            downComandMaxResendTimes="3"
            downComandMaxResendTimes="1"
            commandSendInterval="3"
            cachWaitResultTimeout="60"
            offLineCachTimeout="86400"
            lastUpDataTimeLive="1"
            dbDataIdSuffix="0"
            cacheUpDownDataWarnCount="100000"
            cacheUpDownDataMaxCount="110000"
            dbDataIdSuffix="1"
        />
        
        <!-- 
        centerAddr: ä¸­å¿ƒåœ°å€ï¼Œå½“前,centerAddr未用到
        centerAddr: ä¸­å¿ƒåœ°å€ï¼Œå½“前,在户表系统中的,centerAddr未用到
        synchroRtuClock: æ˜¯å¦å¯¹RTU校时
        synchroRtuClockTimepieces:当RTU与服务器时钟相差一定毫秒(配置文件是秒钟)后,进行校时
         -->
@@ -45,7 +41,7 @@
        <!-- è½¯ä»¶å‡çº§ -->
        <updateRtuSoft enable="true">
            <soft1 enable="true" oldVersionName="meter_v2_0,meter_v1_0" >
                <newVersion newVersionName="meter_v3_0" file="rtuSoft/meter_v3_0.txt"> </newVersion>
                <newVersion newVersionName="meter_v3_0" file="rtuSoft/meter_v3_0.txt"></newVersion>
            </soft1>
            <!-- 
            <soft2 enable="false" oldVersionName="rtu_v1_0,rtu_v2_0,rtu_v3_0" >
@@ -57,28 +53,27 @@
        <!-- 
        æ”¯æŒæ¨¡å—
        çŸ­å·¥ä½œæ—¶é•¿çº¿ç¨‹æ± ï¼Œçº¿ç¨‹è´Ÿè´£ç”¨æ—¶è¾ƒçŸ­çš„工作任务
        short_maxThread: æ± ä¸­æœ€å¤§çº¿ç¨‹æ•°ä¸ºæ‰€æœ‰CPU核数+1(short池与long池各分一半),若为-1,不受限制 ï¼Œè®¾ç½®ä¸º0,表示不启动线程池
        short_minThread: æ± ä¸­æœ€å°çº¿ç¨‹æ•°ï¼Œè‹¥ä¸º-1,不受限制,设置为0,表示不启动线程池
        short_maxThread: æ± ä¸­æœ€å¤§çº¿ç¨‹æ•°ä¸ºæ‰€æœ‰CPU核数+1
        short_minThread: æ± ä¸­æœ€å°çº¿ç¨‹æ•°
        short_freeTimeout: çº¿ç¨‹æ•°ç©ºé—²æ—¶é•¿ï¼Œè‹¥æ± ä¸­çº¿ç¨‹æ•°é‡å¤§äºŽminThread,且有的线程空闲时长超过freeTimeout,则清除该线程,为了不清除,把minThread与maxThread设置相等
        short_busyTimeout:线程不间断工作时长(单位为秒)超时限,认为线程已经了崩溃,将强制清除,短工作时长设置为5秒 
        é•¿å·¥ä½œæ—¶é•¿çº¿ç¨‹æ± ï¼Œçº¿ç¨‹è´Ÿè´£ç”¨æ—¶è¾ƒé•¿çš„工作任务,例如数据库存取操作
        long_maxThread: æ± ä¸­æœ€å¤§çº¿ç¨‹æ•°ä¸ºæ‰€æœ‰CPU核数+1(short池与long池各分一半),若为-1,不受限制,设置为0,表示不启动线程池
        long_minThread: æ± ä¸­æœ€å°çº¿ç¨‹æ•°ï¼Œè‹¥ä¸º-1,不受限制,设置为0,表示不启动线程池
        é•¿å·¥ä½œæ—¶é•¿çº¿ç¨‹æ± ï¼Œçº¿ç¨‹è´Ÿè´£ç”¨æ—¶è¾ƒé•¿çš„工作任务,例如从Redis中取缓存的RTU上行数据
        long_maxThread: æ± ä¸­æœ€å¤§çº¿ç¨‹æ•°,若为-1,不受限制
        long_minThread: æ± ä¸­æœ€å°çº¿ç¨‹æ•°
        long_freeTimeout: çº¿ç¨‹æ•°ç©ºé—²æ—¶é•¿ï¼Œè‹¥æ± ä¸­çº¿ç¨‹æ•°é‡å¤§äºŽminThread,且有的线程空闲时长超过freeTimeout,则清除该线程
        long_busyTimeout:线程不间断工作时长(单位为秒)超时限,若为-1,不受限制 
        enableThreadPool:是否启用线程池
         -->
        <!-- å½“前实现,写rtu日志、RMI数据处理用到了短线程池  -->
        <!-- å½“前实现,rtu上行数据处理(读写数据)用到了第线程池  -->
        <support
            short_maxThread="6"
            short_minThread="6"
            short_maxThread="100"
            short_minThread="5"
            short_freeTimeout="60"
            short_busyTimeout="5"
            long_maxThread="6"
            long_minThread="6"
            long_maxThread="200"
            long_minThread="0"
            long_freeTimeout="60"
            long_busyTimeout="-1"
            enableThreadPool="true"
        />
            
        <!-- 
@@ -110,10 +105,14 @@
        <!--
        sleepBigBusy:主线程大忙时每次执行间隔时长(毫秒)
        sleepSmallBusy:主线程小忙时每次执行间隔时长(毫秒)
        queueWarnSize: ç¼“存队列节点数警告数量
        queueMaxSize: ç¼“存队列节点数最大数量
         -->
        <core
            sleepBigBusy="100"
            sleepSmallBusy="500"
            queueWarnSize="100000"
            queueMaxSize="300000"
        />
        
        <!-- 
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/AdapterImp_RmiUnit.java
File was deleted
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/ResRegisterVo.java
File was deleted
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/ResStartVo.java
File was deleted
pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/RmiRequestedCallback.java
File was deleted
pipIrr-platform/pipIrr-web/pipIrr-web-base/pom.xml
@@ -15,124 +15,4 @@
    <name>pipIrr-web-base</name>
    <description>web基础信息系统</description>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockSv.java
@@ -3,6 +3,7 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoBa.BaBlockMapper;
import com.dy.pipIrrGlobal.pojoBa.BaBlock;
import com.dy.pipIrrGlobal.pojoBa.BaClientType;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictVo.java
@@ -23,9 +23,9 @@
    @Length(message = "行政区名称小于{max}字", min = 1, max = 25)
    public String name ;
    @Schema(description = "行政区编号(省市县2位,镇村3位)", requiredMode = Schema.RequiredMode.REQUIRED)
    @Schema(description = "行政区编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "行政区编号不能为空") //不能为空也不能为null
    @Length(message = "行政区编号是一位或两位数", min = 2, max = 3)
    @Length(message = "行政区编号是一位或两位数", min = 1, max = 2)
    public String num ;
    @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
@@ -21,6 +21,7 @@
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
@@ -31,19 +32,23 @@
@Slf4j
@Tag(name = "用户管理", description = "用户增删改查等操作")
@RestController
@RequestMapping(path="user")
@RequestMapping(path = "user")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class UserCtrl {
    private UserSv sv ;
    private UserSv sv;
    @Value("${user.defaultPassword:ABC123}")
    private String defaultPassword;
    @Autowired
    private void setSv(UserSv sv){
        this.sv = sv ;
    private void setSv(UserSv sv) {
        this.sv = sv;
    }
    /**
     * å®¢æˆ·ç«¯è¯·æ±‚得到所有用户数据
     *
     * @return æ‰€æœ‰ç”¨æˆ·æ•°æ®
     */
    @Operation(summary = "获得一页用户", description = "返回一页用户数据")
@@ -57,18 +62,19 @@
    })
    @PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
    @SsoAop("-1")
    public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody @Parameter(description = "查询form表单json数据", required = true) @Valid QueryVo vo){
    public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody @Parameter(description = "查询form表单json数据", required = true) @Valid QueryVo vo) {
        try {
            QueryResultVo<List<BaUser>> res = this.sv.selectSome(vo) ;
            QueryResultVo<List<BaUser>> res = this.sv.selectSome(vo);
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * å¾—到一个用户数据
     *
     * @return ä¸€ä¸ªç”¨æˆ·æ•°æ®
     */
    @Operation(summary = "一个用户", description = "得到一个用户数据")
@@ -82,12 +88,13 @@
    })
    @GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
    @SsoAop("-1")
    public BaseResponse<BaUser> one(@Parameter(description = "实体id", required = true) String id){
    public BaseResponse<BaUser> one(@Parameter(description = "实体id", required = true) String id) {
        return BaseResponseUtils.buildSuccess(this.sv.selectById(Long.parseLong(id)));
    }
    /**
     * ä¿å­˜ç”¨æˆ·
     *
     * @param po ä¿å­˜ç”¨æˆ·form表单对象
     * @return æ˜¯å¦æˆåŠŸ
     */
@@ -102,37 +109,42 @@
    })
    @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult){
        if(bindingResult != null && bindingResult.hasErrors()){
    public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult) {
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        po.id = null ;
        po.id = null;
        int count;
        int count1;
        try {
            po.disabled = Disabled.NO ;//默认不禁用
            po.deleted = Deleted.NO ;//默认不删除
            po.orgTag = DataSourceContext.get() ;//机构标签
            if(!StringUtils.isNullOrEmpty(po.password)){
            po.disabled = Disabled.NO;//默认不禁用
            po.deleted = Deleted.NO;//默认不删除
            po.orgTag = DataSourceContext.get();//机构标签
            if (!StringUtils.isNullOrEmpty(po.password)) {
                /*
                å¦‚果前端进行了base64加密
                po.password = new String(Base64.getDecoder().decode(po.password)) ;
                */
                po.password = MD5.encrypt(po.password) ;//进行加密码
                po.password = MD5.encrypt(po.password);//进行加密码
            } else {
                po.password = MD5.encrypt(defaultPassword);
            }
            count = this.sv.save(po);
            count1 = this.sv.setRoles(String.valueOf(po.id), po.roleIds);
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        if (count <= 0 || count1 <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * ç¼–辑修改用户
     *
     * @param po ä¿å­˜ç”¨æˆ·form表单对象
     * @return æ˜¯å¦æˆåŠŸ
     */
@@ -147,32 +159,33 @@
    })
    @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult){
        if(bindingResult != null && bindingResult.hasErrors()){
    public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult) {
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        if(po.id == null){
            return BaseResponseUtils.buildFail("无数据实体ID") ;
        if (po.id == null) {
            return BaseResponseUtils.buildFail("无数据实体ID");
        }
        int count;
        try {
            po.deleted = null ;//设置为null,不做更新
            po.orgTag = null ;//设置为null,不做更新
            po.deleted = null;//设置为null,不做更新
            po.orgTag = null;//设置为null,不做更新
            count = this.sv.update(po);
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * ä¿®æ”¹å¯†ç 
     *
     * @param id ç”¨æˆ·ID
     * @return æ˜¯å¦æˆåŠŸ
     */
@@ -189,51 +202,137 @@
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> changePassword(@Parameter(description = "实体id", required = true) String id,
                                                @Parameter(description = "旧密码", required = true) String oldPassword,
                                                @Parameter(description = "新密码", required = true) String newPassword) throws Exception{
        if(id == null){
            return BaseResponseUtils.buildFail("id不能为空") ;
                                                @Parameter(description = "新密码", required = true) String newPassword) throws Exception {
        if (id == null) {
            return BaseResponseUtils.buildFail("id不能为空");
        }
        if(StringUtils.isNullOrEmpty(oldPassword)){
            return BaseResponseUtils.buildFail("旧密码不能为空") ;
        if (StringUtils.isNullOrEmpty(oldPassword)) {
            return BaseResponseUtils.buildFail("旧密码不能为空");
        }
        if(StringUtils.isNullOrEmpty(newPassword)){
            return BaseResponseUtils.buildFail("新密码不能为空") ;
        if (StringUtils.isNullOrEmpty(newPassword)) {
            return BaseResponseUtils.buildFail("新密码不能为空");
        }
        /*
        å¦‚果前端进行了base64加密
        oldPassword = new String(Base64.getDecoder().decode(oldPassword)) ;
        newPassword = new String(Base64.getDecoder().decode(newPassword)) ;
        */
        oldPassword = MD5.encrypt(oldPassword) ;//进行加密码
        newPassword = MD5.encrypt(newPassword) ;//进行加密码
        oldPassword = MD5.encrypt(oldPassword);//进行加密码
        newPassword = MD5.encrypt(newPassword);//进行加密码
        Long idLg = Long.parseLong(id) ;
        int count ;
        Long idLg = Long.parseLong(id);
        int count;
        try {
            BaUser po = this.sv.selectById(idLg);
            if(Objects.isNull(po)){
                return BaseResponseUtils.buildFail("未得到用户,请求失败") ;
            }else{
                if(!po.password.equalsIgnoreCase(oldPassword)){
                    return BaseResponseUtils.buildFail("旧密码不正确,请求失败") ;
                }else{
                    count = this.sv.changePassword(idLg, newPassword) ;
            if (Objects.isNull(po)) {
                return BaseResponseUtils.buildFail("未得到用户,请求失败");
            } else {
                if (!po.password.equalsIgnoreCase(oldPassword)) {
                    return BaseResponseUtils.buildFail("旧密码不正确,请求失败");
                } else {
                    count = this.sv.changePassword(idLg, newPassword);
                }
            }
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * é‡ç½®å¯†ç ä¸ºé»˜è®¤å€¼
     *
     * @param id ç”¨æˆ·ID
     * @return æ˜¯å¦æˆåŠŸ
     */
    @Operation(summary = "重置密码", description = "提交用户ID")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "操作结果:true:成功,false:失败(BaseResponse.content)",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = Boolean.class))}
            )
    })
    @GetMapping(path = "resetPassword", consumes = MediaType.TEXT_PLAIN_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> resetPassword(@Parameter(description = "实体id", required = true) String id) throws Exception {
        if (id == null) {
            return BaseResponseUtils.buildFail("id不能为空");
        }
        String password = MD5.encrypt(defaultPassword);//进行加密码
        Long idLg = Long.parseLong(id);
        int count;
        try {
            BaUser po = this.sv.selectById(idLg);
            if (Objects.isNull(po)) {
                return BaseResponseUtils.buildFail("未得到用户,请求失败");
            } else {
                count = this.sv.changePassword(idLg, password);
            }
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * é‡ç½®å¯†ç ä¸ºéšæœºæ•°å­—加字母
     *
     * @param id ç”¨æˆ·ID
     * @return æ˜¯å¦æˆåŠŸ
     */
    @Operation(summary = "重置密码", description = "提交用户ID")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "操作结果:true:成功,false:失败(BaseResponse.content)",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = Boolean.class))}
            )
    })
    @GetMapping(path = "resetPassword1", consumes = MediaType.TEXT_PLAIN_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<String> resetPassword1(@Parameter(description = "实体id", required = true) String id) throws Exception {
        if (id == null) {
            return BaseResponseUtils.buildFail("id不能为空");
        }
        String randomPassword = this.sv.getStringRandom(6);
        String password = MD5.encrypt(randomPassword);//进行加密码
        Long idLg = Long.parseLong(id);
        int count;
        try {
            BaUser po = this.sv.selectById(idLg);
            if (Objects.isNull(po)) {
                return BaseResponseUtils.buildFail("未得到用户,请求失败");
            } else {
                count = this.sv.changePassword(idLg, password);
            }
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(randomPassword);
        }
    }
    /**
     * è®¾ç½®ç”¨æˆ·è§’色
     *
     * @param id ç”¨æˆ·ID
     * @return æ˜¯å¦æˆåŠŸ
     */
@@ -249,27 +348,28 @@
    @GetMapping(path = "setRoles", consumes = MediaType.TEXT_PLAIN_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> setRoles(@Parameter(description = "实体id", required = true) String id,
                                          @Parameter(description = "角色id数组") String[] roleIds){
        Long[] roleId_lg = null ;
        if(roleIds != null && roleIds.length > 0){
            roleId_lg = new Long[roleIds.length] ;
            int index = 0 ;
            for(String roleId : roleIds){
                roleId_lg[index++] = Long.parseLong(roleId) ;
                                          @Parameter(description = "角色id数组") String[] roleIds) {
        Long[] roleId_lg = null;
        if (roleIds != null && roleIds.length > 0) {
            roleId_lg = new Long[roleIds.length];
            int index = 0;
            for (String roleId : roleIds) {
                roleId_lg[index++] = Long.parseLong(roleId);
            }
        }
        try {
            this.sv.setRoles(Long.parseLong(id), roleId_lg);
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
            return BaseResponseUtils.buildException(e.getMessage());
        }
        return BaseResponseUtils.buildSuccess(true) ;
        return BaseResponseUtils.buildSuccess(true);
    }
    /**
     * åˆ é™¤ç”¨æˆ·
     *
     * @param id ç”¨æˆ·ID
     * @return æ˜¯å¦æˆåŠŸ
     */
@@ -284,21 +384,21 @@
    })
    @GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
    @SsoAop("-1")//@SsoAop(power = "-1")
    public BaseResponse<Boolean> delete(@Parameter(description = "实体id", required = true) String id){
        if(id == null){
            return BaseResponseUtils.buildFail("id不能为空") ;
    public BaseResponse<Boolean> delete(@Parameter(description = "实体id", required = true) String id) {
        if (id == null) {
            return BaseResponseUtils.buildFail("id不能为空");
        }
        int count;
        try {
            count = this.sv.delete(Long.parseLong(id));
        } catch (Exception e) {
            log.error("保存用户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if(count <= 0){
            return BaseResponseUtils.buildFail("数据库存储失败") ;
        }else{
            return BaseResponseUtils.buildSuccess(true) ;
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserSv.java
@@ -7,14 +7,14 @@
import com.dy.pipIrrGlobal.pojoBa.BaUser;
import com.dy.pipIrrGlobal.pojoBa.BaUserRole;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import org.apache.dubbo.common.utils.PojoUtils ;
import org.springframework.transaction.annotation.Transactional;
import java.util.Random;
@Slf4j
@Service
@@ -24,41 +24,43 @@
    private BaUserRoleMapper urDao;
    @Autowired
    private void setDao(BaUserMapper dao){
    private void setDao(BaUserMapper dao) {
        this.dao = dao;
    }
    @Autowired
    private void setDao(BaUserRoleMapper dao){
    private void setDao(BaUserRoleMapper dao) {
        this.urDao = dao;
    }
    /**
     * å¾—到一个用户
     *
     * @param id ç”¨æˆ·ID
     * @return ç”¨æˆ·å®žä½“
     */
    public BaUser selectById(Long id){
        return this.dao.selectById(id) ;
    public BaUser selectById(Long id) {
        return this.dao.selectById(id);
    }
    /**
     * å¾—到一个用户
     *
     * @param vo æŸ¥è¯¢æ¡ä»¶å€¼å¯¹è±¡
     * @return ç”¨æˆ·å®žä½“
     */
    @SuppressWarnings("unchecked")
    public QueryResultVo<List<BaUser>> selectSome(QueryVo vo){
        Map<String, Object> params = (Map<String, Object>)PojoUtils.generalize(vo) ;
        Long itemTotal = this.dao.selectTotal(params) ;
    public QueryResultVo<List<BaUser>> selectSome(QueryVo vo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
        Long itemTotal = this.dao.selectTotal(params);
        QueryResultVo<List<BaUser>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = vo.pageSize ;
        rsVo.pageCurr = vo.pageCurr ;
        QueryResultVo<List<BaUser>> rsVo = new QueryResultVo<>();
        rsVo.pageSize = vo.pageSize;
        rsVo.pageCurr = vo.pageCurr;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = this.dao.selectSome(params) ;
        rsVo.obj = this.dao.selectSome(params);
        return rsVo ;
        return rsVo;
    }
    /**
@@ -77,35 +79,55 @@
     * @return å½±å“è®°å½•数量
     */
    @Transactional
    public int update(BaUser po){
        return this.dao.updateByPrimaryKeySelective(po) ;
    public int update(BaUser po) {
        return this.dao.updateByPrimaryKeySelective(po);
    }
    /**
     * ä¿®æ”¹å¯†ç 
     * @param id ç”¨æˆ·ID
     *
     * @param id       ç”¨æˆ·ID
     * @param password æ–°å¯†ç 
     * @return å½±å“è®°å½•数量
     */
    public int changePassword(Long id, String password){
        return this.dao.changePassword(id, password) ;
    public int changePassword(Long id, String password) {
        return this.dao.changePassword(id, password);
    }
    /**
     * è®¾ç½®ç”¨æˆ·è§’色
     * @param userId ç”¨æˆ·id
     *
     * @param userId  ç”¨æˆ·id
     * @param roleIds é€‰æ‹©çš„角色id集合
     * @return æ’入用户与角色关联记录数量
     */
    public int setRoles(Long userId, Long[] roleIds){
        this.urDao.deleteByUserId(userId) ;
        int count = 0 ;
        if(roleIds != null && roleIds.length > 0){
            for(Long roleId : roleIds){
                count += this.urDao.insertSelective(new BaUserRole(userId,roleId)) ;
    public int setRoles(Long userId, Long[] roleIds) {
        this.urDao.deleteByUserId(userId);
        int count = 0;
        if (roleIds != null && roleIds.length > 0) {
            for (Long roleId : roleIds) {
                count += this.urDao.insertSelective(new BaUserRole(userId, roleId));
            }
        }
        return count ;
    }
    /**
     * è®¾ç½®ç”¨æˆ·è§’色
     *
     * @param userId  ç”¨æˆ·id
     * @param roleIds é€‰æ‹©çš„角色id集合
     * @return æ’入用户与角色关联记录数量
     */
    public int setRoles(String userId, String[] roleIds) {
        this.urDao.deleteByUserId(Long.parseLong(userId));
        int count = 0;
        if (roleIds != null && roleIds.length > 0) {
            for (String roleId : roleIds) {
                count += this.urDao.insertSelective(new BaUserRole(Long.parseLong(userId), Long.parseLong(roleId)));
            }
        }
        return count;
    }
    /**
@@ -114,8 +136,31 @@
     * @return å½±å“è®°å½•数量
     */
    @Transactional
    public int delete(Long id){
        return this.dao.deleteLogicById(id) ;
    public int delete(Long id) {
        return this.dao.deleteLogicById(id);
    }
    /**
     * ç”ŸæˆæŒ‡å®šä½æ•°éšæœºæ•°å­—密码
     *
     * @param length å¤šé•¿éšæœºæ•°
     * @return éšæœºæ•°
     */
    public String getStringRandom(int length) {
        String val = "";
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num";
            if ("char".equalsIgnoreCase(charOrNum)) {
                int temp = random.nextInt(2) % 2 == 0 ? 65 : 97;
                val += (char) (random.nextInt(26) + temp);
            } else if ("num".equalsIgnoreCase(charOrNum)) {
                val += String.valueOf(random.nextInt(10));
            }
        }
        return val;
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/util/InitListener.java
@@ -83,27 +83,6 @@
                    //设置数据源
                    DataSourceContext.set(orgTag);
                    if(!this.existDistricts()){
                        if(configXml.existElement(doc, "config.orgs.org" + num + ".districts.province")){
                            String distriName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province","name", null, false, null) ;
                            String distriNum = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province","num", null, false, null) ;
                            Integer distriLevel = configXml.getSetAttrPlusInt(doc, "config.orgs.org" + num + ".districts.province","level", null, 0, 99,null) ;
                            Long supperId = this.saveDistrict(null, distriName, distriNum, distriLevel);
                            if(supperId != null && configXml.existElement(doc, "config.orgs.org" + num + ".districts.province.city")){
                                if(configXml.existElement(doc, "config.orgs.org" + num + ".districts.province.city")){
                                    distriName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province.city","name", null, false, null) ;
                                    distriNum = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province.city","num", null, false, null) ;
                                    distriLevel = configXml.getSetAttrPlusInt(doc, "config.orgs.org" + num + ".districts.province.city","level", null, 1, 99,null) ;
                                    supperId = this.saveDistrict(supperId, distriName, distriNum, distriLevel);
                                    if(supperId != null && configXml.existElement(doc, "config.orgs.org" + num + ".districts.province.city.country")){
                                        distriName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province.city.country","name", null, false, null) ;
                                        distriNum = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province.city.country","num", null, false, null) ;
                                        distriLevel = configXml.getSetAttrPlusInt(doc, "config.orgs.org" + num + ".districts.province.city.country","level", null, 1, 99,null) ;
                                        this.saveDistrict(supperId, distriName, distriNum, distriLevel);
                                    }
                                }
                            }
                        }
                        /* 2023-11-23 ä¸‹é¢æ˜¯æœ€åˆå®žçŽ°ï¼ŒåŽæ»¡è¶³IC卡中存在省的要求,增加省级行政区划
                        if(configXml.existElement(doc, "config.orgs.org" + num + ".districts.city")){
                            String distriName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.city","name", null, false, null) ;
                            String distriNum = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.city","num", null, false, null) ;
@@ -116,7 +95,6 @@
                                this.saveDistrict(supperId, distriName, distriNum, distriLevel);
                            }
                        }
                        */
                    }
                    if(!this.existUsers()){
                        if(configXml.existElement(doc, "config.orgs.org" + num + ".user")){
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/resources/application.yml
@@ -1,6 +1,8 @@
spring:
    profiles:
        include: global, database, database-ym, database-pj
user:
    defaultPassword: "ABC123"
#actutor的web端口
management:
pipIrr-platform/pipIrr-web/pipIrr-web-demo/pom.xml
@@ -15,123 +15,5 @@
    <name>pipIrr-web-demo</name>
    <description>web开发演示系统,演示示例</description>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrDemo.PipIrrDemoApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-web/pipIrr-web-demo/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
    profiles:
        include: global, database, database-ym, database-pj
        include: global, database
#actutor的web端口
management:
pipIrr-platform/pipIrr-web/pipIrr-web-gis/pom.xml
@@ -15,123 +15,5 @@
    <name>pipIrr-web-gis</name>
    <description>web电子地图系统</description>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrGis.PipIrrGisApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
    profiles:
        include: global, database, database-ym, database-pj
        include: global, database
#actutor的web端口
management:
pipIrr-platform/pipIrr-web/pipIrr-web-remote/pom.xml
@@ -15,123 +15,4 @@
    <name>pipIrr-web-remote</name>
    <description>web远程操作信息系统</description>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrRemote.PipIrrRemoteApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
    profiles:
        include: global, database, database-ym, database-pj
        include: global, database
#actutor的web端口
management:
pipIrr-platform/pipIrr-web/pipIrr-web-sso/pom.xml
@@ -36,124 +36,4 @@
            <!-- è‡ªåŠ¨åˆ¤æ–­ä½¿ç”¨ä¸Žspring boot兼容的版本 -->
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.sso.PipIrrSsoApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
    profiles:
        include: global, database, database-ym, database-pj
        include: global, database
#actutor的web端口
management:
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/pom.xml
@@ -15,123 +15,4 @@
    <name>pipIrr-web-statistics</name>
    <description>web统计分析系统</description>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrStatistics.PipIrrStatisticsApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/resources/application.yml
@@ -1,6 +1,6 @@
spring:
    profiles:
        include: global, database, database-ym, database-pj
        include: global, database
#actutor的web端口
management:
pipIrr-platform/pipIrr-web/pom.xml
@@ -216,6 +216,58 @@
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <!--        &lt;!&ndash; å…¨å±€æŽ’除&ndash;&gt;-->
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-json</artifactId>-->
        <!--            <exclusions>-->
        <!--                <exclusion>-->
        <!--                    <groupId>*</groupId>-->
        <!--                    <artifactId>*</artifactId>-->
        <!--                </exclusion>-->
        <!--            </exclusions>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-logging</artifactId>-->
        <!--            <exclusions>-->
        <!--                <exclusion>-->
        <!--                    <groupId>*</groupId>-->
        <!--                    <artifactId>*</artifactId>-->
        <!--                </exclusion>-->
        <!--            </exclusions>-->
        <!--        </dependency>-->
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <!-- spring boot提供的maven打包插件 -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- å¼ºåˆ¶è®¾å®š java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pom.xml
@@ -361,4 +361,4 @@
            </plugins>
        </pluginManagement>
    </build>
</project>
</project>
pipIrr-platform/Îĵµ/Git²Ù×÷.txt
File was deleted
pipIrr-platform/Îĵµ/Maven ´ò°ü²å¼þ maven-jar-plugin.docx
Binary files differ
pipIrr-platform/Îĵµ/Maven´ò°ü.docx
Binary files differ
pipIrr-platform/Îĵµ/MavenµÄmaven-compiler-plugin²å¼þ.docx
Binary files differ
pipIrr-platform/Îĵµ/ÔÚÏßÐèÇóÎļþ·ÃÎʵØÖ·.txt
@@ -1,2 +1 @@
https://docs.qq.com/desktop
https://lanhuapp.com/link/#/invite?sid=lX0nqhHU
https://docs.qq.com/doc/DRHBkeVlCekp1d1RU
pipIrr-platform/Îĵµ/Ôö¼ÓÒ»¸öÓ¦Óûú¹¹.docx
Binary files differ
pipIrr-platform/Îĵµ/±àÂëÉè¼Æ.docx
Binary files differ