Commit 2999944b by HlQ

[feat] 巡检管理添加巡检的服务单的状态

1 parent cb274829
...@@ -32,6 +32,11 @@ public class InspectDTO extends BaseDTO { ...@@ -32,6 +32,11 @@ public class InspectDTO extends BaseDTO {
* 状态(0进行中、1待审核、2已完成、3、驳回) * 状态(0进行中、1待审核、2已完成、3、驳回)
*/ */
private Integer status; private Integer status;
/**
* 巡检的服务单的状态 0:未完成 1:已完成
*/
private Integer formStatus;
/** /**
* 巡检人 * 巡检人
*/ */
......
...@@ -46,6 +46,11 @@ public class Inspect { ...@@ -46,6 +46,11 @@ public class Inspect {
* 状态(0进行中、1待审核、2已完成、3、驳回) * 状态(0进行中、1待审核、2已完成、3、驳回)
*/ */
private Integer status; private Integer status;
/**
* 巡检的服务单的状态 0:未完成 1:已完成
*/
private Integer formStatus;
/** /**
* 巡检人 * 巡检人
*/ */
......
...@@ -48,9 +48,7 @@ public class InspectServiceImpl extends MPJBaseServiceImpl<InspectMapper, Inspec ...@@ -48,9 +48,7 @@ public class InspectServiceImpl extends MPJBaseServiceImpl<InspectMapper, Inspec
.filter(CollUtil::isNotEmpty) .filter(CollUtil::isNotEmpty)
.ifPresent(formList -> { .ifPresent(formList -> {
Map<Long, List<FormVO>> inspectId2FormIdMap = formList.stream().collect(Collectors.groupingBy(Form::getPid, Collectors.mapping(form -> converter.convert(form, FormVO.class), Collectors.toList()))); Map<Long, List<FormVO>> inspectId2FormIdMap = formList.stream().collect(Collectors.groupingBy(Form::getPid, Collectors.mapping(form -> converter.convert(form, FormVO.class), Collectors.toList())));
inspectVOPage.getRecords().forEach(inspectVO -> { inspectVOPage.getRecords().forEach(inspectVO -> inspectVO.setFormList(inspectId2FormIdMap.getOrDefault(inspectVO.getId(), List.of())));
inspectVO.setFormList(inspectId2FormIdMap.getOrDefault(inspectVO.getId(), List.of()));
});
}); });
Opt.ofEmptyAble(inspectVOPage.getRecords()) Opt.ofEmptyAble(inspectVOPage.getRecords())
...@@ -60,9 +58,7 @@ public class InspectServiceImpl extends MPJBaseServiceImpl<InspectMapper, Inspec ...@@ -60,9 +58,7 @@ public class InspectServiceImpl extends MPJBaseServiceImpl<InspectMapper, Inspec
.ifPresent(fileList -> { .ifPresent(fileList -> {
Map<Long, Long> id2CntMap = fileList.stream().collect(Collectors.groupingBy(FileInfo::getSourceId Map<Long, Long> id2CntMap = fileList.stream().collect(Collectors.groupingBy(FileInfo::getSourceId
, Collectors.counting())); , Collectors.counting()));
inspectVOPage.getRecords().forEach(inspectVO -> { inspectVOPage.getRecords().forEach(inspectVO -> inspectVO.setFileCount(id2CntMap.getOrDefault(inspectVO.getId(), 0L).intValue()));
inspectVO.setFileCount(id2CntMap.getOrDefault(inspectVO.getId(), 0L).intValue());
});
}); });
return inspectVOPage; return inspectVOPage;
} }
......
...@@ -29,6 +29,10 @@ public class InspectVO { ...@@ -29,6 +29,10 @@ public class InspectVO {
*/ */
private Integer status; private Integer status;
/** /**
* 巡检的服务单的状态 0:未完成 1:已完成
*/
private Integer formStatus;
/**
* 巡检人 * 巡检人
*/ */
private Integer inspectUser; private Integer inspectUser;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!