diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskManagementController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskManagementController.java index 4a65078..e8273e3 100644 --- a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskManagementController.java +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskManagementController.java @@ -15,6 +15,7 @@ import com.biutag.supervision.pojo.dto.DataCaseVerifImportDto; import com.biutag.supervision.pojo.dto.SupRiskDto; import com.biutag.supervision.pojo.dto.TaskManagementDto; import com.biutag.supervision.pojo.dto.TemperancePoliceDto; +import com.biutag.supervision.pojo.entity.RiskPersonInfo; import com.biutag.supervision.pojo.entity.SupDepart; import com.biutag.supervision.pojo.entity.SupPolice; import com.biutag.supervision.pojo.entity.SupRiskPersonal; @@ -22,10 +23,7 @@ import com.biutag.supervision.pojo.param.TaskInspectionQueryParam; import com.biutag.supervision.pojo.param.TaskQueryParam; import com.biutag.supervision.pojo.vo.TaskInspectionVo; import com.biutag.supervision.pojo.vo.TaskVo; -import com.biutag.supervision.service.SupDepartService; -import com.biutag.supervision.service.SupPoliceService; -import com.biutag.supervision.service.SupTaskService; -import com.biutag.supervision.service.TaskManagementService; +import com.biutag.supervision.service.*; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; @@ -49,6 +47,11 @@ public class TaskManagementController { private final SupPoliceService policeService; + private final SupRiskPersonalService supRiskPersonalService; + + private final RiskPersonInfoService riskPersonInfoService; + + @GetMapping public Result> pageResult(TaskQueryParam queryParam) { return Result.success(taskService.pageTaskData(queryParam)); @@ -134,10 +137,17 @@ public class TaskManagementController { if(CollectionUtil.isNotEmpty(polices)){ data.setResponsibleEmpNo(polices.get(0).getEmpNo()); } + } + if (StrUtil.isNotBlank(data.getIdCode())){ + RiskPersonInfo riskPersonInfo= riskPersonInfoService.getOne(new LambdaQueryWrapper().eq(RiskPersonInfo::getIdCode,data.getIdCode())); + if(ObjectUtil.isNotEmpty(riskPersonInfo)){ + data.setImgBase64(riskPersonInfo.getImageBase64()); + } } + if(StrUtil.isNotBlank(data.getControlEmpNo())){ SupPolice supPolice= policeService.getByEmpNo(data.getControlEmpNo()); data.setControlIdcode(supPolice.getIdCode()); diff --git a/src/main/java/com/biutag/supervision/mapper/SupRiskPersonalMapper.java b/src/main/java/com/biutag/supervision/mapper/SupRiskPersonalMapper.java index 5e43fca..c0add65 100644 --- a/src/main/java/com/biutag/supervision/mapper/SupRiskPersonalMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/SupRiskPersonalMapper.java @@ -36,10 +36,10 @@ public interface SupRiskPersonalMapper extends BaseMapper { " stp.name as controlName,\n" + " stp.emp_no as controlEmpNo,\n" + " srp.sup_status, " + - " info.image_base64\n" + + " srp.image_base64\n" + " FROM sup_risk_personal as srp\n" + " LEFT JOIN sup_task_person as stp on srp.task_person_id = stp.id\n" + - " LEFT JOIN risk_person_info as info on srp.id_code = info.id_code LEFT JOIN sup_police p on stp.emp_no = p.emp_no where srp.id_code = #{idCode} and srp.task_id = #{taskId}") + " LEFT JOIN sup_police p on stp.emp_no = p.emp_no where srp.id_code = #{idCode} and srp.task_id = #{taskId}") SupRiskPersonalVo getPersonal(Integer taskId, String idCode); } diff --git a/src/main/java/com/biutag/supervision/pojo/dto/SupRiskDto.java b/src/main/java/com/biutag/supervision/pojo/dto/SupRiskDto.java index 2d301d2..40af707 100644 --- a/src/main/java/com/biutag/supervision/pojo/dto/SupRiskDto.java +++ b/src/main/java/com/biutag/supervision/pojo/dto/SupRiskDto.java @@ -64,4 +64,7 @@ public class SupRiskDto { @ExcelProperty({"包保督察人员身份证"}) private String controlIdcode; + @ExcelProperty({"imgBase64"}) + private String imgBase64; + } diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupRiskPersonal.java b/src/main/java/com/biutag/supervision/pojo/entity/SupRiskPersonal.java index 22cb395..557d835 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/SupRiskPersonal.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupRiskPersonal.java @@ -75,4 +75,7 @@ public class SupRiskPersonal { // 工作状态 private String workStatus; + @TableField("image_base64") + private String imageBase64; + } diff --git a/src/main/java/com/biutag/supervision/service/TaskManagementService.java b/src/main/java/com/biutag/supervision/service/TaskManagementService.java index e7d2c13..738f8f9 100644 --- a/src/main/java/com/biutag/supervision/service/TaskManagementService.java +++ b/src/main/java/com/biutag/supervision/service/TaskManagementService.java @@ -157,6 +157,7 @@ public class TaskManagementService { //重点人员 SupRiskPersonal supRiskPersonal=new SupRiskPersonal(); BeanUtils.copyProperties(s,supRiskPersonal); + supRiskPersonal.setImageBase64(s.getImgBase64()); supRiskPersonal.setCreateTime(LocalDateTime.now()); supRiskPersonal.setTaskPersonId(personalSup.getId()); supRiskPersonal.setIdCode(supRiskPersonal.getIdCode().trim());