From 599072e7873f697959ae554871217dc5be8e553b Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期二, 18 三月 2025 19:39:40 +0800
Subject: [PATCH] bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
index 94991de..265b190 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -523,10 +523,27 @@
      */
     @Override
     public void saveProcess(ComplaintProcessDTO dto, LoginUserInfoVO loginUserInfoVO) {
+        //获取当前身份
+        IdentityInformation identityInformationVO = identityInformationService.getIdentityInformation(loginUserInfoVO);
+
+        List<PermissionsVO> permissions = identityInformationVO.getPermissions();
+        if (permissions.isEmpty()) {
+            throw new ServiceException("请先完善个人信息");
+        }
+        //上级
+        String name = "";
+        if (identityInformationVO.getIdentity() == 2) {
+            //1=党员,2=管理员
+            SystemUser systemUser = identityInformationVO.getSystemUser();
+            name =   systemUser.getName();
+        }else if (identityInformationVO.getIdentity() == 1){
+            PartyMember partyMember = identityInformationVO.getPartyMember();
+            name = partyMember.getName();
+        }
         ComplaintProgress complaintProgress = BeanUtil.copyProperties(dto, ComplaintProgress.class);
         complaintProgress.setCreateTime(new Date());
         complaintProgress.setCreateBy(loginUserInfoVO.getUserId());
-        complaintProgress.setCreateByName(loginUserInfoVO.getNickName());
+        complaintProgress.setCreateByName(name);
         complaintProgressService.save(complaintProgress);
     }
 
@@ -546,18 +563,22 @@
             throw new ServiceException("请先完善个人信息");
         }
         Integer accountLevel = null;
+        String name = "";
         //上级
         if (identityInformationVO.getIdentity() == 2) {
             //1=党员,2=管理员
             SystemUser systemUser = identityInformationVO.getSystemUser();
             accountLevel = systemUser.getAccountLevel();
+            name =   systemUser.getName();
         }else if (identityInformationVO.getIdentity() == 1){
             accountLevel = 5;
+            PartyMember partyMember = identityInformationVO.getPartyMember();
+            name = partyMember.getName();
         }
         Complaint complaint = BeanUtil.copyProperties(dto, Complaint.class);
         complaint.setUpdateTime(new Date());
         complaint.setCompletionUserId(loginUserInfoVO.getUserId());
-        complaint.setCompletionUsername(loginUserInfoVO.getNickName());
+        complaint.setCompletionUsername(name);
         complaint.setCompletionUserPhone(loginUserInfoVO.getPhone());
         complaint.setCompletionTime(new Date());
         complaint.setCompletionUserLevel(accountLevel);

--
Gitblit v1.7.1