Commit 429ea393 authored by huyuchen's avatar huyuchen

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

parents b256800b f85a73c9
......@@ -455,6 +455,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankName;
/**
* 开户行省
......@@ -462,6 +463,7 @@ public class TEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankProvince;
/**
* 开户行市
......@@ -469,6 +471,7 @@ public class TEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankCity;
/**
* 开户行支行
......@@ -477,6 +480,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankSubName;
/**
* 银行卡号
......@@ -485,6 +489,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 计税月份
......@@ -493,6 +498,7 @@ public class TEmployeeInfo extends BaseEntity {
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String taxMonth;
/**
* 通信地址省
......
......@@ -420,6 +420,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankName;
/**
* 开户行省
......@@ -427,6 +428,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankProvince;
/**
* 开户行市
......@@ -434,6 +436,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankCity;
/**
* 开户行支行
......@@ -442,6 +445,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankSubName;
/**
* 银行卡号
......@@ -450,6 +454,7 @@ public class TPreEmployeeInfo extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 计税月份
......
......@@ -219,10 +219,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
// 审核通过并且有在项,取在项
boolean empFirst = false;
if ((main == null || (main != null && CommonConstants.FOUR_STRING.equals(main.getStatus()))) && employee != null && project != null) {
empFirst = true;
}
if (main != null) {
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
empFirst = true;
}
// 2024-7-3 17:23:50 倩倩要求放开状态拦截,前端加按钮禁用即可
/* (CommonConstants.ONE_STRING.equals(main.getStatus())
|| CommonConstants.TWO_STRING.equals(main.getStatus()))
......@@ -240,6 +240,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empId = employee.getId();
tPreEmployeeInfo = new TPreEmployeeInfo();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
setNewSalaryEmpBankInfo(tSalaryEmployee, tPreEmployeeInfo);
tPreEmployeeInfo.setOldId(employee.getId());
}
if (employee == null) {
......@@ -252,6 +254,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (empFirst) {
empId = employee.getId();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
setNewSalaryEmpBankInfo(tSalaryEmployee, tPreEmployeeInfo);
tPreEmployeeInfo.setOldId(employee.getId());
}
tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard());
......@@ -351,28 +355,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
vo.setTpreEmployeeProject(tPreEmployeeProject);
// MVP1.9.1新逻辑:在项信息存在,则去薪资人员里的银行等信息
if (tSalaryEmployee != null) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
if (Common.isEmpty(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
} else {
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
tPreEmployeeInfo.setTaxMonth(tSalaryEmployee.getTaxMonth());
}
} else {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
setNewSalaryEmpBankInfo(tSalaryEmployee, tPreEmployeeInfo);
tPreEmployeeInfoService.updateById(tPreEmployeeInfo);
}
} else {
......@@ -428,7 +411,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpBadRecord info = tEmpBadRecordService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpBadRecord, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && empFirst) {
tPreEmpBadRecord.setId(info.getId());
}
tPreEmpBadRecord.setEmpId(empId);
......@@ -443,7 +426,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpBadRecord.setCreateBy(user.getId());
tPreEmpBadRecord.setCreateName(user.getNickname());
tPreEmpBadRecord.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId)) {
if (Common.isEmpty(tPreEmpBadRecord.getId())) {
tPreEmpBadRecordService.save(tPreEmpBadRecord);
}
}
......@@ -461,7 +444,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpContactInfo info = tEmpContactInfoService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpContactInfo, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && !empFirst) {
tPreEmpContactInfo.setId(info.getId());
}
tPreEmpContactInfo.setEmpId(empId);
......@@ -472,7 +455,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpContactInfo.setCreateBy(user.getId());
tPreEmpContactInfo.setCreateName(user.getNickname());
tPreEmpContactInfo.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId)) {
if (Common.isEmpty(tPreEmpContactInfo.getId())) {
tPreEmpContactInfoService.save(tPreEmpContactInfo);
}
}
......@@ -490,7 +473,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpDisabilityInfo info = tEmpDisabilityInfoService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpDisabilityInfo, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && !empFirst) {
tPreEmpDisabilityInfo.setId(info.getId());
}
tPreEmpDisabilityInfo.setEmpId(empId);
......@@ -508,7 +491,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpDisabilityInfo.setCreateBy(user.getId());
tPreEmpDisabilityInfo.setCreateName(user.getNickname());
tPreEmpDisabilityInfo.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId)) {
if (Common.isEmpty(tPreEmpDisabilityInfo.getId())) {
tPreEmpDisabilityInfoService.save(tPreEmpDisabilityInfo);
}
}
......@@ -526,7 +509,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpEducation info = tEmpEducationService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpEducation, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && !empFirst) {
tPreEmpEducation.setId(info.getId());
}
tPreEmpEducation.setEmpId(empId);
......@@ -555,7 +538,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpEducation.setCreateBy(user.getId());
tPreEmpEducation.setCreateName(user.getNickname());
tPreEmpEducation.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId)) {
if (Common.isEmpty(tPreEmpEducation.getId())) {
tPreEmpEducationService.save(tPreEmpEducation);
}
} else {
......@@ -1060,6 +1043,40 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
/**
* @param tSalaryEmployee
* @param tPreEmployeeInfo
* @Description: 用薪资的人员信息
* @Author: hgw
* @Date: 2024/11/12 14:28
* @return: void
**/
private void setNewSalaryEmpBankInfo(TSalaryEmployee tSalaryEmployee, TPreEmployeeInfo tPreEmployeeInfo) {
if (tSalaryEmployee != null) {
tPreEmployeeInfo.setBankNo(tSalaryEmployee.getBankNo());
if (Common.isEmpty(tSalaryEmployee.getBankNo())) {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
} else {
tPreEmployeeInfo.setBankName(tSalaryEmployee.getBankName());
tPreEmployeeInfo.setBankSubName(tSalaryEmployee.getBankSubName());
tPreEmployeeInfo.setBankProvince(tSalaryEmployee.getBankProvince());
tPreEmployeeInfo.setBankCity(tSalaryEmployee.getBankCity());
tPreEmployeeInfo.setTaxMonth(tSalaryEmployee.getTaxMonth());
}
} else {
tPreEmployeeInfo.setBankNo(null);
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
}
/**
* @Description: 详情
* @Author: hgw
......@@ -1714,6 +1731,13 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
// 有在项,则更新薪资人员
boolean isMustUpdateSalary = false;
if (tPreEmployeeInfo != null && Common.isEmpty(tPreEmployeeInfo.getBankNo())) {
tPreEmployeeInfo.setBankName(null);
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())
&& Common.isNotNull(tPreEmployeeProject.getOldId())) {
empId = tPreEmployeeInfo.getOldId();
......
......@@ -115,6 +115,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return this.salaryUploadCore(vo);
} catch (Exception e){
log.error("薪资导入异常:",e);
return R.failed("薪资导入异常,请检查表数据");
} finally {
importTwoAtomicInteger.decrementAndGet();
}
......@@ -124,7 +125,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
log.error("超出阈值:"+ ResultConstants.IMPORT_DOWN_LOAD_DATA);
return R.failed("薪资导入," + ResultConstants.IMPORT_DOWN_LOAD_DATA);
}
return R.failed("薪资导入," + ResultConstants.IMPORT_DOWN_LOAD_DATA);
}
private R<List<ErrorMessage>> salaryUploadCore(SalaryUploadParamVo vo) {
......
......@@ -804,6 +804,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
return this.getExcelContent(file, excelVo);
} catch (Exception e){
log.error("薪资原表识别异常:",e);
return R.failed("薪资原表识别异常,请检查表数据");
} finally {
importAtomicInteger.decrementAndGet();
}
......@@ -813,7 +814,6 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
log.error("超出阈值:"+ ResultConstants.IMPORT_DOWN_LOAD_DATA);
return R.failed("薪资原表识别," + ResultConstants.IMPORT_DOWN_LOAD_DATA);
}
return R.failed("薪资原表识别中," + ResultConstants.IMPORT_DOWN_LOAD_DATA);
}
/**
......
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