Browse Source

fit:重点人员imgBase64关联

master
pengwei 5 months ago
parent
commit
b4e8eac363
  1. 18
      src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskManagementController.java
  2. 4
      src/main/java/com/biutag/supervision/mapper/SupRiskPersonalMapper.java
  3. 3
      src/main/java/com/biutag/supervision/pojo/dto/SupRiskDto.java
  4. 3
      src/main/java/com/biutag/supervision/pojo/entity/SupRiskPersonal.java
  5. 1
      src/main/java/com/biutag/supervision/service/TaskManagementService.java

18
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<Page<TaskVo>> 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<RiskPersonInfo>().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());

4
src/main/java/com/biutag/supervision/mapper/SupRiskPersonalMapper.java

@ -36,10 +36,10 @@ public interface SupRiskPersonalMapper extends BaseMapper<SupRiskPersonal> {
" 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);
}

3
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;
}

3
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;
}

1
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());

Loading…
Cancel
Save