Przeglądaj źródła

月度工分汇总过滤

wanglt 2 miesięcy temu
rodzic
commit
86521af48f

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

@@ -27,6 +27,8 @@ public interface GxtUserScoreMapper
      */
     public List<GxtUserScore> selectGxtUserScoreList(GxtUserScore gxtUserScore);
 
+    public List<GxtUserScore> selectUserAllScore(GxtUserScore gxtUserScore);
+
     /**
      * 新增用户月度评分统计表
      * 

+ 7 - 4
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtMonthScoreServiceImpl.java

@@ -716,18 +716,21 @@ public class GxtMonthScoreServiceImpl implements IGxtMonthScoreService
 
         // 组员考核得分
         GxtUserScore userScore = new GxtUserScore();
-        userScore.setMonthScoreId(monthScore.getId());
+        List<GxtUserScore> userScores = new ArrayList<>();
         if (rtType==0) {
             userScore.setUserName(userAccount);
-            userScore.setNickName(nickName);
+            userScore.setMonthPeriod(monthPeriod);
+            userScores = gxtUserScoreMapper.selectUserAllScore(userScore);
 //        }else {
 //            userScore.setRankPermission(getJXY());
+        } else {
+            userScore.setMonthScoreId(monthScore.getId());
+            userScores = gxtUserScoreMapper.selectGxtUserScoreList(userScore);
         }
-        List<GxtUserScore> userScores = gxtUserScoreMapper.selectGxtUserScoreList(userScore);
         int userScoreSize = userScores.size();
         monthScore.setUserListSize(userScoreSize);
         List<GxtUserScore> users = new ArrayList<>();
-        if (userScoreSize>10) {
+        if (userScoreSize>10 && rtType!=0) {
             users = userScores.subList(0,10);
         }else {
             users.addAll(userScores);

+ 1 - 1
ygtx-gxt/src/main/resources/mapper/gxt/GxtMonthFanInspectionMapper.xml

@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null"> and wop.user_id = #{userId}</if>
             <if test="deptId != null "> and t.pcs_station_pid = #{deptId}</if>
             <if test="monthPeriod != null  and monthPeriod != ''"> and DATE_FORMAT( t.create_time, '%Y-%m' ) = #{monthPeriod}</if>
-            AND t.inspection_type IS NOT NULL AND t.work_order_status IN ('completed','archived')
+            AND t.inspection_type IS NOT NULL AND t.inspection_type!='' AND t.work_order_status IN ('completed','archived')
         </where>
         GROUP BY
         t.model,

+ 1 - 1
ygtx-gxt/src/main/resources/mapper/gxt/GxtMonthRepairProjectMapper.xml

@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null"> and rop.user_id=#{userId}</if>
             <if test="deptId != null "> and t.pcs_station_pid = #{deptId}</if>
             <if test="monthPeriod != null  and monthPeriod != ''"> and DATE_FORMAT( t.occur_time, '%Y-%m' ) = #{monthPeriod}</if>
-            AND t.maintenance_type IS NOT NULL AND t.work_order_status IN ('completed','archived')
+            AND t.maintenance_type IS NOT NULL AND t.maintenance_type != '' AND t.work_order_status IN ('completed','archived')
         </where>
         GROUP BY
         t.maintenance_type

+ 17 - 0
ygtx-gxt/src/main/resources/mapper/gxt/GxtUserScoreMapper.xml

@@ -40,6 +40,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectGxtUserScoreVo"/>
         where id = #{id}
     </select>
+
+    <select id="selectUserAllScore" parameterType="GxtUserScore" resultMap="GxtUserScoreResult">
+        SELECT
+            us.user_name,us.nick_name,
+            us.maintenance_total_score,
+            us.repair_total_score,
+            us.final_score,
+            d.dept_name AS remark
+        FROM
+        gxt_user_score us
+        LEFT JOIN gxt_month_score ms ON us.month_score_id = ms.id
+        LEFT JOIN sys_dept d ON d.dept_id = ms.dept_id
+        <where>
+            <if test="monthPeriod != null and monthPeriod != ''">and us.month_period = #{monthPeriod}</if>
+            <if test="userName != null and userName != ''"> and us.user_name = #{userName}</if>
+        </where>
+    </select>
     
     <select id="selectGxtUserScoreList" parameterType="GxtUserScore" resultMap="GxtUserScoreResult">
         <include refid="selectGxtUserScoreVo"/>

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

@@ -193,6 +193,7 @@
               <span :style="{ color: scope.row.userId === monthScore.userId ? 'red' : '' }">{{ scope.row.nickName }}</span>
             </template>
           </el-table-column>
+          <el-table-column v-if="!isInfo" prop="remark" label="设备场站"></el-table-column>
           <el-table-column prop="maintenanceTotalScore" label="维保工分">
             <template #default="scope">
               {{ parseFloat(scope.row.maintenanceTotalScore).toFixed(2) }}

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

@@ -129,6 +129,7 @@
               <span :style="{ color: scope.row.userId === monthScore.userId ? 'red' : '' }">{{ scope.row.nickName }}</span>
             </template>
           </el-table-column>
+          <el-table-column v-if="!isInfo" prop="remark" label="设备场站"></el-table-column>
           <el-table-column prop="maintenanceTotalScore" label="维保工分">
             <template #default="scope">
               {{ parseFloat(scope.row.maintenanceTotalScore).toFixed(2) }}