| | |
| | | @ApiModelProperty(value = "特殊人员标签") |
| | | private String label; |
| | | |
| | | private Integer outOrLocal; |
| | | |
| | | /** |
| | | * 外地or本地(1.本地 2.外地) |
| | | */ |
| | | public interface outOrLocal{ |
| | | int bd = 1; |
| | | int wd = 2; |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("走访任务当月完成数量") |
| | | private Integer zfMonthNum = 0; |
| | | |
| | | @ApiModelProperty("随手拍当日完成数量") |
| | | private Integer sspTodayNum = 0; |
| | | |
| | | @ApiModelProperty("随手拍当月完成数量") |
| | | private Integer sspMonthNum = 0; |
| | | |
| | | } |
| | |
| | | // if(easyAppDTO.getCommunityId() == null){ |
| | | // easyAppDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | // } |
| | | if(easyAppDTO != null && easyAppDTO.getIsPublicity().equals(0)){ |
| | | easyAppDTO.setIsPublicity(2); |
| | | } |
| | | return gridService.easyListByAdmin(easyAppDTO); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | @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 != ""'>" |
| | | + "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 != ""'>" |
| | | + "AND cmpct.label like concat ('%',#{populationListDTO.label},'%') " + " </if> " + " </script>") |
| | | IPage<PopulationListVO> pagePopulationListApp(Page page, |
| | | @Param("populationListDTO") PagePopulationListDTO populationListDTO); |
| | | |
| | |
| | | + " 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); |
| | |
| | | */ |
| | | @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()) { |
| | |
| | | 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 |
| | |
| | | ; |
| | | </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 != ""' > |
| | | 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 != ""' > |
| | | AND cmpct.label LIKE concat ('%',#{populationListDTO.label},'%') |
| | | </if> |
| | | <if test="populationListDTO.outOrLocal != null"> |
| | | AND cmp.out_or_local = #{populationListDTO.outOrLocal} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | 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); |
| | |
| | | 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 |
| | |
| | | <if test="gridMemberWainDTO.keyWord!=null and gridMemberWainDTO.keyWord!= """> |
| | | AND (content like concat(#{gridMemberWainDTO.keyWord},'%') or position_address like concat(#{gridMemberWainDTO.keyWord},'%')) |
| | | </if> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <update id="setUserWorkStatus"> |
| | |
| | | <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 |