Browse Source

优化派单

夏文涛 2 years ago
parent
commit
1e8a464588

+ 94 - 50
.idea/workspace.xml

@@ -3,6 +3,13 @@
   <component name="ChangeListManager">
     <list default="true" id="33a373ef-8a77-410d-8903-f96d9ffe27f3" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/repair/model/vo/TrackDetailsVo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/repair/model/vo/TrackDetailsVo.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application-prod.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-prod.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mapper/repair/RepairUserMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/repair/RepairUserMapper.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/application-prod.yml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application-prod.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/target/classes/mapper/repair/RepairUserMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/mapper/repair/RepairUserMapper.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/target/repair_system-0.0.1-SNAPSHOT.jar.original" beforeDir="false" afterPath="$PROJECT_DIR$/target/repair_system-0.0.1-SNAPSHOT.jar.original" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/classes/" />
@@ -18,38 +25,29 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="335">
-              <caret line="1716" column="25" selection-start-line="1716" selection-start-column="25" selection-end-line="1716" selection-end-column="25" />
-            </state>
-          </provider>
-        </entry>
-      </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairArticleTypeController.java">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="3818">
-              <caret line="186" column="69" selection-start-line="186" selection-start-column="42" selection-end-line="186" selection-end-column="69" />
+            <state relative-caret-position="407">
+              <caret line="1824" column="81" selection-start-line="1824" selection-start-column="73" selection-end-line="1824" selection-end-column="81" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairAreaController.java">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/model/vo/TrackDetailsVo.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="3979">
-              <caret line="188" column="33" selection-start-line="188" selection-start-column="29" selection-end-line="188" selection-end-column="33" />
+            <state relative-caret-position="483">
+              <caret line="28" column="30" selection-start-line="28" selection-start-column="30" selection-end-line="28" selection-end-column="30" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/repair/RepairUserMapper.xml">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1150">
-              <caret line="50" column="14" selection-start-line="50" selection-start-column="14" selection-end-line="50" selection-end-column="14" />
+            <state relative-caret-position="128">
+              <caret line="60" column="58" lean-forward="true" selection-start-line="60" selection-start-column="58" selection-end-line="60" selection-end-column="58" />
             </state>
           </provider>
         </entry>
@@ -93,8 +91,17 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/resources/application.yml">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="161">
-              <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
+            <state relative-caret-position="23">
+              <caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/resources/application-prod.yml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="23">
+              <caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
             </state>
           </provider>
         </entry>
