48 lines
1.8 KiB
Java
48 lines
1.8 KiB
Java
|
|
package com.engine.salary.encrypt.siaccount;
|
||
|
|
|
||
|
|
import com.engine.salary.encrypt.AESEncryptUtil;
|
||
|
|
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* hrsa_bill_batch 加解密
|
||
|
|
* 字段:
|
||
|
|
* other_pay
|
||
|
|
* social_pay
|
||
|
|
* fund_pay
|
||
|
|
*/
|
||
|
|
public class SiAccountEncrypt {
|
||
|
|
public static List<InsuranceAccountBatchPO> encryptInsuranceAccountBatchList(List<InsuranceAccountBatchPO> list) {
|
||
|
|
list.forEach(item -> {
|
||
|
|
item.setOtherPay(AESEncryptUtil.encrypt(item.getOtherPay()));
|
||
|
|
item.setSocialPay(AESEncryptUtil.encrypt(item.getSocialPay()));
|
||
|
|
item.setFundPay(AESEncryptUtil.encrypt(item.getFundPay()));
|
||
|
|
});
|
||
|
|
return list;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static List<InsuranceAccountBatchPO> decryptInsuranceAccountBatchList(List<InsuranceAccountBatchPO> list) {
|
||
|
|
list.forEach(item -> {
|
||
|
|
item.setOtherPay(AESEncryptUtil.decrypt(item.getOtherPay()));
|
||
|
|
item.setSocialPay(AESEncryptUtil.decrypt(item.getSocialPay()));
|
||
|
|
item.setFundPay(AESEncryptUtil.decrypt(item.getFundPay()));
|
||
|
|
});
|
||
|
|
return list;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static InsuranceAccountBatchPO encryptInsuranceAccountBatch(InsuranceAccountBatchPO item) {
|
||
|
|
item.setOtherPay(AESEncryptUtil.encrypt(item.getOtherPay()));
|
||
|
|
item.setSocialPay(AESEncryptUtil.encrypt(item.getSocialPay()));
|
||
|
|
item.setFundPay(AESEncryptUtil.encrypt(item.getFundPay()));
|
||
|
|
return item;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static InsuranceAccountBatchPO decryptInsuranceAccountBatch(InsuranceAccountBatchPO item) {
|
||
|
|
item.setOtherPay(AESEncryptUtil.decrypt(item.getOtherPay()));
|
||
|
|
item.setSocialPay(AESEncryptUtil.decrypt(item.getSocialPay()));
|
||
|
|
item.setFundPay(AESEncryptUtil.decrypt(item.getFundPay()));
|
||
|
|
return item;
|
||
|
|
}
|
||
|
|
}
|