提交 ad14fa0f authored 作者: tykj's avatar tykj

feat:检查模块功能变更流程

上级 af9d4789
...@@ -128,6 +128,23 @@ public class ExamController { ...@@ -128,6 +128,23 @@ public class ExamController {
@Autowired @Autowired
AreaExhibitionCache areaExhibitionCache; AreaExhibitionCache areaExhibitionCache;
@GetMapping("/check/confirm/search/lib")
@ApiOperation(value = "根据序列号临时搜索")
public ResponseEntity searchForLibraries(@RequestBody CheckSearchVo checkSearchVo) {
List<Integer> rs = new ArrayList<>();
checkSearchVo.getLibs().forEach(
(k,v) -> {
boolean contains = v.contains(checkSearchVo.getContent());
if (contains) {
rs.add(k);
}
}
);
return ResponseEntity.ok(CheckResultVo.builder().ids(rs).build());
}
@GetMapping("/check/confirm/escrow") @GetMapping("/check/confirm/escrow")
@ApiOperation(value = "判断task是否为代管单位的详情任务") @ApiOperation(value = "判断task是否为代管单位的详情任务")
...@@ -333,7 +350,9 @@ public class ExamController { ...@@ -333,7 +350,9 @@ public class ExamController {
.filter(o -> (o.getLevel() == 1 && o.getType() == 2) || (o.getType() == 1 && o.getLevel() == 1)) .filter(o -> (o.getLevel() == 1 && o.getType() == 2) || (o.getType() == 1 && o.getLevel() == 1))
.map(Units::getUnitId) .map(Units::getUnitId)
.collect(toList()); .collect(toList());
List<Units> unitsPro = unitsRepo.findAllById(checkUnitService.findExistDevice(unitsProIds)); List<Units> unitsPro = unitsRepo.findAllById(checkUnitService.findExistDevice(unitsProIds))
.stream().sorted(Comparator.comparing(Units::getShowOrder)).collect(toList());
;
if (isExam) { if (isExam) {
unitsPro = unitsPro.stream().filter(o -> !(o.getLevel() == 1 && o.getType() == 1)).collect(toList()); unitsPro = unitsPro.stream().filter(o -> !(o.getLevel() == 1 && o.getType() == 1)).collect(toList());
...@@ -399,7 +418,8 @@ public class ExamController { ...@@ -399,7 +418,8 @@ public class ExamController {
// 3-2-3 构建省直单位的自查账单及任务 // 3-2-3 构建省直单位的自查账单及任务
List<Units> unitsEs = checkedUnits.stream().filter(o -> o.getEscrow() == 1).collect(toList()); List<Units> unitsEs = checkedUnits.stream().filter(o -> o.getEscrow() == 1).collect(toList());
unitsEs = unitsRepo.findAllById(checkUnitService.findExistDevice(unitsEs.stream().map(Units::getUnitId).collect(toList()))); unitsEs = unitsRepo.findAllById(checkUnitService.findExistDevice(unitsEs.stream()
.sorted(Comparator.comparing(Units::getShowOrder)).map(Units::getUnitId).collect(toList())));
log.info("[核查] 生成省直属统计及详情:{}", unitsEs.toString()); log.info("[核查] 生成省直属统计及详情:{}", unitsEs.toString());
...@@ -440,7 +460,8 @@ public class ExamController { ...@@ -440,7 +460,8 @@ public class ExamController {
if (isExam && checkTypeNum(ceVo.getDetail().get(0).getUnitIds(), 3) if (isExam && checkTypeNum(ceVo.getDetail().get(0).getUnitIds(), 3)
&& (ceVo.getUnitId().equals(unitsRepo.findAllByTypeAndLevel(1, 1).get(0).getUnitId()))) { && (ceVo.getUnitId().equals(unitsRepo.findAllByTypeAndLevel(1, 1).get(0).getUnitId()))) {
List<Units> unitsEs = checkedUnits.stream().filter(o -> o.getLevel() == 2).collect(toList()); List<Units> unitsEs = checkedUnits.stream().filter(o -> o.getLevel() == 2)
.sorted(Comparator.comparing(Units::getShowOrder)).collect(toList());
unitsEs = unitsRepo.findAllById(checkUnitService.findExistDevice(unitsEs.stream().map(Units::getUnitId).collect(toList()))); unitsEs = unitsRepo.findAllById(checkUnitService.findExistDevice(unitsEs.stream().map(Units::getUnitId).collect(toList())));
log.info("[exam] 省级单位对市级单位发起检查,被检查的市级单位为:{}", unitsEs.stream().map(Units::getName).collect(toList()).toString()); log.info("[exam] 省级单位对市级单位发起检查,被检查的市级单位为:{}", unitsEs.stream().map(Units::getName).collect(toList()).toString());
......
package com.tykj.dev.device.confirmcheck.entity.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CheckResultVo {
List<Integer> ids;
}
package com.tykj.dev.device.confirmcheck.entity.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Map;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CheckSearchVo {
private Integer id;
private String content;
private Map<Integer,String> libs;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论