Merge branch 'yuyue_dev' into 'test'
Yuyue dev
See merge request root/zhihuishequ!146
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | 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; |
| | | |
| | | /** |
| | | * 预约/登记服务 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("reserve") |
| | | @Api(tags = "预约/登记服务") |
| | | public class ComReserveApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation("详情") |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("recordId") Long recordId){ |
| | | return communityService.reserveDetail(id,this.getUserId(),recordId); |
| | | } |
| | | |
| | | @ApiOperation("用户提交数据") |
| | | @PostMapping("/commit") |
| | | public R commit(@RequestBody ComActReserveCommitVO comActReserveCommitVO){ |
| | | comActReserveCommitVO.setCommunityId(this.getCommunityId()); |
| | | comActReserveCommitVO.setUserId(this.getUserId()); |
| | | return communityService.reserveCommit(comActReserveCommitVO); |
| | | } |
| | | |
| | | /** |
| | | * 我的预约/登记 |
| | | * @param pageUserReserveDTO |
| | | * @return |
| | | */ |
| | | @ApiOperation("我的预约/登记") |
| | | @PostMapping("/userReserveList") |
| | | public R userReserveList(@RequestBody PageUserReserveDTO pageUserReserveDTO){ |
| | | pageUserReserveDTO.setUserId(this.getUserId()); |
| | | return communityService.userReserveList(pageUserReserveDTO); |
| | | } |
| | | /** |
| | | * 取消预约/登记 |
| | | */ |
| | | @ApiOperation("取消预约/登记") |
| | | @PostMapping("/cancelReserve") |
| | | public R userCancelReserve(@RequestBody CancelRecordDTO cancelRecordDTO){ |
| | | return communityService.userCancelReserve(cancelRecordDTO); |
| | | } |
| | | |
| | | /** |
| | | * 预约详情操作记录 |
| | | */ |
| | | @ApiOperation("预约详情操作记录") |
| | | @PostMapping("/detailOperation") |
| | | public R reserveOperation(@RequestBody OperationDetailDTO comActReserveOperationRecordDO){ |
| | | comActReserveOperationRecordDO.setUserId(this.getUserId()); |
| | | return communityService.reserveOperation(comActReserveOperationRecordDO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 预约登记记录状态枚举 |
| | | * |
| | | * @author lyq |
| | | */ |
| | | @Getter |
| | | public enum ReserveRecordStatusEnum { |
| | | dcl(1, "待处理"), yycg(2, "预约成功"), yysb(3, "预约失败"), yqx(4, "已取消"), wz(5, "未知"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | ReserveRecordStatusEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public static int getCodeByName(String name) { |
| | | for (ReserveRecordStatusEnum item : ReserveRecordStatusEnum.values()) { |
| | | if (item.name.equals(name)) { |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return wz.code; |
| | | } |
| | | |
| | | public static String getCnDescByName(Integer code) { |
| | | for (ReserveRecordStatusEnum item : ReserveRecordStatusEnum.values()) { |
| | | if (item.code.equals(code)) { |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return wz.name; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("取消预约/登记参数") |
| | | public class CancelRecordDTO { |
| | | @ApiModelProperty("记录id") |
| | | private Long id; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @ApiModelProperty("内容") |
| | | private String content; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OperationDetailDTO { |
| | | /** |
| | | * 预约登记记录id |
| | | */ |
| | | private Long reserveRecordId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 类型(1.本人操作 2.社区操作) |
| | | */ |
| | | private Integer type; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PageUserReserveDTO { |
| | | private Integer pageNum; |
| | | private Integer pageSize; |
| | | private Integer type; |
| | | private Long userId; |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("新增预约登记请求参数") |
| | | public class AddReserveAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "类型(1.预约 2.登记)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "数量上限数量(如果不限制数量,这里传0)") |
| | | private Integer joinAllCount; |
| | | |
| | | @ApiModelProperty(value = "图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片)") |
| | | private Integer imgType; |
| | | |
| | | @ApiModelProperty(value = "图标url(当img_type为5时,此字段的值为图标url地址)") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty("广告顶部(1.是 2.否)") |
| | | private Integer adverPositionTop; |
| | | |
| | | @ApiModelProperty("广告应用(1.是 2.否)") |
| | | private Integer adverPositionApplication; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("是否可重复提交(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty("组件json数据") |
| | | private String jsonObject; |
| | | |
| | | @ApiModelProperty("是否发布(1.是 2.否)") |
| | | private Integer isPublish = 2; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("取消预约登记请求参数") |
| | | public class CancelReserveRecordDTO { |
| | | |
| | | @ApiModelProperty(value = "需要取消的预约记录id集合") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "取消原因") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("查询预约统计汇总数据请求参数") |
| | | public class ComActReserveMakeStatisticsDTO { |
| | | |
| | | @ApiModelProperty(value = "开始时间查询") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间查询") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("查询登记统计汇总数据请求参数") |
| | | public class ComActReserveRegisterStatisticsDTO { |
| | | |
| | | @ApiModelProperty(value = "开始时间查询") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间查询") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 继续预约登记请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("继续预约登记请求参数") |
| | | public class EditComActReserveInfoDTO { |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long id; |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | @ApiModelProperty(value = "主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "数量上限数量(如果不限制数量,这里传0)") |
| | | private Integer joinAllCount; |
| | | |
| | | @ApiModelProperty(value = "图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片)") |
| | | private Integer imgType; |
| | | |
| | | @ApiModelProperty(value = "图标url(当img_type为5时,此字段的值为图标url地址)") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty("广告顶部(1.是 2.否)") |
| | | private Integer adverPositionTop; |
| | | |
| | | @ApiModelProperty("广告应用(1.是 2.否)") |
| | | private Integer adverPositionApplication; |
| | | |
| | | @ApiModelProperty("是否可重复提交(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty("是否发布(1.是 2.否)") |
| | | private Integer isPublish; |
| | | |
| | | /** |
| | | * 类型(1.继续 2.停止 3.发布) |
| | | */ |
| | | public interface type{ |
| | | int jx = 1; |
| | | int tz = 2; |
| | | int fb = 3; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 修改预约登记状态请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("修改预约登记状态请求参数") |
| | | public class EditComActReserveStatusDTO { |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long id; |
| | | @ApiModelProperty(value = "类型(1.停止 2.发布)") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 类型(1.停止 2.发布) |
| | | */ |
| | | public interface type{ |
| | | int tz = 1; |
| | | int fb = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("编辑预约登记请求参数") |
| | | public class EditReserveAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "类型(1.预约 2.登记)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "数量上限数量(如果不限制数量,这里传0)") |
| | | private Integer joinAllCount; |
| | | |
| | | @ApiModelProperty(value = "图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片)") |
| | | private Integer imgType; |
| | | |
| | | @ApiModelProperty(value = "图标url(当img_type为5时,此字段的值为图标url地址)") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty("广告顶部(1.是 2.否)") |
| | | private Integer adverPositionTop; |
| | | |
| | | @ApiModelProperty("广告应用(1.是 2.否)") |
| | | private Integer adverPositionApplication; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("是否可重复提交(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty("组件json数据") |
| | | private String jsonObject; |
| | | |
| | | @ApiModelProperty("是否发布(1.是 2.否)") |
| | | private Integer isPublish; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("处理预约记录请求参数") |
| | | public class MakeHandleAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "批量处理id集合") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "预约成功时间(格式:yyyy-MM-dd HH:mm:ss)") |
| | | private String makeTime; |
| | | |
| | | @ApiModelProperty(value = "预约状态(1.同意 2.拒绝)") |
| | | private Integer isOk; |
| | | |
| | | @ApiModelProperty(value = "处理备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 预约状态(1.同意 2.拒绝) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("分页查询预约登记列表请求参数") |
| | | public class PageReserveAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "类型(1.预约 2.登记)") |
| | | private List<Integer> type; |
| | | |
| | | @ApiModelProperty(value = "状态(1.进行中 2.已停止 3.待发布)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "广告位置(1.无 2.首页顶部 3.首页应用)") |
| | | private Integer advertType; |
| | | |
| | | @ApiModelProperty(value = "开始时间查询") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间查询") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("分页查询预约登记列表请求参数") |
| | | public class PageReserveMakeAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long reserveId; |
| | | |
| | | @ApiModelProperty(value = "开始时间查询") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间查询") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "需要导出id集合") |
| | | private List<Long> ids; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("分页查询预约登记列表请求参数") |
| | | public class PageReserveMakeHandleAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "开始时间查询") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间查询") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "状态集合") |
| | | private List<Integer> status; |
| | | |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long reserveId; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "需要导出的id集合") |
| | | private List<Long> ids; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("分页查询预约登记列表请求参数") |
| | | public class PageReserveRegisterDetailedAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "开始时间查询") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间查询") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "预约登记id") |
| | | private Long reserveId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("应用位置问卷调查列表") |
| | | private List<ComActQuestnaireAppVO> applicationQuestnaireList; |
| | | |
| | | @ApiModelProperty("banner预约/登记列表") |
| | | private List<ComActReserveIndexVo> comActReserveIndexBannerVos; |
| | | |
| | | @ApiModelProperty("应用预约/登记列表") |
| | | private List<ComActReserveIndexVo> comActReserveIndexApplicationVos; |
| | | |
| | | } |
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; |
| | | |
| | | @Data |
| | | @ApiModel("提交预约/登记参数") |
| | | public class ComActReserveCommitVO { |
| | | @ApiModelProperty("记录id") |
| | | private Long id; |
| | | @ApiModelProperty("表单json") |
| | | private String jsonObject; |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | @ApiModelProperty("类型 1预约 2登记") |
| | | private Integer type; |
| | | @ApiModelProperty("预约时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("预约/登记返回参数") |
| | | public class ComActReserveIndexVo { |
| | | |
| | | private Long id; |
| | | @ApiModelProperty("标题") |
| | | private String title; |
| | | @ApiModelProperty("类型(1.预约 2.登记) ") |
| | | private Integer type; |
| | | @ApiModelProperty("图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片)") |
| | | private Integer imgType; |
| | | @ApiModelProperty("图标url(当img_type为5时,此字段的值为图标url地址)") |
| | | private String imgUrl; |
| | | @ApiModelProperty("是否是首页顶部(1.是 2.否)") |
| | | private Integer adverPositionTop; |
| | | @ApiModelProperty("是否是首页应用(1.是 2.否)") |
| | | private Integer adverPositionApplication; |
| | | } |
| | |
| | | private int sort; |
| | | @ApiModelProperty(value = "题目内容") |
| | | private String label; |
| | | @ApiModelProperty(value = "类型 0单选1多选2问答题", example = "0") |
| | | @ApiModelProperty(value = "类型 0 单选 1 多选 2 输入框 2姓名输入框 3 手机号 4 身份证 5 文字描述 6 日期选择", example = "0") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "问卷题目选项") |
| | | private List<QuestnaiteSubSelectionVO> options; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("预约登记返回参数") |
| | | public class ComActReserveDetailAdminVO { |
| | | |
| | | @ApiModelProperty("预约登记id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("类型(1.预约 2.登记)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | |
| | | @ApiModelProperty("限定参加人总数") |
| | | private Integer joinAllCount; |
| | | |
| | | @ApiModelProperty("参加人数") |
| | | private Integer joinCount; |
| | | |
| | | @ApiModelProperty("广告位置") |
| | | private String advertPosition; |
| | | |
| | | @ApiModelProperty("状态(1.待发布 2.进行中 3.已停止)") |
| | | private Integer status; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("发布时间") |
| | | private Date publishTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("创建时间") |
| | | private Date createAt; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty("是否是首页顶部(1.是 2.否)") |
| | | private Integer adverPositionTop; |
| | | |
| | | @ApiModelProperty("是否是首页应用(1.是 2.否)") |
| | | private Integer adverPositionApplication; |
| | | |
| | | @ApiModelProperty("组件json数据") |
| | | private String jsonObject; |
| | | |
| | | @ApiModelProperty("是否可重复提交(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ComActReserveDetailVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 类型(1.预约 2.登记) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 主题 |
| | | */ |
| | | private String title; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | |
| | | /** |
| | | * 总参加人数 |
| | | */ |
| | | private Integer joinAllCount; |
| | | |
| | | /** |
| | | * 参加人数 |
| | | */ |
| | | private Integer joinCount; |
| | | |
| | | /** |
| | | * 图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片) |
| | | */ |
| | | private Integer imgType; |
| | | |
| | | /** |
| | | * 图标url(当img_type为5时,此字段的值为图标url地址) |
| | | */ |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 状态(1.待发布 2.进行中 3.已停止) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishTime; |
| | | |
| | | /** |
| | | * 是否可重复提交(1.是 2.否) |
| | | */ |
| | | private Integer isRepeat; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 组件json数据 |
| | | */ |
| | | private String jsonObject; |
| | | |
| | | /** |
| | | * 是否是首页顶部(1.是 2.否) |
| | | */ |
| | | private Integer adverPositionTop; |
| | | |
| | | /** |
| | | * 是否是首页应用(1.是 2.否) |
| | | */ |
| | | private Integer adverPositionApplication; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | private Integer recordStatus; |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | private Integer isOk; |
| | | /** |
| | | * 是否重复(1.是 2.否) |
| | | */ |
| | | public interface isOk{ |
| | | int y=1; |
| | | int n=2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("预约登记返回参数") |
| | | public class ComActReserveListAdminVO { |
| | | |
| | | @ApiModelProperty("预约登记id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("类型(1.预约 2.登记)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | |
| | | @ApiModelProperty("限定参加人总数") |
| | | private Integer joinAllCount; |
| | | |
| | | @ApiModelProperty("参加人数") |
| | | private Integer joinCount; |
| | | |
| | | @ApiModelProperty("广告位置") |
| | | private String advertPosition; |
| | | |
| | | @ApiModelProperty("状态(1.待发布 2.进行中 3.已停止)") |
| | | private Integer status; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("发布时间") |
| | | private Date publishTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("创建时间") |
| | | private Date createAt; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty("是否是首页顶部(1.是 2.否)") |
| | | private Integer adverPositionTop; |
| | | |
| | | @ApiModelProperty("是否是首页应用(1.是 2.否)") |
| | | private Integer adverPositionApplication; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("预约明细列表返回参数") |
| | | public class ComActReserveMakeDetailAdminVO { |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("预约人") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("预约时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | @ApiModelProperty("预约内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("社区备注") |
| | | private String actRemark; |
| | | |
| | | @ApiModelProperty("提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("操作记录") |
| | | private List<ComActReserveMakeOperationAdminVO> operationList; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 预约明细导出返回对象 |
| | | */ |
| | | @Data |
| | | public class ComActReserveMakeDetailedExcelAdminVO { |
| | | |
| | | @ExcelProperty(value = "用户昵称" ,index = 0) |
| | | private String nickName; |
| | | @ExcelProperty(value = "预约人" ,index = 1) |
| | | private String name; |
| | | @ExcelProperty(value = "联系电话" ,index = 2) |
| | | private String phone; |
| | | @ExcelProperty(value = "预约时间" ,index = 3) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | @ExcelProperty(value = "预约内容" ,index = 4) |
| | | private String content; |
| | | @ExcelProperty(value = "备注" ,index = 5) |
| | | private String remark; |
| | | @ExcelProperty(value = "社区备注" ,index = 6) |
| | | private String actRemark; |
| | | @ExcelProperty(value = "提交时间" ,index = 7) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("预约明细列表返回参数") |
| | | public class ComActReserveMakeHandleExcelAdminVO { |
| | | |
| | | @ExcelProperty(value = "用户昵称" ,index = 0) |
| | | private String nickName; |
| | | |
| | | @ExcelProperty(value = "预约登记主题" ,index = 1) |
| | | private String title; |
| | | |
| | | @ExcelProperty(value = "预约人" ,index = 2) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "联系电话" ,index = 3) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "预约时间" ,index = 4) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | @ExcelProperty(value = "预约内容" ,index = 5) |
| | | private String content; |
| | | |
| | | @ExcelProperty(value = "备注" ,index = 6) |
| | | private String remark; |
| | | |
| | | @ExcelProperty(value = "社区备注" ,index = 7) |
| | | private String actRemark; |
| | | |
| | | @ExcelProperty(value = "提交时间" ,index = 8) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "状态" ,index = 9) |
| | | private String status; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("预约明细列表返回参数") |
| | | public class ComActReserveMakeHandleListAdminVO { |
| | | |
| | | @ApiModelProperty("预约记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("预约人") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("预约时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | @ApiModelProperty("预约内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("社区备注") |
| | | private String actRemark; |
| | | |
| | | @ApiModelProperty("提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("状态(1.待处理 2.预约成功 3.预约失败 4.已取消)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("预约登记主题") |
| | | private String title; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("预约统计左边返回参数") |
| | | public class ComActReserveMakeLeftStatisticsAdminVO { |
| | | |
| | | @ApiModelProperty("预约日期(格式:yyyy-MM-dd)") |
| | | private String reserveTime; |
| | | |
| | | @ApiModelProperty("预约数量") |
| | | private Integer count; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("预约明细列表返回参数") |
| | | public class ComActReserveMakeListAdminVO { |
| | | |
| | | @ApiModelProperty("预约记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("预约人") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("预约时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | @ApiModelProperty("预约内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("社区备注") |
| | | private String actRemark; |
| | | |
| | | @ApiModelProperty("提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("预约明细操作记录返回参数") |
| | | public class ComActReserveMakeOperationAdminVO { |
| | | |
| | | @ApiModelProperty("预约登记id") |
| | | private Long reserveId; |
| | | |
| | | @ApiModelProperty("预约登记记录id") |
| | | private Long reserveRecordId; |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("类型(1.本人操作 2.社区操作)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("预约人手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("操作内容") |
| | | private String reserveContent; |
| | | |
| | | @ApiModelProperty("操作时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("状态(1.提交 2.预约成功 3.预约失败 4.取消)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("操作人") |
| | | private String createByName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 预约统计汇总导出返回对象 |
| | | */ |
| | | @Data |
| | | public class ComActReserveMakeRightExcelAdminVO { |
| | | |
| | | @ExcelProperty(value = "日期" ,index = 0) |
| | | private String reserveTime; |
| | | @ExcelProperty(value = "预约主题" ,index = 1) |
| | | private String title; |
| | | @ExcelProperty(value = "所占百分比" ,index = 2) |
| | | private BigDecimal tag; |
| | | @ExcelProperty(value = "预约量" ,index = 3) |
| | | private Integer count; |
| | | @ExcelProperty(value = "合计" ,index = 4) |
| | | private Integer allCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel("预约统计右边返回参数") |
| | | public class ComActReserveMakeRightStatisticsAdminVO { |
| | | |
| | | @ApiModelProperty("日期(格式:yyyy-MM-dd)") |
| | | private String reserveTime; |
| | | |
| | | @ApiModelProperty("预约主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("所占百分比") |
| | | private BigDecimal tag; |
| | | |
| | | @ApiModelProperty("预约数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("预约量合计") |
| | | private Integer allCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("预约登记返回参数") |
| | | public class ComActReserveMakeStatisticsAdminVO { |
| | | |
| | | @ApiModelProperty("预约日期数量统计数据") |
| | | private List<ComActReserveMakeLeftStatisticsAdminVO> leftStatisticsList; |
| | | |
| | | @ApiModelProperty("预约统计汇总-右边统计数据") |
| | | private List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ComActReserveRecordListVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 类型(1.预约 2.登记) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 提交人名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 提交人手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 状态(1.待处理 2.预约成功 3.预约失败 4.已取消) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 社区备注 |
| | | */ |
| | | private String actRemark; |
| | | |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | /** |
| | | * 用户填报json数据 |
| | | */ |
| | | private String jsonObject; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 标题 |
| | | */ |
| | | private String title; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("登记明细用户填写答案返回参数") |
| | | public class ComActReserveRegisterDetailedAnswerVO { |
| | | |
| | | @ApiModelProperty("题目id") |
| | | private Long reserveSubId; |
| | | |
| | | @ApiModelProperty("题目内容") |
| | | private String reserveSubContent; |
| | | |
| | | @ApiModelProperty("回答内容") |
| | | private String answerContent; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("登记明细返回参数") |
| | | public class ComActReserveRegisterDetailedVO { |
| | | |
| | | @ApiModelProperty("流水号") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("身份") |
| | | private String identity; |
| | | |
| | | @ApiModelProperty("提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("是否是党员(0.否 1.是)") |
| | | private Integer isPartymember; |
| | | |
| | | @ApiModelProperty("是否是志愿者(0.否 1.是)") |
| | | private Integer isVolunteer; |
| | | |
| | | @ApiModelProperty("答案列表") |
| | | private List<ComActReserveRegisterDetailedAnswerVO> answerList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 登记统计汇总导出返回对象 |
| | | */ |
| | | @Data |
| | | public class ComActReserveRegisterExcelAdminVO { |
| | | |
| | | @ExcelProperty(value = "登记主题" ,index = 0) |
| | | private String title; |
| | | @ExcelProperty(value = "所占百分比" ,index = 1) |
| | | private BigDecimal tag; |
| | | @ExcelProperty(value = "登记量" ,index = 2) |
| | | private Integer count; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("登记统计汇总返回参数") |
| | | public class ComActReserveRegisterStatisticsAdminVO { |
| | | |
| | | @ApiModelProperty("登记主题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("所占百分比") |
| | | private BigDecimal tag; |
| | | |
| | | @ApiModelProperty("登记量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("登记总量") |
| | | private Integer allCount; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("登记题目列表返回参数返回参数") |
| | | public class ComActReserveSubListVO { |
| | | |
| | | @ApiModelProperty("题目id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("题目内容") |
| | | private String content; |
| | | |
| | | public ComActReserveSubListVO() { |
| | | } |
| | | |
| | | public ComActReserveSubListVO(String id, String content){ |
| | | this.id = id; |
| | | this.content = content; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class ComOperationDetailVO { |
| | | private List<ComOperationListVO> list; |
| | | @ApiModelProperty("1可以继续 2不能继续") |
| | | private Integer isContinue =2; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ComOperationListVO { |
| | | private Long id; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | |
| | | /** |
| | | * 预约登记记录id |
| | | */ |
| | | private Long reserveRecordId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 类型(1.本人操作 2.社区操作) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 操作人手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | /** |
| | | * 操作内容 |
| | | */ |
| | | private String reserveContent; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 状态(1.提交 2.预约成功 3.预约失败 4.取消) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO; |
| | | import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO; |
| | |
| | | @GetMapping("/easyphoto/noHandle/list") |
| | | R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId); |
| | | |
| | | @GetMapping("/reserve/detail") |
| | | R reserveDetail(@RequestParam("id") Long id,@RequestParam("userId") Long userId,@RequestParam("recordId") Long recordId); |
| | | |
| | | @PostMapping("/reserve/commit") |
| | | R reserveCommit(@RequestBody ComActReserveCommitVO comActReserveCommitVO); |
| | | |
| | | /** |
| | | * 我的预约/登记 |
| | | * @param pageUserReserveDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reserve/userReserveList") |
| | | R userReserveList(@RequestBody PageUserReserveDTO pageUserReserveDTO); |
| | | |
| | | /** |
| | | * 取消预约/登记 |
| | | */ |
| | | @PostMapping("/reserve/cancelReserve") |
| | | R userCancelReserve(@RequestBody CancelRecordDTO comActReserveRecordDO); |
| | | |
| | | /** |
| | | * 预约详情操作记录 |
| | | */ |
| | | @PostMapping("/reserve/detailOperation") |
| | | R reserveOperation(@RequestBody OperationDetailDTO comActReserveOperationRecordDO); |
| | | |
| | | /** |
| | | * 社区后台-分页查询预约登记列表 |
| | | * @param pageReserveDTO 请求参数 |
| | | * @return 预约登记列表 |
| | | */ |
| | | @PostMapping("/reserve/admin/page") |
| | | R pageReserveAdmin(@RequestBody PageReserveAdminDTO pageReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-新增预约登记信息 |
| | | * @param addReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/reserve/admin/add") |
| | | R addReserveAdmin(@RequestBody AddReserveAdminDTO addReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-编辑预约登记信息 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/reserve/admin/edit") |
| | | R editReserveAdmin(@RequestBody EditReserveAdminDTO editReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-修改预约登记状态 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/reserve/admin/edit/status") |
| | | R editReserveStatusAdmin(@RequestBody EditComActReserveStatusDTO editReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-继续预约登记 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/reserve/admin/edit/info") |
| | | R editReserveInfoAdmin(@RequestBody EditComActReserveInfoDTO editReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-根据预约登记id查询详情 |
| | | * @param reserveId 预约登记id |
| | | * @return 预约登记详情 |
| | | */ |
| | | @GetMapping("/reserve/admin/detail") |
| | | R detailReserveAdmin(@RequestParam("reserveId") Long reserveId); |
| | | |
| | | /** |
| | | * 社区后台-根据社区id统计预约类数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/statistics") |
| | | R makeStatisticsAdmin(@RequestBody ComActReserveMakeStatisticsDTO makeStatisticsDTO); |
| | | |
| | | /** |
| | | * 社区后台-查询导出预约统计汇总数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/statistics/export") |
| | | R makeStatisticsExportAdmin(@RequestBody ComActReserveMakeStatisticsDTO makeStatisticsDTO); |
| | | |
| | | /** |
| | | * 社区后台-根据预约id查询预约明细 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/page") |
| | | R pageMakeAdmin(@RequestBody PageReserveMakeAdminDTO pageMakeDTO); |
| | | |
| | | /** |
| | | * 根据预约记录id查询预约明细操作记录 |
| | | * @param reserveRecordId 预约记录id |
| | | * @return 预约明细操作记录 |
| | | */ |
| | | @GetMapping("/reserve/admin/make/detail") |
| | | R detailMakeAdmin(@RequestParam("reserveRecordId") Long reserveRecordId); |
| | | |
| | | /** |
| | | * 批量取消预约记录 |
| | | * @param reserveRecordDTO 请求参数 |
| | | * @return 取消结果 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/cancel") |
| | | R makeCancelAdmin(@RequestBody CancelReserveRecordDTO reserveRecordDTO); |
| | | |
| | | /** |
| | | * 预约明细导出数据查询 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细数据 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/list/export") |
| | | R exportMakeAdmin(@RequestBody PageReserveMakeAdminDTO pageMakeDTO); |
| | | |
| | | /** |
| | | * 分页查询登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | @PostMapping("/reserve/admin/register/page") |
| | | R registerStatisticsAdmin(@RequestBody ComActReserveRegisterStatisticsDTO registerStatisticsDTO); |
| | | |
| | | /** |
| | | * 导出登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | @PostMapping("/reserve/admin/register/export") |
| | | R registerStatisticsExportAdmin(@RequestBody ComActReserveRegisterStatisticsDTO registerStatisticsDTO); |
| | | |
| | | /** |
| | | * 分页查询预约处理列表 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/handle/page") |
| | | R pageMakeHandleAdmin(@RequestBody PageReserveMakeHandleAdminDTO pageMakeHandleDTO); |
| | | |
| | | /** |
| | | * 批量处理预约记录 |
| | | * @param makeHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/handle") |
| | | R makeHandleAdmin(@RequestBody MakeHandleAdminDTO makeHandleDTO); |
| | | |
| | | /** |
| | | * 导出预约处理列表数据查询 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | @PostMapping("/reserve/admin/make/handle/export") |
| | | R exportMakeHandleAdmin(@RequestBody PageReserveMakeHandleAdminDTO pageMakeHandleDTO); |
| | | |
| | | /** |
| | | * 删除预约登记信息 |
| | | * @param reserveId 预约登记id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/reserve/admin/delete") |
| | | R deleteReserveAdmin(@RequestParam("reserveId") Long reserveId); |
| | | |
| | | /** |
| | | * 查询社区所有预约信息列表 |
| | | * @param communityId 社区id |
| | | * @return 预约信息列表 |
| | | */ |
| | | @GetMapping("/reserve/admin/list") |
| | | R listReserveAdmin(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 导出登记明细数据 |
| | | * @param reserveId 登记id |
| | | * @return 登记明细数据 |
| | | */ |
| | | @GetMapping("/reserve/admin/register/list/export") |
| | | R exportRegisterAdmin(@RequestParam("reserveId") Long reserveId); |
| | | |
| | | /** |
| | | * 查询预约登记题目列表 |
| | | * @param reserveId 预约登记id |
| | | * @return 约登记题目列表 |
| | | */ |
| | | @GetMapping("/reserve/admin/subject/list") |
| | | R subjectListAdmin(@RequestParam("reserveId") Long reserveId); |
| | | |
| | | /** |
| | | * 分页查询登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | @PostMapping("/reserve/admin/register/detailed/list") |
| | | R registerDetailedListAdmin(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 查询登记详情记录 |
| | | * @param reserveRecordId 登记记录id |
| | | * @return 登记详情记录 |
| | | */ |
| | | @GetMapping("/reserve/admin/register/detailed/detail") |
| | | R registerDetailedDetailAdmin(@RequestParam("reserveRecordId") Long reserveRecordId); |
| | | /** |
| | | * 活动签到 |
| | | * |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.ReserveRecordStatusEnum; |
| | | import com.panzhihua.common.model.dtos.community.QuestnaireAnswersDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireSubVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationExcelVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireStatisticsSummaryExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.community_backstage.config.SFTPConfig; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @description: 预约登记接口 |
| | | * @author: lyq |
| | | * @date: 2021-8-23 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"预约登记"}) |
| | | @RestController |
| | | @RequestMapping("/reserve") |
| | | public class ComActReserveApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private SFTPConfig sftpConfig; |
| | | |
| | | @ApiOperation(value = "分页查询预约登记列表", response = ComActReserveListAdminVO.class) |
| | | @PostMapping("/page") |
| | | public R page(@RequestBody PageReserveAdminDTO pageReserveDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | pageReserveDTO.setCommunityId(communityId); |
| | | return communityService.pageReserveAdmin(pageReserveDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增预约登记记录") |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody AddReserveAdminDTO addReserveDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | addReserveDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | addReserveDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.addReserveAdmin(addReserveDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除预约登记") |
| | | @PostMapping("/delete") |
| | | public R delete(@RequestParam("reserveId") Long reserveId) { |
| | | return communityService.deleteReserveAdmin(reserveId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区所有预约登记列表") |
| | | @GetMapping("/list") |
| | | public R list() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.listReserveAdmin(loginUserInfo.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑预约登记记录") |
| | | @PostMapping("/edit") |
| | | public R edit(@RequestBody EditReserveAdminDTO editReserveDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | editReserveDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | editReserveDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.editReserveAdmin(editReserveDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改预约登记状态") |
| | | @PostMapping("/edit/status") |
| | | public R editStatus(@RequestBody EditComActReserveStatusDTO editReserveDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | editReserveDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.editReserveStatusAdmin(editReserveDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "点击继续预约登记") |
| | | @PostMapping("/edit/info") |
| | | public R editInfo(@RequestBody EditComActReserveInfoDTO editReserveDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | editReserveDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.editReserveInfoAdmin(editReserveDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "预约登记详情") |
| | | @PostMapping("/detail") |
| | | public R detail(@RequestParam("reserveId") Long reserveId) { |
| | | return communityService.detailReserveAdmin(reserveId); |
| | | } |
| | | |
| | | @ApiOperation(value = "预约类统计汇总", response = ComActReserveMakeStatisticsAdminVO.class) |
| | | @PostMapping("/make/statistics") |
| | | public R makeStatistics(@RequestBody ComActReserveMakeStatisticsDTO makeStatisticsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | makeStatisticsDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.makeStatisticsAdmin(makeStatisticsDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "预约登记统计汇总导出") |
| | | @PostMapping("/make/statistics/export") |
| | | public R makeStatisticsExport(@RequestBody ComActReserveMakeStatisticsDTO makeStatisticsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | makeStatisticsDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | String url = sftpConfig.getExcelUrl(); |
| | | String name = "预约登记统计汇总导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.makeStatisticsExportAdmin(makeStatisticsDTO); |
| | | if (R.isOk(r)) { |
| | | List<ComActReserveMakeRightExcelAdminVO> resultList = new ArrayList<>(); |
| | | List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeRightStatisticsAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveMakeRightExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeRightExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActReserveMakeRightExcelAdminVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("预约登记统计汇总导出数据").build(); |
| | | excelWriter.write(resultList, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询预约明细列表", response = ComActReserveMakeListAdminVO.class) |
| | | @PostMapping("/make/page") |
| | | public R pageMake(@RequestBody PageReserveMakeAdminDTO pageMakeDTO) { |
| | | return communityService.pageMakeAdmin(pageMakeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询预约明细详情", response = ComActReserveMakeDetailAdminVO.class) |
| | | @GetMapping("/make/detail") |
| | | public R detailMake(@RequestParam("reserveRecordId") Long reserveRecordId) { |
| | | return communityService.detailMakeAdmin(reserveRecordId); |
| | | } |
| | | |
| | | @ApiOperation(value = "取消预约记录", response = ComActReserveMakeDetailAdminVO.class) |
| | | @PostMapping("/make/cancel") |
| | | public R makeCancel(@RequestBody CancelReserveRecordDTO reserveRecordDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | reserveRecordDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.makeCancelAdmin(reserveRecordDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "预约明细导出") |
| | | @PostMapping("/make/list/export") |
| | | public R exportMake(@RequestBody PageReserveMakeAdminDTO pageMakeDTO) { |
| | | String url = sftpConfig.getExcelUrl(); |
| | | String name = "预约明细导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.exportMakeAdmin(pageMakeDTO); |
| | | if (R.isOk(r)) { |
| | | List<ComActReserveMakeDetailedExcelAdminVO> resultList = new ArrayList<>(); |
| | | List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeRightStatisticsAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveMakeDetailedExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeDetailedExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActReserveMakeRightExcelAdminVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("预约明细导出数据").build(); |
| | | excelWriter.write(resultList, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "登记类统计汇总", response = ComActReserveRegisterStatisticsAdminVO.class) |
| | | @PostMapping("/register/statistics") |
| | | public R registerStatistics(@RequestBody ComActReserveRegisterStatisticsDTO registerStatisticsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | registerStatisticsDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.registerStatisticsAdmin(registerStatisticsDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "登记类统计导出", response = ComActReserveRegisterStatisticsAdminVO.class) |
| | | @PostMapping("/register/statistics/export") |
| | | public R registerStatisticsExport(@RequestBody ComActReserveRegisterStatisticsDTO registerStatisticsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | registerStatisticsDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | String url = sftpConfig.getExcelUrl(); |
| | | String name = "登记统计汇总导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.registerStatisticsExportAdmin(registerStatisticsDTO); |
| | | if (R.isOk(r)) { |
| | | List<ComActReserveRegisterExcelAdminVO> resultList = new ArrayList<>(); |
| | | List<ComActReserveRegisterStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveRegisterStatisticsAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveRegisterExcelAdminVO makeRightExcelAdminVO = new ComActReserveRegisterExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActReserveRegisterExcelAdminVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("登记统计汇总导出数据").build(); |
| | | excelWriter.write(resultList, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询预约处理列表", response = ComActReserveMakeHandleListAdminVO.class) |
| | | @PostMapping("/make/handle/page") |
| | | public R pageMakeHandle(@RequestBody PageReserveMakeHandleAdminDTO pageMakeHandleDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | pageMakeHandleDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.pageMakeHandleAdmin(pageMakeHandleDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量处理预约记录") |
| | | @PostMapping("/make/handle") |
| | | public R makeHandle(@RequestBody MakeHandleAdminDTO makeHandleDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | makeHandleDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.makeHandleAdmin(makeHandleDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "预约处理列表导出") |
| | | @PostMapping("/make/handle/export") |
| | | public R exportMakeHandle(@RequestBody PageReserveMakeHandleAdminDTO pageMakeHandleDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | pageMakeHandleDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | String url = sftpConfig.getExcelUrl(); |
| | | String name = "预约处理列表导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r = communityService.exportMakeHandleAdmin(pageMakeHandleDTO); |
| | | if (R.isOk(r)) { |
| | | List<ComActReserveMakeHandleExcelAdminVO> resultList = new ArrayList<>(); |
| | | List<ComActReserveMakeHandleListAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeHandleListAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveMakeHandleExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeHandleExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | makeRightExcelAdminVO.setStatus(ReserveRecordStatusEnum.getCnDescByName(rightStatistics.getStatus())); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActReserveMakeHandleExcelAdminVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("预约处理列表导出数据").build(); |
| | | excelWriter.write(resultList, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "导出登记明细") |
| | | @GetMapping("/register/list/export") |
| | | public R exportRegister(@RequestParam("reserveId") Long reserveId) { |
| | | |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "登记明细导出数据.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | /** |
| | | * 组合导出数据 |
| | | * 用户问卷答案 |
| | | */ |
| | | R QuestnaireAnswersDTOR = communityService.exportRegisterAdmin(reserveId); |
| | | QuestnaireAnswersDTO questnaireAnswersDTOS = JSON.parseObject(JSON.toJSONString(QuestnaireAnswersDTOR.getData()), QuestnaireAnswersDTO.class); |
| | | |
| | | List<ComActQuestnaireSubVO> subVOList = questnaireAnswersDTOS.getSubs(); |
| | | //构造表头 |
| | | List<List<String>> headList = new ArrayList<List<String>>(); |
| | | String firstRowContent = "调查结果"; |
| | | List<String> head0 = new ArrayList<>(); |
| | | head0.add(firstRowContent); |
| | | head0.add("姓名"); |
| | | headList.add(head0); |
| | | List<String> head1 = new ArrayList<>(); |
| | | head1.add(firstRowContent); |
| | | head1.add("提交时间"); |
| | | headList.add(head1); |
| | | subVOList.forEach(sub -> { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | headn.add(sub.getContent()); |
| | | headList.add(headn); |
| | | }); |
| | | List<List<Object>> datalist = new ArrayList<>(); |
| | | |
| | | List<ComActQuestnaireAnswerContentVO> answerContentVOList = questnaireAnswersDTOS.getAnswers(); |
| | | if(answerContentVOList!=null && answerContentVOList.size()>0) { |
| | | Map<LoginUserInfoVO, LinkedHashMap<Long, List<ComActQuestnaireAnswerContentVO>>> answersMap = new HashMap<>(); |
| | | |
| | | List<ComActQuestnaireAnswerContentVO> usersAnswers = questnaireAnswersDTOS.getAnswers(); |
| | | usersAnswers.forEach(userAnswers -> { |
| | | R<LoginUserInfoVO> loginUserInfoVOR = userService.getUserInfoByUserId(userAnswers.getUserId().toString()); |
| | | if (R.isOk(loginUserInfoVOR)) { |
| | | LoginUserInfoVO loginUserInfoVO = loginUserInfoVOR.getData(); |
| | | LinkedHashMap<Long, List<ComActQuestnaireAnswerContentVO>> theUserList = answersMap.get(loginUserInfoVO); |
| | | if (theUserList == null) { |
| | | theUserList = new LinkedHashMap<>(); |
| | | answersMap.put(loginUserInfoVO, theUserList); |
| | | } |
| | | /** |
| | | * 按题分类题目答案 |
| | | */ |
| | | Long subId = userAnswers.getSubId(); |
| | | List<ComActQuestnaireAnswerContentVO> answerContentVOList1 = theUserList.get(subId); |
| | | if(answerContentVOList1==null){ |
| | | answerContentVOList1 = new ArrayList<>(); |
| | | theUserList.put(subId, answerContentVOList1); |
| | | } |
| | | answerContentVOList1.add(userAnswers); |
| | | } |
| | | |
| | | }); |
| | | /** |
| | | * 构造导出数据 |
| | | */ |
| | | answersMap.forEach((user, answers) ->{ |
| | | List<Object> userData = new ArrayList<>(); |
| | | userData.add(user.getName()); |
| | | //获取提交时间 |
| | | Set<Long> keySet = answers.keySet(); |
| | | String dateStr = ""; |
| | | if(keySet!=null && keySet.size()>0){ |
| | | try { |
| | | ComActQuestnaireAnswerContentVO firstvo = answers.get(keySet.toArray()[0]).get(0); |
| | | if (firstvo != null) { |
| | | Date time = firstvo.getCreateAt(); |
| | | if(time!=null) { |
| | | String sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time); |
| | | dateStr = sd; |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | dateStr = ""; |
| | | } |
| | | } |
| | | userData.add(dateStr); |
| | | answers.forEach((id, answer )->{ |
| | | StringBuilder usersAnswerContent = new StringBuilder(""); |
| | | answer.forEach(ans ->{ |
| | | String context = (ans.getChoice()!=null?(ans.getChoice()+ "."):"") + ans.getAnswerContent(); |
| | | usersAnswerContent.append(context +"\n"); |
| | | }); |
| | | userData.add(usersAnswerContent.toString()); |
| | | }); |
| | | datalist.add(userData); |
| | | }); |
| | | } |
| | | |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | |
| | | contentWriteCellStyle.setWrapped(true); |
| | | HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
| | | new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | LongestMatchColumnWidthStyleStrategy longestMatchColumnWidthStyleStrategy = new LongestMatchColumnWidthStyleStrategy(); |
| | | |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationExcelVo.class) |
| | | .registerWriteHandler(horizontalCellStyleStrategy) |
| | | .registerWriteHandler(longestMatchColumnWidthStyleStrategy) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("登记明细导出数据").head(headList).build(); |
| | | excelWriter.write(datalist, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(sftpConfig.getExcelUrl() + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "查询题目列表",response = ComActReserveSubListVO.class) |
| | | @GetMapping("/subject/list") |
| | | public R subjectList(@RequestParam("reserveId") Long reserveId) { |
| | | return communityService.subjectListAdmin(reserveId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询登记明细列表",response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/detailed/list") |
| | | public R registerDetailedList(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | return communityService.registerDetailedListAdmin(detailedAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询登记明细详情",response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/detailed/detail") |
| | | public R registerDetailedDetail(@RequestParam("reserveRecordId") Long reserveRecordId) { |
| | | return communityService.registerDetailedDetailAdmin(reserveRecordId); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.service_community.dao.ComActReserveOperationRecordMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveOperationRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveRecordDO; |
| | | import com.panzhihua.service_community.service.*; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 预约登记 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/reserve/") |
| | | public class ComActReserveApi { |
| | | |
| | | @Resource |
| | | private ComActReserveService comActReserveService; |
| | | @Resource |
| | | private ComActReserveRecordService comActReserveRecordService; |
| | | @Resource |
| | | private ComActReserveAnswerContentService comActReserveAnswerContentService; |
| | | @Resource |
| | | private ComActReserveOperationRecordService comActReserveOperationRecordService; |
| | | @Resource |
| | | private ComActReserveSubService comActReserveSubService; |
| | | |
| | | /** |
| | | * 社区后台-分页查询预约登记列表 |
| | | * @param pageReserveDTO 请求参数 |
| | | * @return 预约登记列表 |
| | | */ |
| | | @PostMapping("/admin/page") |
| | | public R pageReserveAdmin(@RequestBody PageReserveAdminDTO pageReserveDTO){ |
| | | return comActReserveService.pageReserveAdmin(pageReserveDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-新增预约登记信息 |
| | | * @param addReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/admin/add") |
| | | public R addReserveAdmin(@RequestBody AddReserveAdminDTO addReserveDTO){ |
| | | return comActReserveService.addReserveAdmin(addReserveDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-编辑预约登记信息 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/admin/edit") |
| | | public R editReserveAdmin(@RequestBody EditReserveAdminDTO editReserveDTO){ |
| | | return comActReserveService.editReserveAdmin(editReserveDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-修改预约登记状态 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/admin/edit/status") |
| | | public R editReserveStatusAdmin(@RequestBody EditComActReserveStatusDTO editReserveDTO){ |
| | | return comActReserveService.editReserveStatusAdmin(editReserveDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-继续预约登记 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/admin/edit/info") |
| | | public R editReserveInfoAdmin(@RequestBody EditComActReserveInfoDTO editReserveDTO){ |
| | | return comActReserveService.editReserveInfoAdmin(editReserveDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-根据预约登记id查询详情 |
| | | * @param reserveId 预约登记id |
| | | * @return 预约登记详情 |
| | | */ |
| | | @GetMapping("/admin/detail") |
| | | public R detailReserveAdmin(@RequestParam("reserveId") Long reserveId){ |
| | | return comActReserveService.detailReserveAdmin(reserveId); |
| | | } |
| | | |
| | | /** |
| | | * 预约登记详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("userId") Long userId,@RequestParam("recordId") Long recordId){ |
| | | if(id!=null){ |
| | | return comActReserveService.getById(id,userId,recordId); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | |
| | | /** |
| | | * 小程序提交预约/登记 |
| | | * @param comActReserveCommitVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/commit") |
| | | public R commit(@RequestBody ComActReserveCommitVO comActReserveCommitVO){ |
| | | return comActReserveService.commit(comActReserveCommitVO); |
| | | } |
| | | /** |
| | | * 社区后台-根据社区id统计预约类数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | @PostMapping("/admin/make/statistics") |
| | | public R makeStatisticsAdmin(@RequestBody ComActReserveMakeStatisticsDTO makeStatisticsDTO){ |
| | | return comActReserveService.makeStatisticsAdmin(makeStatisticsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询导出预约统计汇总数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | @PostMapping("/admin/make/statistics/export") |
| | | public R makeStatisticsExportAdmin(@RequestBody ComActReserveMakeStatisticsDTO makeStatisticsDTO){ |
| | | return comActReserveService.makeStatisticsExportAdmin(makeStatisticsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-根据预约id查询预约明细 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细 |
| | | */ |
| | | @PostMapping("/admin/make/page") |
| | | public R pageMakeAdmin(@RequestBody PageReserveMakeAdminDTO pageMakeDTO){ |
| | | return comActReserveRecordService.pageMakeAdmin(pageMakeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据预约记录id查询预约明细操作记录 |
| | | * @param reserveRecordId 预约记录id |
| | | * @return 预约明细操作记录 |
| | | */ |
| | | @GetMapping("/admin/make/detail") |
| | | public R detailMakeAdmin(@RequestParam("reserveRecordId") Long reserveRecordId){ |
| | | return comActReserveRecordService.detailMakeAdmin(reserveRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 批量取消预约记录 |
| | | * @param reserveRecordDTO 请求参数 |
| | | * @return 取消结果 |
| | | */ |
| | | @PostMapping("/admin/make/cancel") |
| | | public R makeCancelAdmin(@RequestBody CancelReserveRecordDTO reserveRecordDTO){ |
| | | return comActReserveRecordService.makeCancelAdmin(reserveRecordDTO); |
| | | } |
| | | |
| | | /** |
| | | * 预约明细导出数据查询 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细数据 |
| | | */ |
| | | @PostMapping("/admin/make/list/export") |
| | | public R exportMakeAdmin(@RequestBody PageReserveMakeAdminDTO pageMakeDTO){ |
| | | return comActReserveRecordService.exportMakeAdmin(pageMakeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | @PostMapping("/admin/register/page") |
| | | public R registerStatisticsAdmin(@RequestBody ComActReserveRegisterStatisticsDTO registerStatisticsDTO){ |
| | | return comActReserveRecordService.registerStatisticsAdmin(registerStatisticsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 导出登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | @PostMapping("/admin/register/export") |
| | | public R registerStatisticsExportAdmin(@RequestBody ComActReserveRegisterStatisticsDTO registerStatisticsDTO){ |
| | | return comActReserveRecordService.registerStatisticsExportAdmin(registerStatisticsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询预约处理列表 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | @PostMapping("/admin/make/handle/page") |
| | | public R pageMakeHandleAdmin(@RequestBody PageReserveMakeHandleAdminDTO pageMakeHandleDTO){ |
| | | return comActReserveRecordService.pageMakeHandleAdmin(pageMakeHandleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 批量处理预约记录 |
| | | * @param makeHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @PostMapping("/admin/make/handle") |
| | | public R makeHandleAdmin(@RequestBody MakeHandleAdminDTO makeHandleDTO){ |
| | | return comActReserveRecordService.makeHandleAdmin(makeHandleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 导出预约处理列表数据查询 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | @PostMapping("/admin/make/handle/export") |
| | | public R exportMakeHandleAdmin(@RequestBody PageReserveMakeHandleAdminDTO pageMakeHandleDTO){ |
| | | return comActReserveRecordService.exportMakeHandleAdmin(pageMakeHandleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除预约登记信息 |
| | | * @param reserveId 预约登记id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/admin/delete") |
| | | public R deleteReserveAdmin(@RequestParam("reserveId") Long reserveId){ |
| | | return comActReserveService.deleteReserveAdmin(reserveId); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区所有预约信息列表 |
| | | * @param communityId 社区id |
| | | * @return 预约信息列表 |
| | | */ |
| | | @GetMapping("/admin/list") |
| | | public R listReserveAdmin(@RequestParam("communityId") Long communityId){ |
| | | return comActReserveService.listReserveAdmin(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 导出登记明细数据 |
| | | * @param reserveId 登记id |
| | | * @return 登记明细数据 |
| | | */ |
| | | @GetMapping("/admin/register/list/export") |
| | | public R exportRegisterAdmin(@RequestParam("reserveId") Long reserveId){ |
| | | return comActReserveAnswerContentService.exportRegisterAdmin(reserveId); |
| | | } |
| | | |
| | | /** |
| | | * 我的预约/登记 |
| | | * @param pageUserReserveDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/userReserveList") |
| | | public R userReserveList(@RequestBody PageUserReserveDTO pageUserReserveDTO){ |
| | | return comActReserveService.pageReserveList(pageUserReserveDTO); |
| | | } |
| | | /** |
| | | * 取消预约/登记 |
| | | */ |
| | | @PostMapping("/cancelReserve") |
| | | public R userCancelReserve(@RequestBody CancelRecordDTO cancelRecordDTO){ |
| | | return comActReserveRecordService.cancel(cancelRecordDTO); |
| | | } |
| | | |
| | | /** |
| | | * 预约详情操作记录 |
| | | */ |
| | | @PostMapping("/detailOperation") |
| | | public R reserveOperation(@RequestBody OperationDetailDTO comActReserveOperationRecordDO){ |
| | | return comActReserveOperationRecordService.detailOperationRecord(comActReserveOperationRecordDO); |
| | | } |
| | | |
| | | /** |
| | | * 查询预约登记题目列表 |
| | | * @param reserveId 预约登记id |
| | | * @return 约登记题目列表 |
| | | */ |
| | | @GetMapping("/admin/subject/list") |
| | | public R subjectListAdmin(@RequestParam("reserveId") Long reserveId){ |
| | | return comActReserveSubService.subjectListAdmin(reserveId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | @PostMapping("/admin/register/detailed/list") |
| | | public R registerDetailedListAdmin(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO){ |
| | | return comActReserveAnswerContentService.registerDetailedListAdmin(detailedAdminDTO); |
| | | } |
| | | |
| | | @GetMapping("/admin/register/detailed/detail") |
| | | public R registerDetailedDetailAdmin(@RequestParam("reserveRecordId") Long reserveRecordId){ |
| | | return comActReserveRecordService.registerDetailedDetailAdmin(reserveRecordId); |
| | | } |
| | | } |
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.community.reserve.PageReserveRegisterDetailedAdminDTO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:32 |
| | | * @describe 预约登记回答记录内容 mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveAnswerContentMapper extends BaseMapper<ComActReserveAnswerContentDO> { |
| | | |
| | | /** |
| | | * 查询用户填写登记类答案记录列表 |
| | | * @param reserveId 预约登记id |
| | | * @return 登记类答案记录列表 |
| | | */ |
| | | List<ComActReserveAnswerContentDO> selectListByReserve(@Param("reserveId")Long reserveId); |
| | | |
| | | /** |
| | | * 分页查询用户填写某预约登记记录列表 |
| | | * @param page 分页参数 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 某预约登记记录列表 |
| | | */ |
| | | IPage<ComActReserveRegisterDetailedVO> pageRegisterDetailedListAdmin(Page page, @Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 查询登记记录填写的内容列表 |
| | | * @param reserveRecordId 预约登记记录id |
| | | * @return 登记记录填写的内容列表 |
| | | */ |
| | | List<ComActReserveRegisterDetailedAnswerVO> getRegisterDetailedAnswerList(@Param("reserveRecordId")Long reserveRecordId); |
| | | |
| | | } |
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.community.reserve.ComActReserveMakeStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeLeftStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveIndexVo; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:11 |
| | | * @describe 预约登记表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveMapper extends BaseMapper<ComActReserveDO> { |
| | | /** |
| | | * 查询预约登记首页banner |
| | | * @param communityId |
| | | * @return 预约登记首页banner列表 |
| | | */ |
| | | List<ComActReserveIndexVo> indexBanner(Long communityId); |
| | | /** |
| | | * 查询预约登记应用列表 |
| | | * @param communityId |
| | | * @return 预约登记应用列表 |
| | | */ |
| | | List<ComActReserveIndexVo> indexApplication(Long communityId); |
| | | |
| | | /** |
| | | * 社区后台-分页查询预约登记列表 |
| | | * @param pageReserveDTO 请求参数 |
| | | * @return 预约登记列表 |
| | | */ |
| | | IPage<ComActReserveListAdminVO> pageReserveAdmin(Page page, @Param("pageReserveDTO") PageReserveAdminDTO pageReserveDTO); |
| | | |
| | | /** |
| | | * 根据预约登记id删除预约登记原有题目以及题目选项 |
| | | * @param reserveId 预约登记id |
| | | */ |
| | | void deleteReserveSubAll(@Param("reserveId") Long reserveId); |
| | | |
| | | /** |
| | | * 社区后台-根据社区id查询预约统计汇总左边数据 |
| | | * @param communityId 社区id |
| | | * @return 预约统计汇总左边数据 |
| | | */ |
| | | List<ComActReserveMakeLeftStatisticsAdminVO> getReserveMakeLeftStatistics(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 社区后台-查询预约统计汇总右边数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 预约统计汇总右边数据 |
| | | */ |
| | | List<ComActReserveMakeRightStatisticsAdminVO> getReserveMakeRightStatistics(@Param("makeStatisticsDTO") ComActReserveMakeStatisticsDTO makeStatisticsDTO); |
| | | |
| | | /** |
| | | * 社区后台-根据社区id 查询开始时间到结束时间预约成功数量 |
| | | * @param communityId 社区id |
| | | * @param startTime 开始时间 |
| | | * @param endTime 结束时间 |
| | | * @return 预约成功数量 |
| | | */ |
| | | Integer getReserveRecordCount(@Param("communityId") Long communityId,@Param("startTime") String startTime,@Param("endTime") String endTime); |
| | | |
| | | /** |
| | | * 查询社区所有预约信息列表 |
| | | * @param communityId 社区id |
| | | * @return 预约信息列表 |
| | | */ |
| | | List<ComActReserveListAdminVO> listReserveAdmin(@Param("communityId") Long communityId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeOperationAdminVO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveOperationRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:42 |
| | | * @describe 预约登记操作记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveOperationRecordMapper extends BaseMapper<ComActReserveOperationRecordDO> { |
| | | |
| | | /** |
| | | * 根据预约记录id查询预约明细操作记录 |
| | | * @param reserveRecordId 预约记录id |
| | | * @return 预约明细操作记录 |
| | | */ |
| | | List<ComActReserveMakeOperationAdminVO> getMakeOperationList(@Param("reserveRecordId") Long reserveRecordId); |
| | | |
| | | } |
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.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:53 |
| | | * @describe 预约登记记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveRecordMapper extends BaseMapper<ComActReserveRecordDO> { |
| | | IPage<ComActReserveRecordDO> pageReserveList(Page page, @Param("pageUserReserveDTO") PageUserReserveDTO pageUserReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-根据预约id查询预约明细 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细 |
| | | */ |
| | | IPage<ComActReserveMakeListAdminVO> pageMakeAdmin(Page page, @Param("pageMakeDTO") PageReserveMakeAdminDTO pageMakeDTO); |
| | | |
| | | /** |
| | | * 根据预约记录id查询预约记录详细信息 |
| | | * @param reserveRecordId 预约记录id |
| | | * @return 预约记录详细信息 |
| | | */ |
| | | ComActReserveMakeDetailAdminVO getMakeDetailAdmin(@Param("reserveRecordId") Long reserveRecordId); |
| | | |
| | | /** |
| | | * 查询预约记录id集合中是否存在未预约成功的记录 |
| | | * @param ids 预约记录id集合 |
| | | * @return 未预约成功记录的数量 |
| | | */ |
| | | Integer getReserveStatusById(@Param("ids") List<Long> ids); |
| | | |
| | | /** |
| | | * 修改预约记录id集合的预约状态为已取消 |
| | | * @param ids 预约记录id集合 |
| | | * @return 修改结果 |
| | | */ |
| | | Integer editReserveStatusById(@Param("ids") List<Long> ids); |
| | | |
| | | /** |
| | | * 预约明细导出数据查询 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细数据 |
| | | */ |
| | | List<ComActReserveMakeListAdminVO> exportMakeAdmin(@Param("pageMakeDTO") PageReserveMakeAdminDTO pageMakeDTO); |
| | | |
| | | /** |
| | | * 分页查询登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | IPage<ComActReserveRegisterStatisticsAdminVO> registerStatisticsAdmin(Page page, @Param("registerStatisticsDTO") ComActReserveRegisterStatisticsDTO registerStatisticsDTO); |
| | | |
| | | /** |
| | | * 导出登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | List<ComActReserveRegisterStatisticsAdminVO> registerStatisticsExportAdmin(@Param("registerStatisticsDTO") ComActReserveRegisterStatisticsDTO registerStatisticsDTO); |
| | | |
| | | /** |
| | | * 分页查询预约处理列表 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | IPage<ComActReserveMakeHandleListAdminVO> pageMakeHandleAdmin(Page page, @Param("pageMakeHandleDTO") PageReserveMakeHandleAdminDTO pageMakeHandleDTO); |
| | | |
| | | /** |
| | | * 查询指定预约记录是否存在不是待处理状态的数据 |
| | | * @param ids 预约记录id集合 |
| | | * @return 不是待处理状态数据条数 |
| | | */ |
| | | Integer getReserveListCountByIds(@Param("ids")List<Long> ids); |
| | | |
| | | /** |
| | | * 导出预约处理列表数据查询 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | List<ComActReserveMakeHandleListAdminVO> exportMakeHandleAdmin(@Param("pageMakeHandleDTO") PageReserveMakeHandleAdminDTO pageMakeHandleDTO); |
| | | |
| | | ComActReserveRegisterDetailedVO getRegisterDetailedByRecordId(@Param("reserveRecordId") Long reserveRecordId); |
| | | |
| | | /** |
| | | * 根据reserveRecordId查询操作记录 |
| | | * @param operationDetailDTO |
| | | * @return |
| | | */ |
| | | List<ComOperationListVO> queryAll(OperationDetailDTO operationDetailDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:03 |
| | | * @describe 预约登记题目选项mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveSubMapper extends BaseMapper<ComActReserveSubDO> { |
| | | |
| | | /** |
| | | * 根据预约登记id查询题目列表 |
| | | * @param reserveId 预约登记id |
| | | * @return 题目列表 |
| | | */ |
| | | List<ComActReserveSubListVO> getReserveSubjectList(@Param("reserveId") Long reserveId); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubSelectionDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:13 |
| | | * @describe 预约登记题目选项 mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveSubSelectionMapper extends BaseMapper<ComActReserveSubSelectionDO> { |
| | | |
| | | } |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 类型 0单选1多选2问答题 |
| | | * 类型 0 单选 1 多选 2 输入框 2姓名输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 |
| | | */ |
| | | private int type; |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:32 |
| | | * @describe 预约登记回答记录内容 实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_reserve_answer_content") |
| | | public class ComActReserveAnswerContentDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 预约登记题目id |
| | | */ |
| | | private Long reserveSubId; |
| | | |
| | | /** |
| | | * 预约登记记录id |
| | | */ |
| | | private Long reserveRecordId; |
| | | |
| | | /** |
| | | * 预约登记题目选项id |
| | | */ |
| | | private Long reserveSelectionId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 题目类型(1.选项题 2.问答题) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 问卷回答选项 |
| | | */ |
| | | private String choice; |
| | | |
| | | /** |
| | | * 问卷回答内容 |
| | | */ |
| | | private String answerContent; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private String updateBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveAnswerContentDO{" + |
| | | "id=" + id + |
| | | ", reserveSubId=" + reserveSubId + |
| | | ", reserveSelectionId=" + reserveSelectionId + |
| | | ", userId=" + userId + |
| | | ", type=" + type + |
| | | ", choice=" + choice + |
| | | ", answerContent=" + answerContent + |
| | | ", createBy=" + createBy + |
| | | ", createAt=" + createAt + |
| | | ", updateBy=" + updateBy + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:11 |
| | | * @describe 预约登记表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_reserve") |
| | | public class ComActReserveDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 类型(1.预约 2.登记) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 主题 |
| | | */ |
| | | private String title; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | |
| | | /** |
| | | * 总参加人数 |
| | | */ |
| | | private Integer joinAllCount; |
| | | |
| | | /** |
| | | * 参加人数 |
| | | */ |
| | | private Integer joinCount; |
| | | |
| | | /** |
| | | * 图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片) |
| | | */ |
| | | private Integer imgType; |
| | | |
| | | /** |
| | | * 图标url(当img_type为5时,此字段的值为图标url地址) |
| | | */ |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 状态(1.待发布 2.进行中 3.已停止) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date publishTime; |
| | | |
| | | /** |
| | | * 是否可重复提交(1.是 2.否) |
| | | */ |
| | | private Integer isRepeat; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 组件json数据 |
| | | */ |
| | | private String jsonObject; |
| | | |
| | | /** |
| | | * 是否是首页顶部(1.是 2.否) |
| | | */ |
| | | private Integer adverPositionTop; |
| | | |
| | | /** |
| | | * 是否是首页应用(1.是 2.否) |
| | | */ |
| | | private Integer adverPositionApplication; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField(value = "end_time", updateStrategy = FieldStrategy.IGNORED) |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 默认是否枚举(1.是 2.否) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | /** |
| | | * 预约登记状态枚举(1.待发布 2.进行中 3.已停止) |
| | | */ |
| | | public interface status{ |
| | | int dfb = 1; |
| | | int jxz = 2; |
| | | int ytz = 3; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveDO{" + |
| | | "id=" + id + |
| | | ", communityId=" + communityId + |
| | | ", type=" + type + |
| | | ", title=" + title + |
| | | ", viewNum=" + viewNum + |
| | | ", joinAllCount=" + joinAllCount + |
| | | ", joinCount=" + joinCount + |
| | | ", imgType=" + imgType + |
| | | ", imgUrl=" + imgUrl + |
| | | ", status=" + status + |
| | | ", publishTime=" + publishTime + |
| | | ", isRepeat=" + isRepeat + |
| | | ", remark=" + remark + |
| | | ", jsonObject=" + jsonObject + |
| | | ", adverPositionTop=" + adverPositionTop + |
| | | ", adverPositionApplication=" + adverPositionApplication + |
| | | ", createAt=" + createAt + |
| | | ", createBy=" + createBy + |
| | | ", updateAt=" + updateAt + |
| | | ", updateBy=" + updateBy + |
| | | "}"; |
| | | } |
| | | public interface isRepeat{ |
| | | int yes=1; |
| | | int no=2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:42 |
| | | * @describe 预约登记操作记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_reserve_operation_record") |
| | | public class ComActReserveOperationRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | |
| | | /** |
| | | * 预约登记记录id |
| | | */ |
| | | private Long reserveRecordId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 类型(1.本人操作 2.社区操作) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 操作人手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | /** |
| | | * 操作内容 |
| | | */ |
| | | private String reserveContent; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 状态(1.提交 2.预约成功 3.预约失败 4.取消) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveOperationRecordDO{" + |
| | | "id=" + id + |
| | | ", reserveId=" + reserveId + |
| | | ", reserveRecordId=" + reserveRecordId + |
| | | ", userId=" + userId + |
| | | ", type=" + type + |
| | | ", phone=" + phone + |
| | | ", reserveTime=" + reserveTime + |
| | | ", reserveContent=" + reserveContent + |
| | | ", remark=" + remark + |
| | | ", status=" + status + |
| | | ", createAt=" + createAt + |
| | | ", createBy=" + createBy + |
| | | "}"; |
| | | } |
| | | |
| | | /** |
| | | * 1本人 2社区 |
| | | */ |
| | | public interface type{ |
| | | int br=1; |
| | | int sq=2; |
| | | } |
| | | /** |
| | | * 状态(1.提交 2.预约成功 3.预约失败 4.取消) |
| | | */ |
| | | public interface status{ |
| | | int ytj=1; |
| | | int cg=2; |
| | | int sb=3; |
| | | int qx=4; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:53 |
| | | * @describe 预约登记记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_reserve_record") |
| | | public class ComActReserveRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 类型(1.预约 2.登记) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 提交人名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 提交人手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 状态(1.待处理 2.预约成功 3.预约失败 4.已取消) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 社区备注 |
| | | */ |
| | | private String actRemark; |
| | | |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | /** |
| | | * 用户填报json数据 |
| | | */ |
| | | private String jsonObject; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveRecordDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", reserveId=" + reserveId + |
| | | ", communityId=" + communityId + |
| | | ", type=" + type + |
| | | ", name=" + name + |
| | | ", phone=" + phone + |
| | | ", status=" + status + |
| | | ", content=" + content + |
| | | ", remark=" + remark + |
| | | ", actRemark=" + actRemark + |
| | | ", reserveTime=" + reserveTime + |
| | | ", jsonObject=" + jsonObject + |
| | | ", createAt=" + createAt + |
| | | ", createBy=" + createBy + |
| | | ", updateAt=" + updateAt + |
| | | ", updateBy=" + updateBy + |
| | | "}"; |
| | | } |
| | | |
| | | /** |
| | | * 状态(1.待处理 2.预约成功 3.预约失败 4.已取消) |
| | | */ |
| | | public interface status{ |
| | | int dcl = 1; |
| | | int cg = 2; |
| | | int sb = 3; |
| | | int yqx = 4; |
| | | } |
| | | /** |
| | | * 类型(1.预约 2.登记) |
| | | */ |
| | | public interface type{ |
| | | int yy=1; |
| | | int dj=2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:03 |
| | | * @describe 预约登记题目选项实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_reserve_sub") |
| | | public class ComActReserveSubDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | |
| | | /** |
| | | * 序号 |
| | | */ |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 类型 0 单选 1 多选 2 输入框 2姓名输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 问卷调查题目key |
| | | */ |
| | | @TableField("`key`") |
| | | private String key; |
| | | |
| | | /** |
| | | * 题目内容 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveSubDO{" + |
| | | "id=" + id + |
| | | ", reserveId=" + reserveId + |
| | | ", sort=" + sort + |
| | | ", type=" + type + |
| | | ", key=" + key + |
| | | ", content=" + content + |
| | | ", createBy=" + createBy + |
| | | ", createAt=" + createAt + |
| | | ", updateBy=" + updateBy + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:13 |
| | | * @describe 预约登记题目选项 实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_reserve_sub_selection") |
| | | public class ComActReserveSubSelectionDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | |
| | | /** |
| | | * 预约登记题目id |
| | | */ |
| | | private Long reserveSubId; |
| | | |
| | | /** |
| | | * 预约登记选项key |
| | | */ |
| | | @TableField("`key`") |
| | | private String key; |
| | | |
| | | /** |
| | | * 选项类型 0 固定选项 1 自定义选项 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 选项名 |
| | | */ |
| | | private String optionName; |
| | | |
| | | /** |
| | | * 选项内容 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveSubSelectionDO{" + |
| | | "id=" + id + |
| | | ", reserveId=" + reserveId + |
| | | ", reserveSubId=" + reserveSubId + |
| | | ", key=" + key + |
| | | ", type=" + type + |
| | | ", sort=" + sort + |
| | | ", optionName=" + optionName + |
| | | ", content=" + content + |
| | | ", createAt=" + createAt + |
| | | ", createBy=" + createBy + |
| | | ", updateAt=" + updateAt + |
| | | ", updateBy=" + updateBy + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:32 |
| | | * @describe 预约登记回答记录内容 服务类 |
| | | */ |
| | | public interface ComActReserveAnswerContentService extends IService<ComActReserveAnswerContentDO> { |
| | | |
| | | /** |
| | | * 导出登记明细数据 |
| | | * @param reserveId 登记id |
| | | * @return 登记明细数据 |
| | | */ |
| | | R exportRegisterAdmin(Long reserveId); |
| | | |
| | | /** |
| | | * 分页查询登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | R registerDetailedListAdmin(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveOperationRecordDO; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:42 |
| | | * @describe 预约登记操作记录表服务类 |
| | | */ |
| | | public interface ComActReserveOperationRecordService extends IService<ComActReserveOperationRecordDO> { |
| | | |
| | | /** |
| | | * 添加预约登记操作记录 |
| | | * @param reserveId 预约登记id |
| | | * @param reserveRecordId 预约登记记录id |
| | | * @param userId 用户id |
| | | * @param type 类型(1.本人操作 2.社区操作) |
| | | * @param phone 操作人手机号 |
| | | * @param reserveContent 操作内容 |
| | | * @param remark 备注 |
| | | * @param status 状态(1.提交 2.预约成功 3.预约失败 4.取消) |
| | | * @param createBy 创建人 |
| | | * @param reserveTime 成功预约时间 |
| | | */ |
| | | void addReserveOperationRecord(Long reserveId, Long reserveRecordId, Long userId, Integer type |
| | | , String phone, String reserveContent,String remark,Integer status,Long createBy,Date reserveTime); |
| | | |
| | | |
| | | /** |
| | | * 多条件查询操作记录 |
| | | * @param operationDetailDTO |
| | | * @return |
| | | */ |
| | | R detailOperationRecord(OperationDetailDTO operationDetailDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveRecordDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:53 |
| | | * @describe 预约登记记录表服务类 |
| | | */ |
| | | public interface ComActReserveRecordService extends IService<ComActReserveRecordDO> { |
| | | R cancel(CancelRecordDTO comActReserveRecordDO); |
| | | |
| | | /** |
| | | * 社区后台-根据预约id查询预约明细 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细 |
| | | */ |
| | | R pageMakeAdmin(PageReserveMakeAdminDTO pageMakeDTO); |
| | | |
| | | /** |
| | | * 根据预约记录id查询预约明细操作记录 |
| | | * @param reserveRecordId 预约记录id |
| | | * @return 预约明细操作记录 |
| | | */ |
| | | R detailMakeAdmin(Long reserveRecordId); |
| | | |
| | | /** |
| | | * 批量取消预约记录 |
| | | * @param reserveRecordDTO 请求参数 |
| | | * @return 取消结果 |
| | | */ |
| | | R makeCancelAdmin(CancelReserveRecordDTO reserveRecordDTO); |
| | | |
| | | /** |
| | | * 预约明细导出数据查询 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细数据 |
| | | */ |
| | | R exportMakeAdmin(PageReserveMakeAdminDTO pageMakeDTO); |
| | | |
| | | /** |
| | | * 分页查询登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | R registerStatisticsAdmin(ComActReserveRegisterStatisticsDTO registerStatisticsDTO); |
| | | |
| | | /** |
| | | * 导出登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | R registerStatisticsExportAdmin(ComActReserveRegisterStatisticsDTO registerStatisticsDTO); |
| | | |
| | | /** |
| | | * 分页查询预约处理列表 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | R pageMakeHandleAdmin(PageReserveMakeHandleAdminDTO pageMakeHandleDTO); |
| | | |
| | | /** |
| | | * 批量处理预约记录 |
| | | * @param makeHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | R makeHandleAdmin(MakeHandleAdminDTO makeHandleDTO); |
| | | |
| | | /** |
| | | * 导出预约处理列表数据查询 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | R exportMakeHandleAdmin(PageReserveMakeHandleAdminDTO pageMakeHandleDTO); |
| | | |
| | | R registerDetailedDetailAdmin(Long reserveRecordId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:11 |
| | | * @describe 预约登记表服务类 |
| | | */ |
| | | public interface ComActReserveService extends IService<ComActReserveDO> { |
| | | /** |
| | | * 小程序提交预约登记 |
| | | * @param comActReserveCommitVO |
| | | * @return 预约登记结果 |
| | | */ |
| | | R commit(ComActReserveCommitVO comActReserveCommitVO); |
| | | |
| | | /** |
| | | * 小程序我的预约登记 |
| | | * @param pageUserReserveDTO |
| | | * @return 预约登记列表 |
| | | */ |
| | | R pageReserveList(PageUserReserveDTO pageUserReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-分页查询预约登记列表 |
| | | * @param pageReserveDTO 请求参数 |
| | | * @return 预约登记列表 |
| | | */ |
| | | R pageReserveAdmin(PageReserveAdminDTO pageReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-新增预约登记信息 |
| | | * @param addReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addReserveAdmin(AddReserveAdminDTO addReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-编辑预约登记信息 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R editReserveAdmin(EditReserveAdminDTO editReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-修改预约登记状态 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | R editReserveStatusAdmin(EditComActReserveStatusDTO editReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-继续预约登记 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | R editReserveInfoAdmin(EditComActReserveInfoDTO editReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-根据预约登记id查询详情 |
| | | * @param reserveId 预约登记id |
| | | * @return 预约登记详情 |
| | | */ |
| | | R detailReserveAdmin(Long reserveId); |
| | | |
| | | /** |
| | | * 社区后台-根据社区id统计预约类数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | R makeStatisticsAdmin(ComActReserveMakeStatisticsDTO makeStatisticsDTO); |
| | | |
| | | /** |
| | | * 社区后台-查询导出预约统计汇总数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | R makeStatisticsExportAdmin(ComActReserveMakeStatisticsDTO makeStatisticsDTO); |
| | | |
| | | /** |
| | | * 删除预约登记信息 |
| | | * @param reserveId 预约登记id |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteReserveAdmin(Long reserveId); |
| | | |
| | | /** |
| | | * 查询社区所有预约信息列表 |
| | | * @param communityId 社区id |
| | | * @return 预约信息列表 |
| | | */ |
| | | R listReserveAdmin(Long communityId); |
| | | |
| | | /** |
| | | * 小程序预约登记查询详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getById(Long id,Long userId,Long recordId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubSelectionDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:13 |
| | | * @describe 预约登记题目选项 服务类 |
| | | */ |
| | | public interface ComActReserveSubSelectionService extends IService<ComActReserveSubSelectionDO> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:03 |
| | | * @describe 预约登记题目选项服务类 |
| | | */ |
| | | public interface ComActReserveSubService extends IService<ComActReserveSubDO> { |
| | | |
| | | /** |
| | | * 查询预约登记题目列表 |
| | | * @param reserveId 预约登记id |
| | | * @return 约登记题目列表 |
| | | */ |
| | | R subjectListAdmin(Long reserveId); |
| | | |
| | | } |
| | |
| | | @Resource |
| | | private ComActQuestnaireDAO comActQuestnaireDAO; |
| | | @Resource |
| | | private ComActReserveMapper comActReserveMapper; |
| | | @Resource |
| | | private ComActActivityDAO comActActivityDAO; |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.QuestnaireAnswersDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireSubVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.service_community.dao.ComActReserveAnswerContentMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActQuestnaireAnswerContentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActQuestnaireSubDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubDO; |
| | | import com.panzhihua.service_community.service.ComActReserveAnswerContentService; |
| | | import com.panzhihua.service_community.service.ComActReserveSubService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:32 |
| | | * @describe 预约登记回答记录内容 服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActReserveAnswerContentServiceImpl extends ServiceImpl<ComActReserveAnswerContentMapper, ComActReserveAnswerContentDO> implements ComActReserveAnswerContentService { |
| | | |
| | | @Resource |
| | | private ComActReserveSubMapper comActReserveSubMapper; |
| | | |
| | | /** |
| | | * 导出登记明细数据 |
| | | * @param reserveId 登记id |
| | | * @return 登记明细数据 |
| | | */ |
| | | @Override |
| | | public R exportRegisterAdmin(Long reserveId){ |
| | | QuestnaireAnswersDTO result = new QuestnaireAnswersDTO(); |
| | | |
| | | //查询题目 |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda().eq(ComActReserveSubDO::getReserveId, reserveId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | }); |
| | | result.setSubs(listSubVo); |
| | | |
| | | //查询用户回答 |
| | | List<ComActReserveAnswerContentDO> questnaireAnswerContentDOList = this.baseMapper.selectListByReserve(reserveId); |
| | | List<ComActQuestnaireAnswerContentVO> vos = new ArrayList<>(); |
| | | questnaireAnswerContentDOList.forEach(dos -> { |
| | | ComActQuestnaireAnswerContentVO vo = new ComActQuestnaireAnswerContentVO(); |
| | | BeanUtils.copyProperties(dos, vo); |
| | | vos.add(vo); |
| | | }); |
| | | result.setAnswers(vos); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询登记明细列表 |
| | | * @param detailedAdminDTO 请求参数 |
| | | * @return 登记明细列表 |
| | | */ |
| | | @Override |
| | | public R registerDetailedListAdmin(PageReserveRegisterDetailedAdminDTO detailedAdminDTO){ |
| | | IPage<HashMap<String,Object>> resultPage = new Page<>(); |
| | | |
| | | IPage<ComActReserveRegisterDetailedVO> registerDetailedPage = this.baseMapper.pageRegisterDetailedListAdmin(new Page(detailedAdminDTO.getPageNum(),detailedAdminDTO.getPageSize()),detailedAdminDTO); |
| | | resultPage.setCurrent(registerDetailedPage.getCurrent()); |
| | | resultPage.setTotal(registerDetailedPage.getTotal()); |
| | | resultPage.setSize(registerDetailedPage.getSize()); |
| | | resultPage.setPages(registerDetailedPage.getPages()); |
| | | |
| | | List<HashMap<String,Object>> resultMapList = new ArrayList<>(); |
| | | Integer nub = 1; |
| | | if(!registerDetailedPage.getRecords().isEmpty()){ |
| | | for (ComActReserveRegisterDetailedVO registerDetailed:registerDetailedPage.getRecords()) { |
| | | //渲染序号 |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | map.put("nub",nub); |
| | | //渲染用户昵称 |
| | | map.put("nickName",registerDetailed.getNickName()); |
| | | //查询记录填写答案并装载到数据集中 |
| | | List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(registerDetailed.getId()); |
| | | if(!registerDetailedAnswerList.isEmpty()){ |
| | | for (ComActReserveRegisterDetailedAnswerVO detailed:registerDetailedAnswerList) { |
| | | map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); |
| | | } |
| | | } |
| | | //渲染登记流水号 |
| | | map.put("id",registerDetailed.getId()); |
| | | //渲染登记时间 |
| | | map.put("time",registerDetailed.getCreateAt()); |
| | | resultMapList.add(map); |
| | | nub++; |
| | | } |
| | | } |
| | | resultPage.setRecords(resultMapList); |
| | | return R.ok(resultPage); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComOperationDetailVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComOperationListVO; |
| | | import com.panzhihua.service_community.dao.ComActReserveMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveOperationRecordMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveRecordMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveOperationRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveRecordDO; |
| | | import com.panzhihua.service_community.service.ComActReserveOperationRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:42 |
| | | * @describe 预约登记操作记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActReserveOperationRecordServiceImpl extends ServiceImpl<ComActReserveOperationRecordMapper, ComActReserveOperationRecordDO> implements ComActReserveOperationRecordService { |
| | | @Resource |
| | | private ComActReserveMapper comActReserveMapper; |
| | | @Resource |
| | | private ComActReserveRecordMapper comActReserveRecordMapper; |
| | | /** |
| | | * 添加预约登记操作记录 |
| | | * @param reserveId 预约登记id |
| | | * @param reserveRecordId 预约登记记录id |
| | | * @param userId 用户id |
| | | * @param type 类型(1.本人操作 2.社区操作) |
| | | * @param phone 操作人手机号 |
| | | * @param reserveContent 操作内容 |
| | | * @param remark 备注 |
| | | * @param status 状态(1.提交 2.预约成功 3.预约失败 4.取消) |
| | | * @param createBy 创建人 |
| | | * @param reserveTime 预约成功时间 |
| | | */ |
| | | @Override |
| | | public void addReserveOperationRecord(Long reserveId, Long reserveRecordId, Long userId, Integer type |
| | | , String phone, String reserveContent,String remark,Integer status,Long createBy,Date reserveTime){ |
| | | Date nowDate = new Date(); |
| | | ComActReserveOperationRecordDO operationRecordDO = new ComActReserveOperationRecordDO(); |
| | | operationRecordDO.setReserveId(reserveId); |
| | | operationRecordDO.setReserveRecordId(reserveRecordId); |
| | | operationRecordDO.setUserId(userId); |
| | | operationRecordDO.setType(type); |
| | | operationRecordDO.setPhone(phone); |
| | | operationRecordDO.setReserveContent(reserveContent); |
| | | operationRecordDO.setRemark(remark); |
| | | operationRecordDO.setStatus(status); |
| | | operationRecordDO.setCreateBy(createBy); |
| | | operationRecordDO.setCreateAt(nowDate); |
| | | operationRecordDO.setReserveTime(reserveTime); |
| | | this.baseMapper.insert(operationRecordDO); |
| | | } |
| | | |
| | | @Override |
| | | public R detailOperationRecord(OperationDetailDTO comActReserveOperationRecordDO) { |
| | | if(comActReserveOperationRecordDO!=null){ |
| | | ComOperationDetailVO comOperationDetailVO=new ComOperationDetailVO(); |
| | | List<ComOperationListVO> comOperationListVOS=comActReserveRecordMapper.queryAll(comActReserveOperationRecordDO); |
| | | if(!comOperationListVOS.isEmpty()){ |
| | | comOperationDetailVO.setList(comOperationListVOS); |
| | | ComActReserveRecordDO comActReserveRecordDO= comActReserveRecordMapper.selectById(comActReserveOperationRecordDO.getReserveRecordId()); |
| | | if(comActReserveRecordDO.getStatus()==ComActReserveRecordDO.status.yqx||comActReserveRecordDO.getStatus()==ComActReserveRecordDO.status.sb){ |
| | | ComActReserveDO com=comActReserveMapper.selectById(comOperationListVOS.get(0).getReserveId()); |
| | | if(com!=null&&com.getStatus()==ComActReserveDO.status.jxz){ |
| | | comOperationDetailVO.setIsContinue(1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return R.ok(comOperationDetailVO); |
| | | } |
| | | return R.fail("未查询到数据"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.ComActReserveAnswerContentMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveOperationRecordMapper; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComActReserveOperationRecordMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveRecordMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveOperationRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveRecordDO; |
| | | import com.panzhihua.service_community.service.ComActReserveOperationRecordService; |
| | | import com.panzhihua.service_community.service.ComActReserveRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:53 |
| | | * @describe 预约登记记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActReserveRecordServiceImpl extends ServiceImpl<ComActReserveRecordMapper, ComActReserveRecordDO> implements ComActReserveRecordService { |
| | | @Resource |
| | | private ComActReserveRecordMapper comActReserveRecordMapper; |
| | | @Resource |
| | | private ComActReserveAnswerContentMapper comActReserveAnswerContentMapper; |
| | | @Resource |
| | | private ComActReserveOperationRecordMapper comActReserveOperationRecordMapper; |
| | | @Resource |
| | | private ComActReserveOperationRecordService comActReserveOperationRecordService; |
| | | |
| | | private final static String CANCEL="用户取消"; |
| | | @Override |
| | | @Transactional |
| | | public R cancel(CancelRecordDTO comActReserveRecord) { |
| | | if(comActReserveRecord!=null&&comActReserveRecord.getId()!=null){ |
| | | //查询当前操作数据并判断取消状态 |
| | | ComActReserveRecordDO comActReserveRecordDO=comActReserveRecordMapper.selectById(comActReserveRecord.getId()); |
| | | if(comActReserveRecordDO!=null&&comActReserveRecordDO.getStatus()!=ComActReserveRecordDO.status.yqx){ |
| | | comActReserveRecordDO.setStatus(ComActReserveRecordDO.status.yqx); |
| | | comActReserveRecordDO.setContent(comActReserveRecord.getContent()); |
| | | int result =comActReserveRecordMapper.updateById(comActReserveRecordDO); |
| | | //判断取消状态并添加操作记录 |
| | | if(result>0){ |
| | | ComActReserveOperationRecordDO comActReserveOperationRecordDO=new ComActReserveOperationRecordDO(); |
| | | comActReserveOperationRecordDO.setReserveId(comActReserveRecordDO.getReserveId()); |
| | | comActReserveOperationRecordDO.setReserveRecordId(comActReserveRecordDO.getId()); |
| | | comActReserveOperationRecordDO.setType(ComActReserveOperationRecordDO.type.br); |
| | | comActReserveOperationRecordDO.setCreateAt(DateUtil.date()); |
| | | comActReserveOperationRecordDO.setReserveContent(CANCEL); |
| | | comActReserveOperationRecordDO.setPhone(comActReserveRecordDO.getPhone()); |
| | | comActReserveOperationRecordDO.setStatus(ComActReserveOperationRecordDO.status.qx); |
| | | comActReserveOperationRecordDO.setUserId(comActReserveRecordDO.getUserId()); |
| | | comActReserveOperationRecordMapper.insert(comActReserveOperationRecordDO); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("无法重复取消"); |
| | | } |
| | | |
| | | return R.fail("参数异常"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 社区后台-根据预约id查询预约明细 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细 |
| | | */ |
| | | @Override |
| | | public R pageMakeAdmin(PageReserveMakeAdminDTO pageMakeDTO){ |
| | | return R.ok(this.baseMapper.pageMakeAdmin(new Page(pageMakeDTO.getPageNum(),pageMakeDTO.getPageSize()),pageMakeDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 根据预约记录id查询预约明细操作记录 |
| | | * @param reserveRecordId 预约记录id |
| | | * @return 预约明细操作记录 |
| | | */ |
| | | @Override |
| | | public R detailMakeAdmin(Long reserveRecordId){ |
| | | ComActReserveMakeDetailAdminVO makeDetailAdminVO = this.baseMapper.getMakeDetailAdmin(reserveRecordId); |
| | | if(makeDetailAdminVO != null){ |
| | | //查询预约明细操作记录 |
| | | List<ComActReserveMakeOperationAdminVO> makeOperationList = comActReserveOperationRecordMapper.getMakeOperationList(reserveRecordId); |
| | | makeDetailAdminVO.setOperationList(makeOperationList); |
| | | } |
| | | return R.ok(makeDetailAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 批量取消预约记录 |
| | | * @param reserveRecordDTO 请求参数 |
| | | * @return 取消结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R makeCancelAdmin(CancelReserveRecordDTO reserveRecordDTO){ |
| | | Integer count = this.baseMapper.getReserveStatusById(reserveRecordDTO.getIds()); |
| | | if(count > 0){ |
| | | return R.ok("您选择的记录中存在未预约成功,不可进行批量取消"); |
| | | } |
| | | if(this.baseMapper.editReserveStatusById(reserveRecordDTO.getIds()) > 0){ |
| | | Long userId = reserveRecordDTO.getUserId(); |
| | | reserveRecordDTO.getIds().forEach(id -> { |
| | | ComActReserveRecordDO reserveRecordDO = comActReserveRecordMapper.selectById(id); |
| | | if(reserveRecordDO != null){ |
| | | //添加操作记录 |
| | | comActReserveOperationRecordService.addReserveOperationRecord(reserveRecordDO.getReserveId() |
| | | ,reserveRecordDO.getId(),reserveRecordDO.getUserId(),ComActReserveOperationRecordDO.type.sq,null |
| | | ,"社区管理员取消预约",reserveRecordDTO.getRemark(),ComActReserveOperationRecordDO.status.qx,userId,null); |
| | | } |
| | | }); |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 预约明细导出数据查询 |
| | | * @param pageMakeDTO 请求参数 |
| | | * @return 预约明细数据 |
| | | */ |
| | | @Override |
| | | public R exportMakeAdmin(PageReserveMakeAdminDTO pageMakeDTO){ |
| | | return R.ok(this.baseMapper.exportMakeAdmin(pageMakeDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | @Override |
| | | public R registerStatisticsAdmin(ComActReserveRegisterStatisticsDTO registerStatisticsDTO){ |
| | | IPage<ComActReserveRegisterStatisticsAdminVO> registerStatisticsList = this.baseMapper.registerStatisticsAdmin(new Page(registerStatisticsDTO.getPageNum() |
| | | ,registerStatisticsDTO.getPageSize()),registerStatisticsDTO); |
| | | registerStatisticsList.getRecords().forEach(registerStatistics -> { |
| | | BigDecimal tag = BigDecimal.ZERO; |
| | | if(registerStatistics.getAllCount() > 0){ |
| | | tag = BigDecimal.valueOf(registerStatistics.getCount()).divide(BigDecimal.valueOf(registerStatistics.getAllCount()),4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)); |
| | | } |
| | | registerStatistics.setTag(tag); |
| | | }); |
| | | return R.ok(registerStatisticsList.getRecords()); |
| | | } |
| | | |
| | | /** |
| | | * 导出登记统计汇总 |
| | | * @param registerStatisticsDTO 请求参数 |
| | | * @return 登记统计汇总 |
| | | */ |
| | | @Override |
| | | public R registerStatisticsExportAdmin(ComActReserveRegisterStatisticsDTO registerStatisticsDTO){ |
| | | List<ComActReserveRegisterStatisticsAdminVO> registerStatisticsList = this.baseMapper.registerStatisticsExportAdmin(registerStatisticsDTO); |
| | | registerStatisticsList.forEach(registerStatistics -> { |
| | | BigDecimal tag = BigDecimal.ZERO; |
| | | if(registerStatistics.getAllCount() > 0){ |
| | | tag = BigDecimal.valueOf(registerStatistics.getCount()).divide(BigDecimal.valueOf(registerStatistics.getAllCount()),4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)); |
| | | } |
| | | registerStatistics.setTag(tag); |
| | | }); |
| | | return R.ok(registerStatisticsList); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询预约处理列表 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | @Override |
| | | public R pageMakeHandleAdmin(PageReserveMakeHandleAdminDTO pageMakeHandleDTO){ |
| | | return R.ok(this.baseMapper.pageMakeHandleAdmin(new Page(pageMakeHandleDTO.getPageNum(),pageMakeHandleDTO.getPageSize()),pageMakeHandleDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 批量处理预约记录 |
| | | * @param makeHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R makeHandleAdmin(MakeHandleAdminDTO makeHandleDTO){ |
| | | if(makeHandleDTO.getIds() == null || makeHandleDTO.getIds().isEmpty()){ |
| | | return R.fail("请勾选预约记录"); |
| | | } |
| | | //判断选中的所有记录是否都是待处理记录 |
| | | if(this.baseMapper.getReserveListCountByIds(makeHandleDTO.getIds()) > 0){ |
| | | return R.fail("您勾选的记录中存在不是待处理状态的记录,请核对后再进行处理"); |
| | | } |
| | | Date nowDate = new Date(); |
| | | Long userId = makeHandleDTO.getUserId(); |
| | | String remark = makeHandleDTO.getRemark(); |
| | | List<ComActReserveRecordDO> updateList = new ArrayList<>(); |
| | | makeHandleDTO.getIds().forEach(id -> { |
| | | ComActReserveRecordDO reserveRecordDO = this.baseMapper.selectById(id); |
| | | if(reserveRecordDO != null){ |
| | | Date reserveTime = DateUtils.stringToDate(makeHandleDTO.getMakeTime(),DateUtils.ymdhms_format); |
| | | //判断处理是否通过 |
| | | if(makeHandleDTO.getIsOk().equals(MakeHandleAdminDTO.isOk.yes)){ |
| | | reserveRecordDO.setStatus(ComActReserveRecordDO.status.cg); |
| | | comActReserveOperationRecordService.addReserveOperationRecord(reserveRecordDO.getReserveId() |
| | | ,id,reserveRecordDO.getUserId(),ComActReserveOperationRecordDO.type.sq,null |
| | | ,"社区管理员处理预约成功",remark,ComActReserveOperationRecordDO.status.cg,userId,reserveTime); |
| | | }else if(makeHandleDTO.getIsOk().equals(MakeHandleAdminDTO.isOk.no)){ |
| | | reserveRecordDO.setStatus(ComActReserveRecordDO.status.sb); |
| | | comActReserveOperationRecordService.addReserveOperationRecord(reserveRecordDO.getReserveId() |
| | | ,id,reserveRecordDO.getUserId(),ComActReserveOperationRecordDO.type.sq,null |
| | | ,"社区管理员处理预约失败",remark,ComActReserveOperationRecordDO.status.sb,userId,null); |
| | | } |
| | | reserveRecordDO.setActRemark(remark); |
| | | reserveRecordDO.setReserveTime(reserveTime); |
| | | reserveRecordDO.setUpdateAt(nowDate); |
| | | reserveRecordDO.setUpdateBy(userId); |
| | | updateList.add(reserveRecordDO); |
| | | } |
| | | }); |
| | | |
| | | if(!updateList.isEmpty()){ |
| | | this.updateBatchById(updateList); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 导出预约处理列表数据查询 |
| | | * @param pageMakeHandleDTO 请求参数 |
| | | * @return 预约处理列表 |
| | | */ |
| | | @Override |
| | | public R exportMakeHandleAdmin(PageReserveMakeHandleAdminDTO pageMakeHandleDTO){ |
| | | return R.ok(this.baseMapper.exportMakeHandleAdmin(pageMakeHandleDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R registerDetailedDetailAdmin(Long reserveRecordId){ |
| | | //查询用户信息 |
| | | ComActReserveRegisterDetailedVO registerDetailedVO = this.baseMapper.getRegisterDetailedByRecordId(reserveRecordId); |
| | | if(registerDetailedVO != null){ |
| | | //组装用户身份信息 |
| | | StringBuilder sb = new StringBuilder(); |
| | | if(registerDetailedVO.getIsPartymember().equals(1)){ |
| | | sb.append("党员/"); |
| | | } |
| | | if(registerDetailedVO.getIsVolunteer().equals(1)){ |
| | | sb.append("志愿者/"); |
| | | } |
| | | if(sb.length() == 0){ |
| | | sb.append("居民/"); |
| | | } |
| | | String identity = sb.toString(); |
| | | registerDetailedVO.setIdentity(identity.substring(0,identity.length()-1)); |
| | | //查询答题数据 |
| | | List<ComActReserveRegisterDetailedAnswerVO> answerList = comActReserveAnswerContentMapper.getRegisterDetailedAnswerList(reserveRecordId); |
| | | registerDetailedVO.setAnswerList(answerList); |
| | | } |
| | | return R.ok(registerDetailedVO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubSelectionVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActReserveMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComActReserveAnswerContentService; |
| | | import com.panzhihua.service_community.service.ComActReserveRecordService; |
| | | import com.panzhihua.service_community.service.ComActReserveService; |
| | | import com.panzhihua.service_community.service.ComActReserveSubSelectionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:33:11 |
| | | * @describe 预约登记表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActReserveServiceImpl extends ServiceImpl<ComActReserveMapper, ComActReserveDO> implements ComActReserveService { |
| | | @Resource |
| | | private ComActReserveMapper comActReserveMapper; |
| | | @Resource |
| | | private ComActReserveSubMapper comActReserveSubMapper; |
| | | @Resource |
| | | private ComActReserveSubSelectionMapper comActReserveSubSelectionMapper; |
| | | @Resource |
| | | private ComActReserveAnswerContentService comActReserveAnswerContentService; |
| | | @Resource |
| | | private ComActReserveRecordMapper comActReserveRecordMapper; |
| | | @Resource |
| | | private ComActReserveOperationRecordMapper comActReserveOperationRecordMapper; |
| | | @Resource |
| | | private ComActReserveSubSelectionService comActReserveSubSelectionService; |
| | | @Resource |
| | | private ComActReserveRecordService comActReserveRecordService; |
| | | |
| | | private final static String COMMIT="用户已提交"; |
| | | @Override |
| | | @Transactional |
| | | public R commit(ComActReserveCommitVO comActReserveCommitVO) { |
| | | if(comActReserveCommitVO!=null){ |
| | | Long userId=comActReserveCommitVO.getUserId(); |
| | | Date nowDate=DateUtil.date(); |
| | | //查询预约登记记录 |
| | | ComActReserveDO comActReserveDO=comActReserveMapper.selectById(comActReserveCommitVO.getId()); |
| | | if(comActReserveDO!=null){ |
| | | //查询当前用户是否已预约并判断是否能继续预约 |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId()).eq("user_id",comActReserveCommitVO.getUserId()).in("status",1,2,3)); |
| | | if(!list.isEmpty()&&list.size()>1&&comActReserveDO.getIsRepeat()==ComActReserveDO.isRepeat.no){ |
| | | return R.fail("提交失败,不可重复预约"); |
| | | } |
| | | else { |
| | | List<QuestnaiteSubVO> questnaiteSubVOS = JSON.parseArray(comActReserveCommitVO.getJsonObject(),QuestnaiteSubVO.class); |
| | | if(!questnaiteSubVOS.isEmpty()){ |
| | | Long questId=comActReserveCommitVO.getId(); |
| | | List<ComActReserveAnswerContentDO> answerContentList=new ArrayList<>(); |
| | | for(QuestnaiteSubVO questnaiteSub:questnaiteSubVOS){ |
| | | //查询用户填写题目 |
| | | ComActReserveSubDO questnaireSubDO = comActReserveSubMapper.selectOne(new QueryWrapper<ComActReserveSubDO>().lambda() |
| | | .eq(ComActReserveSubDO::getReserveId,questId).eq(ComActReserveSubDO::getKey,questnaiteSub.getKey())); |
| | | if(questnaireSubDO == null){ |
| | | log.error("未查询到调查问卷题目,题目名称:" + questnaiteSub.getLabel() + "题目key:" + questnaiteSub.getKey()); |
| | | continue; |
| | | } |
| | | |
| | | Long queSubId = questnaireSubDO.getId(); |
| | | //根据上传的类型查询不同的题目选项 |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.danxuan)){ |
| | | |
| | | //单选题处理 |
| | | ComActReserveSubSelectionDO subSelectionDO = comActReserveSubSelectionMapper.selectOne(new QueryWrapper<ComActReserveSubSelectionDO>() |
| | | .lambda().eq(ComActReserveSubSelectionDO::getReserveSubId,queSubId).eq(ComActReserveSubSelectionDO::getReserveId,questId) |
| | | .eq(ComActReserveSubSelectionDO::getKey,questnaiteSub.getValues())); |
| | | if(subSelectionDO == null){ |
| | | log.error("未查询到调查问卷选项,题目名称:" + questnaiteSub.getLabel() + "选项key:" + questnaiteSub.getValues()); |
| | | continue; |
| | | } |
| | | |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setUserId(userId); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setCreateBy(userId); |
| | | answerContentDO.setReserveSelectionId(subSelectionDO.getId()); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(1); |
| | | answerContentDO.setChoice(subSelectionDO.getOptionName()); |
| | | answerContentDO.setAnswerContent(subSelectionDO.getContent()); |
| | | answerContentList.add(answerContentDO); |
| | | }else if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.duoxuan)){ |
| | | //多选题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | String []value = values.split(","); |
| | | for (int i = 0; i < value.length; i++) { |
| | | ComActReserveSubSelectionDO subSelectionDO = comActReserveSubSelectionMapper.selectOne(new QueryWrapper<ComActReserveSubSelectionDO>() |
| | | .lambda().eq(ComActReserveSubSelectionDO::getReserveSubId,queSubId).eq(ComActReserveSubSelectionDO::getReserveId,questId) |
| | | .eq(ComActReserveSubSelectionDO::getKey,value[i])); |
| | | if(subSelectionDO == null){ |
| | | log.error("未查询到调查问卷选项,题目名称:" + questnaiteSub.getLabel() + "选项key:" + questnaiteSub.getValues()); |
| | | continue; |
| | | } |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setUserId(userId); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setCreateBy(userId); |
| | | answerContentDO.setReserveSelectionId(subSelectionDO.getId()); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(1); |
| | | answerContentDO.setChoice(subSelectionDO.getOptionName()); |
| | | answerContentDO.setAnswerContent(subSelectionDO.getContent()); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | }else{ |
| | | //问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setUserId(userId); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setCreateBy(userId); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(2); |
| | | answerContentDO.setAnswerContent(values); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | } |
| | | if(!answerContentList.isEmpty()){ |
| | | //更新回答用户数量 |
| | | Integer joinCount = comActReserveDO.getJoinCount(); |
| | | comActReserveDO.setJoinCount(joinCount != null ? joinCount + 1 : 1); |
| | | comActReserveMapper.updateById(comActReserveDO); |
| | | //新增用户答题记录 |
| | | ComActReserveRecordDO userAnswerDO = new ComActReserveRecordDO(); |
| | | userAnswerDO.setPhone(comActReserveCommitVO.getPhone()); |
| | | userAnswerDO.setReserveId(questId); |
| | | userAnswerDO.setReserveTime(comActReserveCommitVO.getReserveTime()); |
| | | userAnswerDO.setUserId(userId); |
| | | userAnswerDO.setType(comActReserveCommitVO.getType()); |
| | | userAnswerDO.setCreateAt(nowDate); |
| | | userAnswerDO.setJsonObject(comActReserveCommitVO.getJsonObject()); |
| | | if(comActReserveCommitVO.getType()==ComActReserveRecordDO.type.yy){ |
| | | userAnswerDO.setStatus(ComActReserveRecordDO.status.dcl); |
| | | } |
| | | else { |
| | | userAnswerDO.setStatus(ComActReserveRecordDO.status.cg); |
| | | } |
| | | comActReserveRecordService.saveOrUpdate(userAnswerDO); |
| | | |
| | | //给答题记录赋值预约登记记录id |
| | | answerContentList.forEach(answerContent -> { |
| | | answerContent.setReserveRecordId(userAnswerDO.getId()); |
| | | }); |
| | | comActReserveAnswerContentService.saveBatch(answerContentList); |
| | | //新增用户操作记录 |
| | | ComActReserveOperationRecordDO comActReserveOperationRecordDO=new ComActReserveOperationRecordDO(); |
| | | comActReserveOperationRecordDO.setReserveId(comActReserveCommitVO.getId()); |
| | | comActReserveOperationRecordDO.setReserveRecordId(userAnswerDO.getId()); |
| | | comActReserveOperationRecordDO.setType(ComActReserveOperationRecordDO.type.br); |
| | | comActReserveOperationRecordDO.setCreateAt(DateUtil.date()); |
| | | comActReserveOperationRecordDO.setReserveTime(comActReserveCommitVO.getReserveTime()); |
| | | comActReserveOperationRecordDO.setReserveContent(COMMIT); |
| | | comActReserveOperationRecordDO.setPhone(comActReserveCommitVO.getPhone()); |
| | | comActReserveOperationRecordDO.setStatus(ComActReserveOperationRecordDO.status.ytj); |
| | | comActReserveOperationRecordDO.setUserId(comActReserveCommitVO.getUserId()); |
| | | comActReserveOperationRecordMapper.insert(comActReserveOperationRecordDO); |
| | | return R.ok("提交成功"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | return R.fail("参数错误"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 社区后台-分页查询预约登记列表 |
| | | * @param pageReserveDTO 请求参数 |
| | | * @return 预约登记列表 |
| | | */ |
| | | @Override |
| | | public R pageReserveAdmin(PageReserveAdminDTO pageReserveDTO){ |
| | | IPage<ComActReserveListAdminVO> reservePage = this.baseMapper.pageReserveAdmin(new Page(pageReserveDTO.getPageNum(),pageReserveDTO.getPageSize()),pageReserveDTO); |
| | | reservePage.getRecords().forEach(reserve -> { |
| | | //判断广告位置 |
| | | StringBuilder sb = new StringBuilder(); |
| | | if(reserve.getAdverPositionTop().equals(ComActQuestnaireDO.isOk.yes)){ |
| | | sb.append("首页顶部,"); |
| | | } |
| | | if(reserve.getAdverPositionApplication().equals(ComActQuestnaireDO.isOk.yes)){ |
| | | sb.append("首页应用,"); |
| | | } |
| | | String advertPosition = sb.toString(); |
| | | if(advertPosition.length() > 0){ |
| | | reserve.setAdvertPosition(advertPosition.substring(0,advertPosition.length()-1)); |
| | | }else{ |
| | | reserve.setAdvertPosition("无"); |
| | | } |
| | | }); |
| | | return R.ok(reservePage); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-新增预约登记信息 |
| | | * @param addReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addReserveAdmin(AddReserveAdminDTO addReserveDTO){ |
| | | Date nowDate = new Date(); |
| | | Long userId = addReserveDTO.getUserId(); |
| | | //新增预约登记信息 |
| | | ComActReserveDO reserveDO = new ComActReserveDO(); |
| | | BeanUtils.copyProperties(addReserveDTO,reserveDO); |
| | | reserveDO.setStatus(ComActReserveDO.status.dfb); |
| | | reserveDO.setCreateAt(nowDate); |
| | | reserveDO.setCreateBy(userId); |
| | | |
| | | if(addReserveDTO.getIsPublish().equals(ComActReserveDO.isOk.yes)){ |
| | | reserveDO.setStatus(ComActReserveDO.status.jxz); |
| | | reserveDO.setPublishTime(nowDate); |
| | | } |
| | | this.baseMapper.insert(reserveDO); |
| | | |
| | | //根据上传的json数据录入选项以及题目到数据库 |
| | | if(StringUtils.isEmpty(addReserveDTO.getJsonObject())){ |
| | | return R.fail("组件json数据为空,录入失败"); |
| | | } |
| | | List<QuestnaiteSubVO> reserveSubVOS = JSON.parseArray(addReserveDTO.getJsonObject(),QuestnaiteSubVO.class); |
| | | reserveSubVOS.forEach(reserveSub -> { |
| | | ComActReserveSubDO comActReserveSubDO = new ComActReserveSubDO(); |
| | | comActReserveSubDO.setType(reserveSub.getType()); |
| | | comActReserveSubDO.setContent(reserveSub.getLabel()); |
| | | comActReserveSubDO.setSort(reserveSub.getSort()); |
| | | comActReserveSubDO.setReserveId(reserveDO.getId()); |
| | | comActReserveSubDO.setCreateBy(userId); |
| | | comActReserveSubDO.setCreateAt(nowDate); |
| | | comActReserveSubDO.setKey(reserveSub.getKey()); |
| | | comActReserveSubMapper.insert(comActReserveSubDO); |
| | | |
| | | ArrayList<ComActReserveSubSelectionDO> subSelectionList = Lists.newArrayList(); |
| | | if(reserveSub.getOptions() != null && !reserveSub.getOptions().isEmpty()) { |
| | | List<QuestnaiteSubSelectionVO> subOptions = reserveSub.getOptions(); |
| | | for(int i=0; i<subOptions.size(); i++){ |
| | | QuestnaiteSubSelectionVO subSelect = subOptions.get(i); |
| | | ComActReserveSubSelectionDO subSelectionDO = new ComActReserveSubSelectionDO(); |
| | | subSelectionDO.setReserveSubId(comActReserveSubDO.getId()); |
| | | if(subSelect.getType().equals(1)){ |
| | | //添加选项名称 |
| | | subSelectionDO.setOptionName(subSelect.getOptionName()); |
| | | }else { |
| | | subSelectionDO.setOptionName(String.valueOf(Character.toChars('A' + i))); |
| | | } |
| | | subSelectionDO.setContent(subSelect.getLabel()); |
| | | subSelectionDO.setReserveId(reserveDO.getId()); |
| | | subSelectionDO.setCreateBy(userId); |
| | | subSelectionDO.setCreateAt(nowDate); |
| | | subSelectionDO.setType(subSelect.getType()); |
| | | subSelectionDO.setKey(subSelect.getKey()); |
| | | subSelectionList.add(subSelectionDO); |
| | | } |
| | | } |
| | | comActReserveSubSelectionService.saveBatch(subSelectionList); |
| | | }); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-编辑预约登记信息 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editReserveAdmin(EditReserveAdminDTO editReserveDTO){ |
| | | Date nowDate = new Date(); |
| | | Long userId = editReserveDTO.getUserId(); |
| | | Long reserveId = editReserveDTO.getId(); |
| | | //查询预约登记信息 |
| | | ComActReserveDO reserveDO = this.baseMapper.selectById(reserveId); |
| | | if(reserveDO == null){ |
| | | return R.fail("未查询到预约登记记录"); |
| | | } |
| | | if(!reserveDO.getStatus().equals(ComActReserveDO.status.dfb)){ |
| | | return R.fail("不可修改不是待发布状态的预约登记记录"); |
| | | } |
| | | BeanUtils.copyProperties(editReserveDTO,reserveDO); |
| | | reserveDO.setStatus(ComActReserveDO.status.dfb); |
| | | reserveDO.setUpdateAt(nowDate); |
| | | reserveDO.setUpdateBy(userId); |
| | | if(editReserveDTO.getIsPublish().equals(ComActReserveDO.isOk.yes)){ |
| | | reserveDO.setStatus(ComActReserveDO.status.jxz); |
| | | reserveDO.setPublishTime(nowDate); |
| | | } |
| | | this.baseMapper.updateById(reserveDO); |
| | | |
| | | //根据上传的json数据录入选项以及题目到数据库 |
| | | if(StringUtils.isEmpty(editReserveDTO.getJsonObject())){ |
| | | return R.fail("组件json数据为空,录入失败"); |
| | | } |
| | | |
| | | //清除原来预约登记题目以及题目选项 |
| | | this.baseMapper.deleteReserveSubAll(reserveId); |
| | | //清除原有的,添加更新的 |
| | | List<QuestnaiteSubVO> reserveSubVOS = JSON.parseArray(editReserveDTO.getJsonObject(),QuestnaiteSubVO.class); |
| | | if(reserveSubVOS.isEmpty()){ |
| | | return R.fail("组件json数据为空,录入失败"); |
| | | } |
| | | reserveSubVOS.forEach(reserveSub -> { |
| | | ComActReserveSubDO comActReserveSubDO = new ComActReserveSubDO(); |
| | | comActReserveSubDO.setType(reserveSub.getType()); |
| | | comActReserveSubDO.setContent(reserveSub.getLabel()); |
| | | comActReserveSubDO.setSort(reserveSub.getSort()); |
| | | comActReserveSubDO.setReserveId(reserveDO.getId()); |
| | | comActReserveSubDO.setCreateBy(userId); |
| | | comActReserveSubDO.setCreateAt(nowDate); |
| | | comActReserveSubDO.setKey(reserveSub.getKey()); |
| | | comActReserveSubMapper.insert(comActReserveSubDO); |
| | | |
| | | ArrayList<ComActReserveSubSelectionDO> subSelectionList = Lists.newArrayList(); |
| | | if(reserveSub.getOptions() != null && !reserveSub.getOptions().isEmpty()) { |
| | | List<QuestnaiteSubSelectionVO> subOptions = reserveSub.getOptions(); |
| | | for(int i=0; i<subOptions.size(); i++){ |
| | | QuestnaiteSubSelectionVO subSelect = subOptions.get(i); |
| | | ComActReserveSubSelectionDO subSelectionDO = new ComActReserveSubSelectionDO(); |
| | | subSelectionDO.setReserveSubId(comActReserveSubDO.getId()); |
| | | if(subSelect.getType().equals(1)){ |
| | | //添加选项名称 |
| | | subSelectionDO.setOptionName(subSelect.getOptionName()); |
| | | }else { |
| | | subSelectionDO.setOptionName(String.valueOf(Character.toChars('A' + i))); |
| | | } |
| | | subSelectionDO.setContent(subSelect.getLabel()); |
| | | subSelectionDO.setReserveId(reserveDO.getId()); |
| | | subSelectionDO.setCreateBy(userId); |
| | | subSelectionDO.setCreateAt(nowDate); |
| | | subSelectionDO.setType(subSelect.getType()); |
| | | subSelectionDO.setKey(subSelect.getKey()); |
| | | subSelectionList.add(subSelectionDO); |
| | | } |
| | | } |
| | | comActReserveSubSelectionService.saveBatch(subSelectionList); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-修改预约登记状态 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | | public R editReserveStatusAdmin(EditComActReserveStatusDTO editReserveDTO){ |
| | | Date nowDate = new Date(); |
| | | Long userId = editReserveDTO.getUserId(); |
| | | Long reserveId = editReserveDTO.getId(); |
| | | //查询预约登记信息 |
| | | ComActReserveDO reserveDO = this.baseMapper.selectById(reserveId); |
| | | if(reserveDO == null){ |
| | | return R.fail("未查询到预约登记记录"); |
| | | } |
| | | |
| | | if(editReserveDTO.getType().equals(EditComActReserveStatusDTO.type.tz)){ |
| | | reserveDO.setStatus(ComActReserveDO.status.ytz); |
| | | reserveDO.setEndTime(nowDate); |
| | | }else if(editReserveDTO.getType().equals(EditComActReserveStatusDTO.type.fb)){ |
| | | reserveDO.setStatus(ComActReserveDO.status.jxz); |
| | | reserveDO.setPublishTime(nowDate); |
| | | } |
| | | reserveDO.setUpdateBy(userId); |
| | | reserveDO.setUpdateAt(nowDate); |
| | | if(this.baseMapper.updateById(reserveDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-继续预约登记 |
| | | * @param editReserveDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | | public R editReserveInfoAdmin(EditComActReserveInfoDTO editReserveDTO){ |
| | | Date nowDate = new Date(); |
| | | Long userId = editReserveDTO.getUserId(); |
| | | Long reserveId = editReserveDTO.getId(); |
| | | //查询预约登记信息 |
| | | ComActReserveDO reserveDO = this.baseMapper.selectById(reserveId); |
| | | if(reserveDO == null){ |
| | | return R.fail("未查询到预约登记记录"); |
| | | } |
| | | BeanUtils.copyProperties(editReserveDTO,reserveDO); |
| | | reserveDO.setStatus(ComActReserveDO.status.jxz); |
| | | reserveDO.setUpdateAt(nowDate); |
| | | reserveDO.setUpdateBy(userId); |
| | | reserveDO.setEndTime(null); |
| | | if(this.baseMapper.updateById(reserveDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-根据预约登记id查询详情 |
| | | * @param reserveId 预约登记id |
| | | * @return 预约登记详情 |
| | | */ |
| | | @Override |
| | | public R detailReserveAdmin(Long reserveId){ |
| | | ComActReserveDetailAdminVO reserveDetailAdminVO = new ComActReserveDetailAdminVO(); |
| | | //查询预约登记信息 |
| | | ComActReserveDO reserveDO = this.baseMapper.selectById(reserveId); |
| | | BeanUtils.copyProperties(reserveDO,reserveDetailAdminVO); |
| | | return R.ok(reserveDetailAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-根据社区id统计预约类数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | @Override |
| | | public R makeStatisticsAdmin(ComActReserveMakeStatisticsDTO makeStatisticsDTO){ |
| | | Long communityId = makeStatisticsDTO.getCommunityId(); |
| | | ComActReserveMakeStatisticsAdminVO makeStatisticsAdminVO = new ComActReserveMakeStatisticsAdminVO(); |
| | | //查询预约登记统计汇总左边数据 |
| | | List<ComActReserveMakeLeftStatisticsAdminVO> leftStatisticsList = this.baseMapper.getReserveMakeLeftStatistics(communityId); |
| | | if(!leftStatisticsList.isEmpty()){ |
| | | makeStatisticsAdminVO.setLeftStatisticsList(leftStatisticsList); |
| | | } |
| | | |
| | | //查询预约登记统计汇总右边数据 |
| | | List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList = getRightStatisticsList(makeStatisticsDTO); |
| | | if(!rightStatisticsList.isEmpty()){ |
| | | makeStatisticsAdminVO.setRightStatisticsList(rightStatisticsList); |
| | | } |
| | | return R.ok(makeStatisticsAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询预约统计汇总右边数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 预约统计汇总右边数据 |
| | | */ |
| | | private List<ComActReserveMakeRightStatisticsAdminVO> getRightStatisticsList(ComActReserveMakeStatisticsDTO makeStatisticsDTO){ |
| | | Long communityId = makeStatisticsDTO.getCommunityId(); |
| | | //查询预约登记统计汇总右边数据 |
| | | List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList = this.baseMapper.getReserveMakeRightStatistics(makeStatisticsDTO); |
| | | if(!rightStatisticsList.isEmpty()){ |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | String date = rightStatistics.getReserveTime(); |
| | | Integer count = this.baseMapper.getReserveRecordCount(communityId,date + " 00:00:00",date + " 23:59:59"); |
| | | rightStatistics.setAllCount(count); |
| | | |
| | | //计算百分比 |
| | | BigDecimal tag = BigDecimal.ZERO; |
| | | if(count >= 0){ |
| | | tag = BigDecimal.valueOf(rightStatistics.getCount()).divide(BigDecimal.valueOf(count),2, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)); |
| | | } |
| | | rightStatistics.setTag(tag); |
| | | }); |
| | | } |
| | | return rightStatisticsList; |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-查询导出预约统计汇总数据 |
| | | * @param makeStatisticsDTO 请求参数 |
| | | * @return 统计预约类数据 |
| | | */ |
| | | @Override |
| | | public R makeStatisticsExportAdmin(ComActReserveMakeStatisticsDTO makeStatisticsDTO){ |
| | | return R.ok(getRightStatisticsList(makeStatisticsDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 删除预约登记信息 |
| | | * @param reserveId 预约登记id |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteReserveAdmin(Long reserveId){ |
| | | //查询预约登记信息 |
| | | ComActReserveDO reserveDO = this.baseMapper.selectById(reserveId); |
| | | if(reserveDO == null){ |
| | | return R.fail("未查询到预约登记信息"); |
| | | } |
| | | reserveDO.setIsDel(ComActReserveDO.isOk.yes); |
| | | reserveDO.setUpdateAt(new Date()); |
| | | |
| | | if(this.baseMapper.updateById(reserveDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询社区所有预约信息列表 |
| | | * @param communityId 社区id |
| | | * @return 预约信息列表 |
| | | */ |
| | | @Override |
| | | public R listReserveAdmin(Long communityId){ |
| | | return R.ok(this.baseMapper.listReserveAdmin(communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public R getById(Long id,Long userId,Long recordId) { |
| | | ComActReserveDO comActReserveDO=comActReserveMapper.selectById(id); |
| | | if(comActReserveDO!=null){ |
| | | ComActReserveDetailVO comActReserveDetailVO=new ComActReserveDetailVO(); |
| | | BeanUtils.copyProperties(comActReserveDO,comActReserveDetailVO); |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).in("status",1,2).orderByDesc("reserve_time")); |
| | | List<ComActReserveRecordDO> secondlist=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).orderByDesc("reserve_time")); |
| | | //判断当前数据是否可重复提交 |
| | | if(comActReserveDO.getIsRepeat()==ComActReserveDetailVO.isOk.y||list.isEmpty()){ |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.n); |
| | | }else { |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.y); |
| | | } |
| | | //如果用户已提交返回最新一条记录 列表时间倒序排列 |
| | | if(!list.isEmpty()){ |
| | | comActReserveDetailVO.setJsonObject(list.get(0).getJsonObject()); |
| | | comActReserveDetailVO.setReserveTime(list.get(0).getReserveTime()); |
| | | } |
| | | if(!secondlist.isEmpty()&&recordId!=null){ |
| | | secondlist.forEach(comActReserveRecordDO -> { |
| | | if(comActReserveRecordDO.getId().equals(recordId)){ |
| | | comActReserveDetailVO.setRecordStatus(comActReserveRecordDO.getStatus()); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(comActReserveDetailVO); |
| | | } |
| | | return R.fail("未查询到数据"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R pageReserveList(PageUserReserveDTO pageUserReserveDTO) { |
| | | return R.ok(comActReserveRecordMapper.pageReserveList(new Page<ComActReserveDO>(pageUserReserveDTO.getPageNum(), pageUserReserveDTO.getPageSize()),pageUserReserveDTO)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubSelectionMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubSelectionDO; |
| | | import com.panzhihua.service_community.service.ComActReserveSubSelectionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:13 |
| | | * @describe 预约登记题目选项 服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActReserveSubSelectionServiceImpl extends ServiceImpl<ComActReserveSubSelectionMapper, ComActReserveSubSelectionDO> implements ComActReserveSubSelectionService { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubDO; |
| | | import com.panzhihua.service_community.service.ComActReserveSubService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-23 10:34:03 |
| | | * @describe 预约登记题目选项服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActReserveSubServiceImpl extends ServiceImpl<ComActReserveSubMapper, ComActReserveSubDO> implements ComActReserveSubService { |
| | | |
| | | /** |
| | | * 查询预约登记题目列表 |
| | | * @param reserveId 预约登记id |
| | | * @return 约登记题目列表 |
| | | */ |
| | | @Override |
| | | public R subjectListAdmin(Long reserveId){ |
| | | List<ComActReserveSubListVO> resultList = new ArrayList<>(100); |
| | | resultList.add(new ComActReserveSubListVO("nub","序号")); |
| | | resultList.add(new ComActReserveSubListVO("nickName","用户昵称")); |
| | | List<ComActReserveSubListVO> list = this.baseMapper.getReserveSubjectList(reserveId); |
| | | if(list != null && !list.isEmpty()){ |
| | | resultList.addAll(list); |
| | | } |
| | | resultList.add(new ComActReserveSubListVO("id","登记流水")); |
| | | resultList.add(new ComActReserveSubListVO("time","登记时间")); |
| | | return R.ok(resultList); |
| | | } |
| | | |
| | | } |
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.ComActReserveAnswerContentMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="reserve_sub_id" property="reserveSubId"/> |
| | | <result column="reserve_selection_id" property="reserveSelectionId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="choice" property="choice"/> |
| | | <result column="answer_content" property="answerContent"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="update_at" property="updateAt"/> |
| | | <result column="reserve_record_id" property="reserveRecordId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, reserve_sub_id, reserve_selection_id, user_id, type, choice, answer_content, create_by, create_at, update_by, update_at, reserve_record_id |
| | | </sql> |
| | | |
| | | <select id="selectListByReserve" resultType="com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO"> |
| | | SELECT |
| | | ac.* |
| | | FROM |
| | | com_act_reserve_answer_content ac |
| | | LEFT JOIN com_act_reserve_sub qs ON ac.reserve_sub_id = qs.id |
| | | LEFT JOIN com_act_reserve qn ON qs.reserve_id = qn.id |
| | | WHERE |
| | | qn.id = #{reserveId} |
| | | ORDER BY |
| | | ac.user_id, |
| | | qs.id |
| | | </select> |
| | | |
| | | <select id="pageRegisterDetailedListAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.create_at |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | WHERE |
| | | reserve_id = #{detailedAdminDTO.reserveId} |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND carr.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND carr.create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO"> |
| | | SELECT |
| | | car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId |
| | | FROM |
| | | com_act_reserve_answer_content AS carac |
| | | LEFT JOIN com_act_reserve_sub AS car ON car.reserve_id = carac.reserve_record_id |
| | | where carac.reserve_record_id = #{reserveRecordId} order by carac.id asc |
| | | </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.ComActReserveMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActReserveDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="community_id" property="communityId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="title" property="title"/> |
| | | <result column="view_num" property="viewNum"/> |
| | | <result column="join_all_count" property="joinAllCount"/> |
| | | <result column="join_count" property="joinCount"/> |
| | | <result column="img_type" property="imgType"/> |
| | | <result column="img_url" property="imgUrl"/> |
| | | <result column="status" property="status"/> |
| | | <result column="publish_time" property="publishTime"/> |
| | | <result column="is_repeat" property="isRepeat"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="json_object" property="jsonObject"/> |
| | | <result column="adver_position_top" property="adverPositionTop"/> |
| | | <result column="adver_position_application" property="adverPositionApplication"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_at" property="updateAt"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="end_time" property="endTime"/> |
| | | <result column="is_del" property="isDel"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, community_id, type, title, view_num, join_all_count, join_count, img_type, img_url, status, publish_time, is_repeat, remark, json_object, adver_position_top, adver_position_application, create_at, create_by, update_at, update_by, end_time, is_del |
| | | </sql> |
| | | |
| | | <select id="indexBanner" resultType="com.panzhihua.common.model.vos.community.ComActReserveIndexVo"> |
| | | select id,title,type,img_type, img_url,adver_position_top, adver_position_application from com_act_reserve |
| | | where |
| | | status = 2 and adver_position_top = 1 |
| | | <if test="communityId !=null"> |
| | | and community_id =#{communityId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="indexApplication" resultType="com.panzhihua.common.model.vos.community.ComActReserveIndexVo"> |
| | | select id,title,type,img_type, img_url,adver_position_top, adver_position_application from com_act_reserve |
| | | <where> |
| | | status = 2 and adver_position_application = 1 |
| | | <if test="communityId !=null"> |
| | | and community_id =#{communityId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="pageReserveAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO"> |
| | | SELECT |
| | | id, |
| | | community_id, |
| | | `type`, |
| | | title, |
| | | view_num, |
| | | join_all_count, |
| | | join_count, |
| | | `status`, |
| | | publish_time, |
| | | create_at, |
| | | end_time, |
| | | adver_position_top, |
| | | adver_position_application |
| | | FROM |
| | | com_act_reserve |
| | | <where> |
| | | and is_del = 2 |
| | | <if test="pageReserveDTO.communityId != null"> |
| | | and community_id = #{pageReserveDTO.communityId} |
| | | </if> |
| | | <if test="pageReserveDTO.type != null and pageReserveDTO.type.size > 0"> |
| | | and `type` in |
| | | <foreach collection='pageReserveDTO.type' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="pageReserveDTO.status != null"> |
| | | and status = #{pageReserveDTO.status} |
| | | </if> |
| | | <if test="pageReserveDTO.advertType != null and pageReserveDTO.advertType == 1"> |
| | | and adver_position_top = 2 and adver_position_application = 2 |
| | | </if> |
| | | <if test="pageReserveDTO.advertType != null and pageReserveDTO.advertType == 2"> |
| | | and adver_position_top = 1 |
| | | </if> |
| | | <if test="pageReserveDTO.advertType != null and pageReserveDTO.advertType == 3"> |
| | | and adver_position_application = 1 |
| | | </if> |
| | | <if test="pageReserveDTO.keyWord != null and pageReserveDTO.keyWord != """> |
| | | and title like concat (#{pageReserveDTO.keyWord},'%') |
| | | </if> |
| | | <if test="pageReserveDTO.startTime != null and pageReserveDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{pageReserveDTO.startTime} |
| | | </if> |
| | | <if test="pageReserveDTO.endTime != null and pageReserveDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{pageReserveDTO.endTime} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <delete id="deleteReserveSubAll"> |
| | | delete from com_act_reserve_sub where reserve_id = #{reserveId}; |
| | | delete from com_act_reserve_sub_selection where reserve_id = #{reserveId}; |
| | | </delete> |
| | | |
| | | <select id="getReserveMakeLeftStatistics" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeLeftStatisticsAdminVO"> |
| | | SELECT |
| | | date_format( reserve_time, '%Y-%m-%d' ) AS reserveTime, |
| | | count( id ) AS count |
| | | FROM |
| | | com_act_reserve_record |
| | | WHERE |
| | | `status` = 2 |
| | | AND type = 1 |
| | | AND community_id = #{communityId} |
| | | |
| | | group by reserveTime |
| | | </select> |
| | | |
| | | <select id="getReserveMakeRightStatistics" parameterType="com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO"> |
| | | SELECT |
| | | date_format( carr.reserve_time, '%Y-%m-%d' ) AS reserveTime, |
| | | car.title AS title, |
| | | count( carr.id ) AS count |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id |
| | | WHERE |
| | | carr.`status` = 2 |
| | | AND carr.type = 1 |
| | | AND carr.community_id = #{makeStatisticsDTO.communityId} |
| | | <if test="makeStatisticsDTO.startTime != null and makeStatisticsDTO.startTime != """> |
| | | AND carr.reserve_time <![CDATA[ >= ]]> #{makeStatisticsDTO.startTime} |
| | | </if> |
| | | <if test="makeStatisticsDTO.endTime != null and makeStatisticsDTO.endTime != """> |
| | | AND carr.reserve_time <![CDATA[ <= ]]> #{makeStatisticsDTO.endTime} |
| | | </if> |
| | | GROUP BY |
| | | reserveTime, |
| | | car.id |
| | | </select> |
| | | |
| | | <select id="getReserveRecordCount" resultType="integer"> |
| | | select count(id) from com_act_reserve_record |
| | | where `status` = 2 and `type` = 1 and community_id = #{communityId} |
| | | and reserve_time <![CDATA[ >= ]]> #{startTime} |
| | | and reserve_time <![CDATA[ <= ]]> #{endTime} |
| | | </select> |
| | | |
| | | <select id="listReserveAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO"> |
| | | SELECT |
| | | id, |
| | | community_id, |
| | | `type`, |
| | | title, |
| | | view_num, |
| | | join_all_count, |
| | | join_count, |
| | | `status`, |
| | | publish_time, |
| | | create_at, |
| | | end_time, |
| | | adver_position_top, |
| | | adver_position_application |
| | | FROM |
| | | com_act_reserve |
| | | where is_del = 2 and `type` = 1 and community_id = #{communityId} |
| | | </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.ComActReserveOperationRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActReserveOperationRecordDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="reserve_id" property="reserveId"/> |
| | | <result column="reserve_record_id" property="reserveRecordId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="reserve_time" property="reserveTime"/> |
| | | <result column="reserve_content" property="reserveContent"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="status" property="status"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="create_by" property="createBy"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, reserve_id, reserve_record_id, user_id, type, phone, reserve_time, reserve_content, remark, status, create_at, create_by |
| | | </sql> |
| | | |
| | | |
| | | <select id="getMakeOperationList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeOperationAdminVO"> |
| | | SELECT |
| | | caror.reserve_id, |
| | | caror.reserve_record_id, |
| | | caror.create_at, |
| | | caror.type, |
| | | caror.`status`, |
| | | caror.reserve_time, |
| | | caror.reserve_content, |
| | | su.`name`, |
| | | su.phone, |
| | | caror.remark, |
| | | su1.`name` as createByName |
| | | FROM |
| | | com_act_reserve_operation_record AS caror |
| | | left join sys_user as su on su.user_id = caror.user_id |
| | | left join sys_user as su1 on su1.user_id = caror.create_by |
| | | where caror.reserve_record_id = #{reserveRecordId} |
| | | order by caror.create_at desc |
| | | </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.ComActReserveRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActReserveRecordDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="reserve_id" property="reserveId"/> |
| | | <result column="community_id" property="communityId"/> |
| | | <result column="type" property="type"/> |
| | | <result column="name" property="name"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="status" property="status"/> |
| | | <result column="content" property="content"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="act_remark" property="actRemark"/> |
| | | <result column="reserve_time" property="reserveTime"/> |
| | | <result column="json_object" property="jsonObject"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_at" property="updateAt"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, reserve_id, community_id, type, name, phone, status, content, remark, act_remark, reserve_time, json_object, create_at, create_by, update_at, update_by |
| | | </sql> |
| | | |
| | | <select id="pageReserveList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRecordListVO"> |
| | | select t.*,t1.title from com_act_reserve_record t left join com_act_reserve t1 on t.reserve_id = t1.id |
| | | <where> |
| | | 1=1 |
| | | <if test="pageUserReserveDTO.type !=null"> |
| | | and t.type =#{pageUserReserveDTO.type} |
| | | </if> |
| | | <if test="pageUserReserveDTO.status !=null"> |
| | | and t.status =#{pageUserReserveDTO.status} |
| | | </if> |
| | | <if test="pageUserReserveDTO.userId !=null"> |
| | | and t.user_id =#{pageUserReserveDTO.userId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="pageMakeAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeListAdminVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.`name`, |
| | | carr.phone, |
| | | carr.reserve_time, |
| | | carr.`content`, |
| | | carr.remark, |
| | | carr.act_remark, |
| | | carr.create_at |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | where carr.status = 2 and carr.`type` = 1 and carr.reserve_id = #{pageMakeDTO.reserveId} |
| | | <if test="pageMakeDTO.startTime != null and pageMakeDTO.startTime != """> |
| | | AND carr.reserve_time <![CDATA[ >= ]]> #{pageMakeDTO.startTime} |
| | | </if> |
| | | <if test="pageMakeDTO.endTime != null and pageMakeDTO.endTime != """> |
| | | AND carr.reserve_time <![CDATA[ <= ]]> #{pageMakeDTO.endTime} |
| | | </if> |
| | | order by carr.create_at desc |
| | | </select> |
| | | |
| | | <select id="getMakeDetailAdmin" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeDetailAdminVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.`name`, |
| | | carr.phone, |
| | | carr.reserve_time, |
| | | carr.`content`, |
| | | carr.remark, |
| | | carr.act_remark, |
| | | carr.create_at |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | where carr.id = #{reserveRecordId} |
| | | </select> |
| | | |
| | | <select id="getReserveStatusById" resultType="integer"> |
| | | select count(id) from com_act_reserve_record where `status` != 2 and id in |
| | | <foreach collection='ids' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <update id="editReserveStatusById"> |
| | | update com_act_reserve_record set `status` = 4 where id in |
| | | <foreach collection='ids' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <select id="exportMakeAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeListAdminVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.`name`, |
| | | carr.phone, |
| | | carr.reserve_time, |
| | | carr.`content`, |
| | | carr.remark, |
| | | carr.act_remark, |
| | | carr.create_at |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | where carr.status = 2 and carr.`type` = 1 and carr.reserve_id = #{pageMakeDTO.reserveId} |
| | | <if test="pageMakeDTO.startTime != null and pageMakeDTO.startTime != """> |
| | | AND carr.reserve_time <![CDATA[ >= ]]> #{pageMakeDTO.startTime} |
| | | </if> |
| | | <if test="pageMakeDTO.endTime != null and pageMakeDTO.endTime != """> |
| | | AND carr.reserve_time <![CDATA[ <= ]]> #{pageMakeDTO.endTime} |
| | | </if> |
| | | <if test="pageMakeDTO.ids != null and pageMakeDTO.ids.size > 0"> |
| | | AND carr.id in |
| | | <foreach collection='pageMakeDTO.ids' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | order by carr.create_at desc |
| | | </select> |
| | | |
| | | <select id="registerStatisticsAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterStatisticsAdminVO"> |
| | | SELECT |
| | | car.title, |
| | | count( carr.id ) AS count, |
| | | ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id |
| | | WHERE |
| | | carr.type = 2 |
| | | AND carr.community_id = #{registerStatisticsDTO.communityId} |
| | | AND carr.`status` = 2 |
| | | <if test="registerStatisticsDTO.startTime != null and registerStatisticsDTO.startTime != """> |
| | | AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{registerStatisticsDTO.startTime} |
| | | </if> |
| | | <if test="registerStatisticsDTO.endTime != null and registerStatisticsDTO.endTime != """> |
| | | AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{registerStatisticsDTO.endTime} |
| | | </if> |
| | | GROUP BY |
| | | car.id |
| | | </select> |
| | | |
| | | <select id="registerStatisticsExportAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterStatisticsAdminVO"> |
| | | SELECT |
| | | car.title, |
| | | count( carr.id ) AS count, |
| | | ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id |
| | | WHERE |
| | | carr.type = 2 |
| | | AND carr.community_id = #{registerStatisticsDTO.communityId} |
| | | AND carr.`status` = 2 |
| | | <if test="registerStatisticsDTO.startTime != null and registerStatisticsDTO.startTime != """> |
| | | AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{registerStatisticsDTO.startTime} |
| | | </if> |
| | | <if test="registerStatisticsDTO.endTime != null and registerStatisticsDTO.endTime != """> |
| | | AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{registerStatisticsDTO.endTime} |
| | | </if> |
| | | GROUP BY |
| | | car.id |
| | | </select> |
| | | |
| | | <select id="pageMakeHandleAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeHandleListAdminVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.`name`, |
| | | carr.phone, |
| | | carr.reserve_time, |
| | | carr.`content`, |
| | | carr.remark, |
| | | carr.act_remark, |
| | | carr.`status`, |
| | | car.`title`, |
| | | carr.create_at |
| | | 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 AS car ON car.id = carr.reserve_id |
| | | WHERE |
| | | carr.`type` = 1 |
| | | <if test="pageMakeHandleDTO.keyWord != null and pageMakeHandleDTO.keyWord != """> |
| | | and (car.`title` like concat (#{pageMakeHandleDTO.keyWord},'%') |
| | | or carr.`name` like concat (#{pageMakeHandleDTO.keyWord},'%') |
| | | or su.nick_name like concat (#{pageMakeHandleDTO.keyWord},'%')) |
| | | </if> |
| | | <if test="pageMakeHandleDTO.status != null and pageMakeHandleDTO.status.size > 0"> |
| | | and carr.`status` in |
| | | <foreach collection='pageMakeHandleDTO.status' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="pageMakeHandleDTO.reserveId != null "> |
| | | and carr.reserve_id = #{pageMakeHandleDTO.reserveId} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.communityId != null "> |
| | | and carr.community_id = #{pageMakeHandleDTO.communityId} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.startTime != null and pageMakeHandleDTO.startTime != """> |
| | | AND DATE_FORMAT(carr.reserve_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{pageMakeHandleDTO.startTime} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.endTime != null and pageMakeHandleDTO.endTime != """> |
| | | AND DATE_FORMAT(carr.reserve_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{pageMakeHandleDTO.endTime} |
| | | </if> |
| | | order by carr.create_at desc |
| | | </select> |
| | | |
| | | <select id="getReserveListCountByIds" resultType="integer"> |
| | | select count(id) from com_act_reserve_record where `status` != 1 and `type` = 1 and id in |
| | | <foreach collection='ids' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="exportMakeHandleAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeHandleListAdminVO"> |
| | | SELECT |
| | | carr.id, |
| | | su.nick_name, |
| | | carr.`name`, |
| | | carr.phone, |
| | | carr.reserve_time, |
| | | carr.`content`, |
| | | carr.remark, |
| | | carr.act_remark, |
| | | carr.`status`, |
| | | car.`title`, |
| | | carr.create_at |
| | | 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 AS car ON car.id = carr.reserve_id |
| | | WHERE |
| | | carr.`type` = 1 |
| | | <if test="pageMakeHandleDTO.keyWord != null and pageMakeHandleDTO.keyWord != """> |
| | | and (car.`title` like concat (#{pageMakeHandleDTO.keyWord},'%') |
| | | or carr.`name` like concat (#{pageMakeHandleDTO.keyWord},'%') |
| | | or su.nick_name like concat (#{pageMakeHandleDTO.keyWord},'%')) |
| | | </if> |
| | | <if test="pageMakeHandleDTO.status != null and pageMakeHandleDTO.status.size > 0"> |
| | | and carr.`status` in |
| | | <foreach collection='pageMakeHandleDTO.status' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="pageMakeHandleDTO.reserveId != null "> |
| | | and carr.reserve_id = #{pageMakeHandleDTO.reserveId} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.communityId != null "> |
| | | and carr.community_id = #{pageMakeHandleDTO.communityId} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.startTime != null and pageMakeHandleDTO.startTime != """> |
| | | AND DATE_FORMAT(carr.reserve_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{pageMakeHandleDTO.startTime} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.endTime != null and pageMakeHandleDTO.endTime != """> |
| | | AND DATE_FORMAT(carr.reserve_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{pageMakeHandleDTO.endTime} |
| | | </if> |
| | | <if test="pageMakeHandleDTO.ids != null and pageMakeHandleDTO.ids.size > 0"> |
| | | and carr.id in |
| | | <foreach collection='pageMakeHandleDTO.ids' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | order by carr.create_at desc |
| | | </select> |
| | | |
| | | <select id="getRegisterDetailedByRecordId" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO"> |
| | | SELECT |
| | | carr.create_at, |
| | | carr.id, |
| | | su.nick_name, |
| | | su.is_partymember, |
| | | su.is_volunteer |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | where carr.id = #{reserveRecordId} |
| | | </select> |
| | | |
| | | <select id="queryAll" resultType="com.panzhihua.common.model.vos.community.reserve.ComOperationListVO" parameterType="com.panzhihua.common.model.dtos.community.OperationDetailDTO"> |
| | | select * from com_act_reserve_operation_record |
| | | <where> |
| | | <if test="reserveRecordId!=null"> |
| | | and reserve_record_id =#{reserveRecordId} |
| | | </if> |
| | | <if test="userId!=null"> |
| | | and user_id =#{userId} |
| | | </if> |
| | | <if test="type!=null"> |
| | | and type =#{type} |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </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.ComActReserveSubMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActReserveSubDO"> |
| | | <id column="id" property="id"/> |
| | | <result column="reserve_id" property="reserveId"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="type" property="type"/> |
| | | <result column="key" property="key"/> |
| | | <result column="content" property="content"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_at" property="createAt"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="update_at" property="updateAt"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, reserve_id, sort, type, key, content, create_by, create_at, update_by, update_at |
| | | </sql> |
| | | |
| | | <select id="getReserveSubjectList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO"> |
| | | select id,content from com_act_reserve_sub where reserve_id = #{reserveId} order by id asc |
| | | </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.ComActReserveSubSelectionMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActReserveSubSelectionDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="reserve_id" property="reserveId" /> |
| | | <result column="reserve_sub_id" property="reserveSubId" /> |
| | | <result column="key" property="key" /> |
| | | <result column="type" property="type" /> |
| | | <result column="sort" property="sort" /> |
| | | <result column="option_name" property="optionName" /> |
| | | <result column="content" property="content" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, reserve_id, reserve_sub_id, key, type, sort, option_name, content, create_at, create_by, update_at, update_by |
| | | </sql> |
| | | |
| | | </mapper> |