|
|
|
|
@ -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()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|