From f14c50cb0036d3ddd655ce4e34732ba396a836c4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:42:03 +0800
Subject: [PATCH] optimize 统计

---
 java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
index 461785a..116c52a 100755
--- a/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="repairServiceDaoImpl">
 
@@ -140,7 +139,7 @@
         t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id repairObjId,
         t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext,a.appraise_score
         appraiseScore, a.door_speed_score doorSpeedScore,a.repairman_service_score repairmanServiceScore,
-        t.pay_type,t.pay_type payType,rs.repair_setting_type repairSettingType,d1.name repairSettingTypeName
+        t.pay_type,t.pay_type payType,rs.repair_setting_type repairSettingType,d1.name repairSettingTypeName,t.create_time createTime
         <if test="staffId != null and staffId != ''">
             ,rru.state repairDispatchState,rru.context repairDispatchContext,td.name repairDispatchStateName
         </if>
@@ -179,6 +178,9 @@
         </if>
         <if test="repairName !=null and repairName != ''">
             and t.repair_name like '%${repairName}%'
+        </if>
+        <if test="repairNameLike !=null and repairNameLike != ''">
+            and t.repair_name like concat('%',#{repairNameLike},'%')
         </if>
         <if test="appointmentTime !=null ">
             and t.appointment_time= #{appointmentTime}
@@ -324,6 +326,9 @@
         <if test="repairName !=null and repairName != ''">
             and t.repair_name like '%${repairName}%'
         </if>
+        <if test="repairNameLike !=null and repairNameLike != ''">
+            and t.repair_name like concat('%',#{repairNameLike},'%')
+        </if>
         <if test="appointmentTime !=null ">
             and t.appointment_time= #{appointmentTime}
         </if>
@@ -372,6 +377,9 @@
         <if test="repairObjId !=null and repairObjId != ''">
             and t.repair_obj_id= #{repairObjId}
         </if>
+        <if test="maintenanceType !=null and maintenanceType != ''">
+            and t.maintenance_type= #{maintenanceType}
+        </if>
         <if test="repairChannels !=null">
             and t.repair_channel in
             <foreach collection="repairChannels" item="item" open="(" close=")" separator=",">
@@ -381,8 +389,7 @@
     </select>
 
     <!-- 鏌ヨ鎶ヤ慨淇℃伅淇℃伅 add by wuxw 2018-07-03
-     灏嗙姸鎬佸厛璋冩暣  and ru.state in ('10001','10002')
-     -->
+     灏嗙姸鎬佸厛璋冩暣  and ru.state in ('10001','10002')-->
     <select id="getStaffRepairInfo" parameterType="Map" resultType="Map">
         select distinct t.repair_name,t.repair_name repairName,t.appointment_time,t.appointment_time
         appointmentTime,t.repair_type,t.repair_type repairType,t.context,t.repair_id,t.repair_id
@@ -580,6 +587,9 @@
         <if test="repairObjId !=null and repairObjId != ''">
             and t.repair_obj_id= #{repairObjId}
         </if>
+        <if test="maintenanceType !=null and maintenanceType != ''">
+            and t.maintenance_type= #{maintenanceType}
+        </if>
         <if test="payType !=null and payType != ''">
             and t.pay_type= #{payType}
         </if>
@@ -645,6 +655,9 @@
         <if test="repairObjId !=null and repairObjId != ''">
             and t.repair_obj_id= #{repairObjId}
         </if>
+        <if test="maintenanceType !=null and maintenanceType != ''">
+            and t.maintenance_type= #{maintenanceType}
+        </if>
         <if test="payType !=null and payType != ''">
             and t.pay_type= #{payType}
         </if>

--
Gitblit v1.8.0