From 4d8c54bf8a33a4d3d62c32b31e75a9994540cc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 2 Aug 2024 16:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=8A=A0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/salaryoptconfig.xml | 11 ++-------- .../entity/auth/param/AuthRoleSaveParam.java | 6 +++--- .../salary/entity/taxagent/bo/TaxAgentBO.java | 3 ++- .../service/auth/AuthRoleServiceImpl.java | 4 ++++ .../salary/service/auth/AuthService.java | 17 ++++++++++++++++ .../salary/service/auth/AuthServiceImpl.java | 20 +++++++++++++++++++ .../impl/SalaryArchiveServiceImpl.java | 5 +++++ 7 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 src/com/engine/salary/service/auth/AuthService.java create mode 100644 src/com/engine/salary/service/auth/AuthServiceImpl.java diff --git a/resource/WEB-INF/salaryoptconfig.xml b/resource/WEB-INF/salaryoptconfig.xml index 69fa54c7e..5d9d98f08 100644 --- a/resource/WEB-INF/salaryoptconfig.xml +++ b/resource/WEB-INF/salaryoptconfig.xml @@ -4,20 +4,13 @@ - - - - - - - - - + + diff --git a/src/com/engine/salary/entity/auth/param/AuthRoleSaveParam.java b/src/com/engine/salary/entity/auth/param/AuthRoleSaveParam.java index 658fae915..1d45ec604 100644 --- a/src/com/engine/salary/entity/auth/param/AuthRoleSaveParam.java +++ b/src/com/engine/salary/entity/auth/param/AuthRoleSaveParam.java @@ -23,9 +23,9 @@ public class AuthRoleSaveParam { @DataCheck(require = true, max = 40, message = "鍚嶇О涓嶅厑璁镐负绌,鍚嶇О涓嶈兘瓒呰繃40涓瓧绗") private String name; -// -// @DataCheck(require = true, max = 400, message = "鍚嶇О涓嶅厑璁镐负绌,鍚嶇О涓嶈兘瓒呰繃400涓瓧绗") -// private String description; + + @DataCheck(require = true, max = 400, message = "鍚嶇О涓嶅厑璁镐负绌,鍚嶇О涓嶈兘瓒呰繃400涓瓧绗") + private String description; /** * 鎵g即涔夊姟浜篿d diff --git a/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java b/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java index 6370d3f05..85e3b0076 100644 --- a/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java +++ b/src/com/engine/salary/entity/taxagent/bo/TaxAgentBO.java @@ -176,7 +176,8 @@ public class TaxAgentBO { map.put("id", e.getId()); map.put("name", e.getName()); map.put("employeeRange", "璁剧疆"); - map.put("role", rolelistMap.getOrDefault(e.getId(), Collections.emptyList()).stream().map(AuthRolePO::getName).collect(Collectors.joining(","))); +// map.put("role", rolelistMap.getOrDefault(e.getId(), Collections.emptyList()).stream().map(AuthRolePO::getName).collect(Collectors.joining(","))); + map.put("role", rolelistMap.getOrDefault(e.getId(), Collections.emptyList())); if (isDevolution) { List empIds = taxAgentAdmins.stream().filter(t -> t.getTaxAgentId().equals(e.getId())).map(TaxAgentAdminPO::getEmployeeId).collect(Collectors.toList()); List admins = adminList.stream().filter(a -> empIds.contains(a.getEmployeeId())).map(DataCollectionEmployee::getUsername).collect(Collectors.toList()); diff --git a/src/com/engine/salary/service/auth/AuthRoleServiceImpl.java b/src/com/engine/salary/service/auth/AuthRoleServiceImpl.java index 2d55e403a..58c0bad20 100644 --- a/src/com/engine/salary/service/auth/AuthRoleServiceImpl.java +++ b/src/com/engine/salary/service/auth/AuthRoleServiceImpl.java @@ -48,13 +48,16 @@ public class AuthRoleServiceImpl extends Service implements AuthRoleService { Date now = new Date(); Long id = param.getId(); String name = param.getName(); + String description = param.getDescription(); Long taxAgentId = param.getTaxAgentId(); + AuthRolePO po; if (id == null) { po = AuthRolePO.builder() .id(IdGenerator.generate()) .name(name) + .description(description) .taxAgentId(taxAgentId) .creator((long) user.getUID()) .createTime(now) @@ -82,6 +85,7 @@ public class AuthRoleServiceImpl extends Service implements AuthRoleService { AuthRolePO newPo = AuthRolePO.builder() .id(id) .name(name) + .description(description) .taxAgentId(po.getTaxAgentId()) .updateTime(now) .build(); diff --git a/src/com/engine/salary/service/auth/AuthService.java b/src/com/engine/salary/service/auth/AuthService.java new file mode 100644 index 000000000..b15b3f4ee --- /dev/null +++ b/src/com/engine/salary/service/auth/AuthService.java @@ -0,0 +1,17 @@ +package com.engine.salary.service.auth; + +import com.engine.salary.entity.auth.dto.AuthDTO; + +import java.util.List; + +/** + * 鏉冮檺 + *

Copyright: Copyright (c) 2024

+ *

Company: 娉涘井杞欢

+ * + * @author qiantao + * @version 1.0 + **/ +public interface AuthService { + List auth(String page); +} diff --git a/src/com/engine/salary/service/auth/AuthServiceImpl.java b/src/com/engine/salary/service/auth/AuthServiceImpl.java new file mode 100644 index 000000000..9103494af --- /dev/null +++ b/src/com/engine/salary/service/auth/AuthServiceImpl.java @@ -0,0 +1,20 @@ +package com.engine.salary.service.auth; + +import com.engine.core.impl.Service; +import com.engine.salary.entity.auth.dto.AuthDTO; +import com.engine.salary.mapper.auth.AuthMapper; +import com.engine.salary.util.db.MapperProxyFactory; + +import java.util.List; + +public class AuthServiceImpl extends Service implements AuthService { + private AuthMapper getAuthMapper() { + return MapperProxyFactory.getProxy(AuthMapper.class); + } + + @Override + public List auth(String page) { + return getAuthMapper().getAuth((long) user.getUID(), page); + } + +} diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index b468c29d3..568b7719b 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -184,6 +184,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe queryParam.setPayEndDateEndDate(SalaryDateUtil.stringToDate(queryParam.getPayEndDateEndDateStr())); } + //鑳芥煡鐪嬪摢浜涙。妗 + + //鑳界鐞嗗摢浜涙。妗 + + List list = getSalaryArchiveMapper().list(queryParam); return SalaryI18nUtil.i18nList(list); }