|
|
@@ -77,12 +77,7 @@ public class InspectionServiceImpl implements IInspectionService { |
|
|
|
.eq(Dept::getMark, 1)); |
|
|
|
//初始部门id |
|
|
|
String deptIdInt = query.getDeptId(); |
|
|
|
//query.setDeptId("1"); |
|
|
|
//获取当前部门对应的巡检任务 |
|
|
|
// List<Inspection> inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery() |
|
|
|
// .eq(StringUtils.isNotEmpty(query.getDeptId()), Inspection::getDeptId, query.getDeptId()) |
|
|
|
// .eq(Inspection::getMark, 1) |
|
|
|
// .eq(Inspection::getTenantId,0)); |
|
|
|
//获取分页数据 |
|
|
|
IPage<Inspection> page = new Page<>(query.getPage(),query.getLimit()); |
|
|
|
IPage<InspectionInfoVo> pageDataVo = new Page<>(query.getPage(),query.getLimit()); |
|
|
@@ -112,20 +107,12 @@ public class InspectionServiceImpl implements IInspectionService { |
|
|
|
.eq(StringUtils.isNotEmpty(x.getId()), InspectionFile::getInspectionId, x.getId()) |
|
|
|
.eq(InspectionFile::getTenantId, tenantId) |
|
|
|
.eq(InspectionFile::getMark,1)); |
|
|
|
// if(StringUtils.isEmpty(inspectionFileList)){ |
|
|
|
// throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
|
// } |
|
|
|
if(StringUtils.isNotEmpty(inspectionFileList)){ |
|
|
|
problemsVerifiedNum = inspectionFileList.size(); |
|
|
|
long count = inspectionFileList.stream().filter(t -> t.getStatus() == 15).count(); |
|
|
|
long count1 = inspectionFileList.stream().filter(t -> t.getStatus() == 20).count(); |
|
|
|
long count2 = inspectionFileList.stream().filter(t -> t.getStatus() == 25).count(); |
|
|
|
problemsFoundNum = (int) (count + count1 +count2); |
|
|
|
// for (InspectionFile inspectionFile : inspectionFileList) { |
|
|
|
// if (15 == inspectionFile.getStatus()) { |
|
|
|
// problemsFoundNum += 1; |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
x.setFlag(0); |
|
|
|
x.setProblemsFoundNum(problemsFoundNum); |
|
|
@@ -158,20 +145,12 @@ public class InspectionServiceImpl implements IInspectionService { |
|
|
|
.eq(StringUtils.isNotEmpty(x.getId()), InspectionFile::getInspectionId, x.getId()) |
|
|
|
.eq(InspectionFile::getTenantId, tenantId) |
|
|
|
.eq(InspectionFile::getMark,1)); |
|
|
|
// if(StringUtils.isEmpty(inspectionFileList)){ |
|
|
|
// throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
|
// } |
|
|
|
if(StringUtils.isNotEmpty(inspectionFileList)){ |
|
|
|
problemsVerifiedNum = inspectionFileList.size(); |
|
|
|
long count = inspectionFileList.stream().filter(t -> t.getStatus() == 15).count(); |
|
|
|
long count1 = inspectionFileList.stream().filter(t -> t.getStatus() == 20).count(); |
|
|
|
long count2 = inspectionFileList.stream().filter(t -> t.getStatus() == 25).count(); |
|
|
|
problemsFoundNum = (int) (count + count1 +count2); |
|
|
|
// for (InspectionFile inspectionFile : inspectionFileList) { |
|
|
|
// if (15 == inspectionFile.getStatus()) { |
|
|
|
// problemsFoundNum += 1; |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
//获取任务deptId1:1为部门任务 0为子部门任务 |
|
|
|
if(deptIdInt.equals(deptId)){ |