薪酬系统, 适配金仓-个税申报单逻辑优化、薪资部分发放逻辑优化、删除initserviceimpl文件

This commit is contained in:
sy 2023-04-04 16:28:15 +08:00
parent 521db08cde
commit add7051759
3 changed files with 2 additions and 77 deletions

View File

@ -715,6 +715,7 @@ public class TaxDeclarationBO {
private static String findStringValue(String fieldCode, Map<Long, List<SalaryAcctResultPO>> resultMap, Map<String, Long> salaryItemMap) {
return resultMap.getOrDefault(salaryItemMap.getOrDefault(fieldCode, 0L), Collections.emptyList()).stream()
.filter(f -> StringUtils.isNotBlank(f.getResultValue()))
.map(SalaryAcctResultPO::getResultValue)
.findFirst().orElse("");
}

View File

@ -310,7 +310,7 @@
insert into hrsa_salary_send_range_obj
(salary_send_id, salary_send_range_id, range_type, target_type, target_id, creator,
create_time, update_time, delete_type, tenant_key)
<foreach collection="list" item="item" separator=",">
<foreach collection="list" item="item" separator="union all">
select
#{item.salarySendId,jdbcType=BIGINT}, #{item.salarySendRangeId,jdbcType=BIGINT},
#{item.rangeType,jdbcType=INTEGER}, #{item.targetType,jdbcType=INTEGER}, #{item.targetId,jdbcType=BIGINT},

View File

@ -1,76 +0,0 @@
package com.engine.salary.sys.service.impl;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.weaverboot.frame.ioc.anno.classAnno.WeaSysInitComponent;
import com.weaverboot.frame.ioc.anno.methodAnno.WeaSysInit;
import dm.jdbc.util.IdGenerator;
import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean;
import java.util.Date;
@WeaSysInitComponent("initSalary")
public class InitServiceImpl {
private SalarySysConfMapper getSalarySysConfMapper() {
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
}
BaseBean baseBean = new BaseBean();
@WeaSysInit(order = 1, description = "升级薪酬非标版本")
public void init() {
String version = baseBean.getPropValue("hrmSalary", "version");
Date date = new Date();
//升级版本号
//当前版本
SalarySysConfPO currentVersion = getSalarySysConfMapper().getOneByCode("currentVersion");
//前一个版本
int orderWeight = getSalarySysConfMapper().countByCode("previousVersion");
if (currentVersion == null) {
//初始化版本
SalarySysConfPO current = SalarySysConfPO.builder()
.id(IdGenerator.generate())
.confKey("currentVersion")
.confValue(version)
.title("当前版本")
.module("basic")
.orderWeight(0)
.createTime(date)
.updateTime(date)
.deleteType(0).build();
getSalarySysConfMapper().insertIgnoreNull(current);
} else {
//版本不一样
if (!StringUtils.equals(version, currentVersion.getConfValue())) {
//生成历史版本记录
SalarySysConfPO previous = SalarySysConfPO.builder()
.id(IdGenerator.generate())
.confKey("previousVersion")
.confValue(currentVersion.getConfValue())
.title("上一个版本")
.module("basic")
.orderWeight(orderWeight)
.createTime(date)
.updateTime(date)
.deleteType(0)
.build();
getSalarySysConfMapper().insertIgnoreNull(previous);
//更新当前版本
currentVersion.setConfValue(version);
currentVersion.setUpdateTime(date);
getSalarySysConfMapper().updateIgnoreNull(currentVersion);
}
}
}
@WeaSysInit(order = 2, description = "处理薪资档案历史数据")
public void handleSalaryArchiveHistoryData() {
// new SalaryArchiveServiceImpl().handleHistory(1L);
}
}