Переглянути джерело

大中型已办添加详情页面

wucl 11 місяців тому
батько
коміт
18b1ac660a

+ 4 - 1
dao/src/main/resources/mapper/WorkTaskRecordMapper.xml

@@ -198,10 +198,13 @@
             m.name AS majorName,
             wn.name AS nodeName,
             wf.created as finishTime,
+            wf.business_sub_id as statementNo,
             ifnull(wf.business_min_id,wf.business_sub_id) as reportNo,
             wfni.state as instanceState,
             wfni.id as instanceId,
-        (select name from major_production where deleted = 0 and report_no= (ifnull(wf.business_min_id,wf.business_sub_id))) as productionName
+        (select name from major_production where deleted = 0 and report_no= (ifnull(wf.business_min_id,wf.business_sub_id))) as productionName,
+        (select production  from major_production where deleted = 0 and report_no= (ifnull(wf.business_min_id,wf.business_sub_id))) as productionType
+
         FROM
             (
                     ( SELECT * FROM work_flow_log WHERE handler_id = #{todoVO.handlerId}  and business_type='MAJOR_BUSINESS' ) wf

+ 4 - 0
domain/src/main/java/com/dayou/vo/MajorTaskDoneVO.java

@@ -92,4 +92,8 @@ public class MajorTaskDoneVO {
 
     private String productionName;
 
+    private String productionType;
+
+    private String statementNo;
+
 }

+ 8 - 4
service/src/main/java/com/dayou/service/impl/BusinessProductionPerformanceServiceImpl.java

@@ -1,5 +1,6 @@
 package com.dayou.service.impl;
 
+import cn.hutool.core.collection.CollectionUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.dayou.common.BaseEntity;
 import com.dayou.dto.TaskRecordDTO;
@@ -76,6 +77,7 @@ public class BusinessProductionPerformanceServiceImpl extends ServiceImpl<Busine
             BusinessProductionPerformanceVO businessProductionPerformance = new BusinessProductionPerformanceVO();
             if (performance.getBusinessType().equals(MainBusinessEnum.MAJOR_BUSINESS.name())){
                 List<BusinessProductionPerformance> performances = businessProductionPerformanceMapper.getMajorDetail(performance);
+                if (CollectionUtil.isNotEmpty(performances)){
                     for (BusinessProductionPerformance bpp: performances){
                         if (bpp.getId()==null){
                             bpp.setCheckLoop(performance.getCheckLoop());
@@ -84,10 +86,12 @@ public class BusinessProductionPerformanceServiceImpl extends ServiceImpl<Busine
                         }
                         businessProductionPerformance.getInfo().add(bpp);
                     }
-                businessProductionPerformance.setPrincipal(performances.get(0).getPrincipal());
-                businessProductionPerformance.setProductionName(performances.get(0).getProductionName());
-                businessProductionPerformance.setProductionType(performances.get(0).getProductionType());
-                businessProductionPerformance.setProductionNo(performance.getProductionNo());
+                    businessProductionPerformance.setPrincipal(performances.get(0).getPrincipal());
+                    businessProductionPerformance.setProductionName(performances.get(0).getProductionName());
+                    businessProductionPerformance.setProductionType(performances.get(0).getProductionType());
+                    businessProductionPerformance.setProductionNo(performance.getProductionNo());
+                }
+
             }
             return businessProductionPerformance;
     }