wanglt 2 hónapja
szülő
commit
ff35154737

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

@@ -72,6 +72,8 @@ public class GxtMonthScore extends BaseEntity
 
     private List<GxtRepairOrder> repairOrderList;
 
+    private Long userId;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -265,4 +267,12 @@ public class GxtMonthScore extends BaseEntity
     public void setRepairOrderList(List<GxtRepairOrder> repairOrderList) {
         this.repairOrderList = repairOrderList;
     }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
 }

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

@@ -775,6 +775,7 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
 //            }
 //        }
         monthScore.setUserScores(userScores);
+        monthScore.setUserId(userId);
         return monthScore;
     }
 

+ 2 - 2
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtRepairOrderServiceImpl.java

@@ -2142,7 +2142,7 @@ public class GxtRepairOrderServiceImpl implements IGxtRepairOrderService
     private Integer getSort(List<GxtUserScore> scoreList, Long userId) {
         // 1. 空列表直接返回第1名(保持原逻辑)
         if (scoreList.isEmpty()) {
-            return 1;
+            return 0;
         }
 
         // 2. 第一步:找到目标用户的分数
@@ -2156,7 +2156,7 @@ public class GxtRepairOrderServiceImpl implements IGxtRepairOrderService
 
         // 未找到目标用户,返回第1名(保持原逻辑)
         if (targetScore == null) {
-            return 1;
+            return 0;
         }
 
         // 3. 第二步:找到该分数在列表中第一次出现的索引

+ 10 - 10
ygtx-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -65,20 +65,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<select id="getSummaryList" parameterType="SysDept" resultMap="SysDeptResult">
 		SELECT
-		d.dept_id,
-		d.dept_name,
-		d.parent_id,
-		d.order_num,
+		t.dept_id,
+		t.dept_name,
+		t.parent_id,
+		t.order_num,
 		e.dept_name AS parent_name,
 		ms.`status`,
 		ms.month_period
 		FROM gxt_month_score ms
-		LEFT JOIN sys_dept d ON ms.dept_id = d.dept_id
-		LEFT JOIN sys_dept e ON d.parent_id = e.dept_id
+		LEFT JOIN sys_dept t ON ms.dept_id = t.dept_id
+		LEFT JOIN sys_dept e ON t.parent_id = e.dept_id
 		<where>
-			<if test="deptId != null "> and d.dept_id = #{deptId}</if>
-			<if test="parentId != null "> and d.parent_id = #{parentId}</if>
-			<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
+			<if test="deptId != null "> and t.dept_id = #{deptId}</if>
+			<if test="parentId != null "> and t.parent_id = #{parentId}</if>
+			<if test="deptName != null and deptName != ''"> and t.dept_name like concat('%', #{deptName}, '%')</if>
 			<if test="parentName != null and parentName != ''"> and e.dept_name like concat('%', #{parentName}, '%')</if>
 			<if test="monthPeriod != null and monthPeriod != ''"> and ms.month_period = #{monthPeriod}</if>
 			<if test="status != null ">
@@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		</where>
 		ORDER BY
 			ms.month_period desc,
-			d.parent_id,d.order_num
+			t.parent_id,t.order_num
 	</select>
 
     <select id="selectDeptListByRoleId" resultType="Long">

+ 5 - 1
ygtx-ui/src/views/gxt/monthScore/index.vue

@@ -188,7 +188,11 @@
       <div class="form-content" style="margin-top: 20px;">
         <!-- 员工考核得分表格 -->
         <el-table :data="userScoreList" style="width: 100%">
-          <el-table-column v-if="isInfo" prop="nickName" label="员工姓名"></el-table-column>
+          <el-table-column v-if="isInfo" prop="nickName" label="员工姓名">
+            <template #default="scope">
+              <span :style="{ color: scope.row.userId === monthScore.userId ? 'red' : '' }">{{ scope.row.nickName }}</span>
+            </template>
+          </el-table-column>
           <el-table-column prop="maintenanceTotalScore" label="维保工分"></el-table-column>
           <el-table-column prop="repairTotalScore" label="维修工分"></el-table-column>
           <el-table-column prop="finalScore" label="总工分">

+ 5 - 1
ygtx-ui/src/views/gxt/monthScore/info.vue

@@ -124,7 +124,11 @@
       <div class="form-content" style="margin-top: 20px;">
         <!-- 员工考核得分表格 -->
         <el-table :data="userScoreList" style="width: 100%">
-          <el-table-column v-if="isInfo" prop="nickName" label="员工姓名"></el-table-column>
+          <el-table-column v-if="isInfo" prop="nickName" label="员工姓名">
+            <template #default="scope">
+              <span :style="{ color: scope.row.userId === monthScore.userId ? 'red' : '' }">{{ scope.row.nickName }}</span>
+            </template>
+          </el-table-column>
           <el-table-column prop="maintenanceTotalScore" label="维保工分"></el-table-column>
           <el-table-column prop="repairTotalScore" label="维修工分"></el-table-column>
           <el-table-column prop="finalScore" label="总工分">