소스 검색

质检资料进度查询已填报时去重

lvy 1 개월 전
부모
커밋
bf2393a329
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      blade-service/blade-business/src/main/java/org/springblade/business/controller/MaterialProgressController.java

+ 4 - 4
blade-service/blade-business/src/main/java/org/springblade/business/controller/MaterialProgressController.java

@@ -524,22 +524,22 @@ public class MaterialProgressController extends BladeController {
         //工序资料
         long processAmount = 0L;
         if (process.size() > 0) {
-            processAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, process).eq(InformationQuery::getClassify, classifyType));
+            processAmount = this.informationQueryService.count(Wrappers.<InformationQuery>query().select("distinct wbs_id").in("wbs_id", process).eq("classify", classifyType));
         }
         //开工报告
         long workStartReportsAmount = 0L;
         if (workStartReports.size() > 0) {
-            workStartReportsAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, workStartReports).eq(InformationQuery::getClassify, classifyType));
+            workStartReportsAmount = this.informationQueryService.count(Wrappers.<InformationQuery>query().select("distinct wbs_id").in("wbs_id", workStartReports).eq("classify", classifyType));
         }
         //质量评定
         long evaluationAmount = 0L;
         if (evaluation.size() > 0) {
-            evaluationAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, evaluation).eq(InformationQuery::getClassify, classifyType));
+            evaluationAmount = this.informationQueryService.count(Wrappers.<InformationQuery>query().select("distinct wbs_id").in("wbs_id", evaluation).eq("classify", classifyType));
         }
         //中间交工
         long completionAmount = 0L;
         if (completion.size() > 0) {
-            completionAmount = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getWbsId, completion).eq(InformationQuery::getClassify, classifyType));
+            completionAmount = this.informationQueryService.count(Wrappers.<InformationQuery>query().select("distinct wbs_id").in("wbs_id", completion).eq("classify", classifyType));
         }
 
         reVO.setProcessMaterialList("开工报告", workStartReports.size(), workStartReportsAmount);