From 277ec59299c5909dafecbe6e5afa85dd3278ade7 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期三, 16 十月 2024 09:13:23 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-global/src/main/resources/application-database(开发测试---单数据库).yml | 8 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java | 11 + pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java | 21 ++ pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java | 72 ++++-- pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java | 8 pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java | 23 ++ pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml | 5 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 78 ++++++- pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java | 12 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/CodeLocal.java | 4 pipIrr-platform/pipIrr-global/src/main/resources/application-global(开发测试---166PC机).yml | 217 +++++++++++++++++++++ pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsVo.java | 27 ++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java | 29 ++ pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml | 17 + pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml | 2 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsDeal.java | 22 ++ pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java | 11 + 17 files changed, 505 insertions(+), 62 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java index 530f5ad..6b902c9 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java @@ -22,7 +22,7 @@ */ @Data -@JsonPropertyOrder({ "intakeId", "intakeName", "divideId", "divideName", "blockId", "blockName", "isBind", "address", "lng", "lat", "operator", "operateDt", "remarks", "controllerId", "rtuAddr"}) +@JsonPropertyOrder({ "intakeId", "intakeName", "divideId", "divideName", "blockId", "blockName", "isBind", "address", "lng", "lat", "operator", "operateDt", "remarks", "controllerId", "rtuAddr", "protocol", "findDt", "isOnLine", "bindNumber"}) @HeadRowHeight(30) @ContentRowHeight(20) public class VoIntake implements BaseEntity { @@ -55,8 +55,8 @@ @ColumnWidth(15) private String blockName; - @Schema(title = "缁戝畾璁惧") - @ExcelProperty(value = {"${title}", "缁戝畾璁惧"}) + @Schema(title = "鏄惁缁戝畾璁惧") + @ExcelProperty(value = {"${title}", "鏄惁缁戝畾璁惧"}) @ColumnWidth(10) private String isBind; @@ -98,4 +98,27 @@ @ExcelProperty(value = {"${title}", "鎺у埗鍣ㄥ湴鍧�"}) @ColumnWidth(15) private String rtuAddr; + + @Schema(title = "閫氳鍗忚") + @ExcelIgnore + private String protocol; + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @Schema(title = "鍙戠幇鏃ユ湡鏃堕棿") + @ExcelProperty(value = {"${title}", "鍙戠幇鏃堕棿"}) + @ColumnWidth(20) + private Date findDt; + + /** + * 鏄惁鍦ㄧ嚎 + */ + @ExcelIgnore + private Boolean isOnLine; + + @Schema(title = "缁戝畾娆℃暟") + @ExcelProperty(value = {"${title}", "缁戝畾娆℃暟"}) + @ColumnWidth(10) + private Integer bindNumber; + } diff --git "a/pipIrr-platform/pipIrr-global/src/main/resources/application-database\050\345\274\200\345\217\221\346\265\213\350\257\225---\345\215\225\346\225\260\346\215\256\345\272\223\051.yml" "b/pipIrr-platform/pipIrr-global/src/main/resources/application-database\050\345\274\200\345\217\221\346\265\213\350\257\225---\345\215\225\346\225\260\346\215\256\345\272\223\051.yml" new file mode 100644 index 0000000..a291bd2 --- /dev/null +++ "b/pipIrr-platform/pipIrr-global/src/main/resources/application-database\050\345\274\200\345\217\221\346\265\213\350\257\225---\345\215\225\346\225\260\346\215\256\345\272\223\051.yml" @@ -0,0 +1,8 @@ +# 鏁版嵁婧愰厤缃� +spring: + #澶氭暟鎹簮闇�瑕侀厤缃� + main: + allow-bean-definition-overriding: true #璁剧疆涓簍rue鏃讹紝鍚庡畾涔夌殑bean浼氳鐩栦箣鍓嶅畾涔夌殑鐩稿悓鍚嶇О鐨刡ean + datasource: #閰嶇疆鏁版嵁婧� + #澶氫釜鏁版嵁婧愬悕绉板湪姝ら厤缃紝瑕佹眰涓巗pring銆俤atasource銆俒ym][pj]涓殑涓�鑷� + names: ym \ No newline at end of file diff --git "a/pipIrr-platform/pipIrr-global/src/main/resources/application-global\050\345\274\200\345\217\221\346\265\213\350\257\225---166PC\346\234\272\051.yml" "b/pipIrr-platform/pipIrr-global/src/main/resources/application-global\050\345\274\200\345\217\221\346\265\213\350\257\225---166PC\346\234\272\051.yml" new file mode 100644 index 0000000..7c8cdc5 --- /dev/null +++ "b/pipIrr-platform/pipIrr-global/src/main/resources/application-global\050\345\274\200\345\217\221\346\265\213\350\257\225---166PC\346\234\272\051.yml" @@ -0,0 +1,217 @@ +logging: + charset: + console: UTF-8 + config: + classpath: log4j2.yml +#绂佺敤鐧芥爣閿欒椤甸潰 +server: + error: + whitelabel: + enabled: false + #servlet閰嶇疆 + servlet: + encoding: + #鍙栨秷榛樿鐨勫瓧绗﹂泦缂栫爜 + enabled: true + #璁剧疆寮哄埗浣跨敤鎸囧畾瀛楃缂栫爜闆� + force: true + #浣跨敤鐨勫瓧绗︾紪鐮� + charset: utf-8 +# actuator閰嶇疆锛屽厛include浜嗗叏閮紝鐒跺悗鍐峞xclude鎸囧畾鐨別ndpoint +management: + endpoints: + web: + exposure: + include: '*' + #exclude: beans + .shutdown: + enabled: true #鏄惁寮�鍚�/actuator/shutdown + +# SpringDoc-OpenApi 閰嶇疆 +springdoc: + swagger-ui: + #搴旂敤actuator鏃讹紝璁块棶: http://[IP]:[port]/actuator/swagger-ui/index.html 渚嬪http://127.0.0.1:9080/actuator/swagger-ui/index.html + #鏈敤actuator鏃讹紝璁块棶: http://[IP]:[port]/[context]/swagger-ui/index.html 渚嬪http://127.0.0.1:8080/[瀛愮郴缁熶笂涓嬫枃锛坆ase锛塢/swagger-ui/index.html + path: /swagger-ui + operationsSorter: method # HTTP 鏂规硶鎺掑簭 + tagsSorter: alpha # API 鎺掑簭 + api-docs: + path: /v3/apiDocs + groups: + enabled: true + show-actuator: true #鍦╝ctuator閰嶇疆鐨勭鍙e強涓婁笅鏂囦腑璁块棶 SpringDoc-OpenApi + use-management-port: true #搴旂敤actuator閰嶇疆鐨勭鍙o紝浣嗕笂闈㈢殑swagger-ui:path鍙細閲囩敤榛樿鍊約wagger-ui + packages-to-scan: com.dy + #paths-to-match: /sys/**, /demo/**, /** + paths-to-match: /** + web: + title: 澶х鑺傛按绠$亴鐩戞帶绯荤粺API + description: 澶х鑺傛按绠$亴鐩戞帶绯荤粺鏈嶅姟绔� Restfull API + version: v1.0.0 + license-name: 澶х鑺傛按鐮旂┒闄� + +#MybatisPlus 閰嶇疆鏃ュ織鏄剧ず鎵цSQL +mybatis-plus: + #鍖归厤sql璇彞鐨勬槧灏勬枃浠剁殑浣嶇疆锛宑lasspath浠h〃鍦╮esources涓� + mapper-locations: classpath:mapper/*.xml + #浠ヤ笅涓や釜閰嶇疆鍙互鐪佺暐锛屽湪mapper鏄犲皠鏂囦欢涓厤缃�淍Mapper鈥濅篃鏄彲浠ョ殑銆� + #浣跨敤type-aliases-package涓寚瀹歟ntity鎵弿鍖呰矾寰勶紝璁﹎ybatis鑷姩鎵弿鑷畾涔夌殑entity + #type-aliases-package: com.dy.pipIrrGlobal.daoBa + configuration: + #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #鏃惰�岃緭鍑烘棩蹇楋紝鏃惰�屼笉杈撳嚭鏃ュ織 + log-impl: org.apache.ibatis.logging.log4j2.Log4j2Impl + #寮�鍚┘宄皍Name鑷姩鏄犲皠鍒皍_name + #2023-10-24缁忓疄楠岋紝涓嬮潰閰嶇疆true鎴杅alse锛岄兘鑳戒粠u_name鏄犲皠鍒皍Name + #map-underscore-to-camel-case: true + lazyLoadingEnabled: true # 寮�鍚欢鏃跺姞杞藉紑鍏� + aggressiveLazyLoading: false # 灏嗙Н鏋佸姞杞芥敼涓烘秷鏋佸姞杞斤紙鍗虫寜闇�鍔犺浇锛夛紝榛樿鍊兼槸false + lazy-load-trigger-methods: "" # 闃绘尅涓嶇浉骞茬殑鎿嶄綔瑙﹀彂锛屽疄鐜版噿鍔犺浇 + cache-enabled: true #鎵撳紑鍏ㄥ眬缂撳瓨寮�鍏筹紙浜岀骇鐜锛夛紝榛樿鍊兼槸true + default-enum-type-handler: com.dy.common.mybatis.envm.EnumCodeTypeHandler + +pipIrr: + global: + dev: true #鏄惁寮�鍙戦樁娈碉紝true鎴杅alse + dsName: ym #寮�鍙戦樁娈碉紝璁剧疆涓存椂鐨勬暟鎹簱鍚嶇О + mw: + webPort: 8070 + actutorPort: 9070 + idSuffix: 0 + sso: + cacheMaximumSize: 10000 #鐧诲綍鐢ㄦ埛缂撳瓨鍙紦瀛樼敤鎴风殑鏈�澶у�� + cacheDuration: 720 #缂撳瓨鐧诲綍鐢ㄦ埛鍙戝憜鏈�澶ф椂闀匡紙鍒嗛挓锛� + checkUrl: http://127.0.0.1:8079/sso/sso/ssoCheck + webPort: 8079 + actutorPort: 9079 + idSuffix: 1 + base: + webPort: 8080 + actutorPort: 9080 + idSuffix: 2 + remote: + webPort: 8081 + actutorPort: 9081 + idSuffix: 3 + statistics: + webPort: 8082 + actutorPort: 9082 + idSuffix: 4 + gis: + webPort: 8083 + actutorPort: 9083 + idSuffix: 5 + demo: + webPort: 8000 + actutorPort: 9000 + idSuffix: 99 + sell: + webPort: 8084 + actutorPort: 9084 + idSuffix: 6 + project: + webPort: 8085 + actutorPort: 9085 + idSuffix: 7 + irrigate: + webPort: 8086 + actutorPort: 9086 + idSuffix: 8 + wechat: + webPort: 8087 + actutorPort: 9087 + idSuffix: 9 + app: + webPort: 8088 + actutorPort: 9088 + idSuffix: 10 + operation: + webPort: 8089 + actutorPort: 9089 + idSuffix: 11 +#椤圭洰缂栧彿 +#projectCode: +# ym: 100 +# pj: 101 + +#椤圭洰閰嶇疆 +project: + #椤圭洰缂栫爜 + projectNo: 10 + #鎺у埗鍣ㄧ被鍨� + controllerType: 57 + #榛樿琛屾斂鍖哄垝缂栫爜锛堝ぉ娲�-澶╂触甯�-姝︽竻鍖�-浜花宸ヤ笟鍥�-澶х鑺傛按锛� + divisionCode: 120114403100 + + +#閫氳涓棿浠剁浉鍏抽厤缃� +#protocol: DYJS_2023,DYJS_2024 +mw: + #鍛戒护鍙戦�佸湴鍧�(涓紑鏄満鏋則ag锛屽叾涔熸槸鏁版嵁婧愬悗缂�鍚嶇О) + ym: + comSendUrl: "http://192.168.40.166:8070/rtuMw/com/send" + rtuLogFileUrl: "http://127.0.0.1:8070/rtuMw/com/rtuLogFile" + rtuLogTextUrl: "http://127.0.0.1:8070/rtuMw/com/rtuLogText" + pj: + comSendUrl: "http://127.0.0.1:8071/rtuMw/com/send" + rtuLogFileUrl: "http://127.0.0.1:8071/rtuMw/com/rtuLogFile" + rtuLogTextUrl: "http://127.0.0.1:8071/rtuMw/com/rtuLogText" + test: + comSendUrl: "http://127.0.0.1:8072/rtuMw/com/send" + rtuLogFileUrl: "http://127.0.0.1:8072/rtuMw/com/rtuLogFile" + rtuLogTextUrl: "http://127.0.0.1:8072/rtuMw/com/rtuLogText" + #鐩戞祴鎺у埗妯″潡鍥炶皟鍦板潃 + rtuCallbackUrl_rm: "http://127.0.0.1:8081/remote/comRes/receive" + #寰俊灏忕▼搴忓洖璋冨湴鍧� + rtuCallbackUrl_wx: "http://127.0.0.1:8087/wx/comRes/receive" + +#涓嶈繘琛寀serToken杩囨护鐨刄RL锛孈ConfigurationProperties瑕佹眰tokennofilter涓墍鏈夊瓧姣嶉兘灏忓啓 +tokennofilter: + urls: + - /sso/sso + - /remote/comRes/receive + - /wx/comRes/receive + - /app/captcha/get +#鑷姩缁熻閰嶇疆锛岃嚜鍔ㄧ粺璁″畾鏃朵换鍔′細姣忓ぉ瀹氭椂杩涜 +auto-statistics: + startHour: 0 #寮�濮嬪皬鏃� 0 + startMinute: 5 #寮�濮嬪垎閽� 5 + +#閽夐拤娑堟伅鎺ㄩ�� +dingtalk: + ym: + enable: true #鏄惁鍚敤 + robot: + url: https://oapi.dingtalk.com/robot/send + access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f + secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7 + at-all: true + mobile: 18602657034 + pj: + enable: true #鏄惁鍚敤 + robot: + url: https://oapi.dingtalk.com/robot/send + access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f + secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7 + at-all: true + mobile: 18602657034 + test: + enable: true #鏄惁鍚敤 + robot: + url: https://oapi.dingtalk.com/robot/send + access-token: fecef8e7725998f8912af05419580861aafc73413c4920036c07c050fa33055f + secret: SEC6042bc964d08899a5853eb321eb5a4d842a395982777f815bd07451c879228b7 + at-all: true + mobile: 18602657034 + +#闃�鎺у櫒鍙傛暟 +rtu: + batteryVolt: 17 + signalIntensity: + weak: 10 + ordinary: 20 +# strong: 20 + +#铏氭嫙鍗¢厤缃弬鏁� +vc: + #铏氭嫙鍗℃渶浣庝綑棰濇姤璀﹀�� + alarmValue: 10 \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml index 2c4c521..777fbf4 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml @@ -143,7 +143,7 @@ divisionCode: 120114403100 -#閫氳鍗忚 +#閫氳涓棿浠剁浉鍏抽厤缃� #protocol: DYJS_2023,DYJS_2024 mw: #鍛戒护鍙戦�佸湴鍧�(涓紑鏄満鏋則ag锛屽叾涔熸槸鏁版嵁婧愬悗缂�鍚嶇О) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml index 7245604..cbab066 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml @@ -217,7 +217,7 @@ con.protocol, inta.remarks, rtus.isOnLine, - (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) AS bindNumber, + (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND operateType = 1) AS bindNumber, con.findDt AS findDt FROM pr_controller con LEFT JOIN pr_intake_controller ic ON ic.controllerId = con.id @@ -243,7 +243,7 @@ AND rtus.isOnLine = #{isOnLine} </if> <if test = "bindNumber != null and bindNumber > 0"> - AND (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) = ${bindNumber} + AND (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND operateType = 1) = ${bindNumber} </if> </where> ORDER BY con.operateDt DESC @@ -264,6 +264,7 @@ SELECT tb.id id, tb.rtuAddr rtuAddr, tb.intakeId intakeId, + tb.findDt findDt, itb.name intakeName FROM pr_controller tb INNER JOIN pr_intake itb on tb.intakeId = itb.id diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml index 60412c5..61ec6b3 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml @@ -225,16 +225,25 @@ <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> SELECT COUNT(*) AS recordCount FROM pr_intake ge - INNER JOIN pr_divide divi ON ge.divideId = divi.id - INNER JOIN ba_block blo ON divi.blockId = blo.id - LEFT JOIN ba_district country ON ge.countyId = country.id - LEFT JOIN ba_district town ON ge.townId = town.id - LEFT JOIN ba_district village ON ge.villageId = village.id - LEFT JOIN pr_controller cont ON ge.id = cont.intakeId + INNER JOIN pr_divide divi ON ge.divideId = divi.id + INNER JOIN ba_block blo ON divi.blockId = blo.id + LEFT JOIN ba_district country ON ge.countyId = country.id + LEFT JOIN ba_district town ON ge.townId = town.id + LEFT JOIN ba_district village ON ge.villageId = village.id + LEFT JOIN pr_controller cont ON ge.id = cont.intakeId + left JOIN JSON_TABLE( + <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',--> + #{onLineMap}, + '$[*]' COLUMNS( + rtuAddr VARCHAR(20) PATH '$.rtuAddr', + isOnLine BOOLEAN PATH '$.isOnLine' + ) + ) rtus ON cont.rtuAddr = rtus.rtuAddr <where> ge.deleted = 0 - AND divi.deleted = 0 - and blo.deleted = 0 + AND divi.deleted = 0 + AND blo.deleted = 0 + AND cont.deleted = 0 <if test="intakeName != null and intakeName != ''"> AND ge.name LIKE CONCAT('%', #{intakeName}, '%') </if> @@ -257,6 +266,18 @@ </if> <if test="address != null and address != ''"> AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%') + </if> + <if test = "rtuAddr != null and rtuAddr !=''"> + AND cont.rtuAddr like CONCAT('%',#{rtuAddr},'%') + </if> + <if test="isOnLine != null and isOnLine !='' "> + AND rtus.isOnLine = #{isOnLine} + </if> + <if test="protocol != null and protocol !='' "> + AND cont.protocol = #{protocol} + </if> + <if test = "bindNumber != null and bindNumber > 0"> + AND (SELECT COUNT(*) FROM pr_intake_controller WHERE intakeId = ge.id AND operateType = 1) = ${bindNumber} </if> </where> </select> @@ -271,6 +292,10 @@ blo.`name` AS blockName, CAST(cont.id AS char) AS controllerId, cont.rtuAddr AS rtuAddr, + cont.protocol AS protocol, + cont.findDt AS findDt, + rtus.isOnLine AS isOnLine, + (SELECT COUNT(*) FROM pr_intake_controller WHERE intakeId = ge.id AND operateType = 1) AS bindNumber, ge.lng, ge.lat, ge.remarks, @@ -282,16 +307,25 @@ END) AS isBind, CONCAT(country.`name`, town.`name`, village.`name`) AS address FROM pr_intake ge - INNER JOIN pr_divide divi ON ge.divideId = divi.id - INNER JOIN ba_block blo ON divi.blockId = blo.id - LEFT JOIN ba_district country ON ge.countyId = country.id - LEFT JOIN ba_district town ON ge.townId = town.id - LEFT JOIN ba_district village ON ge.villageId = village.id - LEFT JOIN pr_controller cont ON ge.id = cont.intakeId + INNER JOIN pr_divide divi ON ge.divideId = divi.id + INNER JOIN ba_block blo ON divi.blockId = blo.id + LEFT JOIN ba_district country ON ge.countyId = country.id + LEFT JOIN ba_district town ON ge.townId = town.id + LEFT JOIN ba_district village ON ge.villageId = village.id + LEFT JOIN pr_controller cont ON ge.id = cont.intakeId + left JOIN JSON_TABLE( + <!--'[{"rtuAddr":"37142501020100215","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',--> + #{onLineMap}, + '$[*]' COLUMNS( + rtuAddr VARCHAR(20) PATH '$.rtuAddr', + isOnLine BOOLEAN PATH '$.isOnLine' + ) + ) rtus ON cont.rtuAddr = rtus.rtuAddr <where> ge.deleted = 0 - AND divi.deleted = 0 - and blo.deleted = 0 + AND divi.deleted = 0 + AND blo.deleted = 0 + AND cont.deleted = 0 <if test="intakeName != null and intakeName != ''"> AND ge.name LIKE CONCAT('%', #{intakeName}, '%') </if> @@ -315,6 +349,18 @@ <if test="address != null and address != ''"> AND CONCAT(country.`name`, town.`name`, village.`name`) LIKE CONCAT('%', #{address}, '%') </if> + <if test = "rtuAddr != null and rtuAddr !=''"> + AND cont.rtuAddr like CONCAT('%',#{rtuAddr},'%') + </if> + <if test="isOnLine != null and isOnLine !='' "> + AND rtus.isOnLine = #{isOnLine} + </if> + <if test="protocol != null and protocol !='' "> + AND cont.protocol = #{protocol} + </if> + <if test = "bindNumber != null and bindNumber > 0"> + AND (SELECT COUNT(*) FROM pr_intake_controller WHERE intakeId = ge.id AND operateType = 1) = ${bindNumber} + </if> </where> ORDER BY ge.operateDt DESC <trim prefix="limit "> diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml index 9c251e9..8559512 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOnHourReportLastMapper.xml @@ -428,9 +428,9 @@ <if test="timeStart != null and timeStart != '' "> OR rohrl.rtu_dt < #{timeStart} </if> - <if test="timeStop != null and timeStop != '' "> - OR rohrl.rtu_dt > #{timeStop} - </if> +<!-- <if test="timeStop != null and timeStop != '' ">--> +<!-- OR rohrl.rtu_dt > #{timeStop}--> +<!-- </if>--> ORDER BY rtu_dt ASC </select> <!--鑾峰彇鏈�杩戞湭鎶ユ暟鐨勫彇姘村彛--> @@ -446,9 +446,14 @@ <if test="timeStart != null"> OR rohrl.rtu_dt < #{timeStart} </if> - <if test="timeStop != null"> - OR rohrl.rtu_dt > #{timeStop} - </if> +<!-- <if test="timeStop != null">--> +<!-- OR rohrl.rtu_dt > #{timeStop}--> +<!-- </if>--> ORDER BY rtu_dt ASC + <trim prefix="limit "> + <if test="start != null and count != null"> + #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} + </if> + </trim> </select> </mapper> \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java index 04d21ae..55869f8 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/forTcp/TcpSessionCache.java @@ -124,6 +124,27 @@ return null ; } } + + /** + * 寰楀埌鎵�鏈夊湪绾夸笌绂荤嚎鏁伴噺缁熻 + * @return [0]=鍦ㄧ嚎鏁伴噺锛孾2]涓婄嚎杩囷紝浣嗗綋鍓嶇绾跨殑鏁伴噺 + */ + public static Integer[] allOnLineStateStatistics(){ + synchronized (sessionTable){ + Integer[] arr = new Integer[]{0, 0} ; + Iterator<Entry<String, TcpSession>> it = sessionTable.entrySet().iterator() ; + Entry<String, TcpSession> entry = null ; + while(it.hasNext()){ + entry = it.next() ; + if(entry.getValue().ioSession.isConnected()){ + arr[0]++ ; + }else{ + arr[1]++ ; + } + } + return arr ; + } + } /** * 寰楀埌鎵�鏈夊湪绾挎儏鍐� diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java index 5b498e3..927c1b0 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java @@ -23,6 +23,8 @@ return this.clock(com) ; }else if(code.equals(CodeLocal.onLine)){ return this.onLine(com) ; + }else if(code.equals(CodeLocal.onLineStatistics)){ + return this.onLineStateStatistics(com) ; }else if(code.equals(CodeLocal.allProtocols)){ return this.allProtocols(com) ; }else if(code.equals(CodeLocal.stopTcpSv)){ @@ -54,6 +56,15 @@ } /** + * 缁熻鍦ㄧ嚎涓庝笉鍦ㄧ嚎鎯呭喌 + * @throws Exception + */ + private Command onLineStateStatistics(Command command) throws Exception{ + RtuOnLineStateStatisticsVo vo = new RtuOnLineStateStatisticsDeal().deal() ; + return ReturnCommand.successed("鏌ヨ鎵�鏈夋祴绔欏湪绾挎儏鍐电粨鏋�", command.getId(), command.getCode(), vo) ; + } + + /** * 鏌ヨ鎵�鏈塕TU鍗忚閰嶇疆 * @throws Exception */ diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/CodeLocal.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/CodeLocal.java index 2c3e0fa..8629628 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/CodeLocal.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/CodeLocal.java @@ -5,7 +5,9 @@ public static final String clock = "LCD0000" ;//鏌ヨ鐩戞帶涓棿浠舵椂閽� public static final String onLine = "LCD0001" ;//鏌ヨ鎵�鏈塕TU鍦ㄧ嚎鎯呭喌 - + + public static final String onLineStatistics = "LCD0002" ;//鏌ヨ鎵�鏈塕TU鍦ㄧ嚎鎯呭喌 + public static final String allProtocols = "LCD0100" ;//鏌ヨ鎵�鏈夊崗璁厤缃� public static final String stopTcpSv = "LCD0110" ;//鍋滄TCP鏈嶅姟锛屼笉鍐嶆帴鍏ユ柊鐨凾CP杩炴帴锛屽凡缁廡CP杩炴帴鐨勫叏閮ㄦ柇杩炴帴 diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsDeal.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsDeal.java new file mode 100644 index 0000000..839f366 --- /dev/null +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsDeal.java @@ -0,0 +1,22 @@ +package com.dy.rtuMw.server.local.localProtocol; + +import com.dy.rtuMw.server.forTcp.TcpSessionCache; + +/** + * @Author: liurunyu + * @Date: 2024/10/15 15:56 + * @Description + */ +public class RtuOnLineStateStatisticsDeal { + + /** + * 缁熻鍦ㄧ嚎涓庝笉鍦ㄧ嚎鎯呭喌 + */ + public RtuOnLineStateStatisticsVo deal(){ + RtuOnLineStateStatisticsVo vo = new RtuOnLineStateStatisticsVo() ; + Integer[] onOff = TcpSessionCache.allOnLineStateStatistics() ; + vo.onLineNum = onOff[0] ; + vo.offLineNum = onOff[1] ; + return vo ; + } +} diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsVo.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsVo.java new file mode 100644 index 0000000..f387280 --- /dev/null +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/localProtocol/RtuOnLineStateStatisticsVo.java @@ -0,0 +1,27 @@ +package com.dy.rtuMw.server.local.localProtocol; + +/** + * @Author: liurunyu + * @Date: 2024/10/15 15:56 + * @Description + */ +public class RtuOnLineStateStatisticsVo { + public Integer onLineNum; + public Integer offLineNum; + + public Integer getOnLineNum() { + return onLineNum; + } + + public void setOnLineNum(Integer onLineNum) { + this.onLineNum = onLineNum; + } + + public Integer getOffLineNum() { + return offLineNum; + } + + public void setOffLineNum(Integer offLineNum) { + this.offLineNum = offLineNum; + } +} diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java index fbefd1c..7f81a42 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java @@ -12,6 +12,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.util.Date; + /** * @Author liurunyu * @Date 2024/2/28 16:31 @@ -56,6 +58,15 @@ * @param dataCdC0Vo 寮�闃�涓婃姤鏁版嵁瀵硅薄 */ private void doDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { + Date findDt = controller.getFindDt() ;//鍙戠幇姝ゆ帶鍒跺櫒鐨勬棩鏈熶笌鏃堕棿 + if(findDt != null){ + String findDtStr = DateTime.yyyy_MM_dd(findDt) ; + if(findDtStr.equals(DateTime.yyyy_MM_dd())){ + //褰撳ぉ鍙戠幇鎺у埗鍣紝鎺у埗鍣ㄨ绠楃殑婕忔崯閲忎竴瀹氫笉姝g‘锛屽己鍒惰缃垚0 + dataCdC0Vo.lossAmount = 0.0 ; + } + } + RmLossDayLast poLast = sv.getRmLossLast(controller.getIntakeId()); if (poLast == null) { //鏁版嵁搴撲腑涓嶅瓨鍦ㄨ鍙栨按鍙g殑婕忔崯鏁版嵁 diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java index e8b00e6..90fbbba 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java @@ -244,13 +244,13 @@ @SsoAop() public BaseResponse<Boolean> changePassword(String id, String oldPassword, String newPassword) throws Exception { if (id == null) { - return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖"); + return BaseResponseUtils.buildErrorMsg("id涓嶈兘涓虹┖"); } if (StringUtils.isNullOrEmpty(oldPassword)) { - return BaseResponseUtils.buildFail("鏃у瘑鐮佷笉鑳戒负绌�"); + return BaseResponseUtils.buildErrorMsg("鏃у瘑鐮佷笉鑳戒负绌�"); } if (StringUtils.isNullOrEmpty(newPassword)) { - return BaseResponseUtils.buildFail("鏂板瘑鐮佷笉鑳戒负绌�"); + return BaseResponseUtils.buildErrorMsg("鏂板瘑鐮佷笉鑳戒负绌�"); } /* 濡傛灉鍓嶇杩涜浜哹ase64鍔犲瘑 @@ -265,10 +265,10 @@ try { BaUser po = this.sv.selectById(idLg); if (Objects.isNull(po)) { - return BaseResponseUtils.buildFail("鏈緱鍒扮敤鎴凤紝璇锋眰澶辫触"); + return BaseResponseUtils.buildErrorMsg("鏈緱鍒扮敤鎴凤紝璇锋眰澶辫触"); } else { if (!po.password.equalsIgnoreCase(oldPassword)) { - return BaseResponseUtils.buildFail("鏃у瘑鐮佷笉姝g‘锛岃姹傚け璐�"); + return BaseResponseUtils.buildErrorMsg("鏃у瘑鐮佷笉姝g‘锛岃姹傚け璐�"); } else { count = this.sv.changePassword(idLg, newPassword); } @@ -278,7 +278,7 @@ return BaseResponseUtils.buildException(e.getMessage()); } if (count <= 0) { - return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + return BaseResponseUtils.buildErrorMsg("鏁版嵁搴撳瓨鍌ㄥけ璐�"); } else { return BaseResponseUtils.buildSuccess(true); } diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java index f35f3f1..016a084 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java @@ -58,6 +58,7 @@ private Environment env = null; private String pro_mw = "mw"; private String key_mw = "comSendUrl"; + @Autowired public IntakeSv(Environment env) { this.env = env; @@ -85,7 +86,7 @@ Integer addIntake(PrIntake po) { Long villageId = Optional.ofNullable(po.getVillageId()).orElse(0L); - if (villageId != 0){ + if (villageId != 0) { if (po.getTownId() == null || po.getTownId() == 0) { Long townId = getSupperByVillageId(po.getVillageId()); po.setTownId(townId); @@ -133,21 +134,41 @@ * @return 鍙栨按鍙h褰曞垪琛� */ public QueryResultVo<List<VoIntake>> getIntakes(QueryVo queryVo) { -// String isBinded = queryVo.getIsBinded(); -// -// if(isBinded == null || isBinded.length() <= 0) { -// -// } + Command com = new Command(); + com.id = Command.defaultId; + com.code = "LCD0001"; + com.type = "innerCommand"; + comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); + BaseResponse baseResponse = sendCom2Mw(com); + JSONObject response = (JSONObject) JSON.toJSON(baseResponse); - Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); - Long itemTotal = prIntakeMapper.getRecordCount(params); + if (response != null && response.getString("code").equals("0001")) { + JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap"); + HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class); - QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>(); - rsVo.pageSize = queryVo.pageSize; - rsVo.pageCurr = queryVo.pageCurr; - rsVo.calculateAndSet(itemTotal, params); - rsVo.obj = prIntakeMapper.getIntakes(params); - return rsVo; + JSONArray jsonArray = new JSONArray(); + for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("rtuAddr", entry.getKey()); + jsonObject.put("isOnLine", entry.getValue()); + jsonArray.add(jsonObject); + } + + queryVo.setOnLineMap(jsonArray.toJSONString()); + + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); + Long itemTotal = prIntakeMapper.getRecordCount(params); + + QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>(); + rsVo.pageSize = queryVo.pageSize; + rsVo.pageCurr = queryVo.pageCurr; + rsVo.calculateAndSet(itemTotal, params); + rsVo.obj = prIntakeMapper.getIntakes(params); + return rsVo; + } else { + QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>(); + return rsVo; + } } /** @@ -226,17 +247,18 @@ /** * 鑾峰彇鍙栨按鍙e垪琛� + * * @return */ public QueryResultVo<List<VoOnLineIntake>> selectOnLineIntakes(OnLineIntakesQO qo) { - Command com = new Command() ; + Command com = new Command(); com.id = Command.defaultId; com.code = "LCD0001"; com.type = "innerCommand"; comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw); JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com)); - if(response != null && response.getString("code").equals("0001")) { + if (response != null && response.getString("code").equals("0001")) { JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap"); HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class); @@ -249,12 +271,12 @@ } qo.setOnLineMap(jsonArray.toJSONString()); - Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ; + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); Long itemTotal = prIntakeMapper.getOnLineIntakesCount(params); - QueryResultVo<List<VoOnLineIntake>> rsVo = new QueryResultVo<>() ; - rsVo.pageSize = qo.pageSize ; - rsVo.pageCurr = qo.pageCurr ; + QueryResultVo<List<VoOnLineIntake>> rsVo = new QueryResultVo<>(); + rsVo.pageSize = qo.pageSize; + rsVo.pageCurr = qo.pageCurr; rsVo.calculateAndSet(itemTotal, params); rsVo.obj = prIntakeMapper.getOnLineIntakes(params); return rsVo; @@ -266,17 +288,18 @@ /** * 鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛 + * * @param operator * @return */ public List<VoOnLineIntake> getUsedIntakes(Long operator) { - Command com = new Command() ; + Command com = new Command(); com.id = Command.defaultId; com.code = "LCD0001"; com.type = "innerCommand"; JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com)); - if(response != null && response.getString("code").equals("0001")) { + if (response != null && response.getString("code").equals("0001")) { JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap"); HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class); @@ -295,9 +318,10 @@ /** * 鍙戦�佸懡浠� + * * @return */ - protected BaseResponse sendCom2Mw(Command com){ + protected BaseResponse sendCom2Mw(Command com) { String url = UriComponentsBuilder.fromUriString(comSendUrl) .build() .toUriString(); @@ -316,6 +340,7 @@ /** * 鍙栨按鍙e悕绉版崲鍙栨按鍙D锛岄獙璇佹槸鍚﹂噸澶嶅悕绉颁娇鐢� + * * @param intakeName * @return */ @@ -325,6 +350,7 @@ /** * 鍙栨按鍙e悕绉版崲鍙栨按鍙D锛岄獙璇佹槸鍚﹂噸澶嶅悕绉颁娇鐢� + * * @param intakeName * @return */ diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java index e56ba28..d12f140 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java @@ -2,6 +2,8 @@ import com.dy.common.webUtil.QueryConditionVo; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; import lombok.*; /** @@ -34,4 +36,25 @@ @Schema(description = "鍦板潃") public String address; + + @Schema(description = "鎺у埗鍣ㄥ湴鍧�") + private String rtuAddr; + + /** + * 涓棿浠惰繑鍥炵殑RTU鍦ㄧ嚎鎯呭喌瀵硅薄鏁扮粍 + */ + private String onLineMap; + + /** + * 鏄惁鍦ㄧ嚎 + */ + @Max(value = 1,message = "鏄惁鍦ㄧ嚎浠呭厑璁镐负鐪熸垨鍋�") + @Min(value = 0,message = "鏄惁鍦ㄧ嚎浠呭厑璁镐负鐪熸垨鍋�") + private Boolean isOnLine; + + @Schema(description = "閫氫俊鍗忚") + private String protocol; + + @Schema(description = "缁戝畾娆℃暟") + public Integer bindNumber; } diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java index 5c481f2..9e38b46 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java @@ -311,7 +311,7 @@ pct.setFindDt(new Date()); Integer rows = intakeControllerSv.addTrampController(pct); if (rows == 0) { - return BaseResponseUtils.buildFail(ProjectResultCode.ADD_TRAMP_CONTROLLER_FAIL.getMessage()); + return BaseResponseUtils.buildErrorMsg(ProjectResultCode.ADD_TRAMP_CONTROLLER_FAIL.getMessage()); } return BaseResponseUtils.buildSuccess(true); } @@ -328,12 +328,12 @@ public BaseResponse<Boolean> deleteTrampController(Long id) { PrControllerTramp controllerInfo = intakeControllerSv.getTrampControllerInfo(id); if (controllerInfo == null) { - return BaseResponseUtils.buildFail(ProjectResultCode.NO_EXIST_TRAMP_CONTROLLER.getMessage()); + return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_EXIST_TRAMP_CONTROLLER.getMessage()); } Integer rows = intakeControllerSv.deleteTrampController(id); if (rows == 0) { - return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage()); + return BaseResponseUtils.buildErrorMsg(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage()); } return BaseResponseUtils.buildSuccess(true); } @@ -351,7 +351,7 @@ Integer rows = intakeControllerSv.emptyTrampController(); if (rows == 0) { - return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage()); + return BaseResponseUtils.buildErrorMsg(ProjectResultCode.DELETE_TRAMP_CONTROLLER_FAIL.getMessage()); } return BaseResponseUtils.buildSuccess(true); } -- Gitblit v1.8.0