Browse Source

fit: 六项规定督察、重点督察下发问题

master
pengwei 4 months ago
parent
commit
e8602ca487
  1. 54
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TestingAlcoholController.java
  2. 16
      src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java
  3. 12
      src/main/java/com/biutag/supervision/pojo/param/TaskTestingTaskDistribute.java
  4. 2
      src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java
  5. 5
      src/main/resources/mapper/SupTaskTestingAlcoholPeopleMapper.xml

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

@ -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();
//问题来源

16
src/main/java/com/biutag/supervision/pojo/entity/SupTaskProblem.java

@ -13,11 +13,11 @@ import java.time.LocalDateTime;
@Getter
public class SupTaskProblem {
//
//
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
//
//
@TableField("task_id")
private String taskId;
@ -25,13 +25,13 @@ public class SupTaskProblem {
@TableField("has_problem")
private Boolean hasProblem;
//
//
@TableField("depart_id")
private String departId;
private String departName;
//
//
@TableField("problem_type")
private String problemType;
@ -67,4 +67,10 @@ public class SupTaskProblem {
private String contentId;
}
@TableField("emp_no")
private String empNo;
@TableField("sup_record_id")
private String supRecordId;
}

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

@ -16,8 +16,16 @@ public class TaskTestingTaskDistribute {
private String id;
//禁酒督察人员
// private TaskTestingAlcoholPeopleVo peopleVos;
private String tableKey;
//警号
private String empNo;
//任务id
private String taskId;
//督察记录id
private String supRecordId;
//问题
private TaskInspectionProblemVo problemVo;

2
src/main/java/com/biutag/supervision/pojo/vo/TaskTestingAlcoholPeopleVo.java

@ -62,6 +62,8 @@ public class TaskTestingAlcoholPeopleVo {
// 检测照片
private String testingFiles;
// 下发状态
private String distributionState;
// private String issueState;

5
src/main/resources/mapper/SupTaskTestingAlcoholPeopleMapper.xml

@ -11,7 +11,6 @@
peo.emp_no,
peo.id_code,
peo.id,
peo.depart_id,
d.short_name depart_name,
p.position,
@ -24,11 +23,13 @@
peo.un_testing_desc,
peo.is_illegal_banquet,
peo.status,
peo.testing_files
peo.testing_files,
stp.distribution_state
FROM
sup_task_testing_alcohol_people peo
left join sup_police p on peo.emp_no = p.emp_no and p.del = 0
left join sup_depart d on peo.depart_id = d.id
LEFT JOIN sup_task_problem stp on peo.emp_no = stp.emp_no
${ew.getCustomSqlSegment}
</select>

Loading…
Cancel
Save