From ea58523b67ad59002a1191c3c564258c5b81f6f2 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 06 五月 2025 17:35:16 +0800 Subject: [PATCH] Revert "1、实现万用token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。" --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml index c0d4f0e..29835ac 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowMonitoringMapper.xml @@ -211,43 +211,52 @@ <select id="getRecordCountOfFlowMonitoring" resultType="java.lang.Integer"> SELECT COUNT(*) AS recordCountOfFlowMonitoring from pr_flow_monitoring pfm - INNER JOIN ba_district country ON pfm.countyId = country.id - INNER JOIN ba_district town ON pfm.townId = town.id - INNER JOIN ba_district village ON pfm.villageId = village.id - INNER JOIN pr_monitoring_flowmeter pmofl ON pmofl.monitoringId = pfm.id + LEFT JOIN pr_flowmeter pf ON pf.monitoringId = pfm.id + LEFT JOIN ba_district country ON pfm.countyId = country.id + LEFT JOIN ba_district town ON pfm.townId = town.id + LEFT JOIN ba_district village ON pfm.villageId = village.id <where> pfm.deleted = 0 <if test = "name != null and name !=''"> AND pfm.`name` like CONCAT('%',#{name},'%') </if> - <if test = "bindState != null and bindState > 0"> - AND pmofl.operateType = ${bindState} + <if test = "bindState ==1 "> + AND pf.monitoringId IS NOT NULL + </if> + <if test = "bindState ==2 or bindState =='' "> + AND pf.monitoringId IS NULL </if> </where> </select> <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇娴侀噺鐩戞祴绔欏疄浣撹褰�--> <select id="getPrFlowMonitoring" parameterType="map" resultType="com.dy.pipIrrGlobal.voPr.VoFlowMonitoring"> - select (@i:=@i+1) AS id, + select CAST(pfm.id AS char) AS id, CONCAT(country.`name`, town.`name`, village.`name`) AS address, pfm.`name` AS `name`, - pmofl.operateType AS bindState + (CASE + WHEN pf.monitoringId IS NOT NULL THEN "宸茬粦瀹�" + WHEN pf.monitoringId IS NULL THEN "鏈粦瀹�" + END) AS bindState from pr_flow_monitoring pfm - INNER JOIN ba_district country ON pfm.countyId = country.id - INNER JOIN ba_district town ON pfm.townId = town.id - INNER JOIN ba_district village ON pfm.villageId = village.id - INNER JOIN pr_monitoring_flowmeter pmofl ON pmofl.monitoringId = pfm.id, - (SELECT @i:=0) AS itable + LEFT JOIN pr_flowmeter pf ON pf.monitoringId = pfm.id + LEFT JOIN ba_district country ON pfm.countyId = country.id + LEFT JOIN ba_district town ON pfm.townId = town.id + LEFT JOIN ba_district village ON pfm.villageId = village.id + <where> pfm.deleted = 0 <if test = "name != null and name !=''"> AND pfm.`name` like CONCAT('%',#{name},'%') </if> - <if test = "bindState != null and bindState > 0"> - AND pmofl.operateType = ${bindState} + <if test = "bindState ==1 "> + AND pf.monitoringId IS NOT NULL + </if> + <if test = "bindState ==2 or bindState =='' "> + AND pf.monitoringId IS NULL </if> </where> - ORDER BY pmofl.operateDt DESC + ORDER BY pfm.operateDt DESC <trim prefix="limit " > <if test="start != null and count != null"> #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} -- Gitblit v1.8.0