Browse Source

首件异常信息

baihe 3 years ago
parent
commit
89f2aeaba7

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

@@ -174,6 +174,7 @@ public class AbnormalStatisticsServiceImpl implements AbnormalStatisticsService
 
                 SearchAbnormalReq searchReq = new SearchAbnormalReq();
                 searchReq.setWorkshopId(abnormalWorkshopList.get(i).getWorkshopId());
+                searchReq.setTaskId(faInfo.getTaskId());
                 List<AbnormalItemRes> abnormalItemList = abnormalStatisticsMapper.getFaAbnormalItemResultList(searchReq);
 
                 for (AbnormalItemRes abnormalItemInfo : abnormalItemList) {
@@ -198,8 +199,8 @@ public class AbnormalStatisticsServiceImpl implements AbnormalStatisticsService
                 }
 
                 abnormalWorkshopList.get(i).setAbnormalItemList(abnormalItemList);
-                faInfo.setAbnormalWorkshopList(abnormalWorkshopList.stream().filter(workshop -> null != workshop.getAbnormalItemList() && workshop.getAbnormalItemList().size() > 0).collect(Collectors.toList()));
             }
+            faInfo.setAbnormalWorkshopList(abnormalWorkshopList.stream().filter(workshop -> null != workshop.getAbnormalItemList() && workshop.getAbnormalItemList().size() > 0).collect(Collectors.toList()));
 
             if (abnormalDetailReq.getAbnormalType() == 1) {
                 for (AbnormalTaskInfoRes task : faList) {