huanghongfa
2021-09-26 d5efac4fdd317dee66be48393f96a19e43f48335
bug修复
3个文件已修改
19 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -179,7 +179,7 @@
    AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode,
        @Param("districtCode") String districtCode);
    @Select("select count(id) as populationTotal "
    @Select("select count(cmpct.id) as populationTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 1) as localTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 2) as outTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and IFNULL(cmpct.label,'') != '') as specialTotal "
@@ -193,7 +193,7 @@
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal "
        + " from com_mng_population_community_tags as cmpct where community_id = #{communityId}")
        + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = #{communityId}")
    ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId);
    @Select("select count(id) as populationTotal," +
@@ -592,6 +592,12 @@
        + "</foreach>" + " </script>")
    Integer getPopulationVisitingCount(@Param("ids") List<Long> ids);
    /**
     * 综治后台删除居民,并清理人口与社区绑定关系
     * @param ids   需要删除的人口id集合
     */
    void deletePopulaitonRelation(@Param("ids") List<Long> ids);
    @Select("<script> " + "SELECT " + "   cmp.id, " + "   cmp.`name`, " + "   cmp.card_no as idCard, "
        + "   cmpct.label, " + "   cmp.sex, " + "   IFNULL( cmp.phone, '暂无' ) as phone, " + "   cmp.address, "
        + "   cmp.political_outlook " + "  FROM "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -7513,6 +7513,8 @@
            return R.fail("您选择的数据中存在被引用的,无法删除");
        }
        this.baseMapper.deleteBatchIds(ids);
        //删除人口并删除人口和社区关联关系
        this.baseMapper.deletePopulaitonRelation(ids);
        return R.ok("删除成功");
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -255,4 +255,11 @@
        </if>
    </select>
    <delete id="deletePopulaitonRelation">
        delete from com_mng_population_community_tags where population_id in
        <foreach item="item" collection="ids" separator="," open="(" close=")" index="">
            #{item}
        </foreach>
    </delete>
</mapper>