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 public class OtherDeductionPOEncrypt { public static List encryptOtherDeductionPOList(List list) { if(list == null || list.size() == 0) { return 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 decryptOtherDeductionPOList(List list) { if(list == null || list.size() == 0) { return 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) { if(item == null) { return 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) { if(item == null) { return 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; } }