@@ -112,11 +119,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>repairChangeConsumes</find>
-      <find>shifts</find>
-      <find>queryUserData</find>
-      <find>alterPrice</find>
-      <find>insertMaintenanceConsumables</find>
       <find>alterPrice(</find>
       <find>维修单不是待确认状态,无法进行改价操作</find>
       <find>goodsList</find>
@@ -142,6 +144,11 @@
       <find>updateRepairArticleTypeById</find>
       <find>QueryArticleTypeTreeRecords</find>
       <find>EXISTS</find>
+      <find>tran</find>
+      <find>dropDown</find>
+      <find>FIND_IN_SET(rat.id,ru.article_id)</find>
+      <find>FIND_IN_SET(rat.parent_id,ru.article_id)</find>
+      <find>.autoDispatchUser</find>
     </findStrings>
   </component>
   <component name="Git.Settings">
@@ -159,10 +166,13 @@
         <option value="$PROJECT_DIR$/src/main/resources/mapper/repair/RepairRecordMapper.xml" />
         <option value="$PROJECT_DIR$/src/main/java/com/repair/model/request/updateRepairArticleTypeRequest.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/repair/controller/RepairArticleTypeController.java" />
-        <option value="$PROJECT_DIR$/src/main/resources/application.yml" />
         <option value="$PROJECT_DIR$/src/main/java/com/repair/services/RepairAreaService.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/repair/controller/RepairAreaController.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/repair/model/vo/TrackDetailsVo.java" />
+        <option value="$PROJECT_DIR$/src/main/resources/application.yml" />
+        <option value="$PROJECT_DIR$/src/main/resources/application-prod.yml" />
+        <option value="$PROJECT_DIR$/src/main/resources/mapper/repair/RepairUserMapper.xml" />
       </list>
     </option>
   </component>
@@ -196,7 +206,7 @@
   </component>
   <component name="ProjectFrameBounds">
     <option name="x" value="-7" />
-    <option name="width" value="974" />
+    <option name="width" value="958" />
     <option name="height" value="1039" />
   </component>
   <component name="ProjectView">
@@ -204,6 +214,8 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="Scope" />
+      <pane id="PackagesPane" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -253,6 +265,25 @@
               <item name="main" type="462c0819:PsiDirectoryNode" />
               <item name="java" type="462c0819:PsiDirectoryNode" />
               <item name="repair" type="462c0819:PsiDirectoryNode" />
+              <item name="model" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="repair_system" type="b2602c69:ProjectViewProjectNode" />
+              <item name="repair_backend" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="java" type="462c0819:PsiDirectoryNode" />
+              <item name="repair" type="462c0819:PsiDirectoryNode" />
+              <item name="model" type="462c0819:PsiDirectoryNode" />
+              <item name="vo" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="repair_system" type="b2602c69:ProjectViewProjectNode" />
+              <item name="repair_backend" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="java" type="462c0819:PsiDirectoryNode" />
+              <item name="repair" type="462c0819:PsiDirectoryNode" />
               <item name="services" type="462c0819:PsiDirectoryNode" />
             </path>
             <path>
@@ -284,8 +315,6 @@
           <select />
         </subPane>
       </pane>
-      <pane id="PackagesPane" />
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -344,17 +373,21 @@
       <workItem from="1697697631506" duration="602000" />
       <workItem from="1697764625199" duration="1193000" />
       <workItem from="1698032655468" duration="1304000" />
+      <workItem from="1698215802376" duration="212000" />
+      <workItem from="1698655878467" duration="185000" />
+      <workItem from="1698733550781" duration="903000" />
+      <workItem from="1698800060286" duration="2175000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="64636000" />
+    <option name="totallyTimeSpent" value="68111000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-7" y="0" width="974" height="1039" extended-state="0" />
+    <frame x="-7" y="0" width="958" height="1039" extended-state="0" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.37308535" />
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.29175946" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info id="Designer" order="2" />
       <window_info id="JRebel" order="3" side_tool="true" />
@@ -365,8 +398,8 @@
       <window_info id="Web" order="8" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info anchor="bottom" id="Run" order="2" weight="0.3325967" />
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.66187847" />
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.34143648" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.64861876" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" />
@@ -383,7 +416,7 @@
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
-      <window_info anchor="right" id="Maven" order="3" weight="0.7724289" />
+      <window_info anchor="right" id="Maven" order="3" weight="0.6781737" />
       <window_info anchor="right" id="Palette" order="4" />
       <window_info anchor="right" id="Capture Analysis" order="5" />
       <window_info anchor="right" id="Database" order="6" />
@@ -441,9 +474,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/resources/application-prod.yml">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/LoginController.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="418">
@@ -654,13 +684,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="335">
-          <caret line="1716" column="25" selection-start-line="1716" selection-start-column="25" selection-end-line="1716" selection-end-column="25" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairArticleTypeController.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="3818">
@@ -675,10 +698,17 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/repair/RepairUserMapper.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/controller/RepairRecordController.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="407">
+          <caret line="1824" column="81" selection-start-line="1824" selection-start-column="73" selection-end-line="1824" selection-end-column="81" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/repair/model/vo/TrackDetailsVo.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1150">
-          <caret line="50" column="14" selection-start-line="50" selection-start-column="14" selection-end-line="50" selection-end-column="14" />
+        <state relative-caret-position="483">
+          <caret line="28" column="30" selection-start-line="28" selection-start-column="30" selection-end-line="28" selection-end-column="30" />
         </state>
       </provider>
     </entry>
@@ -712,8 +742,15 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/src/main/resources/application.yml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="161">
-          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
+        <state relative-caret-position="23">
+          <caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application-prod.yml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="23">
+          <caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
         </state>
       </provider>
     </entry>
@@ -724,6 +761,13 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/repair/RepairUserMapper.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="128">
+          <caret line="60" column="58" lean-forward="true" selection-start-line="60" selection-start-column="58" selection-end-line="60" selection-end-column="58" />
+        </state>
+      </provider>
+    </entry>
   </component>
   <component name="masterDetails">
     <states>

+ 1 - 1
src/main/java/com/repair/controller/RepairRecordController.java

@@ -1893,7 +1893,7 @@ public class RepairRecordController implements RepairRecordControllerAPI {
             //转单表中的审批操作人和审批状态
             transferRecord.setApproverId(senderId);
             transferRecord.setApprovalStatu(tr.getApproverStatu());
-            int insertTransfer = repairTransferRecordService.insertRepairTransferRecord(transferRecord);
+            int insertTransfer = repairTransferRecordService.updateRepairTransferRecord(transferRecord);
             if (insertTransfer <= 0) {
                 throw new Exception("转单审核失败!");
             }

+ 3 - 0
src/main/java/com/repair/model/vo/TrackDetailsVo.java

@@ -35,6 +35,9 @@ public class TrackDetailsVo {
             case 4:
                 state = content.contains("回复") ? "回复" : "待确认";
                 break;
+            case 9:
+                state = "已关单";
+                break;
             default:
                 state = content;
                 break;

+ 1 - 1
src/main/resources/application-prod.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8081
   servlet:
     context-path: /repair
 

+ 2 - 2
src/main/resources/application.yml

@@ -1,11 +1,11 @@
 server:
-  port: 8080
+  port: 8081
   servlet:
     context-path: /repair
 
 spring:
   profiles:
-      active: dev
+      active: prod
   servlet:
     multipart:
       max-file-size: 30MB     #单个文件最大限制

+ 8 - 6
src/main/resources/mapper/repair/RepairUserMapper.xml

@@ -65,9 +65,10 @@
         <result property="maintenanceAssessTime" column="maintenance_assess_time"/>
     </resultMap>
     <select id="queryUserData" resultType="com.repair.model.vo.UserDataVo" resultMap="userDataMap">
-        select ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.state,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,GROUP_CONCAT(rat.id) as article_id from repair_user ru
+        select ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.state,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,
+        (select GROUP_CONCAT(id) from repair_article_type where FIND_IN_SET(id,ru.article_id) or FIND_IN_SET(parent_id,ru.article_id) and deleted = 0) as article_id
+        from repair_user ru
         left join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = #{userId} and start_date = #{dateNow}
-        left join repair_article_type rat on rat.deleted = 0 and (FIND_IN_SET(rat.id,ru.article_id) or FIND_IN_SET(rat.parent_id,ru.article_id))
         where ru.id = #{userId} and ru.deleted = 0
     </select>
 
@@ -151,9 +152,10 @@
 
     <select id="autoDispatchUser" resultType="com.repair.model.vo.AutoDispatchUserVo" resultMap="AutoDispatchUserMap">
         select * from (
-        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,GROUP_CONCAT(rat.id) as article_id from repair_user ru
+        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
+        ,(select GROUP_CONCAT(id) from repair_article_type where FIND_IN_SET(id,ru.article_id) or FIND_IN_SET(parent_id,ru.article_id) and deleted = 0) as article_id
+        from repair_user ru
         inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and start_date = #{dateNow}
-        left join repair_article_type rat on rat.deleted = 0 and (FIND_IN_SET(rat.id,ru.article_id) or FIND_IN_SET(rat.parent_id,ru.article_id))
         left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
         where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1
         <if test="keyWord != null and keyWord != ''">
@@ -199,9 +201,9 @@
 
     <select id="dropDown" resultType="com.repair.model.vo.AutoDispatchUserVo">
         select * from (
-        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0  and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,GROUP_CONCAT(rat.id) as article_id from repair_user ru
+        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,(select GROUP_CONCAT(id) from repair_article_type where FIND_IN_SET(id,ru.article_id) or FIND_IN_SET(parent_id,ru.article_id) and deleted = 0) as article_id
+        from repair_user ru
         inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id
-        left join repair_article_type rat on rat.deleted = 0 and (FIND_IN_SET(rat.id,ru.article_id) or FIND_IN_SET(rat.parent_id,ru.article_id))
         left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
         where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1 and ru.id != ${userId}
         group by ru.id) t where FIND_IN_SET(${articleId},t.article_id) and FIND_IN_SET(${buildId},t.build_id)

+ 1 - 1
target/classes/application-prod.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8081
   servlet:
     context-path: /repair
 

+ 2 - 2
target/classes/application.yml

@@ -1,11 +1,11 @@
 server:
-  port: 8080
+  port: 8081
   servlet:
     context-path: /repair
 
 spring:
   profiles:
-      active: dev
+      active: prod
   servlet:
     multipart:
       max-file-size: 30MB     #单个文件最大限制

+ 8 - 6
target/classes/mapper/repair/RepairUserMapper.xml

@@ -65,9 +65,10 @@
         <result property="maintenanceAssessTime" column="maintenance_assess_time"/>
     </resultMap>
     <select id="queryUserData" resultType="com.repair.model.vo.UserDataVo" resultMap="userDataMap">
-        select ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.state,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,GROUP_CONCAT(rat.id) as article_id from repair_user ru
+        select ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.state,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,
+        (select GROUP_CONCAT(id) from repair_article_type where FIND_IN_SET(id,ru.article_id) or FIND_IN_SET(parent_id,ru.article_id) and deleted = 0) as article_id
+        from repair_user ru
         left join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = #{userId} and start_date = #{dateNow}
-        left join repair_article_type rat on rat.deleted = 0 and (FIND_IN_SET(rat.id,ru.article_id) or FIND_IN_SET(rat.parent_id,ru.article_id))
         where ru.id = #{userId} and ru.deleted = 0
     </select>
 
@@ -151,9 +152,10 @@
 
     <select id="autoDispatchUser" resultType="com.repair.model.vo.AutoDispatchUserVo" resultMap="AutoDispatchUserMap">
         select * from (
-        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,GROUP_CONCAT(rat.id) as article_id from repair_user ru
+        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and assigned_time like '%' #{dateNow} '%' and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id
+        ,(select GROUP_CONCAT(id) from repair_article_type where FIND_IN_SET(id,ru.article_id) or FIND_IN_SET(parent_id,ru.article_id) and deleted = 0) as article_id
+        from repair_user ru
         inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id and start_date = #{dateNow}
-        left join repair_article_type rat on rat.deleted = 0 and (FIND_IN_SET(rat.id,ru.article_id) or FIND_IN_SET(rat.parent_id,ru.article_id))
         left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
         where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1
         <if test="keyWord != null and keyWord != ''">
@@ -199,9 +201,9 @@
 
     <select id="dropDown" resultType="com.repair.model.vo.AutoDispatchUserVo">
         select * from (
-        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0  and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,GROUP_CONCAT(rat.id) as article_id from repair_user ru
+        select wt.name as work_type,'大量接单' as state,(select count(*) from repair_dispatch_record where deleted = 0 and is_lose_efficacy = 0 and users_id = ru.id) as rdr_count,ru.build_id,ru.user_phone,ru.acceptance_assess_time,ru.maintenance_assess_time,ru.id,ru.user_name,rcs.start_date,rcs.shift_id,(select GROUP_CONCAT(id) from repair_article_type where FIND_IN_SET(id,ru.article_id) or FIND_IN_SET(parent_id,ru.article_id) and deleted = 0) as article_id
+        from repair_user ru
         inner join repair_classes_settings rcs on rcs.deleted = 0 and rcs.user_id = ru.id
-        left join repair_article_type rat on rat.deleted = 0 and (FIND_IN_SET(rat.id,ru.article_id) or FIND_IN_SET(rat.parent_id,ru.article_id))
         left join repair_work_type wt on wt.deleted = 0 and wt.id = ru.work_type
         where ru.school_id = #{schoolId} and ru.deleted = 0 and (ru.user_zzid = 1 or ru.user_zzid = 2) and ru.state = 1 and ru.id != ${userId}
         group by ru.id) t where FIND_IN_SET(${articleId},t.article_id) and FIND_IN_SET(${buildId},t.build_id)

BIN
target/repair_system-0.0.1-SNAPSHOT.jar.original