From 69877f518fe45351efba00a3211c9ae031565489 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 29 May 2024 18:56:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=89=BE=E5=BF=97=20=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E7=AE=A1=E7=90=86=E5=91=98=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E4=B8=94=E6=B3=A8=E9=87=8A=E4=B8=8A=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E6=89=80=E5=BC=80=E5=8F=91=E7=9A=84=E5=88=86=E6=9D=83=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=88=E9=80=9A=E8=BF=87=E5=BB=BA=E6=A8=A1=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E9=83=A8=E9=97=A8=E7=BB=B4=E5=BA=A6=E6=89=80=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E6=9D=83=E9=99=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/EmployeeDeclareService.java | 8 +- .../impl/EmployeeDeclareServiceImpl.java | 76 +++++++++---------- 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/com/engine/salary/service/EmployeeDeclareService.java b/src/com/engine/salary/service/EmployeeDeclareService.java index 25bd4babd..d1cb79875 100644 --- a/src/com/engine/salary/service/EmployeeDeclareService.java +++ b/src/com/engine/salary/service/EmployeeDeclareService.java @@ -6,13 +6,11 @@ import com.engine.salary.entity.employeedeclare.dto.EmployeeDeclareListDTO; import com.engine.salary.entity.employeedeclare.dto.EmployeeDeclareRateDTO; import com.engine.salary.entity.employeedeclare.param.*; import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO; -import com.engine.salary.entity.taxdeclaration.dto.AzGssbDTO; import com.engine.salary.util.page.PageInfo; import java.util.Collection; import java.util.Date; import java.util.List; -import java.util.Map; /** * 人员报送(人员) @@ -202,7 +200,7 @@ public interface EmployeeDeclareService{ List listByEmpIdsAndTaxCycle(List empIds, Date date); - List getAzGssbAuth(int uid); - - Map empIdsByAzGssbAuth(int uid); + // List getAzGssbAuth(int uid); + // + // Map empIdsByAzGssbAuth(int uid); } diff --git a/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java b/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java index dc2d2d5f6..6a53fe013 100644 --- a/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java +++ b/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl.java @@ -835,43 +835,43 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla return getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder().employeeIds(empIds).taxCycle(date).build()); } - @Override - public List getAzGssbAuth(int uid) { - RecordSet rs = new RecordSet(); - rs.execute("select qx,bm from uf_gssbqx where gsglry="+uid); - List azGssbAuthList = new ArrayList<>(); - while (rs.next()) { - azGssbAuthList.add(AzGssbDTO.builder() - .gsglry(uid) - .bm(rs.getInt("bm")) - .qx(rs.getInt("qx")).build()); - } - azGssbAuthList = azGssbAuthList.stream().filter(auth -> auth.getQx() == 0 || auth.getQx() == 1).collect(Collectors.toList()); - return azGssbAuthList; - } + // @Override + // public List getAzGssbAuth(int uid) { + // RecordSet rs = new RecordSet(); + // rs.execute("select qx,bm from uf_gssbqx where gsglry="+uid); + // List azGssbAuthList = new ArrayList<>(); + // while (rs.next()) { + // azGssbAuthList.add(AzGssbDTO.builder() + // .gsglry(uid) + // .bm(rs.getInt("bm")) + // .qx(rs.getInt("qx")).build()); + // } + // azGssbAuthList = azGssbAuthList.stream().filter(auth -> auth.getQx() == 0 || auth.getQx() == 1).collect(Collectors.toList()); + // return azGssbAuthList; + // } - public Map empIdsByAzGssbAuth(int uid) { - //艾志二开,登录人拥有查看、编辑部门权限下的人员 - List azGssbAuth = getAzGssbAuth(uid); - List empListByDep = new ArrayList<>(); - if (azGssbAuth.size() > 0) { - List depWithChildList = new ArrayList<>(); - for (AzGssbDTO dto : azGssbAuth) { - try { - String depStr = DepartmentComInfo.getAllChildDepartId(String.valueOf(dto.getBm()), String.valueOf(dto.getBm())); - depWithChildList.addAll(Arrays.stream(depStr.split(",")).map(Long::parseLong).collect(Collectors.toList())); - } catch (Exception e) { - e.printStackTrace(); - } - } - //查询有权限部门包含的员工id - empListByDep = getSalaryEmployeeService(user).listEmpIdByDepId(depWithChildList); - } - Map resultMap = new HashMap<>(); - resultMap.put("canManageEmpIds", empListByDep); - // 客户会规定一个用户在建模表中要么全是查看权限,要么全是编辑权限 - Optional canOperate = azGssbAuth.stream().filter(dto -> dto.getQx() == 1).findFirst(); - resultMap.put("canOperate", canOperate.isPresent()); - return resultMap; - } + // public Map empIdsByAzGssbAuth(int uid) { + // //艾志二开,登录人拥有查看、编辑部门权限下的人员 + // List azGssbAuth = getAzGssbAuth(uid); + // List empListByDep = new ArrayList<>(); + // if (azGssbAuth.size() > 0) { + // List depWithChildList = new ArrayList<>(); + // for (AzGssbDTO dto : azGssbAuth) { + // try { + // String depStr = DepartmentComInfo.getAllChildDepartId(String.valueOf(dto.getBm()), String.valueOf(dto.getBm())); + // depWithChildList.addAll(Arrays.stream(depStr.split(",")).map(Long::parseLong).collect(Collectors.toList())); + // } catch (Exception e) { + // e.printStackTrace(); + // } + // } + // //查询有权限部门包含的员工id + // empListByDep = getSalaryEmployeeService(user).listEmpIdByDepId(depWithChildList); + // } + // Map resultMap = new HashMap<>(); + // resultMap.put("canManageEmpIds", empListByDep); + // // 客户会规定一个用户在建模表中要么全是查看权限,要么全是编辑权限 + // Optional canOperate = azGssbAuth.stream().filter(dto -> dto.getQx() == 1).findFirst(); + // resultMap.put("canOperate", canOperate.isPresent()); + // return resultMap; + // } }