Selaa lähdekoodia

bugfix: 党员名册分页数据条数显示不全

Wang Zi Wen 1 vuosi sitten
vanhempi
commit
d8301322e7

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchMemberController.java

@@ -227,6 +227,17 @@ public class TBranchMemberController extends BaseController {
         return dataTable;
     }
 
+    /**
+     * 查询支部成员管理列表(党员名册)
+     */
+    @PreAuthorize("@ss.hasPermi('branch:member:list')")
+    @GetMapping("/listdymc")
+    public TableDataInfo listDymc(TBranchMember tBranchMember) {
+        startPage();
+        List<TBranchMember> list = tBranchMemberService.selectTBranchMemberListDymc(tBranchMember);
+        return getDataTable(list);
+    }
+
     /**
      * 导出支部成员管理列表
      */

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/mapper/TBranchMemberMapper.java

@@ -37,6 +37,7 @@ public interface TBranchMemberMapper
      * @return 支部成员管理集合
      */
     public List<TBranchMember> selectTBranchMemberList(TBranchMember tBranchMember);
+    public List<TBranchMember> selectTBranchMemberListDymc(TBranchMember tBranchMember);
     public List<TBranchWyhVo> selectTBranchWyhVoList(TBranchMember tBranchMember);
     public List<TBranchDyVo> selectTBranchDyVoList(TBranchMember tBranchMember);
     public List<TBranchJjfzFzdxVo> selectTBranchJjfzFzdxVoList(TBranchMember tBranchMember);

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/ITBranchMemberService.java

@@ -37,6 +37,7 @@ public interface ITBranchMemberService
      * @return 支部成员管理集合
      */
     public List<TBranchMember> selectTBranchMemberList(TBranchMember tBranchMember);
+    public List<TBranchMember> selectTBranchMemberListDymc(TBranchMember tBranchMember);
     public List<TBranchWyhVo> selectTBranchWyhVoList(TBranchMember tBranchMember);
     public List<TBranchDyVo> selectTBranchDyVoList(TBranchMember tBranchMember);
     public List<TBranchJjfzFzdxVo> selectTBranchJjfzFzdxVoList(TBranchMember tBranchMember);

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/service/impl/TBranchMemberServiceImpl.java

@@ -63,6 +63,19 @@ public class TBranchMemberServiceImpl implements ITBranchMemberService
         return tBranchMemberMapper.selectTBranchMemberList(tBranchMember);
     }
 
