huanghongfa
2021-09-26 f24a6fe8e82d12689c27a687bdbdb8a5fa05714a
解决综治后台bug
11个文件已修改
114 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PagePopulationListDTO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/GridEventStatisticsVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EasyPhotoApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridDataMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberWarnLogMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PagePopulationListDTO.java
@@ -31,4 +31,14 @@
    @ApiModelProperty(value = "特殊人员标签")
    private String label;
    private Integer outOrLocal;
    /**
     * 外地or本地(1.本地  2.外地)
     */
    public interface outOrLocal{
        int bd = 1;
        int wd = 2;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/GridEventStatisticsVO.java
@@ -38,4 +38,10 @@
    @ApiModelProperty("走访任务当月完成数量")
    private Integer zfMonthNum = 0;
    @ApiModelProperty("随手拍当日完成数量")
    private Integer sspTodayNum = 0;
    @ApiModelProperty("随手拍当月完成数量")
    private Integer sspMonthNum = 0;
}
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EasyPhotoApi.java
@@ -38,6 +38,9 @@
        // if(easyAppDTO.getCommunityId() == null){
        // easyAppDTO.setCommunityId(userInfoVO.getCommunityId());
        // }
        if(easyAppDTO != null && easyAppDTO.getIsPublicity().equals(0)){
            easyAppDTO.setIsPublicity(2);
        }
        return gridService.easyListByAdmin(easyAppDTO);
    }
