init
parent
1c51ead7dd
commit
25e8d05b1c
|
|
@ -16,9 +16,6 @@ public interface OrgPersonnelConvertor {
|
|||
/**
|
||||
* Entity 转 CO
|
||||
*/
|
||||
@Mapping(target = "basicDisciplineMajorId", ignore = true)
|
||||
@Mapping(target = "technicalDirectorFlag", ignore = true)
|
||||
@Mapping(target = "processControlLeaderFlag", ignore = true)
|
||||
@Mapping(target = "deptName", ignore = true)
|
||||
@Mapping(target = "postName", ignore = true)
|
||||
@Mapping(target = "certNames", ignore = true)
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ public class OrgPersonnelDomainService {
|
|||
}
|
||||
assertAccountUnique(entity.getAccount(), entity.getId());
|
||||
assertIdcarNoUnique(entity.getIdCardNo(), entity.getId());
|
||||
mergeForModify(existing, entity);
|
||||
existing.setJoinWorkDate(entity.getJoinWorkDate());
|
||||
return orgPersonnelGateway.modify(existing);
|
||||
// mergeForModify(existing, entity);
|
||||
// existing.setJoinWorkDate(entity.getJoinWorkDate());
|
||||
return orgPersonnelGateway.modify(entity);
|
||||
}
|
||||
|
||||
private void assertIdcarNoUnique(String idCardNo, Long excludeId) {
|
||||
|
|
@ -68,91 +68,6 @@ public class OrgPersonnelDomainService {
|
|||
}
|
||||
}
|
||||
|
||||
private void mergeForModify(OrgPersonnelEntity target, OrgPersonnelEntity patch) {
|
||||
if (StringUtils.hasText(patch.getUserName())) {
|
||||
target.setUserName(patch.getUserName());
|
||||
}
|
||||
if (StringUtils.hasText(patch.getAccount())) {
|
||||
target.setAccount(patch.getAccount());
|
||||
}
|
||||
if (patch.getGenderCode() != null) {
|
||||
target.setGenderCode(patch.getGenderCode());
|
||||
target.setGenderName(patch.getGenderName());
|
||||
}
|
||||
if (patch.getBirthDate() != null) {
|
||||
target.setBirthDate(patch.getBirthDate());
|
||||
}
|
||||
if (patch.getIdCardNo() != null) {
|
||||
target.setIdCardNo(patch.getIdCardNo());
|
||||
}
|
||||
if (patch.getCurrentAddress() != null) {
|
||||
target.setCurrentAddress(patch.getCurrentAddress());
|
||||
}
|
||||
if (patch.getOfficeAddress() != null) {
|
||||
target.setOfficeAddress(patch.getOfficeAddress());
|
||||
}
|
||||
if (patch.getEducationCode() != null) {
|
||||
target.setEducationCode(patch.getEducationCode());
|
||||
target.setEducationName(patch.getEducationName());
|
||||
}
|
||||
if (patch.getGraduateSchool() != null) {
|
||||
target.setGraduateSchool(patch.getGraduateSchool());
|
||||
}
|
||||
if (patch.getMajor() != null) {
|
||||
target.setMajor(patch.getMajor());
|
||||
}
|
||||
if (patch.getEmploymentStatusCode() != null) {
|
||||
target.setEmploymentStatusCode(patch.getEmploymentStatusCode());
|
||||
target.setEmploymentStatusName(patch.getEmploymentStatusName());
|
||||
}
|
||||
if (patch.getDeptId() != null) {
|
||||
target.setDeptId(patch.getDeptId());
|
||||
}
|
||||
if (patch.getPostId() != null) {
|
||||
target.setPostId(patch.getPostId());
|
||||
}
|
||||
if (StringUtils.hasText(patch.getPersonTypeCode())) {
|
||||
target.setPersonTypeCode(patch.getPersonTypeCode());
|
||||
target.setPersonTypeName(patch.getPersonTypeName());
|
||||
}
|
||||
if (patch.getQualScope() != null) {
|
||||
target.setQualScope(patch.getQualScope());
|
||||
}
|
||||
if (StringUtils.hasText(patch.getProfessionalLevelCode())) {
|
||||
target.setProfessionalLevelCode(patch.getProfessionalLevelCode());
|
||||
target.setProfessionalLevelName(patch.getProfessionalLevelName());
|
||||
}
|
||||
if (patch.getEvaluatorCertNo() != null) {
|
||||
target.setEvaluatorCertNo(patch.getEvaluatorCertNo());
|
||||
}
|
||||
if (StringUtils.hasText(patch.getEducationTypeCode())) {
|
||||
target.setEducationTypeCode(patch.getEducationTypeCode());
|
||||
target.setEducationTypeName(patch.getEducationTypeName());
|
||||
}
|
||||
if (StringUtils.hasText(patch.getEducationLevelCode())) {
|
||||
target.setEducationLevelCode(patch.getEducationLevelCode());
|
||||
target.setEducationLevelName(patch.getEducationLevelName());
|
||||
}
|
||||
if (patch.getTitleCode() != null) {
|
||||
target.setTitleCode(patch.getTitleCode());
|
||||
}
|
||||
if (patch.getRegisterEngineerFlag() != null) {
|
||||
target.setRegisterEngineerFlag(patch.getRegisterEngineerFlag());
|
||||
}
|
||||
if (patch.getPublications() != null) {
|
||||
target.setPublications(patch.getPublications());
|
||||
}
|
||||
if (patch.getAbilityDeclaration() != null) {
|
||||
target.setAbilityDeclaration(patch.getAbilityDeclaration());
|
||||
}
|
||||
if (patch.getWorkExperience() != null) {
|
||||
target.setWorkExperience(patch.getWorkExperience());
|
||||
}
|
||||
if (patch.getProofMaterialUrl() != null) {
|
||||
target.setProofMaterialUrl(patch.getProofMaterialUrl());
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(Long id) {
|
||||
OrgPersonnelEntity existing = orgPersonnelGateway.get(id);
|
||||
if (existing == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue