Explorar o código

Merge branch 'master' of http://47.108.172.52:3000/dayou/item-management-1phase

GouGengquan hai 11 meses
pai
achega
52fd60ff45

+ 10 - 0
biz-base/src/main/java/com/dayou/controller/MajorProductionController.java

@@ -46,6 +46,16 @@ public class MajorProductionController extends BaseController {
     }
 
     /**
+     * 大中型产品列表(正在进行)
+     */
+    @GetMapping("/pending")
+    public RestResponse<List<MajorProduction>> getPendingList(MajorProduction majorProduction){
+        List<MajorProduction> list = majorProductionService.getPendingList(majorProduction);
+        return RestResponse.data(list);
+    }
+
+
+    /**
      * 产品仓库列表
      */
     @GetMapping("/house")

+ 2 - 0
dao/src/main/java/com/dayou/mapper/MajorProductionMapper.java

@@ -21,6 +21,8 @@ public interface MajorProductionMapper extends CustomBaseMapper<MajorProduction>
 
     List<MajorProduction> getList(@Param("production") MajorProduction majorProduction);
 
+    List<MajorProduction> getPendingList(@Param("production") MajorProduction majorProduction);
+
     Page<MajorProductionSaveDoneVO> saveDonePage(Page page, @Param("done") MajorProductionSaveDoneVO productionDone,@Param("keyword") String keyword);
 
     Page<MajorProductionVO> getHouse(Page page, @Param("vo") MajorProductionVO vo,@Param("keyword") String keyword);

+ 60 - 2
dao/src/main/resources/mapper/MajorProductionMapper.xml

@@ -82,10 +82,14 @@
                 LEFT JOIN major m ON m.id = mp.major_id
         WHERE
             mp.major_id = #{production.majorId}
-
-          <if test="production!=null and production.afterProduction==null and production.reportNo!=null and production.reportNo!=''  ">
+          <if test="production!=null and production.afterProduction==null
+            and production.statementNo==null and production.reportNo!=null and production.reportNo!=''  ">
               and mp.report_no = #{production.reportNo}
           </if>
+        <if test="production!=null and production.afterProduction==null
+            and production.statementNo!=null and production.statementNo!='' and production.reportNo==null  ">
+            and mp.report_no = #{production.statementNo}
+        </if>
         <if test="production!=null and production.afterProduction!=null and  production.afterProduction=='REPORT' and production.reportNo!=null and production.reportNo!=''  ">
             and mp.report_no in (select report_no from major_target where major_id =  #{production.majorId} and statement_no =#{production.reportNo} and deleted = 0)
         </if>
@@ -95,10 +99,64 @@
           <if test="production!=null and production.production!=null and production.production!=''  ">
               and mp.production = #{production.production}
           </if>
+          <if test="production!=null and production.afterProduction==null and production.statementNo!=null
+                    and production.statementNo!='' and production.reportNo!=null and production.reportNo!=''">
+              and mp.report_no in (#{production.statementNo},#{production.reportNo})
+          </if>
           and mp.deleted = 0 and m.deleted = 0
         order by mp.created ASC ) t where nextInstanceNodeId is null
     </select>
 
+    <select id="getPendingList" parameterType="com.dayou.entity.MajorProduction" resultType="com.dayou.entity.MajorProduction">
+        SELECT
+        mp.id,
+        mp.major_id,
+        mp.report_no,
+        mp.production,
+        mp.signatory,
+        mp.`name`,
+        mp.client_name,
+        mp.client_tel,
+        mp.client_address,
+        mp.`owner`,
+        mp.value_timing,
+        mp.evaluate_acreage,
+        mp.evaluate_amount,
+        mp.evaluate_price,
+        mp.`comment`,
+        mp.qr_code,
+        mp.repertory_state,
+        mp.first_check,
+        mp.second_check,
+        mp.third_check,
+        mp.save_file_check,
+        mp.save_file_second_check,
+        mp.if_save_file,
+        mp.file_path,
+        m.`name` AS majorName,
+        mp.checked_file_path,
+        mp.validate_code
+        FROM
+        major_production mp
+        LEFT JOIN major m ON m.id = mp.major_id
+        WHERE
+        mp.major_id = #{production.majorId}
+        <if test="production!=null and production.afterProduction==null
+            and production.statementNo==null and production.reportNo!=null and production.reportNo!=''  ">
+            and mp.report_no = #{production.reportNo}
+        </if>
+        <if test="production!=null and production.afterProduction==null
+            and production.statementNo!=null and production.statementNo!='' and production.reportNo==null  ">
+            and mp.report_no = #{production.statementNo}
+        </if>
+        <if test="production!=null and production.afterProduction==null and production.statementNo!=null
+                    and production.statementNo!='' and production.reportNo!=null and production.reportNo!=''">
+            and mp.report_no in (#{production.statementNo},#{production.reportNo})
+        </if>
+        and mp.deleted = 0 and m.deleted = 0
+        order by mp.created ASC
+    </select>
+
     <select id="saveDonePage" parameterType="com.dayou.vo.MajorProductionSaveDoneVO" resultType="com.dayou.vo.MajorProductionSaveDoneVO">
         SELECT
             mp.id,

+ 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;
+
 }

+ 2 - 0
service/src/main/java/com/dayou/service/IMajorProductionService.java

@@ -85,4 +85,6 @@ public interface IMajorProductionService extends IService<MajorProduction> {
     Boolean doAllotRealAmountToOrder(List<OrderReportDTO> claimOrders);
 
     Boolean noTaskConfirmDelivery(Long id);
+
+    List<MajorProduction> getPendingList(MajorProduction majorProduction);
 }

+ 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;
     }

+ 5 - 0
service/src/main/java/com/dayou/service/impl/MajorProductionServiceImpl.java

@@ -475,6 +475,11 @@ public class MajorProductionServiceImpl extends ServiceImpl<MajorProductionMappe
     }
 
     @Override
+    public List<MajorProduction> getPendingList(MajorProduction majorProduction) {
+        return majorProductionMapper.getPendingList(majorProduction);
+    }
+
+    @Override
     public Page<TaskTodoVO> todoSaveFilePage(Page page, TaskTodoVO todoVO,String keyword) {
         todoVO.setHandlerId(LoginContext.getCurrentUserId());
         Page<TaskTodoVO> ret = majorProductionMapper.todoSaveFilePage(page,todoVO,keyword);