From cfb82cb9b20f037e082871c670357b4b9143848e Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 19 Feb 2024 17:27:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E3=80=81=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E3=80=81=E5=8F=B0=E8=B4=A6=EF=BC=8C=E7=9B=B8=E5=85=B3=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E7=B1=BB=E4=BB=A3=E7=A0=81=E6=A2=B3=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4sqlsession=E5=BD=A2=E5=BC=8F=E7=9A=84mpper?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIArchivesServiceImpl.java | 736 ++++++++---------- .../service/impl/SICategoryServiceImpl.java | 59 +- .../service/impl/SISchemeServiceImpl.java | 72 +- 3 files changed, 355 insertions(+), 512 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 5f317d94b..a8aaa54c5 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -140,6 +140,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class); } + private InsuranceSchemeMapper getInsuranceSchemeMapper() { + return MapperProxyFactory.getProxy(InsuranceSchemeMapper.class); + } + private SalaryEmployeeService getSalaryEmployeeService(User user) { return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); } @@ -160,6 +164,11 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService return MapperProxyFactory.getProxy(EmployMapper.class); } + private InsuranceBaseAdjustHistoryMapper getInsuranceBaseAdjustHistoryMapper() { + return MapperProxyFactory.getProxy(InsuranceBaseAdjustHistoryMapper.class); + } + + @Override public Map getTips(Map params) { return commandExecutor.execute(new SIArchivesTipsCmd(params, user)); @@ -813,12 +822,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public Map queryInsuranceTabTotal() { long currentEmployeeId = user.getUID(); - // tab页签数量 Map result = new HashMap<>(); - Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId); - //获取管理的人员范围 List taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId); Map> taxAgentEmployeesMap = SalaryEntityUtil.convert2Map(taxAgentEmployeeDTOS, TaxAgentManageRangeEmployeeDTO::getTaxAgentId, TaxAgentManageRangeEmployeeDTO::getEmployeeList); @@ -827,22 +833,18 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService // 获取作为管理员的所有个税扣缴义务人列表 Collection taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin(currentEmployeeId); Set taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId); - //获取所有福利档案基础信息 List archiveListDTOS = getInsuranceBaseInfoMapper().listAll(); list = archiveListDTOS.stream().filter(dto -> taxAgentIds.contains(dto.getPaymentOrganization())).collect(Collectors.toList()); - Boolean adminEnable = getTaxAgentService(user).isAdminEnable(currentEmployeeId); //不是管理员看不到数据,返回空 if (!adminEnable) { list = new ArrayList<>(); } - } else { list = getInsuranceBaseInfoMapper().listAll(); } - long stayAddTotal = 0L; long payTotal = 0L; long stayDelTotal = 0L; @@ -915,11 +917,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List oldStayAddList = pos.stream().filter(f -> f.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue())).collect(Collectors.toList()); boolean isNotExist = oldStayAddList.stream().anyMatch(te -> taxAgentManageRangeEmployees.stream().noneMatch(p -> p.getEmployeeId() != null && p.getEmployeeId().equals(te.getEmployeeId()) && p.getTaxAgentId().equals(te.getPaymentOrganization()))); - if (isNotExist) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(116196, "不在当前个税扣缴义人的人员范围中,不可取消停缴")); } - for(InsuranceArchivesBaseInfoPO po : pos) { if (po.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue())) { //来自待增员的停缴->待增员 @@ -969,12 +969,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "没有可以操作的记录")); } List baseInfoPOList = getInsuranceBaseInfoMapper().listByIds(ids); - //分别新建福利档案基础信息相关的社保、公积金、其他福利档案列表 List socialList = new ArrayList<>(); List fundList = new ArrayList<>(); List otherList = new ArrayList<>(); - //新建最终可以进行减员的福利档案基础信息id列表 List toStopBaseInfoIdList = new ArrayList<>(); //新建最终不可以进行减员的福利档案基础信息id列表 @@ -997,10 +995,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService //获取社保档案 socialList = getSocialSchemeMapper().getSocialById(socialIds); //筛选可减员的社保档案相关信息 - toStopSocialIds = socialList.stream().filter(f-> f.getSocialSchemeId() == null || (f.getSocialEndTime() != null && f.getSocialEndTime().length() > 0 && (f.getSocialEndTime().compareTo(todayMonth)) <= 0)) .map(InsuranceArchivesSocialSchemePO::getId).collect(Collectors.toList()); - // + List finalToStopSocialIds = toStopSocialIds; noStopBaseInfoIds = baseInfoPOList.stream().filter(f -> !finalToStopSocialIds.contains(f.getSocialArchivesId())).map(InsuranceArchivesBaseInfoPO::getId).collect(Collectors.toList()); @@ -1028,7 +1025,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService //社保、公积金、其他福利档案的可减员的人员信息与入参中的人员信息一致时 toStopBaseInfoIdList = baseInfoIds; } else { - //与最终不可减员的baseInfoId信息做差集 toStopBaseInfoIdList = (List) CollectionUtils.subtract(baseInfoIds, noStopBaseInfoIds); } @@ -1036,7 +1032,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (toStopBaseInfoIdList.size() > 0) { getInsuranceBaseInfoMapper().updateRunStatusByIds(InsuranceArchivesBaseInfoPO.builder() .ids(toStopBaseInfoIdList).runStatus(EmployeeStatusEnum.STOP_PAYMENT_FROM_DEL.getValue()).build()); - //记录操作日志 toStopBaseInfoIdList.forEach(f -> { InsuranceArchivesBaseInfoPO targetPO = getInsuranceBaseInfoMapper().getById(f); @@ -1163,19 +1158,15 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (CollectionUtils.isEmpty(ids)) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(145969, "没有可以操作的记录")); } - // List baseInfoPOList = new ArrayList<>(); List> partitionInfo = Lists.partition((List) ids, 100); partitionInfo.forEach(part -> baseInfoPOList.addAll( getInsuranceBaseInfoMapper().listByIds(part))); - // - //分别新建福利档案基础信息相关的社保、公积金、其他福利档案列表 List socialList = new ArrayList<>(); List fundList = new ArrayList<>(); List otherList = new ArrayList<>(); - //新建最终可以进行增员的福利档案基础信息id列表 List toPayBaseInfoIdList = new ArrayList<>(); //新建最终不可以进行增员的福利档案基础信息id列表 @@ -1360,7 +1351,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (insuranceArchivesBaseInfoPO.getIds() == null || StringUtils.isBlank(insuranceArchivesBaseInfoPO.getRunStatus())) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误")); } - if (insuranceArchivesBaseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) { List> baseInfoIdsPartition = Lists.partition((List) insuranceArchivesBaseInfoPO.getIds(), 100); List nowList = new ArrayList<>(); @@ -1377,7 +1367,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (isNotExist) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(116196, "个税扣缴义务人不存在或不在权限范围内,删除失败!")); } - //置空社保、公积金、其他福利档案的最后缴纳月信息,并将福利档案基础信息表的状态置为“正在缴纳” if (nowList.size() > 0) { List socialIds = nowList.stream() @@ -1443,7 +1432,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService // List adjustHistoryDTOS = siArchivesBiz.getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); List adjustHistoryDTOS = getBaseHistoryByEmployeeIdAndOperator(param.getOperator(), param.getEmployeeId()); - // 分权逻辑 Boolean needAuth = getTaxAgentService(user).isNeedAuth((long) user.getUID()); if (needAuth) { @@ -1605,8 +1593,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * 判断是否需要生成历史福利档案基本信息 */ public Boolean createOldInsuranceBaseInfo(Long creator) { - - log.info("判断是否需要生成历史数据"); List nowBaseInfoList = getInsuranceBaseInfoMapper().getInsuranceBaseInfoList(); if (nowBaseInfoList.size() == 0) { @@ -1633,7 +1619,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService InsuranceArchivesOtherSchemePO toDealOtherPO = toDealOtherList.get(0); toDealOtherPO.setPaymentOrganization(socialSchemePO.getPaymentOrganization()); updateOtherList.add(toDealOtherPO); - } } @@ -1676,8 +1661,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService }else { return false; } - - } else { return false; } @@ -1693,178 +1676,173 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public List> buildTableData(List insuranceArchivesEmployeePOS, boolean export) { - boolean welBaseDiffSign = isDiffWelBase(); List taxAgentPOS = getTaxAgentMapper().listAll(); Map longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + List> records = new ArrayList<>(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - Map socialSchemePOMap = encryptUtil.decryptList(this.getSocialByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesSocialSchemePO.class) - .stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getId, Function.identity())); + Map socialSchemePOMap = encryptUtil.decryptList(this.getSocialByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesSocialSchemePO.class) + .stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getId, Function.identity())); - Map fundSchemePOMap = encryptUtil.decryptList(this.getFundByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesFundSchemePO.class) - .stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getId, Function.identity())); - List otherByEmployeeList = this.getOtherByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS); - encryptUtil.decryptList(otherByEmployeeList, InsuranceArchivesOtherSchemePO.class); - Map otherSchemePOMap = otherByEmployeeList - .stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getId, Function.identity())); - insuranceArchivesEmployeePOS.forEach(item -> { - InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getSocialId()); - InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getFundId()); - InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getOtherId()); - Map map = new HashMap<>(); - map.put("employeeName", item.getUserName()); - map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); - map.put("employeeId", item.getEmployeeId()); - map.put("departmentName", item.getDepartmentName()); - map.put("subcompanyName", item.getSubcompanyName()); - map.put("departmentId", item.getDepartmentId()); - map.put("jobNum", item.getJobNum()); - map.put("companystartdate", item.getCompanystartdate()); - map.put("dismissdate", item.getDimissionDate()); - map.put("mobile", item.getTelephone()); - map.put("siSchemeId", item.getSiSchemeId()); - map.put("fundSchemeId", item.getFundSchemeId()); - map.put("otherSchemeId", item.getOtherSchemeId()); - map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : ""); - map.put("baseInfo", item.getBaseInfoId()); - map.put("paymentOrganization", item.getPaymentOrganization()); - if (socialItem != null) { - map.put("socialName", insuranceSchemeMapper.querySchemeName(socialItem.getSocialSchemeId())); - Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { - }); - if (welBaseDiffSign) { - if (socialJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); - socialJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "per", v); - } - }); - } - Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { + Map fundSchemePOMap = encryptUtil.decryptList(this.getFundByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS), InsuranceArchivesFundSchemePO.class) + .stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getId, Function.identity())); + List otherByEmployeeList = this.getOtherByEmployeeIdAndPayOrg(insuranceArchivesEmployeePOS); + encryptUtil.decryptList(otherByEmployeeList, InsuranceArchivesOtherSchemePO.class); + Map otherSchemePOMap = otherByEmployeeList + .stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getId, Function.identity())); + insuranceArchivesEmployeePOS.forEach(item -> { + InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getSocialId()); + InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getFundId()); + InsuranceArchivesOtherSchemePO otherItem = otherSchemePOMap.get(item.getOtherId()); + Map map = new HashMap<>(); + map.put("employeeName", item.getUserName()); + map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); + map.put("employeeId", item.getEmployeeId()); + map.put("departmentName", item.getDepartmentName()); + map.put("subcompanyName", item.getSubcompanyName()); + map.put("departmentId", item.getDepartmentId()); + map.put("jobNum", item.getJobNum()); + map.put("companystartdate", item.getCompanystartdate()); + map.put("dismissdate", item.getDimissionDate()); + map.put("mobile", item.getTelephone()); + map.put("siSchemeId", item.getSiSchemeId()); + map.put("fundSchemeId", item.getFundSchemeId()); + map.put("otherSchemeId", item.getOtherSchemeId()); + map.put("status", item.getUserStatus() != null ? UserStatusEnum.getDefaultLabelByValue(item.getUserStatus()) : ""); + map.put("baseInfo", item.getBaseInfoId()); + map.put("paymentOrganization", item.getPaymentOrganization()); + if (socialItem != null) { + map.put("socialName", getInsuranceSchemeMapper().querySchemeName(socialItem.getSocialSchemeId())); + Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } }); - if (socialComJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); - socialComJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "com", v); - } - }); - } - } else { - if (socialJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); - socialJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } - }); - } } - - map.put("socialAccount", socialItem.getSocialAccount()); - map.put("socialStartTime", socialItem.getSocialStartTime()); - map.put("socialEndTime", socialItem.getSocialEndTime()); - } - if (fundItem != null) { - map.put("fundName", insuranceSchemeMapper.querySchemeName(fundItem.getFundSchemeId())); - map.put("fundAccount", fundItem.getFundAccount()); - Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { + Map socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference>() { }); - if (welBaseDiffSign) { - if (fundJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); - fundJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "per", v); - } - }); - } - Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { + if (socialComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + socialComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (socialJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId()); + socialJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } }); - if (fundComJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); - fundComJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "com", v); - } - }); - } - } else { - if (fundJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); - fundJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } - }); - } } - - map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); - map.put("fundStartTime", fundItem.getFundStartTime()); - map.put("fundEndTime", fundItem.getFundEndTime()); - } - if (otherItem != null) { - map.put("otherName", insuranceSchemeMapper.querySchemeName(otherItem.getOtherSchemeId())); - Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { + + map.put("socialAccount", socialItem.getSocialAccount()); + map.put("socialStartTime", socialItem.getSocialStartTime()); + map.put("socialEndTime", socialItem.getSocialEndTime()); + } + if (fundItem != null) { + map.put("fundName", getInsuranceSchemeMapper().querySchemeName(fundItem.getFundSchemeId())); + map.put("fundAccount", fundItem.getFundAccount()); + Map fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference>() { }); - if (welBaseDiffSign) { - if (otherJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); - otherJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "per", v); - } - }); - } - Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { + if (fundComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + fundComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (fundJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId()); + fundJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } }); - if (otherComJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); - otherComJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k + "com", v); - } - }); - } - } else { - if (otherJson != null) { - //查询该福利方案下开启缴纳的福利项 - List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); - otherJson.forEach((k, v) -> { - if (insuranceIdList.contains(Long.valueOf(k))) { - map.put(k, v); - } - }); - } } - - map.put("otherStartTime", otherItem.getOtherStartTime()); - map.put("otherEndTime", otherItem.getOtherEndTime()); } - records.add(map); - }); - return records; - } finally { - sqlSession.close(); - } + map.put("supplementFundAccount", fundItem.getSupplementFundAccount()); + map.put("fundStartTime", fundItem.getFundStartTime()); + map.put("fundEndTime", fundItem.getFundEndTime()); + + } + if (otherItem != null) { + map.put("otherName", getInsuranceSchemeMapper().querySchemeName(otherItem.getOtherSchemeId())); + Map otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference>() { + }); + if (welBaseDiffSign) { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "per", v); + } + }); + } + Map otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference>() { + }); + if (otherComJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue()); + otherComJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k + "com", v); + } + }); + } + } else { + if (otherJson != null) { + //查询该福利方案下开启缴纳的福利项 + List insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId()); + otherJson.forEach((k, v) -> { + if (insuranceIdList.contains(Long.valueOf(k))) { + map.put(k, v); + } + }); + } + } + + map.put("otherStartTime", otherItem.getOtherStartTime()); + map.put("otherEndTime", otherItem.getOtherEndTime()); + } + records.add(map); + }); + return records; + + } @Override @@ -1880,54 +1858,39 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * 根据人员id和个税扣缴人id获取记录 */ public List getSocialByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List allList = new ArrayList<>(); - for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { - List socialList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(po); - if (socialList.size() > 0) { - allList.add(socialList.get(0)); - } + + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List socialList = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(po); + if (socialList.size() > 0) { + allList.add(socialList.get(0)); } - return allList; - } finally { - sqlSession.close(); } + return allList; } public List getFundByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - List allList = new ArrayList<>(); - for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { - List fundList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(po); - if (fundList.size() > 0) { - allList.add(fundList.get(0)); - } + + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List fundList = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(po); + if (fundList.size() > 0) { + allList.add(fundList.get(0)); } - return allList; - } finally { - sqlSession.close(); } + return allList; } public List getOtherByEmployeeIdAndPayOrg(List insuranceArchivesEmployeePOS) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); - List allList = new ArrayList<>(); - for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { - List otherList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(po); - if (otherList.size() > 0) { - allList.add(otherList.get(0)); - } + + List allList = new ArrayList<>(); + for (InsuranceArchivesEmployeePO po : insuranceArchivesEmployeePOS) { + List otherList = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(po); + if (otherList.size() > 0) { + allList.add(otherList.get(0)); } - return allList; - } finally { - sqlSession.close(); } + return allList; } @Override @@ -2238,20 +2201,15 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * */ public List getBaseHistoryByEmployeeIdAndOperator(Long operator, Long employeeId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); - List empList = mapper.listByEmployeeIdAndOperator(operator, employeeId); - List extEmpList = mapper.listByExtEmpIdAndOperator(operator, employeeId); - if (extEmpList != null) { - empList.addAll(extEmpList); - empList = empList.stream().filter(f -> org.apache.commons.lang.StringUtils.isNotBlank(f.getEmployeeName())) - .sorted(Comparator.comparing(InsuranceArchivesBaseHistoryDTO::getOperateTime).reversed()).collect(Collectors.toList()); - } - return empList; - } finally { - sqlSession.close(); + + List empList = getInsuranceBaseAdjustHistoryMapper().listByEmployeeIdAndOperator(operator, employeeId); + List extEmpList = getInsuranceBaseAdjustHistoryMapper().listByExtEmpIdAndOperator(operator, employeeId); + if (extEmpList != null) { + empList.addAll(extEmpList); + empList = empList.stream().filter(f -> org.apache.commons.lang.StringUtils.isNotBlank(f.getEmployeeName())) + .sorted(Comparator.comparing(InsuranceArchivesBaseHistoryDTO::getOperateTime).reversed()).collect(Collectors.toList()); } + return empList; } //生成基数调整记录(基数单元未变化则忽略) @@ -2394,15 +2352,8 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService if (org.apache.commons.collections.CollectionUtils.isEmpty(adjustHistoryList)) { return; } - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceBaseAdjustHistoryMapper mapper = sqlSession.getMapper(InsuranceBaseAdjustHistoryMapper.class); - List> partition = Lists.partition(adjustHistoryList, 100); - partition.forEach(mapper::batchSave); - sqlSession.commit(); - } finally { - sqlSession.close(); - } + List> partition = Lists.partition(adjustHistoryList, 100); + partition.forEach(getInsuranceBaseAdjustHistoryMapper()::batchSave); } public Map getBaseForm(WelfareTypeEnum welfareType, Long employeeId, Long paymentOrganization, Collection taxAgentPOS) { @@ -2412,7 +2363,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService SalaryAssert.notEmpty(employeeByIds, SalaryI18nUtil.getI18nLabel(0, "员工信息不存在")); DataCollectionEmployee item = employeeByIds.get(0); - if (welfareType == null) { //基础信息表单 InsuranceArchivesBaseDTO insuranceArchivesBaseDTO = InsuranceArchivesBaseDTO.builder().department(item.getDepartmentName()) @@ -2436,8 +2386,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List paymentOptions = paymentOrganizationOptions(taxAgentPOS); List underTakeOptions = Arrays.stream(UndertakerEnum.values()) .map(e -> new SearchConditionOption(e.getValue().toString(), e.getDefaultLabel())).collect(Collectors.toList()); - - //返回数据 switch (welfareType) { case SOCIAL_SECURITY: @@ -2550,25 +2498,19 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public InsuranceArchivesOtherSchemeDTO buildOtherForm(Long employeeId, Long paymentOrganization) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); - List otherList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(employeeId) - .paymentOrganization(paymentOrganization) - .build()); - encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); - InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null; - InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId); - if (insuranceArchivesOtherSchemePO == null) { - data.setEmployeeId(employeeId); - data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); - } - return data; - } finally { - sqlSession.close(); - } + List otherList = getOtherSchemeMapper().getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(otherList, InsuranceArchivesOtherSchemePO.class); + InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null; + InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId); + if (insuranceArchivesOtherSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); + } + return data; } /** @@ -2579,25 +2521,18 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService */ public InsuranceArchivesFundSchemeDTO buildFundForm(Long employeeId, Long paymentOrganization) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - List fundList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(employeeId) - .paymentOrganization(paymentOrganization) - .build()); - encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); - InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null; - InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId); - if (insuranceArchivesFundSchemePO == null) { - data.setEmployeeId(employeeId); - data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); - } - return data; - } finally { - sqlSession.close(); + List fundList = getFundSchemeMapper().getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(fundList, InsuranceArchivesFundSchemePO.class); + InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null; + InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId); + if (insuranceArchivesFundSchemePO == null) { + data.setEmployeeId(employeeId); + data.setUnderTake(UndertakerEnum.SCOPE_PERSON.getValue().toString()); } - + return data; } /** @@ -2623,18 +2558,13 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public InsuranceArchivesSocialSchemePO getSocialByEmployeeId(Long employeeId, Long paymentOrganization) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List socialList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() - .employeeId(employeeId) - .paymentOrganization(paymentOrganization) - .build()); - encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); - return socialList.size() != 0 ? socialList.get(0) : null; - } finally { - sqlSession.close(); - } + + List socialList = getSocialSchemeMapper().getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() + .employeeId(employeeId) + .paymentOrganization(paymentOrganization) + .build()); + encryptUtil.decryptList(socialList, InsuranceArchivesSocialSchemePO.class); + return socialList.size() != 0 ? socialList.get(0) : null; } /** @@ -2887,15 +2817,10 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService * @return */ public List queryListByPrimaryIdIsPayment(Long schemeId, Integer welfareType) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListByPrimaryIdIsPayment(schemeId, IsPaymentEnum.YES.getValue(), welfareType); - encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPOS; - } finally { - sqlSession.close(); - } + + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListByPrimaryIdIsPayment(schemeId, IsPaymentEnum.YES.getValue(), welfareType); + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOS; } public void otherSave(InsuranceArchivesSaveParam paramReq, User user, boolean welBaseDiffSign) { @@ -3461,7 +3386,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } for (Map.Entry entry : paymentBaseJson.entrySet()) { - //判断福利值是否为空/数字 if (entry.getValue() == null || entry.getValue().length() == 0) { continue; @@ -3601,89 +3525,83 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService //是否分权 Boolean needAuth = param.getNeedAuth(); StopWatch sw = new StopWatch(); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); Map datas = new HashMap<>(16); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List page = new ArrayList<>(); - PageInfo pageInfo = new PageInfo<>(InsuranceArchivesEmployeePO.class); - //获取福利档案列表数据 - if (needAuth) { - Collection taxAgentEmployeeIds = param.getTaxAgentEmployeeIds(); - Collection taxAgentIds = param.getTaxAgentIds(); - log.info("从数据库获取档案列表数据开始"); - sw.start("获取福利档案列表数据"); - if (param.isExtWelArchiveList()) { - page = socialSchemeMapper.queryExtEmployeeList(param); - } else { - page = socialSchemeMapper.queryEmployeeList(param); - } - sw.stop(); - log.info("从数据库获取档案列表数据完成!"); - page = page.stream().filter(f -> + + List page = new ArrayList<>(); + PageInfo pageInfo = new PageInfo<>(InsuranceArchivesEmployeePO.class); + //获取福利档案列表数据 + if (needAuth) { + Collection taxAgentEmployeeIds = param.getTaxAgentEmployeeIds(); + Collection taxAgentIds = param.getTaxAgentIds(); + log.info("从数据库获取档案列表数据开始"); + sw.start("获取福利档案列表数据"); + if (param.isExtWelArchiveList()) { + page = getSocialSchemeMapper().queryExtEmployeeList(param); + } else { + page = getSocialSchemeMapper().queryEmployeeList(param); + } + sw.stop(); + log.info("从数据库获取档案列表数据完成!"); + page = page.stream().filter(f -> // taxAgentEmployeeIds.contains(f.getEmployeeId())|| - taxAgentIds.contains(f.getPaymentOrganization()) - ).collect(Collectors.toList()); - // 填充总数和当页数据 - // 分页参数 - pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), InsuranceArchivesEmployeePO.class); - pageInfo.setTotal(page.size()); - pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page)); + taxAgentIds.contains(f.getPaymentOrganization()) + ).collect(Collectors.toList()); + // 填充总数和当页数据 + // 分页参数 + pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), InsuranceArchivesEmployeePO.class); + pageInfo.setTotal(page.size()); + pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page)); + } else { + log.info("从数据库获取档案列表数据开始"); + sw.start("获取档案列表数据"); + if (param.isExtWelArchiveList()) { + page = getSocialSchemeMapper().queryExtEmployeeList(param); } else { - log.info("从数据库获取档案列表数据开始"); - sw.start("获取档案列表数据"); - if (param.isExtWelArchiveList()) { - page = socialSchemeMapper.queryExtEmployeeList(param); - } else { - page = socialSchemeMapper.queryEmployeeList(param); - } - sw.stop(); - log.info("从数据库获取档案列表数据完成!"); - pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), - page, InsuranceArchivesEmployeePO.class); - } - List> records = null; - log.info("buildTableData方法处理福利档案列表数据开始"); - sw.start("buildTableData方法处理福利档案列表数据"); - if (param.getExportData() != null && param.getExportData()) { - records = buildTableData(pageInfo.getList(), true); - } else { - records = buildTableData(pageInfo.getList(), false); + page = getSocialSchemeMapper().queryEmployeeList(param); } sw.stop(); - log.info("buildTableData方法处理福利档案列表数据完成!"); - - log.info("buildWeaTableColumns方法处理福利档案列表数据开始"); - sw.start("buildWeaTableColumns方法处理福利档案列表数据"); - List columns = buildWeaTableColumns(pageInfo.getList()); - sw.stop(); - log.info("buildWeaTableColumns方法处理福利档案列表数据完成!"); - WeaTable table = new WeaTable(); - table.setColumns(columns); - //设置check是否可用 - List checkboxpopedomList = new ArrayList<>(); - WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); - checkboxpopedom.setPopedompara("column:system_type"); - checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom"); - checkboxpopedomList.add(checkboxpopedom); - table.setCheckboxList(checkboxpopedomList); - table.setCheckboxpopedom(null); - - WeaResultMsg result = new WeaResultMsg(false); - result.putAll(table.makeDataResult()); - result.success(); - - datas.put("pageInfo", pageInfo); - datas.put("datas", records); - datas.put("columns", columns); - datas.put("dataKey", result.getResultMap()); - - log.info("各操作计时 {}", sw.prettyPrint()); - return datas; - - } finally { - sqlSession.close(); + log.info("从数据库获取档案列表数据完成!"); + pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), + page, InsuranceArchivesEmployeePO.class); } + List> records = null; + log.info("buildTableData方法处理福利档案列表数据开始"); + sw.start("buildTableData方法处理福利档案列表数据"); + if (param.getExportData() != null && param.getExportData()) { + records = buildTableData(pageInfo.getList(), true); + } else { + records = buildTableData(pageInfo.getList(), false); + } + sw.stop(); + log.info("buildTableData方法处理福利档案列表数据完成!"); + + log.info("buildWeaTableColumns方法处理福利档案列表数据开始"); + sw.start("buildWeaTableColumns方法处理福利档案列表数据"); + List columns = buildWeaTableColumns(pageInfo.getList()); + sw.stop(); + log.info("buildWeaTableColumns方法处理福利档案列表数据完成!"); + WeaTable table = new WeaTable(); + table.setColumns(columns); + //设置check是否可用 + List checkboxpopedomList = new ArrayList<>(); + WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); + checkboxpopedom.setPopedompara("column:system_type"); + checkboxpopedom.setShowmethod("com.engine.salary.transmethod.TaxRateTransMethod.getCheckBoxPopedom"); + checkboxpopedomList.add(checkboxpopedom); + table.setCheckboxList(checkboxpopedomList); + table.setCheckboxpopedom(null); + + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + + datas.put("pageInfo", pageInfo); + datas.put("datas", records); + datas.put("columns", columns); + datas.put("dataKey", result.getResultMap()); + + log.info("各操作计时 {}", sw.prettyPrint()); + return datas; } /** @@ -3712,15 +3630,11 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List> taxAgentList = getTaxAgentWrapper(user).selectListAsAdmin(); List taxAgentOption = taxAgentList.stream().map(item -> new SearchConditionOption(item.get("id").toString(), item.get("content").toString())).collect(Collectors.toList()); - Map apidatas = new HashMap(); ConditionFactory conditionFactory = new ConditionFactory(user); - //条件组 List addGroups = new ArrayList(); - List conditionItems = new ArrayList(); - //文本输入框 SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT, 25034, "username"); username.setInputType("input"); @@ -3730,7 +3644,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2 username.setLabel(SalaryI18nUtil.getI18nLabel(0,"姓名")); //设置文本值 这个将覆盖多语言标签的值 conditionItems.add(username); - //文本输入框 SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT, 25034, "jobNum"); jobNum.setInputType("input"); @@ -3741,7 +3654,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService jobNum.setLabel(SalaryI18nUtil.getI18nLabel(0,"工号")); //设置文本值 这个将覆盖多语言标签的值 conditionItems.add(jobNum); - SearchConditionItem departmentIds = conditionFactory.createCondition(ConditionType.BROWSER, 502329, "departmentIdsStr", "57"); departmentIds.setColSpan(2); departmentIds.setFieldcol(16); @@ -3749,7 +3661,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService departmentIds.setLabel(SalaryI18nUtil.getI18nLabel(0,"部门")); conditionItems.add(departmentIds); - SearchConditionItem statuses = conditionFactory.createCondition(ConditionType.SELECT, 502327, "statusesStr"); statuses.setInputType("select"); statuses.setMultiple(true); @@ -3761,7 +3672,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService statuses.setLabel(SalaryI18nUtil.getI18nLabel(0,"状态")); conditionItems.add(statuses); - SearchConditionItem positions = conditionFactory.createCondition(ConditionType.BROWSER, 502327, "positionsStr", "278"); positions.setInputType("browser"); positions.setColSpan(2); @@ -3810,7 +3720,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService siSchemeId.setLabel(SalaryI18nUtil.getI18nLabel(0,"社保方案")); conditionItems.add(siSchemeId); - SearchConditionItem fundSchemeId = conditionFactory.createCondition(ConditionType.SELECT, 502327, "fundSchemeId"); fundSchemeId.setInputType("select"); fundSchemeId.setOptions(fundOption); @@ -3848,53 +3757,38 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService @Override public List getSocialByEmployeeIds(List employeeIds) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class); - List> partition = Lists.partition(employeeIds, 1000); - List allList = new ArrayList<>(); - for (List longs : partition) { - List socialList = socialSchemeMapper.getSocialByEmployeeId(longs); - allList.addAll(socialList); - } - return allList; - } finally { - sqlSession.close(); + + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List socialList = getSocialSchemeMapper().getSocialByEmployeeId(longs); + allList.addAll(socialList); } + return allList; } @Override public List getFundByEmployeeIds(List employeeIds) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class); - List> partition = Lists.partition(employeeIds, 1000); - List allList = new ArrayList<>(); - for (List longs : partition) { - List fundList = fundSchemeMapper.getFundByEmployeeId(longs); - allList.addAll(fundList); - } - return allList; - } finally { - sqlSession.close(); + + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List fundList = getFundSchemeMapper().getFundByEmployeeId(longs); + allList.addAll(fundList); } + return allList; } @Override public List getOtherByEmployeeIds(List employeeIds) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class); - List> partition = Lists.partition(employeeIds, 1000); - List allList = new ArrayList<>(); - for (List longs : partition) { - List otherList = otherSchemeMapper.getOtherByEmployeeId(longs); - allList.addAll(otherList); - } - return allList; - } finally { - sqlSession.close(); + + List> partition = Lists.partition(employeeIds, 1000); + List allList = new ArrayList<>(); + for (List longs : partition) { + List otherList = getOtherSchemeMapper().getOtherByEmployeeId(longs); + allList.addAll(otherList); } + return allList; } /** diff --git a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java index 453ff9729..7e127f570 100644 --- a/src/com/engine/salary/service/impl/SICategoryServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICategoryServiceImpl.java @@ -38,8 +38,6 @@ import com.mzlion.core.utils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.session.SqlSession; -import weaver.conn.mybatis.MyBatisFactory; import weaver.hrm.User; import java.util.*; @@ -377,15 +375,10 @@ public class SICategoryServiceImpl extends Service implements SICategoryService */ @Override public ICategoryPO getICategoryPOByID(Long id) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - ICategoryPO iCategoryPO = iCategoryMapper.getById(id); - return iCategoryPO; - } finally { - sqlSession.close(); - } + ICategoryPO iCategoryPO = getICategoryMapper().getById(id); + return iCategoryPO; + } /** @@ -395,16 +388,10 @@ public class SICategoryServiceImpl extends Service implements SICategoryService */ @Override public List listByName(String insuranceName) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try{ - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - List iCategoryPOS = iCategoryMapper.listByName(insuranceName); - return iCategoryPOS; + List iCategoryPOS = getICategoryMapper().listByName(insuranceName); + return iCategoryPOS; - } finally { - sqlSession.close(); - } } /** @@ -437,30 +424,24 @@ public class SICategoryServiceImpl extends Service implements SICategoryService * @param iCategoryFormDTO */ public void update(ICategoryFormDTO iCategoryFormDTO) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try{ - if (iCategoryFormDTO.getId() == null) { - throw new SalaryRunTimeException("id is required"); - } - ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId()); - if (Objects.isNull(iCategoryPO)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在")); - } - List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); - if (CollectionUtils.isNotEmpty(iCategoryPOS)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); - } - iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName()); + if (iCategoryFormDTO.getId() == null) { + throw new SalaryRunTimeException("id is required"); + } + ICategoryPO iCategoryPO = getICategoryPOByID(iCategoryFormDTO.getId()); + if (Objects.isNull(iCategoryPO)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"数据不存在")); + } + List iCategoryPOS = listByName(iCategoryFormDTO.getInsuranceName()); + if (CollectionUtils.isNotEmpty(iCategoryPOS)) { + throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"福利名称不允许重复")); + } + iCategoryPO.setInsuranceName(iCategoryFormDTO.getInsuranceName()); // iCategoryPO.setWelfareType(iCategoryFormDTO.getWelfareType().getValue()); // iCategoryPO.setPaymentScope(SalaryEnumUtil.enumArrToString(iCategoryFormDTO.getPaymentScope())); - iCategoryPO.setUpdateTime(new Date()); - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - iCategoryMapper.update(iCategoryPO); + iCategoryPO.setUpdateTime(new Date()); + + getICategoryMapper().update(iCategoryPO); - sqlSession.commit(); - } finally { - sqlSession.close(); - } } /** diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index ac0391195..491850815 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -279,15 +279,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { @Override public List queryListByInsuranceIdIsPayment(Long insuranceId, Integer isPayment) { // return new SISchemeBiz().queryListByInsuranceIdIsPayment(insuranceId, isPayment); - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOList = insuranceSchemeDetailMapper.queryListByInsuranceIdIsPayment(insuranceId, isPayment); - encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPOList; - } finally { - sqlSession.close(); - } + + List insuranceSchemeDetailPOList = getInsuranceSchemeDetailMapper().queryListByInsuranceIdIsPayment(insuranceId, isPayment); + encryptUtil.decryptList(insuranceSchemeDetailPOList, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOList; } @Override @@ -2387,15 +2382,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { */ public InsuranceSchemePO getById(Long id) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - InsuranceSchemePO insuranceSchemePO = insuranceSchemeMapper.getById(id); - - return insuranceSchemePO; - } finally { - sqlSession.close(); - } + InsuranceSchemePO insuranceSchemePO = getInsuranceSchemeMapper().getById(id); + return insuranceSchemePO; } /** @@ -2405,14 +2393,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * @return */ public List listByWelfareType(Integer welfareType) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class); - List insuranceCategoryPOS = iCategoryMapper.listByWelfareType(welfareType, null); - return insuranceCategoryPOS; - } finally { - sqlSession.close(); - } + + List insuranceCategoryPOS = getICategoryMapper().listByWelfareType(welfareType, null); + return insuranceCategoryPOS; } public boolean numberCheck(String number) { @@ -2420,15 +2403,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { } private InsuranceSchemeDetailPO getByPPI(Long primaryId, Integer paymentScope, Long insuranceId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - InsuranceSchemeDetailPO insuranceSchemeDetailPO = insuranceSchemeDetailMapper.getByPPI(primaryId, paymentScope, insuranceId); - encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPO; - } finally { - sqlSession.close(); - } + + InsuranceSchemeDetailPO insuranceSchemeDetailPO = getInsuranceSchemeDetailMapper().getByPPI(primaryId, paymentScope, insuranceId); + encryptUtil.decrypt(insuranceSchemeDetailPO, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPO; + } /** @@ -2715,16 +2694,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { * @return */ public List listByPrimaryId(Long primaryId) { - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeDetailMapper insuranceSchemeDetailMapper = sqlSession.getMapper(InsuranceSchemeDetailMapper.class); - List insuranceSchemeDetailPOS = insuranceSchemeDetailMapper.queryListBySchemeId(primaryId); - encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); - return insuranceSchemeDetailPOS; - } finally { - sqlSession.close(); - } + List insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().queryListBySchemeId(primaryId); + encryptUtil.decryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class); + return insuranceSchemeDetailPOS; } /** @@ -2734,14 +2707,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { */ @Override public List listAll(){ - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class); - List insuranceSchemePOList = insuranceSchemeMapper.listAll(); - return insuranceSchemePOList; - } finally { - sqlSession.close(); - } + + List insuranceSchemePOList = getInsuranceSchemeMapper().listAll(); + return insuranceSchemePOList; } /*****以上代码为SISchemeBiz中方法逻辑迁移,旨在减少Biz类的使用*****/ From 088a5c1d728fa590a3c3cd7da0b6ac914e937f79 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 20 Feb 2024 16:50:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=BC=B4=E7=BA=B3=E9=A1=B5=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siaccount/po/InsuranceAccountBatchPO.java | 19 +++ .../po/InsuranceAccountDetailPO.java | 49 +++++++ .../siaccount/po/InsuranceCompensationPO.java | 18 +++ .../InsuranceAccountBatchMapper.java | 3 + .../siaccount/InsuranceAccountBatchMapper.xml | 9 ++ .../service/impl/SIAccountServiceImpl.java | 138 +++++++++++++----- .../impl/SICompensationServiceImpl.java | 42 ++++++ 7 files changed, 243 insertions(+), 35 deletions(-) diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java index b3296596e..45de6f2ab 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.siaccount.po; import com.engine.salary.annotation.Encrypt; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -20,94 +21,112 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_bill_batch +@ElogTransform(name = "福利台账主表") public class InsuranceAccountBatchPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 账单月份 */ + @ElogTransform(name = "账单月份") private String billMonth; /** * 账单状态 0-未归档 1-已归档 */ + @ElogTransform(name = "账单状态") private Integer billStatus; /** * 社保核算人数 */ + @ElogTransform(name = "社保核算人数") private Integer socialNum; /** * 公积金核算人数 */ + @ElogTransform(name = "公积金核算人数") private Integer fundNum; /** * 其他福利核算人数 */ + @ElogTransform(name = "其他福利核算人数") private Integer otherNum; /** * 社保缴费总额(单位+个人) */ @Encrypt + @ElogTransform(name = "社保缴费总额(单位+个人)") private String socialPay; /** * 公积金缴费总额(单位+个人) */ @Encrypt + @ElogTransform(name = "公积金缴费总额(单位+个人)") private String fundPay; /** * 其他福利缴费总额(单位+个人) */ @Encrypt + @ElogTransform(name = "其他福利缴费总额(单位+个人)") private String otherPay; /** * 核算人 */ + @ElogTransform(name = "核算人") private String accountant; /** * 备注 */ + @ElogTransform(name = "备注") private String remarks; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人id") private Long paymentOrganization; diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java index 9cd2ad7f0..9b7c33cef 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java @@ -3,6 +3,7 @@ package com.engine.salary.entity.siaccount.po; import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.Encrypt; import com.engine.salary.annotation.SalaryTable; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -23,260 +24,308 @@ import java.util.Date; @AllArgsConstructor @SalaryTable(pageId = "2394fba1-1381-428a-8532-4e1e6b86626e", tableType = WeaTableType.CHECKBOX) //hrsa_bill_detail +@ElogTransform(name = "福利台账明细表") public class InsuranceAccountDetailPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 账单月份 */ + @ElogTransform(name = "账单月份") private String billMonth; /** * 账单状态 0-未归档 1-已归档 */ + @ElogTransform(name = "账单状态") private Integer billStatus; /** * 缴纳状态 */ + @ElogTransform(name = "缴纳状态") private Integer paymentStatus; /** * 补缴月份/退差月份 */ + @ElogTransform(name = "补缴月份/退差月份") private String supplementaryMonth; /** * 补缴项目 */ + @ElogTransform(name = "补缴项目") private String supplementaryProjects; /** * 数据来源 0-系统核算 1-临时数据 */ + @ElogTransform(name = "数据来源") private Integer resourceFrom; /** * 社保缴纳组织 */ + @ElogTransform(name = "社保缴纳组织") private Long socialPayOrg; /** * 社保账号 */ + @ElogTransform(name = "社保账号") private String socialAccount; /** * 公积金缴纳组织 */ + @ElogTransform(name = "公积金缴纳组织") private Long fundPayOrg; /** * 公积金账号 */ + @ElogTransform(name = "公积金账号") private String fundAccount; /** * 补充公积金账号 */ + @ElogTransform(name = "补充公积金账号") private String supplementFundAccount; /** * 其他福利缴纳组织 */ + @ElogTransform(name = "其他福利缴纳组织") private Long otherPayOrg; /** * 社保方案ID */ + @ElogTransform(name = "社保方案ID") private Long socialSchemeId; /** * 社保缴纳基数 */ @Encrypt + @ElogTransform(name = "社保缴纳基数") private String socialPaymentBaseString; /** * 社保缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "社保缴纳基数——单位") private String socialPaymentComBaseString; /** * 公积金方案ID */ + @ElogTransform(name = "公积金方案ID") private Long fundSchemeId; /** * 公积金缴纳基数 */ @Encrypt + @ElogTransform(name = "公积金缴纳基数") private String fundPaymentBaseString; /** * 公积金缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "公积金缴纳基数——单位") private String fundPaymentComBaseString; /** * 其他福利方案id */ + @ElogTransform(name = "其他福利方案id") private Long otherSchemeId; /** * 其他福利缴纳基数 */ @Encrypt + @ElogTransform(name = "其他福利缴纳基数") private String otherPaymentBaseString; /** * 其他福利缴纳基数——单位 */ @Encrypt + @ElogTransform(name = "其他福利缴纳基数——单位") private String otherPaymentComBaseString; /** * 社保个人缴费明细 */ @Encrypt + @ElogTransform(name = "社保个人缴费明细") private String socialPerJson; /** * 社保个人合计 */ @Encrypt + @ElogTransform(name = "社保个人合计") private String socialPerSum; /** * 公积金个人缴费明细 */ @Encrypt + @ElogTransform(name = "公积金个人缴费明细") private String fundPerJson; /** * 公积金个人合计 */ @Encrypt + @ElogTransform(name = "公积金个人合计") private String fundPerSum; /** * 其他福利个人缴费明细 */ @Encrypt + @ElogTransform(name = "其他福利个人缴费明细") private String otherPerJson; /** * 其他福利个人合计 */ @Encrypt + @ElogTransform(name = "其他福利个人合计") private String otherPerSum; /** * 个人合计 */ @Encrypt + @ElogTransform(name = "个人合计") private String perSum; /** * 社保单位缴费明细 */ @Encrypt + @ElogTransform(name = "社保单位缴费明细") private String socialComJson; /** * 社保单位合计 */ @Encrypt + @ElogTransform(name = "社保单位合计") private String socialComSum; /** * 公积金单位缴费明细 */ + @ElogTransform(name = "公积金单位缴费明细") private String fundComJson; /** * 公积金单位合计 */ + @ElogTransform(name = "公积金单位合计") private String fundComSum; /** * 其他福利单位缴费明细 */ + @ElogTransform(name = "其他福利单位缴费明细") private String otherComJson; /** * 其他福利单位合计 */ + @ElogTransform(name = "其他福利单位合计") private String otherComSum; /** * 单位合计 */ @Encrypt + @ElogTransform(name = "单位合计") private String comSum; /** * 社保合计 */ @Encrypt + @ElogTransform(name = "社保合计") private String socialSum; /** * 公积金合计 */ @Encrypt + @ElogTransform(name = "公积金合计") private String fundSum; /** * 其他福利合计 */ @Encrypt + @ElogTransform(name = "其他福利合计") private String otherSum; /** * 合计 */ @Encrypt + @ElogTransform(name = "合计") private String total; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人") private Long paymentOrganization; } diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java index 24ebde645..ff9ece22b 100644 --- a/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceCompensationPO.java @@ -1,5 +1,6 @@ package com.engine.salary.entity.siaccount.po; +import com.engine.salary.elog.annotation.ElogTransform; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -18,86 +19,103 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor //hrsa_compensation_log +@ElogTransform(name = "福利台账-调差历史表") public class InsuranceCompensationPO { /** * 主键id */ + @ElogTransform(name = "主键id") private Long id; /** * 缴纳组织 */ + @ElogTransform(name = "缴纳组织") private Long paymentAgency; /** * 个税扣缴义务人 */ + @ElogTransform(name = "个税扣缴义务人id") private Long paymentOrganization; /** * 创建人id */ + @ElogTransform(name = "创建人id") private Long creator; /** * 是否删除 */ + @ElogTransform(name = "是否删除") private Integer deleteType; /** * 创建时间 */ + @ElogTransform(name = "创建时间") private Date createTime; /** * 更新时间 */ + @ElogTransform(name = "更新时间") private Date updateTime; /** * 租户key */ + @ElogTransform(name = "租户key") private String tenantKey; /** * 员工id */ + @ElogTransform(name = "员工id") private Long employeeId; /** * 统计调差福利 */ + @ElogTransform(name = "统计调差福利") private Integer welfareType; /** * 统计调差福利类型 */ + @ElogTransform(name = "统计调差福利类型") private String categoryType; /** * 国家核算金额 */ + @ElogTransform(name = "国家核算金额") private String countryTotal; /** * 公司核算金额 */ + @ElogTransform(name = "公司核算金额") private String companyTotal; /** * 应调差额 */ + @ElogTransform(name = "应调差额") private String adjustmentTotal; /** * 调差到 */ + @ElogTransform(name = "调差到") private Long adjustTo; /** * 账单月份 */ + @ElogTransform(name = "账单月份") private String billMonth; //---------条件------- diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java index 60cd71788..7a183297d 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java @@ -50,6 +50,9 @@ public interface InsuranceAccountBatchMapper { */ void updateById(InsuranceAccountBatchPO pos); + InsuranceAccountBatchPO getById(@Param("id") Long id); + + /** * * @param billMonth diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml index 61223c9b0..4b45cb2f3 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml @@ -244,6 +244,15 @@ + +