From f954d7dc5a957f7a54c30b40d27f7db5ef79abca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=95=B8=E9=9D=9E?= <8153694@qq.com>
Date: Tue, 2 Jul 2024 21:25:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F=E6=8E=A5?=
 =?UTF-8?q?=E5=85=A5=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../xhx/module/ph/model/vo/PhQueueStatVo.java | 47 ++-----------------
 .../xhx/module/ph/model/vo/PhQueueVo.java     |  2 +
 .../xhx/module/stat/model/vo/StatVo.java      | 45 ++----------------
 .../sqlmap/module/ph/PhQueueStatMapperExt.xml | 22 +++++++++
 .../sqlmap/module/stat/StatMapperExt.xml      | 22 +++++++++
 5 files changed, 54 insertions(+), 84 deletions(-)

diff --git a/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueStatVo.java b/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueStatVo.java
index 97b587b..5254cab 100644
--- a/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueStatVo.java
+++ b/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueStatVo.java
@@ -28,49 +28,10 @@ public class PhQueueStatVo extends BaseEntityLong {
 
     private List<String> hallNameList;
 
-    /** 寮€濮� 骞� */
-    private Integer yearStart;
+    /** 寮€濮� 璇勪环鏃堕棿 */
+    private String timeStart;
 
-    /** 缁撴潫 骞� */
-    private Integer yearEnd;
-
-    /** 澧炲姞 骞� */
-    private Integer yearIncrement;
-
-    /** 骞村垪琛� */
-    private List <Integer> yearList;
-
-    /** 骞存帓闄ゅ垪琛� */
-    private List <Integer> yearNotList;
-
-    /** 寮€濮� 鏈� */
-    private Integer monthStart;
-
-    /** 缁撴潫 鏈� */
-    private Integer monthEnd;
-
-    /** 澧炲姞 鏈� */
-    private Integer monthIncrement;
-
-    /** 鏈堝垪琛� */
-    private List <Integer> monthList;
-
-    /** 鏈堟帓闄ゅ垪琛� */
-    private List <Integer> monthNotList;
-
-    /** 寮€濮� 鏃� */
-    private Integer dayStart;
-
-    /** 缁撴潫 鏃� */
-    private Integer dayEnd;
-
-    /** 澧炲姞 鏃� */
-    private Integer dayIncrement;
-
-    /** 鏃ュ垪琛� */
-    private List <Integer> dayList;
-
-    /** 鏃ユ帓闄ゅ垪琛� */
-    private List <Integer> dayNotList;
+    /** 缁撴潫 璇勪环鏃堕棿 */
+    private String timeEnd;
 
 }
\ No newline at end of file
diff --git a/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueVo.java b/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueVo.java
index ed8e935..867a0e6 100644
--- a/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueVo.java
+++ b/bill-manager/src/main/java/com/mortals/xhx/module/ph/model/vo/PhQueueVo.java
@@ -33,4 +33,6 @@ public class PhQueueVo extends BaseEntityLong {
     @MobileDesensitize
     private String peoplePhone;
 
+
+
 }
\ No newline at end of file
diff --git a/bill-manager/src/main/java/com/mortals/xhx/module/stat/model/vo/StatVo.java b/bill-manager/src/main/java/com/mortals/xhx/module/stat/model/vo/StatVo.java
index 97c84e4..fa69346 100644
--- a/bill-manager/src/main/java/com/mortals/xhx/module/stat/model/vo/StatVo.java
+++ b/bill-manager/src/main/java/com/mortals/xhx/module/stat/model/vo/StatVo.java
@@ -24,47 +24,10 @@ public class StatVo extends BaseEntityLong {
     /** 缁撴潫 鍒涘缓鏃堕棿 */
     private String createTimeEnd;
 
-    /** 寮€濮� 骞� */
-    private Integer yearStart;
+    /** 寮€濮� 璇勪环鏃堕棿 */
+    private String timeStart;
 
-    /** 缁撴潫 骞� */
-    private Integer yearEnd;
-
-    /** 澧炲姞 骞� */
-    private Integer yearIncrement;
-
-    /** 骞村垪琛� */
-    private List <Integer> yearList;
-
-    /** 骞存帓闄ゅ垪琛� */
-    private List <Integer> yearNotList;
-
-    /** 寮€濮� 鏈� */
-    private Integer monthStart;
-
-    /** 缁撴潫 鏈� */
-    private Integer monthEnd;
-
-    /** 澧炲姞 鏈� */
-    private Integer monthIncrement;
-
-    /** 鏈堝垪琛� */
-    private List <Integer> monthList;
-
-    /** 鏈堟帓闄ゅ垪琛� */
-    private List <Integer> monthNotList;
-
-    /** 寮€濮� 鏃� */
-    private Integer dayStart;
-
-    /** 缁撴潫 鏃� */
-    private Integer dayEnd;
-
-
-    /** 鏃ュ垪琛� */
-    private List <Integer> dayList;
-
-    /** 鏃ユ帓闄ゅ垪琛� */
-    private List <Integer> dayNotList;
+    /** 缁撴潫 璇勪环鏃堕棿 */
+    private String timeEnd;
 
 }
