ouyj 5 months ago
parent
commit
eaae820ac6

+ 25 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/OrderScoreInfo.java

@@ -1,5 +1,7 @@
 package com.ygtx.gxt.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
@@ -171,6 +173,13 @@ public class OrderScoreInfo {
     /** 终评系数 */
     private BigDecimal finalCoefficient;
 
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
     public Integer getOrderType() {
         return orderType;
     }
@@ -594,4 +603,20 @@ public class OrderScoreInfo {
     public void setFinalCoefficient(BigDecimal finalCoefficient) {
         this.finalCoefficient = finalCoefficient;
     }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
 }

+ 9 - 11
ygtx-gxt/src/main/resources/mapper/gxt/GxtOrderScoreMapper.xml

@@ -52,9 +52,10 @@
         <result property="status"    column="status"    />
         <result property="reviewScoreNum"    column="review_score_num"    />
         <result property="finalCoefficient"    column="final_coefficient"    />
-        <!-- 用于统一两个查询结果的列数,但不在OrderScoreInfo中使用 -->
         <result property="planStartTime" column="plan_start_time" />
         <result property="planEndTime" column="plan_end_time" />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
     </resultMap>
 
     <select id="selectUnionOrderList" resultMap="OrderScoreInfoResult">
@@ -106,7 +107,9 @@
                 null as pause_time,
                 null as complete_time,
                 review_score_num as review_score_num,
-                final_coefficient as final_coefficient
+                final_coefficient as final_coefficient,
+                create_time as create_time,
+                update_time as update_time
             FROM gxt_repair_order t
             <where>
                 <if test="repairOrder.workOrderProjectNo != null and repairOrder.workOrderProjectNo != ''"> and work_order_project_no = #{repairOrder.workOrderProjectNo}</if>
@@ -124,13 +127,6 @@
                 <if test="repairOrder.params.businessDataScope != null and repairOrder.params.businessDataScope != ''">
                     ${repairOrder.params.businessDataScope}
                 </if>
-                <!-- 限制待下发工单只能创建人本部门查看 -->
-                <if test="repairOrder.createBy != null">
-                    and (t.work_order_status != 'to_issue' or t.create_by in
-                    (select user_name from sys_user t1
-                    left join sys_dept t2 on t1.dept_id = t2.dept_id
-                    where t2.dept_id = (select dept_id from sys_user where user_name = #{repairOrder.createBy,jdbcType=VARCHAR} and del_flag='0')))
-                </if>
             </where>
 
             UNION ALL
@@ -182,7 +178,9 @@
                 pause_time as pause_time,
                 complete_time as complete_time,
                 review_score_num as review_score_num,
-                final_coefficient as final_coefficient
+                final_coefficient as final_coefficient,
+                create_time as create_time,
+                update_time as update_time
             FROM gxt_work_order t
             <where>
                 <if test="workOrder.workOrderProjectNo != null and workOrder.workOrderProjectNo != ''"> and work_order_project_no = #{workOrder.workOrderProjectNo}</if>
@@ -202,6 +200,6 @@
                 </if>
             </where>
         ) t
-        ORDER BY work_end_time DESC
+        ORDER BY create_time DESC
     </select>
 </mapper>

+ 3 - 2
ygtx-ui/src/views/gxt/orderScore/index.vue

@@ -113,7 +113,7 @@
           <el-button
             type="primary"
             link
-            v-if="scope.row.scoringStatus == 'to_self' && scope.row.teamLeaderId == userStore.id"
+            v-if="scope.row.scoringStatus == 'to_self' && (scope.row.teamLeaderId == userStore.id || userStore.roles.includes('admin'))"
             @click="handleSelfEvaluation(scope.row)"
             v-hasPermi="['gxt:orderScore:selfEvaluation']"
           ><i class="fa fa-edit"></i>自评</el-button>
@@ -142,6 +142,7 @@
               type="info"
               link
               @click="handleView(scope.row)"
+              v-hasPermi="['gxt:orderScore:query']"
           ><i class="fa fa-eye"></i>查看</el-button>
         </template>
       </el-table-column>
@@ -156,7 +157,7 @@
     />
 
     <!-- 查看详情对话框 -->
-    <el-dialog title="工单评分详情" v-model="viewDialogVisible" width="1000px" append-to-body>
+    <el-dialog title="工单评分详情" v-model="viewDialogVisible" width="800px" append-to-body>
       <el-form label-width="120px" label-position="top">
         <el-row :gutter="20">
           <el-col :span="12">