@@ -64,12 +67,18 @@
            return R.fail("请先登录");
        }
        photoHandleDTO.setHandlerId(userInfoVO.getUserId());
        if(photoHandleDTO.getIsPublicity().equals(0)){
            photoHandleDTO.setIsPublicity(2);
        }
        return gridService.easyHandleByAdmin(photoHandleDTO);
    }
    @ApiOperation(value = "随手拍切换公示状态-lyq")
    @PostMapping("publicity")
    public R publicity(@RequestBody ComActEasyPhotoEditAdminDTO photoHandleDTO) {
        if(photoHandleDTO != null && photoHandleDTO.getIsPublicity().equals(0)){
            photoHandleDTO.setIsPublicity(2);
        }
        return gridService.easyPublicityByAdmin(photoHandleDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -548,15 +548,6 @@
    @Select("select count(id) from com_elders_auth_elderly WHERE community_id = #{communityId}")
    Integer getStatisticsCount(@Param("communityId") Long communityId);
    @Select("<script> "
        + "select cmp.id,cmp.`name`,cmp.phone,cmp.card_no,cmpct.label,cmp.address,cmp.nation,cmp.political_outlook,cmv.lng,cmv.lat"
        + ",cmp.sex from com_mng_population as cmp left join com_mng_village as cmv on cmv.village_id = cmp.village_id "
        + " left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  "
        + " where cmpct.community_id = #{populationListDTO.communityId}"
        + "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != &quot;&quot;'>"
        + "AND (cmp.`name` like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%'))  "
        + " </if> " + "<if test='populationListDTO.label != null and populationListDTO.label != &quot;&quot;'>"
        + "AND cmpct.label like concat ('%',#{populationListDTO.label},'%') " + " </if> " + " </script>")
    IPage<PopulationListVO> pagePopulationListApp(Page page,
        @Param("populationListDTO") PagePopulationListDTO populationListDTO);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java
@@ -164,7 +164,7 @@
        + " LEFT JOIN com_mng_population AS cmp ON cmp.id = cmphu.popul_id  "
        + " left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id " + "WHERE "
        + " cmphu.house_id = #{houseId} " + "<if test='relation != null '>" + " AND cmphu.relation = #{relation}  "
        + " </if> " + "<if test='relationId != null '>" + " AND cmphu.relation_id = #{relationId}  " + " </if> "
        + " </if> " + "<if test='relationId != null '>" + " AND cmphu.relation_id = #{relationId}  " + " group by id </if> "
        + " </script>")
    List<PopulationListVO> getGridVillageBuildingPopulationList(@Param("houseId") Long houseId,
        @Param("relation") Integer relation, @Param("relationId") Integer relationId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -7396,6 +7396,14 @@
     */
    @Override
    public R pagePopulationListApp(PagePopulationListDTO populationListDTO) {
        if(populationListDTO.getLabel() != null && "户籍人口".equals(populationListDTO.getLabel())){
            populationListDTO.setLabel(null);
            populationListDTO.setOutOrLocal(PagePopulationListDTO.outOrLocal.bd);
        }
        if(populationListDTO.getLabel() != null && "流动人口".equals(populationListDTO.getLabel())){
            populationListDTO.setLabel(null);
            populationListDTO.setOutOrLocal(PagePopulationListDTO.outOrLocal.wd);
        }
        IPage<PopulationListVO> pagePopulationList = this.baseMapper.pagePopulationListApp(
            new Page(populationListDTO.getPageNum(), populationListDTO.getPageSize()), populationListDTO);
        if (!pagePopulationList.getRecords().isEmpty()) {
@@ -7502,10 +7510,10 @@
    public R delGridPopulationAdmin(List<Long> ids) {
        Integer count = this.baseMapper.getPopulationVisitingCount(ids);
        if (count > 0) {
            return R.ok("您选择的数据中存在被引用的,无法删除");
            return R.fail("您选择的数据中存在被引用的,无法删除");
        }
        this.baseMapper.deleteBatchIds(ids);
        return R.ok();
        return R.ok("删除成功");
    }
    @Override
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -225,4 +225,34 @@
        ;
    </update>
    <select id="pagePopulationListApp" resultType="com.panzhihua.common.model.vos.grid.PopulationListVO">
        SELECT
        cmp.id,
        cmp.`name`,
        cmp.phone,
        cmp.card_no,
        cmpct.label,
        cmp.address,
        cmp.nation,
        cmp.political_outlook,
        cmv.lng,
        cmv.lat,
        cmp.sex
        FROM
        com_mng_population AS cmp
        LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id
        LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id
        WHERE
        cmpct.community_id = #{populationListDTO.communityId}
        <if test = 'populationListDTO.keyWord != null and populationListDTO.keyWord != &quot;&quot;' >
            AND (cmp.`name` LIKE concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%'))
        </if>
        <if test = 'populationListDTO.label != null and populationListDTO.label != &quot;&quot;' >
            AND cmpct.label LIKE concat ('%',#{populationListDTO.label},'%')
        </if>
        <if test="populationListDTO.outOrLocal != null">
            AND cmp.out_or_local = #{populationListDTO.outOrLocal}
        </if>
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -1945,8 +1945,8 @@
    public R getGridEventStatisticsByApp(Long gridId, Long userId) {
        GridEventStatisticsVO result = this.baseMapper.getGridEventStatisticsByApp(gridId);
        if (result != null) {
            result.setTodayNum(result.getTodayNum() + result.getZfTodayNum());
            result.setMonthNum(result.getMonthNum() + result.getZfMonthNum());
            result.setTodayNum(result.getTodayNum() + result.getZfTodayNum() + result.getSspTodayNum());
            result.setMonthNum(result.getMonthNum() + result.getZfMonthNum() + result.getSspMonthNum());
            // 查询当前网格员下管理的楼栋名称
            List<Map<String, Object>> buildNameList = this.baseMapper.getMemberBuildName(userId);
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridDataMapper.xml
@@ -268,7 +268,8 @@
            8 AS event_type
        FROM
            com_mng_population AS cmp
            LEFT JOIN event_grid_data AS egd ON egd.grid_community_id = cmp.act_id
            LEFT JOIN com_mng_population_community_tags AS cmpct ON cmpct.population_id = cmp.id
            LEFT JOIN event_grid_data AS egd ON egd.grid_community_id = cmpct.community_id
        WHERE
            egd.id = #{eventGridTodoDataDTO.gridId} UNION ALL
        SELECT
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberWarnLogMapper.xml
@@ -81,6 +81,7 @@
        <if test="gridMemberWainDTO.keyWord!=null and gridMemberWainDTO.keyWord!= &quot;&quot;">
            AND (content like concat(#{gridMemberWainDTO.keyWord},'%') or position_address like concat(#{gridMemberWainDTO.keyWord},'%'))
        </if>
        order by create_at desc
    </select>
    <update id="setUserWorkStatus">
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -636,7 +636,33 @@
        <if test="gridId!=null">
            AND grid_id = #{gridId}
        </if>
        ) as zfMonthNum
        ) as zfMonthNum,(
        SELECT
            count( caep.id )
        FROM
            com_act_easy_photo as caep
            left join event_grid_data as egd on egd.grid_community_id = caep.community_id
        WHERE
            handle_status = 2
            AND feedback_at BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' )
            AND DATE_SUB(DATE_ADD( CURDATE(), INTERVAL 1 DAY ),INTERVAL 1 SECOND)
            <if test="gridId!=null">
                AND egd.id = #{gridId}
            </if>
        ) as sspTodayNum,
        (
        SELECT
            count( caep.id )
        FROM
            com_act_easy_photo as caep
            left join event_grid_data as egd on egd.grid_community_id = caep.community_id
        WHERE
            handle_status = 2
            AND feedback_at BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' ) AND NOW()
            <if test="gridId!=null">
                AND egd.id = #{gridId}
            </if>
        ) as sspMonthNum
        FROM
            `event`
        WHERE