人员审核

This commit is contained in:
pengjie 2024-04-23 00:10:09 +08:00
parent a8fe40f59b
commit a39f95b78e
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package com.zhgd.xmgl.modules.worker.entity; package com.zhgd.xmgl.modules.worker.entity;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
@ -219,5 +220,10 @@ public class WorkerInfoAuditRecord implements Serializable {
/**培训是否合格*/ /**培训是否合格*/
@Excel(name = "培训是否合格", width = 15) @Excel(name = "培训是否合格", width = 15)
@ApiModelProperty(value="培训是否合格") @ApiModelProperty(value="培训是否合格")
private java.lang.Boolean isExamPass; private java.lang.Integer isExamPass;
/**培训时间*/
@Excel(name = "培训时间", width = 15)
@ApiModelProperty(value="培训时间")
private Date educationTime;
} }

View File

@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -121,7 +122,8 @@ public class XzWorkerInfoAuditRecordController {
WorkerSafeEducationWorker workerSafeEducationWorker = safeEducationQuestionAnswerService.xzSaveQuestionAnswer(dataVo); WorkerSafeEducationWorker workerSafeEducationWorker = safeEducationQuestionAnswerService.xzSaveQuestionAnswer(dataVo);
WorkerInfoAuditRecord infoAuditRecord = new WorkerInfoAuditRecord(); WorkerInfoAuditRecord infoAuditRecord = new WorkerInfoAuditRecord();
infoAuditRecord.setId(dataVo.getWorkerId()); infoAuditRecord.setId(dataVo.getWorkerId());
infoAuditRecord.setIsExamPass(workerSafeEducationWorker.getIsQualified() == 1 ? true : false); infoAuditRecord.setIsExamPass(workerSafeEducationWorker.getIsQualified() == 1 ? 1 : 0);
infoAuditRecord.setEducationTime(new Date());
workerInfoAuditRecordService.updateById(infoAuditRecord); workerInfoAuditRecordService.updateById(infoAuditRecord);
return Result.success(workerSafeEducationWorker); return Result.success(workerSafeEducationWorker);
} }
@ -169,7 +171,7 @@ public class XzWorkerInfoAuditRecordController {
WorkerInfoAuditRecord workerInfoAuditRecord = workerInfoAuditRecordService.getOne(Wrappers.<WorkerInfoAuditRecord>lambdaQuery() WorkerInfoAuditRecord workerInfoAuditRecord = workerInfoAuditRecordService.getOne(Wrappers.<WorkerInfoAuditRecord>lambdaQuery()
.eq(WorkerInfoAuditRecord::getIdCard, idCard).eq(WorkerInfoAuditRecord::getProjectSn, projectSn)); .eq(WorkerInfoAuditRecord::getIdCard, idCard).eq(WorkerInfoAuditRecord::getProjectSn, projectSn));
if (workerInfoAuditRecord == null) { if (workerInfoAuditRecord == null) {
result.error500(MessageUtil.get("notFindErr")); result.error500("未找到人员信息,请重新输入身份证号");
} else { } else {
result.setResult(workerInfoAuditRecord); result.setResult(workerInfoAuditRecord);
result.setSuccess(true); result.setSuccess(true);