anderx 2 år sedan
förälder
incheckning
18bce9767a

+ 6 - 5
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -81,17 +81,17 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         if (in.getProcessStatus()==1){
             SysUser sysUser = userMapper.selectSuperUserByUid(in.getAid());
             openId=sysUser.getOpenId();
-            if (StringUtils.isNull(openId)){
+            if (StringUtils.isBlank(openId)){
                 log.debug(String.format("查询上级openId为空,%s",remarks));
             }
         }else if(in.getProcessStatus()==2||in.getProcessStatus()==3){
             SysUser sysUser = userMapper.selectUserById(in.getAid());
             openId=sysUser.getOpenId();
-            if (StringUtils.isNull(openId)){
-                log.debug(String.format("查询发起人openId,%s",remarks));
+            if (StringUtils.isBlank(openId)){
+                log.debug(String.format("查询发起人openId为空,%s",remarks));
             }
         }
-        if (StringUtils.isNotNull(openId)){
+        if (StringUtils.isNotBlank(openId)){
             weChatService.addNotice(openId, in.getId(),new Date(),remarks);
         }
     }
@@ -147,8 +147,9 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
         newP.setId(in.getId());
         newP.setProcessStatus(in.getProcessStatus());
         String username=SecurityUtils.getLoginUser().getUser().getNickName();
+        ProjectStaffRecord use = projectStaffRecordMapper.selectByPrimaryKey(in.getId());
+        in.setAid(use.getAid());
         if (in.getProcessStatus()==2){
-            ProjectStaffRecord use = projectStaffRecordMapper.selectByPrimaryKey(in.getId());
             if (use.getProcessStatus()!=1){
                 AjaxResult.error("项目流程无需审核!");
             }