comments : excelComments) {
+// message.append(comments.get("message")).append("\n");
+// }
+// requestInfo.getRequestManager().setMessage(message.toString());
+// return FAILURE_AND_CONTINUE;
+ }
+ } catch (Exception e) {
+ log.error("调薪异常", e);
+ requestInfo.getRequestManager().setMessage(e.getMessage());
+ return FAILURE_AND_CONTINUE;
+ }
+ return SUCCESS;
+ }
+
+
+ class SalaryField {
+
+ private String processField;
+
+ private String salaryName;
+
+ private String value;
+
+ public String getProcessField() {
+ return processField;
+ }
+
+ public void setProcessField(String processField) {
+ this.processField = processField;
+ }
+
+ public String getSalaryName() {
+ return salaryName;
+ }
+
+ public void setSalaryName(String salaryName) {
+ this.salaryName = salaryName;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public SalaryField(String processField, String salaryName, String value) {
+ this.processField = processField;
+ this.salaryName = salaryName;
+ this.value = value;
+ }
+ }
+}
diff --git a/src/com/engine/salary/annotation/Encrypt.java b/src/com/engine/salary/annotation/Encrypt.java
new file mode 100644
index 000000000..c61e1de44
--- /dev/null
+++ b/src/com/engine/salary/annotation/Encrypt.java
@@ -0,0 +1,20 @@
+package com.engine.salary.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 加密字段,用于标注需加解密的字段
+ * Copyright: Copyright (c) 2022
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Encrypt {
+
+}
diff --git a/src/com/engine/salary/biz/AddUpDeductionBiz.java b/src/com/engine/salary/biz/AddUpDeductionBiz.java
index ba1b48ef7..75fc201f7 100644
--- a/src/com/engine/salary/biz/AddUpDeductionBiz.java
+++ b/src/com/engine/salary/biz/AddUpDeductionBiz.java
@@ -1,8 +1,6 @@
package com.engine.salary.biz;
-import com.engine.salary.encrypt.datacollection.AddUpDeductionEncrypt;
-import com.engine.salary.encrypt.datacollection.AddUpDeductionRecordStrDTOEncrypt;
-import com.engine.salary.encrypt.datacollection.AddUpDeductionStrDTOEncrypt;
+import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpDeduction;
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
@@ -19,6 +17,8 @@ import java.util.stream.Collectors;
public class AddUpDeductionBiz extends BaseBean {
+ private final EncryptUtil encryptUtil = new EncryptUtil();
+
/**
* 关联查询查询列表
@@ -31,7 +31,7 @@ public class AddUpDeductionBiz extends BaseBean {
try {
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
List list = mapper.list(param);
- AddUpDeductionStrDTOEncrypt.decryptAddUpDeductionList(list);
+ list = encryptUtil.decryptList(list, AddUpDeductionDTO.class);
return list;
} finally {
sqlSession.close();
@@ -49,7 +49,7 @@ public class AddUpDeductionBiz extends BaseBean {
try {
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
List addUpDeductions = mapper.listSome(param);
- return AddUpDeductionEncrypt.decryptAddUpDeductionList(addUpDeductions);
+ return encryptUtil.decryptList(addUpDeductions, AddUpDeduction.class);
} finally {
sqlSession.close();
}
@@ -67,7 +67,7 @@ public class AddUpDeductionBiz extends BaseBean {
try {
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
AddUpDeduction byId = mapper.getById(id);
- return AddUpDeductionEncrypt.decryptAddUpDeduction(byId);
+ return encryptUtil.decrypt(byId, AddUpDeduction.class);
} finally {
sqlSession.close();
}
@@ -84,7 +84,7 @@ public class AddUpDeductionBiz extends BaseBean {
try {
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
List addUpDeductionRecordStrDTOS = mapper.recordList(param);
- return AddUpDeductionRecordStrDTOEncrypt.decryptAddUpDeductionRecordDTO(addUpDeductionRecordStrDTOS);
+ return encryptUtil.decryptList(addUpDeductionRecordStrDTOS, AddUpDeductionRecordDTO.class);
} finally {
sqlSession.close();
}
@@ -103,7 +103,7 @@ public class AddUpDeductionBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
- AddUpDeductionEncrypt.encryptAddUpDeductionList(param);
+ encryptUtil.encryptList(param, AddUpDeduction.class);
List> partition = Lists.partition(param, 100);
partition.forEach(mapper::insertData);
sqlSession.commit();
@@ -125,7 +125,7 @@ public class AddUpDeductionBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
- AddUpDeductionEncrypt.encryptAddUpDeductionList(param);
+ encryptUtil.encryptList(param, AddUpDeduction.class);
List> partition = Lists.partition(param, 100);
partition.forEach(mapper::updateData);
sqlSession.commit();
@@ -135,11 +135,6 @@ public class AddUpDeductionBiz extends BaseBean {
}
-
-
-
-
-
/**
* 处理导入数据
*
diff --git a/src/com/engine/salary/biz/AddUpSituationBiz.java b/src/com/engine/salary/biz/AddUpSituationBiz.java
index 3ddc0b8fb..ba27c39d9 100644
--- a/src/com/engine/salary/biz/AddUpSituationBiz.java
+++ b/src/com/engine/salary/biz/AddUpSituationBiz.java
@@ -1,8 +1,6 @@
package com.engine.salary.biz;
-import com.engine.salary.encrypt.datacollection.AddUpSituationDTOEncrypt;
-import com.engine.salary.encrypt.datacollection.AddUpSituationEncrypt;
-import com.engine.salary.encrypt.datacollection.AddUpSituationRecordDTOEncrypt;
+import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpSituation;
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
@@ -19,6 +17,7 @@ import java.util.stream.Collectors;
public class AddUpSituationBiz extends BaseBean {
+ private EncryptUtil encryptUtil = new EncryptUtil();
/**
* 关联查询查询列表
@@ -31,7 +30,7 @@ public class AddUpSituationBiz extends BaseBean {
try {
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
List list = mapper.list(param);
- return AddUpSituationDTOEncrypt.decryptAddUpSituationDTOList(list);
+ return encryptUtil.decryptList(list, AddUpSituationDTO.class);
} finally {
sqlSession.close();
}
@@ -48,7 +47,7 @@ public class AddUpSituationBiz extends BaseBean {
try {
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
List addUpSituations = mapper.listSome(param);
- return AddUpSituationEncrypt.decryptAddUpSituationList(addUpSituations);
+ return encryptUtil.decryptList(addUpSituations, AddUpSituation.class);
} finally {
sqlSession.close();
}
@@ -66,7 +65,7 @@ public class AddUpSituationBiz extends BaseBean {
try {
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
AddUpSituation byId = mapper.getById(id);
- return AddUpSituationEncrypt.decryptAddUpSituation(byId);
+ return encryptUtil.decrypt(byId, AddUpSituation.class);
} finally {
sqlSession.close();
}
@@ -83,7 +82,7 @@ public class AddUpSituationBiz extends BaseBean {
try {
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
List addUpSituationRecordDTOS = mapper.recordList(param);
- return AddUpSituationRecordDTOEncrypt.decryptAddUpSituationRecordDTOList(addUpSituationRecordDTOS);
+ return encryptUtil.decryptList(addUpSituationRecordDTOS, AddUpSituationRecordDTO.class);
} finally {
sqlSession.close();
}
@@ -102,7 +101,7 @@ public class AddUpSituationBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
- AddUpSituationEncrypt.encryptAddUpSituationList(param);
+ encryptUtil.encryptList(param, AddUpSituation.class);
List> partition = Lists.partition(param, 50);
partition.forEach(mapper::insertData);
sqlSession.commit();
@@ -124,7 +123,7 @@ public class AddUpSituationBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
- AddUpSituationEncrypt.encryptAddUpSituationList(param);
+ encryptUtil.encryptList(param, AddUpSituation.class);
List> partition = Lists.partition(param, 50);
partition.forEach(mapper::updateData);
sqlSession.commit();
diff --git a/src/com/engine/salary/biz/OtherDeductionBiz.java b/src/com/engine/salary/biz/OtherDeductionBiz.java
index b71668f86..5b6002825 100644
--- a/src/com/engine/salary/biz/OtherDeductionBiz.java
+++ b/src/com/engine/salary/biz/OtherDeductionBiz.java
@@ -1,7 +1,6 @@
package com.engine.salary.biz;
-import com.engine.salary.encrypt.datacollection.OtherDeductionPOEncrypt;
-import com.engine.salary.encrypt.datacollection.OtherDeductionRecordDTOEncrypt;
+import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
@@ -17,7 +16,7 @@ import java.util.stream.Collectors;
public class OtherDeductionBiz extends BaseBean {
-
+ private EncryptUtil encryptUtil = new EncryptUtil();
/**
* 条件查询
@@ -30,7 +29,7 @@ public class OtherDeductionBiz extends BaseBean {
try {
OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class);
List otherDeductionPOS = mapper.listSome(param);
- return OtherDeductionPOEncrypt.decryptOtherDeductionPOList(otherDeductionPOS);
+ return encryptUtil.decryptList(otherDeductionPOS, OtherDeductionPO.class);
} finally {
sqlSession.close();
}
@@ -48,7 +47,7 @@ public class OtherDeductionBiz extends BaseBean {
try {
OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class);
OtherDeductionPO byId = mapper.getById(id);
- return OtherDeductionPOEncrypt.decryptOtherDeductionPO(byId);
+ return encryptUtil.decrypt(byId, OtherDeductionPO.class);
} finally {
sqlSession.close();
}
@@ -65,7 +64,7 @@ public class OtherDeductionBiz extends BaseBean {
try {
OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class);
List otherDeductionRecordDTOS = mapper.recordList(param);
- return OtherDeductionRecordDTOEncrypt.decryptOtherDeductionRecordDTOList(otherDeductionRecordDTOS);
+ return encryptUtil.decryptList(otherDeductionRecordDTOS, OtherDeductionRecordDTO.class);
} finally {
sqlSession.close();
}
@@ -84,7 +83,7 @@ public class OtherDeductionBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class);
- OtherDeductionPOEncrypt.encryptOtherDeductionPOList(param);
+ encryptUtil.encryptList(param, OtherDeductionPO.class);
List> partition = Lists.partition(param, 100);
partition.forEach(mapper::insertData);
sqlSession.commit();
@@ -106,7 +105,7 @@ public class OtherDeductionBiz extends BaseBean {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class);
- OtherDeductionPOEncrypt.encryptOtherDeductionPOList(param);
+ encryptUtil.encryptList(param, OtherDeductionPO.class);
List> partition = Lists.partition(param, 100);
partition.forEach(mapper::updateData);
sqlSession.commit();
diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java
index 52b76d7dc..2bf7c9e3d 100644
--- a/src/com/engine/salary/biz/SIAccountBiz.java
+++ b/src/com/engine/salary/biz/SIAccountBiz.java
@@ -5,21 +5,16 @@ import com.alibaba.fastjson.TypeReference;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
+import com.engine.salary.cache.SalaryCacheKey;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.AESEncryptUtil;
-import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
-import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailTempPOEncrypt;
-import com.engine.salary.encrypt.siaccount.SiAccountEncrypt;
-import com.engine.salary.encrypt.sischeme.InsuranceSchemeDetailPOEncrypt;
+import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
import com.engine.salary.entity.siaccount.dto.SIAccountUtilDTO;
import com.engine.salary.entity.siaccount.param.*;
-import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
-import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
-import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailTempPO;
-import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO;
+import com.engine.salary.entity.siaccount.po.*;
import com.engine.salary.entity.siarchives.po.*;
import com.engine.salary.entity.sicategory.po.ICategoryPO;
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
@@ -33,8 +28,10 @@ import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
import com.engine.salary.mapper.taxagent.TaxAgentMapper;
+import com.engine.salary.service.SalaryAcctProgressService;
import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.TaxAgentService;
+import com.engine.salary.service.impl.SalaryAcctProgressServiceImpl;
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
import com.engine.salary.service.impl.TaxAgentServiceImpl;
import com.engine.salary.sys.entity.vo.OrderRuleVO;
@@ -53,6 +50,7 @@ import com.wbi.util.StringUtil;
import dm.jdbc.util.IdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import weaver.hrm.User;
@@ -76,6 +74,8 @@ public class SIAccountBiz extends Service {
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
+ private EncryptUtil encryptUtil = new EncryptUtil();
+
private TaxAgentService getTaxAgentService() {
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
}
@@ -109,12 +109,20 @@ public class SIAccountBiz extends Service {
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
}
+ private InsuranceCompensationMapper getInsuranceCompensationMapper() {
+ return MapperProxyFactory.getProxy(InsuranceCompensationMapper.class);
+ }
+
+ private SalaryAcctProgressService getSalaryAcctProgressService(User user) {
+ return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user);
+ }
+
public PageInfo listPage(InsuranceAccountBatchParam queryParam) {
- SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List list = getInsuranceAccountBatchMapper().list(queryParam);
- list = SiAccountEncrypt.decryptInsuranceAccountBatchList(list);
- PageInfo pageInfo = new PageInfo<>(list, InsuranceAccountBatchPO.class);
- return pageInfo;
+ PageInfo page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
+ list, InsuranceAccountBatchPO.class);
+ encryptUtil.decryptList(page.getList(), InsuranceAccountBatchPO.class);
+ return page;
}
public PageInfo listCommonPage(InsuranceAccountDetailParam queryParam) {
@@ -132,21 +140,20 @@ public class SIAccountBiz extends Service {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
- SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List list = getInsuranceAccountDetailMapper().list(queryParam);
- InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
- PageInfo pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
+ PageInfo pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
+ list, InsuranceAccountDetailPO.class);
+ encryptUtil.decryptList(pageInfo.getList(), InsuranceAccountDetailPO.class);
return pageInfo;
}
public String save(boolean flag, AccountParam param, Long employeeId, String currentUserName) {
if (flag) {
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
- insuranceAccountBatchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
+ insuranceAccountBatchPO = encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
SalaryAssert.isNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(100461, "所属月份存在核算数据"));
-
InsuranceAccountBatchPO build = InsuranceAccountBatchPO.builder()
.paymentOrganization(param.getPaymentOrganization())
.accountant(currentUserName)
@@ -160,7 +167,7 @@ public class SIAccountBiz extends Service {
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.paymentOrganization(param.getPaymentOrganization())
.build();
- SiAccountEncrypt.encryptInsuranceAccountBatch(build);
+ encryptUtil.encrypt(build, InsuranceAccountBatchPO.class);
getInsuranceAccountBatchMapper().insert(build);
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(build.getId()));
@@ -176,7 +183,7 @@ public class SIAccountBiz extends Service {
} catch (Exception e) {
// 回滚
List list = Lists.newArrayList(getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization()));
- list = SiAccountEncrypt.decryptInsuranceAccountBatchList(list);
+ list = encryptUtil.decryptList(list, InsuranceAccountBatchPO.class);
if (CollectionUtils.isNotEmpty(list)) {
list.stream().forEach(f -> {
getInsuranceAccountBatchMapper().deleteById(f.getId());
@@ -197,7 +204,7 @@ public class SIAccountBiz extends Service {
// employeeIds = employeeIds.stream().filter(employeeIdsInTaxAgent::contains).collect(Collectors.toList());
if (CollectionUtils.isEmpty(employeeIds)) {
List list = Lists.newArrayList(getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), paymentOrganization));
- SiAccountEncrypt.decryptInsuranceAccountBatchList(list);
+ encryptUtil.decryptList(list, InsuranceAccountBatchPO.class);
if (CollectionUtils.isNotEmpty(list)) {
list.stream().forEach(f -> {
getInsuranceAccountDetailMapper().deleteById(f.getId());
@@ -221,10 +228,20 @@ public class SIAccountBiz extends Service {
public void accounting(AccountParam param, Long employeeId, String tenantKey, String currentUserName) {
//薪资核算进度暂未实现
-// SalaryAcctProgressDTO salaryAcctProgressDTO = salaryAcctProgressService.getProgress(tenantKey + param.getBillMonth(), employeeId, tenantKey);
-// if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) {
-// return;
-// }
+ SalaryAcctProgressDTO salaryAcctProgressDTO = getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth());
+ if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) {
+ return;
+ }
+ // 初始化进度
+ SalaryAcctProgressDTO initProgress = new SalaryAcctProgressDTO()
+ .setTitle(SalaryI18nUtil.getI18nLabel(97515, "核算中"))
+ .setTitleLabelId(97515L)
+ .setTotalQuantity(NumberUtils.INTEGER_ONE)
+ .setCalculatedQuantity(NumberUtils.INTEGER_ZERO)
+ .setProgress(BigDecimal.ZERO)
+ .setStatus(true)
+ .setMessage(StringUtils.EMPTY);
+ getSalaryAcctProgressService(user).initProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), initProgress);
doAccounting(param, employeeId, tenantKey, currentUserName);
}
@@ -290,11 +307,23 @@ public class SIAccountBiz extends Service {
}
if (CollectionUtils.isEmpty(ids)) {
//salaryAcctProgressService.fail(tenantKey + param.getBillMonth(), SalaryI18nUtil.getI18nLabel( 100468, "无需要核算的人员"));
+ getSalaryAcctProgressService(user).fail(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), SalaryI18nUtil.getI18nLabel( 100468, "无需要核算的人员"));
return;
}
- SalaryAcctProgressDTO salaryAcctProgressDTO = new SalaryAcctProgressDTO(SalaryI18nUtil.getI18nLabel(97515, "核算中"), 97515L, ids.size(), 0,
- BigDecimal.ZERO, true, "", true);
+// SalaryAcctProgressDTO salaryAcctProgressDTO = new SalaryAcctProgressDTO(SalaryI18nUtil.getI18nLabel(97515, "核算中"), 97515L, ids.size(), 0,
+// BigDecimal.ZERO, true, "", true);
//salaryAcctProgressService.initProgress(tenantKey + param.getBillMonth(), salaryAcctProgressDTO, employeeId, tenantKey);
+
+ // 初始化进度
+ SalaryAcctProgressDTO initProgress = new SalaryAcctProgressDTO()
+ .setTitle(SalaryI18nUtil.getI18nLabel(97515, "核算中"))
+ .setTitleLabelId(97515L)
+ .setTotalQuantity(ids.size())
+ .setCalculatedQuantity(NumberUtils.INTEGER_ZERO)
+ .setProgress(BigDecimal.ZERO)
+ .setStatus(true)
+ .setMessage(StringUtils.EMPTY);
+ getSalaryAcctProgressService(user).initProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), initProgress);
/* List> partition = Lists.partition(ids, 100);
CountDownLatch countDownLatch = new CountDownLatch(partition.size());
BlockingDeque results = new LinkedBlockingDeque<>(partition.size());*/
@@ -309,11 +338,16 @@ public class SIAccountBiz extends Service {
/* if (allSuccess) {*/
handleData(ids, param, employeeId, tenantKey, currentUserName);
/*}*/
- MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class).batchDelAccountTempDetails(ids, param.getBillMonth());
+ List> partition = Lists.partition((List) ids, 100);
+ partition.forEach(part -> {
+ MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class).batchDelByEmpIdsAndMonthAndPayOrg(part, param.getBillMonth(), param.getPaymentOrganization());
+ });
+
+ getSalaryAcctProgressService(user).finish(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), true);
} catch (Exception e) {
log.error("account run fail", e);
List list = Lists.newArrayList(getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization()));
- list = SiAccountEncrypt.decryptInsuranceAccountBatchList(list);
+ list = encryptUtil.decryptList(list, InsuranceAccountBatchPO.class);
if (CollectionUtils.isNotEmpty(list)) {
list.stream().forEach(f -> {
getInsuranceAccountBatchMapper().deleteById(f.getId());
@@ -323,6 +357,7 @@ public class SIAccountBiz extends Service {
//薪资核算进度暂未实现
//salaryAcctProgressService.del(tenantKey + param.getBillMonth(), employeeId, tenantKey);
//logger.error("welfare account error:{}", e.getMessage(), e);
+ getSalaryAcctProgressService(user).fail(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth(), e.getMessage());
}
}
@@ -364,10 +399,17 @@ public class SIAccountBiz extends Service {
count++;
if (count % 50 == 0 || count >= ids.size()) {
//salaryAcctProgressService.getAndAddCalculatedQty(tenantKey + billMonth, count >= ids.size() ? count % 50 : 50);
+ getSalaryAcctProgressService(user).getAndAddCalculatedQty(SalaryCacheKey.ACCT_PROGRESS + billMonth, count >= ids.size() ? count % 50 : 50);
}
}
+ //临时表入库前先对(可能存在的)历史数据进行删除
+ List> partition = Lists.partition((List) ids, 100);
+ partition.forEach(part -> {
+ MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class).batchDelByEmpIdsAndMonthAndPayOrg(part, billMonth, paymentOrganization);
+ });
+ //临时表数据入库
if (CollectionUtils.isNotEmpty(list)) {
- InsuranceAccountDetailTempPOEncrypt.encryptInsuranceAccountDetailTempPOList(list);
+ encryptUtil.encryptList(list, InsuranceAccountDetailTempPO.class);
List> lists = splitList(list, 40);
lists.forEach(subList -> {
MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class).batchSaveAccountTempDetails(subList);
@@ -404,15 +446,23 @@ public class SIAccountBiz extends Service {
String billMonth = param.getBillMonth();
try {
List list = MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class).getListByEmployeeIdsAndBillMonth(ids, billMonth, param.getPaymentOrganization());
- InsuranceAccountDetailTempPOEncrypt.decryptInsuranceAccountDetailTempPOList(list);
+ encryptUtil.decryptList(list, InsuranceAccountDetailTempPO.class);
Integer paymentStatus = 0;
log.info("核算明细临时表 hrsa_bill_detail_temp待处理数量:{}", list.size());
List> partitionIds = Lists.partition((List) ids, 100);
log.info("bill_detail入库前删除数据数量:{}", ids.size());
for (List part : partitionIds) {
getInsuranceAccountDetailMapper().batchDelAccountDetails(part, billMonth, param.getPaymentOrganization(), paymentStatus);
+
+ //删除账单月份+个税扣缴义务人+人员id下的调差数据
+ getInsuranceCompensationMapper().deleteByBillMonthPayOrgEmpIds(InsuranceCompensationPO.builder()
+ .billMonth(billMonth)
+ .paymentOrganization(param.getPaymentOrganization())
+ .employeeIds(part)
+ .build());
}
+ //生成bill_detail入库数据
List collect = list.stream().map(item -> {
InsuranceAccountDetailPO insuranceAccountDetailPO = new InsuranceAccountDetailPO();
BeanUtils.copyProperties(item, insuranceAccountDetailPO);
@@ -421,7 +471,7 @@ public class SIAccountBiz extends Service {
if (CollectionUtils.isNotEmpty(collect)) {
log.info("bill_detail入库数据数量:{}", collect.size());
batchSaveAccountInspectDetail(collect, billMonth, tenantKey);
- InsuranceAccountDetailPOEncrypt.encryptInsuranceAccountDetailPOList(collect);
+ encryptUtil.encryptList(collect, InsuranceAccountDetailPO.class);
List> lists = splitDetailList(collect, 20);
lists.forEach(subList -> {
getInsuranceAccountDetailMapper().batchSaveAccountDetails(subList);
@@ -475,7 +525,7 @@ public class SIAccountBiz extends Service {
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), otherPO.getOtherStartTime(), otherPO.getOtherEndTime());
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null && inDataRange) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(otherPO.getOtherSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳其他的个人福利
Map otherPerson = detailPOS.stream()
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
@@ -566,7 +616,7 @@ public class SIAccountBiz extends Service {
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), fundPO.getFundStartTime(), fundPO.getFundEndTime());
if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null && inDataRange) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(fundPO.getFundSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳社保的个人福利
Map fundperson = detailPOS.stream()
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
@@ -657,7 +707,7 @@ public class SIAccountBiz extends Service {
Boolean inDataRange = SalaryDateUtil.monthInRange(insuranceAccountDetailPO.getBillMonth(), socialPO.getSocialStartTime(), socialPO.getSocialEndTime());
if ((NonPaymentEnum.YES.getValue().equals(socialPO.getNonPayment()) || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null && inDataRange) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(socialPO.getSocialSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳社保的个人福利
Map schemeperson = detailPOS.stream()
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && Objects.equals(item.getPaymentScope(), PaymentScopeEnum.SCOPE_PERSON.getValue()))
@@ -817,7 +867,7 @@ public class SIAccountBiz extends Service {
BigDecimal socialTemp = new BigDecimal("0");
BigDecimal fundTemp = new BigDecimal("0");
BigDecimal otherTemp = new BigDecimal("0");
- InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(v);
+ encryptUtil.decryptList(v, InsuranceAccountDetailPO.class);
boolean socialPersonFlag = false;
boolean fundPersonFlag = false;
boolean otherPersonFlag = false;
@@ -853,7 +903,7 @@ public class SIAccountBiz extends Service {
}
}
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, param.getPaymentOrganization());
- SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
+ encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
DataCollectionEmployee simpleEmployee = MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeById(employeeId);
insuranceAccountBatchPO.setAccountant(currentUserName);
@@ -864,7 +914,7 @@ public class SIAccountBiz extends Service {
insuranceAccountBatchPO.setFundPay(fundSum.toPlainString());
insuranceAccountBatchPO.setOtherNum(otherAccountPerson);
insuranceAccountBatchPO.setOtherPay(otherSum.toPlainString());
- SiAccountEncrypt.encryptInsuranceAccountBatch(insuranceAccountBatchPO);
+ encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO);
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
@@ -896,13 +946,16 @@ public class SIAccountBiz extends Service {
public void delete(AccountParam param, Long employeeId) {
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
- SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
+ encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
SalaryAssert.notNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
// if(param.getPaymentOrganization()==null){
// throw new SalaryRunTimeException("个税扣缴义务人为空");
// }
getInsuranceAccountBatchMapper().deleteById(insuranceAccountBatchPO.getId());
getInsuranceAccountDetailMapper().batchDeleteNotFile(param.getBillMonth(), param.getPaymentOrganization());
+
+ //删除账单月份+个税扣缴义务人下的调差数据
+ getInsuranceCompensationMapper().deleteByBillMonthAndPayOrg(param.getBillMonth(), param.getPaymentOrganization());
// LoggerContext insuranceSchemeContext = new LoggerContext();
// insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId()));
// insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth());
@@ -1051,7 +1104,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setOtherPaymentBaseString(otherPO.getOtherPaymentBaseString());
if ((Objects.equals(NonPaymentEnum.YES.getValue(), otherPO.getNonPayment()) || otherPO.getNonPayment() == null) && otherPO.getOtherSchemeId() != null) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(otherPO.getOtherSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳其他的个人福利
Map otherPerson = detailPOS.stream()
.filter(item -> Objects.equals(IsPaymentEnum.YES.getValue(), item.getIsPayment()) && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
@@ -1141,7 +1194,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setFundPaymentBaseString(fundPO.getFundPaymentBaseString());
if ((NonPaymentEnum.YES.getValue() == fundPO.getNonPayment() || fundPO.getNonPayment() == null) && fundPO.getFundSchemeId() != null) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(fundPO.getFundSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳社保的个人福利
Map fundperson = detailPOS.stream()
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
@@ -1229,7 +1282,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
if ((NonPaymentEnum.YES.getValue() == socialPO.getNonPayment() || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(socialPO.getSocialSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳社保的个人福利
Map schemeperson = detailPOS.stream()
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
@@ -1317,7 +1370,7 @@ public class SIAccountBiz extends Service {
insuranceAccountDetailPO.setSocialPaymentBaseString(socialPO.getSocialPaymentBaseString());
if ((NonPaymentEnum.YES.getValue() == socialPO.getNonPayment() || socialPO.getNonPayment() == null) && socialPO.getSocialSchemeId() != null) {
List detailPOS = MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class).queryListBySchemeId(socialPO.getSocialSchemeId());
- InsuranceSchemeDetailPOEncrypt.decryptList(detailPOS);
+ encryptUtil.decryptList(detailPOS, InsuranceSchemeDetailPO.class);
//方案中包含的需要缴纳社保的个人福利
Map schemeperson = detailPOS.stream()
.filter(item -> IsPaymentEnum.YES.getValue() == item.getIsPayment() && item.getPaymentScope() == PaymentScopeEnum.SCOPE_PERSON.getValue())
@@ -1417,7 +1470,7 @@ public class SIAccountBiz extends Service {
}
batchSaveAccountInspectDetail(pos, billMonth, tenantKey);
getInsuranceAccountDetailMapper().batchDelSupplementAccountDetails(pos);
- InsuranceAccountDetailPOEncrypt.encryptInsuranceAccountDetailPOList(pos);
+ encryptUtil.encryptList(pos, InsuranceAccountDetailPO.class);
List> lists = splitDetailList(pos, 20);
lists.forEach(subList -> {
getInsuranceAccountDetailMapper().batchSaveAccountDetails(subList);
@@ -1495,11 +1548,11 @@ public class SIAccountBiz extends Service {
// SalaryAssert.isEmpty(insuranceAccountInspectPOS, SalaryI18nUtil.getI18nLabel( 100500, "当前核算月存在核算异常数据"));
//开始归档数据
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillStatus(billMonth, BillStatusEnum.NOT_ARCHIVED.getValue(), paymentOrganization);
- SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO);
+ encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
SalaryAssert.notNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(100503, "月份账单不存在"));
- SalaryAssert.isFalse(insuranceAccountBatchPO.getBillStatus() == BillStatusEnum.ARCHIVED.getValue(), SalaryI18nUtil.getI18nLabel(100504, "月份账单已归档"));
+ SalaryAssert.isFalse(Objects.equals(insuranceAccountBatchPO.getBillStatus(), BillStatusEnum.ARCHIVED.getValue()), SalaryI18nUtil.getI18nLabel(100504, "月份账单已归档"));
insuranceAccountBatchPO.setBillStatus(BillStatusEnum.ARCHIVED.getValue());
- SiAccountEncrypt.encryptInsuranceAccountBatch(insuranceAccountBatchPO);
+ encryptUtil.encrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class);
getInsuranceAccountBatchMapper().updateById(insuranceAccountBatchPO);
//日志记录
// LoggerContext insuranceSchemeContext = new LoggerContext();
@@ -1560,7 +1613,7 @@ public class SIAccountBiz extends Service {
// SalaryPageUtil.start(queryParam.getCurrent(),queryParam.getPageSize());
List insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(queryParam.getBillMonth(), StringUtil.isBlank(queryParam.getPaymentOrganization()) ? null : Long.valueOf(queryParam.getPaymentOrganization()));
- InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
+ encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
//获取扣缴义务人信息
List paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java
index dc4529180..e8a5dc5eb 100644
--- a/src/com/engine/salary/biz/SIArchivesBiz.java
+++ b/src/com/engine/salary/biz/SIArchivesBiz.java
@@ -14,10 +14,7 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.AESEncryptUtil;
-import com.engine.salary.encrypt.siarchives.InsuranceArchivesFundSchemePOEncrypt;
-import com.engine.salary.encrypt.siarchives.InsuranceArchivesOtherSchemePOEncrypt;
-import com.engine.salary.encrypt.siarchives.InsuranceArchivesSocialSchemePOEncrypt;
-import com.engine.salary.encrypt.sischeme.InsuranceSchemeDetailPOEncrypt;
+import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseDTO;
@@ -81,6 +78,8 @@ public class SIArchivesBiz {
Boolean needAuth;
Collection taxAgentPOS;
+ private EncryptUtil encryptUtil = new EncryptUtil();
+
private TaxAgentMapper getTaxAgentMapper() {
return MapperProxyFactory.getProxy(TaxAgentMapper.class);
}
@@ -378,7 +377,7 @@ public class SIArchivesBiz {
try {
InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class);
List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListByPrimaryIdIsPayment(schemeId, IsPaymentEnum.YES.getValue(), welfareType);
- InsuranceSchemeDetailPOEncrypt.decryptList(insuranceSchemeDetailPOS);
+ encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
return insuranceSchemeDetailPOS;
} finally {
sqlSession.close();
@@ -417,7 +416,7 @@ public class SIArchivesBiz {
.employeeId(employeeId)
.paymentOrganization(paymentOrganization)
.build());
- InsuranceArchivesOtherSchemePOEncrypt.decryptList(otherList);
+ encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class);
InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null;
InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId);
if (insuranceArchivesOtherSchemePO == null) {
@@ -448,7 +447,7 @@ public class SIArchivesBiz {
.employeeId(employeeId)
.paymentOrganization(paymentOrganization)
.build());
- InsuranceArchivesFundSchemePOEncrypt.decryptList(fundList);
+ encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class);
InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null;
InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId);
if (insuranceArchivesFundSchemePO == null) {
@@ -494,7 +493,7 @@ public class SIArchivesBiz {
.employeeId(employeeId)
.paymentOrganization(paymentOrganization)
.build());
- InsuranceArchivesSocialSchemePOEncrypt.decryptList(socialList);
+ encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class);
return socialList.size() != 0 ? socialList.get(0) : null;
} finally {
sqlSession.close();
@@ -670,7 +669,7 @@ public class SIArchivesBiz {
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString())) {
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
}
- InsuranceArchivesOtherSchemePOEncrypt.encryptItem(updateOtherInfo);
+ encryptUtil.encrypt(updateOtherInfo, InsuranceArchivesOtherSchemePO.class);
otherSchemeMapper.updateById(updateOtherInfo);
sqlSession.commit();
} else {
@@ -722,7 +721,7 @@ public class SIArchivesBiz {
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString())) {
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
}
- InsuranceArchivesFundSchemePOEncrypt.encryptItem(updateFundInfo);
+ encryptUtil.encrypt(updateFundInfo, InsuranceArchivesFundSchemePO.class);
fundSchemeMapper.updateById(updateFundInfo);
sqlSession.commit();
@@ -783,7 +782,7 @@ public class SIArchivesBiz {
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString())) {
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
}
- InsuranceArchivesSocialSchemePOEncrypt.encryptItem(updateSocialInfo);
+ encryptUtil.encrypt(updateSocialInfo, InsuranceArchivesSocialSchemePO.class);
socialSchemeMapper.updateById(updateSocialInfo);
sqlSession.commit();
@@ -837,7 +836,7 @@ public class SIArchivesBiz {
if (isPaymentList.size() > 0) {
InsuranceSchemeDetailPO insuranceSchemeDetailPO = isPaymentList.get(0);
- InsuranceSchemeDetailPOEncrypt.decryptItem(insuranceSchemeDetailPO);
+ encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class);
String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit();
String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
@@ -884,6 +883,11 @@ public class SIArchivesBiz {
request.setDepartmentIds(Arrays.stream(param.getDepartmentIdsStr().split(",")).map(BigDecimal::new).collect(Collectors.toList()));
}
+ if (StringUtils.isNotBlank(param.getSubcompanyIdsStr())) {
+ request.setSubcompanyIds(Arrays.stream(param.getSubcompanyIdsStr().split(",")).map(BigDecimal::new).collect(Collectors.toList()));
+ }
+
+
if (StringUtils.isNotBlank(param.getPositionsStr())) {
request.setPositions(Arrays.stream(param.getPositionsStr().split(",")).map(BigDecimal::new).collect(Collectors.toList()));
}
@@ -962,14 +966,13 @@ public class SIArchivesBiz {
pageInfo.setTotal(page.size());
pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page));
} else {
- SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
-// List page = socialSchemeMapper.listPageEmployeePOS(param);
log.info("从数据库获取档案列表数据开始");
sw.start("获取档案列表数据");
page = socialSchemeMapper.queryEmployeeList(param);
sw.stop();
log.info("从数据库获取档案列表数据完成!");
- pageInfo = new PageInfo<>(page, InsuranceArchivesEmployeePO.class);
+ pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
+ page, InsuranceArchivesEmployeePO.class);
}
List