Ver Fonte

驾驶舱-样式优化

wanglt há 3 meses atrás
pai
commit
1fa080a903

+ 10 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtOrderPerson.java

@@ -25,6 +25,8 @@ public class GxtOrderPerson {
     /** 工单类型 */
     private String orderType;
 
+    private String scoreType;
+
     /** 完成日期 */
     private String finishDate;
 
@@ -79,6 +81,14 @@ public class GxtOrderPerson {
         this.orderType = orderType;
     }
 
+    public String getScoreType() {
+        return scoreType;
+    }
+
+    public void setScoreType(String scoreType) {
+        this.scoreType = scoreType;
+    }
+
     public String getFinishDate() {
         return finishDate;
     }

+ 2 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/mapper/GxtOrderPersonMapper.java

@@ -19,6 +19,8 @@ public interface GxtOrderPersonMapper
      */
     public List<GxtOrderPerson> selectGxtOrderPersonList(GxtOrderPerson gxtOrderPerson);
 
+    public List<GxtOrderPerson> selectGxtScoreDetailList(GxtOrderPerson gxtOrderPerson);
+
     public int delRepairOrderFlowRecords();
 
     public int delRepairOrderFlowRecordsNext();

+ 1 - 1
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtOrderPersonServiceImpl.java

@@ -30,6 +30,6 @@ public class GxtOrderPersonServiceImpl implements IGxtOrderPersonService
     @Override
     public List<GxtOrderPerson> selectGxtOrderPersonList(GxtOrderPerson gxtOrderPerson)
     {
-        return gxtOrderPersonMapper.selectGxtOrderPersonList(gxtOrderPerson);
+        return gxtOrderPersonMapper.selectGxtScoreDetailList(gxtOrderPerson);
     }
 }

+ 23 - 0
ygtx-gxt/src/main/resources/mapper/gxt/gxtOrderPersonMapper.xml

@@ -61,6 +61,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ORDER BY po.real_end_time DESC
     </select>
 
+    <select id="selectGxtScoreDetailList" parameterType="GxtOrderPerson" resultMap="GxtOrderPersonResult">
+        SELECT
+            CASE WHEN t.order_type=1 THEN ro.work_order_project_no ELSE wo.work_order_project_no END AS order_code,
+            CASE WHEN t.order_type=1 THEN ro.gxt_center	ELSE wo.gxt_center END AS center,
+            d.dept_name AS parent,DATE( t.create_time ) AS finish_date,t.user_id,
+            CASE WHEN t.order_type=1 THEN ro.pcs_station_name ELSE wo.pcs_station_name END AS pcs,
+            CASE WHEN t.order_type=1 THEN '维修工单' ELSE '维保工单' END AS order_type,
+            CASE WHEN t.score_type=1 THEN '工单得分' WHEN t.score_type=2 THEN '运行得分' ELSE '停机扣分' END,t.score
+        FROM gxt_order_score_detail t
+            LEFT JOIN gxt_repair_order ro ON t.order_id=ro.id
+            LEFT JOIN gxt_work_order wo ON wo.id=t.order_id
+            LEFT JOIN sys_dept d ON
+                d.dept_id=CASE WHEN t.order_type=1 THEN ro.pcs_station_pid	ELSE wo.pcs_station_pid END
+        WHERE DATE_FORMAT(t.create_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')
+        <if test="userId != null">
+            AND t.user_id = #{userId}
+        </if>
+        <if test="orderCode != null and orderCode != ''">
+            AND t.order_code LIKE CONCAT( '%', #{orderCode}, '%' )
+        </if>
+        ORDER BY t.create_time DESC
+    </select>
+
     <delete id="delRepairOrderFlowRecords">
         DELETE FROM gxt_repair_order_flow_records
     </delete>

+ 1 - 1
ygtx-ui/src/views/index5.vue

@@ -222,7 +222,7 @@
             <el-table-column prop="parent" label="所属场站" header-align="center" align="center"></el-table-column>
             <el-table-column prop="pcs" label="作业场站" header-align="center" align="center"></el-table-column>
             <el-table-column prop="orderType" label="工单类型" header-align="center" align="center"></el-table-column>
-            <el-table-column prop="finishDate" label="完成日期" header-align="center" align="center"></el-table-column>
+            <el-table-column prop="finishDate" label="日期" header-align="center" align="center"></el-table-column>
             <el-table-column prop="score" label="得分" header-align="center" align="center" :formatter="formatScore"></el-table-column>
           </el-table>
           <pagination

+ 1 - 1
ygtx-ui/src/views/index6.vue

@@ -234,7 +234,7 @@
             <el-table-column prop="parent" label="所属场站" header-align="center" align="center"></el-table-column>
             <el-table-column prop="pcs" label="作业场站" header-align="center" align="center"></el-table-column>
             <el-table-column prop="orderType" label="工单类型" header-align="center" align="center"></el-table-column>
-            <el-table-column prop="finishDate" label="完成日期" header-align="center" align="center"></el-table-column>
+            <el-table-column prop="finishDate" label="日期" header-align="center" align="center"></el-table-column>
             <el-table-column prop="score" label="得分" header-align="center" align="center" :formatter="formatScore"></el-table-column>
           </el-table>
           <pagination