yanghui
2022-10-24 f5783e14481ee01aaf5808721d5b83ae860843b2
Merge branch 'local_20221024' into haucheng_panzhihua
1个文件已添加
10个文件已修改
260 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PagePartyOrganizationVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PartyBuildingComPbDynVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberWestServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbDynMapper.xml 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberWestMapper.xml 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java
@@ -158,6 +158,9 @@
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "社区id集合", hidden = true)
    private List<Long> communityIds;
    @ApiModelProperty(value = "社区名称")
    private String communityName;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java
@@ -1,6 +1,7 @@
package com.panzhihua.common.model.vos.partybuilding;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -70,6 +71,9 @@
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("社区id集合")
    private List<Long> communityIds;
    @ApiModelProperty("动态内容富文本--纯文本")
    private String contentText;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PagePartyOrganizationVO.java
@@ -6,6 +6,7 @@
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -38,6 +39,9 @@
    @ApiModelProperty(value = "社区id", hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "社区id集合", hidden = true)
    private List<Long> communityIds;
    @ApiModelProperty(value = "关键词")
    private String keyWord;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PartyBuildingComPbDynVO.java
@@ -8,6 +8,7 @@
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -70,6 +71,11 @@
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;
    @ApiModelProperty("社区id集合")
    @JsonSerialize(using = ToStringSerializer.class)
    private List<Long> communityIds;
    @ApiModelProperty("动态内容富文本--纯文本")
    private String contentText;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -311,14 +311,14 @@
     * @param communityId
     * @return
     */
    PartyActivityStatics selectActivityStatics(Long communityId);
    PartyActivityStatics selectActivityStatics(@Param("communityIds") List<Long> communityIds);
    /**
     * 党员活动饼状图
     * @param communityId
     * @return
     */
    List<PartyActivityTypeChart> selectActivityChart(Long communityId);
    List<PartyActivityTypeChart> selectActivityChart(@Param("communityIds") List<Long> communityIds);
    /**
     * 党员活动柱状图
@@ -327,7 +327,7 @@
     * @param date
     * @return
     */
    Integer selectActivityLine(@Param("communityId") Long communityId,@Param("year")String year,@Param("date")String date);
    Integer selectActivityLine(@Param("communityIds") List<Long> communityIds,@Param("year")String year,@Param("date")String date);
    /**
     * 分页查询党员详情活动
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -19,6 +19,7 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import com.panzhihua.common.constants.HttpStatus;
import com.panzhihua.common.model.dtos.community.ActivityInviteDTO;
import com.panzhihua.service_community.dao.ComActNeighborCircleDAO;
@@ -306,14 +307,23 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = comActActivityVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comActDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            comActActivityVO.setCommunityIds(communityIds);
        }
        Integer type = comActActivityVO.getType();
        IPage<ComActActivityVO> iPage = null;
        if (nonNull(type) && type.equals(4)) {
            if (nonNull(comActActivityVO.getCommunityId())) {
                ComActDO comActDO = comActDAO.selectById(comActActivityVO.getCommunityId());
                if (nonNull(comActDO)) {
                    comActActivityVO.setStreetId(comActDO.getStreetId());
                }
                    ComActDO comActDO = comActDAO.selectById(comActActivityVO.getCommunityId());
                    if (nonNull(comActDO)) {
                        comActActivityVO.setStreetId(comActDO.getStreetId());
                    }
            }
            iPage = comActActivityDAO.pageProjectActivity(page, comActActivityVO);
        } else {
@@ -882,6 +892,15 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = comActActivityVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comActDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            comActActivityVO.setCommunityIds(communityIds);
        }
        IPage<ComActActivityVO> iPage = comActActivityDAO.pageActivityCommunityBack(page, comActActivityVO);
        iPage.getRecords().forEach(vo ->{
            List<ComActActEvaluateDO> comActActEvaluateDOList = comActActEvaluateDAO
@@ -1231,8 +1250,14 @@
    @Override
    public R partyMemberCount(Long communityId, String year) {
        PartyActivityStatics partyActivityStatics=this.comActActivityDAO.selectActivityStatics(communityId);
        List<PartyActivityTypeChart> partyActivityTypeChart=this.comActActivityDAO.selectActivityChart(communityId);
        List<Long> communityIds = comActDAO.selectIds(communityId);
        if (CollUtil.isEmpty(communityIds)){
            communityIds = new ArrayList<>();
            communityIds.add(communityId);
        }
        PartyActivityStatics partyActivityStatics=this.comActActivityDAO.selectActivityStatics(communityIds);
        List<PartyActivityTypeChart> partyActivityTypeChart=this.comActActivityDAO.selectActivityChart(communityIds);
        if(partyActivityStatics.getActivityCount()!=null&&partyActivityStatics.getActivityCount()>0){
            if(!CollectionUtils.isEmpty(partyActivityTypeChart)){
                partyActivityTypeChart.forEach(partyActivityTypeChart1 -> {
@@ -1241,7 +1266,7 @@
            }
        }
        partyActivityStatics.setPartyActivityTypeChartList(partyActivityTypeChart);
        partyActivityStatics.setPartyActivityLines(getPoints(communityId,year));
        partyActivityStatics.setPartyActivityLines(getPoints(communityIds,year));
        return R.ok(partyActivityStatics);
    }
@@ -1255,7 +1280,7 @@
        return R.ok(comActActivityDAO.exportPartyMemberDetail(commonPage));
    }
    public List<PartyActivityLine> getPoints(Long communityId,String year){
    public List<PartyActivityLine> getPoints(List<Long> communityIds,String year){
        List<PartyActivityLine> partyActivityLines=new ArrayList<>();
        for(int i=1;i<=12;i++){
            String x="";
@@ -1267,7 +1292,7 @@
            }
            PartyActivityLine partyActivityLine=new PartyActivityLine();
            partyActivityLine.setX(i+"月");
            Integer y=this.comActActivityDAO.selectActivityLine(communityId,year,x);
            Integer y=this.comActActivityDAO.selectActivityLine(communityIds,year,x);
            partyActivityLine.setY(y);
            partyActivityLines.add(partyActivityLine);
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -88,7 +88,13 @@
        <if test='comActActivityVO.type != null and comActActivityVO.type == 4'>
            left join  (select count(t.id) as socialCount,activity_id from   com_act_act_regist  t LEFT JOIN sys_user t1 on  t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id
        </if>
        WHERE  a.community_id=#{comActActivityVO.communityId}
        WHERE  1=1
        <if test="comActActivityVO.communityIds != null and comActActivityVO.communityIds.size() != 0">
            and a.community_id in
            <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test='comActActivityVO.type != null'>
            AND a.type = #{comActActivityVO.type}
        </if>
@@ -250,16 +256,43 @@
    </select>
    <select id="selectActivityStatics" resultType="com.panzhihua.common.model.vos.community.PartyActivityStatics">
        select (select count(*)  from com_act_activity where type = 3 and community_id = #{communityId}) activityCount,
               (select count(*)  from com_pb_member where community_id = #{communityId} and audit_result=1 ) memberCount
        select (select count(*)  from com_act_activity where type = 3
        <if test="communityIds != null and communityIds.size() != 0">
            and community_id in
            <foreach collection="communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        ) activityCount,
        (select count(*)  from com_pb_member where audit_result=1
            <if test="communityIds != null and communityIds.size() != 0">
                and community_id in
                <foreach collection="communityIds" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
        ) memberCount
    </select>
    <select id="selectActivityChart" resultType="com.panzhihua.common.model.vos.community.PartyActivityTypeChart">
        select count(*) as count,activity_type as name from com_act_activity  where type = 3 and community_id =#{communityId} GROUP BY activity_type
        select count(*) as count,activity_type as name from com_act_activity  where type = 3
        <if test="communityIds != null and communityIds.size() != 0">
            and community_id in
            <foreach collection="communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        GROUP BY activity_type
    </select>
    <select id="selectActivityLine" resultType="integer">
        select count(*) from com_act_activity where type = 3 and publish_at >= DATE_FORMAT(  CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at and community_id =#{communityId}
        select count(*) from com_act_activity where type = 3 and publish_at >= DATE_FORMAT(  CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at
        <if test="communityIds != null and communityIds.size() != 0">
            and community_id in
            <foreach collection="communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
    </select>
    <select id="partyMemberDetail" resultType="com.panzhihua.common.model.vos.community.PartyMemberDetailVO">
@@ -358,12 +391,19 @@
        LEFT JOIN ( SELECT * FROM com_act_act_sign WHERE `status` = 1 ) s ON a.id = s.activity_id
        LEFT JOIN com_act ca ON a.community_id = ca.community_id
        WHERE 1 = 1
        <if test ="comActActivityVO.communityId != null and comActActivityVO.communityId != 0">
        <if test ="comActActivityVO.communityIds != null and comActActivityVO.communityIds.size() != 0">
            <if test="comActActivityVO.checkUnitId != null">
                AND (a.community_id = ${comActActivityVO.communityId} OR a.check_unit_id = #{comActActivityVO.checkUnitId})
                AND (a.community_id in
                <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
                OR a.check_unit_id = #{comActActivityVO.checkUnitId})
            </if>
            <if test="comActActivityVO.checkUnitId == null">
                AND a.community_id = ${comActActivityVO.communityId}
                AND a.community_id in
                <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
                <if test="comActActivityVO.type == null">
                    AND a.`type` != 5
                </if>
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java
@@ -30,26 +30,6 @@
    // " </where>" +
    // "</script>")
    @Select("<script> " + "SELECT\n" + "d.id,\n" + "d.title, d.jump_url, d.jump_type,\n" + "COUNT( u.id ) readingVolume,\n" + "d.`status`,\n"
        + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName,d.policy_type \n"
        + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id  left join com_act t on d.community_id = t.community_id\n"
        + "where d.type=#{partyBuildingComPbDynVO.type}  \n"
            + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>"
            + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>"
        + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>"
        + "and d.policy_type = #{partyBuildingComPbDynVO.policyType} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.policyType == 0'>"
        + "and d.policy_type is not null \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != &quot;&quot;'>"
        + "and d.title like concat(#{partyBuildingComPbDynVO.title},'%')  \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.status != null and partyBuildingComPbDynVO.status != 0'>"
        + "AND d.`status` = #{partyBuildingComPbDynVO.status} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.publishAtBegin != null '>"
        + "AND d.publish_at BETWEEN #{partyBuildingComPbDynVO.publishAtBegin} \n"
        + "AND #{partyBuildingComPbDynVO.publishAtEnd} \n" + " </if> " + "GROUP BY\n" + "d.id\n"
        + "ORDER BY d.publish_at <if test='partyBuildingComPbDynVO.sort !=null and partyBuildingComPbDynVO.sort !=&quot;&quot;'> asc </if> <if test='partyBuildingComPbDynVO.sort ==null'> desc</if>" + "</script>")
    IPage<PartyBuildingComPbDynVO> pageYnamic(Page page,
        @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberWestServiceImpl.java
@@ -9,6 +9,7 @@
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdcardUtil;
import com.google.common.collect.Lists;
import com.panzhihua.common.enums.ComPbMemberRoleTypeEnum;
@@ -72,6 +73,8 @@
    private CommunityWestService communityWestService;
    @Resource
    private UserService userService;
    @Resource
    private ComPbMemberDAO comPbMemberDAO;
    /**
     * 新增党员
@@ -267,6 +270,15 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = pagePartyOrganizationVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            pagePartyOrganizationVO.setCommunityIds(communityIds);
        }
        IPage<PartyBuildingMemberVO> iPage = comPbMemberWestDAO.queryAllByLimit(page, pagePartyOrganizationVO);
        iPage.getRecords().forEach(record -> {
            record.setIdCard(SensitiveUtil.desensitizedIdNumber(record.getIdCard()));
@@ -554,6 +566,15 @@
        }
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        Long communityId = partyBuildingComPbDynVO.getCommunityId();
        if (null != communityId){
            List<Long> communityIds = comPbMemberDAO.selectIds(communityId);
            if (CollUtil.isEmpty(communityIds)) {
                communityIds = new ArrayList<>();
                communityIds.add(communityId);
            }
            partyBuildingComPbDynVO.setCommunityIds(communityIds);
        }
        IPage<PartyBuildingComPbDynVO> iPage = comPbDynDAO.pageYnamic(page, partyBuildingComPbDynVO);
        List<PartyBuildingComPbDynVO> records = iPage.getRecords();
        if (!(ObjectUtils.isEmpty(records))) {
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbDynMapper.xml
New file
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_dangjian.dao.ComPbDynDAO">
    <resultMap type="com.panzhihua.service_dangjian.model.dos.ComPbDynDO" id="ComPbOrgMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="title" column="title"/>
        <result property="status" column="status"/>
        <result property="publishAt" column="publish_at"/>
        <result property="cover" column="cover"/>
        <result property="createAt" column="create_at"/>
        <result property="content" column="content"/>
        <result property="createBy" column="create_by"/>
        <result property="type" column="type"/>
        <result property="communityId" column="community_id"/>
        <result property="dynType" column="dyn_type"/>
        <result property="coverMode" column="cover_mode"/>
        <result property="jumpUrl" column="jump_url"/>
        <result property="jumpType" column="jump_type"/>
        <result property="policyType" column="policy_type"/>
    </resultMap>
    <select id="pageYnamic" resultType="com.panzhihua.common.model.vos.partybuilding.west.PartyBuildingComPbDynVO">
        SELECT
        d.id,
        d.title, d.jump_url, d.jump_type,
        COUNT( u.id ) readingVolume,
        d.`status`,
        d.publish_at,
        d.content,
        d.cover,
        d.cover_mode,
        d.dyn_type,
        d.create_at,t.name as communityName,d.policy_type
        FROM
        com_pb_dyn d
        LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id left join com_act t on d.community_id = t.community_id
        where d.type=#{partyBuildingComPbDynVO.type}
        <if test='partyBuildingComPbDynVO.communityIds != null and partyBuildingComPbDynVO.communityIds.size() > 0 '>
            and d.community_id in
            <foreach item="item" collection="partyBuildingComPbDynVO.communityIds" separator="," open="(" close=")"
                     index="index">
                #{item}
            </foreach>
        </if>
        <if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>
            and d.dyn_type = #{partyBuildingComPbDynVO.dynType}
        </if>
        <if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>
            and d.policy_type = #{partyBuildingComPbDynVO.policyType}
        </if>
        <if test='partyBuildingComPbDynVO.policyType == 0'>
            and d.policy_type is not null
        </if>
        <if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != &quot;&quot;'>
            and d.title like concat(#{partyBuildingComPbDynVO.title},'%')
        </if>
        <if test='partyBuildingComPbDynVO.status != null and partyBuildingComPbDynVO.status != 0'>
            AND d.`status` = #{partyBuildingComPbDynVO.status}
        </if>
        <if test='partyBuildingComPbDynVO.publishAtBegin != null '>
            AND d.publish_at BETWEEN #{partyBuildingComPbDynVO.publishAtBegin} AND #{partyBuildingComPbDynVO.publishAtEnd}
        </if>
            GROUP BY d.id
            ORDER BY d.publish_at
        <if test="partyBuildingComPbDynVO.sort !=null and partyBuildingComPbDynVO.sort !=&quot;&quot;">asc</if>
        <if test='partyBuildingComPbDynVO.sort ==null'>desc</if>
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbMemberWestMapper.xml
@@ -62,24 +62,19 @@
        YEAR,
        m.employment_time,
        DATE_FORMAT( NOW(), '%Y-%m-%d' )) as partyAge,
        CASE
        WHEN u.id_card IS NULL THEN
        CASE     WHEN su.id_card IS NULL THEN
        '未注册' ELSE '已注册'
        END status
        from com_pb_member_west as m
        LEFT JOIN (
            SELECT su.* FROM sys_user su
            LEFT JOIN com_act act ON su.community_id = act.community_id
        ) u ON m.id_card = u.id_card and u.type = 1
        LEFT JOIN com_act act ON u.community_id = act.community_id
        from com_pb_member as m
        LEFT JOIN sys_user su on m.id_card = su.id_card     AND su.type = 1
        LEFT JOIN com_act act ON su.community_id = act.community_id
        LEFT JOIN com_pb_org o ON m.org_id = o.id
        LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id
        LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t1.award) as partyInterval  from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t1.sign_identity = 2
        <if test="dto.startTime !=null">
            and t.begin_at between #{dto.startTime} and #{dto.endTime}
        </if>
        GROUP BY t1.user_id ) t2 on u.user_id = t2.user_id
        GROUP BY t1.user_id ) t2 on su.user_id = t2.user_id
        <where>
            and m.audit_result = 1
            <if test='dto.orgName != null and dto.orgName != &quot;&quot;'>
@@ -89,7 +84,7 @@
               and o.id = #{dto.orgId}
            </if>
            <if test='dto.account != null and dto.account != &quot;&quot;'>
                and u.phone like concat (#{dto.account},'%')
                and su.account like concat (#{dto.account},'%')
            </if>
            <if test='dto.name != null and dto.name != &quot;&quot;'>
                and m.name like concat (#{dto.name},'%')
@@ -97,12 +92,15 @@
            <if test="dto.orgId != null">
                and m.org_id = #{dto.orgId}
            </if>
            <if test="dto.communityId != null">
                and m.community_id = ${dto.communityId}
            <if test="dto.communityIds != null and dto.communityIds.size() >0">
                and m.community_id IN
                <foreach collection="dto.communityIds" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            <if test="dto.keyWord != null and dto.keyWord != ''">
                and (m.name like concat (#{dto.keyWord},'%') or
                u.phone like concat (#{dto.keyWord},'%') or
                su.phone like concat (#{dto.keyWord},'%') or
                cpcu.name like concat (#{dto.keyWord},'%')
                )
            </if>