From 654c8acf7761b35d935ec588a957b1e69af3e6a9 Mon Sep 17 00:00:00 2001 From: liuwu <975499773@qq.com> Date: Fri, 15 Sep 2023 14:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E5=92=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/base/controller/BaseUserController.java | 9 +++++++-- .../TAmentPartyAffairsController.java | 3 +++ .../cyx/web/base/domain/TAmentPersonnel.java | 9 +++++++++ .../controller/system/SysUserController.java | 8 ++++++++ .../java/com/cyx/wechat/WechatController.java | 5 ++++- .../templates/base/affairs/affairs.html | 14 +++++++------- .../resources/templates/base/affairs/day.html | 14 +++++++------- .../templates/base/affairs/finishedstatic.html | 17 +++++++++++++++++ .../templates/base/affairs/partystyle.html | 14 +++++++------- .../resources/templates/base/affairs/warn.html | 2 +- .../resources/templates/base/affairs/year.html | 14 +++++++------- .../main/resources/templates/base/user/add.html | 14 +++++++++++++- .../resources/templates/system/user/add.html | 6 +++++- .../mapper/base/TAmentPersonnelMapper.xml | 12 ++++++++++-- 14 files changed, 105 insertions(+), 36 deletions(-) diff --git a/cyx-admin/src/main/java/com/cyx/web/base/controller/BaseUserController.java b/cyx-admin/src/main/java/com/cyx/web/base/controller/BaseUserController.java index aca80c1..abf291e 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/controller/BaseUserController.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/controller/BaseUserController.java @@ -19,9 +19,9 @@ import com.cyx.system.service.ISysDeptService; import com.cyx.system.service.ISysPostService; import com.cyx.system.service.ISysRoleService; import com.cyx.system.service.ISysUserService; -import org.apache.catalina.User; +import com.cyx.web.base.domain.TAmentPersonnel; +import com.cyx.web.base.service.ITAmentPersonnelService; import org.apache.commons.lang3.ArrayUtils; -import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -30,6 +30,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; import java.util.List; import java.util.stream.Collectors; @@ -110,6 +111,9 @@ public class BaseUserController extends BaseController return util.importTemplateExcel("用户数据"); } + @Resource + private ITAmentPersonnelService personnelService; + /** * 新增用户 */ @@ -118,6 +122,7 @@ public class BaseUserController extends BaseController { mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); mmap.put("posts", postService.selectPostAll()); + mmap.put("perList",personnelService.selectTAmentPersonnelList(new TAmentPersonnel())); return prefix + "/add"; } diff --git a/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java b/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java index a33dd06..4a7effb 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/controller/TAmentPartyAffairsController.java @@ -69,6 +69,9 @@ public class TAmentPartyAffairsController extends BaseController public TableDataInfo warnList(TAmentPartyAffairs tAmentPartyAffairs) { startPage(); + if (!getLoginName().equals("admin")){ + tAmentPartyAffairs.setPerId(getSysUser().getUserId()); + } List list = tAmentPartyAffairsService.warnList(tAmentPartyAffairs); return getDataTable(list); } diff --git a/cyx-admin/src/main/java/com/cyx/web/base/domain/TAmentPersonnel.java b/cyx-admin/src/main/java/com/cyx/web/base/domain/TAmentPersonnel.java index a0e6fb2..b9c0104 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/domain/TAmentPersonnel.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/domain/TAmentPersonnel.java @@ -101,6 +101,15 @@ public class TAmentPersonnel extends BaseEntity /** 支部ID */ @Excel(name = "支部ID") private Long branchId; + private String branchName; + + public String getBranchName() { + return branchName; + } + + public void setBranchName(String branchName) { + this.branchName = branchName; + } /** 入党时间 */ @JsonFormat(pattern = "yyyy-MM-dd") diff --git a/cyx-admin/src/main/java/com/cyx/web/controller/system/SysUserController.java b/cyx-admin/src/main/java/com/cyx/web/controller/system/SysUserController.java index 1b3c8c0..4134353 100644 --- a/cyx-admin/src/main/java/com/cyx/web/controller/system/SysUserController.java +++ b/cyx-admin/src/main/java/com/cyx/web/controller/system/SysUserController.java @@ -2,6 +2,9 @@ package com.cyx.web.controller.system; import java.util.List; import java.util.stream.Collectors; + +import com.cyx.web.base.domain.TAmentPersonnel; +import com.cyx.web.base.service.ITAmentPersonnelService; import org.apache.commons.lang3.ArrayUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -34,6 +37,8 @@ import com.cyx.system.service.ISysPostService; import com.cyx.system.service.ISysRoleService; import com.cyx.system.service.ISysUserService; +import javax.annotation.Resource; + /** * 用户信息 * @@ -109,6 +114,8 @@ public class SysUserController extends BaseController return util.importTemplateExcel("用户数据"); } + @Resource + private ITAmentPersonnelService personnelService; /** * 新增用户 */ @@ -117,6 +124,7 @@ public class SysUserController extends BaseController { mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); mmap.put("posts", postService.selectPostAll()); + mmap.put("perList",personnelService.selectTAmentPersonnelList(new TAmentPersonnel())); return prefix + "/add"; } diff --git a/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java b/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java index 8076c4a..b577c66 100644 --- a/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java +++ b/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java @@ -59,12 +59,15 @@ public class WechatController extends BaseController { @GetMapping(value = "/getUserInfo") @ResponseBody public AjaxResult getUserInfo(SysUser user){ + JSONObject res = new JSONObject(); UsernamePasswordToken token = new UsernamePasswordToken(user.getLoginName(), user.getPassword(), true); Subject subject = SecurityUtils.getSubject(); try { subject.login(token); - return AjaxResult.success(token); + res.put("userInfo",getSysUser()); + res.put("perInfo",personnelService.selectTAmentPersonnelById(getSysUser().getUserId())); + return AjaxResult.success(res); } catch (AuthenticationException e) { diff --git a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html index 9fbdb94..64faa86 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html @@ -10,14 +10,14 @@
- 组织机构 -
-
- - - - + 党内职务
+ + + + + +
diff --git a/cyx-admin/src/main/resources/templates/base/affairs/day.html b/cyx-admin/src/main/resources/templates/base/affairs/day.html index 03761a4..5a5564c 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/day.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/day.html @@ -10,14 +10,14 @@
- 组织机构 -
-
- - - - + 部门
+ + + + + +
diff --git a/cyx-admin/src/main/resources/templates/base/affairs/finishedstatic.html b/cyx-admin/src/main/resources/templates/base/affairs/finishedstatic.html index 6671442..d2274f4 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/finishedstatic.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/finishedstatic.html @@ -130,6 +130,23 @@ field: 'reviewedTime', title: '审核时间' }, + { + field: 'status', + title: '状态', + formatter: function(value, row, index) { + var actions = []; + if (row.status === '1'){ + actions.push('待提交 '); + }else if (row.status === '2'){ + actions.push('待审核 '); + }else if (row.status === '3'){ + actions.push('已驳回 '); + }else if (row.status === '4'){ + actions.push('已完成 '); + } + return actions.join(''); + } + }, // { // title: '操作', // align: 'center', diff --git a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html index eab8433..d8805ee 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html @@ -10,14 +10,14 @@
- 组织机构 -
-
- - - - + 党内职务
+ + + + + +
diff --git a/cyx-admin/src/main/resources/templates/base/affairs/warn.html b/cyx-admin/src/main/resources/templates/base/affairs/warn.html index b5a64a2..990cb95 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/warn.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/warn.html @@ -154,7 +154,7 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('待提交 '); + actions.push('待提交 '); }else if (row.status === '2'){ actions.push('待审核 '); }else if (row.status === '3'){ diff --git a/cyx-admin/src/main/resources/templates/base/affairs/year.html b/cyx-admin/src/main/resources/templates/base/affairs/year.html index 7bf3e72..f88b9b0 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/year.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/year.html @@ -10,14 +10,14 @@
- 组织机构 -
-
- - - - + 部门
+ + + + + +
diff --git a/cyx-admin/src/main/resources/templates/base/user/add.html b/cyx-admin/src/main/resources/templates/base/user/add.html index 95e4c9b..6190429 100644 --- a/cyx-admin/src/main/resources/templates/base/user/add.html +++ b/cyx-admin/src/main/resources/templates/base/user/add.html @@ -10,11 +10,15 @@

基本信息

+
- +
@@ -148,6 +152,14 @@