导入劳务人员bug修复

This commit is contained in:
guoshengxiong 2025-09-10 10:24:21 +08:00
parent 2be88a032b
commit 2c6823552e
4 changed files with 11 additions and 3 deletions

View File

@ -478,7 +478,6 @@ public class WorkerInfo implements Serializable {
", emergentPerson='" + emergentPerson + '\'' +
", emergentPhone='" + emergentPhone + '\'' +
", longTerm=" + longTerm +
", inserviceType=" + inserviceType +
", personType=" + personType +
", teamId=" + teamId +
", departmentId=" + departmentId +

View File

@ -72,6 +72,8 @@ public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {
*/
WorkerInfo selectWorkWorkerInfoWithIdCard(@Param("idCard") String idCard, @Param("projectSn") String projectSn);
WorkerInfo selectWorkWorkerInfoWithIdCardAll(@Param("idCard") String idCard, @Param("projectSn") String projectSn);
/**
* 根据项目sn和出勤卡号查询人员信息
*

View File

@ -388,6 +388,13 @@
and inService_type = 1
LIMIT 1
</select>
<select id="selectWorkWorkerInfoWithIdCardAll" resultType="com.zhgd.xmgl.modules.worker.entity.WorkerInfo">
select *
from worker_info
where project_sn = #{projectSn}
and id_card = #{idCard}
LIMIT 1
</select>
<select id="selectWorkWorkerInfoWithAttendanceNumber" resultType="com.zhgd.xmgl.modules.worker.entity.WorkerInfo">
select *
from worker_info

View File

@ -2177,7 +2177,6 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
workerInfo.setPartyPosition(importInfo.get("党内职务"));
workerInfo.setPayRollBankNumber(importInfo.get("银行卡号"));
workerInfo.setBranchId(Optional.ofNullable(orgMap.get(importInfo.get("支部名称"))).map(m -> m.getId()).orElse(null));
workerInfo.setInserviceType(1);
workerInfo.setUfaceDevId(ufaceId);
workerInfo.setWorkAreaName(importInfo.get("工作区域"));
workerInfo.setNum(importInfo.get("编号"));
@ -2186,7 +2185,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
workerInfo.setEpcCbs(Optional.ofNullable(epcMap.get(importInfo.get("EPC承包商"))).map(m -> m.getId()).orElse(null));
boolean isVaild = IdCardUtils.strongVerifyIdNumber(workerInfo.getIdCard());
if (isVaild) {
WorkerInfo oldWorkerInfo = workerInfoMapper.selectWorkWorkerInfoWithIdCard(workerInfo.getIdCard(), workerInfo.getProjectSn());
WorkerInfo oldWorkerInfo = workerInfoMapper.selectWorkWorkerInfoWithIdCardAll(workerInfo.getIdCard(), workerInfo.getProjectSn());
if (oldWorkerInfo != null) {
if (oldWorkerInfo.toExistString().equals(workerInfo.toExistString())) {
existName.append(workerInfo.getWorkerName());
@ -2199,6 +2198,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
workerInfoService.editWorkerForUploadExcel(workerInfo);
} else {
String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
workerInfo.setInserviceType(1);
workerInfo.setPersonSn(uuid);
workerInfo.setAddTime(new Date());
workerInfo.setAttendanceNumber(workerInfo.getIdCard());