|
|
|
|
@ -8,6 +8,7 @@ import com.alibaba.excel.ExcelReader;
|
|
|
|
|
import com.alibaba.excel.context.AnalysisContext; |
|
|
|
|
import com.alibaba.excel.read.listener.ReadListener; |
|
|
|
|
import com.alibaba.excel.read.metadata.ReadSheet; |
|
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
@ -21,13 +22,11 @@ import com.biutag.supervision.pojo.entity.SupTaskTestingAlcoholPeople;
|
|
|
|
|
import com.biutag.supervision.pojo.param.TaskTestingAlcoholPeopleQueryParam; |
|
|
|
|
import com.biutag.supervision.pojo.param.TaskTestingAlcoholQueryParam; |
|
|
|
|
import com.biutag.supervision.pojo.param.TaskTestingTaskDistribute; |
|
|
|
|
import com.biutag.supervision.pojo.vo.TaskCountVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.TaskInspectionProblemVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.TaskTestingAlcoholPeopleVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.TaskTestingAlcoholVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.*; |
|
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
@ -158,7 +157,52 @@ public class TestingAlcoholController {
|
|
|
|
|
@PostMapping("/issueMatter") |
|
|
|
|
public Result issueMatterFun(@RequestBody TaskTestingTaskDistribute distribute){ |
|
|
|
|
|
|
|
|
|
TaskInspectionProblemVo vo = distribute.getProblemVo(); |
|
|
|
|
|
|
|
|
|
TaskInspectionProblemVo vo =new TaskInspectionProblemVo(); |
|
|
|
|
switch (distribute.getTableKey()){ |
|
|
|
|
case "sdzc": |
|
|
|
|
vo= distribute.getProblemVo(); |
|
|
|
|
break; |
|
|
|
|
case "rcdc": |
|
|
|
|
vo= distribute.getProblemVo(); |
|
|
|
|
break; |
|
|
|
|
case "lxgddc": |
|
|
|
|
//违反六项规定
|
|
|
|
|
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)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case "zdrydc": |
|
|
|
|
List<SupTaskProblem> taskProblems = supTaskProblemService.list(new LambdaQueryWrapper<SupTaskProblem>().eq(SupTaskProblem::getSupRecordId,distribute.getSupRecordId())); |
|
|
|
|
if(CollectionUtil.isNotEmpty(taskProblems)){ |
|
|
|
|
SupTaskProblem problem = taskProblems.get(0); |
|
|
|
|
BeanUtils.copyProperties(problem, vo); |
|
|
|
|
if (StrUtil.isNotBlank(problem.getPeoples())) { |
|
|
|
|
vo.setPeoples(JSON.parseArray(problem.getPeoples(), TaskProblemDto.People.class)); |
|
|
|
|
} |
|
|
|
|
if (StrUtil.isNotBlank(problem.getFiles())) { |
|
|
|
|
vo.setFiles(JSON.parseArray(problem.getFiles(), FileVo.class)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NegativeDto dto =new NegativeDto(); |
|
|
|
|
//问题来源
|
|
|
|
|
|