瀏覽代碼

修改代办工单接口

tags/v1.0.0^2
chengwang 1 年之前
父節點
當前提交
cbadeaf3f3
共有 1 個檔案被更改,包括 0 行新增21 行删除
  1. +0
    -21
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java

+ 0
- 21
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java 查看文件

@@ -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)){

Loading…
取消
儲存