From 93db32b758b362c7edda1afcd61dbf0c15eeab37 Mon Sep 17 00:00:00 2001 From: fcli Date: Mon, 12 Dec 2022 15:40:01 +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=B4=AF=E8=AE=A1=E9=99=84=E5=8A=A0=E6=89=A3=E9=99=A4?= =?UTF-8?q?&=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/biz/AddUpDeductionBiz.java | 13 ++++----- src/com/engine/salary/biz/SIAccountBiz.java | 29 ++++++++++--------- .../encrypt/siaccount/SiAccountEncrypt.java | 4 +++ .../entity/datacollection/AddUpDeduction.java | 1 + .../dto/AddUpDeductionRecordDTO.java | 8 +++++ .../siaccount/po/InsuranceAccountBatchPO.java | 4 +++ .../service/impl/SIAccountServiceImpl.java | 18 +++++++----- 7 files changed, 47 insertions(+), 30 deletions(-) diff --git a/src/com/engine/salary/biz/AddUpDeductionBiz.java b/src/com/engine/salary/biz/AddUpDeductionBiz.java index 617cda617..75fc201f7 100644 --- a/src/com/engine/salary/biz/AddUpDeductionBiz.java +++ b/src/com/engine/salary/biz/AddUpDeductionBiz.java @@ -1,9 +1,6 @@ package com.engine.salary.biz; import com.engine.salary.encrypt.EncryptUtil; -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.entity.datacollection.AddUpDeduction; import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO; import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO; @@ -34,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(); @@ -70,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(); } @@ -87,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(); } @@ -106,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(); @@ -128,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(); diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 16828b51e..ce9099800 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -8,9 +8,9 @@ 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.EncryptUtil; 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.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO; @@ -77,6 +77,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); } @@ -121,7 +123,7 @@ public class SIAccountBiz extends Service { public PageInfo listPage(InsuranceAccountBatchParam queryParam) { SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); List list = getInsuranceAccountBatchMapper().list(queryParam); - list = SiAccountEncrypt.decryptInsuranceAccountBatchList(list); + list = encryptUtil.decryptList(list, InsuranceAccountBatchPO.class); PageInfo pageInfo = new PageInfo<>(list, InsuranceAccountBatchPO.class); return pageInfo; } @@ -152,10 +154,9 @@ public class SIAccountBiz extends Service { 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) @@ -169,7 +170,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())); @@ -185,7 +186,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()); @@ -206,7 +207,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()); @@ -349,7 +350,7 @@ public class SIAccountBiz extends Service { } 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()); @@ -905,7 +906,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); @@ -916,7 +917,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())); @@ -948,7 +949,7 @@ 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("个税扣缴义务人为空"); @@ -1550,11 +1551,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(); diff --git a/src/com/engine/salary/encrypt/siaccount/SiAccountEncrypt.java b/src/com/engine/salary/encrypt/siaccount/SiAccountEncrypt.java index 96bb1a9d7..14fdbee4e 100644 --- a/src/com/engine/salary/encrypt/siaccount/SiAccountEncrypt.java +++ b/src/com/engine/salary/encrypt/siaccount/SiAccountEncrypt.java @@ -13,6 +13,7 @@ import java.util.List; * fund_pay */ public class SiAccountEncrypt { + @Deprecated public static List encryptInsuranceAccountBatchList(List list) { list.forEach(item -> { item.setOtherPay(AESEncryptUtil.encrypt(item.getOtherPay())); @@ -22,6 +23,7 @@ public class SiAccountEncrypt { return list; } + @Deprecated public static List decryptInsuranceAccountBatchList(List list) { if(list == null || list.size() == 0) { return list; @@ -34,6 +36,7 @@ public class SiAccountEncrypt { return list; } + @Deprecated public static InsuranceAccountBatchPO encryptInsuranceAccountBatch(InsuranceAccountBatchPO item) { if(item == null) { return item; @@ -44,6 +47,7 @@ public class SiAccountEncrypt { return item; } + @Deprecated public static InsuranceAccountBatchPO decryptInsuranceAccountBatch(InsuranceAccountBatchPO item) { if(item == null) { return item; diff --git a/src/com/engine/salary/entity/datacollection/AddUpDeduction.java b/src/com/engine/salary/entity/datacollection/AddUpDeduction.java index 6e714885d..c462a4551 100644 --- a/src/com/engine/salary/entity/datacollection/AddUpDeduction.java +++ b/src/com/engine/salary/entity/datacollection/AddUpDeduction.java @@ -85,6 +85,7 @@ public class AddUpDeduction { * 累计婴幼儿照护 */ @SalaryFormulaVar(defaultLabel = "累计婴幼儿照护", labelId = 117732, dataType = "number") + @Encrypt private String addUpInfantCare; /** diff --git a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java index 4e30b12e2..b3cbbc0d7 100644 --- a/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java +++ b/src/com/engine/salary/entity/datacollection/dto/AddUpDeductionRecordDTO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.datacollection.dto; import com.cloudstore.eccom.pc.table.WeaTableType; +import com.engine.salary.annotation.Encrypt; import com.engine.salary.annotation.SalaryTable; import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.TableTitle; @@ -73,6 +74,7 @@ public class AddUpDeductionRecordDTO { @ExcelProperty(index = 5) @SalaryTableColumn(text = "累计子女教育", width = "10%", column = "addUpChildEducation") @TableTitle(title = "累计子女教育", dataIndex = "addUpChildEducation", key = "addUpChildEducation") + @Encrypt private String addUpChildEducation; /** @@ -81,6 +83,7 @@ public class AddUpDeductionRecordDTO { @ExcelProperty(index = 6) @SalaryTableColumn(text = "累计继续教育", width = "10%", column = "addUpContinuingEducation") @TableTitle(title = "累计继续教育", dataIndex = "addUpContinuingEducation", key = "addUpContinuingEducation") + @Encrypt private String addUpContinuingEducation; /** @@ -89,6 +92,7 @@ public class AddUpDeductionRecordDTO { @ExcelProperty(index = 7) @SalaryTableColumn(text = "累计住房贷款利息", width = "10%", column = "addUpHousingLoanInterest") @TableTitle(title = "累计住房贷款利息", dataIndex = "addUpHousingLoanInterest", key = "addUpHousingLoanInterest") + @Encrypt private String addUpHousingLoanInterest; /** @@ -97,6 +101,7 @@ public class AddUpDeductionRecordDTO { @ExcelProperty(index = 8) @SalaryTableColumn(text = "累计住房租金", width = "10%", column = "addUpHousingRent") @TableTitle(title = "累计住房租金", dataIndex = "addUpHousingRent", key = "addUpHousingRent") + @Encrypt private String addUpHousingRent; /** @@ -105,16 +110,19 @@ public class AddUpDeductionRecordDTO { @ExcelProperty(index = 9) @SalaryTableColumn(text = "累计赡养老人", width = "10%", column = "addUpSupportElderly") @TableTitle(title = "累计赡养老人", dataIndex = "addUpSupportElderly", key = "addUpSupportElderly") + @Encrypt private String addUpSupportElderly; @ExcelProperty(index = 10) @SalaryTableColumn(text = "累计大病医疗", width = "10%", column = "addUpIllnessMedical") @TableTitle(title = "累计大病医疗", dataIndex = "addUpIllnessMedical", key = "addUpIllnessMedical") + @Encrypt private String addUpIllnessMedical; @ExcelProperty(index = 11) @SalaryTableColumn(text = "累计婴幼儿照护", width = "10%", column = "addUpInfantCare") @TableTitle(title = "累计婴幼儿照护", dataIndex = "addUpInfantCare", key = "addUpInfantCare") + @Encrypt private String addUpInfantCare; } diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java index eef9f7627..b3296596e 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.siaccount.po; +import com.engine.salary.annotation.Encrypt; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -54,16 +55,19 @@ public class InsuranceAccountBatchPO { /** * 社保缴费总额(单位+个人) */ + @Encrypt private String socialPay; /** * 公积金缴费总额(单位+个人) */ + @Encrypt private String fundPay; /** * 其他福利缴费总额(单位+个人) */ + @Encrypt private String otherPay; /** diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index b59e86774..b042f5c57 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -12,9 +12,9 @@ import com.engine.core.impl.Service; import com.engine.salary.biz.*; 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.encrypt.siaccount.SiAccountEncrypt; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.siaccount.bo.InsuranceAccountBO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO; @@ -95,6 +95,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); + private EncryptUtil encryptUtil = new EncryptUtil(); + public RecordsBuildService getService(User user) { return ServiceUtil.getService(RecordsBuildServiceImpl.class, user); } @@ -422,7 +424,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { datePickerItem.getOtherParams().put("maxDate", maxDate); List billMonthList = getInsuranceAccountBatchMapper().listByTimeRange(minDate, maxDate); - SiAccountEncrypt.decryptInsuranceAccountBatchList(billMonthList); + encryptUtil.decryptList(billMonthList, InsuranceAccountBatchPO.class); if (CollectionUtils.isEmpty(billMonthList)) { datePickerItem.getOtherParams().put("disabledData", Collections.emptyList()); } else { @@ -541,7 +543,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { public InsuranceAccountTabDTO tabList(AccountParam build) { InsuranceAccountTabDTO insuranceAccountTabDTO = InsuranceAccountTabDTO.builder().build(); InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(build.getBillMonth(), build.getPaymentOrganization()); - insuranceAccountBatchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO); + insuranceAccountBatchPO = encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); boolean isShow = false; if (insuranceAccountBatchPO == null || insuranceAccountBatchPO.getBillStatus() == BillStatusEnum.NOT_ARCHIVED.getValue()) { isShow = true; @@ -772,7 +774,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { @Override public List> welfareData(String billMonth, List employeeIds, Long taxAgentId) { InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, taxAgentId); - insuranceAccountBatchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(insuranceAccountBatchPO); + insuranceAccountBatchPO = encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); if (insuranceAccountBatchPO == null || Objects.equals(BillStatusEnum.NOT_ARCHIVED.getValue(), insuranceAccountBatchPO.getBillStatus())) { return Lists.newArrayList(); } @@ -1349,7 +1351,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List viewListDTOList = pageInfos.getList(); viewListDTOList.stream().filter(f -> f.getPayOrg().equals(taxAgentPo.getName())).collect(Collectors.toList()); InsuranceAccountBatchPO batchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization); - batchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(batchPO); + batchPO = encryptUtil.decrypt(batchPO, InsuranceAccountBatchPO.class); //更新 if (viewListDTOList.size() > 0 && batchPO != null) { InsuranceAccountViewListDTO viewListDTO = viewListDTOList.get(0); @@ -1362,7 +1364,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { batchPO.setOtherPay(viewListDTO.getOtherPaySum().replace(",", "")); batchPO.setUpdateTime(new Date()); - batchPO = SiAccountEncrypt.encryptInsuranceAccountBatch(batchPO); + batchPO = encryptUtil.encrypt(batchPO, InsuranceAccountBatchPO.class); getInsuranceAccountBatchMapper().updateById(batchPO); } } @@ -2207,7 +2209,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List viewListDTOList = pageInfos.getList(); viewListDTOList.stream().filter(f -> f.getPayOrg().equals(taxAgentPo.getName())).collect(Collectors.toList()); InsuranceAccountBatchPO batchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization); - batchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(batchPO); + batchPO = encryptUtil.decrypt(batchPO, InsuranceAccountBatchPO.class); //更新 if (viewListDTOList.size() > 0 && batchPO != null) { InsuranceAccountViewListDTO viewListDTO = viewListDTOList.get(0); @@ -2220,7 +2222,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { batchPO.setOtherPay(viewListDTO.getOtherPaySum().replace(",", "")); batchPO.setUpdateTime(new Date()); - batchPO = SiAccountEncrypt.encryptInsuranceAccountBatch(batchPO); + batchPO = encryptUtil.encrypt(batchPO, InsuranceAccountBatchPO.class); getInsuranceAccountBatchMapper().updateById(batchPO); } }