薪酬系统-福利台账,线下对比excel数据在入库前进行部分字段加密处理
This commit is contained in:
parent
78ce712116
commit
1a60f36778
|
|
@ -0,0 +1,111 @@
|
|||
package com.engine.salary.encrypt.siaccount;
|
||||
|
||||
import com.engine.salary.encrypt.AESEncryptUtil;
|
||||
import com.engine.salary.entity.siaccount.po.ExcelInsuranceDetailPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* hrsa_excel_bill_detail: 加解密
|
||||
* 字段:
|
||||
* social_payment_base_string
|
||||
* fund_payment_base_string
|
||||
* other_payment_base_string
|
||||
* social_per_json
|
||||
* social_per_sum
|
||||
* fund_per_json
|
||||
* fund_per_sum
|
||||
* other_per_json
|
||||
* other_per_sum
|
||||
* per_sum
|
||||
* social_com_json
|
||||
* social_com_sum
|
||||
* fund_com_json
|
||||
* fund_com_sum
|
||||
* other_com_json
|
||||
* other_com_sum
|
||||
* com_sum
|
||||
* social_sum
|
||||
* fund_sum
|
||||
* other_sum
|
||||
* total
|
||||
*/
|
||||
public class ExcelInsuranceDetailPOEncrypt {
|
||||
public static List<ExcelInsuranceDetailPO> encryptInsuranceAccountDetailPOList(List<ExcelInsuranceDetailPO> list) {
|
||||
if(list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
list.forEach(item -> {
|
||||
item.setSocialPaymentBaseString(AESEncryptUtil.encrypt(item.getSocialPaymentBaseString()));
|
||||
item.setFundPaymentBaseString(AESEncryptUtil.encrypt(item.getFundPaymentBaseString()));
|
||||
item.setOtherPaymentBaseString(AESEncryptUtil.encrypt(item.getOtherPaymentBaseString()));
|
||||
item.setSocialPerJson(AESEncryptUtil.encrypt(item.getSocialPerJson()));
|
||||
item.setSocialPerSum(AESEncryptUtil.encrypt(item.getSocialPerSum()));
|
||||
item.setFundPerJson(AESEncryptUtil.encrypt(item.getFundPerJson()));
|
||||
item.setFundPerSum(AESEncryptUtil.encrypt(item.getFundPerSum()));
|
||||
item.setOtherPerJson(AESEncryptUtil.encrypt(item.getOtherPerJson()));
|
||||
item.setOtherPerSum(AESEncryptUtil.encrypt(item.getOtherPerSum()));
|
||||
item.setPerSum(AESEncryptUtil.encrypt(item.getPerSum()));
|
||||
item.setSocialComJson(AESEncryptUtil.encrypt(item.getSocialComJson()));
|
||||
item.setSocialComSum(AESEncryptUtil.encrypt(item.getSocialComSum()));
|
||||
item.setComSum(AESEncryptUtil.encrypt(item.getComSum()));
|
||||
item.setSocialSum(AESEncryptUtil.encrypt(item.getSocialSum()));
|
||||
item.setFundSum(AESEncryptUtil.encrypt(item.getFundSum()));
|
||||
item.setOtherSum(AESEncryptUtil.encrypt(item.getOtherSum()));
|
||||
item.setTotal(AESEncryptUtil.encrypt(item.getTotal()));
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ExcelInsuranceDetailPO> decryptInsuranceAccountDetailPOList(List<ExcelInsuranceDetailPO> list) {
|
||||
if(list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
list.forEach(item -> {
|
||||
item.setSocialPaymentBaseString(AESEncryptUtil.decrypt(item.getSocialPaymentBaseString()));
|
||||
item.setFundPaymentBaseString(AESEncryptUtil.decrypt(item.getFundPaymentBaseString()));
|
||||
item.setOtherPaymentBaseString(AESEncryptUtil.decrypt(item.getOtherPaymentBaseString()));
|
||||
item.setSocialPerJson(AESEncryptUtil.decrypt(item.getSocialPerJson()));
|
||||
item.setSocialPerSum(AESEncryptUtil.decrypt(item.getSocialPerSum()));
|
||||
item.setFundPerJson(AESEncryptUtil.decrypt(item.getFundPerJson()));
|
||||
item.setFundPerSum(AESEncryptUtil.decrypt(item.getFundPerSum()));
|
||||
item.setOtherPerJson(AESEncryptUtil.decrypt(item.getOtherPerJson()));
|
||||
item.setOtherPerSum(AESEncryptUtil.decrypt(item.getOtherPerSum()));
|
||||
item.setPerSum(AESEncryptUtil.decrypt(item.getPerSum()));
|
||||
item.setSocialComJson(AESEncryptUtil.decrypt(item.getSocialComJson()));
|
||||
item.setSocialComSum(AESEncryptUtil.decrypt(item.getSocialComSum()));
|
||||
item.setComSum(AESEncryptUtil.decrypt(item.getComSum()));
|
||||
item.setSocialSum(AESEncryptUtil.decrypt(item.getSocialSum()));
|
||||
item.setFundSum(AESEncryptUtil.decrypt(item.getFundSum()));
|
||||
item.setOtherSum(AESEncryptUtil.decrypt(item.getOtherSum()));
|
||||
item.setTotal(AESEncryptUtil.decrypt(item.getTotal()));
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
public static ExcelInsuranceDetailPO decryptItem(ExcelInsuranceDetailPO item) {
|
||||
if(item == null) {
|
||||
return item;
|
||||
}
|
||||
item.setSocialPaymentBaseString(AESEncryptUtil.decrypt(item.getSocialPaymentBaseString()));
|
||||
item.setFundPaymentBaseString(AESEncryptUtil.decrypt(item.getFundPaymentBaseString()));
|
||||
item.setOtherPaymentBaseString(AESEncryptUtil.decrypt(item.getOtherPaymentBaseString()));
|
||||
item.setSocialPerJson(AESEncryptUtil.decrypt(item.getSocialPerJson()));
|
||||
item.setSocialPerSum(AESEncryptUtil.decrypt(item.getSocialPerSum()));
|
||||
item.setFundPerJson(AESEncryptUtil.decrypt(item.getFundPerJson()));
|
||||
item.setFundPerSum(AESEncryptUtil.decrypt(item.getFundPerSum()));
|
||||
item.setOtherPerJson(AESEncryptUtil.decrypt(item.getOtherPerJson()));
|
||||
item.setOtherPerSum(AESEncryptUtil.decrypt(item.getOtherPerSum()));
|
||||
item.setPerSum(AESEncryptUtil.decrypt(item.getPerSum()));
|
||||
item.setSocialComJson(AESEncryptUtil.decrypt(item.getSocialComJson()));
|
||||
item.setSocialComSum(AESEncryptUtil.decrypt(item.getSocialComSum()));
|
||||
item.setComSum(AESEncryptUtil.decrypt(item.getComSum()));
|
||||
item.setSocialSum(AESEncryptUtil.decrypt(item.getSocialSum()));
|
||||
item.setFundSum(AESEncryptUtil.decrypt(item.getFundSum()));
|
||||
item.setOtherSum(AESEncryptUtil.decrypt(item.getOtherSum()));
|
||||
item.setTotal(AESEncryptUtil.decrypt(item.getTotal()));
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ 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.siaccount.ExcelInsuranceDetailPOEncrypt;
|
||||
import com.engine.salary.encrypt.siaccount.InsuranceAccountDetailPOEncrypt;
|
||||
import com.engine.salary.encrypt.siaccount.SiAccountEncrypt;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
|
|
@ -1809,7 +1810,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
|
||||
}
|
||||
//将待更新列表加密
|
||||
// InsuranceAccountDetailPOEncrypt.encryptInsuranceAccountDetailPOList(addCompareList);
|
||||
ExcelInsuranceDetailPOEncrypt.encryptInsuranceAccountDetailPOList(addCompareList);
|
||||
//删除
|
||||
if (idList.size() > 0) {
|
||||
getExcelInsuranceDetailMapper().batchDelByIds(idList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue