From eabc983100fc8fb861f9527f9326ea78478f48ed Mon Sep 17 00:00:00 2001 From: fcli Date: Mon, 12 Dec 2022 17:56:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A0=E5=AF=86=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=EF=BC=8C=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88?= =?UTF-8?q?&=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 11 +++++------ .../salaryacct/SalaryAcctResultPOEncrypt.java | 4 ++++ .../InsuranceAccountDetailPOEncrypt.java | 1 + .../siaccount/po/InsuranceAccountDetailPO.java | 18 ++++++++++++++++++ .../service/impl/SIAccountServiceImpl.java | 17 ++++++++--------- .../impl/SICompensationServiceImpl.java | 18 ++++++++---------- .../service/impl/SIExportServiceImpl.java | 7 ++++--- .../service/impl/SIRecessionServiceImpl.java | 16 +++++++++------- .../service/impl/SIReportServiceImpl.java | 6 ++++-- 9 files changed, 61 insertions(+), 37 deletions(-) diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index ce9099800..100097823 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -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 list = getInsuranceAccountDetailMapper().list(queryParam); - InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list); PageInfo 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> 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> 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 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/encrypt/salaryacct/SalaryAcctResultPOEncrypt.java b/src/com/engine/salary/encrypt/salaryacct/SalaryAcctResultPOEncrypt.java index ecdb969a5..4150e15bf 100644 --- a/src/com/engine/salary/encrypt/salaryacct/SalaryAcctResultPOEncrypt.java +++ b/src/com/engine/salary/encrypt/salaryacct/SalaryAcctResultPOEncrypt.java @@ -7,6 +7,7 @@ import java.util.List; public class SalaryAcctResultPOEncrypt { + @Deprecated public static List encryptList(List list) { if(list == null || list.size() == 0) { return list; @@ -17,6 +18,7 @@ public class SalaryAcctResultPOEncrypt { return list; } + @Deprecated public static List decryptList(List 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; diff --git a/src/com/engine/salary/encrypt/siaccount/InsuranceAccountDetailPOEncrypt.java b/src/com/engine/salary/encrypt/siaccount/InsuranceAccountDetailPOEncrypt.java index 841140839..73153f629 100644 --- a/src/com/engine/salary/encrypt/siaccount/InsuranceAccountDetailPOEncrypt.java +++ b/src/com/engine/salary/encrypt/siaccount/InsuranceAccountDetailPOEncrypt.java @@ -30,6 +30,7 @@ import java.util.List; * other_sum * total */ +@Deprecated public class InsuranceAccountDetailPOEncrypt { public static List encryptInsuranceAccountDetailPOList(List list) { if(list == null || list.size() == 0) { diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java index 5caeaff88..e8f7ce98f 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java @@ -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; /** diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index b042f5c57..73a03981b 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -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 list = getInsuranceAccountDetailMapper().list(queryParam); PageInfo pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class); List insuranceAccountDetailPOS = pageInfo.getList(); - InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS); + encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class); //数据组装 List> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId); PageInfo> pageInfos = new PageInfo<>(records); @@ -382,7 +381,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List list = getInsuranceAccountDetailMapper().list(queryParam); PageInfo pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class); List insuranceAccountDetailPOS = pageInfo.getList(); - InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS); + encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class); //数据组装 List> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId); PageInfo> 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表中的统计信息 diff --git a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java index 18171a378..d3a3c4a36 100644 --- a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java @@ -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> 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 socialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap().getClass()); for (Map.Entry 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 socialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap().getClass()); for (Map.Entry 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()); diff --git a/src/com/engine/salary/service/impl/SIExportServiceImpl.java b/src/com/engine/salary/service/impl/SIExportServiceImpl.java index 504a69e8e..825f10af9 100644 --- a/src/com/engine/salary/service/impl/SIExportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIExportServiceImpl.java @@ -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 insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(queryParam.getBillMonth(), StringUtils.isBlank(queryParam.getPaymentOrganization()) ? null : Long.valueOf(queryParam.getPaymentOrganization())); - InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS); + encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class); //获取扣缴义务人信息 List paymentList =getTaxAgentMapper().listAll(); diff --git a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java index fae20634b..3a6476889 100644 --- a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java @@ -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 finalDetailPOS = detailPOS; List 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); diff --git a/src/com/engine/salary/service/impl/SIReportServiceImpl.java b/src/com/engine/salary/service/impl/SIReportServiceImpl.java index a89e68f27..5be314a3a 100644 --- a/src/com/engine/salary/service/impl/SIReportServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIReportServiceImpl.java @@ -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 insuranceAccountDetailPOS = getSIAccountDetailMapper().listSome(param); PageInfo page = new PageInfo<>(insuranceAccountDetailPOS ,InsuranceAccountDetailPO.class); List list = page.getList(); - InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list); + encryptUtil.decryptList(list, InsuranceAccountDetailPO.class); page.setList(list); return page; }