From 31a8b4bff9cedf695c93de40b85c22bd2e8472a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 23 Jun 2022 17:15:39 +0800 Subject: [PATCH] fix --- .../bo/SalarySobItemAggregateBO.java | 8 +- .../mapper/salarysob/SalarySobMapper.xml | 117 ++++++++++++++++++ .../engine/salary/util/ResponseResult.java | 2 +- 3 files changed, 125 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java index a68d7499a..9e46b8a76 100644 --- a/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java +++ b/src/com/engine/salary/entity/salarysob/bo/SalarySobItemAggregateBO.java @@ -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 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()); } diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobMapper.xml index 117e9e435..376e38fa8 100644 --- a/src/com/engine/salary/mapper/salarysob/SalarySobMapper.xml +++ b/src/com/engine/salary/mapper/salarysob/SalarySobMapper.xml @@ -245,6 +245,123 @@ + + + + + select hrsa_salary_sob_id.currval from dual + + + INSERT INTO hrsa_salary_sob + + + + id, + + + name, + + + income_category, + + + salary_cycle_type, + + + salary_cycle_from_day, + + + tax_cycle_type, + + + attend_cycle_type, + + + attend_cycle_from_day, + + + social_security_cycle_type, + + + disable, + + + description, + + + creator, + + + create_time, + + + update_time, + + + delete_type, + + + tenant_key, + + + tax_agent_id, + + + + + #{id}, + + + #{name}, + + + #{incomeCategory}, + + + #{salaryCycleType}, + + + #{salaryCycleFromDay}, + + + #{taxCycleType}, + + + #{attendCycleType}, + + + #{attendCycleFromDay}, + + + #{socialSecurityCycleType}, + + + #{disable}, + + + #{description}, + + + #{creator}, + + + #{createTime}, + + + #{updateTime}, + + + #{deleteType}, + + + #{tenantKey}, + + + #{taxAgentId}, + + + + UPDATE hrsa_salary_sob diff --git a/src/com/engine/salary/util/ResponseResult.java b/src/com/engine/salary/util/ResponseResult.java index 28c61e412..05329d835 100644 --- a/src/com/engine/salary/util/ResponseResult.java +++ b/src/com/engine/salary/util/ResponseResult.java @@ -30,7 +30,7 @@ public class ResponseResult { 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;