From 0dcf566571103d248941045ae42bea38dd83f7ff Mon Sep 17 00:00:00 2001 From: Paidax Date: Tue, 30 Dec 2025 19:28:52 +0800 Subject: [PATCH] =?UTF-8?q?pref=5F#jshvc=E5=B7=A5=E4=BC=9A=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/services/impl/SysUserServiceImpl.java | 18 ++++++++++++++++++ .../impl/SpecialStaffManageServiceImpl.java | 2 +- .../specialstaff/vo/SpecialStaffVo.java | 2 ++ .../staffmanage/specialstaff/manage/index.html | 13 +++---------- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java b/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java index 2bda773..92d9f89 100644 --- a/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java +++ b/src/main/java/com/budwk/app/sys/services/impl/SysUserServiceImpl.java @@ -20,6 +20,7 @@ import com.budwk.app.sys.services.SysRoleService; import com.budwk.app.sys.services.SysUserService; import com.budwk.app.sys.views.View_user; import com.budwk.app.web.commons.base.Globals; +import com.budwk.app.zhgh.staffmanage.specialstaff.model.SpecialStaff; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Chain; import org.nutz.dao.Cnd; @@ -369,6 +370,16 @@ public class SysUserServiceImpl extends BaseServiceImpl implements Sys throw new BaseException("用户不存在"); } user = this.fetchLinks(user, null); + + // 工会关系人员 + SpecialStaff staff = dao().fetch(SpecialStaff.class, Cnd.where("userId", "=", userId)); + if (Lang.isNotEmpty(staff)) { + Sys_union union = dao().fetch(Sys_union.class, staff.getUnionRelationUnionId()); + if (Lang.isNotEmpty(user.getUnit())) { + user.getUnit().setUnionId(union.getId()); + } + } + if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) { Sys_union union = dao().fetch(Sys_union.class, user.getUnit().getUnionId()); user.setUnion(union); @@ -391,6 +402,13 @@ public class SysUserServiceImpl extends BaseServiceImpl implements Sys StpUtil.checkLogin(); // 查询一下视图,存储一些sys_user表中没有的字段 View_user viewUser = dao().fetch(View_user.class, Cnd.where("id", "=", user.getId())); + // 工会关系人员 + SpecialStaff staff = dao().fetch(SpecialStaff.class, Cnd.where("userId", "=", user.getId())); + if (Lang.isNotEmpty(staff)) { + Sys_union union = dao().fetch(Sys_union.class, viewUser.getUnionId()); + user.setUnion(union); + } + StpUtil.getSession(true) .set("loginname", Strings.sNull(user.getLoginname())) .set("username", Strings.sNull(user.getUsername())) diff --git a/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/service/impl/SpecialStaffManageServiceImpl.java b/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/service/impl/SpecialStaffManageServiceImpl.java index d8fb2c7..4fad11c 100644 --- a/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/service/impl/SpecialStaffManageServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/service/impl/SpecialStaffManageServiceImpl.java @@ -74,7 +74,7 @@ public class SpecialStaffManageServiceImpl extends BaseServiceImpl cnd.andEX("u.unitId", "=", pageForm.getUnitId()); cnd.andEX("u.personType", "=", pageForm.getPersonType()); cnd.andEX("u.userState", "=", pageForm.getUserState()); - cnd.andEX("u.personType", "=", pageForm.getPersonType()); + cnd.andEX("u.preparedBy", "=", pageForm.getPersonType()); cnd.andEX("s.specialStaffType", "=", pageForm.getSpecialStaffType()); sql.setCondition(cnd); return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); diff --git a/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/vo/SpecialStaffVo.java b/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/vo/SpecialStaffVo.java index d9460a6..ab52a81 100644 --- a/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/vo/SpecialStaffVo.java +++ b/src/main/java/com/budwk/app/zhgh/staffmanage/specialstaff/vo/SpecialStaffVo.java @@ -21,6 +21,8 @@ public class SpecialStaffVo { private String personnelRelationThreeUnitName; private String personnelRelationUnionGroupName; private String unionRelationUnitId; + private String unionRelationUnitName; + private String unionRelationUnionId; private String unionRelationUnionName; private String unionRelationThreeUnitId; private String unionRelationUnionGroupName; diff --git a/src/main/resources/views/platform/zhgh/staffmanage/specialstaff/manage/index.html b/src/main/resources/views/platform/zhgh/staffmanage/specialstaff/manage/index.html index e2cc2ed..3778767 100644 --- a/src/main/resources/views/platform/zhgh/staffmanage/specialstaff/manage/index.html +++ b/src/main/resources/views/platform/zhgh/staffmanage/specialstaff/manage/index.html @@ -143,7 +143,7 @@ layout("/layouts/platform.html"){ -