checkList = insuranceSchemeDetailPOList.stream()
+ .filter(f -> f.getPaymentScope().equals(paymentScope)).collect(Collectors.toList());
+ if (checkList.size() > 0) {
+ InsuranceSchemeDetailPO insuranceSchemeDetailPO = checkList.get(0);
+ encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class);
+ String lowerLimit = "0.000".equals(insuranceSchemeDetailPO.getLowerLimit()) ? null : insuranceSchemeDetailPO.getLowerLimit();
+ String upperLimit = "0.000".equals(insuranceSchemeDetailPO.getUpperLimit()) ? null : insuranceSchemeDetailPO.getUpperLimit();
+ if (lowerLimit != null && lowerLimit.length() > 0 && Double.parseDouble(entry.getValue()) < Double.parseDouble(lowerLimit)) {
+ //数值低于对应福利明细下限
+ log.info("社保基数 {} 数值 {} 低于对应福利明细下限 {}!", entry.getKey(), entry.getValue(), lowerLimit);
+ newPaymentBaseJson.put(entry.getKey(), lowerLimit);
+ }
+ if (upperLimit != null && upperLimit.length() > 0 && Double.parseDouble(entry.getValue()) > Double.parseDouble(upperLimit)) {
+ //数值高于对应福利明细上限
+ log.info("社保基数 {} 数值 {} 高于对应福利明细上限 {} !", entry.getKey(), entry.getValue(), upperLimit);
+ newPaymentBaseJson.put(entry.getKey(), upperLimit);
+ }
+ }
+ }
+ return JSON.toJSONString(newPaymentBaseJson);
+ }
+
/**
* 档案列表
*
@@ -1291,7 +1542,6 @@ public class SIArchivesBiz extends Service {
* @return
*/
public List buildWeaTableColumns(List insuranceArchivesEmployeePOS, long operateId) {
-
List list = new ArrayList<>();
User user = (User) SalaryContext.get().getValue("user");
Map> titleMap = buildColumnTitle(insuranceArchivesEmployeePOS, operateId, user);
@@ -1333,6 +1583,8 @@ public class SIArchivesBiz extends Service {
* @return
*/
public Map> buildColumnTitle(List insuranceArchivesEmployeePOS, long operateId, User user) {
+
+ boolean welBaseDiffSign = isDiffWelBase();
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
Map> result = new HashMap<>();
@@ -1348,16 +1600,17 @@ public class SIArchivesBiz extends Service {
Set fundSet = new HashSet<>();
Set otherSet = new HashSet<>();
+ Set socialComSet = new HashSet<>();
+ Set fundComSet = new HashSet<>();
+ Set otherComSet = new HashSet<>();
+
insuranceArchivesEmployeePOS.forEach(item -> {
List socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId()));
encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class, user);
-// InsuranceArchivesSocialSchemePO socialItem = socialList.size() != 0 ? socialList.get(0) : null;
List fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId()));
encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class, user);
-// InsuranceArchivesFundSchemePO fundItem = fundList.size() != 0 ? fundList.get(0) : null;
List otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId()));
encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class, user);
-// InsuranceArchivesOtherSchemePO otherItem = otherList.size() != 0 ? otherList.get(0) : null;
if (socialList.size() > 0) {
for (InsuranceArchivesSocialSchemePO socialSchemePO : socialList) {
@@ -1366,6 +1619,14 @@ public class SIArchivesBiz extends Service {
if (socialJson != null) {
socialJson.forEach((k, v) -> socialSet.add(k));
}
+ //如果需要区分个人和公司福利基数
+ if (welBaseDiffSign) {
+ Map socialComJson = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new TypeReference