导入劳务人员bug修复
This commit is contained in:
parent
2be88a032b
commit
2c6823552e
@ -478,7 +478,6 @@ public class WorkerInfo implements Serializable {
|
|||||||
", emergentPerson='" + emergentPerson + '\'' +
|
", emergentPerson='" + emergentPerson + '\'' +
|
||||||
", emergentPhone='" + emergentPhone + '\'' +
|
", emergentPhone='" + emergentPhone + '\'' +
|
||||||
", longTerm=" + longTerm +
|
", longTerm=" + longTerm +
|
||||||
", inserviceType=" + inserviceType +
|
|
||||||
", personType=" + personType +
|
", personType=" + personType +
|
||||||
", teamId=" + teamId +
|
", teamId=" + teamId +
|
||||||
", departmentId=" + departmentId +
|
", departmentId=" + departmentId +
|
||||||
|
|||||||
@ -72,6 +72,8 @@ public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {
|
|||||||
*/
|
*/
|
||||||
WorkerInfo selectWorkWorkerInfoWithIdCard(@Param("idCard") String idCard, @Param("projectSn") String projectSn);
|
WorkerInfo selectWorkWorkerInfoWithIdCard(@Param("idCard") String idCard, @Param("projectSn") String projectSn);
|
||||||
|
|
||||||
|
WorkerInfo selectWorkWorkerInfoWithIdCardAll(@Param("idCard") String idCard, @Param("projectSn") String projectSn);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据项目sn和出勤卡号查询人员信息
|
* 根据项目sn和出勤卡号查询人员信息
|
||||||
*
|
*
|
||||||
|
|||||||
@ -388,6 +388,13 @@
|
|||||||
and inService_type = 1
|
and inService_type = 1
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
</select>
|
</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 id="selectWorkWorkerInfoWithAttendanceNumber" resultType="com.zhgd.xmgl.modules.worker.entity.WorkerInfo">
|
||||||
select *
|
select *
|
||||||
from worker_info
|
from worker_info
|
||||||
|
|||||||
@ -2177,7 +2177,6 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
workerInfo.setPartyPosition(importInfo.get("党内职务"));
|
workerInfo.setPartyPosition(importInfo.get("党内职务"));
|
||||||
workerInfo.setPayRollBankNumber(importInfo.get("银行卡号"));
|
workerInfo.setPayRollBankNumber(importInfo.get("银行卡号"));
|
||||||
workerInfo.setBranchId(Optional.ofNullable(orgMap.get(importInfo.get("支部名称"))).map(m -> m.getId()).orElse(null));
|
workerInfo.setBranchId(Optional.ofNullable(orgMap.get(importInfo.get("支部名称"))).map(m -> m.getId()).orElse(null));
|
||||||
workerInfo.setInserviceType(1);
|
|
||||||
workerInfo.setUfaceDevId(ufaceId);
|
workerInfo.setUfaceDevId(ufaceId);
|
||||||
workerInfo.setWorkAreaName(importInfo.get("工作区域"));
|
workerInfo.setWorkAreaName(importInfo.get("工作区域"));
|
||||||
workerInfo.setNum(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));
|
workerInfo.setEpcCbs(Optional.ofNullable(epcMap.get(importInfo.get("EPC承包商"))).map(m -> m.getId()).orElse(null));
|
||||||
boolean isVaild = IdCardUtils.strongVerifyIdNumber(workerInfo.getIdCard());
|
boolean isVaild = IdCardUtils.strongVerifyIdNumber(workerInfo.getIdCard());
|
||||||
if (isVaild) {
|
if (isVaild) {
|
||||||
WorkerInfo oldWorkerInfo = workerInfoMapper.selectWorkWorkerInfoWithIdCard(workerInfo.getIdCard(), workerInfo.getProjectSn());
|
WorkerInfo oldWorkerInfo = workerInfoMapper.selectWorkWorkerInfoWithIdCardAll(workerInfo.getIdCard(), workerInfo.getProjectSn());
|
||||||
if (oldWorkerInfo != null) {
|
if (oldWorkerInfo != null) {
|
||||||
if (oldWorkerInfo.toExistString().equals(workerInfo.toExistString())) {
|
if (oldWorkerInfo.toExistString().equals(workerInfo.toExistString())) {
|
||||||
existName.append(workerInfo.getWorkerName());
|
existName.append(workerInfo.getWorkerName());
|
||||||
@ -2199,6 +2198,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
workerInfoService.editWorkerForUploadExcel(workerInfo);
|
workerInfoService.editWorkerForUploadExcel(workerInfo);
|
||||||
} else {
|
} else {
|
||||||
String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
|
String uuid = UUID.randomUUID().toString().replace("-", "").toUpperCase();
|
||||||
|
workerInfo.setInserviceType(1);
|
||||||
workerInfo.setPersonSn(uuid);
|
workerInfo.setPersonSn(uuid);
|
||||||
workerInfo.setAddTime(new Date());
|
workerInfo.setAddTime(new Date());
|
||||||
workerInfo.setAttendanceNumber(workerInfo.getIdCard());
|
workerInfo.setAttendanceNumber(workerInfo.getIdCard());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user