Browse Source

feat: 人员选择组件可显示所有状态的人员

zhangying 5 months ago
parent
commit
7599f85c22

+ 52 - 0
src/main/java/com/ghsc/partybuild/controller/PartyUserController.java

@@ -101,6 +101,58 @@ public class PartyUserController {
         return result;
     }
 
+    @ResponseBody
+    @GetMapping("/getPartyUserListByRYZT")
+    public RequsetData<PageInfo<HashMap<String, Object>>> selectPartyUserListByAllRYZT(@RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize, @RequestParam(required = false) String xb,
+                                                                           @RequestParam(required = false) String dzzdm, @RequestParam(required = false) String rybm, @RequestParam(required = false) String xm, @RequestParam(required = false) String zzlb,
+                                                                           @RequestParam(required = false) String zwjb, @RequestParam(required = false) String sqrdrq_begin, @RequestParam(required = false) String sqrdrq_end
+            , @RequestParam(required = false) String szdzb, @RequestParam(required = false) String szdxz,
+                                                                           @RequestParam(required = false) String userIds, @RequestParam(required = false) String ryzt, @RequestParam(required = false) String removeUsers, @RequestParam(required = false) String szdzbdm, @RequestParam(required = false) String rybm_list,
+                                                                           @RequestParam(required = false) Integer zzfbType,
+                                                                           @RequestParam(required = false) String removeUserRybm,
+                                                                           @RequestParam(required = false) String mz, @RequestParam(required = false) String dnzw, @RequestParam(required = false) String xl,
+                                                                           @RequestParam(required = false) Integer age_begin, @RequestParam(required = false) Integer age_end, @RequestParam(required = false) Integer sfsldry,
+                                                                           @RequestParam(required = false) String zwmc, @RequestParam(required = false) Integer sfzg, @RequestParam(required = false) String jczzfl, @RequestParam(required = false) String leadId, @RequestParam(required = false) String partyGroupId
+            , @RequestParam(required = false) String mobile,@RequestParam(required = false) Integer isStudent,@RequestParam(required = false) Integer leaderTeamUserType) {
+
+        sqrdrq_begin = dateUtils.strFormat_short(sqrdrq_begin);
+        sqrdrq_end = dateUtils.strFormat_short(sqrdrq_end);
+
+        List<String> userIdList = new ArrayList<>();
+        if (!stringUtils.IsNullOrEmpty(userIds)) {
+            userIdList = Arrays.asList(userIds.split(","));
+        }
+
+        List<String> ryztList = new ArrayList<>();
+        if (!stringUtils.IsNullOrEmpty(ryzt)) {
+            ryztList = Arrays.asList(ryzt.split(","));
+        }
+
+        //需排除的人员id
+        List<String> removeUserList = new ArrayList<>();
+        if (!stringUtils.IsNullOrEmpty(removeUsers)) {
+            removeUserList = Arrays.asList(removeUsers.split(","));
+        }
+
+        //指定查询的人员编码
+        List<String> rybmList = new ArrayList<>();
+        if (!stringUtils.IsNullOrEmpty(rybm_list)) {
+            rybmList = Arrays.asList(rybm_list.split(","));
+        }
+
+        //需排除的人员编码
+        List<String> removeUserRybmList = new ArrayList<>();
+        if (!stringUtils.IsNullOrEmpty(removeUserRybm)) {
+            removeUserRybmList = Arrays.asList(removeUserRybm.split(","));
+        }
+
+
+        RequsetData<PageInfo<HashMap<String, Object>>> result = new RequsetData<>();
+        result.setItem(partyUserService.getPartyUserListByAllRYZT(pageIndex, pageSize, xb, dzzdm, rybm, xm, zzlb, zwjb, sqrdrq_begin, sqrdrq_end, szdzb, szdxz,
+                userIdList, ryztList, removeUserList, szdzbdm, removeUserRybmList, rybmList, zzfbType, mz, dnzw, xl, age_begin, age_end, sfsldry, zwmc, sfzg, jczzfl, leadId, partyGroupId, mobile,isStudent,leaderTeamUserType));
+        return result;
+    }
+
     @ResponseBody
     @GetMapping("/getAllUserList")
     public RequsetData<PageInfo<HashMap<String, Object>>> getAllUserList(@RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize, @RequestParam(required = false) String dzzdm

+ 49 - 0
src/main/java/com/ghsc/partybuild/mapper/PartyUserCQuery.java

@@ -58,6 +58,55 @@ public interface PartyUserCQuery {
                                                       @Param("sfsldry") Integer sfsldry, @Param("zwmc") String zwmc, @Param("sfzg") Integer sfzg,
                                                       @Param("jczzfl") String jczzfl, @Param("islead") Boolean islead, @Param("partyGroupId") String partyGroupId, @Param("mobile") String mobile, @Param("sfzh") String sfzh,@Param("isStudent")Integer isStudent,@Param("leaderTeamUserType") Integer leaderTeamUserType);
 
+    /**
+     * 查询全部的党员信息(所有政治面貌类型的人员)
+     *
+     * @param dzzdm
+     * @param rybm
+     * @param xb
+     * @param xm
+     * @param zzlb
+     * @param zwjb
+     * @param sqrdrq_begin
+     * @param sqrdrq_end
+     * @param szdzb
+     * @param szdxz
+     * @param userIdList
+     * @param ryztList
+     * @param removeUserList
+     * @param szdzbdm
+     * @param removeUsersOfRybmList
+     * @param rybmList
+     * @param zzfbType
+     * @param mz
+     * @param dnzw
+     * @param xl
+     * @param age_begin
+     * @param age_end
+     * @param sfsldry
+     * @param zwmc
+     * @param sfzg
+     * @param jczzfl
+     * @param islead
+     * @return
+     */
+    List<HashMap<String, Object>> selectPartyUserListByAllRYZT(@Param("dzzdm") String dzzdm, @Param("rybm") String rybm,
+                                                               @Param("xb") String xb, @Param("xm") String xm,
+                                                               @Param("zzlb") String zzlb, @Param("zwjb") String zwjb,
+                                                               @Param("sqrdrq_begin") String sqrdrq_begin, @Param("sqrdrq_end") String sqrdrq_end,
+                                                               @Param("szdzb") String szdzb, @Param("szdxz") String szdxz, @Param("userIdList") List<String> userIdList,
+                                                               @Param("ryztList") List<String> ryztList, @Param("removeUserList") List<String> removeUserList,
+                                                               @Param("szdzbdm") String szdzbdm, @Param("removeUsersOfRybmList") List<String> removeUsersOfRybmList,
+                                                               @Param("rybmList") List<String> rybmList, @Param("zzfbType") Integer zzfbType,
+                                                               @Param("mz") String mz, @Param("dnzw") String dnzw,
+                                                               @Param("xl") String xl, @Param("age_begin") Integer age_begin,
+                                                               @Param("age_end") Integer age_end, @Param("sfsldry") Integer sfsldry,
+                                                               @Param("zwmc") String zwmc, @Param("sfzg") Integer sfzg,
+                                                               @Param("jczzfl") String jczzfl, @Param("islead") Boolean islead,
+                                                               @Param("partyGroupId") String partyGroupId, @Param("mobile") String mobile,
+                                                               @Param("sfzh") String sfzh,@Param("isStudent")Integer isStudent,
+                                                               @Param("leaderTeamUserType") Integer leaderTeamUserType);
+
     /**
      * 所有党员信息
      *

+ 9 - 0
src/main/java/com/ghsc/partybuild/service/PartyUserService.java

@@ -56,6 +56,15 @@ public interface PartyUserService {
                                                        String mz, String dnzw, String xl,
                                                        Integer age_begin, Integer age_end, Integer sfsldry, String zwmc, Integer sfzg, String jczzfl, String curUserId,String partyGroupId,String mobile,Integer isStudent,Integer leaderTeamUserType);
 
+    // 查询所有政治面貌类型的荣誉
+    PageInfo<HashMap<String, Object>> getPartyUserListByAllRYZT(int pageNum, int pageSize, String xb,
+                                                       String dzzdm, String rybm, String xm, String zzlb,
+                                                       String zwjb, String sqrdrq_begin, String sqrdrq_end, String szdzb, String szdxz,
+                                                       List<String> userIdList, List<String> ryztList, List<String> removeUserList, String szdzbdm, List<String> removeUsersOfRybmList, List<String> rybmList, Integer zzfbType,
+                                                       String mz, String dnzw, String xl,
+                                                       Integer age_begin, Integer age_end, Integer sfsldry, String zwmc, Integer sfzg, String jczzfl, String curUserId,String partyGroupId,String mobile,Integer isStudent,Integer leaderTeamUserType);
+
+
     PageInfo<HashMap<String, Object>> getAllUserList(int pageNum, int pageSize, String dzzdm, String szdzbdm, String zzlb, String rybm, String xm, String xb, String mz, String xl, String mobile,List<String> ryztList,String userNo);
 
 

+ 39 - 0
src/main/java/com/ghsc/partybuild/service/impl/PartyUserServiceImpl.java

@@ -110,6 +110,45 @@ public class PartyUserServiceImpl implements PartyUserService {
         return result;
     }
 
+    @Override
+    public PageInfo<HashMap<String, Object>> getPartyUserListByAllRYZT(int pageNum, int pageSize, String xb,
+                                                              String dzzdm, String rybm, String xm, String zzlb,
+                                                              String zwjb, String sqrdrq_begin, String sqrdrq_end, String szdzb, String szdxz, List<String> userIdList, List<String> ryztList, List<String> removeUserList, String szdzbdm,
+                                                              List<String> removeUsersOfRybmList, List<String> rybmList, Integer zzfbType,
+                                                              String mz, String dnzw, String xl, Integer age_begin, Integer age_end, Integer sfsldry,
+                                                              String zwmc, Integer sfzg, String jczzfl, String curUserId, String partyGroupId, String mobile,Integer isStudent,Integer leaderTeamUserType) {
+
+        /*boolean isLead = true;
+        //包括领导人信息为空就不是相对接口
+        if (curUserId != null) {
+            isLead = appConfig.leadUids.contains(curUserId);
+        }*/
+        final boolean isAdmin = leaderAdminService.isAdmin(curUserId);
+
+        PageHelper.startPage(pageNum, pageSize);
+
+        List<HashMap<String, Object>> list = partyUserCquery.selectPartyUserListByAllRYZT(dzzdm, rybm, xb, xm, zzlb, zwjb, sqrdrq_begin, sqrdrq_end, szdzb, szdxz, userIdList, ryztList, removeUserList, szdzbdm, removeUsersOfRybmList, rybmList, zzfbType, mz, dnzw, xl, age_begin, age_end, sfsldry, zwmc, sfzg, jczzfl, null, partyGroupId, mobile, null,isStudent,leaderTeamUserType);
+
+        list.forEach(it -> {
+            it.put("isAdmin", isAdmin);
+            if ("1".equals(it.get("LEADTYPE").toString()) && !isAdmin) {
+                it.put("RDSJ", "***");
+                it.put("AGE", "***");
+                it.put("JG", "***");
+                it.put("MZMC", "***");
+                it.put("CSRQ", "***");
+                it.put("XLMC", "***");
+                it.put("JSZWMC", "***");
+                it.put("MOBILE", "***");
+            }
+        });
+
+        PageInfo<HashMap<String, Object>> result = new PageInfo(list);
+
+
+        return result;
+    }
+
     @Override
     public PageInfo<HashMap<String, Object>> getAllUserList(int pageNum, int pageSize, String dzzdm, String szdzbdm, String zzlb, String rybm, String xm, String xb, String mz, String xl, String mobile, List<String> ryztList,String userNo) {
         PageHelper.startPage(pageNum, pageSize);

+ 158 - 0
src/main/resources/mapping/PartyUserCQuery.xml

@@ -159,6 +159,164 @@
         order by CONVERT(us.XM USING gbk),us.RYJBXXBS
     </select>
 
+    <!--查询全部的党员信息(所有政治面貌类型的人员)-->
+    <select id="selectPartyUserListByAllRYZT" resultType="java.util.HashMap">
+        select us.USERTYPE,us.RYJBXXBS,us.RYBM,us.XM,us.SZDZBDM,us.RYZT,us.SQRDRQ,
+        -- us.ZWMC,
+        uszw.dnzw as ZWMC,
+        us.DNZWMC,us.XJSZWMC,us.XB,us.JG,us.MZ,us.CSRQ,us.XL,us.SFZH,
+        p.DZZMC,
+        ryzt.HZMC as RYZTMC,
+        xb.HZMC as XBMC,mz.HZMC as MZMC,xl.HZMC as XLMC,jszw.HZMC as JSZWMC,
+        userinfo.USERNAME as MOBILE,us.DNZWMC as POST,
+        dj.JRZGZZRQ as RDSJ,
+        usfb.NL AS AGE,
+        uszw.DNZW as DNZW,
+        usfb.SFSLDRY,
+        ifnull(usfb.LEADTYPE,0) as LEADTYPE,
+        userinfo.USERNAME as
+        userNo,usfb.gradeName,usfb.className,usfb.enrollmentDate,usfb.graduateDate,usfb.workDate,usfb.mobile as
+        contactMobile,
+        usfb.technologyPosition, usfb.isStudent,case when usfb.isStudent=1 then '是' else '否' end as  isStudentName
+        from VM_RYJBXX_ALL us -- 视图
+        left join RS_RYJBXXFB usfb on us.RYBM=usfb.RYBM
+        inner join ZZ_ZZQKXX p on us.SZDZBDM=p.DZZDM -- 党组织信息
+        left join ZZ_ZZQKXXFB fb on p.DZZDM=fb.DZZDM
+        left join Zzzd_ryzt ryzt on us.RYZT=ryzt.BM -- 人员状态
+        left join zd_xbm xb on us.XB=xb.BM -- 性别
+        left join zd_mzdm mz on us.MZ=mz.BM -- 民族
+        left join zd_whcddm1 xl on us.XL=xl.BM -- 学历
+        left join zd_zyjszwdm jszw on us.XJSZWMC=jszw.BM -- 技术专业职务
+        left join CF_USERS userinfo on us.RYBM=userinfo.USERID
+        left join ZZ_DJXX dj on us.RYBM=dj.RYBM
+        left join vw_partyduty uszw on us.RYBM=uszw.RYBM -- 党内职务名称
+        left join ZZ_ZZQKXX dw on SUBSTR(p.DZZDM,1,12)=dw.DZZDM
+        left join VM_PARTYGROUP partyGroup on dw.DZZDM = partyGroup.DZZDM
+        where 1=1
+        <if test="dzzdm != null and dzzdm != ''">
+            and p.DZZDM like concat(#{dzzdm},'%')
+        </if>
+        <if test="rybm != null and rybm != ''">
+            and us.RYBM = #{rybm}
+        </if>
+        <if test="xm != null and xm != ''">
+            and us.XM like concat('%',#{xm},'%')
+        </if>
+        <if test="zzlb != null and zzlb != ''">
+            and fb.ZZLB = #{zzlb}
+        </if>
+        <if test="xb != null and xb != ''">
+            and us.XB = #{xb}
+        </if>
+        <if test="zwjb != null and zwjb != ''">
+            and us.ZWJB = #{zwjb}
+        </if>
+        <if test="sqrdrq_begin != null and sqrdrq_begin != ''">
+            and dj.JRZGZZRQ <![CDATA[ >= ]]> #{sqrdrq_begin}
+        </if>
+        <if test="sqrdrq_end != null and sqrdrq_end != ''">
+            and dj.JRZGZZRQ <![CDATA[ <= ]]> #{sqrdrq_end}
+        </if>
+        <if test="szdzb != null and szdzb != ''">
+            and p.DZZMC like concat('%',#{szdzb},'%')
+        </if>
+        <if test="szdxz != null and szdxz != ''">
+
+        </if>
+        <if test="userIdList != null and userIdList.size()>0">
+            and us.RYJBXXBS in
+            <foreach collection="userIdList" item="userId" index="index" open="(" close=")" separator=",">
+                #{userId}
+            </foreach>
+        </if>
+        <if test="ryztList != null and ryztList.size()>0">
+            and us.RYZT in
+            <foreach collection="ryztList" item="ryzt" index="index" open="(" close=")" separator=",">
+                #{ryzt}
+            </foreach>
+        </if>
+        <if test="removeUserList != null and removeUserList.size()>0">
+            and us.RYJBXXBS not in
+            <foreach collection="removeUserList" item="userId" index="index" open="(" close=")" separator=",">
+                #{userId}
+            </foreach>
+        </if>
+        <if test="szdzbdm != null and szdzbdm != ''">
+            and us.SZDZBDM = #{szdzbdm}
+        </if>
+        <if test="removeUsersOfRybmList != null and removeUsersOfRybmList.size()>0">
+            and us.RYBM not in
+            <foreach collection="removeUsersOfRybmList" item="rybm" index="index" open="(" close=")" separator=",">
+                #{rybm}
+            </foreach>
+        </if>
+        <if test="rybmList != null and rybmList.size()>0">
+            and us.RYBM in
+            <foreach collection="rybmList" item="rybm" index="index" open="(" close=")" separator=",">
+                #{rybm}
+            </foreach>
+        </if>
+        <if test="zzfbType != null">
+            and SUBSTR(p.DZZDM,1,12) in(select DZZDM from ZZ_DZZFBQK where ZZFB= #{zzfbType})
+        </if>
+        <if test="mz != null and mz != ''">
+            and us.MZ = #{mz}
+        </if>
+        <if test="dnzw != null and dnzw != ''">
+            and uszw.DNZW like concat('%',#{dnzw},'%')
+        </if>
+        <if test="xl != null and xl != ''">
+            and us.XL = #{xl}
+        </if>
+        <if test="age_begin != null and age_begin != ''">
+            and usfb.NL <![CDATA[ >= ]]> #{age_begin}
+        </if>
+        <if test="age_end != null and age_end != ''">
+            and usfb.NL <![CDATA[ <= ]]> #{age_end}
+        </if>
+        <if test="sfsldry != null">
+            /*是否属领导人员*/
+            and usfb.SFSLDRY = #{sfsldry}
+        </if>
+        <if test="zwmc != null and zwmc != ''">
+            and us.ZWMC like concat('%',#{zwmc},'%')
+        </if>
+        <if test="sfzg != null">
+            /*是否在岗*/
+            <if test="sfzg == 1">
+                and (us.GZGW not in('0500','0501','0502','0504') or us.GZGW is null)
+            </if>
+            <if test="sfzg == 0">
+                and us.GZGW in('0500','0501','0502','0504')
+            </if>
+        </if>
+        <if test="jczzfl != null and jczzfl != ''">
+            and fb.JCZZFL = #{jczzfl}
+        </if>
+        <!--<if test="!islead">
+            and nvl(usfb.leadtype,0)=0
+        </if>-->
+        <if test="partyGroupId != null and partyGroupId != ''">
+            and partyGroup.GROUPID like concat('%',#{partyGroupId},'%')
+        </if>
+        <if test="mobile != null and mobile != ''">
+            and userinfo.USERNAME like concat('%',#{mobile},'%')
+        </if>
+        <if test="sfzh != null and sfzh != ''">
+            and us.sfzh like concat('%',#{sfzh},'%')
+        </if>
+        <if test="isStudent != null and isStudent==1">
+            and usfb.isStudent = #{isStudent}
+        </if>
+        <if test="isStudent != null and isStudent==0">
+            and (usfb.isStudent = #{isStudent} or usfb.isStudent is null)
+        </if>
+        <if test="leaderTeamUserType != null">
+            and userinfo.USERNAME in (select no from lw_leaderteam where leaderTeamType=#{leaderTeamUserType})
+        </if>
+        order by CONVERT(us.XM USING gbk),us.RYJBXXBS
+    </select>
+
     <!--所有用户基本信息-->
     <select id="selectAllUserList" resultType="java.util.HashMap">
         select us.USERTYPE,us.RYJBXXBS,us.RYBM,us.XM,us.SZDZBDM,us.RYZT,us.SQRDRQ,

+ 18 - 4
src/main/resources/static/app/js/service.js

@@ -5396,6 +5396,7 @@ success:提升是否成功
                         $scope.$watch("selectdzzdm", function (newVal, oldVal) {
                             if (newVal) {
                                 $scope.searchParam = "";//查询条件清空
+                                $scope.searchParamRyzt = undefined;//查询条件清空
                                 $scope.loadUser();
                             }
                         });
@@ -5414,6 +5415,18 @@ success:提升是否成功
                             });
                         }
                         $scope.getRoleList();
+                        //人员状态
+                        $scope.ryztList = [];
+                        $scope.getRyztList = function () {
+                            $http({
+                                method: 'get',
+                                url: '../../api/partyDic/getRyztList',
+                                params: {}
+                            }).then(function (result) {
+                                $scope.ryztList = result.data;
+                            });
+                        };
+                        $scope.getRyztList();
                         //人员列表
                         $scope.userSelectList = [];
 
@@ -5528,13 +5541,13 @@ success:提升是否成功
 
                         //人员查询
                         $scope.searchUser = function () {
-                            if ((angular.isDefined($scope.searchParam) && $scope.searchParam != "" && $scope.searchParam != null) || $scope.roleid != null) {
+                            if ((angular.isDefined($scope.searchParam) && $scope.searchParam != "" && $scope.searchParam != null) || $scope.searchParamRyzt != null) {
                                 $scope.selectdzzdm = "";
                                 $scope.loadUser();
                             } else {
                                 $alert({
                                     title: '消息:',
-                                    content: '请输入要查询的人员名',
+                                    content: '请设置查询条件',
                                     placement: 'top',
                                     type: 'info',
                                     container: '#userselectpro',
@@ -5548,7 +5561,7 @@ success:提升是否成功
                         $scope.loadUser = function () {
                             $scope.isloading = true;
                             $scope.userSelectList = [];
-                            $http.get("../../api/partyUser/getPartyUserList", {
+                            $http.get("../../api/partyUser/getPartyUserListByRYZT", {
                                 params: {
                                     roleid: $scope.roleid,
                                     isShowchildren: scope.isShowchildren,
@@ -5556,7 +5569,8 @@ success:提升是否成功
                                     'szdzbdm': $scope.selectdzzdm,
                                     'pageindex': 1,
                                     'pagesize': 1000,
-                                    'dzzdm': AuthUser.getUser().gddwdm
+                                    'dzzdm': AuthUser.getUser().gddwdm,
+                                    'ryzt': $scope.searchParamRyzt ? $scope.searchParamRyzt : "",
                                 }
                             }).then(function (result) {
                                 $scope.userSelectList = result.data.item.list;//返回的人员列表赋值给变量userSelectList

+ 13 - 0
src/main/resources/static/app/js/template/modal_userselectpro.html

@@ -48,6 +48,19 @@
                                             </div>
                                         </div>
                                     </div>
+                                    <div class="col-lg2 col-md-2 dj-label">
+                                        <label>政治面貌</label>
+                                    </div>
+                                    <div class="col-lg2 col-md-2">
+                                        <div class="form-group">
+                                            <div class="form-line">
+                                                <select name="zwjb" class="form-control show-tick" ng-model="searchParamRyzt"
+                                                        ng-options="type.bm as type.hzmc for type in ryztList">
+                                                    <option value="" selected>--全部--</option>
+                                                </select>
+                                            </div>
+                                        </div>
+                                    </div>
                                 </div>
                             </form>
                         </div>