Browse Source

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

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

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

Loading…
Cancel
Save