diff --git a/resource/sql/薪资还原脚本.sql b/resource/sql/薪资还原脚本.sql index 1d04b52a6..e51fede26 100644 --- a/resource/sql/薪资还原脚本.sql +++ b/resource/sql/薪资还原脚本.sql @@ -76,6 +76,7 @@ delete from hrsa_scheme_detail where 1=1 delete from hrsa_social_archives where 1=1 ; + delete from hrsa_social_security_scheme where 1=1 ; delete from hrsa_sys_tax_rate_base where 1=1 diff --git a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml index e6bd5ab08..cae78013f 100644 --- a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml @@ -322,7 +322,7 @@ FROM hrmresource e LEFT JOIN hrmdepartment d ON e.departmentid = d.ID - where e.accounttype is null + where e.accounttype is null or e.accounttype = 0 )a LEFT JOIN( SELECT diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index 46cd1d9ef..5bead0d55 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -654,8 +654,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { private String userStateExchange(String userState) { UserStatusEnum[] values = UserStatusEnum.values(); for (UserStatusEnum value : values) { - if (value.getDescription().equals(userState)) { - return value.getValue() + ""; + if (value.getValue().equals(Integer.valueOf(userState))) { + return value.getDescription() + ""; } } return userState; diff --git a/src/com/engine/salary/service/impl/TaxAgentEmpChangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentEmpChangeServiceImpl.java index 35d76fc5b..6bd3e54f4 100644 --- a/src/com/engine/salary/service/impl/TaxAgentEmpChangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentEmpChangeServiceImpl.java @@ -6,6 +6,7 @@ import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum; import com.engine.salary.mapper.taxagent.TaxAgentEmpChangeMapper; import com.engine.salary.service.TaxAgentEmpChangeService; import com.engine.salary.util.db.MapperProxyFactory; +import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import javax.annotation.Resource; @@ -49,6 +50,7 @@ public class TaxAgentEmpChangeServiceImpl extends Service implements TaxAgentEmp @Override public void batchInsert(List taxAgentEmpChangeList) { - getTaxAgentEmpChangeMapper().batchInsert(taxAgentEmpChangeList); + List> partition = Lists.partition(taxAgentEmpChangeList, 100); + partition.forEach(getTaxAgentEmpChangeMapper()::batchInsert); } } diff --git a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java index 5808fb81d..4cf2168ed 100644 --- a/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentEmpServiceImpl.java @@ -141,11 +141,13 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic // 关联表==================================================== // 新增 if (CollectionUtils.isNotEmpty(taxAgentEmployeeAddList)) { - getTaxAgentEmpMapper().batchInsert(taxAgentEmployeeAddList); + List> partition = Lists.partition(taxAgentEmployeeAddList, 100); + partition.forEach(getTaxAgentEmpMapper()::batchInsert); } // 删除 if (CollectionUtils.isNotEmpty(taxAgentEmployeeDelIds)) { - getTaxAgentEmpMapper().deleteByIds(taxAgentEmployeeDelIds); + List> partition = Lists.partition(taxAgentEmployeeDelIds, 100); + partition.forEach(getTaxAgentEmpMapper()::deleteByIds); } // 增量表==================================================== if (CollectionUtils.isNotEmpty(taxAgentEmpChangeList)) {