Commit a0d35eb1 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.6.10' into MVP1.6.10

parents 49c0d62a 02bcc89f
...@@ -151,15 +151,15 @@ public class EmployeeInsertVO extends RowIndex implements Serializable { ...@@ -151,15 +151,15 @@ public class EmployeeInsertVO extends RowIndex implements Serializable {
@ExcelProperty(value = "户口性质") @ExcelProperty(value = "户口性质")
private String empRegisType; private String empRegisType;
@ExcelAttribute(name = "档案所在省", isArea = true, isNotEmpty = true, errorInfo = "档案所在省不能为空") @ExcelAttribute(name = "档案所在省", isArea = true)
@ExcelProperty("档案所在省") @ExcelProperty("档案所在省")
private String fileProvince; private String fileProvince;
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince", isNotEmpty = true, errorInfo = "档案所在市不能为空") @ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince")
@ExcelProperty("档案所在市") @ExcelProperty("档案所在市")
private String fileCity; private String fileCity;
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity", isNotEmpty = true, errorInfo = "档案所在县不能为空") @ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity")
@ExcelProperty("档案所在县") @ExcelProperty("档案所在县")
private String fileTown; private String fileTown;
...@@ -215,11 +215,34 @@ public class EmployeeInsertVO extends RowIndex implements Serializable { ...@@ -215,11 +215,34 @@ public class EmployeeInsertVO extends RowIndex implements Serializable {
private String remark; private String remark;
/** /**
* 通信地址 * 通信地址
*/ */
@Schema(description = "通信地址") @ExcelAttribute(name = "通信地址-省",isArea = true, isNotEmpty = true)
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "通信地址") @ExcelProperty("通信地址-省")
private String contactProvince;
/**
* 通信地址市
*/
@ExcelAttribute(name = "通信地址-市",isArea = true,parentField = "contactProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-市")
private String contactCity;
/**
* 通信地址县
*/
@ExcelAttribute(name = "通信地址-区/县",isArea = true,parentField = "contactCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("通信地址-区/县")
private String contactTown;
/**
* 通信地址-详细地址 fxj 20240911 通信地址 调整为 通信地址-详细地址
*/
@ExcelAttribute(name = "通信地址-详细地址")
@Schema(description = "通信地址-详细地址")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "通信地址-详细地址")
private String contactAddress; private String contactAddress;
} }
...@@ -15,9 +15,10 @@ public class EmployeeConstants { ...@@ -15,9 +15,10 @@ public class EmployeeConstants {
public static final String EMP_NATIONAL = "民族必填"; public static final String EMP_NATIONAL = "民族必填";
public static final String ID_PROVINCE = "户籍所在地必填"; public static final String ID_PROVINCE = "户籍所在地必填";
public static final String FILE_PROVINCE = "档案所在地必填"; public static final String FILE_PROVINCE = "档案所在地必填";
public static final String CONTACT_PROVINCE = "通信地址(省市县)必填";
public static final String EMP_REGIS_TYPE = "户口性质必填"; public static final String EMP_REGIS_TYPE = "户口性质必填";
public static final String IS_COLLEGE = "是否大专及以上必填"; public static final String IS_COLLEGE = "是否大专及以上必填";
public static final String CONTACT_ADDRESS = "通信地址必填"; public static final String CONTACT_ADDRESS = "通信地址(详细地址)必填";
public static final String EMP_NATRUE_ZERO = "派遣"; public static final String EMP_NATRUE_ZERO = "派遣";
public static final String EMP_NATRUE_ONE = "外包"; public static final String EMP_NATRUE_ONE = "外包";
public static final String EMP_NATRUE_THREE = "内部员工"; public static final String EMP_NATRUE_THREE = "内部员工";
......
...@@ -277,6 +277,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -277,6 +277,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
adds.add(attaInfo); adds.add(attaInfo);
} }
if (CommonConstants.ONE_STRING.equals(attaInfo.getHandleType())){ if (CommonConstants.ONE_STRING.equals(attaInfo.getHandleType())){
adds.add(attaInfo);
}
if (CommonConstants.TWO_STRING.equals(attaInfo.getHandleType())){
deleteIds.add(attaInfo.getId()); deleteIds.add(attaInfo.getId());
} }
} }
...@@ -284,7 +287,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -284,7 +287,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
attaInfoService.removeBatchByIds(deleteIds); attaInfoService.removeBatchByIds(deleteIds);
} }
if (Common.isNotNull(adds)){ if (Common.isNotNull(adds)){
attaInfoService.saveBatch(adds); attaInfoService.updateBatchById(adds);
} }
} }
} }
...@@ -299,6 +302,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -299,6 +302,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
info.setDomainId(otherFile.getId()); info.setDomainId(otherFile.getId());
} }
} }
// 更新
}if (CommonConstants.ONE_STRING.equals(otherFile.getHandleType())){
if (Common.isNotNull(otherFile.getId())){
empOtherFileService.updateById(otherFile);
if (Common.isNotNull(otherFile.getAttaList())){
for (TAttaInfo info: otherFile.getAttaList()){
info.setDomainId(otherFile.getId());
}
}
}
// 删除时 // 删除时
}else if (CommonConstants.TWO_STRING.equals(otherFile.getHandleType())){ }else if (CommonConstants.TWO_STRING.equals(otherFile.getHandleType())){
empOtherFileService.removeById(otherFile.getId()); empOtherFileService.removeById(otherFile.getId());
...@@ -307,9 +320,20 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -307,9 +320,20 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private void getAttaInfo(TEmployeeInfo emp) { private void getAttaInfo(TEmployeeInfo emp) {
List<TEmpOtherFile> otherFiles = otherFileService.getListByEmpId(emp.getId()); List<TEmpOtherFile> otherFiles = otherFileService.getListByEmpId(emp.getId());
if (Common.isEmpty(otherFiles)){ if (Common.isNotNull(otherFiles)){
List<TAttaInfo> attaInfos;
for (TEmpOtherFile file:otherFiles){ for (TEmpOtherFile file:otherFiles){
file.setAttaList(attaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId,file.getId()))); attaInfos = attaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId,file.getId()));
if (Common.isNotNull(attaInfos)){
URL url;
for (TAttaInfo atta:attaInfos){
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
if (Common.isNotNull(url)){
atta.setAttaUrl(url.toString());
}
}
}
file.setAttaList(attaInfos);
} }
} }
emp.setOtherFiles(otherFiles); emp.setOtherFiles(otherFiles);
...@@ -923,6 +947,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -923,6 +947,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add(EmployeeConstants.FILE_PROVINCE); errorMsg.add(EmployeeConstants.FILE_PROVINCE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.FILE_PROVINCE)); errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.FILE_PROVINCE));
} }
if (Common.isEmpty(employeeInfo.getContactTown())) {
errorMsg.add(EmployeeConstants.CONTACT_PROVINCE);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.CONTACT_PROVINCE));
}
if (Common.isEmpty(employeeInfo.getContactAddress())) { if (Common.isEmpty(employeeInfo.getContactAddress())) {
errorMsg.add(EmployeeConstants.CONTACT_ADDRESS); errorMsg.add(EmployeeConstants.CONTACT_ADDRESS);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.CONTACT_ADDRESS)); errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.CONTACT_ADDRESS));
...@@ -1398,6 +1427,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1398,6 +1427,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp.setMajor(excel.getMajor()); saveEmp.setMajor(excel.getMajor());
} }
} }
// 通信地址所在地
if (Common.isNotNull(excel.getContactProvince())) {
saveEmp.setContactProvince(excel.getContactProvince());
}
if (Common.isNotNull(excel.getContactCity())) {
saveEmp.setContactCity(excel.getContactCity());
}
if (Common.isNotNull(excel.getContactTown())) {
saveEmp.setContactTown(excel.getContactTown());
}
if (Common.isNotNull(excel.getContactAddress())) { if (Common.isNotNull(excel.getContactAddress())) {
if (excel.getContactAddress().length() > 200) { if (excel.getContactAddress().length() > 200) {
errorMsg.add(EmployeeConstants.CONTACT_ADDRESS_LENGTH); errorMsg.add(EmployeeConstants.CONTACT_ADDRESS_LENGTH);
...@@ -1911,6 +1950,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1911,6 +1950,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp.setMajor(excel.getMajor()); saveEmp.setMajor(excel.getMajor());
} }
} }
// 通信地址所在地
if (Common.isNotNull(excel.getContactProvince())) {
saveEmp.setContactProvince(excel.getContactProvince());
}
if (Common.isNotNull(excel.getContactCity())) {
saveEmp.setContactCity(excel.getContactCity());
}
if (Common.isNotNull(excel.getContactTown())) {
saveEmp.setContactTown(excel.getContactTown());
}
if (Common.isNotNull(excel.getContactAddress())) { if (Common.isNotNull(excel.getContactAddress())) {
if (excel.getContactAddress().length() > 200) { if (excel.getContactAddress().length() > 200) {
errorMsg.add(EmployeeConstants.CONTACT_ADDRESS_LENGTH); errorMsg.add(EmployeeConstants.CONTACT_ADDRESS_LENGTH);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment