| | |
| | | </if> |
| | | |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( `create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | |
| | | ) AS unitTotal, |
| | |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( `create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | |
| | | ) AS organTotal, |
| | |
| | | AND belong_to = #{choice} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( `create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | AND `create_at` <= 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 |
| | |
| | | AND cpcu.belong_to = #{choice} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( cpcu.`create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND cpcu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | AND cpcu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | |
| | | </if> |
| | | AND belong_to = temp.belong_to |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( `create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | ) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | |
| | | </if> |
| | | AND belong_to = temp.belong_to |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( `create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | AND `create_at` <= 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 |
| | |
| | | </if> |
| | | AND cpcu.belong_to = temp.belong_to |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and ( cpcu.`create_at` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND cpcu.`create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | AND cpcu.`create_at` <= 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` >= concat(#{commonDto.yearTime},'-01-01 00:00:00') AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59')) |
| | | AND `create_at` <= concat(#{commonDto.yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | AND cpcu.`create_at` <= 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 = '企事业单位' |
| | |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | AND cpcu.`create_at` <= 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"> |
| | |
| | | <if test="checkUnitId != null"> |
| | | AND m.check_unit_id = #{checkUnitId} |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | AND cpcu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | ) AS partyMemberTotal |
| | | </select> |
| | | <select id="pbStatisticsBelong" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and m.`create_at` <= 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"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test=" null != commonDto.yearTime and '' != commonDto.yearTime"> |
| | | and m.`create_at` <= 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"> |
| | |
| | | </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` <= concat(#{commonDto.yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | GROUP BY belong_to) temp |
| | | </select> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( cu.`create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND cu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | AND cu.`create_at` <= concat(#{yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | GROUP BY cm.user_id , cu.community_id |
| | | ) as cum INNER JOIN ( |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test=" null != yearTime and '' != yearTime"> |
| | | and ( cm.`create_at` >= concat(#{yearTime},'-01-01 00:00:00') AND cm.`create_at` <= concat(#{yearTime},'-12-31 59:59:59')) |
| | | AND cm.`create_at` <= concat(#{yearTime},'-12-31 59:59:59') |
| | | </if> |
| | | GROUP BY cm.user_id , cu.community_id |
| | | ) as cum INNER JOIN ( |