112 lines
5.4 KiB
Java
112 lines
5.4 KiB
Java
|
|
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;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|