Merge branch 'release/2.14.2.2405.02' into release/个税版本

# Conflicts:
#	src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml
This commit is contained in:
钱涛 2024-05-30 12:03:34 +08:00
commit 98d4bb79a3
4 changed files with 3 additions and 144 deletions

View File

@ -34,16 +34,6 @@ public class SalarySobItemBiz {
}
}
public List<SalarySobItemPO> listBySalarySobIdWithHideItem(SalarySobItemPO build) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemMapper mapper = sqlSession.getMapper(SalarySobItemMapper.class);
return mapper.listBySalarySobIdWithHideItem(build);
} finally {
sqlSession.close();
}
}
public void batchInsert(Collection<SalarySobItemPO> salarySobItemPOS) {
if (CollectionUtils.isEmpty(salarySobItemPOS)) {

View File

@ -24,7 +24,6 @@ public interface SalarySobItemMapper {
*/
List<SalarySobItemPO> listSome(SalarySobItemPO salarySobItemPO);
List<SalarySobItemPO> listBySalarySobIdWithHideItem(SalarySobItemPO salarySobItemPO);
/**
@ -35,14 +34,7 @@ public interface SalarySobItemMapper {
*/
SalarySobItemPO getById(Long id);
/**
* 新增忽略null字段
*
* @param salarySobItemPO 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(SalarySobItemPO salarySobItemPO);
/**
* 修改修改所有字段
*
@ -50,7 +42,7 @@ public interface SalarySobItemMapper {
* @return 返回影响行数
*/
int update(SalarySobItemPO salarySobItemPO);
/**
* 修改忽略null字段
*

View File

@ -151,129 +151,6 @@
</select>
<select id="listBySalarySobIdWithHideItem"
resultType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
SELECT
t.create_time
, t.creator
, t.delete_type
, t.description
, t.formula_id
, t.id
, t.salary_item_id
, t.salary_sob_id
, t.salary_sob_item_group_id
, t.sorted_index
, t.tenant_key
, t.update_time
, t.rounding_mode
, t.pattern
, t.value_type
,t.can_delete
,t.salary_item_code
,h.item_hide
FROM hrsa_salary_sob_item t
LEFT JOIN hrsa_salary_item_hide h ON t.salary_item_id=h.salary_item_id and t.salary_sob_id = h.salary_sob_id
WHERE t.delete_type = 0
and t.salary_sob_id=#{salarySobId}
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
INSERT INTO hrsa_salary_sob_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="description != null">
description,
</if>
<if test="formulaId != null">
formula_id,
</if>
<if test="id != null">
id,
</if>
<if test="salaryItemId != null">
salary_item_id,
</if>
<if test="salarySobId != null">
salary_sob_id,
</if>
<if test="salarySobItemGroupId != null">
salary_sob_item_group_id,
</if>
<if test="sortedIndex != null">
sorted_index,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="canDelete != null">
can_delete,
</if>
<if test="itemHide != null">
item_hide,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="createTime != null">
#{createTime},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="description != null">
#{description},
</if>
<if test="formulaId != null">
#{formulaId},
</if>
<if test="id != null">
#{id},
</if>
<if test="salaryItemId != null">
#{salaryItemId},
</if>
<if test="salarySobId != null">
#{salarySobId},
</if>
<if test="salarySobItemGroupId != null">
#{salarySobItemGroupId},
</if>
<if test="sortedIndex != null">
#{sortedIndex},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="canDelete != null">
#{canDelete},
</if>
<if test="itemHide != null">
#{itemHide},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salarysob.po.SalarySobItemPO">
UPDATE hrsa_salary_sob_item

View File

@ -689,7 +689,7 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
// 查询薪资账套的员工信息字段
List<SalarySobEmpFieldPO> salarySobEmpFieldPOS = salarySobEmpFieldService.listSome(SalarySobEmpFieldPO.builder().salarySobId(duplicateParam.getId()).build());
// 查询薪资账套的薪资项目副本
List<SalarySobItemPO> salarySobItemPOS = salarySobItemService.listBySalarySobIdWithHideItem(SalarySobItemPO.builder().salarySobId(duplicateParam.getId()).build());
List<SalarySobItemPO> salarySobItemPOS = salarySobItemService.listSome(SalarySobItemPO.builder().salarySobId(duplicateParam.getId()).build());
// 薪资项目副本去重
salarySobItemPOS = salarySobItemPOS.stream().filter(SalaryEntityUtil.distinctByKey(PO -> PO.getSalarySobId() + "-" + PO.getSalaryItemId())).collect(Collectors.toList());
// 查询薪资账套的薪资项目分类