New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: ComActActEvaluateDO 社区活动签到表 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 记录和展示社区活动签到内容 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/24 10:21 |
| | | */ |
| | | |
| | | @Data |
| | | @ApiModel("社区活动签到表") |
| | | public class ComActActRegistVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("所属活动id") |
| | | private Long activityId; |
| | | |
| | | @ApiModelProperty("用户id, 和用户信息表的相关id关联") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("名字") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("身份") |
| | | private String identity; |
| | | |
| | | @ApiModelProperty("人群标签") |
| | | private String tags; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("人员头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(value = "列表人员类型 1 普通居民 2 志愿者", hidden = true) |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("签到时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("是否是志愿者 0 否 1 是") |
| | | private Integer isVolunteer; |
| | | |
| | | @ApiModelProperty("用户openid") |
| | | private String openid; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | } |
| | |
| | | * @date 2021/8/24 14:03 |
| | | */ |
| | | @PostMapping("/activity/evaluate/page") |
| | | R pageActivityRegists(@RequestBody ComActActEvaluateVO comActActEvaluateVO); |
| | | R pageActivityEvaluates(@RequestBody ComActActEvaluateVO comActActEvaluateVO); |
| | | |
| | | /** |
| | | * description getEvaluateListsByIds 批量查询活动评价 |
| | |
| | | |
| | | @ApiOperation(value = "分页查询活动评价") |
| | | @PostMapping("evaluate/page") |
| | | public R pageActivityRegists(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | public R pageActivityEvaluates(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | if (ObjectUtils.isEmpty(comActActEvaluateVO.getActivityId())) { |
| | | return R.fail("活动id主键不能为空"); |
| | | } |
| | | return communityService.pageActivityRegists(comActActEvaluateVO); |
| | | return communityService.pageActivityEvaluates(comActActEvaluateVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导出-活动评价") |
| | |
| | | * @date 2021/8/24 14:03 |
| | | */ |
| | | @PostMapping("activity/evaluate/page") |
| | | public R pageActivityRegists(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | return comActActivityService.pageActivityRegists(comActActEvaluateVO); |
| | | public R pageActivityEvaluates(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | return comActActivityService.pageActivityEvaluates(comActActEvaluateVO); |
| | | } |
| | | |
| | | /** |
| | | * description pageActivityRegists 分页查询活动签到 |
| | | * @param comActActRegistVO 活动签到vo |
| | | * @return R 分页查询结果 |
| | | * @author txb |
| | | * @date 2021/8/24 14:03 |
| | | */ |
| | | @PostMapping("activity/regist/page") |
| | | public R pageActivityRegists(@RequestBody ComActActRegistVO comActActRegistVO) { |
| | | return comActActivityService.pageActivityRegists(comActActRegistVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | @Mapper |
| | | public interface ComActActEvaluateDAO extends BaseMapper<ComActActEvaluateDO> { |
| | | |
| | | IPage<ComActActEvaluateVO> pageActivityRegists(Page page, @Param("comActActEvaluateVO") ComActActEvaluateVO comActActEvaluateVO); |
| | | IPage<ComActActEvaluateVO> pageActivityEvaluates(Page page, @Param("comActActEvaluateVO") ComActActEvaluateVO comActActEvaluateVO); |
| | | |
| | | List<ComActActEvaluateExcelVO> getEvaluateListsByIds(@Param("ids") List<Long> ids); |
| | | |
| | |
| | | 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.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.service_community.model.dos.ComActActRegistDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * title: ComActActRegistDAO 社区》活动》活动签到表mapper类 |
| | |
| | | @Mapper |
| | | public interface ComActActRegistDAO extends BaseMapper<ComActActRegistDO> { |
| | | |
| | | |
| | | IPage<ComActActRegistVO> pageActivityRegists(Page page, @Param("comActActRegistVO") ComActActRegistVO comActActRegistVO); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.SignactivityVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | * @author txb |
| | | * @date 2021/8/24 14:03 |
| | | */ |
| | | R pageActivityRegists(ComActActEvaluateVO comActActEvaluateVO); |
| | | R pageActivityEvaluates(ComActActEvaluateVO comActActEvaluateVO); |
| | | |
| | | /** |
| | | * description pageActivityRegists 分页查询活动签到 |
| | | * @param comActActRegistVO 活动签到vo |
| | | * @return R 分页查询结果 |
| | | * @author txb |
| | | * @date 2021/8/24 14:03 |
| | | */ |
| | | R pageActivityRegists(ComActActRegistVO comActActRegistVO); |
| | | |
| | | /** |
| | | * description getEvaluateListsByIds 批量查询活动评价 |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private ComActActEvaluateDAO comActActEvaluateDAO; |
| | | @Resource |
| | | private ComActActRegistDAO comActActRegistDAO; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R pageActivityRegists(ComActActEvaluateVO comActActEvaluateVO) { |
| | | public R pageActivityEvaluates(ComActActEvaluateVO comActActEvaluateVO) { |
| | | IPage<ComActActEvaluateVO> comActActEvaluateVOIPage = comActActEvaluateDAO |
| | | .pageActivityRegists(new Page(comActActEvaluateVO.getPageNum(), comActActEvaluateVO.getPageSize()), comActActEvaluateVO); |
| | | .pageActivityEvaluates(new Page(comActActEvaluateVO.getPageNum(), comActActEvaluateVO.getPageSize()), comActActEvaluateVO); |
| | | return R.ok(comActActEvaluateVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R pageActivityRegists(ComActActRegistVO comActActRegistVO) { |
| | | IPage<ComActActRegistVO> comActActRegistVOIPage = comActActRegistDAO.pageActivityRegists(new Page(comActActRegistVO.getPageNum(), comActActRegistVO.getPageSize()), comActActRegistVO); |
| | | return R.ok(comActActRegistVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R getEvaluateListsByIds(List<Long> ids) { |
| | | return R.ok(comActActEvaluateDAO.getEvaluateListsByIds(ids)); |
| | | } |
| | |
| | | id, activity_id, user_id, create_at, is_volunteer, star_level, evaluate_content, photo |
| | | </sql> |
| | | |
| | | <select id="pageActivityRegists" resultType="com.panzhihua.common.model.vos.community.ComActActEvaluateVO"> |
| | | <select id="pageActivityEvaluates" resultType="com.panzhihua.common.model.vos.community.ComActActEvaluateVO"> |
| | | SELECT |
| | | caae.id, |
| | | caae.activity_id, |
| | |
| | | order by caae.create_at desc |
| | | </select> |
| | | |
| | | <select id="getEvaluateListsByIds" resultType="java.util.List"> |
| | | <select id="getEvaluateListsByIds" resultType="com.panzhihua.common.model.vos.community.ComActActEvaluateExcelVO"> |
| | | SELECT |
| | | caae.create_at, |
| | | caae.star_level, |
| | |
| | | id, activity_id, user_id, create_at, is_volunteer |
| | | </sql> |
| | | |
| | | <select id="pageActivityRegists" resultType="com.panzhihua.common.model.vos.community.ComActActRegistVO"> |
| | | SELECT |
| | | caae.id, |
| | | caae.activity_id, |
| | | caae.create_at, |
| | | caae.photo, |
| | | caae.star_level, |
| | | caae.evaluate_content, |
| | | su.user_id, |
| | | su.`name`, |
| | | su.nick_name, |
| | | su.phone, |
| | | su.image_url, |
| | | su.tags, |
| | | caae.is_volunteer, |
| | | CASE |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | |
| | | FROM |
| | | com_act_act_evaluate caae |
| | | LEFT JOIN com_act_act_sign caas ON caae.activity_id = caas.activity_id |
| | | LEFT JOIN sys_user su ON caae.user_id = su.user_id |
| | | where caae.activity_id = #{comActActEvaluateVO.activityId} |
| | | <if test="comActActEvaluateVO.phone != null and comActActEvaluateVO.phone !=''"> |
| | | AND su.phone = #{comActActEvaluateVO.phone} |
| | | </if> |
| | | <if test="comActActEvaluateVO.name != null and comActActEvaluateVO.name !=''"> |
| | | AND su.`name` = #{comActActEvaluateVO.name} |
| | | </if> |
| | | <if test="comActActEvaluateVO.starLevel != null"> |
| | | AND caae.star_level = #{comActActEvaluateVO.starLevel} |
| | | </if> |
| | | <if test="comActActEvaluateVO.createAt != null"> |
| | | AND caae.create_at = #{comActActEvaluateVO.createAt} |
| | | </if> |
| | | order by caae.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | csdr.remark, |
| | | csdr.dager_description AS dagerDescription, |
| | | csdr.danger_type AS dangerType, |
| | | csdr.danger_level AS dangerLevel |
| | | case csdr.danger_level |
| | | when '1' then '红色预警' |
| | | when '2' then '橙色预警' |
| | | when '3' then '黄色预警' |
| | | when '4' then '蓝色预警' |
| | | end |
| | | AS dangerLevel |
| | | FROM |
| | | com_sw_danger_report as csdr |
| | | left join com_sw_patrol_record_report as csprr on csprr.report_id = csdr.id |