Browse Source

fit:督察问题下发完善

master
pengwei 4 months ago
parent
commit
13717d7955
  1. 2
      src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java
  2. 43
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java
  3. 2
      src/main/java/com/biutag/supervision/pojo/param/TaskTestingTaskDistribute.java
  4. 3
      src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java

2
src/main/java/com/biutag/supervision/controller/mobileSupervision/InspectionController.java

@ -92,7 +92,7 @@ public class InspectionController {
vo.setPeoples(JSON.parseArray(item.getPeoples(), TaskProblemDto.People.class));
}
if (StrUtil.isNotBlank(item.getFiles())) {
vo.setFiles(JSON.parseArray(item.getFiles(), FileVo.class));
vo.setFileData(JSON.parseArray(item.getFiles(), FileVo.class));
}
return vo;
}).toList();

43
src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java

@ -162,27 +162,36 @@ public class TestingAlcoholController {
switch (distribute.getTableKey()){
case "selfexamination":
vo= distribute.getProblemVo();
if (StrUtil.isNotBlank(distribute.getProblemVo().getFiles())) {
vo.setFileData(JSON.parseArray(distribute.getProblemVo().getFiles(), FileVo.class));
}
break;
case "inspection":
vo= distribute.getProblemVo();
if (StrUtil.isNotBlank(distribute.getProblemVo().getFiles())) {
vo.setFileData(JSON.parseArray(distribute.getProblemVo().getFiles(), FileVo.class));
}
break;
case "testing_alcohol":
//违反六项规定
List<SupTaskProblem> list = supTaskProblemService.list(new LambdaQueryWrapper<SupTaskProblem>().eq(SupTaskProblem::getTaskId,distribute.getTaskId()));
//判断
if(CollectionUtil.isNotEmpty(list)){
list = list.stream().filter(s->StrUtil.isNotEmpty(s.getEmpNo()))
.filter(s->s.getPeoples().contains(distribute.getEmpNo())||s.getEmpNo().equals(distribute.getEmpNo())).toList();
if(CollectionUtil.isNotEmpty(list)){
SupTaskProblem supTaskProblem =list.get(0);
BeanUtils.copyProperties(supTaskProblem, vo);
if (StrUtil.isNotBlank(supTaskProblem.getPeoples())) {
vo.setPeoples(JSON.parseArray(supTaskProblem.getPeoples(), TaskProblemDto.People.class));
}
if (StrUtil.isNotBlank(supTaskProblem.getFiles())) {
vo.setFiles(JSON.parseArray(supTaskProblem.getFiles(), FileVo.class));
}
}
list = list.stream().filter(s->StrUtil.isNotEmpty(s.getEmpNo())).toList();
if(CollectionUtil.isNotEmpty(list)){
list = list.stream().filter(s->s.getPeoples().contains(distribute.getEmpNo())||s.getEmpNo().equals(distribute.getEmpNo())).toList();
if(CollectionUtil.isNotEmpty(list)){
SupTaskProblem supTaskProblem =list.get(0);
BeanUtils.copyProperties(supTaskProblem, vo);
if (StrUtil.isNotBlank(supTaskProblem.getPeoples())) {
vo.setPeoples(JSON.parseArray(supTaskProblem.getPeoples(), TaskProblemDto.People.class));
}
if (StrUtil.isNotBlank(supTaskProblem.getFiles())) {
vo.setFileData(JSON.parseArray(supTaskProblem.getFiles(), FileVo.class));
}
}
}
}
break;
case "risk_personal":
@ -194,12 +203,16 @@ public class TestingAlcoholController {
vo.setPeoples(JSON.parseArray(problem.getPeoples(), TaskProblemDto.People.class));
}
if (StrUtil.isNotBlank(problem.getFiles())) {
vo.setFiles(JSON.parseArray(problem.getFiles(), FileVo.class));
vo.setFileData(JSON.parseArray(problem.getFiles(), FileVo.class));
}
}
break;
default:
vo= distribute.getProblemVo();
if (StrUtil.isNotBlank(distribute.getProblemVo().getFiles())) {
vo.setFileData(JSON.parseArray(distribute.getProblemVo().getFiles(), FileVo.class));
}
break;
}
@ -221,8 +234,8 @@ public class TestingAlcoholController {
}
//主办层级
dto.setHostLevel(Objects.equals(distribute.getDistributionFlow(), DistributionFlowEnum.SECOND.getValue()) ? HostLevelEnums.SECOND.getValue() : HostLevelEnums.THREE.getValue());
if(CollectionUtil.isNotEmpty(vo.getFiles())){
dto.setThingFiles(vo.getFiles());
if(CollectionUtil.isNotEmpty(vo.getFileData())){
dto.setThingFiles(vo.getFileData());
}

2
src/main/java/com/biutag/supervision/pojo/param/TaskTestingTaskDistribute.java

@ -70,5 +70,5 @@ public class TaskTestingTaskDistribute {
private List<FileVo> thingFiles = new ArrayList<>();
private List<FileVo> thingFiles;
}

3
src/main/java/com/biutag/supervision/pojo/vo/TaskInspectionProblemVo.java

@ -44,8 +44,9 @@ public class TaskInspectionProblemVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime supTime;
private String files;
// 附件
private List<FileVo> files = new ArrayList<>();
private List<FileVo> fileData = new ArrayList<>();
private List<TaskProblemDto.People> peoples = new ArrayList<>();

Loading…
Cancel
Save