Browse Source

放行重检结果返回数据多

baihe 3 years ago
parent
commit
435e4a7be4

+ 1 - 1
application-facade/src/main/java/com/factory/wx/service/impl/AbnormalStatisticsServiceImpl.java

@@ -289,7 +289,7 @@ public class AbnormalStatisticsServiceImpl implements AbnormalStatisticsService
                         o.setStatus(t.getStatus());
                         o.setReason(t.getReason());
                         o.setUpdatedTime(t.getUpdatedTime());
-                        o.setUsername(task.getPerson());
+                        o.setUsername(wxPlanService.getUserNameById(t.getApprovalUserId()));
                         resultInfos.add(o);
                     }
                     task.setAbnormalApprovalTaskResList(resultInfos);

+ 3 - 0
application-facade/src/main/resources/mapper/AbnormalStatisticsMapper.xml

@@ -125,6 +125,7 @@
           <if test="taskId!=null">
           AND ot.id=#{taskId}
           </if>
+          group by ot.id
     </select>
     <!-- 取得首件放行 -->
     <select id="getFaReleaseListByPlanId" resultType="com.factory.web.entity.pm.res.AbnormalTaskInfoRes">
@@ -154,6 +155,7 @@
           <if test="taskId!=null">
           AND fat.id = #{taskId}
           </if>
+          group by fat.id
     </select>
     <!-- 防错重检信息 -->
     <select id="getPmRecheckedListByPlanId" resultType="com.factory.web.entity.pm.res.AbnormalTaskInfoRes">
@@ -178,6 +180,7 @@
           <if test="taskId!=null">
           	AND ot.id=#{taskId}
           </if>
+        group by ot.id
     </select>
     <!-- 首件重检信息 -->
     <select id="getFaRecheckedListByPlanId" resultType="com.factory.web.entity.pm.res.AbnormalTaskInfoRes">