Commit a4f1c8ea authored by hongguangwu's avatar hongguangwu

1.7.23-去除计税月

parent 9def1fe8
# 禁用计税月份更新入口 - 完整实施计划
## 一、需求概述
根据薪酬计税新规,启用0元申报后,需要将原计税月份更新入口禁用。具体需求包括:
| 序号 | 需求点 | 涉及模块 | 状态 |
| :--- | :--- | :--- | :--- |
| 1 | 薪酬人员查询:详情、编辑、计税月份隐藏 | 薪酬模块 | 待处理 |
| 2 | 薪酬批量导入/更新模板删除计税月份列 | 薪酬模块 | 待处理 |
| 3 | 项目档案详情-发薪信息中计税月份隐藏 | 档案模块 | 待处理 |
| 4 | 在档人员详情-发薪信息中计税月份隐藏 | 档案模块 | 待处理 |
| 5 | 在档人员-编辑 计税月份隐藏 | 档案模块 | 待处理 |
| 6 | 预入职-编辑 计税月份隐藏,批量预入职模版、批量更新模版、批量完善模版中计税月份隐藏 | 预入职模块 | 待处理 |
| 7 | 档案完整度监控-基础信息编辑 计税月份隐藏 | 档案模块 | 待处理 |
| 8 | 作业自动化-待办任务中心-我的待办-档案待完善-基础信息编辑 计税月份隐藏 | 档案模块 | 待处理 |
| 9 | 薪酬导入模版表中,计税月份删除,上传时删除相应校验 | 薪酬模块 | 待处理 |
| 10 | 新资源表配置新增、编辑中对应字段下拉选择需要隐藏计税月份,新资源表配置详情中需要隐藏计税月份 | 系统管理模块 | 待处理 |
| 11 | 导出中若包含计税月份,也需要隐藏 | 全模块 | 待处理 |
## 二、文件分析
### 2.1 薪酬模块文件
| 文件路径 | 用途 | 计税月份字段位置 |
| :--- | :--- | :--- |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryEmployeeVo.java` | 薪酬人员导入VO | 第93-98行:taxMonth |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryEmployeeUpdateVo.java` | 薪酬人员更新VO | 第148-153行:taxMonth |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryEmployeeExportVo.java` | 薪酬人员导出VO | 第143-148行:taxMonth |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryZeroVo.java` | 0申报导入VO | 第94-101行:taxMonth |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryZeroExportVo.java` | 0申报导出VO | 第111-117行:taxMonth |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryAccountVo.java` | 工资报账VO | 第224-228行:taxMonth |
| `yifu-salary/yifu-salary-api/src/main/java/.../vo/TSalaryAccountExportVo.java` | 工资报账导出VO | 第49-51行:taxMonth |
| `yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryEmployeeMapper.xml` | 薪酬人员Mapper | 第48行、第67行、第168行 |
### 2.2 档案模块文件
| 文件路径 | 用途 | 计税月份字段位置 |
| :--- | :--- | :--- |
| `yifu-archives/yifu-archives-api/src/main/java/.../entity/TEmployeeInfo.java` | 在档人员实体 | 第493-500行:taxMonth |
| `yifu-archives/yifu-archives-api/src/main/java/.../entity/TPreEmployeeInfo.java` | 预入职人员实体 | 第458-465行:taxMonth |
| `yifu-archives/yifu-archives-api/src/main/java/.../vo/TMainExportAllVO.java` | 档案导出VO | 第199-200行:field78(计税月份) |
| `yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml` | 在档人员Mapper | 第87行 |
| `yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPreEmployeeInfoMapper.xml` | 预入职Mapper | 第88行 |
| `yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml` | 完整度监控Mapper | 第494行:e.TAX_MONTH field78 |
### 2.3 批量导入模块文件
| 文件路径 | 用途 | 计税月份字段位置 |
| :--- | :--- | :--- |
| `yifu-archives/yifu-archives-api/src/main/java/.../vo/PreUploadEmpImportVo.java` | 预入职导入VO | 第195-196行:taxMonth,第275-276行:taxMonthValue |
| `yifu-archives/yifu-archives-api/src/main/java/.../vo/PreUploadEmpImportTwoVo.java` | 批量更新导入VO | 第153-154行:taxMonth,第236-237行:taxMonthValue |
### 2.4 系统管理模块文件
| 文件路径 | 用途 | 说明 |
| :--- | :--- | :--- |
| `yifu-upms/yifu-upms-api/src/main/java/.../entity/SysOutEmpFormInfo.java` | 新资源表配置实体 | 此为字段配置表,需要在业务代码中过滤计税月份字段 |
## 三、修改方案
### 3.1 薪酬模块修改
| 文件 | 修改内容 |
| :--- | :--- |
| TSalaryEmployeeVo.java | 删除taxMonth字段及其注解(第93-98行) |
| TSalaryEmployeeUpdateVo.java | 删除taxMonth字段及其注解(第148-153行) |
| TSalaryEmployeeExportVo.java | 删除taxMonth字段及其注解(第143-148行) |
| TSalaryEmployeeMapper.xml | 删除第48行和第67行的taxMonth映射,删除第168行的taxMonth查询条件,删除Base_Column_List中的TAX_MONTH |
| TSalaryZeroVo.java | 删除taxMonth字段及其注解(第94-101行) |
| TSalaryZeroExportVo.java | 删除taxMonth字段及其注解(第111-117行) |
| TSalaryAccountVo.java | 删除taxMonth字段及其注解(第224-228行) |
| TSalaryAccountExportVo.java | 删除taxMonth字段及其注解(第49-51行) |
### 3.2 档案模块修改
| 文件 | 修改内容 |
| :--- | :--- |
| TEmployeeInfo.java | 删除taxMonth字段及其注解(第493-500行) |
| TEmployeeInfoMapper.xml | 删除taxMonth映射(第87行) |
| TPreEmployeeInfo.java | 删除taxMonth字段及其注解(第458-465行),保留taxMonthFlag字段 |
| TPreEmployeeInfoMapper.xml | 删除taxMonth映射(第88行),保留taxMonthFlag映射 |
| TMainExportAllVO.java | 删除field78计税月份字段(第199-200行) |
| TCompleteMonitorMapper.xml | 删除`,e.TAX_MONTH field78`(第494行) |
### 3.3 批量导入模块修改
| 文件 | 修改内容 |
| :--- | :--- |
| PreUploadEmpImportVo.java | 删除taxMonth字段(第195-196行)和taxMonthValue字段(第275-276行) |
| PreUploadEmpImportTwoVo.java | 删除taxMonth字段(第153-154行)和taxMonthValue字段(第236-237行) |
## 四、修改步骤
1. 修改薪酬模块所有VO文件
2. 修改薪酬模块Mapper文件
3. 修改档案模块实体类和VO文件
4. 修改档案模块Mapper文件
5. 修改批量导入模块VO文件
## 五、风险评估
| 风险点 | 风险等级 | 应对措施 |
| :--- | :--- | :--- |
| 数据库字段依赖 | 中 | 仅删除VO层字段,数据库字段保留以兼容历史数据 |
| API接口兼容性 | 低 | 字段删除不影响现有API调用(JSON字段缺失不报错) |
| 导出功能影响 | 低 | 导出模板自动适配,无计税月份列 |
| 导入功能影响 | 低 | 导入校验自动忽略计税月份列 |
| Mapper映射影响 | 低 | 删除对应result映射,不影响数据库查询 |
## 六、验证标准
1. 薪酬人员导入模板不包含计税月份列
2. 薪酬人员更新模板不包含计税月份列
3. 薪酬人员详情/编辑页面不显示计税月份字段
4. 在档人员详情/编辑页面不显示计税月份字段
5. 预入职编辑页面不显示计税月份字段
6. 档案完整度监控导出不包含计税月份
7. 批量导入/更新功能正常,不校验计税月份
8. 所有Mapper文件编译通过
9. 0申报导入导出不包含计税月份
10. 工资报账相关功能不包含计税月份
## 七、修改清单
| 文件 | 修改内容 | 修改类型 |
| :--- | :--- | :--- |
| TSalaryEmployeeVo.java | 删除taxMonth字段 | 删除 |
| TSalaryEmployeeUpdateVo.java | 删除taxMonth字段 | 删除 |
| TSalaryEmployeeExportVo.java | 删除taxMonth字段 | 删除 |
| TSalaryEmployeeMapper.xml | 删除taxMonth映射和查询条件 | 删除 |
| TSalaryZeroVo.java | 删除taxMonth字段 | 删除 |
| TSalaryZeroExportVo.java | 删除taxMonth字段 | 删除 |
| TSalaryAccountVo.java | 删除taxMonth字段 | 删除 |
| TSalaryAccountExportVo.java | 删除taxMonth字段 | 删除 |
| TEmployeeInfo.java | 删除taxMonth字段 | 删除 |
| TEmployeeInfoMapper.xml | 删除taxMonth映射 | 删除 |
| TPreEmployeeInfo.java | 删除taxMonth字段 | 删除 |
| TPreEmployeeInfoMapper.xml | 删除taxMonth映射 | 删除 |
| TMainExportAllVO.java | 删除field78计税月份 | 删除 |
| TCompleteMonitorMapper.xml | 删除e.TAX_MONTH field78 | 删除 |
| PreUploadEmpImportVo.java | 删除taxMonth和taxMonthValue | 删除 |
| PreUploadEmpImportTwoVo.java | 删除taxMonth和taxMonthValue | 删除 |
......@@ -491,15 +491,6 @@ public class TEmployeeInfo extends BaseEntity {
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String taxMonth;
/**
* 通信地址省
*/
......
......@@ -252,12 +252,6 @@ public class TEmployeeProject extends BaseEntity {
@Schema(description ="项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6批量导入、7电子签、8预入职,9瓜子)")
private String projectSource;
/**
* 计税月份
*/
@Schema(description ="计税月份")
private String taxMonth;
/**
* 项目档案状态(0草稿、1已审核)
*/
......
......@@ -456,24 +456,6 @@ public class TPreEmployeeInfo extends BaseEntity {
@ExcelProperty("银行卡号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String bankNo;
/**
* 计税月份
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 计税月份是否可编辑:0否;1是(默认是)
*/
@ExcelAttribute(name = "计税月份是否可编辑", maxLength = 1)
@Length(max = 1, message = "计税月份是否可编辑不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份是否可编辑")
private String taxMonthFlag;
/**
* 封面抬头
*/
......
......@@ -295,14 +295,6 @@ public class TPreEmployeeProject extends BaseEntity {
@ExcelProperty("项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)")
@Schema(description = "项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)")
private String projectSource;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@ExcelProperty("计税月份")
@Schema(description = "计税月份")
private String taxMonth;
/**
* 项目档案状态(0草稿、1已审核)
*/
......
......@@ -281,7 +281,7 @@ public class EmployeeInsertVO extends RowIndex implements Serializable {
private String bankCity;
@ExcelAttribute(name = "开户支行", maxLength = 50)
private String bankSubName;
@ExcelAttribute(name = "计税月份", isDate = true, dateFormat = "yyyyMM", maxLength = 6)
private String taxMonth;*/
@ExcelAttribute(name = "计111税月份", isDate = true, dateFormat = "yyyyMM", maxLength = 6)
private String tax1Month;*/
}
......@@ -151,8 +151,6 @@ public class PreUploadEmpImportTwoVo implements Serializable {
private String bankCity;
@ExcelAttribute(name = "开户支行", maxLength = 50)
private String bankSubName;
@ExcelAttribute(name = "计税月份", isDate = true, dateFormat = "yyyyMM", maxLength = 6)
private String taxMonth;
@ExcelAttribute(name = "是否有不良记录", isDataId = true, readConverterExp = "0=是,1=否")
private String badRecordFlag;
......@@ -230,13 +228,11 @@ public class PreUploadEmpImportTwoVo implements Serializable {
private String isCollegeValue;
@ExcelAttribute(name = "学历-值")
private String educationNameValue;
// 银行卡号 开户总行 开户省 开户市 开户支行 计税月份
// 银行卡号 开户总行 开户省 开户市 开户支行
@ExcelAttribute(name = "开户省-值")
private String bankProvinceValue;
@ExcelAttribute(name = "开户市-值")
private String bankCityValue;
@ExcelAttribute(name = "计税月份-值")
private String taxMonthValue;
@ExcelAttribute(name = "身份证开始日期-值")
private Date validityStartValue;
......
......@@ -194,8 +194,6 @@ public class PreUploadEmpImportVo implements Serializable {
private String bankCity;
@ExcelAttribute(name = "开户支行", maxLength = 50)
private String bankSubName;
@ExcelAttribute(name = "计税月份", isDate = true, dateFormat = "yyyyMM", maxLength = 6)
private String taxMonth;
// 字典值起始
@ExcelAttribute(name = "员工类型")
......@@ -269,13 +267,11 @@ public class PreUploadEmpImportVo implements Serializable {
private String disabilityLevelValue;
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种")
private String otherFlagValue;
// 银行卡号 开户总行 开户省 开户市 开户支行 计税月份
// 银行卡号 开户总行 开户省 开户市 开户支行
@ExcelAttribute(name = "开户省")
private String bankProvinceValue;
@ExcelAttribute(name = "开户市")
private String bankCityValue;
@ExcelAttribute(name = "计税月份")
private String taxMonthValue;
@ExcelAttribute(name = "身份证开始日期")
private Date validityStartValue;
......
......@@ -198,8 +198,6 @@ public class TMainExportAllVO {
private String field76;
@ExcelAttribute(needExport = true, name ="开户支行")
private String field77;
@ExcelAttribute(needExport = true, name ="计税月份")
private String field78;
}
......@@ -57,8 +57,9 @@ public class TPreEmpMainVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "档案所在地县", isArea = true, parentField = "fileCity", isNotEmpty = false, errorInfo = "档案所在地县不能为空")
@ExcelProperty("档案所在地县")
private String fileTown;
@ExcelAttribute(name = "计税月份")
@ExcelProperty("计税月份")
private String taxMonth;
/*
@ExcelAttribute(name = "计111税月份")
@ExcelProperty("计111税月份")
private String tax111Month;*/
}
......@@ -619,7 +619,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
headList.add(this.getNewArrayList(new String[]{oneTitle, "开户省"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "开户市"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "开户支行"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "计税月份"}));
Set<String> titleContent = getExportFieldNameDetailByClass(TMainExportAllVO.class);
//ExcelUtil<TMainExportAllVO> util = new ExcelUtil<>(TMainExportAllVO.class)
......
......@@ -3733,7 +3733,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
, "是否曾被认定为工伤", "是否有职业病", "职业病名称", "是否有传染性疾病", "传染病名称", "是否被劳动能力鉴定委员会鉴定为具有伤残等级", "伤残病名称", "伤残等级", "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"
, "是否有不良记录"
, "紧急联系人姓名", "紧急联系人与本人关系", "联系地址-省", "联系地址-市", "联系地址-区/县", "联系地址-详细地址"
, "手机号码(紧急联系人)", "银行卡号", "开户总行", "开户省", "开户市", "开户支行", "计税月份"};
, "手机号码(紧急联系人)", "银行卡号", "开户总行", "开户省", "开户市", "开户支行"};
Map<String, String> modelTitleMap = new HashMap<>();
for (String title : modelTitle) {
modelTitleMap.put(title, title);
......@@ -4019,7 +4019,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (saveEmp.getFileStatus() == CommonConstants.ZERO_INT) {
// 第二步:其他信息并行校验
// 1必填项未填写:紧急联系人
// 2格式不正确:计税月份
// 2格式不正确:计111税月份
// 3校验是否通过:姓名&身份证号是否一致、手机号是否真实、姓名&银行卡号是否一致
// 1必填项未填写:紧急联系人
......@@ -4410,9 +4410,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(excel.getBankCityValue())) {
saveEmp.setBankCity(excel.getBankCityValue());
}
if (Common.isNotNull(excel.getTaxMonthValue())) {
saveEmp.setTaxMonth(excel.getTaxMonthValue());
}
// 1.9.6: 是否有职业资格证书
if (Common.isNotNull(excel.getHaveQualification())) {
String flag = CommonConstants.ZERO_STRING;
......
......@@ -155,7 +155,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 其他附件
private final TEmpOtherFileService tEmpOtherFileService;
// 薪资服务,获取计税月份
// 薪资服务,获取计111税月份
private final DaprSalaryProperties salaryProperties;
// 导入批量校验身份证、卡号、手机号
private final DaprCheckProperties checkProperties;
......@@ -171,8 +171,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private static final String ID = "id";
public static final String TAX_MONTH_REGEX = "^2\\d{5}";
private final RedisUtil redisUtil;
private final AtomicInteger preImportAtomicInteger = new AtomicInteger(0);
......@@ -1141,13 +1139,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
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);
......@@ -1155,7 +1151,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
}
......@@ -1314,33 +1309,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(errorInfo)) {
return R.failed(errorInfo + "不可为空!");
}
// 计税月份
if (Common.isNotNull(tPreEmployee.getBankNo()) && Common.isEmpty(tPreEmployee.getTaxMonth())) {
return R.failed("有银行卡号,计税月份必填!");
}
}
if (Common.isNotNull(tPreEmployee.getTaxMonth())) {
String taxMonth = tPreEmployee.getTaxMonth().trim();
if (!taxMonth.matches(TAX_MONTH_REGEX)) {
return R.failed("计税月份为6位年月,例如:202407!");
}
if (Common.isNotNull(main.getSourType()) && CommonConstants.ONE_STRING.equals(main.getSourType())) {
// 校验:
R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getEmpTaxMonth", oldPreEmployee.getEmpIdcard(), String.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null && !CommonConstants.ZERO_STRING.equals(sdr.getData())) {
taxMonth = sdr.getData();
if (!CommonConstants.ZERO_STRING.equals(taxMonth)
&& !taxMonth.equals(tPreEmployee.getTaxMonth())) {
return R.failed("计税月份和薪酬查询处的计税月份不一致!请填写:" + taxMonth);
}
}
} else if (Common.isNotNull(tPreEmployee.getTaxMonthFlag()) && CommonConstants.ZERO_STRING.equals(tPreEmployee.getTaxMonthFlag())
&& !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth()) ) {
return R.failed("本年度有发薪纪录,计税月份不可编辑!");
}
}
tPreEmployee.setMajor(oldPreEmployee.getMajor());
tPreEmployee.setSchool(oldPreEmployee.getSchool());
tPreEmployee.setAdmissionDate(oldPreEmployee.getAdmissionDate());
......@@ -1738,9 +1710,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setCreateName(user.getNickname());
tPreEmployeeInfo.setCreateTime(LocalDateTime.now());
// 塞计税月份标志
this.setTaxMonthAndFlag(status, tPreEmployeeInfo);
tPreEmployeeInfoService.saveOrUpdate(tPreEmployeeInfo);
}
// 预入职-项目档案表
......@@ -1847,28 +1816,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
/**
* @param status 1:保存
* @Description: 获取计税月份和是否可编辑的标志
* @Author: hgw
* @Date: 2024/7/16 16:15
* @return: java.lang.String
**/
private void setTaxMonthAndFlag(String status, TPreEmployeeInfo employeeInfo) {
String taxMonth = DateUtil.getThisMonth();
employeeInfo.setTaxMonthFlag(CommonConstants.ONE_STRING);
if (CommonConstants.ONE_STRING.equals(status)) {
// 去薪资服务获取
R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getEmpTaxMonth", employeeInfo.getEmpIdcard(), String.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null && !CommonConstants.ZERO_STRING.equals(sdr.getData())) {
taxMonth = sdr.getData();
employeeInfo.setTaxMonthFlag(CommonConstants.ZERO_STRING);
}
}
employeeInfo.setTaxMonth(taxMonth);
}
private YifuUser getNewYifuUser() {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
......@@ -1943,7 +1890,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setBankSubName(null);
tPreEmployeeInfo.setBankProvince(null);
tPreEmployeeInfo.setBankCity(null);
tPreEmployeeInfo.setTaxMonth(null);
}
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getOldId())
&& Common.isNotNull(tPreEmployeeProject.getOldId())) {
......@@ -2121,15 +2067,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
newEmp.setBankProvince(tPreEmployeeInfo.getBankProvince());
newEmp.setBankCity(tPreEmployeeInfo.getBankCity());
newEmp.setBankNo(tPreEmployeeInfo.getBankNo());
String taxMonth = tPreEmployeeInfo.getTaxMonth();
// 2024-11-6 18:23:36 产品倩倩说,有在项,带出来的时候是空,就不用变为当前月
if (Common.isEmpty(tPreEmployeeInfo.getTaxMonth()) && !isMustUpdateSalary) {
taxMonth = DateUtil.getThisMonth();
}
if (Common.isEmpty(tPreEmployeeInfo.getBankNo())) {
taxMonth = null;
}
newEmp.setTaxMonth(taxMonth);
newEmp.setBankName(tPreEmployeeInfo.getBankName());
newEmp.setBankSubName(tPreEmployeeInfo.getBankSubName());
newEmp.setEmpPhone(tPreEmployeeInfo.getEmpPhone());
......@@ -2882,20 +2819,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (project == null || Common.isEmpty(project.getId())) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "未找到预入职项目档案表!"));
} else {
if (Common.isNotNull(employee.getBankNo()) && Common.isEmpty(excel.getTaxMonth())) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "有银行卡号,计税月份必填!"));
continue;
}
if (Common.isNotNull(excel.getTaxMonth())) {
String taxMonth = excel.getTaxMonth().trim();
if (!taxMonth.matches(TAX_MONTH_REGEX)) {
errorMessageList.add(new ErrorMessage<>(excel.getRowIndex(), "计税月份为6位年月,例如:202407!"));
continue;
}
if (Common.isEmpty(employee.getTaxMonthFlag()) || CommonConstants.ONE_STRING.equals(employee.getTaxMonthFlag())) {
employee.setTaxMonth(excel.getTaxMonth());
}
}
employee.setEmpNatrue(excel.getEmpNatrue());
project.setEmpNatrue(excel.getEmpNatrue());
employee.setFileProvince(Integer.parseInt(excel.getFileProvince()));
......@@ -3569,7 +3492,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
, "申报年度", "职业资格名称", "是否曾被认定为工伤", "是否有职业病", "职业病名称", "是否有传染性疾病", "传染病名称"
, "是否被劳动能力鉴定委员会鉴定为具有伤残等级", "伤残病名称", "伤残等级"
, "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种", "是否曾经或正在追究与承担过刑事责任"
, "银行卡号", "开户总行", "开户省", "开户市", "开户支行", "计税月份"};
, "银行卡号", "开户总行", "开户省", "开户市", "开户支行"};
int modelLength = modelTitle.length;
// 1 验证表头:
if (vo.getTitleList() != null && !vo.getTitleList().isEmpty()) {
......@@ -3731,7 +3654,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 第二步:其他信息并行校验
// 1必填项未填写:紧急联系人
// 2格式不正确:计税月份
// 2格式不正确:计111税月份
// 3校验是否通过:姓名&身份证号是否一致、手机号是否真实、姓名&银行卡号是否一致
// 1必填项未填写:紧急联系人
......@@ -4194,12 +4117,10 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setBankCity(info.getBankCityValue());
tPreEmployeeInfo.setBankSubName(info.getBankSubName());
tPreEmployeeInfo.setBankNo(info.getBankNo());
tPreEmployeeInfo.setTaxMonth(info.getTaxMonthValue());
} else {
preEmployeeInfoNeedSalaryList.add(tPreEmployeeInfo);
needSalaryList.add(empIdCard);
}
tPreEmployeeInfo.setTaxMonthFlag(CommonConstants.ONE_STRING);
tPreEmployeeInfo.setContactProvince(info.getContactProvinceValue());
tPreEmployeeInfo.setContactCity(info.getContactCityValue());
tPreEmployeeInfo.setContactTown(info.getContactTownValue());
......@@ -4413,7 +4334,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
emp.setBankCity(info.getBankCity());
emp.setBankSubName(info.getBankSubName());
emp.setBankNo(info.getBankNo());
emp.setTaxMonth(info.getTaxMonth());
}
}
}
......@@ -4485,8 +4405,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private void judgeBank(PreUploadEmpImportVo detail, StringBuilder errorMust) {
if (Common.isNotNull(detail.getBankNo()) && (Common.isEmpty(detail.getBankName())
|| Common.isEmpty(detail.getBankProvince())
|| Common.isEmpty(detail.getBankCity())
|| Common.isEmpty(detail.getTaxMonth()) )) {
|| Common.isEmpty(detail.getBankCity()) )) {
errorMust.append("银行卡号不为空则必填:");
if (Common.isEmpty(detail.getBankName())) {
errorMust.append("开户行总行;");
......@@ -4497,9 +4416,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isEmpty(detail.getBankCity())) {
errorMust.append("开户市;");
}
if (Common.isEmpty(detail.getTaxMonth())) {
errorMust.append("计税月份;");
}
}
}
......
......@@ -495,7 +495,7 @@
,e.HIGN_EDUCATION field40
,if(e.FIRST_WORK_FLAG is null,'',if(e.FIRST_WORK_FLAG=0,'是','否')) field43
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51
,e.BANK_NO field73,e.BANK_NAME field74,e.BANK_PROVINCE field75,e.BANK_CITY field76,e.BANK_SUB_NAME field77,e.TAX_MONTH field78
,e.BANK_NO field73,e.BANK_NAME field74,e.BANK_PROVINCE field75,e.BANK_CITY field76,e.BANK_SUB_NAME field77
FROM t_complete_monitor a
left join t_employee_project p on a.DEPT_NO=p.DEPT_NO
left join t_employee_info e on p.EMP_ID=e.id
......
......@@ -84,7 +84,6 @@
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
......@@ -263,7 +262,6 @@
a.INVOICE_TITLE,
a.BANK_PROVINCE,
a.BANK_CITY,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_TOWN,
......
......@@ -34,7 +34,6 @@
<result property="enjoinDate" column="ENJOIN_DATE"/>
<result property="tryPeriod" column="TRY_PERIOD"/>
<result property="projectSource" column="PROJECT_SOURCE"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="status" column="STATUS"/>
<result property="projectStatus" column="PROJECT_STATUS"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
......@@ -156,7 +155,6 @@
a.ENJOIN_DATE,
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.TAX_MONTH,
a.STATUS,
a.PROJECT_STATUS,
a.DELETE_FLAG,
......@@ -339,9 +337,6 @@
<if test="tEmployeeProject.projectSource != null and tEmployeeProject.projectSource.trim() != ''">
AND a.PROJECT_SOURCE = #{tEmployeeProject.projectSource}
</if>
<if test="tEmployeeProject.taxMonth != null and tEmployeeProject.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{tEmployeeProject.taxMonth}
</if>
<if test="tEmployeeProject.status != null">
AND a.STATUS = #{tEmployeeProject.status}
</if>
......
......@@ -85,11 +85,9 @@
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="contactProvince" column="CONTACT_PROVINCE"/>
<result property="contactCity" column="CONTACT_CITY"/>
<result property="contactTown" column="CONTACT_TOWN"/>
<result property="taxMonthFlag" column="TAX_MONTH_FLAG"/>
<result property="weChatId" column="WE_CHAT_ID"/>
</resultMap>
......@@ -155,11 +153,9 @@
a.INVOICE_TITLE,
a.BANK_PROVINCE,
a.BANK_CITY,
a.TAX_MONTH,
a.CONTACT_PROVINCE,
a.CONTACT_CITY,
a.CONTACT_TOWN,
a.TAX_MONTH_FLAG,
a.WE_CHAT_ID
</sql>
<sql id="tPreEmployeeInfo_where">
......
......@@ -54,7 +54,6 @@
<result property="enjoinDate" column="ENJOIN_DATE"/>
<result property="tryPeriod" column="TRY_PERIOD"/>
<result property="projectSource" column="PROJECT_SOURCE"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="status" column="STATUS"/>
<result property="projectStatus" column="PROJECT_STATUS"/>
<result property="contractStatus" column="CONTRACT_STATUS"/>
......@@ -107,7 +106,6 @@
a.ENJOIN_DATE,
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.TAX_MONTH,
a.STATUS,
a.PROJECT_STATUS,
a.CONTRACT_STATUS,
......@@ -221,9 +219,6 @@
<if test="tPreEmployeeProject.projectSource != null and tPreEmployeeProject.projectSource.trim() != ''">
AND a.PROJECT_SOURCE = #{tPreEmployeeProject.projectSource}
</if>
<if test="tPreEmployeeProject.taxMonth != null and tPreEmployeeProject.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{tPreEmployeeProject.taxMonth}
</if>
<if test="tPreEmployeeProject.status != null">
AND a.STATUS = #{tPreEmployeeProject.status}
</if>
......
......@@ -141,14 +141,7 @@ public class TSalaryEmployeeExportVo{
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号码")
private String empPhone;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 在职状态(0在职;1离职)
*/
......
......@@ -146,15 +146,7 @@ public class TSalaryEmployeeUpdateVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号码")
private String empPhone;
/**
* 计税月份
*/
@Length(max = 6, message = "计税月份 不能超过6 个字符")
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Schema(description = "计税月份")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 在职状态(0在职;1离职)
*/
......
......@@ -184,15 +184,7 @@ public class TSalaryEmployeeVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号码")
private String empPhone;
/**
* 计税月份
*/
@Length(max = 6, message = "计税月份 不能超过6 个字符")
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Schema(description = "计税月份")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 在职状态(0在职;1离职)
*/
......
......@@ -103,14 +103,14 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
}
extracted(newEntity, oldEntity, str);
//计税月份
if (Common.isNotNull(newEntity.getTaxMonth())
/*if (Common.isNotNull(newEntity.getTaxMonth())
&& Common.isNotNull(oldEntity.getTaxMonth()) && !oldEntity.getTaxMonth().equals(newEntity.getTaxMonth())){
str.append("计税月份:");
str.append(oldEntity.getTaxMonth());
str.append("->");
str.append(newEntity.getTaxMonth());
str.append(" ");
}
}*/
//开户行省
if (Common.isNotNull(newEntity.getBankProvince())
&& Common.isNotNull(oldEntity.getBankProvince()) && !oldEntity.getBankProvince().equals(newEntity.getBankProvince())){
......
......@@ -134,12 +134,6 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
/*if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TSalaryEmployeeExportVo.class);
for (TSalaryEmployeeExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}*/
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("薪酬人员表" + index).build();
excelWriter.write(list, writeSheet);
......@@ -891,7 +885,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TSalaryEmployee emp;
// 开户行省市的区域暂存
String areaStr;
boolean curTaxMonth;
//boolean curTaxMonth;
Map<String, String> bankMap = tBankSetService.getBankMap(null);
ExcelUtil<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class);
TSalaryEmployee old;
......@@ -968,12 +962,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
old = new TSalaryEmployee();
if (Common.isNotNull(emp) && Common.isNotNull(emp.getId())) {
BeanUtil.copyProperties(emp,old);
curTaxMonth = false;
/*curTaxMonth = false;
if (Common.isNotNull(emp.getTaxMonth()) && Common.isNotNull(excel.getTaxMonth()) && emp.getTaxMonth().length()==6) {
curTaxMonth = true;
} else if (Common.isNotNull(excel.getTaxMonth())) {
emp.setTaxMonth(excel.getTaxMonth());
}
}*/
if (Common.isNotNull(excel.getBankName())) {
if (bankMap.get(excel.getBankName()) == null) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.BANK_NAME_ERROR));
......@@ -1024,11 +1018,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// 变更日志 fxj 2023-10-24
logService.initModLog(old,emp,CommonConstants.ONE_STRING,user.getNickname(),util);
baseMapper.updateById(emp);
if (curTaxMonth) {
/*if (curTaxMonth) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.CUR_TAX_INFO));
} else {
}*/
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
}
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), SalaryConstants.NOT_HAVE_EMP));
}
......@@ -1213,7 +1207,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
// 开户行省市的区域暂存
String areaProvince;
String areaCity;
boolean curTaxMonth;
//boolean curTaxMonth;
TSalaryEmployee excel;
// 是否可更新
boolean canUpdate = Common.isNotNull(vo.getIsUpdate()) && CommonConstants.ONE_STRING.equals(vo.getIsUpdate());
......@@ -1304,7 +1298,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
emp = empMap.get(idCard);
if (Common.isNotNull(emp)) {
if (canUpdate) {
curTaxMonth = false;
/*curTaxMonth = false;
if (Common.isNotNull(emp.getTaxMonth())) {
curTaxMonth = true;
} else if (Common.isNotNull(excel.getTaxMonth())) {
......@@ -1320,7 +1314,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
errorMessageList.add(new ErrorMessage((i ), SalaryConstants.TAX_MONTH_LENGTH));
continue;
}
}
}*/
if (Common.isNotNull(excel.getBankName())) {
if (bankMap.get(excel.getBankName()) == null) {
errorMessageList.add(new ErrorMessage((i ), SalaryConstants.BANK_NAME_ERROR));
......@@ -1377,11 +1371,11 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
emp.setIssueStatus(CommonConstants.ZERO_INT);
emp.setLineNums(null);
updateList.add(emp);
if (curTaxMonth) {
/*if (curTaxMonth) {
errorMessageList.add(new ErrorMessage((i ), SalaryConstants.CUR_TAX_INFO));
} else {
}*/
errorMessageList.add(new ErrorMessage((i ), CommonConstants.SAVE_SUCCESS));
}
} else {
errorMessageList.add(new ErrorMessage((i ), "已存在,不可更新"));
}
......@@ -1390,7 +1384,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isEmpty(excel.getEmpName()) || Common.isEmpty(idCard)
|| Common.isEmpty(excel.getEmpPhone()) || Common.isEmpty(excel.getBankName())
|| Common.isEmpty(excel.getBankNo()) || Common.isEmpty(excel.getBankProvince())
|| Common.isEmpty(excel.getBankCity()) || Common.isEmpty(excel.getTaxMonth())) {
|| Common.isEmpty(excel.getBankCity()) ) {
errorMessageList.add(new ErrorMessage((i ), "新增员工,除了支行,其他必填"));
continue;
} else {
......@@ -1398,7 +1392,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
errorMessageList.add(new ErrorMessage((i ), CommonConstants.UNDER_16_ERROR));
continue;
}
if (excel.getTaxMonth().length() == 6) {
/*if (excel.getTaxMonth().length() == 6) {
try {
Integer.parseInt(excel.getTaxMonth());
} catch (NumberFormatException e) {
......@@ -1408,7 +1402,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} else {
errorMessageList.add(new ErrorMessage((i ), SalaryConstants.TAX_MONTH_LENGTH));
continue;
}
}*/
if (bankMap.get(excel.getBankName()) == null) {
errorMessageList.add(new ErrorMessage((i ), SalaryConstants.BANK_NAME_ERROR));
continue;
......@@ -1644,14 +1638,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
public String getEmpTaxMonth(String empIdCard) {
// 0表示 未找到薪资记录,C端可编辑
String taxMonth = CommonConstants.ZERO_STRING;
TSalaryEmployee employee = baseMapper.getByEmpIdCard(empIdCard);
if (employee != null && Common.isNotNull(employee.getTaxMonth())) {
// 查找本年度薪资,有则返回薪资人员的计税月份,无则返回空,可编辑
int count = salaryAccountMapper.getAccountIdByIdCard(empIdCard);
if (count > 0) {
taxMonth = employee.getTaxMonth();
}
}
return taxMonth;
}
......@@ -1677,21 +1664,21 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
@Override
public String savePreNewEmpInfo(TSalaryEmployee newEmp) {
// true表示 未找到薪资记录,C端可编辑计税月份
boolean canSaveFlag = true;
//boolean canSaveFlag = true;
TSalaryEmployee employee = baseMapper.getByEmpIdCard(newEmp.getEmpIdcard());
if (employee != null) {
/*if (employee != null) {
// 查找本年度薪资,有则返回薪资人员的计税月份,无则返回空,可编辑
int count = salaryAccountMapper.getAccountIdByIdCard(newEmp.getEmpIdcard());
if (count > 0) {
canSaveFlag = false;
}
}
}*/
if (employee != null) {
String[] ignoreProperties = new String[]{"id", "createBy", "createName", "createTime"};
String[] ignoreProperties = new String[]{"id", "createBy", "createName", "createTime", "taxMonth"};
// 当年有发薪纪录,不允许编辑计税月
if (!canSaveFlag) {
/*if (!canSaveFlag) {
newEmp.setTaxMonth(employee.getTaxMonth());
}
}*/
// 变更日志 hgw 2024-7-16 18:19:57
logService.initModLog(newEmp,employee,CommonConstants.THREE_STRING,newEmp.getCreateName(), null);
BeanUtil.copyProperties(newEmp, employee, ignoreProperties);
......
......@@ -276,9 +276,6 @@ public class SalaryAccountUtil implements Serializable {
}
if (SalaryConstants.EMP_NAME.equals(dbFiedName)) {
empName = cellValueStr = cellValueStr.replace(" ", "");
/*if (isDuplicateName) {
emp = empNameMap.get(empName);
}*/
newEmp.setEmpName(empName);
}
......@@ -481,8 +478,8 @@ public class SalaryAccountUtil implements Serializable {
newEmp.setIssueStatus(isIssue);
// 劳务费要使用人员信息
if (!notLabour) {
R<TSalaryEmployee> eR = this.getNewEmp(newEmp, i + dataRow, errorList, notLabour, entity, salaryType, dept, user
, salaryStyle, salaryGiveTimeFlag, invoiceTitle, tSalaryAccountService
R<TSalaryEmployee> eR = this.getNewEmp(newEmp, i + dataRow, errorList, notLabour, entity, dept, user
, salaryStyle, salaryGiveTimeFlag, invoiceTitle
, tSalaryEmployeeService, bankMap);
if (eR.getCode() != 200) {
continue;
......@@ -500,9 +497,8 @@ public class SalaryAccountUtil implements Serializable {
// newEmpUpdateFlag = CommonConstants.ZERO_STRING
if (setEntityByEmpInfo(dept, ownEmployeeMap, ownDeptMap, salaryType, isIssue, errorList
, entity, emp, saiList, salaryGiveTimeFlag, isNewEmployee, empName, salaryStyle
, nowMonth, updateEmpList, checkBankInfoEmpList, i + dataRow, bankMap
, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap, taxMonthMap
, tSalaryAccountService, invoiceTitle))
, checkBankInfoEmpList, i + dataRow, bankMap
, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap))
continue;
}
if (saiList != null && !saiList.isEmpty()) {
......@@ -562,7 +558,6 @@ public class SalaryAccountUtil implements Serializable {
}
TSalaryEmployee otherEmp;
List<TSalaryEmployee> saveNewEmpList = new ArrayList<>();
List<String> checkTaxMonthList = new ArrayList<>();
boolean isContinue = true;
if (!newEmpList.isEmpty()) {
......@@ -578,19 +573,18 @@ public class SalaryAccountUtil implements Serializable {
if (!this.setNewEmpBase(newEmps, newEmps.getLineNums() + dataRow, errorList, notLabour
, entity, salaryType, dept, user, entity.getSalaryStyle()
, CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime()), invoiceTitle
, entity.getSaiList(), bankMap, taxMonthMap, tSalaryAccountService)) {
, entity.getSaiList(), bankMap)) {
isContinue = false;
continue;
}
newEmps.setSalaryGiveTime(entity.getSalaryGiveTime());
saveNewEmpList.add(newEmps);
checkTaxMonthList.add(newEmps.getEmpIdcard());
} else {
if ("3".equals(salaryType) || "4".equals(salaryType)) {
error = "第" + (newEmps.getLineNums() + dataRow) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage((newEmps.getLineNums() + dataRow), error));
} else {
error = "第" + (newEmps.getLineNums() + dataRow) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!";
error = "第" + (newEmps.getLineNums() + dataRow) + "行:薪酬人员查询菜单无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!";
errorList.add(new ErrorMessage(newEmps.getLineNums() + dataRow, error));
}
isContinue = false;
......@@ -602,54 +596,16 @@ public class SalaryAccountUtil implements Serializable {
, CommonConstants.ZERO_STRING.equals(entity.getSalaryGiveTime())
, CommonConstants.ONE_STRING.equals(entity.getIsNewEmployee())
, otherEmp.getEmpName(), entity.getSalaryStyle()
, nowMonth, updateEmpList, checkBankInfoEmpList, newEmps.getLineNums() + dataRow
, bankMap, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap, taxMonthMap
, tSalaryAccountService, invoiceTitle)) {
, checkBankInfoEmpList, newEmps.getLineNums() + dataRow
, bankMap, newEmpUpdateFlag, updateEmpBankList, updateEmpBankMap)) {
isContinue = false;
}
}
}
}
if (isContinue) {
int nowYear = Integer.parseInt(nowMonth.substring(0, 4));
Map<String, String> minTaxMonthMap = tSalaryAccountService.getMinTaxMonthByNowYearAndList(checkTaxMonthList, nowYear);
String minTaxMonth;
boolean canSave = true;
if (!saveNewEmpList.isEmpty()) {
TSalaryEmployee saveNewEmp;
for (int i = 0; i < saveNewEmpList.size(); i++) {
saveNewEmp = saveNewEmpList.get(i);
// 新员工校验计税月
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
entity = entityMap.get(saveNewEmp.getEmpIdcard());
minTaxMonth = minTaxMonthMap.get(saveNewEmp.getEmpIdcard());
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + (saveNewEmp.getLineNums() + dataRow) + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage((saveNewEmp.getLineNums() + dataRow), error));
canSave = false;
}
}
}
}
if (!updateEmpBankList.isEmpty()) {
TSalaryEmployee saveNewEmp;
for (int i = 0; i < updateEmpBankList.size(); i++) {
saveNewEmp = updateEmpBankList.get(i);
// 新员工校验计税月
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
entity = entityMap.get(saveNewEmp.getEmpIdcard());
minTaxMonth = minTaxMonthMap.get(saveNewEmp.getEmpIdcard());
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + (saveNewEmp.getLineNums() + dataRow) + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage((saveNewEmp.getLineNums() + dataRow), error));
canSave = false;
}
}
}
}
if (canSave) {
//1.7.23 取消计111税月的拦截,因为不是由用户导入的了
// 查本表重
Map<String, Integer> phoneExcelMap = new HashMap<>();
// 新增
......@@ -665,7 +621,6 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
log.error("将jsonString数据源的数据导入到list异常!");
......@@ -710,11 +665,9 @@ public class SalaryAccountUtil implements Serializable {
private boolean setEntityByEmpInfo(TSettleDomainSelectVo dept, Map<String, Integer> ownEmployeeMap
, Map<String, Integer> ownDeptMap, String salaryType, Integer isIssue, List<ErrorMessage> errorList
, TSalaryAccountVo entity, TSalaryEmployee emp, List<TSalaryAccountItemVo> saiList
, boolean salaryGiveTimeFlag, boolean isNewEmployee, String empName, String salaryStyle, String nowMonth
, List<TSalaryEmployee> updateEmpList, List<TSalaryEmployee> checkBankInfoEmpList, int i
, boolean salaryGiveTimeFlag, boolean isNewEmployee, String empName, String salaryStyle, List<TSalaryEmployee> checkBankInfoEmpList, int i
, Map<String, String> bankMap, String newEmpUpdateFlag, List<TSalaryEmployee> updateEmpBankList
, Map<String, TSalaryEmployee> updateEmpBankMap, Map<String, String> taxMonthMap
, TSalaryAccountService tSalaryAccountService, String invoiceTitle) {
, Map<String, TSalaryEmployee> updateEmpBankMap) {
TSalaryAccountItemVo sai;
String error;
emp.setLineNums(i);
......@@ -748,28 +701,6 @@ public class SalaryAccountUtil implements Serializable {
errorList.add(new ErrorMessage(i, error));
return true;
}
if (Common.isEmpty(emp.getTaxMonth()) && !"3".equals(salaryType) && !"4".equals(salaryType)) {
if (Common.isNotNull(entity.getTaxMonth())) {
if (entity.getTaxMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
//entity.setTaxMonth(emp.getTaxMonth().substring(0, 6));
} else if (entity.getTaxMonth().length() < CommonConstants.dingleDigitIntArray[6]) {
error = "第" + i + "行:工资模板里-计税月份-长度小于6:" + entity.getTaxMonth() + ",请在工资模板修改!";
errorList.add(new ErrorMessage(i, error));
return true;
}
if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + i + "行:工资模板里-计税月份-大于当前年月或错误,请调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return true;
}
emp.setTaxMonth(entity.getTaxMonth());
updateEmpList.add(emp);
} else {
error = "第" + i + "行:薪酬人员查询处-计税月份-为空,请在工资模板填写-计税月份-列的内容!";
errorList.add(new ErrorMessage(i, error));
return true;
}
}
if (ownEmployeeMap.get(emp.getEmpIdcard()) != null
|| (isNewEmployee && ownDeptMap.get(dept.getId()) != null)) {
// 自有员工
......@@ -966,25 +897,11 @@ public class SalaryAccountUtil implements Serializable {
} else {
entity.setEmpPhone(emp.getEmpPhone());
}
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if (emp.getTaxMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
//entity.setTaxMonth(emp.getTaxMonth().substring(0, 6));
} else if (emp.getTaxMonth().length() < CommonConstants.dingleDigitIntArray[6]) {
error = "第" + i + "行:薪酬人员查询处-计税月份-长度小于6:" + entity.getTaxMonth() + ",请去薪酬人员查询处更新!在工资模板修改无效!";
errorList.add(new ErrorMessage(i, error));
return true;
} else {
//entity.setTaxMonth(emp.getTaxMonth());
}
if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + i + "行:薪酬人员查询处-计税月份-大于当前年月或错误,请去薪酬人员查询处调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return true;
}
if (!"3".equals(salaryType) && !"4".equals(salaryType)
&& Common.isNotNull(entity.getTaxMonth()) && entity.getTaxMonth().length() == CommonConstants.dingleDigitIntArray[6]) {
sai = new TSalaryAccountItemVo();
sai.setCnName(SalaryConstants.COST_REDUCTION);
sai.setJavaFiedName(SalaryConstants.COST_REDUCTION_JAVA);
sai.setSalaryMoney(DateUtil.getTaxMonthMoney(entity.getTaxMonth()));
sai.setIsTax(CommonConstants.ZERO_INT);
saiList.add(sai);
......@@ -999,15 +916,14 @@ public class SalaryAccountUtil implements Serializable {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee>
**/
private R<TSalaryEmployee> getNewEmp(TSalaryEmployee newEmp, int i, List<ErrorMessage> errorList, boolean notLabour
, TSalaryAccountVo entity, String salaryType, TSettleDomainSelectVo dept, YifuUser user, String salaryStyle
, boolean salaryGiveTimeFlag, String invoiceTitle, TSalaryAccountService tSalaryAccountService
, TSalaryAccountVo entity, TSettleDomainSelectVo dept, YifuUser user, String salaryStyle
, boolean salaryGiveTimeFlag, String invoiceTitle
, TSalaryEmployeeService tSalaryEmployeeService, Map<String, String> bankMap) {
String newEmpStr = "新员工";
if (!notLabour) {
newEmpStr = "劳务费";
}
String error;
String nowMonth = DateUtil.addMonth(CommonConstants.ZERO_INT);
//增加工资人员档案:(临时使用)
if (newEmp != null) {
if (Common.isEmpty(newEmp.getEmpName())) {
......@@ -1035,23 +951,6 @@ public class SalaryAccountUtil implements Serializable {
newEmp = new TSalaryEmployee();
}
if (entity != null) {
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if (Common.isEmpty(entity.getTaxMonth())) {
error = "第" + i + "行:" + newEmpStr + "-计税月份-不可为空!";
errorList.add(new ErrorMessage(i, error));
return R.failed();
} else if (entity.getTaxMonth().length() < CommonConstants.dingleDigitIntArray[6]) {
error = "第" + i + "行:" + newEmpStr + "-计税月份-长度小于6:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return R.failed();
} else if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + i + "行:" + newEmpStr + "-计税月份-大于当前年月或错误,请调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return R.failed();
} else {
newEmp.setTaxMonth(entity.getTaxMonth());
}
}
//工资发放方式(0现金/1银行)/2线下 && salaryGiveTime == true :立即发;false:暂停发:则不考虑开户行等
//银行+立即发,则考虑和开户行卡号
String areaStr;
......@@ -1141,16 +1040,6 @@ public class SalaryAccountUtil implements Serializable {
newEmp.setCreateBy(String.valueOf(user.getId()));
newEmp.setCreateName(user.getNickname());
newEmp.setInvoiceTitle(invoiceTitle);
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
int nowYear = Integer.parseInt(nowMonth.substring(0, 4));
String minTaxMonth = tSalaryAccountService.getMinTaxMonthByNowYear(newEmp.getEmpIdcard(), nowYear);
if (Common.isNotNull(minTaxMonth)
&& !minTaxMonth.equals(entity.getTaxMonth())) {
error = "第" + i + "行:该员工已有发薪记录,计税月份请填写:【" + minTaxMonth + "】" + ",你填写了计税月:【" + entity.getTaxMonth() + "】";
errorList.add(new ErrorMessage(i, error));
return R.failed();
}
}
String saveNewEmpReturn = tSalaryEmployeeService.saveNewSalaryEmployee(notLabour, newEmp);
if (Common.isNotNull(saveNewEmpReturn)) {
error = "第" + i + "行:该员工新建失败:【" + saveNewEmpReturn + "】";
......@@ -1162,14 +1051,12 @@ public class SalaryAccountUtil implements Serializable {
private boolean setNewEmpBase(TSalaryEmployee newEmp, int i, List<ErrorMessage> errorList, boolean notLabour
, TSalaryAccountVo entity, String salaryType, TSettleDomainSelectVo dept, YifuUser user, String salaryStyle
, boolean salaryGiveTimeFlag, String invoiceTitle, List<TSalaryAccountItemVo> saiList, Map<String, String> bankMap
, Map<String, String> taxMonthMap, TSalaryAccountService tSalaryAccountService) {
, boolean salaryGiveTimeFlag, String invoiceTitle, List<TSalaryAccountItemVo> saiList, Map<String, String> bankMap) {
String newEmpStr = "新员工";
if (!notLabour) {
newEmpStr = "劳务费";
}
String error;
String nowMonth = DateUtil.addMonth(CommonConstants.ZERO_INT);
//增加工资人员档案:(临时使用)
if (newEmp != null) {
newEmp.setLineNums(i);
......@@ -1198,29 +1085,14 @@ public class SalaryAccountUtil implements Serializable {
newEmp = new TSalaryEmployee();
}
if (entity != null) {
if (!"3".equals(salaryType) && !"4".equals(salaryType)) {
if (Common.isEmpty(entity.getTaxMonth())) {
error = "第" + i + "行:" + newEmpStr + "-计税月份-不可为空!";
errorList.add(new ErrorMessage(i, error));
return false;
} else if (entity.getTaxMonth().length() < CommonConstants.dingleDigitIntArray[6]) {
error = "第" + i + "行:" + newEmpStr + "-计税月份-长度小于6:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return false;
} else if (DateUtil.compareYearMonth(entity.getTaxMonth(), nowMonth)) {
error = "第" + i + "行:" + newEmpStr + "-计税月份-大于当前年月或错误,请调整:" + entity.getTaxMonth();
errorList.add(new ErrorMessage(i, error));
return false;
} else {
if (!"3".equals(salaryType) && !"4".equals(salaryType)
&& Common.isNotNull(entity.getTaxMonth()) && entity.getTaxMonth().length() == CommonConstants.dingleDigitIntArray[6]) {
TSalaryAccountItemVo sai = new TSalaryAccountItemVo();
sai.setCnName(SalaryConstants.COST_REDUCTION);
sai.setJavaFiedName(SalaryConstants.COST_REDUCTION_JAVA);
sai.setSalaryMoney(DateUtil.getTaxMonthMoney(entity.getTaxMonth()));
sai.setIsTax(CommonConstants.ZERO_INT);
saiList.add(sai);
newEmp.setTaxMonth(entity.getTaxMonth());
}
}
//工资发放方式(0现金/1银行)/2线下 && salaryGiveTime == true :立即发;false:暂停发:则不考虑开户行等
//银行+立即发,则考虑和开户行卡号
......@@ -1308,9 +1180,9 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
}
entity.setBankProvince(String.valueOf(newEmp.getBankProvince()));
entity.setBankCity(String.valueOf(newEmp.getBankCity()));
}
newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时
newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName());
......@@ -1483,14 +1355,17 @@ public class SalaryAccountUtil implements Serializable {
Field[] fields2 = clazz2.getDeclaredFields();
SalaryAccountUtil cr = new SalaryAccountUtil();
// 遍历class1Bean,获取逐个属性值,然后遍历class2Bean查找是否有相同的属性,如有相同则赋值
Object value;
Object[] obj;
for (Field f1 : fields1) {
if (f1.getName().equals("id"))
if (f1.getName().equals("id")) {
continue;
Object value = cr.invokeGetMethod(from, f1.getName(), null);
}
value = cr.invokeGetMethod(from, f1.getName());
for (Field f2 : fields2) {
if (f1.getName().equals(f2.getName()) && !f2.getName().equals("serialVersionUID")
&& !f2.getName().equals("saiList")) {
Object[] obj = new Object[1];
obj = new Object[1];
obj[0] = value;
cr.invokeSetMethod(to, f2.getName(), obj);
}
......@@ -1507,17 +1382,15 @@ public class SalaryAccountUtil implements Serializable {
*
* @param clazz 类
* @param fieldName 类的属性名称
* @param args 参数,默认为null
* @return
*/
public Object invokeGetMethod(Object clazz, String fieldName, Object[] args) {
public Object invokeGetMethod(Object clazz, String fieldName) {
String methodName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
Method method = null;
try {
if (methodName.equals("SerialVersionUID")) {
return "";
}
method = Class.forName(clazz.getClass().getName()).getDeclaredMethod("get" + methodName);
Method method = Class.forName(clazz.getClass().getName()).getDeclaredMethod("get" + methodName);
return method.invoke(clazz);
} catch (Exception e) {
log.error("执行某个Field的getField方法异常!!", e);
......@@ -1536,13 +1409,12 @@ public class SalaryAccountUtil implements Serializable {
@SuppressWarnings({"unchecked", "rawtypes"})
private Object invokeSetMethod(Object clazz, String fieldName, Object[] args) {
String methodName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
Method method = null;
try {
Class[] parameterTypes = new Class[1];
Class c = Class.forName(clazz.getClass().getName());
Field field = c.getDeclaredField(fieldName);
parameterTypes[0] = field.getType();
method = c.getDeclaredMethod("set" + methodName, parameterTypes);
Method method = c.getDeclaredMethod("set" + methodName, parameterTypes);
return method.invoke(clazz, args);
} catch (Exception e) {
log.error("执行某个Field的setField方法异常!", e);
......
......@@ -64,7 +64,6 @@
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="fileStatus" column="FILE_STATUS"/>
</resultMap>
<resultMap id="salaryEmpRosterMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo">
......@@ -97,7 +96,6 @@
a.BANK_PROVINCE,
a.BANK_CITY,
a.EMP_PHONE,
a.TAX_MONTH,
a.FILE_STATUS
</sql>
<sql id="tSalaryEmployee_where">
......@@ -165,9 +163,6 @@
<if test="tSalaryEmployee.empPhone != null and tSalaryEmployee.empPhone.trim() != ''">
AND a.EMP_PHONE = #{tSalaryEmployee.empPhone}
</if>
<if test="tSalaryEmployee.taxMonth != null and tSalaryEmployee.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{tSalaryEmployee.taxMonth}
</if>
<if test="tSalaryEmployee.fileStatus != null">
AND a.FILE_STATUS = #{tSalaryEmployee.fileStatus}
</if>
......@@ -211,7 +206,6 @@
a1.area_name as "BANK_PROVINCE",
a2.area_name as "BANK_CITY",
a.EMP_PHONE,
a.TAX_MONTH,
case when a.FILE_STATUS = 0 then "在职"
when a.FILE_STATUS = 1 then "离职"
else null end as "FILE_STATUS"
......
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