From 0d7cdeddb068292681497b2fee5fac3a976662ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 26 Sep 2024 15:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E5=8F=B0=E8=B4=A6=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../siaccount/bo/InsuranceAccountBO.java | 1 + .../dto/InsuranceAccountBatchListDTO.java | 5 ++- .../po/InsuranceArchivesBaseInfoPO.java | 7 ++++ .../service/impl/SIAccountServiceImpl.java | 35 ----------------- .../service/impl/SIArchivesServiceImpl.java | 38 +++---------------- 5 files changed, 17 insertions(+), 69 deletions(-) diff --git a/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java b/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java index 8aa28ab09..f2af2ac95 100644 --- a/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java +++ b/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java @@ -67,6 +67,7 @@ public class InsuranceAccountBO { .paymentOrganization(e.getPaymentOrganization() != null ? MapperProxyFactory.getProxy(TaxAgentMapper.class).getById(e.getPaymentOrganization()).getName() : "") .paymentOrganizationId(e.getPaymentOrganization()) .creator(e.getCreator()) + .opts(e.getOpts()) .build() ).collect(Collectors.toList()); } diff --git a/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java index 23afba707..28939613b 100644 --- a/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java +++ b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java @@ -2,7 +2,6 @@ package com.engine.salary.entity.siaccount.dto; import com.cloudstore.eccom.pc.table.WeaTableType; import com.engine.salary.annotation.SalaryTable; -import com.engine.salary.annotation.SalaryTableColumn; import com.engine.salary.annotation.SalaryTableOperate; import com.engine.salary.annotation.TableTitle; import lombok.AllArgsConstructor; @@ -10,6 +9,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import java.util.Set; + /** * @Author weaver_cl * @Description: 福利台账列表 @@ -111,6 +112,8 @@ public class InsuranceAccountBatchListDTO { @TableTitle(title = "备注", dataIndex = "remarks", key = "remarks") private String remarks; + private Set opts; + diff --git a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java index 7de87c044..fcd72acd7 100644 --- a/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java +++ b/src/com/engine/salary/entity/siarchives/po/InsuranceArchivesBaseInfoPO.java @@ -1,6 +1,8 @@ package com.engine.salary.entity.siarchives.po; import com.engine.hrmelog.annotation.ElogTransform; +import com.engine.salary.annotation.Auth; +import com.engine.salary.enums.auth.AuthCheckTypeEnum; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import com.engine.salary.enums.siaccount.EmployeeStatusEnum; import lombok.AllArgsConstructor; @@ -10,6 +12,7 @@ import lombok.NoArgsConstructor; import java.util.Collection; import java.util.Date; +import java.util.Set; /** * @Author: sy @@ -22,6 +25,7 @@ import java.util.Date; @AllArgsConstructor //hrsa_insurance_base_info @ElogTransform(name = "福利档案主表") +@Auth(page = "siArchive", checkType = AuthCheckTypeEnum.TAX_EMP, employeeIdField = "employeeId", taxAgentIdField = "paymentOrganization") public class InsuranceArchivesBaseInfoPO { /** * 主键id @@ -107,4 +111,7 @@ public class InsuranceArchivesBaseInfoPO { //---------条件------- private Collection ids; private Collection employeeIds; + + + private Set opts; } diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 7259bc692..e2e35cc8f 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -270,27 +270,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { table.setColumns(weaTableColumn); - //table.getColumns().get(0).setFixed("left"); -// for (int i = 0; i < insuranceAccountBatchListDTOS.size(); i++) { -// InsuranceAccountBatchListDTO insuranceAccountBatchListDTO = insuranceAccountBatchListDTOS.get(i); -// if (Objects.equals(insuranceAccountBatchListDTO.getBillStatus(), BillStatusEnum.ARCHIVED.getDefaultLabel())) { -// table.getOperates().getOperate().get(i).getIndex(); -// -// resultTable.getOperatesPermission().get(i).get(0).setVisible(false); -// resultTable.getOperatesPermission().get(i).get(1).setVisible(false); -// resultTable.getOperatesPermission().get(i).get(2).setVisible(false); -// resultTable.getOperatesPermission().get(i).get(3).setVisible(false); -// resultTable.getOperates().get(4).setOuter(true); -// } -// if (Objects.equals(insuranceAccountBatchListDTO.getBillStatus(), BillStatusEnum.NOT_ARCHIVED.getDefaultLabel())) { -// resultTable.getOperatesPermission().get(i).get(4).setVisible(false); -// List insuranceAccountInspectPOS = siAccountInspectService.listByBillMonth(insuranceAccountBatchListDTO.getBillMonth(), tenantKey); -// if (CollectionUtils.isEmpty(insuranceAccountInspectPOS)) { -// resultTable.getOperatesPermission().get(i).get(2).setVisible(false); -// } -// } -// } - WeaResultMsg result = new WeaResultMsg(false); result.putAll(table.makeDataResult()); result.success(); @@ -299,20 +278,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { datas.put("operatesPermission", operatesPermission); datas.put("dataKey", result.getResultMap()); return datas; - -// WeaTable resultTable = FormatManager.getInstance() -// .genTable(InsuranceAccountBatchListDTO.class, insuranceAccountBatchListDTOPage); -// -// resultTable.getOperates().forEach(e -> { -// if (e.getIndex() == 0) { -// e.setOuter(true); -// } -// }); - -// resultTable.setModule("hrmsalary"); -// resultTable.getColumns().get(0).setFixed("left"); -// return WeaResult.success(resultTable); - } @Override diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index 3d3512440..729a7df49 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -32,7 +32,6 @@ import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO; import com.engine.salary.entity.sischeme.po.InsuranceSchemePO; import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; -import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO; import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam; import com.engine.salary.entity.taxagent.po.TaxAgentEmpChangePO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; @@ -272,16 +271,6 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService OrderRuleVO orderRule = getSalarySysConfService(user).orderRule(); param.setOrderRule(orderRule); - Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId); - param.setNeedAuth(needAuth); - if (needAuth) { - List taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployee(currentEmployeeId); - Set employeeIds = SalaryEntityUtil.properties(taxAgentEmployeeDTOS, TaxAgentEmployeeDTO::getEmployeeId); - Set taxAgentIds = SalaryEntityUtil.properties(taxAgentEmployeeDTOS, TaxAgentEmployeeDTO::getTaxAgentId); - param.setTaxAgentEmployeeIds(employeeIds); - param.setTaxAgentIds(taxAgentIds); - } - Map apidatas = new HashMap<>(16); // apidatas = siArchivesBiz.listPage(param, (long) user.getUID()); apidatas = listPage(param, (long) user.getUID()); @@ -824,29 +813,11 @@ 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); - List list = null; - if (needAuth) { - // 获取作为管理员的所有个税扣缴义务人列表 - 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(); - } + + List list = getInsuranceBaseInfoMapper().listAll(); + list = getAuthService(user).auth(list, AuthFilterTypeEnum.QUERY_DATA, InsuranceArchivesBaseInfoPO.class); long stayAddTotal = 0L; long payTotal = 0L; @@ -1716,8 +1687,9 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService 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("baseInfoId", item.getBaseInfoId()); map.put("paymentOrganization", item.getPaymentOrganization()); + map.put("opts", item.getOpts()); if (socialItem != null) { map.put("socialName", getInsuranceSchemeMapper().querySchemeName(socialItem.getSocialSchemeId())); Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() {