项目评估结果去重
This commit is contained in:
+9
-2
@@ -59,7 +59,7 @@ public class SarStandardComplianceAssessResultController {
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
queryWrapper.select("distinct STAND_ID,STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
}
|
||||
@@ -70,8 +70,15 @@ public class SarStandardComplianceAssessResultController {
|
||||
queryWrapper.like("type", eo.getType().trim());
|
||||
}
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
List<String> ids=new ArrayList<>();
|
||||
page.getRecords().forEach(productAssess -> {ids.add(productAssess.getStandId());});
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper1 = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage1 = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper1.select(" STAND_ID,STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
queryWrapper1.in("STAND_ID",ids);
|
||||
IPage<SarStandardComplianceProductAssess> page2 = iSarStandardComplianceProductAssessService.page(iPage1, queryWrapper1);
|
||||
|
||||
while (page.getRecords().remove(null)) ;
|
||||
while (page2.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user