This commit is contained in:
钱涛 2022-06-23 17:15:39 +08:00
parent b357bd18a6
commit 31a8b4bff9
3 changed files with 125 additions and 2 deletions

View File

@ -20,6 +20,7 @@ import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.math.NumberUtils;
import weaver.general.BaseBean;
import java.lang.reflect.Field;
import java.util.*;
@ -66,6 +67,11 @@ public class SalarySobItemAggregateBO {
*/
private List<SalaryItemPO> salaryItems;
private final BaseBean baseBean = new BaseBean();
//强制开启账套的公式配置
private final Boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing"));
/**
* 转换成聚合dto
*
@ -103,7 +109,7 @@ public class SalarySobItemAggregateBO {
.formulaContent(formulaMap.getOrDefault(salarySobItemPO.getFormulaId(), ""))
.taxDeclarationColumn(SalaryItemBO.buildTaxDeclarationColumn(salaryItemPO.getCode()))
.sortedIndex(salarySobItemPO.getSortedIndex())
.canEdit(Objects.equals(salaryItemPO.getCanEdit(), 1))
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
.canDelete(salarySobItemPO.getCanDelete() == null || Objects.equals(salarySobItemPO.getCanDelete(), 1))
.build());
}

View File

@ -245,6 +245,123 @@
</trim>
</insert>
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobPO" databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select hrsa_salary_sob_id.currval from dual
</selectKey>
INSERT INTO hrsa_salary_sob
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="incomeCategory != null">
income_category,
</if>
<if test="salaryCycleType != null">
salary_cycle_type,
</if>
<if test="salaryCycleFromDay != null">
salary_cycle_from_day,
</if>
<if test="taxCycleType != null">
tax_cycle_type,
</if>
<if test="attendCycleType != null">
attend_cycle_type,
</if>
<if test="attendCycleFromDay != null">
attend_cycle_from_day,
</if>
<if test="socialSecurityCycleType != null">
social_security_cycle_type,
</if>
<if test="disable != null">
disable,
</if>
<if test="description != null">
description,
</if>
<if test="creator != null">
creator,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="taxAgentId != null">
tax_agent_id,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="name != null">
#{name},
</if>
<if test="incomeCategory != null">
#{incomeCategory},
</if>
<if test="salaryCycleType != null">
#{salaryCycleType},
</if>
<if test="salaryCycleFromDay != null">
#{salaryCycleFromDay},
</if>
<if test="taxCycleType != null">
#{taxCycleType},
</if>
<if test="attendCycleType != null">
#{attendCycleType},
</if>
<if test="attendCycleFromDay != null">
#{attendCycleFromDay},
</if>
<if test="socialSecurityCycleType != null">
#{socialSecurityCycleType},
</if>
<if test="disable != null">
#{disable},
</if>
<if test="description != null">
#{description},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
<if test="taxAgentId != null">
#{taxAgentId},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salarysob.po.SalarySobPO">
UPDATE hrsa_salary_sob

View File

@ -30,7 +30,7 @@ public class ResponseResult<T, R> {
private final BaseBean baseBean = new BaseBean();
private final Boolean isLog = "ture".equals(baseBean.getPropValue("hrmSalary", "log"));
private final Boolean isLog = "true".equals(baseBean.getPropValue("hrmSalary", "log"));
public ResponseResult(User user) {
this.user = user;