From a5e68895029a10d6134df9d13c6925c752bf1f7b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 08 一月 2024 13:10:44 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml | 188 ++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowSv.java | 42
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterCtrl.java | 101 +
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java | 195 ++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java | 48
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoFlowmeter.java | 62
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wallet/WalletCtrl.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoMoniFlow.java | 52
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java | 60
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java | 5
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java | 3
pipIrr-platform/.idea/vcs.xml | 6
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/QueryVo.java | 26
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoToDividePojo.java | 32
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/result/ProjectResultCode.java | 36
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java | 61
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml | 185 ++
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java | 11
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowMonitoringMapper.java | 38
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowmeterMapper.java | 38
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToMoniFlowPojo.java | 23
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java | 155 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java | 6
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java | 8
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeControllerMapper.java | 55
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowMonitoring.java | 111 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrMonitoringFlowmeter.java | 87 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml | 174 ++
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoToPojo.java | 24
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java | 20
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowCtrl.java | 139 +
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java | 11
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntakeController.java | 92 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoController.java | 42
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoController.java | 53
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java | 3
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java | 3
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java | 23
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoToPojo.java | 23
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerSv.java | 62
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrDivide.java | 4
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java | 29
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToFlowmeterPojo.java | 25
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrController.java | 40
pipIrr-platform/.idea/.gitignore | 8
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java | 263 +++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntake.java | 125 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java | 3
pipIrr-platform/.idea/misc.xml | 11
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowmeter.java | 100 +
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerSv.java | 70
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java | 64
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java | 88 +
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringCtrl.java | 117 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoFlowMonitoring.java | 40
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/divide/DivideCtrl.java | 11
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockCtrl.java | 11
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java | 142 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrMonitoringFlowmeterMapper.xml | 146 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml | 122 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 291 ++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrControllerMapper.java | 42
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java | 23
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoDivide.java | 96 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrMonitoringFlowmeterMapper.java | 33
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/QueryVo.java | 30
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoIntakeController.java | 48
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java | 3
68 files changed, 4,168 insertions(+), 122 deletions(-)
diff --git a/pipIrr-platform/.idea/.gitignore b/pipIrr-platform/.idea/.gitignore
new file mode 100644
index 0000000..2dc1dfd
--- /dev/null
+++ b/pipIrr-platform/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/../../../../../:\javaWorkspaces\pipIrr\pipIrr-platform\.idea/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/pipIrr-platform/.idea/misc.xml b/pipIrr-platform/.idea/misc.xml
new file mode 100644
index 0000000..d94cfc2
--- /dev/null
+++ b/pipIrr-platform/.idea/misc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="MavenProjectsManager">
+ <option name="originalFiles">
+ <list>
+ <option value="$PROJECT_DIR$/pom.xml" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="20" project-jdk-type="JavaSDK" />
+</project>
\ No newline at end of file
diff --git a/pipIrr-platform/.idea/vcs.xml b/pipIrr-platform/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/pipIrr-platform/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrControllerMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrControllerMapper.java
index bf30cae..9d2a020 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrControllerMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrControllerMapper.java
@@ -2,12 +2,17 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoPr.PrController;
+import com.dy.pipIrrGlobal.voPr.VoController;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
/**
* @author ZhuBaoMin
* @date 2023-12-29 9:59
- * @LastEditTime 2023-12-29 9:59
+ * @LastEditTime 2024-01-02 16:22
* @Description
*/
@@ -24,4 +29,39 @@
int updateByPrimaryKeySelective(PrController record);
int updateByPrimaryKey(PrController record);
+
+ /**
+ * 鏍规嵁鎸囧畾鑾峰彇鎺у埗鍣ㄨ褰曟暟
+ * @param params
+ * @return
+ */
+ Long getRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鑾峰彇鎺у埗鍣ㄨ褰�
+ * @param params
+ * @return
+ */
+ List<VoController> getControllers(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨帶鍒跺櫒鍒楄〃
+ * @param controllerCode
+ * @return
+ */
+ List<Map<String, Object>> getControllersByCode(@Param("controllerCode") String controllerCode);
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙烽�昏緫鍒犻櫎鎺у埗
+ * @param controllerId
+ * @return
+ */
+ Integer deleteControllerById(@Param("controllerId") Long controllerId);
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨湭鍒犻櫎鐨勬帶鍒跺櫒鏁伴噺
+ * @param controllerId
+ * @return
+ */
+ Integer getRecordCountOfController(@Param("controllerId") Long controllerId);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowMonitoringMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowMonitoringMapper.java
new file mode 100644
index 0000000..1c33361
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowMonitoringMapper.java
@@ -0,0 +1,38 @@
+package com.dy.pipIrrGlobal.daoPr;
+
+import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-04 16:02
+ * @LastEditTime 2024-01-04 16:02
+ * @Description
+ */
+public interface PrFlowMonitoringMapper {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(PrFlowMonitoring record);
+
+ int insertSelective(PrFlowMonitoring record);
+
+ PrFlowMonitoring selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(PrFlowMonitoring record);
+
+ int updateByPrimaryKey(PrFlowMonitoring record);
+
+ /**
+ * 鏍规嵁鐩戞祴绔欑紪鍙峰垹闄ょ洃娴嬬珯
+ * @param flowMonitoringId
+ * @return
+ */
+ Integer deleteFlowMonitoringById(@Param("flowMonitoringId") Long flowMonitoringId);
+
+ /**
+ * 鏍规嵁鐩戞祴绔欑紪鍙疯幏鍙栨湭鍒犻櫎鐨勭洃娴嬬珯鏁伴噺
+ * @param flowMonitoringId
+ * @return
+ */
+ Integer getRecordCountOfFlowMonitoring(@Param("flowMonitoringId") Long flowMonitoringId);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowmeterMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowmeterMapper.java
new file mode 100644
index 0000000..e4a7ada
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrFlowmeterMapper.java
@@ -0,0 +1,38 @@
+package com.dy.pipIrrGlobal.daoPr;
+
+import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 9:04
+ * @LastEditTime 2024-01-05 9:04
+ * @Description
+ */
+public interface PrFlowmeterMapper {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(PrFlowmeter record);
+
+ int insertSelective(PrFlowmeter record);
+
+ PrFlowmeter selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(PrFlowmeter record);
+
+ int updateByPrimaryKey(PrFlowmeter record);
+
+ /**
+ * 鎹紪鍙峰垹闄ゆ祦閲忚
+ * @param flowmeterId
+ * @return
+ */
+ Integer deleteFlowmeterById(@Param("flowmeterId") Long flowmeterId);
+
+ /**
+ * 鏍规嵁娴侀噺璁$紪鍙疯幏鍙栨湭鍒犻櫎鐨勬祦閲忚鏁伴噺
+ * @param flowmeterId
+ * @return
+ */
+ Integer getRecordCountOfFlowmeter(@Param("flowmeterId") Long flowmeterId);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeControllerMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeControllerMapper.java
new file mode 100644
index 0000000..bf71fdc
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeControllerMapper.java
@@ -0,0 +1,55 @@
+package com.dy.pipIrrGlobal.daoPr;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrIntakeController;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 9:16
+ * @LastEditTime 2024-01-02 9:16
+ * @Description
+ */
+
+@Mapper
+public interface PrIntakeControllerMapper extends BaseMapper<PrIntakeController> {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(PrIntakeController record);
+
+ int insertSelective(PrIntakeController record);
+
+ PrIntakeController selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(PrIntakeController record);
+
+ int updateByPrimaryKey(PrIntakeController record);
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙枫�佹帶鍒跺櫒缂栧彿銆佹搷浣滅被鍒幏鍙栬褰曟暟閲�
+ * 閲嶅缁戝畾銆侀噸澶嶈В缁戦兘鐢ㄨ鏂规硶鍒ゆ柇
+ * @param intakeId 鍙栨按鍙D
+ * @param controllerId 鎺у埗鍣↖D
+ * @param operateType 鎿嶄綔绫诲瀷 1-鎹嗙粦锛�2-瑙g粦
+ * @return 濡備綍鏉′欢璁板綍鏁�
+ */
+ Integer getBindRecordCount(@Param("intakeId") Long intakeId, @Param("controllerId") Long controllerId, @Param("operateType") Byte operateType);
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�
+ * @param intakeId 鍙栨按鍙g紪鍙�
+ * @return 鍙栨按鍙d笌鎺у埗鍣ㄧ粦瀹氬垪琛�
+ */
+ List<Map<String, Object>> getBindsByIntakeId(@Param("intakeId") Long intakeId);
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�
+ * @param controllerId 鎺у埗鍣ㄧ紪鍙�
+ * @return 鍙栨按鍙d笌鎺у埗鍣ㄧ粦瀹氬垪琛�
+ */
+ List<Map<String, Object>> getBindsByControllerId(@Param("controllerId") Long controllerId);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java
new file mode 100644
index 0000000..753a980
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java
@@ -0,0 +1,88 @@
+package com.dy.pipIrrGlobal.daoPr;
+
+
+import com.dy.pipIrrGlobal.pojoPr.PrIntake;
+import com.dy.pipIrrGlobal.voPr.VoIntake;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wuzeyu
+ * @date 2023/12/26 13:56
+ * @LastEditTime 2023/12/26 13:56
+ * @Description
+ */
+@Mapper
+public interface PrIntakeMapper {
+
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
+ PrIntake selectByPrimaryKey(Long id);
+
+ /**
+ * 寰楀埌鍏ㄩ儴瀹炰綋
+ * @return 鍏ㄩ儴瀹炰綋
+ * */
+ List<PrIntake> selectAll();
+
+ /**
+ * 閫昏緫鍒犻櫎
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteLogicById(Long id);
+
+ /**
+ * 瀹為檯鍒犻櫎
+ * @param id primaryKey
+ * @return deleteCount
+ */
+ int deleteByPrimaryKey(Long id);
+
+ int insert(PrIntake record);
+
+ int insertSelective(PrIntake record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(PrIntake record);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(PrIntake record);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰曟暟
+ * @param params
+ * @return
+ */
+ Long getRecordCount(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰�
+ * @param params
+ * @return
+ */
+ List<VoIntake> getIntakes(Map<?, ?> params);
+
+ Long getSupperByVillageId(long vaId);
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栨湭鍒犻櫎鐨勫彇姘村彛鏁伴噺
+ * @param intakeId
+ * @return
+ */
+ Integer getRecordCountOfIntake(@Param("intakeId") Long intakeId);
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrMonitoringFlowmeterMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrMonitoringFlowmeterMapper.java
new file mode 100644
index 0000000..f6cdffd
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrMonitoringFlowmeterMapper.java
@@ -0,0 +1,33 @@
+package com.dy.pipIrrGlobal.daoPr;
+
+import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 10:18
+ * @LastEditTime 2024-01-05 10:18
+ * @Description
+ */
+public interface PrMonitoringFlowmeterMapper {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(PrMonitoringFlowmeter record);
+
+ int insertSelective(PrMonitoringFlowmeter record);
+
+ PrMonitoringFlowmeter selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(PrMonitoringFlowmeter record);
+
+ int updateByPrimaryKey(PrMonitoringFlowmeter record);
+
+ /**
+ * 鏍规嵁娴侀噺鐩戞祴绔欍�佹祦閲忚銆佹搷浣滅被鍨嬭幏鍙栬褰曟暟閲�
+ * @param monitoringId 鐩戞祴绔欑紪鍙�
+ * @param flowmeterId 娴侀噺璁$紪鍙�
+ * @param operateType 鎿嶄綔绫诲瀷 1-鎹嗙粦锛�2-瑙g粦
+ * @return 绗﹀悎鏉′欢璁板綍鏁伴噺
+ */
+ Integer getBindRecordCount(@Param("monitoringId") Long monitoringId, @Param("flowmeterId") Long flowmeterId, @Param("operateType") Byte operateType);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrController.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrController.java
index 481982a..37884d4 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrController.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrController.java
@@ -35,50 +35,62 @@
public static final long serialVersionUID = 1L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
@Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Long id;
/**
- * 缂栧彿
- */
+ * 缂栧彿
+ */
@Schema(description = "缂栧彿", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "鎺у埗鍣ㄧ紪鍙蜂笉鑳戒负绌�")
@Length(message = "鎺у埗鍣ㄧ紪鍙蜂笉澶т簬{max}瀛�",max = 25)
private String code;
/**
- * 閫氳鍗忚
- */
+ * 閫氳鍗忚
+ */
@Schema(description = "閫氳鍗忚", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "閫氳鍗忚涓嶈兘涓虹┖")
@Length(message = "閫氳鍗忚涓嶅ぇ浜巤max}瀛�",max = 25)
private String protocol;
/**
- * 娣诲姞鏂瑰紡;1-绯荤粺鑷姩锛�2-鎵嬪姩
- */
+ * 鍦ㄧ嚎鐘舵��;1-鍦ㄧ嚎锛�2-绂荤嚎
+ */
+ @Schema(description = "鍦ㄧ嚎鐘舵��", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte onlinestate;
+
+ /**
+ * 鏈�杩戜笂鎶ユ椂闂�
+ */
+ @Schema(description = "鏈�杩戜笂鎶ユ椂闂�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date reporttime;
+
+ /**
+ * 娣诲姞鏂瑰紡;1-绯荤粺鑷姩锛�2-鎵嬪姩
+ */
@Schema(description = "娣诲姞鏂瑰紡", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Byte addways;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
/**
- * 閫昏緫鍒犻櫎鏍囪瘑;0-鏈垹闄わ紝1-鍒犻櫎
- */
+ * 閫昏緫鍒犻櫎鏍囪瘑;0-鏈垹闄わ紝1-鍒犻櫎
+ */
@Schema(description = "鍒犻櫎鏍囪瘑", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Byte deleted;
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrDivide.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrDivide.java
index 6d2dec4..e46bbfc 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrDivide.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrDivide.java
@@ -47,7 +47,6 @@
*/
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@Schema(description = "鎵�鍦ㄥ幙ID", requiredMode = Schema.RequiredMode.REQUIRED)
- //@NotEmpty(message = "鎵�鍦ㄥ幙涓嶈兘涓虹┖")
private Long countyid;
/**
@@ -55,7 +54,6 @@
*/
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@Schema(description = "鎵�鍦ㄩ晣ID", requiredMode = Schema.RequiredMode.REQUIRED)
- //@NotEmpty(message = "鎵�鍦ㄩ晣涓嶈兘涓虹┖")
private Long townid;
/**
@@ -63,7 +61,7 @@
*/
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@Schema(description = "鎵�鍦ㄦ潙ID", requiredMode = Schema.RequiredMode.REQUIRED)
- //@NotEmpty(message = "鎵�鍦ㄦ潙涓嶈兘涓虹┖")
+ @NotNull(message = "鎵�鍦ㄦ潙涓嶈兘涓虹┖")
private Long villageid;
/**
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowMonitoring.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowMonitoring.java
new file mode 100644
index 0000000..1ca4c29
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowMonitoring.java
@@ -0,0 +1,111 @@
+package com.dy.pipIrrGlobal.pojoPr;
+
+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.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.*;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-04 16:02
+ * @LastEditTime 2024-01-04 16:02
+ * @Description
+ */
+
+@TableName(value="pr_flow_monitoring", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "娴侀噺鐩戞祴绔欏疄浣�")
+public class PrFlowMonitoring implements BaseEntity {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 鎵�鍦ㄥ幙
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄥ幙ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ private Long countyid;
+
+ /**
+ * 鎵�鍦ㄩ晣
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄩ晣ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ private Long townid;
+
+ /**
+ * 鎵�鍦ㄦ潙
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄦ潙ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎵�鍦ㄦ潙涓嶈兘涓虹┖")
+ private Long villageid;
+
+ /**
+ * 鐩戞祴绔欏悕绉�
+ */
+ @Schema(description = "鐩戞祴绔欏悕绉�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "鐩戞祴绔欏悕绉颁笉鑳戒负绌�")
+ @Length(message = "鐩戞祴绔欏悕绉颁笉澶т簬{max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 25)
+ private String name;
+
+ /**
+ * 缁忓害
+ */
+ @Schema(description = "缁忓害", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "缁忓害涓嶈兘涓虹┖")
+ private Double lng;
+
+ /**
+ * 绾害
+ */
+ @Schema(description = "缁忓害", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "缁忓害涓嶈兘涓虹┖")
+ private Double lat;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞涓嶅ぇ浜巤max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鎿嶄綔浜虹紪鍙蜂笉鑳戒负绌�")
+ private Long operator;
+
+ /**
+ * 鎿嶄綔鏃堕棿
+ */
+ @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date operatedt;
+
+ /**
+ * 閫昏緫鍒犻櫎鏍囪瘑;0-鏈垹闄わ紝1-鍒犻櫎
+ */
+ @Schema(description = "鍒犻櫎鏍囪瘑", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte deleted;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowmeter.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowmeter.java
new file mode 100644
index 0000000..cdb8538
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrFlowmeter.java
@@ -0,0 +1,100 @@
+package com.dy.pipIrrGlobal.pojoPr;
+
+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.NotBlank;
+import lombok.*;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 9:04
+ * @LastEditTime 2024-01-05 9:04
+ * @Description
+ */
+
+@TableName(value="pr_flowmeter", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "娴侀噺璁″疄浣�")
+public class PrFlowmeter implements BaseEntity {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 娴侀噺璁$紪鍙�
+ */
+ @Schema(description = "娴侀噺璁$紪鍙�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "娴侀噺璁$紪鍙蜂笉鑳戒负绌�")
+ @Length(message = "娴侀噺璁$紪鍙蜂笉澶т簬{max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 25)
+ private String code;
+
+ /**
+ * 閫氳鍗忚
+ */
+ @Schema(description = "閫氳鍗忚", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "閫氳鍗忚涓嶈兘涓虹┖")
+ @Length(message = "閫氳鍗忚涓嶅ぇ浜巤max}瀛�",max = 25)
+ private String protocol;
+
+ /**
+ * 鍦ㄧ嚎鐘舵��;1-鍦ㄧ嚎锛�2-绂荤嚎
+ */
+ @Schema(description = "鍦ㄧ嚎鐘舵��", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte onlinestate;
+
+ /**
+ * 鏈�杩戜笂鎶ユ椂闂�
+ */
+ @Schema(description = "鏈�杩戜笂鎶ユ椂闂�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date reporttime;
+
+ /**
+ * 娣诲姞鏂瑰紡;1-绯荤粺鑷姩锛�2-鎵嬪姩
+ */
+ @Schema(description = "娣诲姞鏂瑰紡", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte addways;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long operator;
+
+ /**
+ * 鎿嶄綔鏃堕棿
+ */
+ @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date operatedt;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞涓嶅ぇ浜巤max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 閫昏緫鍒犻櫎鏍囪瘑;0-鏈垹闄わ紝1-鍒犻櫎
+ */
+ @Schema(description = "鍒犻櫎鏍囪瘑", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte deleted;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntake.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntake.java
new file mode 100644
index 0000000..92a4428
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntake.java
@@ -0,0 +1,125 @@
+package com.dy.pipIrrGlobal.pojoPr;
+
+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.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.*;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 鍙栨按鍙h〃
+ */
+
+@TableName(value = "pr_intake", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙e疄浣�")
+public class PrIntake implements BaseEntity {
+ public static final long serialVersionUID = 202312260931001L;
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 鎵�鍦ㄥ幙
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄥ幙ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ //@NotEmpty(message = "鎵�鍦ㄥ幙涓嶈兘涓虹┖")
+ private Long countyId;
+
+ /**
+ * 鎵�鍦ㄩ晣
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄩ晣ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ //@NotEmpty(message = "鎵�鍦ㄩ晣涓嶈兘涓虹┖")
+ private Long townId;
+
+ /**
+ * 鎵�鍦ㄦ潙
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄦ潙ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ //@NotEmpty(message = "鎵�鍦ㄦ潙涓嶈兘涓虹┖")
+ private Long villageId;
+
+ /**
+ * 鎵�鍦ㄥ垎姘村彛
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄥ垎姘村彛ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎵�鍦ㄥ垎姘村彛涓嶈兘涓虹┖")
+ private Long divideId;
+
+ /**
+ * 鎵�鍦ㄧ墖鍖�
+ */
+ @JSONField(serializeUsing = ObjectWriterImplToString.class)
+ @Schema(description = "鎵�鍦ㄧ墖鍖篒D", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎵�鍦ㄧ墖鍖轰笉鑳戒负绌�")
+ private Long blockId;
+
+ /**
+ * 鍙栨按鍙e悕绉�
+ */
+ @Schema(description = "鍙栨按鍙e悕绉�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "鍙栨按鍙e悕绉颁笉鑳戒负绌�")
+ @Length(message = "鍙栨按鍙e悕绉颁笉澶т簬{max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 25)
+ private String name;
+
+ /**
+ * 缁忓害
+ */
+ @Schema(description = "缁忓害", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "缁忓害涓嶈兘涓虹┖")
+ private Double lng;
+
+ /**
+ * 绾害
+ */
+ @Schema(description = "缁忓害", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "缁忓害涓嶈兘涓虹┖")
+ private Double lat;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞涓嶅ぇ浜巤max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鎿嶄綔浜虹紪鍙蜂笉鑳戒负绌�")
+ private Long operator;
+
+ /**
+ * 鎿嶄綔鏃堕棿
+ */
+ @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date operateDt;
+
+ /**
+ * 閫昏緫鍒犻櫎鏍囪瘑;0-鏈垹闄わ紝1-鍒犻櫎
+ */
+ @Schema(description = "鍒犻櫎鏍囪瘑", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte deleted;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntakeController.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntakeController.java
new file mode 100644
index 0000000..745a435
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrIntakeController.java
@@ -0,0 +1,92 @@
+package com.dy.pipIrrGlobal.pojoPr;
+
+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.Max;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 9:16
+ * @LastEditTime 2024-01-02 9:16
+ * @Description
+ */
+
+/**
+ * 鍙栨按鍙f崋缁戣〃
+ */
+
+@TableName(value="pr_intake_controller", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍙栨按鍙f崋缁戝疄浣�")
+public class PrIntakeController implements BaseEntity {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 鍙栨按鍙g紪鍙�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "鍙栨按鍙D", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鍙栨按鍙D涓嶈兘涓虹┖")
+ private Long intakeid;
+
+ /**
+ * 鎺у埗鍣ㄧ紪鍙�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "鎺у埗鍣↖D", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎺у埗鍣↖D涓嶈兘涓虹┖")
+ private Long controllerid;
+
+ /**
+ * 鎿嶄綔绫诲瀷;1-鎹嗙粦锛�2-瑙g粦
+ */
+ @Schema(description = "鎿嶄綔绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Max(message = "鎿嶄綔绫诲瀷鍙兘1鎴�2", value = 2)
+ @Min(message = "鎿嶄綔绫诲瀷鍙兘1鎴�2",value = 1)
+ private Byte operatetype;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+
+ /**
+ * 鎿嶄綔鏃堕棿
+ */
+ @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date operatedt;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrMonitoringFlowmeter.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrMonitoringFlowmeter.java
new file mode 100644
index 0000000..8f1de60
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrMonitoringFlowmeter.java
@@ -0,0 +1,87 @@
+package com.dy.pipIrrGlobal.pojoPr;
+
+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.Max;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 10:18
+ * @LastEditTime 2024-01-05 10:18
+ * @Description
+ */
+
+@TableName(value="pr_monitoring_flowmeter", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鐩戞祴绔欐祦閲忚鍏宠仈瀹炰綋")
+public class PrMonitoringFlowmeter implements BaseEntity {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 鐩戞祴绔欑紪鍙�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "鐩戞祴绔欑紪鍙�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鐩戞祴绔橧D涓嶈兘涓虹┖")
+ private Long monitoringid;
+
+ /**
+ * 娴侀噺璁$紪鍙�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "娴侀噺璁$紪鍙�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "娴侀噺璁D涓嶈兘涓虹┖")
+ private Long flowmeterid;
+
+ /**
+ * 鎿嶄綔绫诲瀷;1-鎹嗙粦锛�2-瑙g粦
+ */
+ @Schema(description = "鎿嶄綔绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Max(message = "鎿嶄綔绫诲瀷鍙兘1鎴�2", value = 2)
+ @Min(message = "鎿嶄綔绫诲瀷鍙兘1鎴�2",value = 1)
+ private Byte operatetype;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+
+ /**
+ * 鎿嶄綔鏃堕棿
+ */
+ //@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date operatedt;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java
index 1d632e8..d5d4934 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoController.java
@@ -30,12 +30,12 @@
@Schema(title = "鎺у埗鍣ㄧ紪鍙�")
@ExcelProperty("鎺у埗鍣ㄧ紪鍙�")
@ColumnWidth(15)
- private String code;
+ private String controllerCode;
@Schema(title = "鍦ㄧ嚎鐘舵��")
@ExcelProperty("鍦ㄧ嚎鐘舵��")
@ColumnWidth(15)
- private String state;
+ private String onlineState;
@Schema(title = "缁戝畾鍙栨按鍙�")
@ExcelProperty("缁戝畾鍙栨按鍙�")
@@ -45,12 +45,12 @@
@Schema(title = "缁戝畾娆℃暟")
@ExcelProperty("缁戝畾娆℃暟")
@ColumnWidth(10)
- private Integer bindings;
+ private Integer bindNumber;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Schema(title = "鏈�杩戜笂鎶ユ椂闂�")
@ExcelProperty("鏈�杩戜笂鎶ユ椂闂�")
@ColumnWidth(30)
- private Date operateDt;
+ private Date reportTime;
}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoFlowMonitoring.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoFlowMonitoring.java
new file mode 100644
index 0000000..b27fa51
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoFlowMonitoring.java
@@ -0,0 +1,40 @@
+package com.dy.pipIrrGlobal.voPr;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-04 17:14
+ * @LastEditTime 2024-01-04 17:14
+ * @Description
+ */
+
+@Data
+@Schema(title = "绠$綉娴侀噺鐩戞祴绔欒鍥惧璞�")
+public class VoFlowMonitoring implements BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @Schema(title = "ID")
+ @ExcelProperty("ID")
+ @ColumnWidth(10)
+ private Long id;
+
+ @Schema(title = "绠$綉娴侀噺鐩戞祴绔欏悕绉�")
+ @ExcelProperty("绠$綉娴侀噺鐩戞祴绔欏悕绉�")
+ @ColumnWidth(15)
+ private String name;
+
+ @Schema(title = "缁戝畾鐘舵��")
+ @ExcelProperty("缁戝畾鐘舵��")
+ @ColumnWidth(15)
+ private Integer bindState;
+
+ @Schema(title = "鍦板潃")
+ @ExcelProperty("鍦板潃")
+ @ColumnWidth(20)
+ private String address;
+}
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
new file mode 100644
index 0000000..89a2e92
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoIntake.java
@@ -0,0 +1,61 @@
+package com.dy.pipIrrGlobal.voPr;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author WuZeYu
+ * @date 2023/12/26 10:40
+ * @LastEditTime 2023/12/26 10:40
+ * @Description
+ */
+
+@Data
+@Schema(title = "鍙栨按鍙h鍥惧璞�")
+public class VoIntake implements BaseEntity {
+ private static final long serialVersionUID = 202312261049001L;
+
+ @Schema(title = "ID")
+ @ExcelProperty("ID")
+ @ColumnWidth(10)
+ private Long id;
+
+ @Schema(title = "鍙栨按鍙e悕绉�")
+ @ExcelProperty("鍙栨按鍙e悕绉�")
+ @ColumnWidth(15)
+ private String intakeName;
+
+ @Schema(title = "鎵�灞炲垎姘存埧")
+ @ExcelProperty("鎵�灞炲垎姘存埧")
+ @ColumnWidth(15)
+ private String divideName;
+
+ @Schema(title = "鎵�灞炵墖鍖�")
+ @ExcelProperty("鎵�灞炵墖鍖�")
+ @ColumnWidth(15)
+ private String blockName;
+
+ @Schema(title = "缁戝畾璁惧")
+ @ExcelProperty("缁戝畾璁惧")
+ @ColumnWidth(6)
+ private String isBind;
+
+ @Schema(title = "鍦板潃")
+ @ExcelProperty("鍦板潃")
+ @ColumnWidth(25)
+ private String address;
+
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @Schema(title = "鎿嶄綔鏃堕棿")
+ @ExcelIgnore
+ private Date operateDt;
+}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoController.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoController.java
new file mode 100644
index 0000000..9bfd3d3
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoController.java
@@ -0,0 +1,42 @@
+package com.dy.pipIrrGlobal.voSe;
+
+import com.dy.common.po.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 15:56
+ * @LastEditTime 2024-01-02 15:56
+ * @Description
+ */
+
+@Data
+@Schema(title = "鎺у埗鍣ㄨ鍥惧璞�")
+public class VoController implements BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @Schema(title = "ID")
+ private Long id;
+
+ @Schema(title = "鎺у埗鍣ㄧ紪鍙�")
+ private Long controllerCode;
+
+ @Schema(title = "鍦ㄧ嚎鐘舵��")
+ private String onlineState;
+
+ @Schema(title = "缁戝畾鍙栨按鍙�")
+ private String intakeName;
+
+ @Schema(title = "缁戝畾娆℃暟")
+ private Integer bindNumber;
+
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @Schema(title = "鏈�杩戜笂鎶ユ椂闂�")
+ private Date reportTime;
+}
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 9781e59..ef5aef9 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerMapper.xml
@@ -7,6 +7,8 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
+ <result column="onlineState" jdbcType="TINYINT" property="onlinestate" />
+ <result column="reportTime" jdbcType="TIMESTAMP" property="reporttime" />
<result column="addWays" jdbcType="TINYINT" property="addways" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
@@ -14,7 +16,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, code, protocol, addWays, `operator`, operateDt, deleted
+ id, code, protocol, onlineState, reportTime, addWays, `operator`, operateDt, deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -32,11 +34,13 @@
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController">
<!--@mbg.generated-->
insert into pr_controller (id, code, protocol,
- addWays, `operator`, operateDt,
- deleted)
+ onlineState, reportTime, addWays,
+ `operator`, operateDt, deleted
+ )
values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},
- #{addways,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP},
- #{deleted,jdbcType=TINYINT})
+ #{onlinestate,jdbcType=TINYINT}, #{reporttime,jdbcType=TIMESTAMP}, #{addways,jdbcType=TINYINT},
+ #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}
+ )
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController">
@@ -51,6 +55,12 @@
</if>
<if test="protocol != null">
protocol,
+ </if>
+ <if test="onlinestate != null">
+ onlineState,
+ </if>
+ <if test="reporttime != null">
+ reportTime,
</if>
<if test="addways != null">
addWays,
@@ -74,6 +84,12 @@
</if>
<if test="protocol != null">
#{protocol,jdbcType=VARCHAR},
+ </if>
+ <if test="onlinestate != null">
+ #{onlinestate,jdbcType=TINYINT},
+ </if>
+ <if test="reporttime != null">
+ #{reporttime,jdbcType=TIMESTAMP},
</if>
<if test="addways != null">
#{addways,jdbcType=TINYINT},
@@ -99,6 +115,12 @@
<if test="protocol != null">
protocol = #{protocol,jdbcType=VARCHAR},
</if>
+ <if test="onlinestate != null">
+ onlineState = #{onlinestate,jdbcType=TINYINT},
+ </if>
+ <if test="reporttime != null">
+ reportTime = #{reporttime,jdbcType=TIMESTAMP},
+ </if>
<if test="addways != null">
addWays = #{addways,jdbcType=TINYINT},
</if>
@@ -119,10 +141,100 @@
update pr_controller
set code = #{code,jdbcType=VARCHAR},
protocol = #{protocol,jdbcType=VARCHAR},
+ onlineState = #{onlinestate,jdbcType=TINYINT},
+ reportTime = #{reporttime,jdbcType=TIMESTAMP},
addWays = #{addways,jdbcType=TINYINT},
`operator` = #{operator,jdbcType=BIGINT},
operateDt = #{operatedt,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
+
+ <!--鏍规嵁鎸囧畾鑾峰彇鎺у埗鍣ㄨ褰曟暟-->
+ <select id="getRecordCount" resultType="java.lang.Long">
+ SELECT
+ COUNT(*) AS recordCount
+ FROM pr_controller con
+ INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id
+ INNER JOIN pr_intake inta ON ic.intakeId = inta.id
+ , (SELECT @i:=0) AS itable
+ <where>
+ AND ic.operateType = 1
+
+ <if test = "id != null and id > 0">
+ AND con.id = ${id}
+ </if>
+
+ <if test = "controllerCode != null and controllerCode !=''">
+ AND con.code like CONCAT('%',#{controllerCode},'%')
+ </if>
+
+ <if test = "onlineState != null and onlineState > 0">
+ AND con.onlineState = ${onlineState}
+ </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}
+ </if>
+ </where>
+ </select>
+
+ <!--鏍规嵁鎸囧畾鑾峰彇鎺у埗鍣ㄨ褰�-->
+ <select id="getControllers" resultType="com.dy.pipIrrGlobal.voPr.VoController">
+ SELECT
+ (@i:=@i+1) AS id,
+ t.* FROM(
+ SELECT
+ con.code AS controllerCode,
+ (CASE
+ WHEN con.onlineState = 1 THEN "鍦ㄧ嚎"
+ WHEN con.onlineState = 2 THEN "绂荤嚎"
+ END) AS onlineState,
+ inta.name AS intakeName,
+ (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) AS bindNumber,
+ con.reportTime
+ FROM pr_controller con
+ INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id
+ INNER JOIN pr_intake inta ON ic.intakeId = inta.id
+ <where>
+ AND ic.operateType = 1
+
+ <if test = "id != null and id > 0">
+ AND con.id = ${id}
+ </if>
+
+ <if test = "controllerCode != null and controllerCode !=''">
+ AND con.code like CONCAT('%',#{controllerCode},'%')
+ </if>
+
+ <if test = "onlineState != null and onlineState > 0">
+ AND con.onlineState = ${onlineState}
+ </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}
+ </if>
+ </where>
+ ORDER BY con.operateDt DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${pageCurr}, ${pageSize}
+ </if>
+ ) t
+ , (SELECT @i:=0) AS itable
+ </select>
+
+ <!--鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨帶鍒跺櫒鍒楄〃-->
+ <select id="getControllersByCode" resultType="java.util.Map">
+ SELECT id, code FROM pr_controller WHERE code LIKE CONCAT('%',#{controllerCode},'%')
+ </select>
+
+ <!--鏍规嵁鎺у埗鍣ㄧ紪鍙烽�昏緫鍒犻櫎鎺у埗-->
+ <update id="deleteControllerById">
+ UPDATE pr_controller SET deleted = 1 WHERE id = ${controllerId}
+ </update>
+
+ <!--鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨湭鍒犻櫎鐨勬帶鍒跺櫒鏁伴噺-->
+ <select id="getRecordCountOfController" resultType="java.lang.Integer">
+ SELECT COUNT(*) AS recordCount FROM pr_controller WHERE deleted = 0 AND id = ${controllerId}
+ </select>
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml
new file mode 100644
index 0000000..19cecd7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrFlowMonitoringMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring">
+ <!--@mbg.generated-->
+ <!--@Table pr_flow_monitoring-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="countyId" jdbcType="BIGINT" property="countyid" />
+ <result column="townId" jdbcType="BIGINT" property="townid" />
+ <result column="villageId" jdbcType="BIGINT" property="villageid" />
+ <result column="name" jdbcType="VARCHAR" property="name" />
+ <result column="lng" jdbcType="DOUBLE" property="lng" />
+ <result column="lat" jdbcType="DOUBLE" property="lat" />
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
+ <result column="deleted" jdbcType="TINYINT" property="deleted" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, countyId, townId, villageId, `name`, lng, lat, remarks, `operator`, operateDt,
+ deleted
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from pr_flow_monitoring
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from pr_flow_monitoring
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring">
+ <!--@mbg.generated-->
+ insert into pr_flow_monitoring (id, countyId, townId,
+ villageId, `name`, lng,
+ lat, remarks, `operator`,
+ operateDt, deleted)
+ values (#{id,jdbcType=BIGINT}, #{countyid,jdbcType=BIGINT}, #{townid,jdbcType=BIGINT},
+ #{villageid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE},
+ #{lat,jdbcType=DOUBLE}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT})
+ </insert>
+
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring">
+ <!--@mbg.generated-->
+ insert into pr_flow_monitoring
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="countyid != null">
+ countyId,
+ </if>
+ <if test="townid != null">
+ townId,
+ </if>
+ <if test="villageid != null">
+ villageId,
+ </if>
+ <if test="name != null">
+ `name`,
+ </if>
+ <if test="lng != null">
+ lng,
+ </if>
+ <if test="lat != null">
+ lat,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operatedt != null">
+ operateDt,
+ </if>
+ <if test="deleted != null">
+ deleted,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="countyid != null">
+ #{countyid,jdbcType=BIGINT},
+ </if>
+ <if test="townid != null">
+ #{townid,jdbcType=BIGINT},
+ </if>
+ <if test="villageid != null">
+ #{villageid,jdbcType=BIGINT},
+ </if>
+ <if test="name != null">
+ #{name,jdbcType=VARCHAR},
+ </if>
+ <if test="lng != null">
+ #{lng,jdbcType=DOUBLE},
+ </if>
+ <if test="lat != null">
+ #{lat,jdbcType=DOUBLE},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ <if test="deleted != null">
+ #{deleted,jdbcType=TINYINT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring">
+ <!--@mbg.generated-->
+ update pr_flow_monitoring
+ <set>
+ <if test="countyid != null">
+ countyId = #{countyid,jdbcType=BIGINT},
+ </if>
+ <if test="townid != null">
+ townId = #{townid,jdbcType=BIGINT},
+ </if>
+ <if test="villageid != null">
+ villageId = #{villageid,jdbcType=BIGINT},
+ </if>
+ <if test="name != null">
+ `name` = #{name,jdbcType=VARCHAR},
+ </if>
+ <if test="lng != null">
+ lng = #{lng,jdbcType=DOUBLE},
+ </if>
+ <if test="lat != null">
+ lat = #{lat,jdbcType=DOUBLE},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ <if test="deleted != null">
+ deleted = #{deleted,jdbcType=TINYINT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring">
+ <!--@mbg.generated-->
+ update pr_flow_monitoring
+ set countyId = #{countyid,jdbcType=BIGINT},
+ townId = #{townid,jdbcType=BIGINT},
+ villageId = #{villageid,jdbcType=BIGINT},
+ `name` = #{name,jdbcType=VARCHAR},
+ lng = #{lng,jdbcType=DOUBLE},
+ lat = #{lat,jdbcType=DOUBLE},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ deleted = #{deleted,jdbcType=TINYINT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鏍规嵁鐩戞祴绔欑紪鍙峰垹闄ょ洃娴嬬珯-->
+ <update id="deleteFlowMonitoringById">
+ UPDATE pr_flow_monitoring SET deleted = 1 WHERE id = ${flowMonitoringId}
+ </update>
+
+ <!--鏍规嵁鐩戞祴绔欑紪鍙疯幏鍙栨湭鍒犻櫎鐨勭洃娴嬬珯鏁伴噺-->
+ <select id="getRecordCountOfFlowMonitoring" resultType="java.lang.Integer">
+ SELECT COUNT(*) AS recordCountOfFlowMonitoring FROM pr_flow_monitoring WHERE deleted = 0 AND id = ${flowMonitoringId}
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml
new file mode 100644
index 0000000..7af9f8a
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrFlowmeterMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter">
+ <!--@mbg.generated-->
+ <!--@Table pr_flowmeter-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="code" jdbcType="VARCHAR" property="code" />
+ <result column="protocol" jdbcType="VARCHAR" property="protocol" />
+ <result column="onlineState" jdbcType="TINYINT" property="onlinestate" />
+ <result column="reportTime" jdbcType="TIMESTAMP" property="reporttime" />
+ <result column="addWays" jdbcType="TINYINT" property="addways" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+ <result column="deleted" jdbcType="TINYINT" property="deleted" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, code, protocol, onlineState, reportTime, addWays, `operator`, operateDt, remarks,
+ deleted
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from pr_flowmeter
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from pr_flowmeter
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter">
+ <!--@mbg.generated-->
+ insert into pr_flowmeter (id, code, protocol,
+ onlineState, reportTime, addWays,
+ `operator`, operateDt, remarks,
+ deleted)
+ values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},
+ #{onlinestate,jdbcType=TINYINT}, #{reporttime,jdbcType=TIMESTAMP}, #{addways,jdbcType=TINYINT},
+ #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
+ #{deleted,jdbcType=TINYINT})
+ </insert>
+
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter">
+ <!--@mbg.generated-->
+ insert into pr_flowmeter
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="code != null">
+ code,
+ </if>
+ <if test="protocol != null">
+ protocol,
+ </if>
+ <if test="onlinestate != null">
+ onlineState,
+ </if>
+ <if test="reporttime != null">
+ reportTime,
+ </if>
+ <if test="addways != null">
+ addWays,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operatedt != null">
+ operateDt,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="deleted != null">
+ deleted,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="code != null">
+ #{code,jdbcType=VARCHAR},
+ </if>
+ <if test="protocol != null">
+ #{protocol,jdbcType=VARCHAR},
+ </if>
+ <if test="onlinestate != null">
+ #{onlinestate,jdbcType=TINYINT},
+ </if>
+ <if test="reporttime != null">
+ #{reporttime,jdbcType=TIMESTAMP},
+ </if>
+ <if test="addways != null">
+ #{addways,jdbcType=TINYINT},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="deleted != null">
+ #{deleted,jdbcType=TINYINT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter">
+ <!--@mbg.generated-->
+ update pr_flowmeter
+ <set>
+ <if test="code != null">
+ code = #{code,jdbcType=VARCHAR},
+ </if>
+ <if test="protocol != null">
+ protocol = #{protocol,jdbcType=VARCHAR},
+ </if>
+ <if test="onlinestate != null">
+ onlineState = #{onlinestate,jdbcType=TINYINT},
+ </if>
+ <if test="reporttime != null">
+ reportTime = #{reporttime,jdbcType=TIMESTAMP},
+ </if>
+ <if test="addways != null">
+ addWays = #{addways,jdbcType=TINYINT},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="deleted != null">
+ deleted = #{deleted,jdbcType=TINYINT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter">
+ <!--@mbg.generated-->
+ update pr_flowmeter
+ set code = #{code,jdbcType=VARCHAR},
+ protocol = #{protocol,jdbcType=VARCHAR},
+ onlineState = #{onlinestate,jdbcType=TINYINT},
+ reportTime = #{reporttime,jdbcType=TIMESTAMP},
+ addWays = #{addways,jdbcType=TINYINT},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ deleted = #{deleted,jdbcType=TINYINT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鎹紪鍙峰垹闄ゆ祦閲忚-->
+ <update id="deleteFlowmeterById">
+ UPDATE pr_flowmeter SET deleted = 1 WHERE id = ${flowmeterId}
+ </update>
+
+ <!--鏍规嵁娴侀噺璁$紪鍙疯幏鍙栨湭鍒犻櫎鐨勬祦閲忚鏁伴噺-->
+ <select id="getRecordCountOfFlowmeter" resultType="java.lang.Integer">
+ SELECT COUNT(*) AS recordCountOfFlowmeter FROM pr_flowmeter WHERE deleted = 0 AND id = ${flowmeterId}
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml
new file mode 100644
index 0000000..df62638
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeControllerMapper.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrIntakeControllerMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrIntakeController">
+ <!--@mbg.generated-->
+ <!--@Table pr_intake_controller-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="intakeId" jdbcType="BIGINT" property="intakeid" />
+ <result column="controllerId" jdbcType="BIGINT" property="controllerid" />
+ <result column="operateType" jdbcType="TINYINT" property="operatetype" />
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, intakeId, controllerId, operateType, remarks, `operator`, operateDt
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from pr_intake_controller
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from pr_intake_controller
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntakeController">
+ <!--@mbg.generated-->
+ insert into pr_intake_controller (id, intakeId, controllerId,
+ operateType, remarks, `operator`,
+ operateDt)
+ values (#{id,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT},
+ #{operatetype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
+ </insert>
+
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntakeController">
+ <!--@mbg.generated-->
+ insert into pr_intake_controller
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="intakeid != null">
+ intakeId,
+ </if>
+ <if test="controllerid != null">
+ controllerId,
+ </if>
+ <if test="operatetype != null">
+ operateType,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operatedt != null">
+ operateDt,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="intakeid != null">
+ #{intakeid,jdbcType=BIGINT},
+ </if>
+ <if test="controllerid != null">
+ #{controllerid,jdbcType=BIGINT},
+ </if>
+ <if test="operatetype != null">
+ #{operatetype,jdbcType=TINYINT},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntakeController">
+ <!--@mbg.generated-->
+ update pr_intake_controller
+ <set>
+ <if test="intakeid != null">
+ intakeId = #{intakeid,jdbcType=BIGINT},
+ </if>
+ <if test="controllerid != null">
+ controllerId = #{controllerid,jdbcType=BIGINT},
+ </if>
+ <if test="operatetype != null">
+ operateType = #{operatetype,jdbcType=TINYINT},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntakeController">
+ <!--@mbg.generated-->
+ update pr_intake_controller
+ set intakeId = #{intakeid,jdbcType=BIGINT},
+ controllerId = #{controllerid,jdbcType=BIGINT},
+ operateType = #{operatetype,jdbcType=TINYINT},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operateDt = #{operatedt,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鏍规嵁鍙栨按鍙g紪鍙枫�佹帶鍒跺櫒缂栧彿銆佹搷浣滅被鍒幏鍙栬褰曟暟閲�-->
+ <select id="getBindRecordCount" resultType="java.lang.Integer">
+ SELECT
+ COUNT(*) AS recordCount
+ FROM pr_intake_controller
+ <where>
+ <if test = "intakeId != null and intakeId > 0">
+ AND intakeId = ${intakeId}
+ </if>
+
+ <if test = "controllerId != null and controllerId > 0">
+ AND controllerId = ${controllerId}
+ </if>
+
+ <if test = "operateType != null and operateType > 0">
+ AND operateType = ${operateType}
+ </if>
+ </where>
+ </select>
+
+ <!--鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�-->
+ <select id="getBindsByIntakeId" resultType="java.util.Map">
+ SELECT
+ user.name AS userName,
+ con.code AS controllerCode,
+ (CASE
+ WHEN ic.operateType = 1 THEN "缁戝畾"
+ WHEN ic.operateType = 2 THEN "瑙g粦"
+ END) AS operateType,
+ ic.operateDt
+ FROM pr_intake inta
+ INNER JOIN pr_intake_controller ic ON inta.id= ic.intakeId
+ INNER JOIN ba_user user ON ic.operator = user.id
+ INNER JOIN pr_controller con ON ic.controllerId = con.id
+ <if test = "intakeId != null and intakeId > 0">
+ AND inta.id = ${intakeId}
+ </if>
+ ORDER BY ic.operateDt DESC
+ </select>
+
+ <!--鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�-->
+ <select id="getBindsByControllerId" resultType="java.util.Map">
+ SELECT
+ (CASE
+ WHEN ic.operateType = 1 THEN "缁戝畾"
+ WHEN ic.operateType = 2 THEN "瑙g粦"
+ END) AS operateType,
+ inta.name AS intakeName,
+ user.name AS userName,
+ ic.operateDt
+ FROM pr_controller con
+ INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id
+ INNER JOIN pr_intake inta ON ic.intakeId = inta.id
+ INNER JOIN ba_user user ON ic.operator = user.id
+ <if test = "controllerId != null and controllerId > 0">
+ AND con.id = ${controllerId}
+ </if>
+ ORDER BY ic.operateDt DESC
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
new file mode 100644
index 0000000..ef9ca39
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -0,0 +1,291 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrIntakeMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrIntake">
+ <!--@mbg.generated-->
+ <!--@Table pr_intake-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="countyId" jdbcType="BIGINT" property="countyId" />
+ <result column="townId" jdbcType="BIGINT" property="townId" />
+ <result column="villageId" jdbcType="BIGINT" property="villageId" />
+ <result column="divideId" jdbcType="BIGINT" property="divideId" />
+ <result column="blockId" jdbcType="BIGINT" property="blockId" />
+ <result column="name" jdbcType="VARCHAR" property="name" />
+ <result column="lng" jdbcType="DOUBLE" property="lng" />
+ <result column="lat" jdbcType="DOUBLE" property="lat" />
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operateDt" jdbcType="TIMESTAMP" property="operateDt" />
+ <result column="deleted" jdbcType="TINYINT" property="deleted" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, countyId, townId, villageId, divideId, blockId, `name`, lng, lat, remarks, `operator`,
+ operateDt, deleted
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from pr_intake
+ where id = #{id,jdbcType=BIGINT} and deleted = 0
+ </select>
+
+ <delete id="deleteLogicById" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ update pr_intake
+ set deleted = 1
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+
+ <select id="selectAll" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List"/>
+ from pr_intake
+ where deleted != 1
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from pr_intake
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntake">
+ <!--@mbg.generated-->
+ insert into pr_intake (id, countyId, townId,
+ villageId, divideId, blockId,
+ `name`, lng, lat, remarks,
+ `operator`, operateDt, deleted
+ )
+ values (#{id,jdbcType=BIGINT}, #{countyId,jdbcType=BIGINT}, #{townId,jdbcType=BIGINT},
+ #{villageId,jdbcType=BIGINT}, #{divideId,jdbcType=BIGINT}, #{blockId,jdbcType=BIGINT},
+ #{name,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT}, #{operateDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}
+ )
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntake">
+ <!--@mbg.generated-->
+ insert into pr_intake
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="countyId != null">
+ countyId,
+ </if>
+ <if test="townId != null">
+ townId,
+ </if>
+ <if test="villageId != null">
+ villageId,
+ </if>
+ <if test="divideId != null">
+ divideId,
+ </if>
+ <if test="blockId != null">
+ blockId,
+ </if>
+ <if test="name != null">
+ `name`,
+ </if>
+ <if test="lng != null">
+ lng,
+ </if>
+ <if test="lat != null">
+ lat,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operateDt != null">
+ operateDt,
+ </if>
+ <if test="deleted != null">
+ deleted,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="countyId != null">
+ #{countyId,jdbcType=BIGINT},
+ </if>
+ <if test="townId != null">
+ #{townId,jdbcType=BIGINT},
+ </if>
+ <if test="villageId != null">
+ #{villageId,jdbcType=BIGINT},
+ </if>
+ <if test="divideId != null">
+ #{divideId,jdbcType=BIGINT},
+ </if>
+ <if test="blockId != null">
+ #{blockId,jdbcType=BIGINT},
+ </if>
+ <if test="name != null">
+ #{name,jdbcType=VARCHAR},
+ </if>
+ <if test="lng != null">
+ #{lng,jdbcType=DOUBLE},
+ </if>
+ <if test="lat != null">
+ #{lat,jdbcType=DOUBLE},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateDt != null">
+ #{operateDt,jdbcType=TIMESTAMP},
+ </if>
+ <if test="deleted != null">
+ #{deleted,jdbcType=TINYINT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntake">
+ <!--@mbg.generated-->
+ update pr_intake
+ <set>
+ <if test="countyId != null">
+ countyId = #{countyId,jdbcType=BIGINT},
+ </if>
+ <if test="townId != null">
+ townId = #{townId,jdbcType=BIGINT},
+ </if>
+ <if test="villageId != null">
+ villageId = #{villageId,jdbcType=BIGINT},
+ </if>
+ <if test="divideId != null">
+ divideId = #{divideId,jdbcType=BIGINT},
+ </if>
+ <if test="blockId != null">
+ blockId = #{blockId,jdbcType=BIGINT},
+ </if>
+ <if test="name != null">
+ `name` = #{name,jdbcType=VARCHAR},
+ </if>
+ <if test="lng != null">
+ lng = #{lng,jdbcType=DOUBLE},
+ </if>
+ <if test="lat != null">
+ lat = #{lat,jdbcType=DOUBLE},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateDt != null">
+ operateDt = #{operateDt,jdbcType=TIMESTAMP},
+ </if>
+ <if test="deleted != null">
+ deleted = #{deleted,jdbcType=TINYINT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrIntake">
+ <!--@mbg.generated-->
+ update pr_intake
+ set countyId = #{countyId,jdbcType=BIGINT},
+ townId = #{townId,jdbcType=BIGINT},
+ villageId = #{villageId,jdbcType=BIGINT},
+ divideId = #{divideId,jdbcType=BIGINT},
+ blockId = #{blockId,jdbcType=BIGINT},
+ `name` = #{name,jdbcType=VARCHAR},
+ lng = #{lng,jdbcType=DOUBLE},
+ lat = #{lat,jdbcType=DOUBLE},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operateDt = #{operateDt,jdbcType=TIMESTAMP},
+ deleted = #{deleted,jdbcType=TINYINT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰曟暟-->
+ <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
+ SELECT COUNT(*) AS recordCount
+ FROM pr_intake ge
+ INNER JOIN ba_divide divi ON ge.divideId = divi.id
+ INNER JOIN ba_block blo ON divi.blockId = blo.id
+ INNER JOIN ba_district country ON ge.countyId = country.id
+ INNER JOIN ba_district town ON ge.townId = town.id
+ INNER JOIN ba_district village ON ge.villageId = village.id
+ , (SELECT @i:=0) AS itable
+ <where>
+ ge.deleted = 0
+ AND divi.deleted = 0
+ and blo.deleted = 0
+ <if test="intakeName != null and intakeName != ''">
+ AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
+ </if>
+
+ <if test="divideName != null and divideName != ''">
+ AND divi.name LIKE CONCAT('%', #{divideName}, '%')
+ </if>
+
+ <if test="blockName != null and blockName != ''">
+ AND blo.name = #{blockName}
+ </if>
+ </where>
+ </select>
+
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰�-->
+ <select id="getIntakes" resultType="com.dy.pipIrrGlobal.voPr.VoIntake">
+ SELECT (@i:=@i+1) AS id,
+ ge.`name` AS intakeName,
+ divi.`name` AS divideName,
+ blo.`name` AS blockName,
+ ge.operateDt As operateDt,
+ 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
+ INNER JOIN ba_district country ON ge.countyId = country.id
+ INNER JOIN ba_district town ON ge.townId = town.id
+ INNER JOIN ba_district village ON ge.villageId = village.id
+ , (SELECT @i:=0) AS itable
+ <where>
+ ge.deleted = 0
+ AND divi.deleted = 0
+ and blo.deleted = 0
+ <if test="intakeName != null and intakeName != ''">
+ AND ge.name LIKE CONCAT('%', #{intakeName}, '%')
+ </if>
+ <if test="divideName != null and divideName != ''">
+ AND divi.name LIKE CONCAT('%', #{divideName}, '%')
+ </if>
+
+ <if test="blockName != null and blockName != ''">
+ AND blo.name = #{blockName}
+ </if>
+ </where>
+ ORDER BY ge.operateDt DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${pageCurr}, ${pageSize}
+ </if>
+ </select>
+
+ <!--鏍规嵁涓嬬骇鑾峰彇涓婁竴绾у湴鍧�-->
+ <select id="getSupperByVillageId" parameterType="_long" resultType="java.lang.Long">
+ select dis_tow.*
+ from ba_district dis_vil
+ inner join
+ ba_district dis_tow
+ on dis_vil.supperId = dis_tow.id
+ where dis_vil.id = #{vaId,jdbcType=BIGINT}
+ </select>
+
+ <!--鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栨湭鍒犻櫎鐨勫彇姘村彛鏁伴噺-->
+ <select id="getRecordCountOfIntake" resultType="java.lang.Integer">
+ SELECT COUNT(*) AS recordCount FROM pr_intake WHERE deleted = 0 AND id = ${intakeId}
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrMonitoringFlowmeterMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrMonitoringFlowmeterMapper.xml
new file mode 100644
index 0000000..4c63f19
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrMonitoringFlowmeterMapper.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrMonitoringFlowmeterMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter">
+ <!--@mbg.generated-->
+ <!--@Table pr_monitoring_flowmeter-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="monitoringId" jdbcType="BIGINT" property="monitoringid" />
+ <result column="flowmeterId" jdbcType="BIGINT" property="flowmeterid" />
+ <result column="operateType" jdbcType="TINYINT" property="operatetype" />
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, monitoringId, flowmeterId, operateType, remarks, `operator`, operateDt
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from pr_monitoring_flowmeter
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from pr_monitoring_flowmeter
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter">
+ <!--@mbg.generated-->
+ insert into pr_monitoring_flowmeter (id, monitoringId, flowmeterId,
+ operateType, remarks, `operator`,
+ operateDt)
+ values (#{id,jdbcType=BIGINT}, #{monitoringid,jdbcType=BIGINT}, #{flowmeterid,jdbcType=BIGINT},
+ #{operatetype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter">
+ <!--@mbg.generated-->
+ insert into pr_monitoring_flowmeter
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="monitoringid != null">
+ monitoringId,
+ </if>
+ <if test="flowmeterid != null">
+ flowmeterId,
+ </if>
+ <if test="operatetype != null">
+ operateType,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operatedt != null">
+ operateDt,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="monitoringid != null">
+ #{monitoringid,jdbcType=BIGINT},
+ </if>
+ <if test="flowmeterid != null">
+ #{flowmeterid,jdbcType=BIGINT},
+ </if>
+ <if test="operatetype != null">
+ #{operatetype,jdbcType=TINYINT},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter">
+ <!--@mbg.generated-->
+ update pr_monitoring_flowmeter
+ <set>
+ <if test="monitoringid != null">
+ monitoringId = #{monitoringid,jdbcType=BIGINT},
+ </if>
+ <if test="flowmeterid != null">
+ flowmeterId = #{flowmeterid,jdbcType=BIGINT},
+ </if>
+ <if test="operatetype != null">
+ operateType = #{operatetype,jdbcType=TINYINT},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter">
+ <!--@mbg.generated-->
+ update pr_monitoring_flowmeter
+ set monitoringId = #{monitoringid,jdbcType=BIGINT},
+ flowmeterId = #{flowmeterid,jdbcType=BIGINT},
+ operateType = #{operatetype,jdbcType=TINYINT},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operateDt = #{operatedt,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+
+ <!--鏍规嵁娴侀噺鐩戞祴绔欍�佹祦閲忚銆佹搷浣滅被鍨嬭幏鍙栬褰曟暟閲�-->
+ <select id="getBindRecordCount" resultType="java.lang.Integer">
+ SELECT
+ COUNT(*) AS recordCount
+ FROM pr_monitoring_flowmeter
+ <where>
+ <if test = "monitoringId != null and monitoringId > 0">
+ AND monitoringId = ${monitoringId}
+ </if>
+
+ <if test = "flowmeterId != null and flowmeterId > 0">
+ AND flowmeterId = ${flowmeterId}
+ </if>
+
+ <if test = "operateType != null and operateType > 0">
+ AND operateType = ${operateType}
+ </if>
+ </where>
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockCtrl.java
index 942eba6..341e897 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/block/BlockCtrl.java
@@ -7,7 +7,6 @@
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoBa.BaBlock;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -77,7 +76,7 @@
})
@PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<QueryResultVo<List<BaBlock>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){
+ public BaseResponse<QueryResultVo<List<BaBlock>>> some(@RequestBody QueryVo vo){
try {
QueryResultVo<List<BaBlock>> res = this.sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(res);
@@ -102,7 +101,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaBlock> one(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<BaBlock> one(Long id){
return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
}
@@ -122,7 +121,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaBlock po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> save(@RequestBody @Valid BaBlock po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -157,7 +156,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaBlock po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid BaBlock po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -195,7 +194,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<Boolean> delete(Long id){
if(id == null){
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java
index b3967ff..0979aad 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientCtrl.java
@@ -8,7 +8,6 @@
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoBa.BaClient;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -53,7 +52,7 @@
})
@PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<QueryResultVo<List<BaClient>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){
+ public BaseResponse<QueryResultVo<List<BaClient>>> some(@RequestBody QueryVo vo){
try {
QueryResultVo<List<BaClient>> res = this.sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(res);
@@ -78,7 +77,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaClient> one(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<BaClient> one(Long id){
return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
}
@@ -98,7 +97,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaClient po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> save(@RequestBody @Valid BaClient po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -133,7 +132,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaClient po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid BaClient po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -171,7 +170,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<Boolean> delete(Long id){
if(id == null){
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java
index 74829e8..01a550a 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/clientType/ClientTypeCtrl.java
@@ -9,7 +9,6 @@
import com.dy.pipIrrBase.user.QueryVo;
import com.dy.pipIrrGlobal.pojoBa.BaClientType;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -79,7 +78,7 @@
})
@PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<QueryResultVo<List<BaClientType>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) @Valid QueryVo vo){
+ public BaseResponse<QueryResultVo<List<BaClientType>>> some(@RequestBody @Valid QueryVo vo){
try {
QueryResultVo<List<BaClientType>> res = this.sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(res);
@@ -104,7 +103,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaClientType> one(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<BaClientType> one(Long id){
return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
}
@@ -124,7 +123,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaClientType po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> save(@RequestBody @Valid BaClientType po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -159,7 +158,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaClientType po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid BaClientType po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -197,7 +196,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<Boolean> delete(Long id){
if(id == null){
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
index 1dce00e..8a41586 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
@@ -1,5 +1,8 @@
package com.dy.pipIrrBase.district;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
import com.dy.common.aop.SsoAop;
import com.dy.common.mybatis.envm.Deleted;
import com.dy.common.webUtil.BaseResponse;
@@ -10,7 +13,6 @@
import com.dy.pipIrrGlobal.pojoBa.BaDistrict;
import com.dy.pipIrrGlobal.util.DistrictLevel;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -93,7 +95,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaDistrict> one(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<BaDistrict> one(Long id){
return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
}
@@ -113,7 +115,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DistrictVo vo, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> save(@RequestBody @Valid DistrictVo vo, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -155,7 +157,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DistrictVo vo, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid DistrictVo vo, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -191,7 +193,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<Boolean> delete(Long id){
if(id == null){
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
}
@@ -264,4 +266,52 @@
}
return BaseResponseUtils.buildSuccess(map_Districts);
}
+
+ /**
+ * 鑾峰彇涓夌骇琛屾斂鍖哄垝
+ * @return 鍘块晣鏉戜笁绾ц鏀垮尯鍒�
+ */
+ @GetMapping(path = "/three")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<Map<String, Object>>>> getThreeDistrict() {
+ JSONArray array_counties = new JSONArray();
+ JSONArray array_towns = new JSONArray();
+ JSONArray array_villages = new JSONArray();
+
+ List<Map<String, Object>> list_counties = Optional.ofNullable(sv.getDistrictgsByLevel(2)).orElse(new ArrayList<>());
+ if(list_counties.size() > 0) {
+ array_counties = JSONArray.parseArray(JSON.toJSONString(list_counties));
+ // 閬嶅巻姣忎竴涓幙锛屽皢鍘夸笅鐨勯晣鏉戝姞鍒板幙鐨勫瓙闆�
+ for(int i = 0; i < array_counties.size(); i++) {
+ JSONObject job_county = array_counties.getJSONObject(i);
+ Long countyId = job_county.getLong("id");
+ List<Map<String, Object>> list_towns = Optional.ofNullable(sv.getDistrictsBySupperId(countyId)).orElse(new ArrayList<>());
+ if(list_towns.size() > 0) {
+ array_towns = JSONArray.parseArray(JSON.toJSONString(list_towns));
+ // 閬嶅巻姣忎竴涓晣锛屽皢闀囦笅鏉戝垪琛ㄥ姞鍒伴晣鐨勫瓙闆�
+ for(int j = 0; j < array_towns.size(); j++) {
+ JSONObject job_town = array_towns.getJSONObject(j);
+ Long townId = job_town.getLong("id");
+ List<Map<String, Object>> list_villages = Optional.ofNullable(sv.getDistrictsBySupperId(townId)).orElse(new ArrayList<>());
+ if(list_villages.size() > 0) {
+ array_villages = JSONArray.parseArray(JSON.toJSONString(list_villages));
+ job_town.put("children", array_villages);
+ }
+ }
+ //System.out.println("----" + array_towns);
+ }
+ // 闀囨潙缁勮瀹屾瘯锛屽皢闀囨潙鍔犲埌鍘夸笅
+ job_county.put("children", array_towns);
+ }
+ // 鍘跨粍瑁呭畬姣�
+ //String a = array_counties.toJSONString();
+ //System.out.println(a);
+ return BaseResponseUtils.buildSuccess(array_counties);
+ }else {
+ return BaseResponseUtils.buildFail("鍘跨骇琛屾斂鍖哄垝涓嶅瓨鍦�");
+ }
+
+
+ //return BaseResponseUtils.buildSuccess();
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/divide/DivideCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/divide/DivideCtrl.java
index 8256285..4ad3396 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/divide/DivideCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/divide/DivideCtrl.java
@@ -7,7 +7,6 @@
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoBa.BaDivide;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -76,7 +75,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaDivide> one(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<BaDivide> one(Long id){
return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
}
/**
@@ -94,7 +93,7 @@
})
@PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<QueryResultVo<List<BaDivide>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) DivideVo vo){
+ public BaseResponse<QueryResultVo<List<BaDivide>>> some(@RequestBody DivideVo vo){
try {
QueryResultVo<List<BaDivide>> res = this.sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(res);
@@ -120,7 +119,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaDivide po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> save(@RequestBody @Valid BaDivide po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -154,7 +153,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaDivide po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid BaDivide po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -192,7 +191,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<Boolean> delete(Long id){
if(id == null){
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java
index 67f1606..23dd172 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/role/RoleCtrl.java
@@ -11,7 +11,6 @@
import com.dy.pipIrrGlobal.pojoBa.BaRole;
import com.dy.pipIrrGlobal.pojoBa.BaRolePermissions;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -26,7 +25,9 @@
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
-import java.util.*;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
@Slf4j
@Tag(name = "瑙掕壊绠$悊", description = "瑙掕壊澧炲垹鏀规煡绛夋搷浣�")
@@ -84,7 +85,7 @@
})
@PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<QueryResultVo<List<BaRole>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) @Valid QueryVo vo){
+ public BaseResponse<QueryResultVo<List<BaRole>>> some(@RequestBody @Valid QueryVo vo){
try {
QueryResultVo<List<BaRole>> res = this.sv.selectSome(vo) ;
return BaseResponseUtils.buildSuccess(res);
@@ -109,7 +110,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaRole> one(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<BaRole> one(Long id){
return BaseResponseUtils.buildSuccess(this.sv.selectById(id));
}
@@ -129,7 +130,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaRole po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> save(@RequestBody @Valid BaRole po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -165,7 +166,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaRole po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid BaRole po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -205,8 +206,7 @@
})
@GetMapping(path = "setPrivs", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> setPrivileges(@Parameter(description = "瀹炰綋id", required = true) Long id,
- @Parameter(description = "鏉冮檺id鏁扮粍") Long[] privIds){
+ public BaseResponse<Boolean> setPrivileges(Long id, Long[] privIds){
Long[] privIds_lg = null ;
if(privIds != null && privIds.length > 0){
privIds_lg = new Long[privIds.length] ;
@@ -239,7 +239,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) Long id){
+ public BaseResponse<Boolean> delete(Long id){
if(id == null){
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
}
@@ -269,7 +269,7 @@
@PostMapping(path = "addPermissions", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> permission(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaRolePermissions po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> permission(@RequestBody @Valid BaRolePermissions po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
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 01659c6..1d7f0ab 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
@@ -14,7 +14,6 @@
import com.dy.pipIrrGlobal.voBa.VoUserInfo;
import com.mysql.cj.util.StringUtils;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -90,7 +89,7 @@
})
@PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) @Valid QueryVo vo) {
+ public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody @Valid QueryVo vo) {
try {
QueryResultVo<List<BaUser>> res = this.sv.selectSome(vo);
return BaseResponseUtils.buildSuccess(res);
@@ -116,7 +115,7 @@
})
@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<BaUser> one(@Parameter(description = "瀹炰綋id", required = true) String id) {
+ public BaseResponse<BaUser> one(String id) {
return BaseResponseUtils.buildSuccess(this.sv.selectById(Long.parseLong(id)));
}
@@ -137,7 +136,7 @@
})
@PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> save(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult) {
+ public BaseResponse<Boolean> save(@RequestBody @Valid BaUser po, BindingResult bindingResult) {
if (bindingResult != null && bindingResult.hasErrors()) {
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -187,7 +186,7 @@
})
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid BaUser po, @Parameter(hidden = true) BindingResult bindingResult) {
+ public BaseResponse<Boolean> update(@RequestBody @Valid BaUser po, BindingResult bindingResult) {
if (bindingResult != null && bindingResult.hasErrors()) {
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -230,9 +229,7 @@
})
@GetMapping(path = "changePassword", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- 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 {
+ public BaseResponse<Boolean> changePassword(String id, String oldPassword, String newPassword) throws Exception {
if (id == null) {
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖");
}
@@ -290,7 +287,7 @@
})
@PostMapping(path = "resetPassword", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<Boolean> resetPassword(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) ResetPasswordVo vo) throws Exception {
+ public BaseResponse<Boolean> resetPassword(@RequestBody ResetPasswordVo vo) throws Exception {
if (vo.id == null) {
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖");
}
@@ -332,7 +329,7 @@
})
@GetMapping(path = "resetPasswordByDefault", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> resetPasswordByDefault(@Parameter(description = "瀹炰綋id", required = true) String id) throws Exception {
+ public BaseResponse<Boolean> resetPasswordByDefault(String id) throws Exception {
if (id == null) {
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖");
}
@@ -375,7 +372,7 @@
})
@GetMapping(path = "resetPasswordByRandom", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<String> resetPasswordByRandom(@Parameter(description = "瀹炰綋id", required = true) String id) throws Exception {
+ public BaseResponse<String> resetPasswordByRandom(String id) throws Exception {
if (id == null) {
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖");
}
@@ -420,7 +417,7 @@
})
@GetMapping(path = "setRoles", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> setRoles(@Parameter(description = "瀹炰綋id", required = true) String id,
+ public BaseResponse<Boolean> setRoles(String id,
@Parameter(description = "瑙掕壊id鏁扮粍") String[] roleIds) {
Long[] roleId_lg = null;
if (roleIds != null && roleIds.length > 0) {
@@ -457,7 +454,7 @@
})
@GetMapping(path = "delete", consumes = MediaType.TEXT_PLAIN_VALUE)
@SsoAop()
- public BaseResponse<Boolean> delete(@Parameter(description = "瀹炰綋id", required = true) String id) {
+ public BaseResponse<Boolean> delete(String id) {
if (id == null) {
return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖");
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
index ebf961a..bd9311f 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
@@ -1,32 +1,37 @@
package com.dy.pipIrrProject.controller;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.support.ExcelTypeEnum;
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoBa.BaClient;
import com.dy.pipIrrGlobal.pojoPr.PrController;
+import com.dy.pipIrrGlobal.voPr.VoController;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import com.dy.pipIrrProject.result.ProjectResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
-import java.util.Date;
-import java.util.Objects;
-import java.util.Optional;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.*;
/**
* @author ZhuBaoMin
@@ -43,6 +48,72 @@
public class ControllerCtrl {
private final ControllerSv controllerSv;
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鎺у埗鍣ㄥ垪琛�
+ * @param vo 鏌ヨ鏉′欢
+ * @return 绗﹀悎鏉′欢鐨勬帶鍒跺櫒鍒楄〃
+ */
+ @Operation(summary = "鑾峰緱涓�椤垫帶鍒跺櫒璁板綍", description = "杩斿洖涓�椤垫帶鍒跺櫒鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤垫帶鍒跺櫒鏁版嵁锛圔aseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/getControllers")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoController>>> getControllers(QueryVo vo){
+ try {
+ QueryResultVo<List<VoController>> res = controllerSv.getControllers(vo);
+ if(res.itemTotal != null && res.itemTotal > 0) {
+ return BaseResponseUtils.buildSuccess(res);
+ }else {
+ return BaseResponseUtils.buildFail(ProjectResultCode.NO_RECORDS.getMessage());
+ }
+ //return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨帶鍒跺櫒鍒楄〃
+ * @param controllerCode 鎺у埗鍣ㄧ紪鍙�
+ * @return 绗﹀悎鏉′欢鐨勬帶鍒跺櫒鍒楄〃
+ */
+ @Operation(summary = "鑾峰緱鎺у埗鍣ㄨ褰�", description = "杩斿洖鍙栨帶鍒跺櫒鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖鎺у埗鍣ㄦ暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = BaClient.class))}
+ )
+ })
+ @GetMapping(path = "controller_list")
+ @SsoAop()
+ public BaseResponse<List<Map<String, Object>>> getControllersByCode(String controllerCode){
+ try {
+ List<Map<String, Object>> list = Optional.ofNullable(controllerSv.getControllersByCode(controllerCode)).orElse(new ArrayList<>());
+ if(list.size() <= 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.NO_RECORDS.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(list);
+ } catch (Exception e) {
+ log.error("鏌ヨ鎺у埗鍣ㄥ紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 娣诲姞鎺у埗鍣�
+ * @param po 鎺у埗鍣ㄥ疄浣撳璞�
+ * @param bindingResult
+ * @return 娣诲姞鏄惁鎴愬姛
+ */
@Operation(summary = "娣诲姞鎺у埗鍣ㄨ褰�", description = "娣诲姞鎺у埗鍣ㄨ褰�")
@ApiResponses(value = {
@ApiResponse(
@@ -55,18 +126,78 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrController po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoController po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
+ PrController prController = DtoToPojo.INSTANCT.po2vo(po);
Date operateTime = new Date();
- po.setOperatedt(operateTime);
- po.setDeleted((byte)0);
- Integer rec = Optional.ofNullable(controllerSv.addController(po)).orElse(0);
+ prController.setOperatedt(operateTime);
+ prController.setDeleted((byte)0);
+ prController.setReporttime(operateTime);
+ Integer rec = Optional.ofNullable(controllerSv.addController(prController)).orElse(0);
if(rec == 0) {
return BaseResponseUtils.buildFail(ProjectResultCode.CONTROLLER_FAIL.getMessage());
}
return BaseResponseUtils.buildSuccess(true) ;
}
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙峰垹闄ゆ帶鍒跺櫒
+ * @param map
+ * @return
+ */
+ @Operation(summary = "鍒犻櫎鎺у埗鍣ㄨ褰�", description = "鍒犻櫎鎺у埗鍣ㄨ褰�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "delete")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(@RequestBody Map map){
+ if(map == null || map.size() <=0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.PLEASE_INPUT_CONTROLLER_ID.getMessage());
+ }
+
+ Long controllerId = Long.parseLong(map.get("controllerId").toString());
+ Integer recordCount = Optional.ofNullable(controllerSv.deleteControllerById(controllerId)).orElse(0);
+ if(recordCount == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_CONTROLLER_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 瀵煎嚭鎺у埗鍣ㄥ垪琛�
+ * @param response
+ * @param vo
+ */
+ @SneakyThrows(IOException.class)
+ @RequestMapping(value = "/export", method = RequestMethod.GET)
+ public void export(HttpServletResponse response, QueryVo vo) {
+ setExcelRespProp(response, "鎺у埗鍣ㄥ垪琛�");
+ //List<VoDivide> memberList = LocalJsonUtil.getListFromJson("json/members.json", VoDivide.class);
+ List<VoController> memberList = controllerSv.export(vo);
+
+ EasyExcel.write(response.getOutputStream())
+ .head(VoController.class)
+ .excelType(ExcelTypeEnum.XLSX)
+ .sheet("鎺у埗鍣ㄥ垪琛�")
+ .doWrite(memberList);
+ }
+
+ /**
+ * 璁剧疆excel涓嬭浇鍝嶅簲澶村睘鎬�
+ */
+ private void setExcelRespProp(HttpServletResponse response, String rawFileName) throws UnsupportedEncodingException {
+ response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+ response.setCharacterEncoding("utf-8");
+ String fileName = URLEncoder.encode(rawFileName, "UTF-8").replaceAll("\\+", "%20");
+ response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerSv.java
index 717429e..9a98da4 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerSv.java
@@ -1,10 +1,17 @@
package com.dy.pipIrrProject.controller;
+import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoPr.PrControllerMapper;
import com.dy.pipIrrGlobal.pojoPr.PrController;
+import com.dy.pipIrrGlobal.voPr.VoController;
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 java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
/**
* @author ZhuBaoMin
@@ -20,6 +27,35 @@
private PrControllerMapper prControllerMapper;
/**
+ * 鏍规嵁鎸囧畾鑾峰彇鎺у埗鍣ㄨ褰�
+ * @param queryVo
+ * @return
+ */
+ public QueryResultVo<List<VoController>> getControllers(QueryVo queryVo) {
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
+
+ Long itemTotal = prControllerMapper.getRecordCount(params);
+
+ QueryResultVo<List<VoController>> rsVo = new QueryResultVo<>() ;
+ Integer pageCurr = 0;
+ Integer pageSize = 10000;
+ rsVo.pageCurr = 1;
+ rsVo.pageSize = 10000;
+ if(queryVo.pageSize != null && queryVo.pageCurr != null) {
+ rsVo.pageSize = queryVo.pageSize ;
+ rsVo.pageCurr = queryVo.pageCurr;
+ pageSize = queryVo.pageSize ;
+ pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString());
+ }
+ params.put("pageCurr", pageCurr);
+ params.put("pageSize", pageSize);
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = prControllerMapper.getControllers(params);
+ return rsVo ;
+ }
+
+ /**
* 娣诲姞鎺у埗鍣�
* @param po
* @return
@@ -27,4 +63,38 @@
public Integer addController(PrController po) {
return prControllerMapper.insert(po);
}
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨帶鍒跺櫒鍒楄〃
+ * @param controllerCode
+ * @return
+ */
+ public List<Map<String, Object>> getControllersByCode(String controllerCode) {
+ return prControllerMapper.getControllersByCode(controllerCode);
+ }
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙烽�昏緫鍒犻櫎鎺у埗
+ * @param controllerId
+ * @return
+ */
+ public Integer deleteControllerById(Long controllerId) {
+ return prControllerMapper.deleteControllerById(controllerId);
+ }
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢瀵煎嚭鎺у埗鍣ㄥ垪琛�
+ * @param queryVo
+ * @return
+ */
+ public List<VoController> export(QueryVo queryVo) {
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
+ List<VoController> rsVo = new ArrayList<>();
+ rsVo = prControllerMapper.getControllers(params);
+ return rsVo ;
+ }
+
+ public Integer getRecordCountOfController(Long controllerId) {
+ return prControllerMapper.getRecordCountOfController(controllerId);
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoController.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoController.java
new file mode 100644
index 0000000..5735c8f
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoController.java
@@ -0,0 +1,53 @@
+package com.dy.pipIrrProject.controller;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 16:36
+ * @LastEditTime 2024-01-02 16:36
+ * @Description
+ */
+
+@Data
+@Schema(name = "鎺у埗鍣ㄤ紶鍏ュ璞�")
+public class DtoController {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 缂栧彿
+ */
+ @Schema(description = "缂栧彿", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "鎺у埗鍣ㄧ紪鍙蜂笉鑳戒负绌�")
+ @Length(message = "鎺у埗鍣ㄧ紪鍙蜂笉澶т簬{max}瀛�",max = 25)
+ private String code;
+
+ /**
+ * 閫氳鍗忚
+ */
+ @Schema(description = "閫氳鍗忚", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "閫氳鍗忚涓嶈兘涓虹┖")
+ @Length(message = "閫氳鍗忚涓嶅ぇ浜巤max}瀛�",max = 25)
+ private String protocol;
+
+ /**
+ * 鍦ㄧ嚎鐘舵��
+ */
+ @Schema(description = "鍦ㄧ嚎鐘舵��", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte onlineState;
+
+ /**
+ * 娣诲姞鏂瑰紡;1-绯荤粺鑷姩锛�2-鎵嬪姩
+ */
+ @Schema(description = "娣诲姞鏂瑰紡", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte addWays;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoToPojo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoToPojo.java
new file mode 100644
index 0000000..bf8a034
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/DtoToPojo.java
@@ -0,0 +1,24 @@
+package com.dy.pipIrrProject.controller;
+
+import com.dy.pipIrrGlobal.pojoPr.PrController;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 16:39
+ * @LastEditTime 2024-01-02 16:39
+ * @Description
+ */
+
+@Mapper
+public interface DtoToPojo {
+ DtoToPojo INSTANCT = Mappers.getMapper(DtoToPojo.class);
+ @Mapping(target = "code", source = "code")
+ @Mapping(target = "protocol", source = "protocol")
+ @Mapping(target = "onlinestate", source = "onlineState")
+ @Mapping(target = "addways", source = "addWays")
+ @Mapping(target = "operator", source = "operator")
+ PrController po2vo(DtoController po);
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/QueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/QueryVo.java
index d52f49c..da037f3 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/QueryVo.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/QueryVo.java
@@ -1,10 +1,34 @@
package com.dy.pipIrrProject.controller;
+import com.dy.common.webUtil.QueryConditionVo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
/**
* @author ZhuBaoMin
* @date 2023-12-29 10:07
* @LastEditTime 2023-12-29 10:07
* @Description
*/
-public class QueryVo {
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Schema(name = "鎺у埗鍣ㄦ煡璇㈡潯浠�")
+public class QueryVo extends QueryConditionVo {
+
+ @Schema(description = "鎺у埗鍣↖D")
+ private Long id;
+
+ @Schema(description = "鎺у埗鍣ㄧ紪鍙�")
+ private String controllerCode;
+
+ @Schema(description = "鍦ㄧ嚎鐘舵��")
+ public Integer onlineState;
+
+ @Schema(description = "缁戝畾鏁伴噺")
+ public Integer bindNumber;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java
index 308c8ee..5483b23 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DivideCtrl.java
@@ -13,7 +13,6 @@
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import com.dy.pipIrrProject.result.ProjectResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -120,12 +119,12 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrDivide po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoDivide po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
// 鎺ユ敹鏉戠紪鍙凤紙涓婚敭锛�
- Long villageId = po.getVillageid();
+ Long villageId = po.getVillageId();
/**
* 鑾峰彇5绾ц鏀垮尯鍒掍俊鎭�
@@ -135,15 +134,17 @@
return BaseResponseUtils.buildFail("鍖哄垝淇℃伅鏈夎");
}
+ PrDivide prDivide = DtoToDividePojo.INSTANCT.po2vo(po);
+
Long countryId = Long.parseLong(map_districts.get("countryId").toString());
Long townId = Long.parseLong(map_districts.get("townId").toString());
- po.setCountyid(countryId);
- po.setTownid(townId);
+ prDivide.setCountyid(countryId);
+ prDivide.setTownid(townId);
Date operateTime = new Date();
- po.setOperatedt(operateTime);
- po.setDeleted((byte)0);
- Integer rec = Optional.ofNullable(divideSv.addDivide(po)).orElse(0);
+ prDivide.setOperatedt(operateTime);
+ prDivide.setDeleted((byte)0);
+ Integer rec = Optional.ofNullable(divideSv.addDivide(prDivide)).orElse(0);
if(rec == 0) {
return BaseResponseUtils.buildFail(ProjectResultCode.DIVIDE_FAIL.getMessage());
}
@@ -198,7 +199,7 @@
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrDivide po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid PrDivide po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -236,8 +237,8 @@
* @param vo
*/
@SneakyThrows(IOException.class)
- @RequestMapping(value = "/exportDivides", method = RequestMethod.GET)
- public void exportDivides(HttpServletResponse response, QueryVo vo) {
+ @RequestMapping(value = "/export", method = RequestMethod.GET)
+ public void export(HttpServletResponse response, QueryVo vo) {
setExcelRespProp(response, "鍒嗘按鎴垮垪琛�");
//List<VoDivide> memberList = LocalJsonUtil.getListFromJson("json/members.json", VoDivide.class);
List<VoDivide> memberList = divideSv.exportDivides(vo);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoDivide.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoDivide.java
new file mode 100644
index 0000000..ee84f0c
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoDivide.java
@@ -0,0 +1,96 @@
+package com.dy.pipIrrProject.divide;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 17:00
+ * @LastEditTime 2024-01-05 17:00
+ * @Description
+ */
+
+@Data
+@Schema(name = "鍒嗘按鎴夸紶鍏ュ璞�")
+public class DtoDivide {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 鎵�鍦ㄦ潙
+ */
+ @Schema(description = "鎵�鍦ㄦ潙ID", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎵�鍦ㄦ潙涓嶈兘涓虹┖")
+ private Long villageId;
+
+ /**
+ * 鎵�鍦ㄧ墖鍖�
+ */
+ @Schema(description = "鎵�鍦ㄧ墖鍖篒D", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎵�鍦ㄧ墖鍖轰笉鑳戒负绌�")
+ private Long blockId;
+
+ /**
+ * 鍒嗘按鍙e悕绉版垨缂栧彿
+ */
+ @Schema(description = "鍒嗘按鍙e悕绉�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "鍒嗘按鎴垮悕绉颁笉鑳戒负绌�")
+ @Length(max = 25, message = "鍒嗘按鍙e悕绉版渶澶�25瀛�")
+ private String name;
+
+ /**
+ * 瑕嗙洊鏉�
+ */
+ @Schema(description = "瑕嗙洊鏉�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @Length(max = 100, message = "瑕嗙洊鏉戞渶澶�100瀛�")
+ private String villages;
+
+ /**
+ * 瑕嗙洊闈㈢Н锛堝钩鏂瑰叕閲岋級
+ */
+ @Schema(description = "瑕嗙洊闈㈢Н", requiredMode = Schema.RequiredMode.REQUIRED)
+ private Double area;
+
+ /**
+ * 璐熻矗浜�
+ */
+ @Schema(description = "璐熻矗浜�", requiredMode = Schema.RequiredMode.REQUIRED)
+ private String header;
+
+ /**
+ * 鑱旂郴鐢佃瘽
+ */
+ @Schema(description = "鑱旂郴鐢佃瘽", requiredMode = Schema.RequiredMode.REQUIRED)
+ @Length(max = 11, message = "鑱旂郴鐢佃瘽鏈�澶�11浣�")
+ private String phone;
+
+ /**
+ * 缁忓害
+ */
+ @Schema(description = "缁忓害", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "缁忓害涓嶈兘涓虹┖")
+ private Double lng;
+
+ /**
+ * 绾害
+ */
+ @Schema(description = "缁忓害", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "缁忓害涓嶈兘涓虹┖")
+ private Double lat;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(max = 200, message = "澶囨敞鏈�澶�200瀛�")
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鎿嶄綔浜虹紪鍙蜂笉鑳戒负绌�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoToDividePojo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoToDividePojo.java
new file mode 100644
index 0000000..9fbdc5e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/divide/DtoToDividePojo.java
@@ -0,0 +1,32 @@
+package com.dy.pipIrrProject.divide;
+
+import com.dy.pipIrrGlobal.pojoPr.PrDivide;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 17:10
+ * @LastEditTime 2024-01-05 17:10
+ * @Description
+ */
+
+@Mapper
+public interface DtoToDividePojo {
+ DtoToDividePojo INSTANCT = Mappers.getMapper(DtoToDividePojo.class);
+
+ @Mapping(target = "villageid", source = "villageId")
+ @Mapping(target = "blockid", source = "blockId")
+ @Mapping(target = "name", source = "name")
+ @Mapping(target = "villages", source = "villages")
+ @Mapping(target = "area", source = "area")
+ @Mapping(target = "header", source = "header")
+ @Mapping(target = "phone", source = "phone")
+ @Mapping(target = "lng", source = "lng")
+ @Mapping(target = "lat", source = "lat")
+ @Mapping(target = "remarks", source = "remarks")
+ @Mapping(target = "operator", source = "operator")
+
+ PrDivide po2vo(DtoDivide po);
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoFlowmeter.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoFlowmeter.java
new file mode 100644
index 0000000..4d8c785
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoFlowmeter.java
@@ -0,0 +1,62 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 9:33
+ * @LastEditTime 2024-01-05 9:33
+ * @Description
+ */
+
+@Data
+@Schema(name = "娴侀噺璁′紶鍏ュ璞�")
+public class DtoFlowmeter {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 缂栧彿
+ */
+ @Schema(description = "缂栧彿", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "鎺у埗鍣ㄧ紪鍙蜂笉鑳戒负绌�")
+ @Length(message = "鎺у埗鍣ㄧ紪鍙蜂笉澶т簬{max}瀛�",max = 25)
+ private String code;
+
+ /**
+ * 閫氳鍗忚
+ */
+ @Schema(description = "閫氳鍗忚", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotBlank(message = "閫氳鍗忚涓嶈兘涓虹┖")
+ @Length(message = "閫氳鍗忚涓嶅ぇ浜巤max}瀛�",max = 25)
+ private String protocol;
+
+ /**
+ * 鍦ㄧ嚎鐘舵��
+ */
+ @Schema(description = "鍦ㄧ嚎鐘舵��", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte onlineState;
+
+ /**
+ * 娣诲姞鏂瑰紡;1-绯荤粺鑷姩锛�2-鎵嬪姩
+ */
+ @Schema(description = "娣诲姞鏂瑰紡", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Byte addWays;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鎿嶄綔浜虹紪鍙蜂笉鑳戒负绌�")
+ private Long operator;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞涓嶅ぇ浜巤max}瀛楋紝涓嶅皬浜巤min}瀛�", min = 1, max = 200)
+ private String remarks;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoMoniFlow.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoMoniFlow.java
new file mode 100644
index 0000000..9585d14
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoMoniFlow.java
@@ -0,0 +1,52 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 10:36
+ * @LastEditTime 2024-01-05 10:36
+ * @Description 娴侀噺鐩戞祴绔欍�佹祦閲忚缁戝畾浼犲叆瀵硅薄
+ */
+
+@Data
+@Schema(name = "娴侀噺鐩戞祴绔欍�佹祦閲忚缁戝畾浼犲叆瀵硅薄")
+public class DtoMoniFlow {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 鐩戞祴绔欑紪鍙�
+ */
+ @Schema(description = "鐩戞祴绔欑紪鍙�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鐩戞祴绔橧D涓嶈兘涓虹┖")
+ private Long monitoringId;
+
+ /**
+ * 娴侀噺璁$紪鍙�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @Schema(description = "娴侀噺璁$紪鍙�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "娴侀噺璁D涓嶈兘涓虹┖")
+ private Long flowmeterId;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ @NotNull(message = "鎿嶄綔浜虹紪鍙蜂笉鑳戒负绌�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToFlowmeterPojo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToFlowmeterPojo.java
new file mode 100644
index 0000000..32ae88f
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToFlowmeterPojo.java
@@ -0,0 +1,25 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 9:38
+ * @LastEditTime 2024-01-05 9:38
+ * @Description
+ */
+
+@Mapper
+public interface DtoToFlowmeterPojo {
+ DtoToFlowmeterPojo INSTANCT = Mappers.getMapper(DtoToFlowmeterPojo.class);
+ @Mapping(target = "code", source = "code")
+ @Mapping(target = "protocol", source = "protocol")
+ @Mapping(target = "onlinestate", source = "onlineState")
+ @Mapping(target = "addways", source = "addWays")
+ @Mapping(target = "operator", source = "operator")
+ @Mapping(target = "remarks", source = "remarks")
+ PrFlowmeter po2vo(DtoFlowmeter po);
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToMoniFlowPojo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToMoniFlowPojo.java
new file mode 100644
index 0000000..6ac3da8
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/DtoToMoniFlowPojo.java
@@ -0,0 +1,23 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 10:43
+ * @LastEditTime 2024-01-05 10:43
+ * @Description 娴侀噺鐩戞祴绔欍�佹祦閲忚Dto杞琍ojo
+ */
+
+@Mapper
+public interface DtoToMoniFlowPojo {
+ DtoToMoniFlowPojo INSTANCT = Mappers.getMapper(DtoToMoniFlowPojo.class);
+ @Mapping(target = "monitoringid", source = "monitoringId")
+ @Mapping(target = "flowmeterid", source = "flowmeterId")
+ @Mapping(target = "operator", source = "operator")
+ @Mapping(target = "remarks", source = "remarks")
+ PrMonitoringFlowmeter po2vo(DtoMoniFlow po);
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringCtrl.java
new file mode 100644
index 0000000..bef9203
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringCtrl.java
@@ -0,0 +1,117 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring;
+import com.dy.pipIrrProject.result.ProjectResultCode;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-04 16:11
+ * @LastEditTime 2024-01-04 16:11
+ * @Description
+ */
+
+@Slf4j
+@Tag(name = "娴侀噺鐩戞祴绔欑鐞�", description = "娴侀噺鐩戞祴绔欐搷浣�")
+@RestController
+@RequestMapping(path="flow_monitoring")
+@RequiredArgsConstructor
+public class FlowMonitoringCtrl {
+ private final FlowMonitoringSv flowMonitoringSv;
+
+ /**
+ * 娣诲姞绠$綉娴侀噺鐩戞祴绔�
+ * @param po
+ * @param bindingResult
+ * @return
+ */
+ @Operation(summary = "娣诲姞娴侀噺鐩戞祴绔欒褰�", description = "娣诲姞娴侀噺鐩戞祴绔欒褰�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> add(@RequestBody @Valid PrFlowMonitoring po, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ // 鎺ユ敹鏉戠紪鍙凤紙涓婚敭锛�
+ Long villageId = po.getVillageid();
+
+ /**
+ * 鑾峰彇5绾ц鏀垮尯鍒掍俊鎭�
+ */
+ Map map_districts = Optional.ofNullable(flowMonitoringSv.getDistrictsByVillageId(villageId)).orElse(new HashMap());
+ if(map_districts.size() <= 0) {
+ return BaseResponseUtils.buildFail("鍖哄垝淇℃伅鏈夎");
+ }
+
+ Long countryId = Long.parseLong(map_districts.get("countryId").toString());
+ Long townId = Long.parseLong(map_districts.get("townId").toString());
+ po.setCountyid(countryId);
+ po.setTownid(townId);
+
+ Date operateTime = new Date();
+ po.setOperatedt(operateTime);
+ po.setDeleted((byte)0);
+ Integer rec = Optional.ofNullable(flowMonitoringSv.addFlowMonitoring(po)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.FLOW_MONITORING_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 鍒犻櫎娴侀噺鐩戞祴绔�
+ * @param map
+ * @return
+ */
+ @Operation(summary = "鍒犻櫎娴侀噺鐩戞祴绔欒褰�", description = "鍒犻櫎娴侀噺鐩戞祴绔欒褰�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "delete")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(@RequestBody Map map){
+ if(map == null || map.size() <=0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.PLEASE_INPUT_FLOW_MONITORING_ID.getMessage());
+ }
+
+ Long flowMonitoringId = Long.parseLong(map.get("flowMonitoringId").toString());
+ Integer recordCount = Optional.ofNullable(flowMonitoringSv.deleteFlowMonitoring(flowMonitoringId)).orElse(0);
+ if(recordCount == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_FLOW_MONITORING_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java
new file mode 100644
index 0000000..08ff400
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowMonitoringSv.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper;
+import com.dy.pipIrrGlobal.daoPr.PrFlowMonitoringMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrFlowMonitoring;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-04 16:11
+ * @LastEditTime 2024-01-04 16:11
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class FlowMonitoringSv {
+ @Autowired
+ private PrFlowMonitoringMapper prFlowMonitoringMapper;
+
+ @Autowired
+ private BaDistrictMapper baDistrictMapper;
+
+ /**
+ * 鏍规嵁鏉戠紪鍙疯幏鍙�5绾у尯鍒掍俊鎭�
+ * @param villageId 鏉戠紪鍙凤紙涓婚敭锛�
+ * @return 5绾ц鏀垮尯鍒掍俊鎭�
+ */
+ public Map getDistrictsByVillageId(Long villageId) {
+ return baDistrictMapper.getDistrictsByVillageId(villageId);
+ }
+
+ /**
+ * 娣诲姞绠$綉娴侀噺鐩戞祴绔�
+ * @param prFlowMonitoring 娴侀噺鐩戞祴绔欏疄浣�
+ * @return
+ */
+ public Integer addFlowMonitoring(PrFlowMonitoring prFlowMonitoring) {
+ return prFlowMonitoringMapper.insert(prFlowMonitoring);
+ }
+
+ /**
+ * 鏍规嵁鐩戞祴绔欑紪鍙峰垹闄ょ洃娴嬬珯
+ * @param flowMonitoringId
+ * @return
+ */
+ public Integer deleteFlowMonitoring(Long flowMonitoringId) {
+ return prFlowMonitoringMapper.deleteFlowMonitoringById(flowMonitoringId);
+ }
+
+ /**
+ * 鏍规嵁鐩戞祴绔欑紪鍙疯幏鍙栨湭鍒犻櫎鐨勭洃娴嬬珯鏁伴噺
+ * @param flowMonitoringId 娴侀噺鐩戞祴绔欑紪鍙�
+ * @return
+ */
+ public Integer getRecordCountOfFlowMonitoring(Long flowMonitoringId) {
+ return prFlowMonitoringMapper.getRecordCountOfFlowMonitoring(flowMonitoringId);
+ }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterCtrl.java
new file mode 100644
index 0000000..322df4d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterCtrl.java
@@ -0,0 +1,101 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter;
+import com.dy.pipIrrProject.result.ProjectResultCode;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 9:21
+ * @LastEditTime 2024-01-05 9:21
+ * @Description
+ */
+
+@Slf4j
+@Tag(name = "娴侀噺鐩戞祴绔欑鐞�", description = "娴侀噺鐩戞祴绔欐搷浣�")
+@RestController
+@RequestMapping(path="flowmeter")
+@RequiredArgsConstructor
+public class FlowmeterCtrl {
+ private final FlowmeterSv flowmeterSv;
+
+ @Operation(summary = "娣诲姞娴侀噺璁¤褰�", description = "娣诲姞娴侀噺璁¤褰�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoFlowmeter po, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ PrFlowmeter prFlowmeter = DtoToFlowmeterPojo.INSTANCT.po2vo(po);
+ Date operateTime = new Date();
+ prFlowmeter.setOperatedt(operateTime);
+ prFlowmeter.setDeleted((byte)0);
+ prFlowmeter.setReporttime(operateTime);
+ Integer rec = Optional.ofNullable(flowmeterSv.addFlowmeter(prFlowmeter)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.ADD_FLOWMETER_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 鍒犻櫎娴侀噺璁�
+ * @param map
+ * @return
+ */
+ @Operation(summary = "鍒犻櫎娴侀噺璁¤褰�", description = "鍒犻櫎娴侀噺璁¤褰�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "delete")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(@RequestBody Map map){
+ if(map == null || map.size() <=0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.PLEASE_INPUT_FLOW_MONITORING_ID.getMessage());
+ }
+
+ Long flowmeterId = Long.parseLong(map.get("flowmeterId").toString());
+ Integer recordCount = Optional.ofNullable(flowmeterSv.deleteFlowmeter(flowmeterId)).orElse(0);
+ if(recordCount == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.DELETE_FLOWMETER_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java
new file mode 100644
index 0000000..84b38f9
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/FlowmeterSv.java
@@ -0,0 +1,48 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.pipIrrGlobal.daoPr.PrFlowmeterMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrFlowmeter;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 9:20
+ * @LastEditTime 2024-01-05 9:20
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class FlowmeterSv {
+ @Autowired
+ private PrFlowmeterMapper prFlowmeterMapper;
+
+ /**
+ * 娣诲姞娴侀噺璁�
+ * @param prFlowmeter
+ * @return
+ */
+ public Integer addFlowmeter(PrFlowmeter prFlowmeter) {
+ return prFlowmeterMapper.insert(prFlowmeter);
+ }
+
+ /**
+ * 鍒犻櫎娴侀噺璁�
+ * @param flowmeterId
+ * @return
+ */
+ public Integer deleteFlowmeter(Long flowmeterId) {
+ return prFlowmeterMapper.deleteFlowmeterById(flowmeterId);
+ }
+
+ /**
+ * 鏍规嵁娴侀噺璁$紪鍙疯幏鍙栨湭鍒犻櫎鐨勬祦閲忚鏁伴噺
+ * @param flowmeterId
+ * @return
+ */
+ public Integer getRecordCountOfFlowmeter(Long flowmeterId) {
+ return prFlowmeterMapper.getRecordCountOfFlowmeter(flowmeterId);
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowCtrl.java
new file mode 100644
index 0000000..1748b64
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowCtrl.java
@@ -0,0 +1,139 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter;
+import com.dy.pipIrrProject.result.ProjectResultCode;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 10:26
+ * @LastEditTime 2024-01-05 10:26
+ * @Description 绠$綉娴侀噺鐩戞祴绔欍�佹祦閲忚鍏宠仈鎺у埗绫�
+ */
+
+@Slf4j
+@Tag(name = "娴侀噺鐩戞祴绔欍�佹祦閲忚鍏宠仈绠$悊", description = "娴侀噺鐩戞祴绔欍�佹祦閲忚鍏宠仈鎿嶄綔")
+@RestController
+@RequestMapping(path="moni_flow")
+@RequiredArgsConstructor
+public class MoniFlowCtrl {
+ private final MoniFlowSv moniFlowSv;
+
+ private final FlowMonitoringSv flowMonitoringSv;
+ private final FlowmeterSv flowmeterSv;
+
+ /**
+ * 娴侀噺鐩戞祴绔欑粦瀹氭祦閲忚
+ * 鑻ユ祦閲忕洃娴嬬珯鎴栨祦閲忚涓嶅瓨鍦ㄩ渶鎻愮ず鐢ㄦ埛
+ * 鑻ユ祦閲忕洃娴嬬珯宸茬粡涓庢祦閲忚缁戝畾闇�鎻愮ず鐢ㄦ埛
+ * @param po 缁戝畾鍏崇郴瀵硅薄
+ * @param bindingResult
+ * @return
+ */
+ @Operation(summary = "娣诲姞缁戝畾璁板綍", description = "娣诲姞缁戝畾璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "bind", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> bind(@RequestBody @Valid DtoMoniFlow po, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ // 鏍规嵁缂栧彿鍒嗗埆鑾峰彇娴侀噺鐩戞祴绔欍�佹祦閲忚鏈垹闄よ褰曟暟
+ Integer recFlowMonitoring = Optional.ofNullable(flowMonitoringSv.getRecordCountOfFlowMonitoring(po.getMonitoringId())).orElse(0);
+ Integer recFlowmeter = Optional.ofNullable(flowmeterSv.getRecordCountOfFlowmeter(po.getFlowmeterId())).orElse(0);
+ if(recFlowMonitoring == 0 || recFlowmeter == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.STATION_OR_FLOWMETER_NO_EXIST.getMessage());
+ }
+
+ // 鏍规嵁缂栧彿鑾峰彇宸茬粦瀹氭暟閲�
+ Integer recordCount = Optional.ofNullable(moniFlowSv.getBindRecordCount(po.getMonitoringId(), po.getFlowmeterId(), (byte)1)).orElse(0);
+ if(recordCount > 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.MONITORING_HAS_BINDED_FLOWMETER.getMessage());
+ }
+
+ PrMonitoringFlowmeter prMonitoringFlowmeter = DtoToMoniFlowPojo.INSTANCT.po2vo(po);
+ Date operateTime = new Date();
+ prMonitoringFlowmeter .setOperatedt(operateTime);
+ prMonitoringFlowmeter.setOperatetype((byte)1);
+
+ Integer rec = Optional.ofNullable(moniFlowSv.addRecord(prMonitoringFlowmeter)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.MONITORING_FLOWMETER_BIND_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ @Operation(summary = "娣诲姞瑙g粦璁板綍", description = "娣诲姞瑙g粦璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "unbind", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> unbind(@RequestBody @Valid DtoMoniFlow po, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ // 鏍规嵁缂栧彿鍒嗗埆鑾峰彇娴侀噺鐩戞祴绔欍�佹祦閲忚鏈垹闄よ褰曟暟
+ Integer recFlowMonitoring = Optional.ofNullable(flowMonitoringSv.getRecordCountOfFlowMonitoring(po.getMonitoringId())).orElse(0);
+ Integer recFlowmeter = Optional.ofNullable(flowmeterSv.getRecordCountOfFlowmeter(po.getFlowmeterId())).orElse(0);
+ if(recFlowMonitoring == 0 || recFlowmeter == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.STATION_OR_FLOWMETER_NO_EXIST.getMessage());
+ }
+
+ // 鏍规嵁缂栧彿鑾峰彇宸茬粦瀹氭暟閲�
+ Integer recordCount = Optional.ofNullable(moniFlowSv.getBindRecordCount(po.getMonitoringId(), po.getFlowmeterId(), (byte)2)).orElse(0);
+ if(recordCount > 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.STATION_FLOWMETER_HAS_UNBOUND.getMessage());
+ }
+
+ PrMonitoringFlowmeter prMonitoringFlowmeter = DtoToMoniFlowPojo.INSTANCT.po2vo(po);
+ Date operateTime = new Date();
+ prMonitoringFlowmeter .setOperatedt(operateTime);
+ prMonitoringFlowmeter.setOperatetype((byte)1);
+
+ Integer rec = Optional.ofNullable(moniFlowSv.addRecord(prMonitoringFlowmeter)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.MONITORING_FLOWMETER_BIND_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowSv.java
new file mode 100644
index 0000000..2577ae9
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/MoniFlowSv.java
@@ -0,0 +1,42 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.pipIrrGlobal.daoPr.PrMonitoringFlowmeterMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrMonitoringFlowmeter;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-05 10:25
+ * @LastEditTime 2024-01-05 10:25
+ * @Description 绠$綉娴侀噺鐩戞祴绔欍�佹祦閲忚鍏宠仈绠$悊鏈嶅姟绫�
+ */
+
+@Slf4j
+@Service
+public class MoniFlowSv {
+ @Autowired
+ private PrMonitoringFlowmeterMapper prMonitoringFlowmeterMapper;
+
+ /**
+ * 娣诲姞娴侀噺鐩戞祴绔欍�佹祦閲忚鍏宠仈鍏崇郴
+ * @param po
+ * @return
+ */
+ public Integer addRecord(PrMonitoringFlowmeter po) {
+ return prMonitoringFlowmeterMapper.insert(po);
+ }
+
+ /**
+ * 鏍规嵁娴侀噺鐩戞祴绔欍�佹祦閲忚銆佹搷浣滅被鍨嬭幏鍙栬褰曟暟閲�
+ * @param monitoringId 鐩戞祴绔欑紪鍙�
+ * @param flowmeterId 娴侀噺璁$紪鍙�
+ * @param operateType 鎿嶄綔绫诲瀷 1-鎹嗙粦锛�2-瑙g粦
+ * @return
+ */
+ Integer getBindRecordCount(Long monitoringId, Long flowmeterId, Byte operateType) {
+ return prMonitoringFlowmeterMapper.getBindRecordCount(monitoringId, flowmeterId, operateType);
+ }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/QueryVo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/QueryVo.java
new file mode 100644
index 0000000..8c6e60a
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/flowMonitoring/QueryVo.java
@@ -0,0 +1,30 @@
+package com.dy.pipIrrProject.flowMonitoring;
+
+import com.dy.common.webUtil.QueryConditionVo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-04 17:21
+ * @LastEditTime 2024-01-04 17:21
+ * @Description
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Schema(name = "绠$綉娴侀噺鐩戞祴绔欐煡璇㈡潯浠�")
+public class QueryVo extends QueryConditionVo {
+ @Schema(description = "娴侀噺鐩戞祴绔欑紪鍙�")
+ private Long id;
+
+ @Schema(description = "娴侀噺鐩戞祴绔欏悕绉�")
+ public String name;
+
+ @Schema(title = "缁戝畾鐘舵��")
+ private Integer bindState;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
new file mode 100644
index 0000000..fd25e3e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
@@ -0,0 +1,263 @@
+package com.dy.pipIrrProject.intake;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoPr.PrIntake;
+import com.dy.pipIrrGlobal.voPr.VoIntake;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * @author WuZeYu
+ * @date 2023/12/26 20:11
+ * @LastEditTime 2023/12/20 20:11
+ * @Description
+ */
+
+@Slf4j
+@Tag(name = "鍙栨按鍙g鐞�", description = "鍙栨按鍙f搷浣�")
+@RestController
+@RequestMapping(path="intake")
+@RequiredArgsConstructor
+public class IntakeCtrl {
+ private final IntakeSv intakeSv;
+
+ /**
+ * 瀹㈡埛绔姹傚緱鍒版墍鏈夊彇姘村彛鍚嶅瓧
+ * @return 鎵�鏈夊彇姘村彛鍚嶅瓧
+ */
+ @Operation(summary = "鑾峰緱鍏ㄩ儴鍙栨按鍙�", description = "杩斿洖鍏ㄩ儴鍙栨按鍙f暟鎹�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖鍏ㄩ儴鍙栨按鍙f暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = PrIntake.class))}
+ )
+ })
+ @GetMapping(path = "all")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<PrIntake>>> all(){
+ try {
+ QueryResultVo<List<PrIntake>> res = this.intakeSv.selectAll();
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鏌ヨ鍙栨按鍙e紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 寰楀埌涓�涓彇姘村彛鏁版嵁
+ * @return 涓�涓彇姘村彛鏁版嵁
+ */
+ @Operation(summary = "涓�涓彇姘村彛", description = "寰楀埌涓�涓彇姘村彛鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�涓彇姘村彛鏁版嵁锛圔aseResponse.content:{}锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = PrIntake.class))}
+ )
+ })
+ @GetMapping(path = "one/{id}")
+ @SsoAop()
+ public BaseResponse<PrIntake> one(@PathVariable("id") Long id){
+ return BaseResponseUtils.buildSuccess(this.intakeSv.selectById(id));
+ }
+
+ @Operation(summary = "鑾峰緱涓�椤靛彇姘村彛璁板綍", description = "杩斿洖涓�椤靛彇姘村彛鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤靛彇姘村彛鏁版嵁锛圔aseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "getIntakes", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoIntake>>> getIntakes(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){
+ try {
+ QueryResultVo<List<VoIntake>> res = intakeSv.getIntakes(vo);
+ if(res == null) {
+ return BaseResponseUtils.buildFail("鏌ヨ澶辫触");
+ }
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鍙栨按鍙h褰曞紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ @Operation(summary = "娣诲姞鍙栨按鍙h褰�", description = "娣诲姞鍙栨按鍙h褰�")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult){
+ DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ Date operateTime = new Date();
+ po.setOperateDt(operateTime);
+ Integer rec = Optional.ofNullable(intakeSv.addIntake(po)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 缂栬緫淇敼鍙栨按鍙�
+ * @param po 淇濆瓨鍙栨按鍙orm琛ㄥ崟瀵硅薄
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "缂栬緫淇敼鍙栨按鍙�", description = "鎻愪氦鍙栨按鍙f暟鎹紙form琛ㄥ崟锛夛紝杩涜淇敼")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ int count;
+ Date operateTime = new Date();
+ po.setOperateDt(operateTime);
+ try {
+ count = this.intakeSv.update(po);
+ } catch (Exception e) {
+ log.error("淇濆瓨鍒嗘按鍙e紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+ /**
+ * 鍒犻櫎鍙栨按鍙�
+ * @param id 鍙栨按鍙D
+ * @return 鏄惁鎴愬姛
+ */
+ @Operation(summary = "鍒犻櫎鍒嗘按鍙�", description = "鎻愪氦鍙栨按鍙D锛岃繘琛岄�昏緫鍒犻櫎")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @GetMapping(path = "delete/{id}")
+ @SsoAop()
+ public BaseResponse<Boolean> delete(@PathVariable("id") Long id){
+ if(id == null){
+ return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖") ;
+ }
+ int count;
+ try {
+ count = this.intakeSv.delete(id);
+ } catch (Exception e) {
+ log.error("淇濆瓨鍒嗘按鍙e紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ if(count <= 0){
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�") ;
+ }else{
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+ }
+
+ /**
+ * 瀵煎嚭鍙栨按鍙e垪琛�
+ * @param response
+ * @param vo
+ */
+ @SneakyThrows(IOException.class)
+ @GetMapping(value = "exportIntakes")
+ public void exportIntakes(HttpServletResponse response, QueryVo vo) {
+ setExcelRespProp(response, "鍙栨按鍙e垪琛�");
+ //List<VoDivide> memberList = LocalJsonUtil.getListFromJson("json/members.json", VoDivide.class);
+ List<VoIntake> memberList = intakeSv.exportIntakes(vo);
+
+ EasyExcel.write(response.getOutputStream())
+ .head(VoIntake.class)
+ .excelType(ExcelTypeEnum.XLSX)
+ .sheet("鍙栨按鍙e垪琛�")
+ .doWrite(memberList);
+ }
+
+ /**
+ * 瀵煎叆鍙栨按鍙e垪琛�
+ * @param file
+ */
+ @SneakyThrows
+ @PostMapping(value = "importIntakes")
+ @ResponseBody
+ public BaseResponse<Boolean> importIntakes(@RequestPart("file") MultipartFile file) {
+ List<VoIntake> memberList = EasyExcel.read(file.getInputStream())
+ .head(VoIntake.class)
+ .sheet()
+ .doReadSync();
+ return BaseResponseUtils.buildSuccess(memberList) ;
+ }
+
+ /**
+ * 璁剧疆excel涓嬭浇鍝嶅簲澶村睘鎬�
+ */
+ private void setExcelRespProp(HttpServletResponse response, String rawFileName) throws UnsupportedEncodingException {
+ response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+ response.setCharacterEncoding("utf-8");
+ String fileName = URLEncoder.encode(rawFileName, "UTF-8").replaceAll("\\+", "%20");
+ response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
+ }
+}
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
new file mode 100644
index 0000000..e8cfeca
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -0,0 +1,142 @@
+package com.dy.pipIrrProject.intake;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoPr.PrIntakeMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrIntake;
+import com.dy.pipIrrGlobal.voPr.VoIntake;
+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;
+
+/**
+ * @author wuzeyu
+ * @date 2023/12/26 11:12
+ * @LastEditTime 2023/12/26 11:12
+ * @Description 鍙栨按鍙f湇鍔$被
+ */
+
+@Slf4j
+@Service
+public class IntakeSv {
+ @Autowired
+ private PrIntakeMapper prIntakeMapper;
+
+ /**
+ * 娣诲姞鍙栨按鍙�
+ *
+ * @param po
+ * @return
+ */
+ @Transactional
+ Integer addIntake(PrIntake po) {
+ if (po.getTownId()==null||po.getTownId()==0)
+ {
+ Long townId=getSupperByVillageId(po.getVillageId());
+ po.setTownId(townId);
+ }
+ if (po.getCountyId()==null||po.getCountyId()==0)
+ {
+ Long countyId=getSupperByVillageId(getSupperByVillageId(po.getVillageId()));
+ po.setCountyId(countyId);
+ }
+ return prIntakeMapper.insertSelective(po);
+ }
+ public Long getSupperByVillageId(long vaId){
+ return prIntakeMapper.getSupperByVillageId(vaId);
+ }
+
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 鏁伴噺
+ */
+
+ public int update(PrIntake po){
+ if (po.getTownId()==null||po.getTownId()==0)
+ {
+ Long townId=getSupperByVillageId(po.getVillageId());
+ po.setTownId(townId);
+ }
+ if (po.getCountyId()==null||po.getCountyId()==0)
+ {
+ Long countyId=getSupperByVillageId(getSupperByVillageId(po.getVillageId()));
+ po.setCountyId(countyId);
+ }
+ return this.prIntakeMapper.updateByPrimaryKeySelective(po) ;
+// return this.prIntakeMapper.updateByPrimaryKey(po);
+ }
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍙栨按鍙h褰�
+ *
+ * @param queryVo 鏌ヨ瑙嗗浘
+ * @return 鍙栨按鍙h褰曞垪琛�
+ */
+ public QueryResultVo<List<VoIntake>> getIntakes(QueryVo queryVo) {
+ 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;
+ }
+
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢瀵煎嚭鍙栨按鍙e垪琛�
+ *
+ * @param queryVo
+ * @return
+ */
+ public List<VoIntake> exportIntakes(QueryVo queryVo) {
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
+ List<VoIntake> rsVo = prIntakeMapper.getIntakes(params);
+ return rsVo;
+ }
+
+ /**
+ * 寰楀埌鎵�鏈夊彇姘村彛
+ * @return 鎵�鏈夊彇姘村彛闆嗗悎
+ */
+ public QueryResultVo<List<PrIntake>> selectAll() {
+ QueryResultVo<List<PrIntake>> rsVo = new QueryResultVo<>() ;
+ rsVo.obj = this.prIntakeMapper.selectAll() ;
+ return rsVo ;
+ }
+
+ /**
+ * 寰楀埌涓�涓彇姘村彛
+ * @param id 鍙栨按鍙D
+ * @return 鍙栨按鍙e疄浣�
+ */
+ public PrIntake selectById(Long id) {
+ return this.prIntakeMapper.selectByPrimaryKey(id) ;
+ }
+
+ /**
+ * 閫昏緫鍒犻櫎瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.prIntakeMapper.deleteLogicById(id) ;
+ }
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栨湭鍒犻櫎鐨勫彇姘村彛鏁伴噺
+ * @param intakeId
+ * @return
+ */
+ public Integer getRecordCountOfIntake(Long intakeId) {
+ return prIntakeMapper.getRecordCountOfIntake(intakeId);
+ }
+}
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
new file mode 100644
index 0000000..4535b06
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/QueryVo.java
@@ -0,0 +1,29 @@
+package com.dy.pipIrrProject.intake;
+
+import com.dy.common.webUtil.QueryConditionVo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ToString(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Schema(name = "鍙栨按鍙f煡璇㈡潯浠�")
+public class QueryVo extends QueryConditionVo {
+ @Schema(description = "鍙栨按鍙e悕绉�")
+ public String intakeName;
+
+ @Schema(description = "鎵�灞炲垎姘存埧")
+ public String divideName;
+
+ @Schema(description = "鎵�灞炵墖鍖�")
+ public String blockName;
+
+ @Schema(description = "鏄惁缁戝畾璁惧")
+ public String isBind;
+
+ @Schema(description = "鍦板潃")
+ public String address;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoIntakeController.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoIntakeController.java
new file mode 100644
index 0000000..451f3a5
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoIntakeController.java
@@ -0,0 +1,48 @@
+package com.dy.pipIrrProject.intakeController;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 10:53
+ * @LastEditTime 2024-01-02 10:53
+ * @Description
+ */
+
+@Data
+@Schema(name = "鍙栨按鍙c�佹帶鍒跺櫒缁戝畾鍏崇郴浼犲叆瀵硅薄")
+public class DtoIntakeController {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 鍙栨按鍙g紪鍙�
+ */
+ @Schema(description = "鍙栨按鍙D", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鍙栨按鍙D涓嶈兘涓虹┖")
+ private Long intakeId;
+
+ /**
+ * 鎺у埗鍣ㄧ紪鍙�
+ */
+ @Schema(description = "鎺у埗鍣↖D", requiredMode = Schema.RequiredMode.REQUIRED)
+ @NotNull(message = "鎺у埗鍣↖D涓嶈兘涓虹┖")
+ private Long controllerId;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoToPojo.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoToPojo.java
new file mode 100644
index 0000000..6de4a26
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/DtoToPojo.java
@@ -0,0 +1,23 @@
+package com.dy.pipIrrProject.intakeController;
+
+import com.dy.pipIrrGlobal.pojoPr.PrIntakeController;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 10:59
+ * @LastEditTime 2024-01-02 10:59
+ * @Description DtoToPojo 杞� PrIntakeController
+ */
+
+@Mapper
+public interface DtoToPojo {
+ DtoToPojo INSTANCT = Mappers.getMapper(DtoToPojo.class);
+ @Mapping(target = "intakeid", source = "intakeId")
+ @Mapping(target = "controllerid", source = "controllerId")
+ @Mapping(target = "remarks", source = "remarks")
+ @Mapping(target = "operator", source = "operator")
+ PrIntakeController po2vo(DtoIntakeController po);
+}
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
new file mode 100644
index 0000000..1384dfa
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerCtrl.java
@@ -0,0 +1,195 @@
+package com.dy.pipIrrProject.intakeController;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoBa.BaClient;
+import com.dy.pipIrrGlobal.pojoPr.PrIntakeController;
+import com.dy.pipIrrProject.controller.ControllerSv;
+import com.dy.pipIrrProject.intake.IntakeSv;
+import com.dy.pipIrrProject.result.ProjectResultCode;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 9:18
+ * @LastEditTime 2024-01-02 9:18
+ * @Description
+ */
+
+@Slf4j
+@Tag(name = "鍙栨按鍙�/鎺у埗鍣ㄥ叧鑱旂鐞�", description = "鍙栨按鍙�/鎺у埗鍣ㄥ叧鑱旀搷浣�")
+@RestController
+@RequestMapping(path="intake_controller")
+@RequiredArgsConstructor
+public class IntakeControllerCtrl {
+ private final IntakeControllerSv intakeControllerSv;
+ private final IntakeSv intakeSv;
+ private final ControllerSv controllerSv;
+
+ /**
+ * 娣诲姞鍙栨按鍙�/鎺у埗鍣ㄦ崋缁戣褰�
+ * 鑻ュ彇姘村彛鎴栨帶鍒跺櫒涓嶅瓨鍦ㄩ渶鎻愮ず鐢ㄦ埛
+ * 鑻ュ彇姘村彛宸茬粡涓庢帶鍒跺櫒缁戝畾闇�鎻愮ず鐢ㄦ埛
+ */
+ @Operation(summary = "娣诲姞缁戝畾璁板綍", description = "娣诲姞缁戝畾璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "bind", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> bind(@RequestBody @Valid DtoIntakeController po, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ // 鏍规嵁缂栧彿鍒嗗埆鑾峰彇鍙栨按鍙c�佹帶鍒跺櫒鏈垹闄よ褰曟暟
+ Integer recIntke = Optional.ofNullable(intakeSv.getRecordCountOfIntake(po.getIntakeId())).orElse(0);
+ Integer recController = Optional.ofNullable(controllerSv.getRecordCountOfController(po.getControllerId())).orElse(0);
+ if(recIntke == 0 || recController == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_OR_CONTROLLER_NO_EXIST.getMessage());
+ }
+
+ Integer recordCount = Optional.ofNullable(intakeControllerSv.getBindRecordCount(po.getIntakeId(), po.getControllerId(), (byte)1)).orElse(0);
+ if(recordCount > 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_HAS_BINDED_CONTROLLER.getMessage());
+ }
+
+ PrIntakeController prIntakeController = DtoToPojo.INSTANCT.po2vo(po);
+ Date operateTime = new Date();
+ prIntakeController.setOperatedt(operateTime);
+ prIntakeController.setOperatetype((byte)1);
+
+ Integer rec = Optional.ofNullable(intakeControllerSv.addRecord(prIntakeController)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.BIND_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 娣诲姞鍙栨按鍙�/鎺у埗鍣ㄨВ缁戣褰�
+ * 1. 鍒ゆ柇鍙栨按鍙f槸鍚﹀瓨鍦�
+ * 2. 鍒ゆ柇鎺у埗鍣ㄦ槸鍚﹀瓨鍦�
+ * 3. 鍒ゆ柇鍙栨按鍙c�佹帶鍒跺櫒瑙g粦鍏崇郴鏄惁宸插瓨鍦�
+ */
+ @Operation(summary = "娣诲姞瑙g粦璁板綍", description = "娣诲姞瑙g粦璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "unbind", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> unbind(@RequestBody @Valid DtoIntakeController po, BindingResult bindingResult){
+ if(bindingResult != null && bindingResult.hasErrors()){
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ // 鏍规嵁缂栧彿鍒嗗埆鑾峰彇鍙栨按鍙c�佹帶鍒跺櫒鏈垹闄よ褰曟暟
+ Integer recIntke = Optional.ofNullable(intakeSv.getRecordCountOfIntake(po.getIntakeId())).orElse(0);
+ Integer recController = Optional.ofNullable(controllerSv.getRecordCountOfController(po.getControllerId())).orElse(0);
+ if(recIntke == 0 || recController == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_OR_CONTROLLER_NO_EXIST.getMessage());
+ }
+
+ Integer recordCount = Optional.ofNullable(intakeControllerSv.getBindRecordCount(po.getIntakeId(), po.getControllerId(), (byte)2)).orElse(0);
+ if(recordCount > 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_CONTROLLER_HAS_UNBOUND.getMessage());
+ }
+
+ PrIntakeController prIntakeController = DtoToPojo.INSTANCT.po2vo(po);
+ Date operateTime = new Date();
+ prIntakeController.setOperatedt(operateTime);
+ prIntakeController.setOperatetype((byte)2);
+
+ Integer rec = Optional.ofNullable(intakeControllerSv.addRecord(prIntakeController)).orElse(0);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.BIND_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�
+ * @param intakeId 鍙栨按鍙g紪鍙�
+ * @return 鍙栨按鍙d笅鎺у埗鍣ㄧ殑缁戝畾銆佽В缁戣褰�
+ */
+ @Operation(summary = "鑾峰緱鍙栨按鍙d笅鎺у埗鍣ㄧ粦瀹氬強瑙g粦璁板綍", description = "杩斿洖鍙栨按鍙d笅鎺у埗鍣ㄧ粦瀹氬強瑙g粦鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖鍏ㄩ儴缁戝畾鍙婅В缁戞暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = BaClient.class))}
+ )
+ })
+ @GetMapping(path = "intake_binds")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<Map<String, Object>>>> getBindsByIntakeId(Long intakeId){
+ try {
+ List<Map<String, Object>> list = Optional.ofNullable(intakeControllerSv.getBindsByIntakeId(intakeId)).orElse(new ArrayList<>());
+ if(list.size() <= 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_NO_RECORDS.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(list);
+ } catch (Exception e) {
+ log.error("鏌ヨ鍐滄埛寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�
+ * @param controllerId 鎺у埗鍣ㄧ紪鍙�
+ * @return 涓庤鎺у埗鍣ㄧ浉鍏崇殑缁戝畾銆佽В缁戣褰�
+ */
+ @Operation(summary = "鑾峰緱鎺у埗鍣ㄤ笌鍙栨按鍙g粦瀹氬強瑙g粦璁板綍", description = "杩斿洖鎺у埗鍣ㄤ笌鍙栨按鍙g粦瀹氬強瑙g粦鏁版嵁")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖鍏ㄩ儴缁戝畾鍙婅В缁戞暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = BaClient.class))}
+ )
+ })
+ @GetMapping(path = "controller_binds")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<Map<String, Object>>>> getBindsByControllerId(Long controllerId){
+ try {
+ List<Map<String, Object>> list = Optional.ofNullable(intakeControllerSv.getBindsByControllerId(controllerId)).orElse(new ArrayList<>());
+ if(list.size() <= 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.CONTROLLER_NO_RECORDS.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(list);
+ } catch (Exception e) {
+ log.error("鏌ヨ鍐滄埛寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerSv.java
new file mode 100644
index 0000000..42a8910
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intakeController/IntakeControllerSv.java
@@ -0,0 +1,62 @@
+package com.dy.pipIrrProject.intakeController;
+
+import com.dy.pipIrrGlobal.daoPr.PrIntakeControllerMapper;
+import com.dy.pipIrrGlobal.pojoPr.PrIntakeController;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-01-02 9:19
+ * @LastEditTime 2024-01-02 9:19
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class IntakeControllerSv {
+ @Autowired
+ private PrIntakeControllerMapper prIntakeControllerMapper;
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙枫�佹帶鍒跺櫒缂栧彿銆佹搷浣滅被鍒幏鍙栬褰曟暟閲�
+ * 閲嶅缁戝畾銆侀噸澶嶈В缁戦兘鐢ㄨ鏂规硶鍒ゆ柇
+ * @param intakeId 鍙栨按鍙D
+ * @param controllerId 鎺у埗鍣↖D
+ * @param operateType 鎿嶄綔绫诲瀷 1-鎹嗙粦锛�2-瑙g粦
+ * @return 濡備綍鏉′欢璁板綍鏁�
+ */
+ Integer getBindRecordCount(Long intakeId, Long controllerId, Byte operateType) {
+ return prIntakeControllerMapper.getBindRecordCount(intakeId, controllerId, operateType);
+ }
+ /**
+ * 娣诲姞鍙栨按鍙c�佹帶鍒跺櫒鎹嗙粦璁板綍锛�1-鎹嗙粦锛�2-瑙g粦
+ * @param po 鍙栨按鍙�/鎺у埗鍣ㄥ疄浣撳璞�
+ * @return
+ */
+ Integer addRecord(PrIntakeController po) {
+ return prIntakeControllerMapper.insert(po);
+ }
+
+ /**
+ * 鏍规嵁鍙栨按鍙g紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�
+ * @param intakeId 鍙栨按鍙g紪鍙�
+ * @return 鍙栨按鍙d笌鎺у埗鍣ㄧ粦瀹氬垪琛�
+ */
+ List<Map<String, Object>> getBindsByIntakeId(Long intakeId) {
+ return prIntakeControllerMapper.getBindsByIntakeId(intakeId);
+ }
+
+ /**
+ * 鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栫粦瀹氳褰曞垪琛�
+ * @param controllerId 鎺у埗鍣ㄧ紪鍙�
+ * @return 鍙栨按鍙d笌鎺у埗鍣ㄧ粦瀹氬垪琛�
+ */
+ List<Map<String, Object>> getBindsByControllerId(Long controllerId) {
+ return prIntakeControllerMapper.getBindsByControllerId(controllerId);
+ }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/result/ProjectResultCode.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/result/ProjectResultCode.java
index 30cfe28..2de0a20 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/result/ProjectResultCode.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/result/ProjectResultCode.java
@@ -25,7 +25,41 @@
/**
* 鎺у埗鍣�
*/
- CONTROLLER_FAIL(30001, "鎺у埗鍣ㄦ坊鍔犲け璐�");
+ CONTROLLER_FAIL(30001, "鎺у埗鍣ㄦ坊鍔犲け璐�"),
+ NO_RECORDS(30002, "娌℃湁绗﹀悎鏉′欢鐨勬帶鍒跺櫒鏁版嵁"),
+ PLEASE_INPUT_CONTROLLER_ID(30003, "璇疯緭鍏ユ帶鍒跺櫒缂栧彿"),
+ DELETE_CONTROLLER_FAIL(30004, "鎺у埗鍣ㄥ垹闄ゅけ璐�"),
+
+ /**
+ * 鍙栨按鍙c�佹帶鍒跺櫒鍏宠仈
+ */
+ INTAKE_HAS_BINDED_CONTROLLER(40001, "鍙栨按鍙d笌鎺у埗鍣ㄥ凡缁戝畾"),
+ BIND_FAIL(40002, "鍙栨按鍙d笌鎺у埗鍣ㄧ粦瀹氬け璐�"),
+ INTAKE_CONTROLLER_HAS_UNBOUND(40003, "鍙栨按鍙d笌鎺у埗鍣ㄥ凡瑙g粦"),
+ INTAKE_NO_RECORDS(40004, "璇ュ彇姘村彛鏃犵粦瀹氳褰�"),
+ CONTROLLER_NO_RECORDS(40005, "璇ユ帶鍒跺櫒鏃犵粦瀹氳褰�"),
+ INTAKE_OR_CONTROLLER_NO_EXIST(40006, "鍙栨按鍙f垨鎺у埗鍣ㄤ笉瀛樺湪"),
+
+ /**
+ * 娴侀噺鐩戞祴绔�
+ */
+ FLOW_MONITORING_FAIL(50001, "娴侀噺鐩戞祴绔欐坊鍔犲け璐�"),
+ PLEASE_INPUT_FLOW_MONITORING_ID(50002, "璇疯緭鍏ユ祦閲忕洃娴嬬珯缂栧彿"),
+ DELETE_FLOW_MONITORING_FAIL(50003, "娴侀噺鐩戞祴绔欏垹闄ゅけ璐�"),
+
+ /**
+ * 娴侀噺璁�
+ */
+ ADD_FLOWMETER_FAIL(60001, "娴侀噺璁℃坊鍔犲け璐�"),
+ DELETE_FLOWMETER_FAIL(60002, "娴侀噺璁″垹闄ゅけ璐�"),
+
+ /**
+ * 娴侀噺鐩戞祴绔欍�佹祦閲忚鍏宠仈
+ */
+ MONITORING_HAS_BINDED_FLOWMETER(70001, "娴侀噺鐩戞祴绔欎笌娴侀噺璁″凡缁戝畾"),
+ MONITORING_FLOWMETER_BIND_FAIL(70002, "娴侀噺鐩戞祴绔欎笌娴侀噺璁$粦瀹氬け璐�"),
+ STATION_OR_FLOWMETER_NO_EXIST(70003, "娴侀噺鐩戞祴绔欐垨娴侀噺璁′笉瀛樺湪"),
+ STATION_FLOWMETER_HAS_UNBOUND(70004, "娴侀噺鐩戞祴绔欎笌娴侀噺璁″凡瑙g粦");
private final Integer code;
private final String message;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java
index 756847a..99e7eae 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java
@@ -15,7 +15,6 @@
import com.dy.pipIrrSell.recharge.RechargeCtrl;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -66,7 +65,6 @@
schema = @Schema(implementation = VoActiveCard.class))}
)
})
- //@GetMapping(path = "/getActiveCards", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(path = "/getActiveCards")
@SsoAop()
public BaseResponse<QueryResultVo<List<VoActiveCard>>> getActiveCards(QueryVo vo){
@@ -97,7 +95,7 @@
@PostMapping(path = "add_active", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add_active(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add_active(@RequestBody @Valid DtoActiveCard po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -241,7 +239,7 @@
@PostMapping(path = "add_reissue", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add_reissue(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add_reissue(@RequestBody @Valid DtoActiveCard po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java
index a468b19..ce46b37 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java
@@ -13,7 +13,6 @@
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -79,7 +78,7 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoCancel po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoCancel po, BindingResult bindingResult){
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
index 1e5e8ed..ae5d363 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
@@ -9,7 +9,6 @@
import com.dy.pipIrrGlobal.pojoSe.SeClient;
import com.dy.pipIrrGlobal.voSe.VoClient;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -163,7 +162,7 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoClient po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoClient po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -273,7 +272,7 @@
@PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> update(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoClient po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> update(@RequestBody @Valid DtoClient po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java
index b0a4ab0..2c4df3c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java
@@ -13,7 +13,6 @@
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -78,7 +77,7 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoLoss po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoLoss po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
index aa9101b..449dc2d 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
@@ -13,7 +13,6 @@
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -72,7 +71,7 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoRecharge po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java
index c2705d5..e27c0f5 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java
@@ -12,7 +12,6 @@
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -77,7 +76,7 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoReversal po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoReversal po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
index 8d924cd..51956dd 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
@@ -12,7 +12,6 @@
import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -78,7 +77,7 @@
@PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoUnlock po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add(@RequestBody @Valid DtoUnlock po, BindingResult bindingResult){
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
if(bindingResult != null && bindingResult.hasErrors()){
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wallet/WalletCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wallet/WalletCtrl.java
index d45bf72..8eecd2c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wallet/WalletCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/wallet/WalletCtrl.java
@@ -83,7 +83,7 @@
//@PostMapping(path = "addRecharge")
//@Transactional(rollbackFor = Exception.class)
//@SsoAop()
- //public BaseResponse<Boolean> addRecharge(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoWalletRecharge po, @Parameter(hidden = true) BindingResult bindingResult){
+ //public BaseResponse<Boolean> addRecharge(@RequestBody @Valid DtoWalletRecharge po, @Parameter(hidden = true) BindingResult bindingResult){
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// if(bindingResult != null && bindingResult.hasErrors()){
// return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
--
Gitblit v1.8.0