LuoTong
2024-04-24 aba77fd2637bb7093dde098200e793d63edd3913
数据字段  数据累加
4个文件已修改
46 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDaoMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDaoMapper.xml
@@ -381,9 +381,7 @@
            SELECT community_id from com_act
        ) as ca on  ca.community_id = new_fight_need_problem_inventory.community_id
        <if test="yearTime != null and yearTime != '' ">
            WHERE
            creation_time &gt;= concat(#{yearTime},'-01-01 00:00:00')
            AND creation_time &lt;= concat(#{yearTime},'-12-31 59:59:59')
            WHERE  creation_time &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        )
        AS npi ON npi.classify_id = ctn.id
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbCheckUnitMapper.java
@@ -84,7 +84,7 @@
     * @param checkUnitId
     * @return
     */
    PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId, @Param("unitIds")Long[] unitIds);
    PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId, @Param("unitIds")Long[] unitIds,@Param("yearTime") String yearTime);
    /**
     * 报到党员统计-按单位归属统计
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbCheckUnitServiceImpl.java
@@ -355,7 +355,7 @@
            }
        }
        //查询 活动总积分
        PbCheckUnitStatisticsVo vo = this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds);
        PbCheckUnitStatisticsVo vo = this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId,unitIds,yearTime);
        if(null != vo) {
            Integer sum = this.baseMapper.pbOrganSumIntegral(communityIds,yearTime);
            vo.setOrganSumIntegral(sum);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/ComPbCheckUnitMapper.xml
@@ -131,7 +131,7 @@
            </if>
        <if test=" null != yearTime and '' != yearTime">
            and ( `create_at` &gt;= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59'))
            AND `create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS unitTotal,
@@ -155,7 +155,7 @@
                AND belong_to = #{choice}
            </if>
        <if test=" null != yearTime and '' != yearTime">
            and ( `create_at` &gt;= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59'))
            AND `create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS organTotal,
@@ -179,7 +179,7 @@
                AND belong_to = #{choice}
            </if>
        <if test=" null != yearTime and '' != yearTime">
            and ( `create_at` &gt;= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59'))
            AND `create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
@@ -202,7 +202,7 @@
                AND cpcu.belong_to = #{choice}
            </if>
        <if test=" null != yearTime and '' != yearTime">
            and ( cpcu.`create_at` &gt;= concat(#{yearTime},'-01-01 00:00:00') AND cpcu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59'))
           AND cpcu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS partyMemberTotal
    </select>
@@ -224,7 +224,7 @@
            </if>
         AND belong_to = temp.belong_to
            <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
                and ( `create_at` &gt;= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59'))
                AND `create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
            </if>
        ) AS organTotal,
        (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位'
@@ -242,7 +242,7 @@
            </if>
        AND belong_to = temp.belong_to
        <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
            and ( `create_at` &gt;= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59'))
            AND `create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
        </if>
            ) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
@@ -260,12 +260,12 @@
            </if>
         AND cpcu.belong_to = temp.belong_to
        <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
            and ( cpcu.`create_at` &gt;= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND cpcu.`create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59'))
           AND cpcu.`create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
        </if>
            ) AS partyMemberTotal
        FROM (SELECT belong_to,COUNT( id ) AS unitTotal FROM com_pb_check_unit WHERE 1=1
        <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
            and ( `create_at` &gt;= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59'))
            AND `create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
        </if>
            <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0">
                AND community_id IN
@@ -309,6 +309,9 @@
        <if test="checkUnitId != null">
            AND m.check_unit_id = #{checkUnitId}
        </if>
        <if test=" null != yearTime and '' != yearTime">
            AND cpcu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS organTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
        AND cpcu.nature_name = '企事业单位'
@@ -333,6 +336,9 @@
        <if test="checkUnitId != null">
            AND m.check_unit_id = #{checkUnitId}
        </if>
        <if test=" null != yearTime and '' != yearTime">
            AND cpcu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS businessTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
        <if test="communityIds != null and communityIds.size() >0">
@@ -356,6 +362,9 @@
        <if test="checkUnitId != null">
            AND m.check_unit_id = #{checkUnitId}
        </if>
        <if test=" null != yearTime and '' != yearTime">
            AND cpcu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        ) AS partyMemberTotal
    </select>
    <select id="pbStatisticsBelong" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo">
@@ -373,6 +382,9 @@
                    #{item}
                </foreach>
            </if>
        <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
            and  m.`create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
        </if>
         AND m.check_unit_id is not null AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal,
        (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
            <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0">
@@ -387,6 +399,9 @@
                    #{item}
                </foreach>
            </if>
        <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
            and  m.`create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
        </if>
        AND cpcu.nature_name = '企事业单位' AND cpcu.belong_to = temp.belong_to) AS businessTotal
        FROM (SELECT cpcu.belong_to,COUNT( m.id ) AS partyMemberTotal FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1
            <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0">
@@ -403,6 +418,9 @@
            </if>
        <if test="commonDto.belongTo != null and commonDto.belongTo != ''">
            AND cpcu.belong_to = #{commonDto.belongTo}
        </if>
        <if test=" null != commonDto.yearTime and '' != commonDto.yearTime">
            and  m.`create_at` &lt;= concat(#{commonDto.yearTime},'-12-31 59:59:59')
        </if>
        GROUP BY belong_to) temp
    </select>
@@ -452,7 +470,7 @@
            </foreach>
        </if>
        <if test=" null != yearTime and '' != yearTime">
            and ( cu.`create_at` &gt;= concat(#{yearTime},'-01-01 00:00:00') AND cu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59'))
           AND cu.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
                   GROUP BY  cm.user_id , cu.community_id
                 ) as cum INNER JOIN (
@@ -477,7 +495,7 @@
            </foreach>
        </if>
        <if test=" null != yearTime and '' != yearTime">
            and ( cm.`create_at` &gt;= concat(#{yearTime},'-01-01 00:00:00') AND cm.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59'))
             AND cm.`create_at` &lt;= concat(#{yearTime},'-12-31 59:59:59')
        </if>
        GROUP BY  cm.user_id , cu.community_id
        ) as cum INNER JOIN (