Kaynağa Gözat

试验-接入成渝第三方接口开发
1、绑定试验报告的时候查询实验报告添加类型筛选
2、成渝那边只有自检有类型区分

LHB 1 ay önce
ebeveyn
işleme
f547787537

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSelfInspectionRecordPageDTO.java

@@ -27,4 +27,7 @@ public class TrialSelfInspectionRecordPageDTO extends TrialSelfInspectionRecord
 
     @ApiModelProperty(value = "排序类型, 1 记录/报告编号升序, 2 记录/报告编号降序, 3 规格型号升序, 4 规格型号降序")
     private String sortType;
+
+    @ApiModelProperty("类型:0-施工,1-监理,2-业主")
+    private Integer reportType;
 }

+ 2 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialCyThirdReportQueryVo.java

@@ -27,5 +27,6 @@ public class TrialCyThirdReportQueryVo {
     private Long qualityTestPKeyId;
     @ApiModelProperty("类型:0-外委检测,1-第三方")
     private Integer type;
-
+    @ApiModelProperty("类型:0-施工,1-监理,2-业主")
+    private Integer reportType;
 }

+ 3 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyFinishTestReportMapper.xml

@@ -29,7 +29,9 @@
             <if test="query.endTime != null">
                 AND report_date &lt;= #{query.endTime}
             </if>
-
+            <if test="query.reportType != null">
+                AND cs = #{query.reportType}
+            </if>
         </where>
     </select>
 </mapper>

+ 9 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -1911,6 +1911,15 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             endTime = DateUtil.format(DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
             queryWrapper.lambda().between(TrialSelfInspectionRecord::getReportDate, dto.getStartTime(), endTime);
         }
+        if (dto.getReportType() != null) {
+            if (dto.getReportType() == 0) {
+                queryWrapper.lambda().eq(TrialSelfInspectionRecord::getType, 1);
+            } else if (dto.getReportType() == 1) {
+                queryWrapper.lambda().eq(TrialSelfInspectionRecord::getType, 2);
+            } else if (dto.getReportType() == 2) {
+                queryWrapper.lambda().eq(TrialSelfInspectionRecord::getType, 3);
+            }
+        }
         queryWrapper.lambda().eq(TrialSelfInspectionRecord::getTaskStatus, "已审批");
         queryWrapper.lambda().eq(TrialSelfInspectionRecord::getDetectionResult, 1); //合格
         queryWrapper.lambda().eq(TrialSelfInspectionRecord::getDetectionCategory, 1); //自检