Browse Source

多次提交员工登记,身份证号唯一,更新姓名手机号

master
yinzuomei 3 years ago
parent
commit
b1ac6628ee
  1. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java

@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -88,9 +89,12 @@ public class IcEmployeeRegisterServiceImpl extends BaseServiceImpl<IcEmployeeReg
insert(insertEntity);
detailEntity.setRegisterId(insertEntity.getId());
}else {
origin.setMobile(dto.getMobile());
origin.setName(dto.getName());
updateById(origin);
if(!origin.getName().equals(dto.getName())||!origin.getMobile().equals(dto.getMobile())){
origin.setMobile(dto.getMobile());
origin.setName(dto.getName());
origin.setUpdatedTime(new Date());
updateById(origin);
}
detailEntity.setRegisterId(origin.getId());
}
icEmployeeRegisterDetailService.insert(detailEntity);

Loading…
Cancel
Save