weaver-hrm-salary/src/com/engine/salary/encrypt/datacollection/OtherDeductionPOEncrypt.java

57 lines
2.6 KiB
Java
Raw Normal View History

2022-05-24 09:23:17 +08:00
package com.engine.salary.encrypt.datacollection;
import com.engine.salary.encrypt.AESEncryptUtil;
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
import java.util.List;
@Deprecated
2022-05-24 09:23:17 +08:00
public class OtherDeductionPOEncrypt {
public static List<OtherDeductionPO> encryptOtherDeductionPOList(List<OtherDeductionPO> list) {
2022-06-02 17:01:26 +08:00
if(list == null || list.size() == 0) {
return list;
}
2022-05-24 09:23:17 +08:00
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) {
2022-06-02 17:01:26 +08:00
if(list == null || list.size() == 0) {
return list;
}
2022-05-24 09:23:17 +08:00
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) {
2022-06-02 17:01:26 +08:00
if(item == null) {
return item;
}
2022-05-24 09:23:17 +08:00
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) {
2022-06-02 17:01:26 +08:00
if(item == null) {
return item;
}
2022-05-24 09:23:17 +08:00
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;
}
}