Ver Fonte

大中型正在进行列表查询修改

wucl há 11 meses atrás
pai
commit
f65350e848

+ 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,

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

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