feat: 加密统一,社保福利档案&薪资核算结果

This commit is contained in:
fcli 2022-12-12 17:56:26 +08:00
parent 1431308cc5
commit eabc983100
9 changed files with 61 additions and 37 deletions

View File

@ -9,7 +9,6 @@ import com.engine.salary.cache.SalaryCacheKey;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.AESEncryptUtil;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailTempPOEncrypt;
import com.engine.salary.encrypt.sischeme.InsuranceSchemeDetailPOEncrypt;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@ -146,8 +145,8 @@ public class SIAccountBiz extends Service {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
encryptUtil.decryptList(pageInfo.getList(), InsuranceAccountDetailPO.class);
return pageInfo;
}
@ -474,7 +473,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<List<InsuranceAccountDetailPO>> lists = splitDetailList(collect, 20);
lists.forEach(subList -> {
getInsuranceAccountDetailMapper().batchSaveAccountDetails(subList);
@ -870,7 +869,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;
@ -1473,7 +1472,7 @@ public class SIAccountBiz extends Service {
}
batchSaveAccountInspectDetail(pos, billMonth, tenantKey);
getInsuranceAccountDetailMapper().batchDelSupplementAccountDetails(pos);
InsuranceAccountDetailPOEncrypt.encryptInsuranceAccountDetailPOList(pos);
encryptUtil.encryptList(pos, InsuranceAccountDetailPO.class);
List<List<InsuranceAccountDetailPO>> lists = splitDetailList(pos, 20);
lists.forEach(subList -> {
getInsuranceAccountDetailMapper().batchSaveAccountDetails(subList);
@ -1616,7 +1615,7 @@ public class SIAccountBiz extends Service {
// SalaryPageUtil.start(queryParam.getCurrent(),queryParam.getPageSize());
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(queryParam.getBillMonth(), StringUtil.isBlank(queryParam.getPaymentOrganization()) ? null : Long.valueOf(queryParam.getPaymentOrganization()));
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
//获取扣缴义务人信息
List<TaxAgentPO> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();

View File

@ -7,6 +7,7 @@ import java.util.List;
public class SalaryAcctResultPOEncrypt {
@Deprecated
public static List<SalaryAcctResultPO> encryptList(List<SalaryAcctResultPO> list) {
if(list == null || list.size() == 0) {
return list;
@ -17,6 +18,7 @@ public class SalaryAcctResultPOEncrypt {
return list;
}
@Deprecated
public static List<SalaryAcctResultPO> decryptList(List<SalaryAcctResultPO> list) {
if(list == null || list.size() == 0) {
return list;
@ -27,6 +29,7 @@ public class SalaryAcctResultPOEncrypt {
return list;
}
@Deprecated
public static SalaryAcctResultPO encryptItem(SalaryAcctResultPO item) {
if(item == null) {
return item;
@ -35,6 +38,7 @@ public class SalaryAcctResultPOEncrypt {
return item;
}
@Deprecated
public static SalaryAcctResultPO decryptItem(SalaryAcctResultPO item) {
if(item == null) {
return item;

View File

@ -30,6 +30,7 @@ import java.util.List;
* other_sum
* total
*/
@Deprecated
public class InsuranceAccountDetailPOEncrypt {
public static List<InsuranceAccountDetailPO> encryptInsuranceAccountDetailPOList(List<InsuranceAccountDetailPO> list) {
if(list == null || list.size() == 0) {

View File

@ -1,6 +1,7 @@
package com.engine.salary.entity.siaccount.po;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.salary.annotation.Encrypt;
import com.engine.salary.annotation.SalaryTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -102,6 +103,7 @@ public class InsuranceAccountDetailPO {
/**
* 社保缴纳基数
*/
@Encrypt
private String socialPaymentBaseString;
/**
@ -112,6 +114,7 @@ public class InsuranceAccountDetailPO {
/**
* 公积金缴纳基数
*/
@Encrypt
private String fundPaymentBaseString;
/**
@ -122,51 +125,61 @@ public class InsuranceAccountDetailPO {
/**
* 其他福利缴纳基数
*/
@Encrypt
private String otherPaymentBaseString;
/**
* 社保个人缴费明细
*/
@Encrypt
private String socialPerJson;
/**
* 社保个人合计
*/
@Encrypt
private String socialPerSum;
/**
* 公积金个人缴费明细
*/
@Encrypt
private String fundPerJson;
/**
* 公积金个人合计
*/
@Encrypt
private String fundPerSum;
/**
* 其他福利个人缴费明细
*/
@Encrypt
private String otherPerJson;
/**
* 其他福利个人合计
*/
@Encrypt
private String otherPerSum;
/**
* 个人合计
*/
@Encrypt
private String perSum;
/**
* 社保单位缴费明细
*/
@Encrypt
private String socialComJson;
/**
* 社保单位合计
*/
@Encrypt
private String socialComSum;
/**
@ -192,26 +205,31 @@ public class InsuranceAccountDetailPO {
/**
* 单位合计
*/
@Encrypt
private String comSum;
/**
* 社保合计
*/
@Encrypt
private String socialSum;
/**
* 公积金合计
*/
@Encrypt
private String fundSum;
/**
* 其他福利合计
*/
@Encrypt
private String otherSum;
/**
* 合计
*/
@Encrypt
private String total;
/**

View File

@ -14,7 +14,6 @@ import com.engine.salary.component.SalaryWeaTable;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.encrypt.siaccount.ExcelInsuranceDetailPOEncrypt;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.siaccount.bo.InsuranceAccountBO;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO;
@ -316,7 +315,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
//数据组装
List<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
@ -382,7 +381,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
//数据组装
List<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
@ -933,7 +932,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
BigDecimal perSum = new BigDecimal("0");
BigDecimal comSum = new BigDecimal("0");
for (InsuranceAccountDetailPO item : v) {
InsuranceAccountDetailPOEncrypt.decryptItem(item);
encryptUtil.decrypt(item, InsuranceAccountDetailPO.class);
insuranceAccountDetailPO.setId(item.getId());
BigDecimal socialPerSum = StringUtils.isBlank(item.getSocialPerSum()) ? new BigDecimal("0") : new BigDecimal(item.getSocialPerSum());
BigDecimal socialComSum = StringUtils.isBlank(item.getSocialComSum()) ? new BigDecimal("0") : new BigDecimal(item.getSocialComSum());
@ -1314,7 +1313,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
excelComments.add(errorMessageMap);
} else {
//拼装待更新数据
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
updateInsuranceAccountDetailList.add(handleInsuranceAccountDetail(list.get(0), map));
}
@ -1329,7 +1328,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
//将待更新列表加密
InsuranceAccountDetailPOEncrypt.encryptInsuranceAccountDetailPOList(updateInsuranceAccountDetailList);
encryptUtil.encryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class);
//更新
for(InsuranceAccountDetailPO po : updateInsuranceAccountDetailList) {
getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po);
@ -2240,7 +2239,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
if (insuranceAccountDetailPO == null) {
throw new SalaryRunTimeException("该条核算数据不存在!");
}
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
String socialPerJson = insuranceAccountDetailPO.getSocialPerJson();
String socialComJson = insuranceAccountDetailPO.getSocialComJson();
String fundPerJson = insuranceAccountDetailPO.getFundPerJson();
@ -2336,14 +2335,14 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
if (insuranceAccountDetailPO == null) {
throw new SalaryRunTimeException("该条核算数据不存在!");
}
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
accountSocialByData(insuranceAccountDetailPO, param);
accountFundByData(insuranceAccountDetailPO, param);
accountOtherByData(insuranceAccountDetailPO, param);
account(insuranceAccountDetailPO);
InsuranceAccountDetailPOEncrypt.encryptItem(insuranceAccountDetailPO);
encryptUtil.encrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
getInsuranceAccountDetailMapper().updateById(insuranceAccountDetailPO);
//刷新_bill_batch表中的统计信息

View File

@ -7,7 +7,7 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.hrm.dto.HrmInfoDTO;
import com.engine.salary.entity.hrm.param.HrmQueryParam;
@ -17,7 +17,6 @@ import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import com.engine.salary.entity.siaccount.po.InsuranceCompensationConfigPO;
import com.engine.salary.entity.siaccount.po.InsuranceCompensationPO;
import com.engine.salary.entity.sicategory.po.ICategoryPO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
@ -35,8 +34,6 @@ import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.Column;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.google.common.collect.Lists;
import dm.jdbc.util.IdGenerator;
import org.springframework.beans.BeanUtils;
@ -53,6 +50,7 @@ import java.util.stream.Collectors;
* @Date: 2022/11/23
**/
public class SICompensationServiceImpl extends Service implements SICompensationService {
private EncryptUtil encryptUtil = new EncryptUtil();
private InsuranceAccountDetailMapper getInsuranceAccountDetailMapper() {
return MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class);
@ -157,7 +155,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
if (insuranceAccountDetailPO == null) {
return Lists.newArrayList();
}
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
List<Map<String, String>> result = new ArrayList<>();
String socialComJson = insuranceAccountDetailPO.getSocialComJson();
if (StringUtils.isNotBlank(socialComJson)) {
@ -195,7 +193,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
temp.put("error", SalaryI18nUtil.getI18nLabel(121038, "当前月在该缴纳组织下没有核算记录"));
temp.put("totalNum", "0");
} else {
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
//判断是否已有调差数据个税扣缴义务人+账单月份+人员id
InsuranceCompensationPO nowCompensation = getInsuranceCompensationMapper().getOneByBillMonthPayOrgEmpId(InsuranceCompensationPO.builder()
.billMonth(insuranceAccountDetailPO.getBillMonth())
@ -295,7 +293,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
continue;
}
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
if (StringUtils.isNotBlank(insuranceAccountDetailPO.getSocialComJson())) {
Map<String, String> socialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap<String, String>().getClass());
for (Map.Entry<String, String> entry : socialJson.entrySet()) {
@ -325,7 +323,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
totalSum = totalSum.add(adjustmentTo);
insuranceAccountDetailPO.setTotal(totalSum.toPlainString());
//更新社保调差后的明细
InsuranceAccountDetailPOEncrypt.encryptItem(insuranceAccountDetailPO);
encryptUtil.encrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
getInsuranceAccountDetailMapper().updateById(insuranceAccountDetailPO);
//新建调差记录
InsuranceCompensationPO insuranceCompensationPO = new InsuranceCompensationPO();
@ -410,7 +408,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
.build());
SalaryAssert.notNull(insuranceAccountDetailPO, SalaryI18nUtil.getI18nLabel(121108, "补差对象不存在"));
InsuranceAccountDetailPOEncrypt.decryptItem(insuranceAccountDetailPO);
encryptUtil.decrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
if (StringUtils.isNotBlank(insuranceAccountDetailPO.getSocialComJson())) {
Map<String, String> socialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap<String, String>().getClass());
for (Map.Entry<String, String> entry : socialJson.entrySet()) {
@ -440,7 +438,7 @@ public class SICompensationServiceImpl extends Service implements SICompensation
totalSum = totalSum.subtract(adjustmentTo);
insuranceAccountDetailPO.setTotal(totalSum.toPlainString());
//更新社保调差后的明细
InsuranceAccountDetailPOEncrypt.encryptItem(insuranceAccountDetailPO);
encryptUtil.encrypt(insuranceAccountDetailPO, InsuranceAccountDetailPO.class);
getInsuranceAccountDetailMapper().updateById(insuranceAccountDetailPO);
//删除调差记录
getInsuranceCompensationMapper().deleteById(param.getId());

View File

@ -5,7 +5,7 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.SIAccountBiz;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.encrypt.siexport.AccountExportPOEncrypt;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
@ -21,7 +21,6 @@ import com.engine.salary.enums.siaccount.ResourceFromEnum;
import com.engine.salary.enums.sicategory.DataTypeEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import com.engine.salary.mapper.InsuranceExportMapper;
import com.engine.salary.mapper.SysTaxRateDetailMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
@ -60,6 +59,8 @@ public class SIExportServiceImpl extends Service implements SIExportService {
BaseBean bs = new BaseBean();
private EncryptUtil encryptUtil = new EncryptUtil();
private SIAccountBiz siAccountBiz = new SIAccountBiz();
private SISchemeService getSISchemeService(User user) {
@ -93,7 +94,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
@Override
public XSSFWorkbook exportOverView(InsuranceExportParam queryParam) {
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(queryParam.getBillMonth(), StringUtils.isBlank(queryParam.getPaymentOrganization()) ? null : Long.valueOf(queryParam.getPaymentOrganization()));
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
//获取扣缴义务人信息
List<TaxAgentPO> paymentList =getTaxAgentMapper().listAll();

View File

@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.hrm.dto.HrmInfoDTO;
import com.engine.salary.entity.hrm.param.HrmQueryParam;
import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam;
@ -16,22 +16,22 @@ import com.engine.salary.enums.siaccount.BillStatusEnum;
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
import com.engine.salary.enums.siaccount.ProjectTypeEnum;
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
import com.engine.salary.service.SIAccountService;
import com.engine.salary.service.SIRecessionService;
import com.engine.salary.service.TaxAgentService;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.SalaryAssert;
import org.apache.commons.lang3.StringUtils;
import weaver.hrm.User;
import java.math.BigDecimal;
@ -45,6 +45,8 @@ import java.util.stream.Collectors;
**/
public class SIRecessionServiceImpl extends Service implements SIRecessionService {
private EncryptUtil encryptUtil = new EncryptUtil();
private InsuranceAccountDetailMapper getInsuranceAccountDetailMapper() {
return SqlProxyHandle.getProxy(InsuranceAccountDetailMapper.class);
}
@ -92,7 +94,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
);
});
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(detailPOS);
encryptUtil.decryptList(detailPOS, InsuranceAccountDetailPO.class);
//处理数据
List<InsuranceAccountDetailPO> finalDetailPOS = detailPOS;
List<InsuranceAccountDetailPO> finalRecessionDetails = new ArrayList<>();
@ -106,7 +108,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic
});
//退差数据入库
if (CollectionUtils.isNotEmpty(finalRecessionDetails)) {
InsuranceAccountDetailPOEncrypt.encryptInsuranceAccountDetailPOList(finalRecessionDetails);
encryptUtil.encryptList(finalRecessionDetails, InsuranceAccountDetailPO.class);
//删除已有退差记录
finalRecessionDetails.forEach(getInsuranceAccountDetailMapper()::deleteRecessionData);

View File

@ -1,7 +1,7 @@
package com.engine.salary.service.impl;
import com.engine.core.impl.Service;
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.siaccount.param.QueryAccountDetailParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import com.engine.salary.mapper.siaccount.SIAccountDetailMapper;
@ -15,6 +15,8 @@ import java.util.List;
public class SIReportServiceImpl extends Service implements SIReportService {
private EncryptUtil encryptUtil = new EncryptUtil();
private SIAccountDetailMapper getSIAccountDetailMapper(){
return MapperProxyFactory.getProxy(SIAccountDetailMapper.class);
}
@ -25,7 +27,7 @@ public class SIReportServiceImpl extends Service implements SIReportService {
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = getSIAccountDetailMapper().listSome(param);
PageInfo<InsuranceAccountDetailPO> page = new PageInfo<>(insuranceAccountDetailPOS ,InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> list = page.getList();
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
page.setList(list);
return page;
}