Sfoglia il codice sorgente

修改党员风采新增接口

wch 3 anni fa
parent
commit
0d0040564e

+ 3 - 3
ruoyi-hndj/src/main/java/com/ruoyi/base/staff/domain/Staff.java

@@ -115,7 +115,7 @@ public class Staff extends BaseEntity
     private String organize;
 
     /** 党组织代码 */
-    private String organizeCode;
+    private Long organizeCode;
 
     /** 联合支部单位名称 */
     @Excel(name = "联合支部单位名称")
@@ -355,11 +355,11 @@ public class Staff extends BaseEntity
         this.organize = organize;
     }
 
-    public String getOrganizeCode() {
+    public Long getOrganizeCode() {
         return organizeCode;
     }
 
-    public void setOrganizeCode(String organizeCode) {
+    public void setOrganizeCode(Long organizeCode) {
         this.organizeCode = organizeCode;
     }
 

+ 1 - 1
ruoyi-hndj/src/main/java/com/ruoyi/base/staff/service/impl/StaffServiceImpl.java

@@ -190,7 +190,7 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
                     if(StringUtils.isNull(staff.getAge()))
                         staff.setAge(DateUtils.getAge(staff.getBirthDate()));
 
-                    staff.setOrganizeCode(sysDeptMapper.selectOrganizeCode(staff.getOrganize()));
+                    staff.setOrganizeCode(Long.valueOf(sysDeptMapper.selectOrganizeCode(staff.getOrganize())));
                     staff.setCreateBy(operName);
                    /* sysUserService.insertUser(user);
                     this.insertStaff(staff);

+ 11 - 3
ruoyi-hndj/src/main/java/com/ruoyi/daily/member/service/impl/MemberServiceImpl.java

@@ -2,10 +2,13 @@ package com.ruoyi.daily.member.service.impl;
 
 import java.util.List;
 
+import com.ruoyi.base.staff.mapper.StaffMapper;
 import com.ruoyi.common.annotation.DataScope;
+import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.ShiroUtils;
+import com.ruoyi.system.mapper.SysDeptMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.daily.member.mapper.MemberMapper;
@@ -25,6 +28,11 @@ public class MemberServiceImpl implements IMemberService
     @Autowired
     private MemberMapper memberMapper;
 
+    @Autowired
+    private StaffMapper staffMapper;
+
+    @Autowired
+    private SysDeptMapper deptMapper;
     /**
      * 查询党员风采管理
      * 
@@ -62,9 +70,9 @@ public class MemberServiceImpl implements IMemberService
         member.setCreateBy(ShiroUtils.getLoginName());
         member.setPublishBy(ShiroUtils.getLoginName());
         member.setCreateTime(DateUtils.getNowDate());
-
-        member.setPubOrganize(ShiroUtils.getSysUser().getDept().getDeptName());
-        member.setPubOrganizeId(ShiroUtils.getSysUser().getDeptId().toString());
+        SysDept dept = deptMapper.selectDeptById(staffMapper.selectStaffById(member.getStaffId()).getOrganizeCode());
+        member.setPubOrganize(dept.getDeptName());
+        member.setPubOrganizeId(dept.getDeptId().toString());
 
         member.setStatus("1");//新增初审给未审核终审不给用于前端控制审核按钮