Browse Source

修改确认问题的数量值

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
90f705ce9d
2 changed files with 25 additions and 11 deletions
  1. +24
    -10
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java
  2. +1
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 24
- 10
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java View File

@@ -103,6 +103,9 @@ public class InspectionServiceImpl implements IInspectionService {
if(RoleEnum.SUPER_ADMIN.getCode()==type){
IPage<InspectionInfoVo> IPageData = inspectionMapper.queryPage(page, query);
IPageData.getRecords().stream().forEach(x->{
//修改执行人属性
User user1 = userMapper.selectById(x.getCreateUser());
x.setCreateUser(user1.getRealname());
int problemsFoundNum = 0;
int problemsVerifiedNum = 0;
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(Wrappers.<InspectionFile>lambdaQuery()
@@ -114,11 +117,15 @@ public class InspectionServiceImpl implements IInspectionService {
// }
if(StringUtils.isNotEmpty(inspectionFileList)){
problemsVerifiedNum = inspectionFileList.size();
for (InspectionFile inspectionFile : inspectionFileList) {
if (15 == inspectionFile.getStatus()) {
problemsFoundNum += 1;
}
}
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);
@@ -142,6 +149,9 @@ public class InspectionServiceImpl implements IInspectionService {
query.setDeptId(deptId);
IPage<InspectionInfoVo> pageData = inspectionMapper.queryPage(page,query);
pageData.getRecords().stream().forEach(x->{
//修改执行人属性
User user2 = userMapper.selectById(x.getCreateUser());
x.setCreateUser(user2.getRealname());
int problemsFoundNum = 0;
int problemsVerifiedNum = 0;
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(Wrappers.<InspectionFile>lambdaQuery()
@@ -153,11 +163,15 @@ public class InspectionServiceImpl implements IInspectionService {
// }
if(StringUtils.isNotEmpty(inspectionFileList)){
problemsVerifiedNum = inspectionFileList.size();
for (InspectionFile inspectionFile : inspectionFileList) {
if (15 == inspectionFile.getStatus()) {
problemsFoundNum += 1;
}
}
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)){

+ 1
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java View File

@@ -587,7 +587,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
//今日
DateTime endTime = DateUtil.endOfDay(DateUtil.date());
//一周前的时间
DateTime startTime = DateUtil.offset(DateUtil.beginOfDay(DateUtil.date()), DateField.WEEK_OF_MONTH, -1);
DateTime startTime = DateUtil.offset(DateUtil.beginOfDay(DateUtil.date()), DateField.DAY_OF_WEEK, -6);
if (null == endTime || null == startTime) {
return null;
}

Loading…
Cancel
Save