53 lines
2.5 KiB
Java
53 lines
2.5 KiB
Java
|
|
package com.engine.salary.encrypt.datacollection;
|
|||
|
|
|
|||
|
|
import com.engine.salary.encrypt.AESEncryptUtil;
|
|||
|
|
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
|||
|
|
|
|||
|
|
import java.util.List;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* hrsa_other_deduction: 加解密
|
|||
|
|
* 字段:
|
|||
|
|
* business_healthy_insurance
|
|||
|
|
* tax_delay_endowment_insurance
|
|||
|
|
* other_deduction
|
|||
|
|
* deduction_allowed_donation
|
|||
|
|
*/
|
|||
|
|
public class OtherDeductionPOEncrypt {
|
|||
|
|
public static List<OtherDeductionPO> encryptOtherDeductionPOList(List<OtherDeductionPO> list) {
|
|||
|
|
list.forEach(item -> {
|
|||
|
|
item.setBusinessHealthyInsurance(AESEncryptUtil.encrypt(item.getBusinessHealthyInsurance()));
|
|||
|
|
item.setTaxDelayEndowmentInsurance(AESEncryptUtil.encrypt(item.getTaxDelayEndowmentInsurance()));
|
|||
|
|
item.setOtherDeduction(AESEncryptUtil.encrypt(item.getOtherDeduction()));
|
|||
|
|
item.setDeductionAllowedDonation(AESEncryptUtil.encrypt(item.getDeductionAllowedDonation()));
|
|||
|
|
});
|
|||
|
|
return list;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static List<OtherDeductionPO> decryptOtherDeductionPOList(List<OtherDeductionPO> list) {
|
|||
|
|
list.forEach(item -> {
|
|||
|
|
item.setBusinessHealthyInsurance(AESEncryptUtil.decrypt(item.getBusinessHealthyInsurance()));
|
|||
|
|
item.setTaxDelayEndowmentInsurance(AESEncryptUtil.decrypt(item.getTaxDelayEndowmentInsurance()));
|
|||
|
|
item.setOtherDeduction(AESEncryptUtil.decrypt(item.getOtherDeduction()));
|
|||
|
|
item.setDeductionAllowedDonation(AESEncryptUtil.decrypt(item.getDeductionAllowedDonation()));
|
|||
|
|
});
|
|||
|
|
return list;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static OtherDeductionPO encryptOtherDeductionPO(OtherDeductionPO item) {
|
|||
|
|
item.setBusinessHealthyInsurance(AESEncryptUtil.encrypt(item.getBusinessHealthyInsurance()));
|
|||
|
|
item.setTaxDelayEndowmentInsurance(AESEncryptUtil.encrypt(item.getTaxDelayEndowmentInsurance()));
|
|||
|
|
item.setOtherDeduction(AESEncryptUtil.encrypt(item.getOtherDeduction()));
|
|||
|
|
item.setDeductionAllowedDonation(AESEncryptUtil.encrypt(item.getDeductionAllowedDonation()));
|
|||
|
|
return item;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static OtherDeductionPO decryptOtherDeductionPO(OtherDeductionPO item) {
|
|||
|
|
item.setBusinessHealthyInsurance(AESEncryptUtil.decrypt(item.getBusinessHealthyInsurance()));
|
|||
|
|
item.setTaxDelayEndowmentInsurance(AESEncryptUtil.decrypt(item.getTaxDelayEndowmentInsurance()));
|
|||
|
|
item.setOtherDeduction(AESEncryptUtil.decrypt(item.getOtherDeduction()));
|
|||
|
|
item.setDeductionAllowedDonation(AESEncryptUtil.decrypt(item.getDeductionAllowedDonation()));
|
|||
|
|
return item;
|
|||
|
|
}
|
|||
|
|
}
|