+    /**
+     * 查询支部成员管理列表(党员名册)
+     *
+     * @param tBranchMember 支部成员管理
+     * @return 支部成员管理
+     */
+    @Override
+    @DataScope(deptAlias = "d", userAlias = "u")
+    public List<TBranchMember> selectTBranchMemberListDymc(TBranchMember tBranchMember)
+    {
+        return tBranchMemberMapper.selectTBranchMemberListDymc(tBranchMember);
+    }
+
     /**
      * 新增支部成员管理
      *

+ 39 - 0
ruoyi-system/src/main/resources/mapper/branch/TBranchMemberMapper.xml

@@ -177,6 +177,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ${params.dataScope}
     </select>
 
+    <select id="selectTBranchMemberListDymc" parameterType="TBranchMember" resultMap="TBranchMemberResult">
+        select u.member_id, u.new_dept_id, u.old_dept_id, u.ap_no, u.process_id, u.ap_status, u.user_id, u.staff_id, u.ethnic, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.labour_entry_time, u.labour_leave_time, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
+        us.NICK_NAME, us.SEX, us.PHONENUMBER, us.PHOTO
+        from t_branch_member u
+        left join sys_dept d on u.dept_id = d.dept_id
+        left join SYS_USER us on us.user_id = u.user_id
+        <where>
+            <if test="memberId != null "> and u.member_id = #{memberId}</if>
+            <if test="userId != null "> and u.user_id = #{userId}</if>
+            <if test="memberType != null  and memberType != '' and memberType == 1"> and u.member_type = '1' </if>
+            <if test="memberType != null  and memberType != '' and memberType == 2"> and u.member_type in ('2', '3', '5') </if>
+            <if test="memberType != null  and memberType != '' and memberType == 3"> and u.member_type = '3' </if>
+            <if test="memberType != null  and memberType != '' and memberType == 4"> and u.member_type = '4' </if>
+            <if test="ethnic != null  and ethnic != ''"> and u.ethnic = #{ethnic}</if>
+            <if test="staffId != null  and staffId != ''"> and u.staff_id = #{staffId}</if>
+            <if test="birthday != null "> and u.birthday = #{birthday}</if>
+            <if test="educationLevel != null  and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
+            <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
+            <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
+            <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
+            <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
+            <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
+            <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
+            <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
+            <if test="isLeague != null  and isLeague != ''"> and u.is_league = #{isLeague}</if>
+            <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
+            <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
+            <if test="currentMentor != null  and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
+            <if test="planDevelopDuration != null  and planDevelopDuration != ''"> and u.plan_develop_duration = #{planDevelopDuration}</if>
+            <if test="isTrained != null  and isTrained != ''"> and u.is_trained = #{isTrained}</if>
+            <if test="remarks != null  and remarks != ''"> and u.remarks like concat(concat('%', #{remarks}), '%')</if>
+            <if test="deptId != null "> and u.dept_id = #{deptId}</if>
+            <if test="nickName != null  and nickName != ''"> and us.nick_name like concat(concat('%', #{nickName}), '%')</if>
+            and u.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
     <select id="selectTBranchWyhVoList" parameterType="TBranchMember" resultMap="TBranchWyhResult">
         <include refid="selectTBranchMemberVo"/>
         <where>

+ 9 - 0
ruoyi-ui/src/api/branch/member.js

@@ -36,6 +36,15 @@ export function listMember(query) {
   })
 }
 
+// 查询支部成员管理列表(党员名册)
+export function listMemberDymc(query) {
+  return request({
+    url: '/branch/member/listdymc',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询支部成员管理详细
 export function getMember(memberId) {
   return request({

+ 24 - 24
ruoyi-ui/src/views/branch/zbjs/dymc/index.vue

@@ -382,7 +382,7 @@
 </template>
 
 <script>
-  import { applyMember, listMember, getMember, delMember, addMember, updateMember, exportMember, importTemplate} from "@/api/branch/member";
+  import { listMemberDymc, applyMember, listMember, getMember, delMember, addMember, updateMember, exportMember, importTemplate} from "@/api/branch/member";
   import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
   import { treeselect } from "@/api/system/dept";
   import { getToken } from "@/utils/auth";
@@ -591,30 +591,30 @@
       getList() {
         this.loading = true;
         this.queryParams.memberType = 2;
-        listMember(this.queryParams).then(response => {
+        listMemberDymc(this.queryParams).then(response => {
           this.memberList = response.rows;
-          for (let i = 0; i < this.memberList.length; i++) {
-            let posts = Array.from(this.memberList[i].posts);
-            let roles = Array.from(this.memberList[i].roles);
-            let roleString = "";
-            let postString = "";
-            for (let j = 0; j < roles.length; j++) {
-              if (j > 0) {
-                roleString += "\n兼" + roles[j].roleName;
-              } else {
-                roleString += roles[j].roleName;
-              }
-            }
-            for (let j = 0; j < posts.length; j++) {
-              if (j > 0) {
-                postString += "\n兼" + posts[j].postName;
-              } else {
-                postString += posts[j].postName;
-              }
-            }
-            this.memberList[i].roleString = roleString;
-            this.memberList[i].postString = postString;
-          }
+          // for (let i = 0; i < this.memberList.length; i++) {
+          //   let posts = Array.from(this.memberList[i].posts);
+          //   let roles = Array.from(this.memberList[i].roles);
+          //   let roleString = "";
+          //   let postString = "";
+          //   for (let j = 0; j < roles.length; j++) {
+          //     if (j > 0) {
+          //       roleString += "\n兼" + roles[j].roleName;
+          //     } else {
+          //       roleString += roles[j].roleName;
+          //     }
+          //   }
+          //   for (let j = 0; j < posts.length; j++) {
+          //     if (j > 0) {
+          //       postString += "\n兼" + posts[j].postName;
+          //     } else {
+          //       postString += posts[j].postName;
+          //     }
+          //   }
+          //   this.memberList[i].roleString = roleString;
+          //   this.memberList[i].postString = postString;
+          // }
           this.total = response.total;
           this.loading = false;
         });