\ No newline at end of file
diff --git a/bill-manager/src/main/resources/sqlmap/module/ph/PhQueueStatMapperExt.xml b/bill-manager/src/main/resources/sqlmap/module/ph/PhQueueStatMapperExt.xml
index 026a23c..64a0d72 100644
--- a/bill-manager/src/main/resources/sqlmap/module/ph/PhQueueStatMapperExt.xml
+++ b/bill-manager/src/main/resources/sqlmap/module/ph/PhQueueStatMapperExt.xml
@@ -27,9 +27,31 @@
             where
             <trim prefixOverrides="and" prefix="">
                 <include refid="_condition_"/>
+                <include refid="_condition_two_"/>
             </trim>
         </trim>
         <include refid="_group_by_"/>
         <include refid="_orderCols_"/>
     </select>
+
+    <!-- 鏉′欢鏄犲皠 -->
+    <sql id="_condition_two_">
+        <if test="condition != null and !condition.isEmpty()">
+            <!-- 鏉′欢鏄犲皠-鏅€氭潯浠� -->
+            <include refid="_condition_param_two_">
+                <property name="_conditionParam_" value="condition"/>
+                <property name="_conditionType_" value="and"/>
+            </include>
+        </if>
+    </sql>
+
+    <sql id="_condition_param_two_">
+        <bind name="conditionParamRef" value="${_conditionParam_}"/>
+        <if test="conditionParamRef.containsKey('timeStart') and conditionParamRef.timeStart != null and conditionParamRef.timeStart!=''">
+            ${_conditionType_} STR_TO_DATE(CONCAT(`year`,'-',`month`,'-',`day`),'%Y-%m-%d')<![CDATA[ >= ]]>STR_TO_DATE(#{${_conditionParam_}.timeStart},'%Y-%m-%d')
+        </if>
+        <if test="conditionParamRef.containsKey('timeEnd') and conditionParamRef.timeEnd != null and conditionParamRef.timeEnd!=''">
+            ${_conditionType_}  STR_TO_DATE(CONCAT(`year`,'-',`month`,'-',`day`),'%Y-%m-%d')<![CDATA[ <= ]]>STR_TO_DATE(#{${_conditionParam_}.timeEnd},'%Y-%m-%d')
+        </if>
+    </sql>
 </mapper>
\ No newline at end of file
diff --git a/bill-manager/src/main/resources/sqlmap/module/stat/StatMapperExt.xml b/bill-manager/src/main/resources/sqlmap/module/stat/StatMapperExt.xml
index 90424a7..02e9273 100644
--- a/bill-manager/src/main/resources/sqlmap/module/stat/StatMapperExt.xml
+++ b/bill-manager/src/main/resources/sqlmap/module/stat/StatMapperExt.xml
@@ -22,9 +22,31 @@
             where
             <trim prefixOverrides="and" prefix="">
                 <include refid="_condition_"/>
+                <include refid="_condition_two_"/>
             </trim>
         </trim>
         <include refid="_group_by_"/>
         <include refid="_orderCols_"/>
     </select>
+
+    <!-- 鏉′欢鏄犲皠 -->
+    <sql id="_condition_two_">
+        <if test="condition != null and !condition.isEmpty()">
+            <!-- 鏉′欢鏄犲皠-鏅€氭潯浠� -->
+            <include refid="_condition_param_two_">
+                <property name="_conditionParam_" value="condition"/>
+                <property name="_conditionType_" value="and"/>
+            </include>
+        </if>
+    </sql>
+
+    <sql id="_condition_param_two_">
+        <bind name="conditionParamRef" value="${_conditionParam_}"/>
+        <if test="conditionParamRef.containsKey('timeStart') and conditionParamRef.timeStart != null and conditionParamRef.timeStart!=''">
+            ${_conditionType_} STR_TO_DATE(CONCAT(`year`,'-',`month`,'-',`day`),'%Y-%m-%d')<![CDATA[ >= ]]>STR_TO_DATE(#{${_conditionParam_}.timeStart},'%Y-%m-%d')
+        </if>
+        <if test="conditionParamRef.containsKey('timeEnd') and conditionParamRef.timeEnd != null and conditionParamRef.timeEnd!=''">
+            ${_conditionType_}  STR_TO_DATE(CONCAT(`year`,'-',`month`,'-',`day`),'%Y-%m-%d')<![CDATA[ <= ]]>STR_TO_DATE(#{${_conditionParam_}.timeEnd},'%Y-%m-%d')
+        </if>
+    </sql>
 </mapper>
\ No newline at end of file
-- 
2.24.3