Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:55 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"通知公告"}) |
| | | @RestController |
| | | @RequestMapping("comActAnnouncement") |
| | | public class ComActAnnouncementApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComActAnnouncementVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActAnnouncementSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("通过主键查询单条数据") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.communityService.comActAnnouncementSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAnnouncementVO comActAnnouncementVO) { |
| | | comActAnnouncementVO.setCreateTime(new Date()); |
| | | comActAnnouncementVO.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActAnnouncementInsert(comActAnnouncementVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAnnouncementVO comActAnnouncementVO) { |
| | | return this.communityService.comActAnnouncementUpdate(comActAnnouncementVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActAnnouncementDelete(id); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return R.ok(Constants.IS_SHOP_OPEN); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取最新活动和用户最新收益", response = ComActEasyPhotoRewardVO.class) |
| | | @ApiOperation(value = "获取最新活动和用户最新收益", response = BannerVO.class) |
| | | @GetMapping("getUserReward") |
| | | public R getUserReward(@RequestParam("communityId") Long communityId) { |
| | | Long userId = 0L; |
| | |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long reserveId; |
| | | |
| | | @ApiModelProperty(value = "关键字") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty(value = "来攀/离攀开始时间") |
| | | private String beginTime; |
| | | |
| | | @ApiModelProperty(value = "来攀/离攀结束时间") |
| | | private String stopTime; |
| | | |
| | | } |
| | |
| | | private String handlePhotoList; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "是否公示(0.否 1.是)", hidden = false, example = "1") |
| | | @ApiModelProperty(value = "是否公示(1.是 2.否)", hidden = false, example = "1") |
| | | private Integer isPublicity; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | |
| | | @ApiModelProperty(value = "小区地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "网格id") |
| | | private Long gridId; |
| | | |
| | | public String getSortColumns() { |
| | | // String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr); |
| | | return sortAttr; |
| | |
| | | @ApiModelProperty(value = "特殊人员标签") |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "网格id") |
| | | private Long gridId; |
| | | |
| | | private Integer outOrLocal; |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class ComActAnnouncementVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 发布人id |
| | | */ |
| | | @ApiModelProperty(value = "发布人id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 通知类型id |
| | | */ |
| | | @ApiModelProperty(value = "通知类型id") |
| | | private Long columnId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 发布人 |
| | | */ |
| | | @ApiModelProperty("发布人") |
| | | private String username; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String columnName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class ComActColumnVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | @ApiModelProperty(value = "修改人") |
| | | private String updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 状态 0禁用 1启用 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0禁用 1启用") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 分类类型 1服务类型分类 2技能分类 3通知公告 |
| | | */ |
| | | @ApiModelProperty(value = "分类类型 1服务类型分类 2技能分类 3通知公告") |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "查询筛选:0-本小区 1-全部") |
| | | private Integer choice; |
| | | |
| | | @ApiModelProperty(value = "社区动态跳转链接") |
| | | private String jumpUrl; |
| | | } |
| | |
| | | private Date time; |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | @ApiModelProperty("选项类型(0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择 11文件上传)") |
| | | @ApiModelProperty("选项类型(0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择 11文件上传 12签名)") |
| | | private Integer optionType; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("养老金人员") |
| | | private Integer pensionTotal; |
| | | |
| | | @ApiModelProperty("楼栋数") |
| | | private Integer buildNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.easyPhoto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class BannerVO { |
| | | private Long id; |
| | | @ApiModelProperty("1社区动态、2居民活动、志愿者活动、3党员活动、4问卷调查、5党建动态、6预约登记、7随手拍活动") |
| | | private Integer type; |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date showTime; |
| | | @ApiModelProperty("图片路径") |
| | | private String cover; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("跳转链接") |
| | | private String jumpUrl; |
| | | } |
| | |
| | | R getGridVillageList(@RequestBody ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | @PostMapping("/village/grid/list/app") |
| | | R getGridVillageListApp(@RequestBody ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * |
| | | * @param villageId |
| | |
| | | */ |
| | | @GetMapping("/activity/my-evaluate") |
| | | R listMyActivityEvaluate(@RequestParam("userId") Long userId, @RequestParam("activityId") Long activityId); |
| | | |
| | | /** |
| | | * 导出特殊群体 |
| | | * |
| | | * @param pageInputUserDTO |
| | | * 请求参数 |
| | | * @return 特殊群体列表 |
| | | */ |
| | | @PostMapping("common/data/special/export") |
| | | R specialInputUserExport(@RequestBody PageInputUserDTO pageInputUserDTO); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActAnnouncement/queryAll") |
| | | R comActAnnouncementSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comActAnnouncement/{id}") |
| | | R comActAnnouncementSelectOne(@PathVariable("id") Long id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActAnnouncement") |
| | | R comActAnnouncementInsert(@RequestBody ComActAnnouncementVO comActAnnouncementVO); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActAnnouncement/update") |
| | | R comActAnnouncementUpdate(@RequestBody ComActAnnouncementVO comActAnnouncementVO); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comActAnnouncement/del") |
| | | R comActAnnouncementDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActColumn/queryAll") |
| | | R comActColumnSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comActColumn/{id}") |
| | | R comActColumnSelectOne(@PathVariable("id") Long id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActColumn 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActColumn") |
| | | R comActColumnInsert(@RequestBody ComActColumnVO comActColumn); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActColumn 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActColumn/update") |
| | | R comActColumnUpdate(@RequestBody ComActColumnVO comActColumn); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comActColumn/del") |
| | | R comActColumnDelete(@RequestParam("id") Long id); |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.xml.bind.DatatypeConverter; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.net.URL; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | } |
| | | continue; |
| | | } |
| | | //判断当前组件类型是否签名 |
| | | if(userAnswers.getOptionType().equals(12)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new ByteArrayInputStream(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",")+ 1)))); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | if(userAnswers.getOptionType().equals(1)){ |
| | | isOldDuo = true; |
| | |
| | | } |
| | | continue; |
| | | } |
| | | //判断当前组件类型是否签名 |
| | | if(userAnswers.getOptionType().equals(12)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new ByteArrayInputStream(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",")+ 1)))); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | if(userAnswers.getOptionType().equals(1)){ |
| | | isOldDuo = true; |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:55 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"通知公告"}) |
| | | @RestController |
| | | @RequestMapping("comActAnnouncement") |
| | | public class ComActAnnouncementApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComActAnnouncementVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActAnnouncementSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("通过主键查询单条数据") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.communityService.comActAnnouncementSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAnnouncementVO comActAnnouncementVO) { |
| | | comActAnnouncementVO.setCreateTime(new Date()); |
| | | comActAnnouncementVO.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActAnnouncementInsert(comActAnnouncementVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAnnouncementVO comActAnnouncementVO) { |
| | | return this.communityService.comActAnnouncementUpdate(comActAnnouncementVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActAnnouncementDelete(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActColumnVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分类列表(ComActColumn)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-20 17:28:14 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"分类管理"}) |
| | | @RestController |
| | | @RequestMapping("comActColumn") |
| | | public class ComActColumnApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComActColumnVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.communityService.comActColumnSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("通过主键查询单条数据") |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.communityService.comActColumnSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActColumnVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActColumnVO comActColumnVO) { |
| | | comActColumnVO.setStatus(1); |
| | | comActColumnVO.setCreateTime(new Date()); |
| | | if(StringUtils.isNotEmpty(this.getLoginUserInfo().getName())){ |
| | | comActColumnVO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | } |
| | | return communityService.comActColumnInsert(comActColumnVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActColumnVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActColumnVO comActColumnVO) { |
| | | comActColumnVO.setUpdateTime(new Date()); |
| | | if(StringUtils.isNotEmpty(this.getLoginUserInfo().getName())){ |
| | | comActColumnVO.setUpdateBy(this.getLoginUserInfo().getName()); |
| | | } |
| | | return this.communityService.comActColumnUpdate(comActColumnVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActColumnDelete(id); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "特殊群体-数据导出") |
| | | @PostMapping("/special/export") |
| | | public R dataExportSpecilPopulation() { |
| | | public R dataExportSpecilPopulation(@RequestBody PageInputUserDTO pageInputUserDTO) { |
| | | // 获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | pageInputUserDTO.setCommunityId(communityId); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "特殊群体导出数据.xlsx"; |
| | |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<ComMngPopulationVO> populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.getPopulationListByCommunityId(communityId).getData()), |
| | | ComMngPopulationVO.class); |
| | | List<InputUserInfoVO> populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.specialInputUserExport(pageInputUserDTO).getData()), |
| | | InputUserInfoVO.class); |
| | | List<ComMngPopulationExcelVo> populationExcelVoList = new ArrayList<>(); |
| | | if (populList != null && populList.size() > 0) { |
| | | for (ComMngPopulationVO popul : populList) { |
| | | if (popul.getLabel() == null) { |
| | | for (InputUserInfoVO popul : populList) { |
| | | if (popul.getTags() == null) { |
| | | continue; |
| | | } |
| | | ComMngPopulationExcelVo populationExcelVo = new ComMngPopulationExcelVo(); |
| | |
| | | public R list(@RequestBody ComMngVillageListAppDTO villageListAppDTO) { |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | villageListAppDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return communityService.getGridVillageList(villageListAppDTO); |
| | | return communityService.getGridVillageListApp(villageListAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "小区楼栋列表@lyq", response = ComMngVillageBuildingVO.class) |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import com.panzhihua.service_community.entity.ComActAnnouncement; |
| | | import com.panzhihua.service_community.service.ComActAnnouncementService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:55 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActAnnouncement") |
| | | public class ComActAnnouncementApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActAnnouncementService comActAnnouncementService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActAnnouncementService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return R.ok(this.comActAnnouncementService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActAnnouncementVO comActAnnouncementVO) { |
| | | ComActAnnouncement comActAnnouncement=new ComActAnnouncement(); |
| | | BeanUtils.copyProperties(comActAnnouncementVO,comActAnnouncement); |
| | | return R.ok(this.comActAnnouncementService.save(comActAnnouncement)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActAnnouncementVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActAnnouncementVO comActAnnouncementVO) { |
| | | ComActAnnouncement comActAnnouncement=new ComActAnnouncement(); |
| | | BeanUtils.copyProperties(comActAnnouncementVO,comActAnnouncement); |
| | | return R.ok(this.comActAnnouncementService.updateById(comActAnnouncement)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActAnnouncementService.removeById(id)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActColumnVO; |
| | | import com.panzhihua.service_community.entity.ComActColumn; |
| | | import com.panzhihua.service_community.service.ComActColumnService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 分类列表(ComActColumn)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 14:38:26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActColumn") |
| | | public class ComActColumnApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActColumnService comActColumnService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActColumnService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return R.ok(this.comActColumnService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActColumnVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActColumnVO comActColumnVO) { |
| | | ComActColumn comActColumn=new ComActColumn(); |
| | | BeanUtils.copyProperties(comActColumnVO,comActColumn); |
| | | return R.ok(this.comActColumnService.save(comActColumn)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActColumnVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActColumnVO comActColumnVO) { |
| | | ComActColumn comActColumn=new ComActColumn(); |
| | | BeanUtils.copyProperties(comActColumnVO,comActColumn); |
| | | return R.ok(this.comActColumnService.updateById(comActColumn)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActColumnService.removeById(id)); |
| | | } |
| | | } |
| | |
| | | return comMngVillageService.getGridVillageList(villageListAppDTO); |
| | | } |
| | | |
| | | @PostMapping("/village/grid/list/app") |
| | | public R getGridPopulationAdminListApp(@RequestBody ComMngVillageListAppDTO villageListAppDTO) { |
| | | return comMngVillageService.getGridVillageList(villageListAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * |
| | |
| | | public R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) { |
| | | return comMngPopulationService.specialInputUser(pageInputUserDTO); |
| | | } |
| | | /** |
| | | * 导出特殊群体 |
| | | * |
| | | * @param pageInputUserDTO |
| | | * 请求参数 |
| | | * @return 特殊群体列表 |
| | | */ |
| | | @PostMapping("/special/export") |
| | | public R specialInputUserExport(@RequestBody PageInputUserDTO pageInputUserDTO) { |
| | | return comMngPopulationService.specialInputUserExport(pageInputUserDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除特殊群体人员 |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActAnnouncement; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:54 |
| | | */ |
| | | @Mapper |
| | | public interface ComActAnnouncementDao extends BaseMapper<ComActAnnouncement> { |
| | | /** |
| | | * 分页查询通知公告 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActAnnouncementVO> pageList(Page page,@Param("commonPage") CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActColumn; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 分类列表(ComActColumn)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 14:38:25 |
| | | */ |
| | | @Mapper |
| | | public interface ComActColumnDao extends BaseMapper<ComActColumn> { |
| | | /** |
| | | *多条件分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActColumn> pageList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | |
| | | } |
| | |
| | | + "WHERE " + "d.id =#{id} " + "GROUP BY d.id") |
| | | ComActDiscussVO selectHaveSignAndHaveVote(@Param("id") Long id, @Param("loginUserId") Long loginUserId); |
| | | |
| | | @Select(" SELECT COUNT(id) AS totalNum," |
| | | + "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now())AS currentNum," |
| | | + "(SELECT COUNT(id) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1)AS imgNum," + "(" |
| | | + "SELECT " + " count(distinct cadc.user_id) " + "FROM " + " com_act_discuss_comment AS cadc " |
| | | + " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " |
| | | + " where cad.type = 1 and cad.community_id = #{communityId} " + ")AS imgPeopleNum," + "(" |
| | | + "select count(user_id) from ( " + "SELECT " + " distinct cadc.user_id " + "FROM " |
| | | + " com_act_discuss_comment AS cadc " + " LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id " |
| | | + " where cad.type = 2 and cad.community_id = #{communityId} " + " union all " |
| | | + " SELECT DISTINCT cadou.user_id FROM com_act_discuss_option_user AS cadou LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id left join com_act_discuss as cad on cad.id = cado.discuss_id where cad.community_id = #{communityId}" |
| | | + ") t" + ")AS votePeopleNum " + " FROM com_act_discuss") |
| | | |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("date") String date); |
| | | |
| | | @Select(" SELECT id,discuss_subject AS content,IF(type = 1,'图文','投票') AS typeName FROM com_act_discuss WHERE community_id = #{communityId} ORDER BY create_at DESC LIMIT #{pageSize}") |
| | |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoCountVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ExportEasyPhotoVO; |
| | |
| | | * @return 社区待处理随手拍id集合 |
| | | */ |
| | | List<Long> easyPhotoNoHandleIds(@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 查询banner |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<BannerVO> banner(@Param("communityId") Long communityId); |
| | | } |
| | |
| | | @Select("select village_id,alley,house_num,group_at,type,address,update_at from com_mng_village where village_id = #{villageId}") |
| | | ComMngVillageVO getVillageById(@Param("villageId") Long villageId); |
| | | |
| | | @Select("<script> " + "SELECT " + " village_id, " + " `name` AS userName, " + " (select count(id) from com_mng_building where village_id = cmv.village_id) as buildSum, " + " address, " |
| | | @Select("<script> " + "SELECT " + " village_id, " + " `name` AS userName, " + " IFNULL((select count(id) from com_mng_building where village_id = cmv.village_id),0) as buildSum, " + " address, " |
| | | + " create_at as createAt, " + " lng, " + " lat, " |
| | | + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, " |
| | | + " ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum, " |
| | |
| | | IPage<PageComMngVillageVO> getGridVillageList(Page page, |
| | | @Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | IPage<PageComMngVillageVO> getGridVillageListApp(Page page, |
| | | @Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | @Select("<script> " + "SELECT " + " alley, " + " house_num as doorNum, " + " `name` AS userName, " + " build_sum, " |
| | | + " address, " + " create_at as createAt, " |
| | | + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, " |
| | |
| | | */ |
| | | IPage<InputUserInfoVO> specialInputUser(Page page, @Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); |
| | | |
| | | /** |
| | | * |
| | | * @param pageInputUserDTO |
| | | * @return |
| | | */ |
| | | List<InputUserInfoVO> specialInputUserExport(@Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); |
| | | |
| | | @Select("<script> " |
| | | + "select id,tag_name,community_id,create_at,sys_flag from com_mng_user_tag <where> " |
| | | + "<if test='comMngUserTagDTO.tagName != null and comMngUserTagDTO.tagName != ""'>" |
| | |
| | | + ",(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 cmpct.label is not null) as specialTotal " |
| | | + ",(select count(DISTINCT `name`) from com_mng_village where community_id = #{communityId}) as villageTotal " |
| | | + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " |
| | |
| | | |
| | | @Select("SELECT " + " id, " + " su.nick_name AS userName, " + " su.image_url, " + " caep.create_at, " |
| | | + " caep.detail AS eventDes, " + " caep.happen_addr AS happenAddress, " + " caep.lng_lat AS happentLatLng, " |
| | | + " caep.photo_path_list, " + " IFNULL( NULL, 7 ) AS eventType, " + " caep.handle_status AS eventDealStatus " |
| | | + " caep.photo_path_list, " + " IFNULL( NULL, 7 ) AS eventType, " + " caep.status AS eventDealStatus " |
| | | + "FROM " + " com_act_easy_photo AS caep " + " LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id " |
| | | + "WHERE " + " id = #{eventId}") |
| | | EventNewStatisticsVO getEventScreenSSPDateil(@Param("eventId") Long eventId); |
| | |
| | | List<PopulationListVO> getGridVillageBuildingPopulationList(@Param("houseId") Long houseId, |
| | | @Param("relation") Integer relation, @Param("relationId") Integer relationId); |
| | | |
| | | @Select("select id as houseId,floor from com_mng_population_house where village_id = #{villageId} and floor is not null order by create_at asc") |
| | | @Select("select id as houseId,floor from com_mng_population_house where village_id = #{villageId} and floor is not null group by floor order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByFloors(@Param("villageId") Long villageId); |
| | | |
| | | @Select("select id as houseId,unit_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} order by create_at asc") |
| | | @Select("select id as houseId,unit_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no is not null group by unit_no order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByUnitNos(@Param("villageId") Long villageId, @Param("floor") String floor); |
| | | |
| | | @Select("select id as houseId,house_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no = #{unitNo} order by create_at asc") |
| | | @Select("select id as houseId,house_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no = #{unitNo} and house_no is not null group by house_no order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByHouseNos(@Param("villageId") Long villageId, @Param("floor") String floor, |
| | | @Param("unitNo") String unitNo); |
| | | |
| | |
| | | @Select("update com_mng_population_house_user set relation_id = null where id = #{id}") |
| | | Integer delBuildingHousePopulationRelationId(@Param("id") Long id); |
| | | |
| | | @Select("SELECT " + " cmv.`name` AS villageName, " + " cmph.id, " + " cmv.address, " + " cmph.floor, " |
| | | @Select("SELECT " + " cmv.`name` AS villageName, " + " cmph.id, " + " cmv.address, " + " cmph.floor,cmphu.relation, " |
| | | + " cmph.unit_no, " + " cmph.house_no " + "FROM " + " com_mng_population_house_user AS cmphu " |
| | | + " LEFT JOIN com_mng_population_house AS cmph ON cmph.id = cmphu.house_id " |
| | | + " LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmph.village_id " + "WHERE " |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:54 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComActAnnouncement implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -26741210716448548L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 发布人id |
| | | */ |
| | | @ApiModelProperty(value = "发布人id") |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 通知类型id |
| | | */ |
| | | @ApiModelProperty(value = "通知类型id") |
| | | private Long columnId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 分类列表(ComActColumn)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 14:38:25 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("分类列表") |
| | | public class ComActColumn implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 935049089365383863L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | @ApiModelProperty(value = "修改人") |
| | | private String updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 状态 0禁用 1启用 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0禁用 1启用") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 分类类型 1服务类型分类 2技能分类3公告分类 |
| | | */ |
| | | @ApiModelProperty(value = "分类类型 1服务类型分类 2技能分类3公告分类") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @ApiModelProperty(value = "描述") |
| | | private String description; |
| | | |
| | | } |
| | |
| | | * 封面模式:1-小图展示 2-大图展示 |
| | | */ |
| | | private Integer coverMode; |
| | | |
| | | /** |
| | | * 跳转链接 |
| | | */ |
| | | private String jumpUrl; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.entity.ComActAnnouncement; |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:55 |
| | | */ |
| | | public interface ComActAnnouncementService extends IService<ComActAnnouncement> { |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.entity.ComActColumn; |
| | | |
| | | /** |
| | | * 分类列表(ComActColumn)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 14:38:25 |
| | | */ |
| | | public interface ComActColumnService extends IService<ComActColumn> { |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | } |
| | |
| | | R relationVillage(String name); |
| | | |
| | | R getVillagePopulationAdmin(PageComMngVillagePopulationDTO villagePopulationDTO); |
| | | |
| | | /** |
| | | * 导出特殊人群 |
| | | * @param PageInputUserDTO |
| | | * @return |
| | | */ |
| | | R specialInputUserExport(PageInputUserDTO PageInputUserDTO); |
| | | } |
| | |
| | | */ |
| | | R getGridVillageList(ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | |
| | | R getGridVillageListApp(ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 小区下楼栋列表 |
| | | * |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComActAnnouncement; |
| | | import com.panzhihua.service_community.dao.ComActAnnouncementDao; |
| | | import com.panzhihua.service_community.service.ComActAnnouncementService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComActAnnouncement)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 13:45:55 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActAnnouncementServiceImpl extends ServiceImpl<ComActAnnouncementDao, ComActAnnouncement> implements ComActAnnouncementService { |
| | | @Resource |
| | | private ComActAnnouncementDao comActAnnouncementDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(comActAnnouncementDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComActColumn; |
| | | import com.panzhihua.service_community.dao.ComActColumnDao; |
| | | import com.panzhihua.service_community.service.ComActColumnService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 分类列表(ComActColumn)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-11-01 14:38:25 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActColumnServiceImpl extends ServiceImpl<ComActColumnDao, ComActColumn> implements ComActColumnService { |
| | | @Resource |
| | | private ComActColumnDao comActColumnDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(this.comActColumnDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public R getUserReward(Long userId, Long communityId) { |
| | | // 结果返回参数 |
| | | ComActEasyPhotoRewardVO easyPhotoRewardVO = new ComActEasyPhotoRewardVO(); |
| | | // 查询随手拍活动 |
| | | ComActEasyPhotoActivityVO photoActivityVO = new ComActEasyPhotoActivityVO(); |
| | | Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format); |
| | | List<ComActEasyPhotoActivityDO> photoActivityDOS = |
| | | comActEasyPhotoActivityMapper.selectList(new QueryWrapper<ComActEasyPhotoActivityDO>().lambda() |
| | | .eq(ComActEasyPhotoActivityDO::getCommunityId, communityId) |
| | | .eq(ComActEasyPhotoActivityDO::getStatus, ComActEasyPhotoActivityDO.status.jxz) |
| | | .le(ComActEasyPhotoActivityDO::getActivityStartAt, nowDate) |
| | | .ge(ComActEasyPhotoActivityDO::getActivityEndAt, nowDate)); |
| | | if (!photoActivityDOS.isEmpty()) { |
| | | ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0); |
| | | BeanUtils.copyProperties(photoActivityDO, photoActivityVO); |
| | | easyPhotoRewardVO.setEasyPhotoActivityVO(photoActivityVO); |
| | | } |
| | | |
| | | if (userId != null && userId != 0L) { |
| | | // 查询用户未读奖励金额 |
| | | BigDecimal amount = comActEasyPhotoRewardMapper.getUserReward(userId, communityId); |
| | | if (amount != null) { |
| | | easyPhotoRewardVO.setAmount(amount); |
| | | } |
| | | } |
| | | |
| | | // 查询当前社区正在进行中的弹窗调查问卷 |
| | | ComActQuestnaireDO popupQuestnaireDO = comActQuestnaireDAO.selectOne(new QueryWrapper<ComActQuestnaireDO>() |
| | | .lambda().le(ComActQuestnaireDO::getStartTime, nowDate).ge(ComActQuestnaireDO::getEndTime, nowDate) |
| | | .eq(ComActQuestnaireDO::getCommunityId, communityId).eq(ComActQuestnaireDO::getState, 2) |
| | | .eq(ComActQuestnaireDO::getAdverPositionPopup, ComActQuestnaireDO.isOk.yes)); |
| | | if (popupQuestnaireDO != null) { |
| | | ComActQuestnaireAppVO popupQuestnaireVO = new ComActQuestnaireAppVO(); |
| | | BeanUtils.copyProperties(popupQuestnaireDO, popupQuestnaireVO); |
| | | if (userId != null) { |
| | | if (popupQuestnaireDO.getIsForce().equals(ComActQuestnaireDO.isOk.no)) { |
| | | // 查询用户是否已点击不再提醒 |
| | | Integer count = comActQuestnaireDAO.getNoRemindCount(userId, popupQuestnaireVO.getId()); |
| | | if (count <= 0) { |
| | | popupQuestnaireVO.setIsDisplay(ComActQuestnaireDO.isOk.yes); |
| | | } |
| | | } else { |
| | | popupQuestnaireVO.setIsDisplay(ComActQuestnaireDO.isOk.yes); |
| | | } |
| | | } |
| | | easyPhotoRewardVO.setPopupQuestnaireVO(popupQuestnaireVO); |
| | | } |
| | | |
| | | // 查询社区正在进行中的banner位置调查问卷列表 |
| | | List<ComActQuestnaireAppVO> bannerQuestnaireList = comActQuestnaireDAO.getIndexTopQuestnaireList(communityId); |
| | | if (!bannerQuestnaireList.isEmpty()) { |
| | | easyPhotoRewardVO.setBannerQuestnaireList(bannerQuestnaireList); |
| | | } |
| | | |
| | | //查询社区正在进行中的banner位置的社区活动 |
| | | List<ComActActivityVO> comActActivityVOList = comActActivityDAO.getIndexTopActivityList(communityId); |
| | | if (!comActActivityVOList.isEmpty()) { |
| | | easyPhotoRewardVO.setBannerActivityList(comActActivityVOList); |
| | | } |
| | | |
| | | // 查询社区正在进行中的应用位置调查问卷列表 |
| | | List<ComActQuestnaireAppVO> applicationQuestnaireList = |
| | | comActQuestnaireDAO.getIndexApplicationQuestnaireList(communityId); |
| | | if (!applicationQuestnaireList.isEmpty()) { |
| | | easyPhotoRewardVO.setApplicationQuestnaireList(applicationQuestnaireList); |
| | | } |
| | | //查询社区正在进行中的banner预约/登记列表 |
| | | List<ComActReserveIndexVo> comActReserveIndexVos=comActReserveMapper.indexBanner(communityId); |
| | | if(!comActReserveIndexVos.isEmpty()){ |
| | | easyPhotoRewardVO.setComActReserveIndexBannerVos(comActReserveIndexVos); |
| | | } |
| | | //查询社区正在进行中的应用预约/登记列表 |
| | | List<ComActReserveIndexVo> comActReserveIndexApplicationVos=comActReserveMapper.indexApplication(communityId); |
| | | if(!comActReserveIndexApplicationVos.isEmpty()){ |
| | | easyPhotoRewardVO.setComActReserveIndexApplicationVos(comActReserveIndexApplicationVos); |
| | | } |
| | | return R.ok(easyPhotoRewardVO); |
| | | // // 结果返回参数 |
| | | // ComActEasyPhotoRewardVO easyPhotoRewardVO = new ComActEasyPhotoRewardVO(); |
| | | // // 查询随手拍活动 |
| | | // ComActEasyPhotoActivityVO photoActivityVO = new ComActEasyPhotoActivityVO(); |
| | | // Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format); |
| | | // List<ComActEasyPhotoActivityDO> photoActivityDOS = |
| | | // comActEasyPhotoActivityMapper.selectList(new QueryWrapper<ComActEasyPhotoActivityDO>().lambda() |
| | | // .eq(ComActEasyPhotoActivityDO::getCommunityId, communityId) |
| | | // .eq(ComActEasyPhotoActivityDO::getStatus, ComActEasyPhotoActivityDO.status.jxz) |
| | | // .le(ComActEasyPhotoActivityDO::getActivityStartAt, nowDate) |
| | | // .ge(ComActEasyPhotoActivityDO::getActivityEndAt, nowDate)); |
| | | // if (!photoActivityDOS.isEmpty()) { |
| | | // ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0); |
| | | // BeanUtils.copyProperties(photoActivityDO, photoActivityVO); |
| | | // easyPhotoRewardVO.setEasyPhotoActivityVO(photoActivityVO); |
| | | // } |
| | | // |
| | | // if (userId != null && userId != 0L) { |
| | | // // 查询用户未读奖励金额 |
| | | // BigDecimal amount = comActEasyPhotoRewardMapper.getUserReward(userId, communityId); |
| | | // if (amount != null) { |
| | | // easyPhotoRewardVO.setAmount(amount); |
| | | // } |
| | | // } |
| | | // |
| | | // // 查询当前社区正在进行中的弹窗调查问卷 |
| | | // ComActQuestnaireDO popupQuestnaireDO = comActQuestnaireDAO.selectOne(new QueryWrapper<ComActQuestnaireDO>() |
| | | // .lambda().le(ComActQuestnaireDO::getStartTime, nowDate).ge(ComActQuestnaireDO::getEndTime, nowDate) |
| | | // .eq(ComActQuestnaireDO::getCommunityId, communityId).eq(ComActQuestnaireDO::getState, 2) |
| | | // .eq(ComActQuestnaireDO::getAdverPositionPopup, ComActQuestnaireDO.isOk.yes)); |
| | | // if (popupQuestnaireDO != null) { |
| | | // ComActQuestnaireAppVO popupQuestnaireVO = new ComActQuestnaireAppVO(); |
| | | // BeanUtils.copyProperties(popupQuestnaireDO, popupQuestnaireVO); |
| | | // if (userId != null) { |
| | | // if (popupQuestnaireDO.getIsForce().equals(ComActQuestnaireDO.isOk.no)) { |
| | | // // 查询用户是否已点击不再提醒 |
| | | // Integer count = comActQuestnaireDAO.getNoRemindCount(userId, popupQuestnaireVO.getId()); |
| | | // if (count <= 0) { |
| | | // popupQuestnaireVO.setIsDisplay(ComActQuestnaireDO.isOk.yes); |
| | | // } |
| | | // } else { |
| | | // popupQuestnaireVO.setIsDisplay(ComActQuestnaireDO.isOk.yes); |
| | | // } |
| | | // } |
| | | // easyPhotoRewardVO.setPopupQuestnaireVO(popupQuestnaireVO); |
| | | // } |
| | | // |
| | | // // 查询社区正在进行中的banner位置调查问卷列表 |
| | | // List<ComActQuestnaireAppVO> bannerQuestnaireList = comActQuestnaireDAO.getIndexTopQuestnaireList(communityId); |
| | | // if (!bannerQuestnaireList.isEmpty()) { |
| | | // easyPhotoRewardVO.setBannerQuestnaireList(bannerQuestnaireList); |
| | | // } |
| | | // |
| | | // //查询社区正在进行中的banner位置的社区活动 |
| | | // List<ComActActivityVO> comActActivityVOList = comActActivityDAO.getIndexTopActivityList(communityId); |
| | | // if (!comActActivityVOList.isEmpty()) { |
| | | // easyPhotoRewardVO.setBannerActivityList(comActActivityVOList); |
| | | // } |
| | | // |
| | | // // 查询社区正在进行中的应用位置调查问卷列表 |
| | | // List<ComActQuestnaireAppVO> applicationQuestnaireList = |
| | | // comActQuestnaireDAO.getIndexApplicationQuestnaireList(communityId); |
| | | // if (!applicationQuestnaireList.isEmpty()) { |
| | | // easyPhotoRewardVO.setApplicationQuestnaireList(applicationQuestnaireList); |
| | | // } |
| | | // //查询社区正在进行中的banner预约/登记列表 |
| | | // List<ComActReserveIndexVo> comActReserveIndexVos=comActReserveMapper.indexBanner(communityId); |
| | | // if(!comActReserveIndexVos.isEmpty()){ |
| | | // easyPhotoRewardVO.setComActReserveIndexBannerVos(comActReserveIndexVos); |
| | | // } |
| | | // //查询社区正在进行中的应用预约/登记列表 |
| | | // List<ComActReserveIndexVo> comActReserveIndexApplicationVos=comActReserveMapper.indexApplication(communityId); |
| | | // if(!comActReserveIndexApplicationVos.isEmpty()){ |
| | | // easyPhotoRewardVO.setComActReserveIndexApplicationVos(comActReserveIndexApplicationVos); |
| | | // } |
| | | return R.ok(this.comActEasyPhotoDAO.banner(communityId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | // subordinateList = |
| | | // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new |
| | | // TreeSet<>(Comparator.comparing(o -> o.getFloor()))), ArrayList::new)); |
| | | subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getFloor)) |
| | | .collect(Collectors.toList()); |
| | | // subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getFloor)) |
| | | // .collect(Collectors.toList()); |
| | | subordinateList.forEach(cascade -> { |
| | | if (cascade.getFloor().contains("栋")) { |
| | | cascade.setName(cascade.getFloor()); |
| | |
| | | if (houseDO != null) { |
| | | subordinateList = |
| | | this.baseMapper.getHouseLevelByUnitNos(houseDO.getVillageId(), houseDO.getFloor()); |
| | | subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getUnitNo)) |
| | | .collect(Collectors.toList()); |
| | | // subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getUnitNo)) |
| | | // .collect(Collectors.toList()); |
| | | // subordinateList = |
| | | // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new |
| | | // TreeSet<>(Comparator.comparing(o -> o.getUnitNo()))), ArrayList::new)); |
| | |
| | | if (houseDO != null) { |
| | | subordinateList = this.baseMapper.getHouseLevelByHouseNos(houseDO.getVillageId(), |
| | | houseDO.getFloor(), houseDO.getUnitNo()); |
| | | subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getHouseNo)) |
| | | .collect(Collectors.toList()); |
| | | // subordinateList = subordinateList.stream().filter(distinctByKey(ComMngSubordinateVO::getHouseNo)) |
| | | // .collect(Collectors.toList()); |
| | | // subordinateList = |
| | | // subordinateList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new |
| | | // TreeSet<>(Comparator.comparing(o -> o.getHouseNo()))), ArrayList::new)); |
| | |
| | | statisticsVO.setDangerLevel("0"); |
| | | statisticsVO.setMajor(false); |
| | | statisticsVO.setUrgent(false); |
| | | if (statisticsVO.getEventDealStatus().equals(2)) { |
| | | statisticsVO.setEventDealStatus(4); |
| | | if (statisticsVO.getEventDealStatus().equals(2)||statisticsVO.getEventDealStatus().equals(1)) { |
| | | statisticsVO.setEventDealStatus(1); |
| | | } |
| | | else { |
| | | statisticsVO.setEventDealStatus(2); |
| | | } |
| | | List<EventResourceVO> picList = new ArrayList<>(); |
| | | String[] pics = statisticsVO.getPhotoPathList().split(","); |
| | |
| | | new Page(villagePopulationDTO.getPageNum(), villagePopulationDTO.getPageSize()), villagePopulationDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R specialInputUserExport(PageInputUserDTO PageInputUserDTO) { |
| | | return R.ok(this.comMngPopulationDAO.specialInputUserExport(PageInputUserDTO)); |
| | | } |
| | | |
| | | private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) { |
| | | mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook())); |
| | | mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent())); |
| | |
| | | new Page(villageListAppDTO.getPageNum(), villageListAppDTO.getPageSize()), villageListAppDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridVillageListApp(ComMngVillageListAppDTO villageListAppDTO) { |
| | | return R.ok(this.baseMapper.getGridVillageList( |
| | | new Page(villageListAppDTO.getPageNum(), villageListAppDTO.getPageSize()), villageListAppDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | | * |
| | |
| | | int half = day / 2; |
| | | String month = DateUtil.format(date, moth_format_str); |
| | | DynamicWorkVO dynamicWorkVO = new DynamicWorkVO(); |
| | | dynamicWorkVO.setMonth(monthStr[m] + "月上旬"); |
| | | dynamicWorkVO.setMonth(monthStr[m-1] + "月上旬"); |
| | | dynamicWorkVO.setStart(month + "-01 00:00:00"); |
| | | dynamicWorkVO.setEnd(month + "-" + half + " 23:59:58"); |
| | | dateList.add(dynamicWorkVO); |
| | | DynamicWorkVO dynamicWorkVO1 = new DynamicWorkVO(); |
| | | dynamicWorkVO1.setMonth(monthStr[m] + "月下旬"); |
| | | dynamicWorkVO1.setMonth(monthStr[m-1] + "月下旬"); |
| | | dynamicWorkVO1.setStart(month + "-" + half + " 23:59:58"); |
| | | dynamicWorkVO1.setEnd(DateUtils.getDateFormatString(endDay, "yyyy-MM-dd HH:mm:ss")); |
| | | dateList.add(dynamicWorkVO1); |
| | | } |
| | | return dateList; |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActAnnouncementDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActAnnouncement" id="ComActAnnouncementBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="content" column="content"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="columnId" column="column_id"/> |
| | | <result property="communityId" column="community_id"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActAnnouncementVO"> |
| | | select t.*,t1.name as username,t2.name as columnName from com_act_announcement t left join sys_user t1 on t.user_id = t1.user_id left join com_act_column t2 on t.column_id = t2.id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.communityId!=null"> |
| | | and t.community_id=#{commonPage.communityId} |
| | | </if> |
| | | <if test="commonPage.paramId!=null"> |
| | | and t.column_id =#{commonPage.paramId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActColumnDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActColumn" id="ComActColumnBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="status" column="status"/> |
| | | <result property="type" column="type"/> |
| | | <result property="description" column="description"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | limit 10 |
| | | </select> |
| | | |
| | | <select id="countByCommunityId" resultType="Map"> |
| | | SELECT |
| | | COUNT( id ) AS totalNum, |
| | | ( |
| | | SELECT |
| | | COUNT( id ) |
| | | FROM |
| | | com_act_discuss |
| | | WHERE |
| | | community_id = #{communityId} |
| | | AND create_at BETWEEN DATE_ADD(curdate(),interval -day(curdate())+1 day) |
| | | AND now()) AS currentNum, |
| | | ( SELECT COUNT( id ) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1 ) AS imgNum, |
| | | ( |
| | | SELECT |
| | | count( DISTINCT cadc.user_id ) |
| | | FROM |
| | | com_act_discuss_comment AS cadc |
| | | LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id |
| | | WHERE |
| | | cad.type = 1 |
| | | AND cad.community_id = #{communityId} |
| | | ) AS imgPeopleNum, |
| | | ( |
| | | SELECT |
| | | count( user_id ) |
| | | FROM |
| | | ( |
| | | SELECT DISTINCT |
| | | cadc.user_id |
| | | FROM |
| | | com_act_discuss_comment AS cadc |
| | | LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id |
| | | WHERE |
| | | cad.type = 2 |
| | | AND cad.community_id = #{communityId} UNION ALL |
| | | SELECT DISTINCT |
| | | cadou.user_id |
| | | FROM |
| | | com_act_discuss_option_user AS cadou |
| | | LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id |
| | | LEFT JOIN com_act_discuss AS cad ON cad.id = cado.discuss_id |
| | | WHERE |
| | | cad.community_id = #{communityId} |
| | | ) t |
| | | ) AS votePeopleNum |
| | | FROM |
| | | com_act_discuss |
| | | WHERE |
| | | community_id = #{communityId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | select id from com_act_easy_photo where `status` = 1 and community_id = #{communityId} and del_tag = 0 |
| | | </select> |
| | | |
| | | <select id="banner" resultType="com.panzhihua.common.model.vos.community.easyPhoto.BannerVO"> |
| | | select id,cover,publish_at as show_time,1 as type from com_act_dyn where status =1 and cover is not null and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,cover,publish_at as show_time,2 as type from com_act_activity where status =3 and cover is not null and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,cover,release_time as show_time,3 as type from com_pb_activity where status =3 and cover is not null and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,"" as cover,publish_time as show_time,4 as type from com_act_questnaire where state =2 and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,cover,publish_at as show_time,5 as type from com_pb_dyn where status =2 and type =1 and cover is not null and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,img_url,publish_time as show_time,6 as type from com_act_reserve where status =2 and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,photo_path_list,examine_at as show_time,7 as type from com_act_easy_photo where status =2 and community_id =#{communityId} |
| | | order by show_time desc limit 30 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | left join com_act_reserve_answer_content carac on carr.id=carac.reserve_record_id |
| | | WHERE |
| | | reserve_id = #{detailedAdminDTO.reserveId} |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND carr.create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.beginTime != null and detailedAdminDTO.beginTime != ""'> |
| | | AND STR_TO_DATE(carac.answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{detailedAdminDTO.beginTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.stopTime != null and detailedAdminDTO.stopTime != ""'> |
| | | AND STR_TO_DATE(carac.answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{detailedAdminDTO.stopTime} |
| | | </if> |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND carac.answer_content like concat ('%',${detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | group by carr.id |
| | | </select> |
| | | |
| | | <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO"> |
| | |
| | | cmv.`name` AS villageName, |
| | | cmv.house_num as doorNum, |
| | | (select count(distinct unit_no) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name`) as unit_total, |
| | | (select max(CAST(house_no as SIGNED)) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name`) as buildFloorSum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name`) as houseNum, |
| | | (select max(CAST(house_no as SIGNED)) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null) as buildFloorSum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` ) as houseNum, |
| | | (select count(id) from com_mng_population where village_id = cmb.village_id and floor = cmb.`name`) as populationNum |
| | | FROM |
| | | com_mng_building AS cmb |
| | |
| | | cmb.`name`, |
| | | cmv.`name` AS village, |
| | | cmv.village_id, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name`) as houseNum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` and `status` = 1) as liveTotal, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` and `status` = 2) as leaseTotal, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name` and `status` = 3) as vacantNum |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null) AS houseNum, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null AND `status` = 1 ) AS liveTotal, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null AND `status` = 2 ) AS leaseTotal, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmb.village_id AND floor = cmb.`name` AND `unit_no` is not null and house_no is not null AND `status` = 3 ) AS vacantNum |
| | | FROM |
| | | com_mng_building AS cmb |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmb.village_id |
| | |
| | | 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 |
| | | LEFT JOIN event_grid_data as egd on egd.grid_community_id = cmpct.community_id |
| | | WHERE |
| | | cmpct.community_id = #{populationListDTO.communityId} |
| | | egd.id = #{populationListDTO.gridId} |
| | | <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> |
| | |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="specialInputUserExport" resultType="com.panzhihua.common.model.vos.user.InputUserInfoVO"> |
| | | SELECT |
| | | cmp.id, |
| | | cmv.`name` AS areaName, |
| | | cmv.alley AS alley, |
| | | cmv.house_num AS houseNum, |
| | | cmp.`name`, |
| | | cmp.phone, |
| | | cmpct.label AS tags, |
| | | cmp.create_at |
| | | FROM |
| | | com_mng_population_community_tags as cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id |
| | | WHERE |
| | | cmpct.community_id = #{pageInputUserDTO.communityId} |
| | | AND cmpct.label IS NOT NULL |
| | | <if test='pageInputUserDTO.name != null and pageInputUserDTO.name != ""'> |
| | | AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%') |
| | | </if> |
| | | <if test='pageInputUserDTO.areaName != null and pageInputUserDTO.areaName != ""'> |
| | | AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%') |
| | | </if> |
| | | <if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != ""'> |
| | | AND cmpct.label like concat('%',#{pageInputUserDTO.tags},'%') |
| | | </if> |
| | | ORDER BY |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="query" resultType="com.panzhihua.common.model.vos.community.ComMngPopulationNoSecretVO"> |
| | | select * from com_mng_population |
| | | <where> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActVillageDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComMngVillageDO"> |
| | | <id column="village_id" property="villageId" /> |
| | | <result column="street_id" property="streetId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="alley" property="alley" /> |
| | | <result column="house_num" property="houseNum" /> |
| | | <result column="group_at" property="groupAt" /> |
| | | <result column="type" property="type" /> |
| | | <result column="name" property="name" /> |
| | | <result column="build_sum" property="buildSum" /> |
| | | <result column="build_year" property="buildYear" /> |
| | | <result column="build_type" property="buildType" /> |
| | | <result column="property" property="property" /> |
| | | <result column="developers" property="developers" /> |
| | | <result column="user_sum" property="userSum" /> |
| | | <result column="village_images" property="villageImages" /> |
| | | <result column="address" property="address" /> |
| | | <result column="path" property="path" /> |
| | | <result column="lng" property="lng" /> |
| | | <result column="lat" property="lat" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | village_id, street_id, community_id, alley, house_num, group_at, type, name, build_sum, build_year, build_type, property, developers, user_sum, village_images, address, path, lng, lat, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="getGridVillageListApp" resultType="com.panzhihua.common.model.vos.grid.PageComMngVillageVO"> |
| | | SELECT cmv.village_id, cmv.`name` AS userName, IFNULL((select count(id) from com_mng_building where village_id = cmv.village_id),0) as buildSum, address, |
| | | cmv.create_at as createAt, cmv.lng, cmv.lat, |
| | | ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, |
| | | ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum, |
| | | ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND out_or_local = 1 ) AS registerNum, |
| | | ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND is_rent = 2 ) AS rentNum |
| | | FROM com_mng_village AS cmv |
| | | LEFT JOIN event_grid_data as egd on egd.grid_community_id = cmv.community_id |
| | | where 1=1 |
| | | <if test='villageListAppDTO.gridId != null'> |
| | | and egd.id = #{villageListAppDTO.gridId} |
| | | </if> |
| | | <if test='villageListAppDTO.address != null and villageListAppDTO.address != ""'> |
| | | and cmv.address like concat(#{villageListAppDTO.address},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.alley != null and villageListAppDTO.alley != ""'> |
| | | and cmv.alley like concat(#{villageListAppDTO.alley},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.houseNum != null and villageListAppDTO.houseNum != ""'> |
| | | and cmv.house_num like concat(#{villageListAppDTO.houseNum},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.groupAt != null and villageListAppDTO.groupAt != ""'> |
| | | and cmv.group_at like concat(#{villageListAppDTO.groupAt},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.name != null and villageListAppDTO.name != ""'> |
| | | and cmv.name like concat(#{villageListAppDTO.name},'%') |
| | | </if> |
| | | <if test='villageListAppDTO.sortColumns!=null'> |
| | | ORDER BY ${villageListAppDTO.sortColumns} ${villageListAppDTO.sortType} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | } |
| | | BeanUtils.copyProperties(photoHandleDTO, easyPhotoDO); |
| | | easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); |
| | | easyPhotoDO.setFeedbackAt(new Date()); |
| | | // 关联随手拍类型 |
| | | if (!photoHandleDTO.getEasyTypeIds().isEmpty()) { |
| | | List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |
| | |
| | | <if test="query.keyWord != null and query.keyWord != ''"> |
| | | and( |
| | | p.card_no_str like concat('%',#{query.keyWord},'%') or |
| | | p.`name` like concat('%',#{query.keyWord},'%') or |
| | | vt.visiter_address like concat('%',#{query.keyWord},'%') |
| | | ) |
| | | </if> |
| | |
| | | * 封面模式:1-小图展示 2-大图展示 |
| | | */ |
| | | private Integer coverMode; |
| | | |
| | | /** |
| | | * 跳转链接 |
| | | */ |
| | | private String jumpUrl; |
| | | } |