From 916baf623c719690d05fbd8efeea16fd299dc69c Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 16 Apr 2024 09:57:12 +0800 Subject: [PATCH 01/17] =?UTF-8?q?fix=E5=AF=BC=E5=87=BA=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SalaryAcctExcelServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java index 62e22e4b3..c9956d1ab 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctExcelServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.salary.service.impl; +import cn.hutool.core.util.NumberUtil; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.cloudstore.dev.api.util.Util_DataCache; import com.engine.common.util.ServiceUtil; @@ -411,7 +412,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc List row = Lists.newArrayListWithExpectedSize(headerColumnGroup.size()); for (WeaTableColumnGroup weaTableColumn : headerColumnGroup) { String fieldType = (String) map.getOrDefault(weaTableColumn.getColumn().toString() + DATA_TYPE_SUFFIX, StringUtils.EMPTY); - if (StringUtils.equals("number", fieldType)) { + if (StringUtils.equals("number", fieldType) && map.get(weaTableColumn.getColumn()) != null && NumberUtil.isNumber(map.get(weaTableColumn.getColumn()).toString())) { row.add(new BigDecimal(StringUtils.isBlank(map.get(weaTableColumn.getColumn()).toString()) ? "0" : map.get(weaTableColumn.getColumn()).toString())); } else { row.add(map.getOrDefault(weaTableColumn.getColumn(), StringUtils.EMPTY)); From 68d0003f620e9c4b5a6c4ffaadaa4266551282b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 16 Apr 2024 16:05:42 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E7=9A=84=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/CustomSalaryAcctResultWrapper.java | 60 +++++++++++++++++++ .../wrapper/SalaryAcctResultWrapper.java | 3 +- .../proxy/SalaryAcctResultWrapperProxy.java | 23 +++++++ 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 resource/wiki/代码样例/拦截工资单相关接口/com/customization/salary/CustomSalaryAcctResultWrapper.java create mode 100644 src/com/engine/salary/wrapper/proxy/SalaryAcctResultWrapperProxy.java diff --git a/resource/wiki/代码样例/拦截工资单相关接口/com/customization/salary/CustomSalaryAcctResultWrapper.java b/resource/wiki/代码样例/拦截工资单相关接口/com/customization/salary/CustomSalaryAcctResultWrapper.java new file mode 100644 index 000000000..133e9b51d --- /dev/null +++ b/resource/wiki/代码样例/拦截工资单相关接口/com/customization/salary/CustomSalaryAcctResultWrapper.java @@ -0,0 +1,60 @@ +package com.customization.salary; + +import com.engine.core.cfg.annotation.ServiceDynamicProxy; +import com.engine.core.impl.aop.AbstractServiceProxy; +import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO; +import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO; +import com.engine.salary.entity.salaryacct.param.*; +import com.engine.salary.wrapper.SalaryAcctResultWrapper; +import com.engine.salary.wrapper.proxy.SalaryAcctResultWrapperProxy; + +import java.util.Map; + +/** + * 薪资核算结果 + *

Copyright: Copyright (c) 2022

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ +@ServiceDynamicProxy(target = SalaryAcctResultWrapper.class, desc = "核算结果") +public class CustomSalaryAcctResultWrapper extends AbstractServiceProxy implements SalaryAcctResultWrapperProxy { + + @Override + public Map listPage(SalaryAcctResultQueryParam queryParam) { + return (Map)executeMethod(queryParam); + } + + @Override + public SalaryAcctResultDetailDTO getForm(Long salaryAcctEmployeeId) { + return (SalaryAcctResultDetailDTO)executeMethod(salaryAcctEmployeeId); + } + + @Override + public Map getColumnBySalaryAcctRecordId(Long salaryAcctRecordId) { + return (Map)executeMethod(salaryAcctRecordId); + } + + @Override + public void save(SalaryAcctResultSaveParam saveParam) { + //todo do some thing + executeMethod(saveParam); + //todo do some thing + } + + @Override + public void updateLockStatusByParam(SalaryAcctResultUpdateLockStatusParam updateParam) { + executeMethod(updateParam); + } + + @Override + public void calculate(SalaryAcctCalculateParam calculateParam) { + executeMethod(calculateParam); + } + + @Override + public void batchUpdate(SalaryAcctResultBatchUpdateParam param) { + executeMethod(param); + } +} diff --git a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java index 5c1347343..cae703b1c 100644 --- a/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java +++ b/src/com/engine/salary/wrapper/SalaryAcctResultWrapper.java @@ -20,6 +20,7 @@ import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.page.PageInfo; import com.engine.salary.util.valid.ValidUtil; +import com.engine.salary.wrapper.proxy.SalaryAcctResultWrapperProxy; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.lang3.StringUtils; @@ -37,7 +38,7 @@ import java.util.*; * @version 1.0 **/ @Slf4j -public class SalaryAcctResultWrapper extends Service { +public class SalaryAcctResultWrapper extends Service implements SalaryAcctResultWrapperProxy { private SalaryAcctResultService getSalaryAcctResultService(User user) { return ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user); diff --git a/src/com/engine/salary/wrapper/proxy/SalaryAcctResultWrapperProxy.java b/src/com/engine/salary/wrapper/proxy/SalaryAcctResultWrapperProxy.java new file mode 100644 index 000000000..7a984d1c4 --- /dev/null +++ b/src/com/engine/salary/wrapper/proxy/SalaryAcctResultWrapperProxy.java @@ -0,0 +1,23 @@ +package com.engine.salary.wrapper.proxy; + +import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultDetailDTO; +import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultListColumnDTO; +import com.engine.salary.entity.salaryacct.param.*; + +import java.util.Map; + +public interface SalaryAcctResultWrapperProxy { + Map listPage(SalaryAcctResultQueryParam queryParam); + + SalaryAcctResultDetailDTO getForm(Long salaryAcctEmployeeId); + + Map getColumnBySalaryAcctRecordId(Long salaryAcctRecordId); + + void save(SalaryAcctResultSaveParam saveParam); + + void updateLockStatusByParam(SalaryAcctResultUpdateLockStatusParam updateParam); + + void calculate(SalaryAcctCalculateParam calculateParam); + + void batchUpdate(SalaryAcctResultBatchUpdateParam param); +} From 794ed55c7d8671c3ab2773bd338ec17ee777a196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 22 Apr 2024 15:03:28 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/prop/hrmSalary.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index 4ca5b1e88..826e40bf1 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=2.12.1.2403.02 +version=2.13.1.2404.02 openFormulaForcedEditing=false \ No newline at end of file From 1c2f0f516a0144b4d5c80ff93e1b39e9bcdd874f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 23 Apr 2024 11:39:41 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8Dsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sqlupgrade/DM/sql202309050103.sql | 3 --- resource/sqlupgrade/GS/sql202309050103.sql | 3 --- resource/sqlupgrade/JC/sql202309050103.sql | 3 --- resource/sqlupgrade/Mysql/sql202309050103.sql | 1 - resource/sqlupgrade/Oracle/sql202309050103.sql | 2 -- resource/sqlupgrade/PG/sql202309050103.sql | 2 -- resource/sqlupgrade/SQLServer/sql202309050103.sql | 2 -- resource/sqlupgrade/ST/sql202309050103.sql | 3 --- 8 files changed, 19 deletions(-) delete mode 100644 resource/sqlupgrade/DM/sql202309050103.sql delete mode 100644 resource/sqlupgrade/GS/sql202309050103.sql delete mode 100644 resource/sqlupgrade/JC/sql202309050103.sql delete mode 100644 resource/sqlupgrade/Mysql/sql202309050103.sql delete mode 100644 resource/sqlupgrade/Oracle/sql202309050103.sql delete mode 100644 resource/sqlupgrade/PG/sql202309050103.sql delete mode 100644 resource/sqlupgrade/SQLServer/sql202309050103.sql delete mode 100644 resource/sqlupgrade/ST/sql202309050103.sql diff --git a/resource/sqlupgrade/DM/sql202309050103.sql b/resource/sqlupgrade/DM/sql202309050103.sql deleted file mode 100644 index e9e5dfeee..000000000 --- a/resource/sqlupgrade/DM/sql202309050103.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614119, 5); -/ - diff --git a/resource/sqlupgrade/GS/sql202309050103.sql b/resource/sqlupgrade/GS/sql202309050103.sql deleted file mode 100644 index e9e5dfeee..000000000 --- a/resource/sqlupgrade/GS/sql202309050103.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614119, 5); -/ - diff --git a/resource/sqlupgrade/JC/sql202309050103.sql b/resource/sqlupgrade/JC/sql202309050103.sql deleted file mode 100644 index e9e5dfeee..000000000 --- a/resource/sqlupgrade/JC/sql202309050103.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614119, 5); -/ - diff --git a/resource/sqlupgrade/Mysql/sql202309050103.sql b/resource/sqlupgrade/Mysql/sql202309050103.sql deleted file mode 100644 index 67dd54d95..000000000 --- a/resource/sqlupgrade/Mysql/sql202309050103.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, '2022-03-14 11:32:30', '2022-03-18 16:59:24', 0, 'all_teams', 703433961629614119, 5); \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202309050103.sql b/resource/sqlupgrade/Oracle/sql202309050103.sql deleted file mode 100644 index c010cb4ef..000000000 --- a/resource/sqlupgrade/Oracle/sql202309050103.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614119, 5) -/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202309050103.sql b/resource/sqlupgrade/PG/sql202309050103.sql deleted file mode 100644 index 442635f18..000000000 --- a/resource/sqlupgrade/PG/sql202309050103.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, '2022-03-14 11:32:30', '2022-03-18 16:59:24', 0, 'all_teams', 703433961629614119, 5); -/ \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202309050103.sql b/resource/sqlupgrade/SQLServer/sql202309050103.sql deleted file mode 100644 index 362f2654c..000000000 --- a/resource/sqlupgrade/SQLServer/sql202309050103.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, '2022-03-14 11:32:30', '2022-03-18 16:59:24', 0, 'all_teams', 703433961629614119, 5) -GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202309050103.sql b/resource/sqlupgrade/ST/sql202309050103.sql deleted file mode 100644 index e9e5dfeee..000000000 --- a/resource/sqlupgrade/ST/sql202309050103.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO hrsa_salary_sob_default_item(id, income_category, sys_salary_item_id, can_edit, can_delete, creator, create_time, update_time, delete_type, tenant_key, sob_default_item_group_id, sorted_index) VALUES (706066600446312885, 1, 674916065864646661, 1, 0, 0, to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), to_date('2022-05-05 16:30:11','yyyy-MM-dd HH24:mi:ss'), 0, 'all_teams', 703433961629614119, 5); -/ - From 0bf4b8ed095289f98195f78b4c2e8c037dba69f9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 23 Apr 2024 15:45:24 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BE=80=E6=9C=9F?= =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E5=AF=BC=E5=85=A5=E6=97=B6=E6=9C=AA=E5=8A=A0?= =?UTF-8?q?=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/AddUpSituationServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java index 9c7994261..32e8755a8 100644 --- a/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java @@ -7,9 +7,9 @@ import com.api.browser.util.ConditionType; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; +import com.engine.hrmelog.entity.dto.LoggerContext; import com.engine.salary.biz.AddUpSituationBiz; import com.engine.salary.config.SalaryElogConfig; -import com.engine.hrmelog.entity.dto.LoggerContext; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.AddUpSituation; import com.engine.salary.entity.datacollection.DataCollectionEmployee; @@ -1203,6 +1203,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation @Override public void batchSave(List list) { if (CollectionUtils.isNotEmpty(list)) { + encryptUtil.encryptList(list, AddUpSituation.class); List> partition = Lists.partition(list, 50); partition.forEach(getAddUpSituationMapper()::insertData); } From 591555fa8a4c8a123f2fb52bd71a1e65d428462b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 23 Apr 2024 17:47:02 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E6=9B=B4=E6=96=B0sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sqlupgrade/SQLServer/sql202403193303.sql | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/resource/sqlupgrade/SQLServer/sql202403193303.sql b/resource/sqlupgrade/SQLServer/sql202403193303.sql index a1f345591..771e3b45f 100644 --- a/resource/sqlupgrade/SQLServer/sql202403193303.sql +++ b/resource/sqlupgrade/SQLServer/sql202403193303.sql @@ -1,9 +1,16 @@ -ALTER TABLE hrsa_employee_declare -ADD nationality varchar(255) NULL , -ADD birthplace varchar(255) NULL , -ADD tax_reasons varchar(255) NULL , -entry_date datetime NULL , -departure_date datetime NULL +ALTER TABLE hrsa_employee_declare ADD nationality varchar(255) NULL +GO + +ALTER TABLE hrsa_employee_declare ADD birthplace varchar(255) NULL +GO + +ALTER TABLE hrsa_employee_declare ADD tax_reasons varchar(255) NULL +GO + +ALTER TABLE hrsa_employee_declare ADD entry_date datetime NULL +GO + +ALTER TABLE hrsa_employee_declare ADD departure_date datetime NULL GO update hrsa_employee_declare set nationality = 'й' where nationality is null From d802d890d6cd622ea3a33a5c88c80e6ba3ba41b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 25 Apr 2024 11:45:37 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=A7=A3=E5=AF=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/wiki/常用查询.md | 10 ++++++++++ .../engine/salary/encrypt/AESEncryptUtil.java | 20 +++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 resource/wiki/常用查询.md diff --git a/resource/wiki/常用查询.md b/resource/wiki/常用查询.md new file mode 100644 index 000000000..0bb9db9a6 --- /dev/null +++ b/resource/wiki/常用查询.md @@ -0,0 +1,10 @@ +# 工资数据报表 + +```` +select e.lastname,sob.name as 账套名, record.salary_month as 薪资月, item.name as 薪资项 ,result.result_value as 值 +from hrsa_salary_acct_record record +left join hrsa_salary_sob sob on record.salary_sob_id = sob.id and sob.delete_type = 0 and record.delete_type = 0 +left join hrsa_salary_acct_result result on record.id = result.salary_acct_record_id and result.delete_type = 0 and record.delete_type = 0 +left join hrsa_salary_item item on result.salary_item_id = item.id and item.delete_type = 0 +left join hrsa_tax_agent agent on agent.id=sob.tax_agent_id and agent.delete_type=0 +left join hrmresource e on e.id= result.employee_id diff --git a/src/com/engine/salary/encrypt/AESEncryptUtil.java b/src/com/engine/salary/encrypt/AESEncryptUtil.java index e54ebea02..4ec7f60de 100644 --- a/src/com/engine/salary/encrypt/AESEncryptUtil.java +++ b/src/com/engine/salary/encrypt/AESEncryptUtil.java @@ -46,6 +46,14 @@ public class AESEncryptUtil { if (encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) { encryptStr = encryptStr.substring(4, encryptStr.length()); return AES.decrypt(encryptStr, aesEncryptScrect); + } else if (isNumeric(encryptStr) || + checkHaveChinese(encryptStr) || + encryptStr.startsWith("{") || + encryptStr.contains("-") || + encryptStr.contains(".") || + "null".equals(encryptStr) || + StringUtils.isBlank(encryptStr)) { + return encryptStr; } else { return AES.decrypt(encryptStr, aesEncryptScrect); } @@ -59,7 +67,7 @@ public class AESEncryptUtil { * @param encryptStr 加密字符串 * @return 解密字符串 */ - public static String closeEncryptSetting(String encryptStr,SalarySysConfPO sysConfPo) { + public static String closeEncryptSetting(String encryptStr, SalarySysConfPO sysConfPo) { if (encryptStr == null) { return null; } else { @@ -67,9 +75,13 @@ public class AESEncryptUtil { if (encryptStr.startsWith(SalarySysConstant.PRE_SIGN_ENCRYPT)) { encryptStr = encryptStr.substring(4, encryptStr.length()); return AES.decrypt(encryptStr, aesEncryptScrect); - } else if (isNumeric(encryptStr) || checkHaveChinese(encryptStr) || encryptStr.startsWith("{") || encryptStr.contains("-") || encryptStr.contains(".")) { - return encryptStr; - } else if ("null".equals(encryptStr) || StringUtils.isBlank(encryptStr)) { + } else if (isNumeric(encryptStr) || + checkHaveChinese(encryptStr) || + encryptStr.startsWith("{") || + encryptStr.contains("-") || + encryptStr.contains(".") || + "null".equals(encryptStr) || + StringUtils.isBlank(encryptStr)) { return encryptStr; } else if (sysConfPo == null || sysConfPo.getConfValue().equals(OpenEnum.OFF.getValue())) { return AES.decrypt(encryptStr, aesEncryptScrect); From c9075058d5d4e2c2ac03161018b9cd01b21f5537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 25 Apr 2024 13:45:59 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E8=B7=B3=E8=BF=87=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryarchive/bo/SalaryArchiveExcelBO.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java index 02eb78dda..cfe3d8d43 100644 --- a/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java +++ b/src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java @@ -421,7 +421,6 @@ public class SalaryArchiveExcelBO extends Service { Map errorMessageMap = Maps.newHashMap(); errorMessageMap.put("message", rowindex + "个税扣缴义务人不存在"); excelComments.add(errorMessageMap); -// SalaryArchiveExcelBO.createExcelComment(excelComments, taxAgentRangeMsg, errorCount + 1, errorCount + 1, 0, 0); isError = true; return isError; } @@ -440,14 +439,15 @@ public class SalaryArchiveExcelBO extends Service { taxAgentRangeSaveParam.setTargetParams(Collections.singletonList(taxAgentSubAdminRangeTargetParam)); taxAgentRangeSaveParam.setSync(true); importHandleParam.setTaxAgentRanges(Collections.singletonList(taxAgentRangeSaveParam)); - } else { - Map errorMessageMap = Maps.newHashMap(); - errorMessageMap.put("message", rowindex + taxAgentRangeMsg); - excelComments.add(errorMessageMap); -// SalaryArchiveExcelBO.createExcelComment(excelComments, taxAgentRangeMsg, errorCount + 1, errorCount + 1, 0, 0); - isError = true; - return isError; } +// else { +// Map errorMessageMap = Maps.newHashMap(); +// errorMessageMap.put("message", rowindex + taxAgentRangeMsg); +// excelComments.add(errorMessageMap); +//// SalaryArchiveExcelBO.createExcelComment(excelComments, taxAgentRangeMsg, errorCount + 1, errorCount + 1, 0, 0); +// isError = true; +// return isError; +// } } else { employeeId = optionalTaxAgentEmp.get().getEmployeeId(); // 除了定薪中的初始化,其他导入存在相同的取第一条 From ea968c316e998f9f9d10f7a11354faf32d107f53 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 25 Apr 2024 14:04:13 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=80=8F=E8=A7=86=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wrapper/SalaryStatisticsReportWrapper.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java index 98b959ec8..9bf43c582 100644 --- a/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java +++ b/src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java @@ -478,7 +478,7 @@ public class SalaryStatisticsReportWrapper extends Service { List itemList = getSalaryItemService(user).listByIds(salaryItemIds); // 列表columns - List weaTableColumns = buildDataPerspectiveTableColumns(itemList); + List weaTableColumns = buildDataPerspectiveTableColumns(itemList, salaryItemIds); WeaTable table = new WeaTable(); String pageId = "a4f85an7-9576-4125-adn9-7d06e7sy69f2"; @@ -534,7 +534,7 @@ public class SalaryStatisticsReportWrapper extends Service { List itemList = getSalaryItemService(user).listByIds(salaryItemIds); // 表格表头 - List weaTableColumns = buildDataPerspectiveTableColumns(itemList); + List weaTableColumns = buildDataPerspectiveTableColumns(itemList, salaryItemIds); List columns = new ArrayList<>(); for (WeaTableColumn column : weaTableColumns) { columns.add(column.getText()); @@ -593,7 +593,8 @@ public class SalaryStatisticsReportWrapper extends Service { } } - private List buildDataPerspectiveTableColumns(List salaryItems) { + private List buildDataPerspectiveTableColumns(List salaryItems, List salaryItemIds) { + Map salaryItemMap = SalaryEntityUtil.convert2Map(salaryItems, SalaryItemPO::getId); // 表格表头 List columns = new ArrayList<>(); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(87614, "姓名"), "userName")); @@ -602,10 +603,13 @@ public class SalaryStatisticsReportWrapper extends Service { columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "taxAgent")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "账套"), "salarySob")); // columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86184, "次数"), "acctTimes").setDisplay(WeaBoolAttr.FALSE)); - salaryItems.forEach(item -> { - WeaTableColumn weaTableColumn = new WeaTableColumn("100px", item.getName(), item.getId() + SalaryConstant.DYNAMIC_SUFFIX); - weaTableColumn.setOtherpara(item.getDataType()); - columns.add(weaTableColumn); + salaryItemIds.forEach(itemId -> { + SalaryItemPO item = salaryItemMap.get(itemId); + if (item != null) { + WeaTableColumn weaTableColumn = new WeaTableColumn("100px", item.getName(), item.getId() + SalaryConstant.DYNAMIC_SUFFIX); + weaTableColumn.setOtherpara(item.getDataType()); + columns.add(weaTableColumn); + } }); return columns; } From 468286667416975747c550810c4498cb23af1207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 25 Apr 2024 14:25:40 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E6=A1=A3=E6=A1=88sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/wiki/删除档案.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resource/wiki/删除档案.txt b/resource/wiki/删除档案.txt index 1668c51f4..a5614d6c5 100644 --- a/resource/wiki/删除档案.txt +++ b/resource/wiki/删除档案.txt @@ -19,3 +19,16 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人 二、删除停薪员工档案 update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND') + + +三、删除指定人员档案 + + +--删除社保福利档案 +update hrsa_insurance_base_info set delete_type=3 WHERE employee_id = ? and payment_organization =? +update hrsa_social_archives set delete_type=3 WHERE employee_id = ? and payment_organization =? +update hrsa_fund_archives set delete_type=3 WHERE employee_id = ? and payment_organization =? +update hrsa_other_archives set delete_type=3 WHERE employee_id = ? and payment_organization =? + +-- 删除薪资档案 +update hrsa_salary_archive set delete_type=3 where employee_id = ? and tax_agent_id=? From e7c46bc5e8cfb7ce2ad90fc6bacfdab516bc6a77 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Fri, 26 Apr 2024 15:13:54 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=A6=BB=E8=81=8C=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/mapper/datacollection/EmployMapper.java | 2 +- src/com/engine/salary/mapper/datacollection/EmployMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.java b/src/com/engine/salary/mapper/datacollection/EmployMapper.java index 110b8fb55..c49fb2404 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.java +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.java @@ -125,7 +125,7 @@ public interface EmployMapper { DeptInfo getDeptInfoById(Long id); /** - * 获取大于离职日期的人员信息 + * 获取大于离职日期的 离职、退休、解聘人员信息 * @return */ List listByDismissDate(String dismissDate); diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 5582f0fcb..cb3553462 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -457,7 +457,7 @@ e.mobile as mobile, e.enddate as dismissdate from hrmresource e - where e.status not in (7) + where e.status in (4,5,6) AND e.enddate >= #{dismissDate} From 7d7d2dc3095fa21b40fab71f107f87dea48ea075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Sun, 28 Apr 2024 16:21:44 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/FormulaRunServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/FormulaRunServiceImpl.java b/src/com/engine/salary/service/impl/FormulaRunServiceImpl.java index 40edf009b..2b76af128 100644 --- a/src/com/engine/salary/service/impl/FormulaRunServiceImpl.java +++ b/src/com/engine/salary/service/impl/FormulaRunServiceImpl.java @@ -91,7 +91,7 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService String datasourceJson = map.getOrDefault("datasource", ""); if (StringUtils.isNotBlank(datasourceJson)) { Map datasourceIdMap = JsonUtil.parseMap(datasourceJson, String.class); - String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId",""); + String datasourceIdNode = datasourceIdMap.getOrDefault("datasourceId", ""); if (StringUtils.isNotBlank(datasourceIdNode)) { datasourceId = datasourceIdNode; } @@ -216,6 +216,10 @@ public class FormulaRunServiceImpl extends Service implements FormulaRunService } if (DataType.NUMBER.equals(v.getFieldType()) && NumberUtils.isCreatable(v.getContent())) { context.put(v.getFieldId(), new BigDecimal(v.getContent())); + } else if (v.getContent().startsWith("[") && v.getContent().endsWith("]")) { + String content = v.getContent().substring(1); + content = content.substring(0, content.length() - 1); + context.put(v.getFieldId(), content.split(",")); } else { context.put(v.getFieldId(), v.getContent()); } From 4b474f864fd49adaf8a1f9b347488ef5fa01006e Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 30 Apr 2024 14:43:37 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E4=B8=93=E9=A1=B9?= =?UTF-8?q?=E9=99=84=E5=8A=A0=E6=89=A3=E9=99=A4=E4=B8=80=E9=94=AE=E7=B4=AF?= =?UTF-8?q?=E8=AE=A1=EF=BC=8C=E8=83=BD=E6=A0=B9=E6=8D=AE=E4=B9=89=E5=8A=A1?= =?UTF-8?q?=E4=BA=BA=E8=BF=9B=E8=A1=8C=E7=B4=AF=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacollection/param/AddDeductionAutoAddParam.java | 7 +++++++ .../engine/salary/service/AddUpDeductionService.java | 2 +- .../salary/service/impl/AddUpDeductionServiceImpl.java | 10 +++++++++- .../salary/timer/AutoAddAllSpecialAddDeductionJob.java | 3 ++- .../engine/salary/web/AddUpDeductionController.java | 3 ++- .../engine/salary/wrapper/AddUpDeductionWrapper.java | 10 ++++------ 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/entity/datacollection/param/AddDeductionAutoAddParam.java b/src/com/engine/salary/entity/datacollection/param/AddDeductionAutoAddParam.java index ba14a6f02..5a3c11b47 100644 --- a/src/com/engine/salary/entity/datacollection/param/AddDeductionAutoAddParam.java +++ b/src/com/engine/salary/entity/datacollection/param/AddDeductionAutoAddParam.java @@ -5,6 +5,9 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import java.util.Date; +import java.util.List; + /** * @description 数据采集-专项附加扣除一键累计参数 **/ @@ -14,4 +17,8 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class AddDeductionAutoAddParam { String yearMonth = ""; + + Date yearMonthDate; + + List taxAgentIds; } diff --git a/src/com/engine/salary/service/AddUpDeductionService.java b/src/com/engine/salary/service/AddUpDeductionService.java index 29d3d58a9..e80a3e53d 100644 --- a/src/com/engine/salary/service/AddUpDeductionService.java +++ b/src/com/engine/salary/service/AddUpDeductionService.java @@ -155,5 +155,5 @@ public interface AddUpDeductionService { * @return void * @author lfc */ - String autoAddAll(Date yearMonth, Boolean isAdmin); + String autoAddAll(Date yearMonth, Boolean isAdmin, List taxAgentIds); } diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index f2bf7b9d8..51360a7f3 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -733,7 +733,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } @Override - public String autoAddAll(Date yearMonth, Boolean isAdmin) { + public String autoAddAll(Date yearMonth, Boolean isAdmin, List taxAgentIds) { String cacheKey = "addUpDeduction_autoAddAll_processing"; Object objVal = Util_DataCache.getObjVal(cacheKey); if (objVal != null) { @@ -750,6 +750,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } else { taxAgents = getTaxAgentService(user).listAllTaxAgentsAsAdmin((long) user.getUID()); } + + if (CollectionUtils.isNotEmpty(taxAgentIds)) { + taxAgents = taxAgents.stream().filter(taxAgent -> taxAgentIds.contains(taxAgent.getId())).collect(Collectors.toList()); + } LocalDateTime yearMonthTime = DateUtil.toLocalDateTime(yearMonth); //设置时间到下一年1月1号 Instant instant = yearMonthTime.plusYears(1L) @@ -978,6 +982,10 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction if (CollectionUtils.isEmpty(taxAgentIdsAsAdmin)) { return new PageInfo<>(AddUpDeductionDTO.class); } + // 过滤义务人筛选框 + if (CollectionUtils.isNotEmpty(queryParam.getTaxAgentIds())) { + taxAgentIdsAsAdmin = taxAgentIdsAsAdmin.stream().filter(id -> queryParam.getTaxAgentIds().contains(id)).collect(Collectors.toList()); + } queryParam.setTaxAgentIds(taxAgentIdsAsAdmin); } diff --git a/src/com/engine/salary/timer/AutoAddAllSpecialAddDeductionJob.java b/src/com/engine/salary/timer/AutoAddAllSpecialAddDeductionJob.java index 656db3943..694660651 100644 --- a/src/com/engine/salary/timer/AutoAddAllSpecialAddDeductionJob.java +++ b/src/com/engine/salary/timer/AutoAddAllSpecialAddDeductionJob.java @@ -11,6 +11,7 @@ import weaver.hrm.User; import weaver.interfaces.schedule.BaseCronJob; import java.time.LocalDate; +import java.util.Collections; import java.util.Date; /** @@ -31,6 +32,6 @@ public class AutoAddAllSpecialAddDeductionJob extends BaseCronJob { if(StringUtils.isNotBlank(salaryTaxMonth)){ localDate = localDate.plusMonths(Integer.valueOf(salaryTaxMonth.trim())); } - getAddUpDeductionService(null).autoAddAll(DateUtil.beginOfMonth(SalaryDateUtil.localDateToDate(localDate)), Boolean.TRUE); + getAddUpDeductionService(null).autoAddAll(DateUtil.beginOfMonth(SalaryDateUtil.localDateToDate(localDate)), Boolean.TRUE, Collections.emptyList()); } } diff --git a/src/com/engine/salary/web/AddUpDeductionController.java b/src/com/engine/salary/web/AddUpDeductionController.java index f5c4e0d6b..74d934add 100644 --- a/src/com/engine/salary/web/AddUpDeductionController.java +++ b/src/com/engine/salary/web/AddUpDeductionController.java @@ -375,7 +375,8 @@ public class AddUpDeductionController { } else { date = DateUtil.beginOfMonth(new Date()); } + param.setYearMonthDate(date); User user = HrmUserVarify.getUser(request, response); - return new ResponseResult(user).run(getAddUpDeductionWrapper(user)::autoAddAll, date); + return new ResponseResult(user).run(getAddUpDeductionWrapper(user)::autoAddAll, param); } } diff --git a/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java b/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java index 9d0229528..68c8e6c4d 100644 --- a/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java +++ b/src/com/engine/salary/wrapper/AddUpDeductionWrapper.java @@ -5,10 +5,7 @@ import com.engine.core.impl.Service; import com.engine.salary.entity.datacollection.AddUpDeduction; import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO; import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO; -import com.engine.salary.entity.datacollection.param.AddUpDeductionImportParam; -import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam; -import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam; -import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordParam; +import com.engine.salary.entity.datacollection.param.*; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.service.AddUpDeductionService; import com.engine.salary.service.SalaryEmployeeService; @@ -169,13 +166,14 @@ public class AddUpDeductionWrapper extends Service { return getAddUpDeductionService(user).getAddUpDeduction(param); } - public String autoAddAll(Date yearMonth) { + public String autoAddAll(AddDeductionAutoAddParam param) { + Date yearMonth = param.getYearMonthDate(); if (isLog) { log.info("一键累计, 操作人 「{}」", user.getUsername()); } if (yearMonth == null) { throw new SalaryRunTimeException("一键累计传入日期格式错误"); } - return getAddUpDeductionService(user).autoAddAll(yearMonth, null); + return getAddUpDeductionService(user).autoAddAll(yearMonth, null, param.getTaxAgentIds()); } } From b5b2c9ef1e9ceb90d122c66cd4c301adbe9dcf85 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 30 Apr 2024 15:00:43 +0800 Subject: [PATCH 14/17] =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E4=B8=93=E9=A1=B9?= =?UTF-8?q?=E9=99=84=E5=8A=A0=E6=89=A3=E9=99=A4=E4=B8=80=E9=94=AE=E7=B4=AF?= =?UTF-8?q?=E8=AE=A1=EF=BC=8C=E8=83=BD=E6=A0=B9=E6=8D=AE=E4=B9=89=E5=8A=A1?= =?UTF-8?q?=E4=BA=BA=E8=BF=9B=E8=A1=8C=E7=B4=AF=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/AddUpDeductionServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java index 51360a7f3..322afcc6b 100644 --- a/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java @@ -750,7 +750,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction } else { taxAgents = getTaxAgentService(user).listAllTaxAgentsAsAdmin((long) user.getUID()); } - + // 过滤个税扣缴义务人选择框 if (CollectionUtils.isNotEmpty(taxAgentIds)) { taxAgents = taxAgents.stream().filter(taxAgent -> taxAgentIds.contains(taxAgent.getId())).collect(Collectors.toList()); } From 6b0606f5a4817673f879e5d28587a19d553d5f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 7 May 2024 17:37:02 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/util/page/SalaryPageUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/util/page/SalaryPageUtil.java b/src/com/engine/salary/util/page/SalaryPageUtil.java index d0a685913..bf118b462 100644 --- a/src/com/engine/salary/util/page/SalaryPageUtil.java +++ b/src/com/engine/salary/util/page/SalaryPageUtil.java @@ -93,6 +93,7 @@ public class SalaryPageUtil { /** * 自适应文字长度 + * * @param chars * @param width * @return @@ -102,7 +103,7 @@ public class SalaryPageUtil { return width + ""; } Rectangle2D bounds = font.getStringBounds(chars, frc); - int pxLength = (int) Math.ceil(bounds.getWidth()); - return pxLength + 55 + ""; + int pxLength = (int) Math.ceil(bounds.getWidth()) + 55; + return pxLength < 90 ? 90+"" : pxLength+""; } } From 6f2d65a4be175599ea0ea7c0d27c9970bba36f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 8 May 2024 10:49:08 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B0=E5=BB=BA=E6=97=B6=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E4=BD=8D=E5=92=8C=E8=BF=9B=E4=BD=8D=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=AF=B9=E5=BA=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SISchemeBiz.java | 4 +++- src/com/engine/salary/cmd/sischeme/SISchemeCopyCmd.java | 1 + .../engine/salary/cmd/sischeme/SISchemeDeleteCmd.java | 1 + .../engine/salary/cmd/sischeme/SISchemeGetFormCmd.java | 1 + .../engine/salary/cmd/sischeme/SISchemeInsertCmd.java | 1 + src/com/engine/salary/cmd/sischeme/SISchemeListCmd.java | 1 + .../engine/salary/cmd/sischeme/SISchemeUpdateCmd.java | 1 + .../salary/enums/sicategory/RententionRuleEnum.java | 9 +-------- .../engine/salary/service/impl/SISchemeServiceImpl.java | 6 +++--- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/com/engine/salary/biz/SISchemeBiz.java b/src/com/engine/salary/biz/SISchemeBiz.java index 4079ebfab..686e617c8 100644 --- a/src/com/engine/salary/biz/SISchemeBiz.java +++ b/src/com/engine/salary/biz/SISchemeBiz.java @@ -11,6 +11,7 @@ import com.engine.salary.entity.sischeme.param.InsuranceSchemeReqParam; import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; import com.engine.salary.entity.sischeme.vo.InsuranceSchemeFormVO; +import com.engine.salary.enums.SalaryRoundingModeEnum; import com.engine.salary.enums.sicategory.*; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.siaccount.SIAccountUtilMapper; @@ -77,7 +78,8 @@ public class SISchemeBiz { .insuranceId(item.getId()) .insuranceName(item.getInsuranceName()) .paymentScope(e.getDefaultLabel()) - .rententionRule(String.valueOf(RententionRuleEnum.ROUND.getValue())) + .rententionRule(String.valueOf(SalaryRoundingModeEnum.ROUNDING.getValue())) + .validNum(2) .cycleSetting("000000000000") .paymentCycle("0") .accountType("0") diff --git a/src/com/engine/salary/cmd/sischeme/SISchemeCopyCmd.java b/src/com/engine/salary/cmd/sischeme/SISchemeCopyCmd.java index aa03b71f1..f00e56950 100644 --- a/src/com/engine/salary/cmd/sischeme/SISchemeCopyCmd.java +++ b/src/com/engine/salary/cmd/sischeme/SISchemeCopyCmd.java @@ -16,6 +16,7 @@ import java.util.Map; * @Date 2022/3/8 * @Version V1.0 **/ +@Deprecated public class SISchemeCopyCmd extends AbstractCommonCommand> { public SISchemeCopyCmd(Map params, User user) { diff --git a/src/com/engine/salary/cmd/sischeme/SISchemeDeleteCmd.java b/src/com/engine/salary/cmd/sischeme/SISchemeDeleteCmd.java index f2fc0dec4..488989936 100644 --- a/src/com/engine/salary/cmd/sischeme/SISchemeDeleteCmd.java +++ b/src/com/engine/salary/cmd/sischeme/SISchemeDeleteCmd.java @@ -19,6 +19,7 @@ import java.util.Map; * @Date 2022/3/8 * @Version V1.0 **/ +@Deprecated public class SISchemeDeleteCmd extends AbstractCommonCommand> { public SISchemeDeleteCmd(Map params, User user) { diff --git a/src/com/engine/salary/cmd/sischeme/SISchemeGetFormCmd.java b/src/com/engine/salary/cmd/sischeme/SISchemeGetFormCmd.java index d497c4c30..eb75b5ef1 100644 --- a/src/com/engine/salary/cmd/sischeme/SISchemeGetFormCmd.java +++ b/src/com/engine/salary/cmd/sischeme/SISchemeGetFormCmd.java @@ -19,6 +19,7 @@ import java.util.Objects; * @Date 2022/3/7 * @Version V1.0 **/ +@Deprecated public class SISchemeGetFormCmd extends AbstractCommonCommand> { public SISchemeGetFormCmd(Map params, User user) { diff --git a/src/com/engine/salary/cmd/sischeme/SISchemeInsertCmd.java b/src/com/engine/salary/cmd/sischeme/SISchemeInsertCmd.java index fbbe0918f..b4a554fba 100644 --- a/src/com/engine/salary/cmd/sischeme/SISchemeInsertCmd.java +++ b/src/com/engine/salary/cmd/sischeme/SISchemeInsertCmd.java @@ -16,6 +16,7 @@ import java.util.Map; * @Date 2022/3/8 * @Version V1.0 **/ +@Deprecated public class SISchemeInsertCmd extends AbstractCommonCommand> { public SISchemeInsertCmd(Map params, User user) { diff --git a/src/com/engine/salary/cmd/sischeme/SISchemeListCmd.java b/src/com/engine/salary/cmd/sischeme/SISchemeListCmd.java index f3657cdb2..44153bd57 100644 --- a/src/com/engine/salary/cmd/sischeme/SISchemeListCmd.java +++ b/src/com/engine/salary/cmd/sischeme/SISchemeListCmd.java @@ -17,6 +17,7 @@ import java.util.Objects; * @Date 2022/3/10 * @Version V1.0 **/ +@Deprecated public class SISchemeListCmd extends AbstractCommonCommand> { public SISchemeListCmd(Map params, User user) { diff --git a/src/com/engine/salary/cmd/sischeme/SISchemeUpdateCmd.java b/src/com/engine/salary/cmd/sischeme/SISchemeUpdateCmd.java index ae59e4d39..7910223e4 100644 --- a/src/com/engine/salary/cmd/sischeme/SISchemeUpdateCmd.java +++ b/src/com/engine/salary/cmd/sischeme/SISchemeUpdateCmd.java @@ -16,6 +16,7 @@ import java.util.Map; * @Date 2022/3/8 * @Version V1.0 **/ +@Deprecated public class SISchemeUpdateCmd extends AbstractCommonCommand> { public SISchemeUpdateCmd(Map params, User user) { diff --git a/src/com/engine/salary/enums/sicategory/RententionRuleEnum.java b/src/com/engine/salary/enums/sicategory/RententionRuleEnum.java index 0605dfa67..c48ebd3fb 100644 --- a/src/com/engine/salary/enums/sicategory/RententionRuleEnum.java +++ b/src/com/engine/salary/enums/sicategory/RententionRuleEnum.java @@ -6,14 +6,7 @@ import com.engine.salary.enums.BaseEnum; import java.math.BigDecimal; import java.util.Arrays; -/** - * 进位规则枚举 - *

Copyright: Copyright (c) 2022

- *

Company: 泛微软件

- * - * @author qiantao - * @version 1.0 - **/ +@Deprecated public enum RententionRuleEnum implements BaseEnum { ROUND(BigDecimal.ROUND_HALF_UP, "四舍五入", 84505), CEIL(BigDecimal.ROUND_UP, "向上舍入", 84506), diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index d7483d542..1046dbdb4 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -34,6 +34,7 @@ import com.engine.salary.entity.taxagent.param.TaxAgentManageRangeSaveParam; import com.engine.salary.entity.taxagent.param.TaxAgentRangeSaveParam; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.OperateTypeEnum; +import com.engine.salary.enums.SalaryRoundingModeEnum; import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salarysob.TargetTypeEnum; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; @@ -177,7 +178,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { @Override public Map getForm(Map params) { -// return commandExecutor.execute(new SISchemeGetFormCmd(params, user)); Map apidatas = new HashMap<>(16); Long id = null; @@ -185,7 +185,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { id =Long.valueOf(Util.null2String(params.get("id"))); } WelfareTypeEnum welfareTypeEnum = (WelfareTypeEnum)params.get("welfareTypeEnum"); -// InsuranceSchemeFormVO form = siSchemeBiz.getForm(id, welfareTypeEnum); InsuranceSchemeFormVO form = getForm(id, welfareTypeEnum); apidatas.put("form",form); //记录操作日志 @@ -2308,7 +2307,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { .insuranceId(item.getId()) .insuranceName(item.getInsuranceName()) .paymentScope(e.getDefaultLabel()) - .rententionRule(String.valueOf(RententionRuleEnum.ROUND.getValue())) + .rententionRule(String.valueOf(SalaryRoundingModeEnum.ROUNDING.getValue())) + .validNum(2) .cycleSetting("000000000000") .paymentCycle("0") .accountType("0") From c97618bd97ebccc7427818d793b3209e72e66b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 8 May 2024 11:15:52 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E4=BF=AE=E6=94=B9=E6=97=B6=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/UpdateSISchemeDetailAction.java | 2 ++ src/com/engine/salary/biz/SIAccountBiz.java | 28 +++++++++---------- src/com/engine/salary/biz/SISchemeBiz.java | 4 +-- .../entity/sischeme/bo/InsuranceSchemeBO.java | 2 +- .../service/impl/SISchemeServiceImpl.java | 4 +-- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/com/engine/salary/action/UpdateSISchemeDetailAction.java b/src/com/engine/salary/action/UpdateSISchemeDetailAction.java index 2ceef43d0..0d406455a 100644 --- a/src/com/engine/salary/action/UpdateSISchemeDetailAction.java +++ b/src/com/engine/salary/action/UpdateSISchemeDetailAction.java @@ -183,6 +183,8 @@ public class UpdateSISchemeDetailAction implements Action { String validNum = importDataMap.getOrDefault("有效小数位", "").toString(); if (StringUtils.isNotBlank(validNum)) { targetSchemeDetailPO.setValidNum(Integer.valueOf(validNum)); + }else { + targetSchemeDetailPO.setValidNum(2); } String rententionRule = importDataMap.getOrDefault("进位规则", "").toString(); if (StringUtils.isNotBlank(rententionRule)) { diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 5eb07b4af..46abbf098 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -678,7 +678,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (po.getPaymentCycle() != null && po.getPaymentCycle() == 1) { @@ -755,7 +755,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -845,7 +845,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -921,7 +921,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1014,7 +1014,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1090,7 +1090,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1596,7 +1596,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (po.getPaymentCycle() != null && po.getPaymentCycle() == 1) { @@ -1665,7 +1665,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1746,7 +1746,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1814,7 +1814,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1899,7 +1899,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -1968,7 +1968,7 @@ public class SIAccountBiz extends Service { BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100")); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -2056,7 +2056,7 @@ public class SIAccountBiz extends Service { // BigDecimal paymentNum = new BigDecimal(archivesPerson.get(String.valueOf(e))); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { @@ -2127,7 +2127,7 @@ public class SIAccountBiz extends Service { // BigDecimal paymentNum = SalaryEntityUtil.string2BigDecimalDefault0(archivesCom.get(String.valueOf(e))); BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e))); BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost()); - Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum(); + Integer newScale = po.getValidNum() == null ? 2 : po.getValidNum(); // BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost)); BigDecimal result = new BigDecimal("0"); if (Objects.equals(po.getPaymentCycle(), 1)) { diff --git a/src/com/engine/salary/biz/SISchemeBiz.java b/src/com/engine/salary/biz/SISchemeBiz.java index 686e617c8..f4b82614a 100644 --- a/src/com/engine/salary/biz/SISchemeBiz.java +++ b/src/com/engine/salary/biz/SISchemeBiz.java @@ -97,7 +97,7 @@ public class SISchemeBiz { insuranceSchemeDetailDTO.setInsuranceId(insuranceSchemeDetailPO.getInsuranceId()); insuranceSchemeDetailDTO.setPaymentScopeValue(insuranceSchemeDetailPO.getPaymentScope()); insuranceSchemeDetailDTO.setPrimaryId(insuranceSchemeDetailPO.getPrimaryId()); - insuranceSchemeDetailDTO.setValidNum(insuranceSchemeDetailPO.getValidNum()); + insuranceSchemeDetailDTO.setValidNum(insuranceSchemeDetailPO.getValidNum() == null ? 2 : insuranceSchemeDetailPO.getValidNum()); if (insuranceSchemeDetailPO.getIsPayment() != null) { insuranceSchemeDetailDTO.setIsPayment(Objects.equals(insuranceSchemeDetailPO.getIsPayment(), IsPaymentEnum.YES.getValue())); @@ -429,7 +429,7 @@ public class SISchemeBiz { .primaryId(batchPO.getId()) .rententionRule(item.getRententionRule()) .upperLimit(item.getUpperLimit()) - .validNum(item.getValidNum()) + .validNum(item.getValidNum()==null?2:item.getValidNum()) .build() ).collect(Collectors.toList()); encryptUtil.encryptList(detailPOS, InsuranceSchemeDetailPO.class); diff --git a/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java b/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java index 4b24e4021..f1f844e0d 100644 --- a/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java +++ b/src/com/engine/salary/entity/sischeme/bo/InsuranceSchemeBO.java @@ -76,7 +76,7 @@ public class InsuranceSchemeBO { .cycleSetting(item.getCycleSetting()) .accountType(Integer.parseInt(item.getAccountType())) .updateTime(new Date()) - .validNum(item.getValidNum()) + .validNum(item.getValidNum()==null ? 2 : item.getValidNum()) .build() ).collect(Collectors.toList()); } diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 1046dbdb4..f1fd51619 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -2326,7 +2326,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { insuranceSchemeDetailDTO.setInsuranceId(insuranceSchemeDetailPO.getInsuranceId()); insuranceSchemeDetailDTO.setPaymentScopeValue(insuranceSchemeDetailPO.getPaymentScope()); insuranceSchemeDetailDTO.setPrimaryId(insuranceSchemeDetailPO.getPrimaryId()); - insuranceSchemeDetailDTO.setValidNum(insuranceSchemeDetailPO.getValidNum()); + insuranceSchemeDetailDTO.setValidNum(insuranceSchemeDetailPO.getValidNum() == null ? 2 : insuranceSchemeDetailPO.getValidNum()); if (insuranceSchemeDetailPO.getIsPayment() != null) { insuranceSchemeDetailDTO.setIsPayment(Objects.equals(insuranceSchemeDetailPO.getIsPayment(), IsPaymentEnum.YES.getValue())); @@ -2664,7 +2664,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { .primaryId(batchPO.getId()) .rententionRule(item.getRententionRule()) .upperLimit(item.getUpperLimit()) - .validNum(item.getValidNum()) + .validNum(item.getValidNum()==null?2:item.getValidNum()) .build() ).collect(Collectors.toList());