Merge remote-tracking branch 'origin/test' into test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventVisitingTasksDO.java
# springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventVisitingTasksServiceImpl.java
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.user.NoticeUnReadVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserAgreementVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | |
| | | return communityService.addEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询随手拍是否有活动",response = ComActEasyPhotoActivityVO.class) |
| | | @PostMapping("getEasyPhotoActivity") |
| | | public R getEasyPhotoActivity (){ |
| | | Long communityId = this.getCommunityId(); |
| | | return communityService.getEasyPhotoActivity(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情",response =ComActEasyPhotoVO.class ) |
| | | @GetMapping("detaileasyphoto") |
| | | @ApiImplicitParam(name = "id",value = "随手拍主键") |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeVO; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping("/wallet/") |
| | | @Api(tags = {"钱包模块"}) |
| | | public class WalletApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "查询我的钱包", response = ComActWalletVO.class) |
| | | @PostMapping("/get/my") |
| | | public R getWallet() { |
| | | ComActWalletDetailDTO walletDetailDTO = new ComActWalletDetailDTO(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | walletDetailDTO.setUserId(loginUserInfo.getUserId()); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | walletDetailDTO.setCommunityId(communityId); |
| | | return communityService.getUserWalletDetail(walletDetailDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询我的收支记录", response = ComActWalletTradeVO.class) |
| | | @PostMapping("/get/trade") |
| | | public R getWalletTrade(@RequestBody PageComActWalletTradeDTO walletTradeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | walletTradeDTO.setUserId(loginUserInfo.getUserId()); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | walletTradeDTO.setCommunityId(communityId); |
| | | return communityService.getUserWalletTrade(walletTradeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询收益排行榜", response = ComActWalletRankingVO.class) |
| | | @PostMapping("/get/ranking") |
| | | public R getWalletRanking(@RequestBody PageComActWalletTradeDTO walletTradeDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | walletTradeDTO.setCommunityId(communityId); |
| | | return communityService.getWalletRanking(walletTradeDTO); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "用户协议",response = SysUserAgreementVO.class) |
| | | @GetMapping("listagreement") |
| | | public R listAgreement(){ |
| | | return userService.listAgreement(); |
| | | return userService.listAgreement(0L); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑用户协议") |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.wallet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("钱包详情返回参数") |
| | | public class ComActWalletDetailDTO { |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.wallet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("钱包详情返回参数") |
| | | public class PageComActWalletTradeDTO { |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @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.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("随手拍活动返回参数") |
| | | public class ComActEasyPhotoActivityVO { |
| | | |
| | | @ApiModelProperty("活动id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("活动状态(1.待开始 2.进行中 3.已结束 4.已取消)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("活动简介") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date activityStartAt; |
| | | |
| | | @ApiModelProperty("活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date activityEndAt; |
| | | |
| | | @ApiModelProperty("优质奖励金额") |
| | | private BigDecimal goodReward; |
| | | |
| | | @ApiModelProperty("精良奖励金额") |
| | | private BigDecimal excellentReward; |
| | | |
| | | @ApiModelProperty("普通奖励金额") |
| | | private BigDecimal ordinaryReward; |
| | | |
| | | @ApiModelProperty("活动图片") |
| | | private String logo; |
| | | } |
| | |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "发生地址经纬度信息,逗号分割(长的在前面,短的在后面)") |
| | | private String lngLat; |
| | | |
| | | @ApiModelProperty(value = "随手拍标签(1.优质 2.精良 3.普通)") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty(value = "参加活动奖励金额") |
| | | private BigDecimal activityAmount; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.wallet; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel("用户收益排行榜返回参数") |
| | | public class ComActWalletRankingVO { |
| | | |
| | | @ApiModelProperty("钱包id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("收益总金额") |
| | | private BigDecimal incomeAmount; |
| | | |
| | | @ApiModelProperty("累计随手拍奖励数量") |
| | | private BigDecimal easyCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.wallet; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("用户钱包收支记录返回参数") |
| | | public class ComActWalletTradeVO { |
| | | |
| | | @ApiModelProperty("记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("交易金额") |
| | | private BigDecimal amount; |
| | | |
| | | @ApiModelProperty("交易类型(1.发布随手拍 2.收益结算)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("变动类型(1.增加 2.减少)") |
| | | private Integer changeType; |
| | | |
| | | @ApiModelProperty("交易备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("交易时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.wallet; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("用户钱包返回参数") |
| | | public class ComActWalletVO { |
| | | |
| | | @ApiModelProperty("钱包id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("社区名称") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("收益金额") |
| | | private BigDecimal incomeAmount; |
| | | |
| | | @ApiModelProperty("可用金额") |
| | | private BigDecimal availableAmount; |
| | | |
| | | @ApiModelProperty("结算金额") |
| | | private BigDecimal settlementAmount; |
| | | |
| | | @ApiModelProperty("累计随手拍奖励数量") |
| | | private Integer easyCount; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("上次金额变动时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty("收益说明") |
| | | private String agreement; |
| | | } |
| | |
| | | @ApiModelProperty("网格名字") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty("网格社区id") |
| | | private Long gridCommunityId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("每天完成") |
| | | private String everyDayNum; |
| | | |
| | | @ApiModelProperty("总完成度") |
| | | private Integer totalCompletedPoint; |
| | | @ApiModelProperty("完成总数") |
| | | private Integer totalCompleted; |
| | | |
| | | @ApiModelProperty("未完成总数") |
| | | private Integer totalNoneCompleted; |
| | | |
| | | @ApiModelProperty("已完成") |
| | | private List<ActWorkCountVO> completetPoint; |
| | | private List<PieElementVO> completetList; |
| | | |
| | | @ApiModelProperty("未完成") |
| | | private List<ActWorkCountVO> nonePoint; |
| | | private List<PieElementVO> noneList; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021/6/16 14:38 |
| | | */ |
| | | @ApiModel("大屏-工作-社区动态") |
| | | @Data |
| | | public class ComDynamicWorkScreenVO implements Serializable { |
| | | |
| | | @ApiModelProperty("全部动态") |
| | | private Long totalNum; |
| | | |
| | | @ApiModelProperty("本月新增") |
| | | private Long currentNum; |
| | | |
| | | @ApiModelProperty("平均每天动态") |
| | | private Integer currentAvgNum = 0; |
| | | |
| | | @ApiModelProperty("最新动态列表") |
| | | private List<String> dynList; |
| | | |
| | | @ApiModelProperty("动态柱状图列表数据") |
| | | private List<DynamicWorkVO> list; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("事件格式化类") |
| | | public class DateScreenVO { |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021/6/16 14:45 |
| | | */ |
| | | @Data |
| | | @ApiModel("累计动态、新增动态") |
| | | public class DynamicWorkVO implements Serializable { |
| | | |
| | | @ApiModelProperty("月份") |
| | | private String month; |
| | | |
| | | @ApiModelProperty("累计动态") |
| | | private Long dynTotal; |
| | | |
| | | @ApiModelProperty("新增动态") |
| | | private Long dynAdd; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String start; |
| | | @ApiModelProperty(hidden = true) |
| | | private String end; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021/6/16 14:45 |
| | | */ |
| | | @Data |
| | | @ApiModel("工作-事件管理-事件播报数据") |
| | | public class EventDetailWorkVO implements Serializable { |
| | | |
| | | @ApiModelProperty("事件id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("发布人昵称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("发布人头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("事件上报时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("事件描述") |
| | | private String eventDes; |
| | | |
| | | @ApiModelProperty("危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)") |
| | | private String dangerLevel; |
| | | |
| | | @ApiModelProperty("是否紧急") |
| | | private Boolean urgent; |
| | | |
| | | @ApiModelProperty("是否重大") |
| | | private Boolean major; |
| | | |
| | | @ApiModelProperty("事件发生地点") |
| | | private String happenAddress; |
| | | |
| | | @ApiModelProperty("事件发生地点备注") |
| | | private String happentAddress; |
| | | |
| | | @ApiModelProperty("事件发生经纬度(长在前短在后)") |
| | | private String happentLatLng; |
| | | |
| | | @ApiModelProperty("事件分类1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报") |
| | | private Integer eventType; |
| | | |
| | | @ApiModelProperty("事件处理状态(1待处理、2待验证、3已上报、4已解决、5草稿箱、6已撤销、7已失效 8 已发布)") |
| | | private Integer eventDealStatus; |
| | | |
| | | @ApiModelProperty(value = "是否红牌") |
| | | private Boolean redCard; |
| | | |
| | | @ApiModelProperty(value = "是否黄牌") |
| | | private Boolean yellowCard; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021/6/16 14:45 |
| | | */ |
| | | @Data |
| | | @ApiModel("解决事件、新增事件、事件数量") |
| | | public class EventTypeWorkVO implements Serializable { |
| | | |
| | | @ApiModelProperty("治安隐患") |
| | | private Integer zaTotal; |
| | | |
| | | @ApiModelProperty("公共服务") |
| | | private Integer ggTotal; |
| | | |
| | | @ApiModelProperty("矛盾纠纷") |
| | | private Integer mdTotal; |
| | | |
| | | @ApiModelProperty("不稳定因素") |
| | | private Integer bwdTotal; |
| | | |
| | | @ApiModelProperty("突发事件") |
| | | private Integer tfTotal; |
| | | |
| | | @ApiModelProperty("特殊人群上报") |
| | | private Integer tsTotal; |
| | | |
| | | @ApiModelProperty("随手拍") |
| | | private Integer sspTotal; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021/6/16 14:38 |
| | | */ |
| | | @ApiModel("大屏-工作-事件管理") |
| | | @Data |
| | | public class EventWorkScreenVO implements Serializable { |
| | | |
| | | @ApiModelProperty("已解决事件") |
| | | private Long resolvedNum = 0L; |
| | | |
| | | @ApiModelProperty("待处理事件") |
| | | private Long pendingNum = 0L; |
| | | |
| | | @ApiModelProperty("本月新增") |
| | | private Long currentNum = 0L; |
| | | |
| | | @ApiModelProperty("平均耗时") |
| | | private Integer avgCost = 0; |
| | | |
| | | @ApiModelProperty("宣传教育") |
| | | private Long propagandaNum = 0L; |
| | | |
| | | @ApiModelProperty("事件最新动态列表") |
| | | private List<EventDetailWorkVO> eventList; |
| | | |
| | | @ApiModelProperty("动态柱状图列表数据") |
| | | private List<EventWorkVO> list; |
| | | |
| | | @ApiModelProperty("已完成事件数据") |
| | | private EventTypeWorkVO complete; |
| | | |
| | | @ApiModelProperty("未完成事件数据") |
| | | private EventTypeWorkVO noComplete; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021/6/16 14:45 |
| | | */ |
| | | @Data |
| | | @ApiModel("解决事件、新增事件、事件数量") |
| | | public class EventWorkVO implements Serializable { |
| | | |
| | | @ApiModelProperty("月份") |
| | | private String month; |
| | | |
| | | @ApiModelProperty("事件数量") |
| | | private Long eventTotal; |
| | | |
| | | @ApiModelProperty("新增事件") |
| | | private Long eventAdd; |
| | | |
| | | @ApiModelProperty("解决事件") |
| | | private Long eventSolve; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String start; |
| | | @ApiModelProperty(hidden = true) |
| | | private String end; |
| | | } |
| | |
| | | @ApiModelProperty("id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("所属app 1居民端app 2网格员端app 3商家端app 4隐私政策") |
| | | @ApiModelProperty("所属app 1居民端app 2网格员端app 3商家端app 4隐私政策 5随手拍说明") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("协议内容") |
| | |
| | | |
| | | @ApiModelProperty("经纬度(,隔开)") |
| | | @NotEmpty(message = "经纬度不能为空") |
| | | private String lat_lng; |
| | | private String latLng; |
| | | |
| | | @ApiModelProperty("地址") |
| | | @NotEmpty(message = "地址不能为空") |
| | |
| | | @ApiModelProperty("异常描述") |
| | | private String dellDesc; |
| | | |
| | | @ApiModelProperty("异常选择") |
| | | private String option; |
| | | |
| | | @ApiModelProperty("家庭联系方式") |
| | | @NotEmpty(message = "家庭联系方式不能为空") |
| | | private String familyPhone; |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | private Boolean exception; |
| | | |
| | | @ApiModelProperty(value = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | | private String tableContentJson; |
| | | private JSONObject tableContentJson; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "异常选项") |
| | | private List<String> optionList; |
| | | |
| | | @ApiModelProperty(value = "音频列表") |
| | | List<String> vosList; |
| | | |
| | |
| | | @ApiModelProperty(value = "需走访人ID") |
| | | private Long visiterId; |
| | | |
| | | // @ApiModelProperty(value = "网格员所处的街道") |
| | | // private Long gridMemberStreet; |
| | | // |
| | | // @ApiModelProperty(value = "网格员所处社区") |
| | | // private Long gridMemberCommunity; |
| | | // |
| | | // @ApiModelProperty(value = "网格员") |
| | | // private Long gridMember; |
| | | // |
| | | // @ApiModelProperty(value = "网格员名字") |
| | | // private String gridMemberName; |
| | | // |
| | | // @ApiModelProperty(value = "网格员联系方式") |
| | | // private String gridMenberTele; |
| | | // |
| | | // |
| | | // @ApiModelProperty(value = "需走访人员性别") |
| | | // private Integer visiterSex; |
| | | // |
| | | // @ApiModelProperty(value = "需走访人电话") |
| | | // private String visiterTele; |
| | | // |
| | | // |
| | | @ApiModelProperty(value = "网格员所处的街道") |
| | | private Long gridMemberStreet; |
| | | |
| | | @ApiModelProperty(value = "网格员所处社区") |
| | | private Long gridMemberCommunity; |
| | | |
| | | @ApiModelProperty(value = "网格员") |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | | private String gridMemberName; |
| | | |
| | | @ApiModelProperty(value = "网格员联系方式") |
| | | private String gridMenberTele; |
| | | |
| | | |
| | | @ApiModelProperty(value = "需走访人员性别") |
| | | private Integer visiterSex; |
| | | |
| | | @ApiModelProperty(value = "需走访人电话") |
| | | private String visiterTele; |
| | | |
| | | |
| | | @ExcelIgnore |
| | | private Integer visiterType; |
| | | // |
| | | // @ApiModelProperty(value = "事件标题") |
| | | // private String eventTitle; |
| | | // |
| | | // @ApiModelProperty(value = "事件类型") |
| | | // private Integer eventType; |
| | | // |
| | | // @ApiModelProperty(value = "事件描述") |
| | | // private String eventDes; |
| | | // |
| | | // @ApiModelProperty(value = "社区处理(0是无需社区1是社区处理)") |
| | | // private Integer actOpara; |
| | | // |
| | | // @ApiModelProperty(value = "发生时间") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | // private Date happenTime; |
| | | // |
| | | // @ApiModelProperty(value = "发生地点") |
| | | // private String happentAddress; |
| | | // |
| | | // @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)") |
| | | // private String happentLatLng; |
| | | |
| | | @ApiModelProperty(value = "事件标题") |
| | | private String eventTitle; |
| | | |
| | | @ApiModelProperty(value = "事件类型") |
| | | private Integer eventType; |
| | | |
| | | @ApiModelProperty(value = "事件描述") |
| | | private String eventDes; |
| | | |
| | | @ApiModelProperty(value = "社区处理(0是无需社区1是社区处理)") |
| | | private Integer actOpara; |
| | | |
| | | @ApiModelProperty(value = "发生时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | | @ApiModelProperty(value = "发生地点") |
| | | private String happentAddress; |
| | | |
| | | @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)") |
| | | private String happentLatLng; |
| | | // |
| | | @ExcelIgnore |
| | | private Integer eventStatus; |
| | |
| | | } |
| | | return EventTasksVisitorTypeEnum.getName(visiterType); |
| | | } |
| | | // |
| | | // @ApiModelProperty(value = "上报状态") |
| | | // private Integer reporting; |
| | | // |
| | | // @ApiModelProperty(value = "当前处理对象类型(1、网格员2、社区3、是街道)") |
| | | // private Integer dellType; |
| | | // |
| | | // @ApiModelProperty(value = "处理人ID") |
| | | // private Long dellUserId; |
| | | // |
| | | // |
| | | // |
| | | // @ApiModelProperty(value = "处理时间") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | // private Date dellDate; |
| | | // |
| | | // |
| | | // @ApiModelProperty(value = "解决人针对解决事件的处理描述") |
| | | // private String dellDesc; |
| | | // |
| | | // @ApiModelProperty(value = "是否有效") |
| | | // private Boolean invalid; |
| | | // |
| | | // @ApiModelProperty(value = "是否紧急") |
| | | // private Boolean urgent; |
| | | // |
| | | // @ApiModelProperty(value = "是否催办") |
| | | // private Boolean urgentDell; |
| | | // |
| | | // @ApiModelProperty(value = "上报提交时间") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | // private Date submitDate; |
| | | // |
| | | // @ApiModelProperty(value = "是否异常行为") |
| | | // private Boolean exception; |
| | | // |
| | | // @ApiModelProperty(value = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | | // private String tableContentJson; |
| | | // |
| | | // @ApiModelProperty(value = "创建人id") |
| | | // private Long createBy; |
| | | // |
| | | // |
| | | // @ApiModelProperty(value = "修改人") |
| | | // private Long updateBy; |
| | | // |
| | | // @ApiModelProperty(value = "修改时间") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | // private Date updateAt; |
| | | // |
| | | // @ApiModelProperty(value = "标签") |
| | | // private String label; |
| | | |
| | | @ApiModelProperty(value = "上报状态") |
| | | private Integer reporting; |
| | | |
| | | @ApiModelProperty(value = "当前处理对象类型(1、网格员2、社区3、是街道)") |
| | | private Integer dellType; |
| | | |
| | | @ApiModelProperty(value = "处理人ID") |
| | | private Long dellUserId; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date dellDate; |
| | | |
| | | |
| | | @ApiModelProperty(value = "解决人针对解决事件的处理描述") |
| | | private String dellDesc; |
| | | |
| | | @ApiModelProperty(value = "是否有效") |
| | | private Boolean invalid; |
| | | |
| | | @ApiModelProperty(value = "是否紧急") |
| | | private Boolean urgent; |
| | | |
| | | @ApiModelProperty(value = "是否催办") |
| | | private Boolean urgentDell; |
| | | |
| | | |
| | | @ApiModelProperty(value = "是否异常行为") |
| | | private Boolean exception; |
| | | |
| | | @ApiModelProperty(value = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | | private String tableContentJson; |
| | | |
| | | @ApiModelProperty(value = "创建人id") |
| | | private Long createBy; |
| | | |
| | | |
| | | @ApiModelProperty(value = "修改人") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "标签") |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "电话") |
| | | private String phone; |
| | | |
| | | private Integer nationCode; |
| | | |
| | | @ApiModelProperty(value = "民族") |
| | | private String nation; |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; |
| | |
| | | */ |
| | | @PostMapping("addeasyphoto") |
| | | R addEasyPhoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | /** |
| | | * 查询随手拍是否有活动 |
| | | * @return 活动详情 |
| | | */ |
| | | @PostMapping("getEasyPhotoActivity") |
| | | R getEasyPhotoActivity(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 发布微心愿 |
| | |
| | | */ |
| | | @GetMapping("/population/repair") |
| | | R getPopulationRepairByApp(); |
| | | |
| | | /** |
| | | * 工作大屏-社区动态模块数据统计 |
| | | * @param communityId 社区id |
| | | * @return 社区动态数据统计 |
| | | */ |
| | | @GetMapping("/screen/work/dynamic") |
| | | R dynamicWork(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 查询用户钱包信息 |
| | | * @param walletDetailDTO 请求参数 |
| | | * @return 用户钱包信息 |
| | | */ |
| | | @PostMapping("/wallet/get/my") |
| | | R getUserWalletDetail(@RequestBody ComActWalletDetailDTO walletDetailDTO); |
| | | |
| | | /** |
| | | * 查询用户收支记录列表 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 收支记录 |
| | | */ |
| | | @PostMapping("/wallet/get/trade") |
| | | R getUserWalletTrade(@RequestBody PageComActWalletTradeDTO walletTradeDTO); |
| | | |
| | | /** |
| | | * 查询用户绑定的社区收益排行榜 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 社区收益排行榜 |
| | | */ |
| | | @PostMapping("/wallet/get/ranking") |
| | | R getWalletRanking(@RequestBody PageComActWalletTradeDTO walletTradeDTO); |
| | | } |
| | |
| | | @GetMapping("/event/updateLcUploadFlag") |
| | | Boolean updateLcUploadFlag(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 工作大屏-事件管理模块数据统计 |
| | | * @param communityId 社区id |
| | | * @return 事件管理数据统计 |
| | | */ |
| | | @GetMapping("/screen/work/event") |
| | | R eventWork(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * description 获取所有未上传到浪潮平台的走访事件列表 |
| | |
| | | * @return 协议集合 |
| | | */ |
| | | @PostMapping("listagreement") |
| | | R listAgreement(); |
| | | R listAgreement(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 编辑用户协议 |
| | |
| | | return date1.before(date2); |
| | | } |
| | | |
| | | /** |
| | | * date2比date1多的天数 |
| | | * @param date1 |
| | | * @param date2 |
| | | * @return |
| | | */ |
| | | public static int differentDays(Date date1,Date date2) |
| | | { |
| | | Calendar cal1 = Calendar.getInstance(); |
| | | cal1.setTime(date1); |
| | | |
| | | Calendar cal2 = Calendar.getInstance(); |
| | | cal2.setTime(date2); |
| | | int day1= cal1.get(Calendar.DAY_OF_YEAR); |
| | | int day2 = cal2.get(Calendar.DAY_OF_YEAR); |
| | | |
| | | int year1 = cal1.get(Calendar.YEAR); |
| | | int year2 = cal2.get(Calendar.YEAR); |
| | | if(year1 != year2) //同一年 |
| | | { |
| | | int timeDistance = 0 ; |
| | | for(int i = year1 ; i < year2 ; i ++) |
| | | { |
| | | if(i%4==0 && i%100!=0 || i%400==0) //闰年 |
| | | { |
| | | timeDistance += 366; |
| | | } |
| | | else //不是闰年 |
| | | { |
| | | timeDistance += 365; |
| | | } |
| | | } |
| | | |
| | | return timeDistance + (day2-day1) ; |
| | | } |
| | | else //不同年 |
| | | { |
| | | // System.out.println("判断day2 - day1 : " + (day2-day1)); |
| | | return day2-day1; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static void main(String[]args)throws Exception{ |
| | |
| | | import com.panzhihua.common.model.vos.neighbor.DetailNeighborCircleAdminVO; |
| | | import com.panzhihua.common.model.vos.screen.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | /** |
| | | * 邻里圈 |
| | |
| | | return communityService.pbWork(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区动态@lyq",response = ComDynamicWorkScreenVO.class) |
| | | @GetMapping("/dynamicWork") |
| | | public R dynamicWork(@RequestParam("communityId") Long communityId){ |
| | | return communityService.dynamicWork(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "事件管理@lyq",response = EventWorkScreenVO.class) |
| | | @GetMapping("/eventWork") |
| | | public R eventWork(@RequestParam("communityId") Long communityId){ |
| | | return gridService.eventWork(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 随手拍 |
| | | * @param communityId |
| | |
| | | public ComEldersAuthUserService comEldersAuthUserService; |
| | | @Resource |
| | | private ComEldersAuthHistoryRecordMapper comEldersAuthHistoryRecordMapper; |
| | | @Resource |
| | | private ComActEasyPhotoActivityService comActEasyPhotoActivityService; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询随手拍是否有活动 |
| | | * @return 活动详情 |
| | | */ |
| | | @PostMapping("getEasyPhotoActivity") |
| | | public R getEasyPhotoActivity(@RequestParam("communityId") Long communityId) { |
| | | return comActEasyPhotoActivityService.getEasyPhotoActivity(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 发布微心愿 |
| | | * |
| | | * @param comActMicroWishVO 发布内容 |
| | |
| | | public R getScreenMicroList(@RequestBody ScreenMicroListDTO microListDTO) { |
| | | return comActMicroWishService.getScreenMicroList(microListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 工作大屏-社区动态模块数据统计 |
| | | * @param communityId 社区id |
| | | * @return 社区动态数据统计 |
| | | */ |
| | | @GetMapping("/dynamic") |
| | | public R dynamic(@RequestParam("communityId")Long communityId){ |
| | | return screenWorkService.dynamicWork(communityId); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActUserWalletService; |
| | | import com.panzhihua.service_community.service.ComActUserWalletTradeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/wallet/") |
| | | public class WalletApi { |
| | | |
| | | @Resource |
| | | private ComActUserWalletService comActUserWalletService; |
| | | @Resource |
| | | private ComActUserWalletTradeService comActUserWalletTradeService; |
| | | |
| | | /** |
| | | * 查询用户钱包信息 |
| | | * @param walletDetailDTO 请求参数 |
| | | * @return 用户钱包信息 |
| | | */ |
| | | @PostMapping("/get/my") |
| | | public R getWallet(@RequestBody ComActWalletDetailDTO walletDetailDTO) { |
| | | return comActUserWalletService.getWallet(walletDetailDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询用户收支记录列表 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 收支记录 |
| | | */ |
| | | @PostMapping("/get/trade") |
| | | public R getWalletTrade(@RequestBody PageComActWalletTradeDTO walletTradeDTO) { |
| | | return comActUserWalletTradeService.getWalletTrade(walletTradeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询用户绑定的社区收益排行榜 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 社区收益排行榜 |
| | | */ |
| | | @PostMapping("/get/ranking") |
| | | public R getWalletRanking(@RequestBody PageComActWalletTradeDTO walletTradeDTO) { |
| | | return comActUserWalletService.getWalletRanking(walletTradeDTO); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.screen.DateScreenVO; |
| | | import com.panzhihua.common.model.vos.screen.DynamicWorkVO; |
| | | import com.panzhihua.service_community.model.dos.ComActDynDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Mapper |
| | | public interface ComActDynDAO extends BaseMapper<ComActDynDO> { |
| | | @Select("<script> " + |
| | | "SELECT \n" + |
| | | "d.id,\n" + |
| | | "d.title,\n" + |
| | | "COUNT(u.id)readNum,\n" + |
| | | "d.`status`,\n" + |
| | | "d.`content`,\n" + |
| | | "d.`cover`,\n" + |
| | | "d.`type`,\n" + |
| | | "d.`cover_mode`,\n" + |
| | | "d.is_topping,\n" + |
| | | "d.publish_at,\n" + |
| | | "d.create_at,\n" + |
| | | "ca.name as communityName \n" + |
| | | "FROM\n" + |
| | | "com_act_dyn d\n" + |
| | | "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id \n" + |
| | | "LEFT JOIN com_act ca ON d.community_id = ca.community_id \n" + |
| | | "WHERE 1=1 \n" + |
| | | "SELECT " + |
| | | "d.id, " + |
| | | "d.title, " + |
| | | "COUNT(u.id)readNum, " + |
| | | "d.`status`, " + |
| | | "d.`content`, " + |
| | | "d.`cover`, " + |
| | | "d.`type`, " + |
| | | "d.`cover_mode`, " + |
| | | "d.is_topping, " + |
| | | "d.publish_at, " + |
| | | "d.create_at, " + |
| | | "ca.name as communityName " + |
| | | "FROM " + |
| | | "com_act_dyn d " + |
| | | "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " + |
| | | "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + |
| | | "WHERE 1=1 " + |
| | | "<if test='comActDynVO.choice == 0 '>" + |
| | | "and d.community_id=#{comActDynVO.communityId}\n" + |
| | | "and d.community_id=#{comActDynVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" + |
| | | "AND d.title like concat(#{comActDynVO.title},'%') \n" + |
| | | "AND d.title like concat(#{comActDynVO.title},'%') " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.isTopping != null '>" + |
| | | "AND d.is_topping = #{comActDynVO.isTopping} \n" + |
| | | "AND d.is_topping = #{comActDynVO.isTopping} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.status != null '>" + |
| | | "AND d.`status` = #{comActDynVO.status} \n" + |
| | | "AND d.`status` = #{comActDynVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.publishAtBegin != null '>" + |
| | | "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} \n" + |
| | | "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " + |
| | | "AND #{comActDynVO.publishAtEnd}" + |
| | | " </if> " + |
| | | " group by d.id "+ |
| | |
| | | int timedTaskDynStatus(); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT \n" + |
| | | "d.id,\n" + |
| | | "d.title,\n" + |
| | | "COUNT(u.id)readNum,\n" + |
| | | "d.`status`,\n" + |
| | | "d.`content`,\n" + |
| | | "d.`cover`,\n" + |
| | | "d.`type`,\n" + |
| | | "d.`cover_mode`,\n" + |
| | | "d.is_topping,\n" + |
| | | "d.publish_at,\n" + |
| | | "d.create_at,\n" + |
| | | "ca.name as communityName \n" + |
| | | "FROM\n" + |
| | | "com_act_dyn d\n" + |
| | | "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id \n" + |
| | | "LEFT JOIN com_act ca ON d.community_id = ca.community_id \n" + |
| | | "WHERE \n" + |
| | | "d.community_id=#{comActDynVO.communityId}\n" + |
| | | "SELECT " + |
| | | "d.id, " + |
| | | "d.title, " + |
| | | "COUNT(u.id)readNum, " + |
| | | "d.`status`, " + |
| | | "d.`content`, " + |
| | | "d.`cover`, " + |
| | | "d.`type`, " + |
| | | "d.`cover_mode`, " + |
| | | "d.is_topping, " + |
| | | "d.publish_at, " + |
| | | "d.create_at, " + |
| | | "ca.name as communityName " + |
| | | "FROM " + |
| | | "com_act_dyn d " + |
| | | "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " + |
| | | "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + |
| | | "WHERE " + |
| | | "d.community_id=#{comActDynVO.communityId} " + |
| | | "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" + |
| | | "AND d.title like concat(#{comActDynVO.title},'%') \n" + |
| | | "AND d.title like concat(#{comActDynVO.title},'%') " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.isTopping != null '>" + |
| | | "AND d.is_topping = #{comActDynVO.isTopping} \n" + |
| | | "AND d.is_topping = #{comActDynVO.isTopping} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.status != null '>" + |
| | | "AND d.`status` = #{comActDynVO.status} \n" + |
| | | "AND d.`status` = #{comActDynVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.publishAtBegin != null '>" + |
| | | "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} \n" + |
| | | "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " + |
| | | "AND #{comActDynVO.publishAtEnd}" + |
| | | " </if> " + |
| | | " group by d.id "+ |
| | | " order by d.is_topping desc, d.create_at desc "+ |
| | | "</script>") |
| | | IPage<ComActDynVO> pageDynamicByAdmin(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); |
| | | |
| | | @Select("SELECT " + |
| | | " count( cad.id ) AS dynTotal, " + |
| | | " (select count(id) from com_act_dyn where community_id = #{communityId} and create_at LIKE CONCAT(#{nowDate},'%')) as currentNum " + |
| | | "FROM " + |
| | | " com_act_dyn AS cad " + |
| | | "WHERE " + |
| | | " community_id = #{communityId}") |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate")String nowDate); |
| | | |
| | | @Select("select create_at as startTime,(select create_at from com_act_dyn where community_id = #{communityId} order by create_at desc LIMIT 1 ) as endTime from com_act_dyn where community_id = #{communityId} order by create_at asc LIMIT 1") |
| | | DateScreenVO countByAvgCommunityId(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + |
| | | "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = #{communityId} AND create_at < #{end}) AS dynTotal, " + |
| | | "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = #{communityId} AND #{start} < create_at AND create_at < #{end}) AS dynAdd " + |
| | | " FROM DUAL") |
| | | DynamicWorkVO countByTime(@Param("start")String start, @Param("end")String end, @Param("communityId")Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:16 |
| | | * @describe 随手拍活动表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActEasyPhotoActivityMapper extends BaseMapper<ComActEasyPhotoActivityDO> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:36 |
| | | * @describe 用户参加随手拍活动记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActEasyPhotoActivityRecordMapper extends BaseMapper<ComActEasyPhotoActivityRecordDO> { |
| | | |
| | | } |
| | |
| | | "su.`name`,\n" + |
| | | "p.handle_result,\n" + |
| | | "p.photo_path_list,\n" + |
| | | "p.activity_type,\n" + |
| | | "p.activity_amount,\n" + |
| | | "count(pu.id)giveThumbsUpNum,\n" + |
| | | "p.handle_photo_list\n" + |
| | | "FROM\n" + |
| | |
| | | "p.`photo_path_list`,\n" + |
| | | "p.create_at,\n" + |
| | | "p.feedback_at,\n" + |
| | | "p.activity_type,\n" + |
| | | "p.activity_amount,\n" + |
| | | "p.examine_at \n" + |
| | | "FROM\n" + |
| | | "com_act_easy_photo p\n" + |
| | |
| | | import com.panzhihua.common.model.vos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.screen.CarouselInfoVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActNeighborCircleScreenVO; |
| | | import com.panzhihua.common.model.vos.screen.PieElementVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | @Select("<script> \n"+ |
| | | "SELECT\n" + |
| | | "nc.*,\n" + |
| | | "u.`nick_name` AS releaseName,u.`type` as userType,u.image_url\n" + |
| | | "u.`nick_name` AS releaseName,u.image_url,u.`type` as userType\n" + |
| | | ",u.name as communityName\n" + |
| | | "FROM\n" + |
| | | "com_act_neighbor_circle nc\n" + |
| | |
| | | " </if> " + |
| | | "<if test='neighborCircleAdminDTO.startAt != null and neighborCircleAdminDTO.endAt !=null '>" + |
| | | "and nc.create_at between #{neighborCircleAdminDTO.startAt} and #{neighborCircleAdminDTO.endAt} \n" + |
| | | " </if> " + |
| | | "<if test='neighborCircleAdminDTO.status != null '>" + |
| | | "and nc.status = #{neighborCircleAdminDTO.status} " + |
| | | " </if> " + |
| | | "</where>"+ |
| | | "order by " + |
| | |
| | | " where reply.comment_id = #{commentId} and reply.status = 1") |
| | | IPage<ComActNeighborCommentReplyAppVO> neighborCommentReplyByApp(Page page, @Param("commentId") Long commentId); |
| | | |
| | | @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id =#{communityId} and(status = 2 or status = 3) ORDER BY create_at DESC limit #{pageSize}") |
| | | @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id =#{communityId} and status = 2 ORDER BY create_at DESC limit #{pageSize}") |
| | | List<CarouselInfoVO> screenNeighborCircle(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | |
| | | @Select(" SELECT COUNT(id) AS totalNum," + |
| | | " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND (status = 2 OR status = 3) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " + |
| | | " FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND(status = 2 OR status =3)") |
| | | " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND status = 2 AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " + |
| | | " FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND status = 2") |
| | | Map<String, Long> countByCommunityId(@Param("communityId")Long communityId,@Param("nowDate")String nowDate); |
| | | |
| | | @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} and (status = 2 OR status =3) ") |
| | | @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} and status = 2 ") |
| | | Map<String, Object> sumScreenNum(@Param("communityId")Long communityId); |
| | | |
| | | @Select("SELECT release_images FROM com_act_neighbor_circle WHERE community_id = #{communityId} and (status = 2 OR status =3) order by create_at desc limit #{pageSize}") |
| | | @Select("SELECT release_images FROM com_act_neighbor_circle WHERE community_id = #{communityId} and status = 2 order by create_at desc limit #{pageSize}") |
| | | List<String> screenNeighborCircleImgs(@Param("communityId") Long communityId,@Param("pageSize") Integer pageSize); |
| | | |
| | | @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = #{communityId} AND STATUS = 4 " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = #{communityId} AND STATUS = 6 " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = #{communityId} " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 2 " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_process_status = 2 " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND STATUS = 5 ") |
| | | List<PieElementVO> countAllCompletedWorkByCommunityId(@Param("communityId")Long communityId); |
| | | |
| | | @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2) " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = #{communityId} " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 1 " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT( e.id ) AS num,'网格事件' AS NAME FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_status = 2 and e.event_deal_status in (1,2,3) " + |
| | | "UNION ALL " + |
| | | "SELECT COUNT(id),'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) ") |
| | | List<PieElementVO> countAllNoneCompletedWorkByCommunityId(@Param("communityId")Long communityId); |
| | | |
| | | @Select(" SELECT AVG(b.t)AS avgTime " + |
| | | " FROM (SELECT TIMESTAMPDIFF(MINUTE,create_at,feedback_at) AS t FROM com_act_easy_photo WHERE community_id = #{communityId} and STATUS = 4 " + |
| | | " UNION ALL SELECT TIMESTAMPDIFF(MINUTE,create_at,finish_at) AS t FROM com_act_micro_wish WHERE community_id = #{communityId} and STATUS = 6 " + |
| | | " )AS b ") |
| | | Map<String, Object> countAvgByCommunityId(@Param("communityId")Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletChangeDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:34 |
| | | * @describe 用户钱包资产变动记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActUserWalletChangeMapper extends BaseMapper<ComActUserWalletChangeDO> { |
| | | |
| | | } |
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.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:11 |
| | | * @describe 用户钱包表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActUserWalletMapper extends BaseMapper<ComActUserWalletDO> { |
| | | |
| | | Map<String,String> getCommunityName(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查询用户绑定的社区收益排行榜 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 社区收益排行榜 |
| | | */ |
| | | IPage<ComActWalletRankingVO> getWalletRanking(Page page, @Param("walletTradeDTO") PageComActWalletTradeDTO walletTradeDTO); |
| | | |
| | | } |
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.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeVO; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletTradeDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:22 |
| | | * @describe 用户钱包交易记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActUserWalletTradeMapper extends BaseMapper<ComActUserWalletTradeDO> { |
| | | |
| | | /** |
| | | * 查询用户收支记录列表 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 收支记录 |
| | | */ |
| | | IPage<ComActWalletTradeVO> getUserWalletTradeList(Page page, @Param("walletTradeDTO") PageComActWalletTradeDTO walletTradeDTO); |
| | | } |
| | |
| | | "(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = #{communityId} AND STATUS = 2 AND #{start} < create_at AND create_at < #{end}) AS dyn " + |
| | | "FROM DUAL") |
| | | PbWorkVO countByTime(@Param("start")String start,@Param("end")String end, @Param("communityId")Long communityId); |
| | | |
| | | |
| | | } |
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.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:16 |
| | | * @describe 随手拍活动表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_easy_photo_activity") |
| | | public class ComActEasyPhotoActivityDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 活动状态(1.待开始 2.进行中 3.已结束 4.已取消) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 活动简介 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 活动开始时间 |
| | | */ |
| | | private Date activityStartAt; |
| | | |
| | | /** |
| | | * 活动结束时间 |
| | | */ |
| | | private Date activityEndAt; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date releaseAt; |
| | | |
| | | /** |
| | | * 优质奖励金额 |
| | | */ |
| | | private BigDecimal goodReward; |
| | | |
| | | /** |
| | | * 精良奖励金额 |
| | | */ |
| | | private BigDecimal excellentReward; |
| | | |
| | | /** |
| | | * 普通奖励金额 |
| | | */ |
| | | private BigDecimal ordinaryReward; |
| | | |
| | | /** |
| | | * 随手拍数量 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 活动图片 |
| | | */ |
| | | private String logo; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActEasyPhotoActivityDO{" + |
| | | "id=" + id + |
| | | ", status=" + status + |
| | | ", content=" + content + |
| | | ", activityStartAt=" + activityStartAt + |
| | | ", activityEntAt=" + activityEndAt + |
| | | ", releaseAt=" + releaseAt + |
| | | ", goodReward=" + goodReward + |
| | | ", excellentReward=" + excellentReward + |
| | | ", ordinaryReward=" + ordinaryReward + |
| | | ", count=" + count + |
| | | ", createAt=" + createAt + |
| | | "}"; |
| | | } |
| | | } |
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.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:36 |
| | | * @describe 用户参加随手拍活动记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_easy_photo_activity_record") |
| | | public class ComActEasyPhotoActivityRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 参加活动用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 活动id |
| | | */ |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 随手拍id |
| | | */ |
| | | private Long easyId; |
| | | |
| | | /** |
| | | * 活动奖励类型(1.优质 2.精良 3.普通) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 奖励金额 |
| | | */ |
| | | private BigDecimal rewardAmount; |
| | | |
| | | /** |
| | | * 参加活动时间 |
| | | */ |
| | | private Date joinAt; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActEasyPhotoActivityRecordDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", activityId=" + activityId + |
| | | ", communityId=" + communityId + |
| | | ", easyId=" + easyId + |
| | | ", type=" + type + |
| | | ", rewardAmount=" + rewardAmount + |
| | | ", joinAt=" + joinAt + |
| | | ", createAt=" + createAt + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | * 发生地址经纬度信息,逗号分割 |
| | | */ |
| | | private String lngLat; |
| | | |
| | | /** |
| | | * 活动id |
| | | */ |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 参加活动标签(1.优质 2.精良 3.普通) |
| | | */ |
| | | private Integer activityType; |
| | | |
| | | /** |
| | | * 活动奖励金额 |
| | | */ |
| | | private BigDecimal activityAmount; |
| | | } |
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.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:34 |
| | | * @describe 用户钱包资产变动记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_user_wallet_change") |
| | | public class ComActUserWalletChangeDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 收益金额变动前 |
| | | */ |
| | | private BigDecimal incomeAmountTop; |
| | | |
| | | /** |
| | | * 收益金额变动后 |
| | | */ |
| | | private BigDecimal incomeAmountBack; |
| | | |
| | | /** |
| | | * 可用金额变动前 |
| | | */ |
| | | private BigDecimal availableAmountTop; |
| | | |
| | | /** |
| | | * 可用金额变动后 |
| | | */ |
| | | private BigDecimal availableAmountBack; |
| | | |
| | | /** |
| | | * 已结算金额变动前 |
| | | */ |
| | | private BigDecimal settlementAmountTop; |
| | | |
| | | /** |
| | | * 已结算金额变动后 |
| | | */ |
| | | private BigDecimal settlementAmountBack; |
| | | |
| | | /** |
| | | * 交易记录id |
| | | */ |
| | | private Long serviceId; |
| | | |
| | | /** |
| | | * 变动时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 钱包id |
| | | */ |
| | | private Long walletId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActUserWalletChangeDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", communityId=" + communityId + |
| | | ", incomeAmountTop=" + incomeAmountTop + |
| | | ", incomeAmountBack=" + incomeAmountBack + |
| | | ", availableAmountTop=" + availableAmountTop + |
| | | ", availableAmountBack=" + availableAmountBack + |
| | | ", settlementAmountTop=" + settlementAmountTop + |
| | | ", settlementAmountBack=" + settlementAmountBack + |
| | | ", serviceId=" + serviceId + |
| | | ", createAt=" + createAt + |
| | | "}"; |
| | | } |
| | | } |
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.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:11 |
| | | * @describe 用户钱包表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_user_wallet") |
| | | public class ComActUserWalletDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 收益总金额 |
| | | */ |
| | | private BigDecimal incomeAmount; |
| | | |
| | | /** |
| | | * 可用金额 |
| | | */ |
| | | private BigDecimal availableAmount; |
| | | |
| | | /** |
| | | * 结算金额 |
| | | */ |
| | | private BigDecimal settlementAmount; |
| | | |
| | | /** |
| | | * 累计参加随手拍次数 |
| | | */ |
| | | private Integer easyCount; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 上次金额变动时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActUserWalletDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", communityId=" + communityId + |
| | | ", incomeAmount=" + incomeAmount + |
| | | ", availableAmount=" + availableAmount + |
| | | ", settlementAmount=" + settlementAmount + |
| | | ", easyCount=" + easyCount + |
| | | ", createAt=" + createAt + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
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.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:22 |
| | | * @describe 用户钱包交易记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_user_wallet_trade") |
| | | public class ComActUserWalletTradeDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 交易业务id |
| | | */ |
| | | private Long serviceId; |
| | | |
| | | /** |
| | | * 交易金额 |
| | | */ |
| | | private BigDecimal amount; |
| | | |
| | | /** |
| | | * 交易类型(1.发布随手拍 2.结算) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 交易备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 交易时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 操作人id |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 钱包id |
| | | */ |
| | | private Long walletId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActUserWalletTradeDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", communityId=" + communityId + |
| | | ", serviceId=" + serviceId + |
| | | ", amount=" + amount + |
| | | ", type=" + type + |
| | | ", remark=" + remark + |
| | | ", createAt=" + createAt + |
| | | ", createBy=" + createBy + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityRecordDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:36 |
| | | * @describe 用户参加随手拍活动记录表服务类 |
| | | */ |
| | | public interface ComActEasyPhotoActivityRecordService extends IService<ComActEasyPhotoActivityRecordDO> { |
| | | |
| | | } |
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.ComActEasyPhotoActivityDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:16 |
| | | * @describe 随手拍活动表服务类 |
| | | */ |
| | | public interface ComActEasyPhotoActivityService extends IService<ComActEasyPhotoActivityDO> { |
| | | |
| | | /** |
| | | * 查询随手拍是否有活动 |
| | | * @return 活动详情 |
| | | */ |
| | | R getEasyPhotoActivity(Long communityId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletChangeDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:34 |
| | | * @describe 用户钱包资产变动记录表服务类 |
| | | */ |
| | | public interface ComActUserWalletChangeService extends IService<ComActUserWalletChangeDO> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:11 |
| | | * @describe 用户钱包表服务类 |
| | | */ |
| | | public interface ComActUserWalletService extends IService<ComActUserWalletDO> { |
| | | |
| | | /** |
| | | * 查询用户钱包信息 |
| | | * @param walletDetailDTO 请求参数 |
| | | * @return 用户钱包信息 |
| | | */ |
| | | R getWallet(ComActWalletDetailDTO walletDetailDTO); |
| | | |
| | | /** |
| | | * 查询用户绑定的社区收益排行榜 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 社区收益排行榜 |
| | | */ |
| | | R getWalletRanking(PageComActWalletTradeDTO walletTradeDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletTradeDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:22 |
| | | * @describe 用户钱包交易记录表服务类 |
| | | */ |
| | | public interface ComActUserWalletTradeService extends IService<ComActUserWalletTradeDO> { |
| | | |
| | | /** |
| | | * 查询用户收支记录列表 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 收支记录 |
| | | */ |
| | | R getWalletTrade(PageComActWalletTradeDTO walletTradeDTO); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R workCount(Long communityId); |
| | | |
| | | R dynamicWork(Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoActivityRecordMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityRecordDO; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoActivityRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:36 |
| | | * @describe 用户参加随手拍活动记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActEasyPhotoActivityRecordServiceImpl extends ServiceImpl<ComActEasyPhotoActivityRecordMapper, ComActEasyPhotoActivityRecordDO> implements ComActEasyPhotoActivityRecordService { |
| | | |
| | | } |
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.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoActivityVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoActivityMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityDO; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:34:16 |
| | | * @describe 随手拍活动表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActEasyPhotoActivityServiceImpl extends ServiceImpl<ComActEasyPhotoActivityMapper, ComActEasyPhotoActivityDO> implements ComActEasyPhotoActivityService { |
| | | |
| | | /** |
| | | * 查询随手拍是否有活动 |
| | | * @return 活动详情 |
| | | */ |
| | | @Override |
| | | public R getEasyPhotoActivity(Long communityId){ |
| | | ComActEasyPhotoActivityVO photoActivityVO = new ComActEasyPhotoActivityVO(); |
| | | Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format); |
| | | List<ComActEasyPhotoActivityDO> photoActivityDOS = this.baseMapper.selectList( |
| | | new QueryWrapper<ComActEasyPhotoActivityDO>().lambda().eq(ComActEasyPhotoActivityDO::getCommunityId,communityId) |
| | | .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate)); |
| | | if(!photoActivityDOS.isEmpty()){ |
| | | ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0); |
| | | BeanUtils.copyProperties(photoActivityDO,photoActivityVO); |
| | | return R.ok(photoActivityVO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoUserDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoCommentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoCommentUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoUserDO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComActEasyPhotoCommentDAO comActEasyPhotoCommentDAO ; |
| | | @Resource |
| | | private ComActEasyPhotoCommentUserDAO comActEasyPhotoCommentUserDAO ; |
| | | @Resource |
| | | private ComActEasyPhotoActivityMapper comActEasyPhotoActivityMapper; |
| | | /** |
| | | * 分页查询随手拍 |
| | | * |
| | |
| | | public R addEasyPhoto(ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO=new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoVO,comActEasyPhotoDO); |
| | | //查询是否在活动时间内 |
| | | Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format); |
| | | List<ComActEasyPhotoActivityDO> photoActivityDOS = comActEasyPhotoActivityMapper.selectList( |
| | | new QueryWrapper<ComActEasyPhotoActivityDO>().lambda().eq(ComActEasyPhotoActivityDO::getCommunityId,comActEasyPhotoVO.getCommunityId()) |
| | | .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate)); |
| | | if(!photoActivityDOS.isEmpty()){ |
| | | ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0); |
| | | comActEasyPhotoDO.setActivityId(photoActivityDO.getId()); |
| | | } |
| | | int insert = comActEasyPhotoDAO.insert(comActEasyPhotoDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComActUserWalletChangeMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletChangeDO; |
| | | import com.panzhihua.service_community.service.ComActUserWalletChangeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:34 |
| | | * @describe 用户钱包资产变动记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActUserWalletChangeServiceImpl extends ServiceImpl<ComActUserWalletChangeMapper, ComActUserWalletChangeDO> implements ComActUserWalletChangeService { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | 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.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletVO; |
| | | import com.panzhihua.service_community.dao.ComActUserWalletMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletDO; |
| | | import com.panzhihua.service_community.service.ComActUserWalletService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:11 |
| | | * @describe 用户钱包表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActUserWalletServiceImpl extends ServiceImpl<ComActUserWalletMapper, ComActUserWalletDO> implements ComActUserWalletService { |
| | | |
| | | /** |
| | | * 查询用户钱包信息 |
| | | * @param walletDetailDTO 请求参数 |
| | | * @return 用户钱包信息 |
| | | */ |
| | | @Override |
| | | public R getWallet(ComActWalletDetailDTO walletDetailDTO){ |
| | | ComActWalletVO comActWalletVO = new ComActWalletVO(); |
| | | //查询用户钱包 |
| | | ComActUserWalletDO userWalletDO = this.baseMapper.selectOne(new QueryWrapper<ComActUserWalletDO>() |
| | | .lambda().eq(ComActUserWalletDO::getUserId,walletDetailDTO.getUserId()) |
| | | .eq(ComActUserWalletDO::getCommunityId,walletDetailDTO.getCommunityId())); |
| | | if(userWalletDO == null){//若钱包不存在则新建钱包 |
| | | userWalletDO = new ComActUserWalletDO(); |
| | | userWalletDO.setIncomeAmount(BigDecimal.ZERO); |
| | | userWalletDO.setAvailableAmount(BigDecimal.ZERO); |
| | | userWalletDO.setSettlementAmount(BigDecimal.ZERO); |
| | | userWalletDO.setUserId(walletDetailDTO.getUserId()); |
| | | userWalletDO.setCommunityId(walletDetailDTO.getCommunityId()); |
| | | userWalletDO.setEasyCount(0); |
| | | userWalletDO.setCreateAt(new Date()); |
| | | this.baseMapper.insert(userWalletDO); |
| | | } |
| | | BeanUtils.copyProperties(userWalletDO,comActWalletVO); |
| | | Map<String,String> resultMap = this.baseMapper.getCommunityName(walletDetailDTO.getCommunityId()); |
| | | if(!resultMap.isEmpty()){ |
| | | comActWalletVO.setCommunityName(resultMap.get("name")); |
| | | comActWalletVO.setAgreement(resultMap.get("content")); |
| | | } |
| | | return R.ok(comActWalletVO); |
| | | } |
| | | |
| | | /** |
| | | * 查询用户绑定的社区收益排行榜 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 社区收益排行榜 |
| | | */ |
| | | @Override |
| | | public R getWalletRanking(PageComActWalletTradeDTO walletTradeDTO){ |
| | | return R.ok(this.baseMapper.getWalletRanking(new Page(walletTradeDTO.getPageNum(),walletTradeDTO.getPageSize()),walletTradeDTO)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComActUserWalletTradeMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActUserWalletTradeDO; |
| | | import com.panzhihua.service_community.service.ComActUserWalletTradeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-06-25 10:35:22 |
| | | * @describe 用户钱包交易记录表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActUserWalletTradeServiceImpl extends ServiceImpl<ComActUserWalletTradeMapper, ComActUserWalletTradeDO> implements ComActUserWalletTradeService { |
| | | |
| | | /** |
| | | * 查询用户收支记录列表 |
| | | * @param walletTradeDTO 请求参数 |
| | | * @return 收支记录 |
| | | */ |
| | | @Override |
| | | public R getWalletTrade(PageComActWalletTradeDTO walletTradeDTO){ |
| | | return R.ok(this.baseMapper.getUserWalletTradeList(new Page(walletTradeDTO.getPageNum(),walletTradeDTO.getPageSize()),walletTradeDTO)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComPbActivityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.screen.*; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDynDO; |
| | | import com.panzhihua.service_community.service.ScreenWorkService; |
| | | import org.apache.commons.net.ntp.TimeStamp; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | |
| | | private static final Integer pageSize = 200; |
| | | |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComActNeighborCircleDAO comActNeighborCircleDAO; |
| | | |
| | | @Resource |
| | | private ComActDynDAO comActDynDAO; |
| | | @Resource |
| | | private ComActMicroWishDAO comActMicroWishDAO; |
| | | |
| | | @Resource |
| | | private ComActActivityDAO actActivityDAO; |
| | | |
| | | @Resource |
| | | private ComActDiscussDAO comActDiscussDAO; |
| | | |
| | | @Resource |
| | | private ComPbDynDAO comPbDynDAO; |
| | | |
| | | @Resource |
| | | private ComActEasyPhotoDAO comActEasyPhotoDAO; |
| | | |
| | |
| | | return R.ok(comActEasyPhotoScreenVO); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | private List<EasyPhotoPointVO> getList(Map<String, Long> dealMap) { |
| | | Set<Map.Entry<String,Long>> entrySet = dealMap.entrySet(); |
| | | |
| | |
| | | @Override |
| | | public R workCount(Long communityId) { |
| | | ComActWorkScreenVO comActWorkScreenVO = new ComActWorkScreenVO(); |
| | | comActWorkScreenVO.setAvgTime("1小时"); |
| | | comActWorkScreenVO.setTotalCompletedPoint(70); |
| | | comActWorkScreenVO.setEveryDayNum("0.3"); |
| | | List<ActWorkCountVO> completetPoint = new ArrayList<>(); |
| | | ActWorkCountVO easyPhoto = new ActWorkCountVO(); |
| | | easyPhoto.setName("随手拍"); |
| | | easyPhoto.setNum(10); |
| | | completetPoint.add(easyPhoto); |
| | | ActWorkCountVO wish = new ActWorkCountVO(); |
| | | wish.setName("微心愿"); |
| | | wish.setNum(23); |
| | | completetPoint.add(wish); |
| | | ActWorkCountVO discuss = new ActWorkCountVO(); |
| | | discuss.setName("一起议"); |
| | | discuss.setNum(33); |
| | | completetPoint.add(discuss); |
| | | ActWorkCountVO neighbor = new ActWorkCountVO(); |
| | | neighbor.setName("邻里圈"); |
| | | neighbor.setNum(43); |
| | | completetPoint.add(neighbor); |
| | | ActWorkCountVO pbWork = new ActWorkCountVO(); |
| | | pbWork.setName("党建工作"); |
| | | pbWork.setNum(13); |
| | | completetPoint.add(pbWork); |
| | | ActWorkCountVO activity = new ActWorkCountVO(); |
| | | activity.setName("社区活动"); |
| | | activity.setNum(63); |
| | | completetPoint.add(activity); |
| | | comActWorkScreenVO.setCompletetPoint(completetPoint); |
| | | //已完成 |
| | | comActWorkScreenVO.setCompletetList(comActNeighborCircleDAO.countAllCompletedWorkByCommunityId(communityId)); |
| | | |
| | | List<ActWorkCountVO> completetPoint2 = new ArrayList<>(); |
| | | ActWorkCountVO easyPhoto2 = new ActWorkCountVO(); |
| | | easyPhoto2.setName("随手拍"); |
| | | easyPhoto2.setNum(10); |
| | | completetPoint2.add(easyPhoto2); |
| | | ActWorkCountVO wish2 = new ActWorkCountVO(); |
| | | wish2.setName("微心愿"); |
| | | wish2.setNum(23); |
| | | completetPoint2.add(wish2); |
| | | ActWorkCountVO discuss2 = new ActWorkCountVO(); |
| | | discuss2.setName("一起议"); |
| | | discuss2.setNum(33); |
| | | completetPoint2.add(discuss2); |
| | | ActWorkCountVO neighbor2 = new ActWorkCountVO(); |
| | | neighbor2.setName("邻里圈"); |
| | | neighbor2.setNum(43); |
| | | completetPoint2.add(neighbor2); |
| | | ActWorkCountVO pbWork2 = new ActWorkCountVO(); |
| | | pbWork2.setName("党建工作"); |
| | | pbWork2.setNum(13); |
| | | completetPoint2.add(pbWork2); |
| | | ActWorkCountVO activity2 = new ActWorkCountVO(); |
| | | activity2.setName("社区活动"); |
| | | activity2.setNum(63); |
| | | completetPoint2.add(activity2); |
| | | comActWorkScreenVO.setNonePoint(completetPoint2); |
| | | //未完成 |
| | | comActWorkScreenVO.setNoneList(comActNeighborCircleDAO.countAllNoneCompletedWorkByCommunityId(communityId)); |
| | | comActWorkScreenVO.setTotalCompleted(comActWorkScreenVO.getCompletetList().stream().mapToInt(PieElementVO::getNum).sum()); |
| | | comActWorkScreenVO.setTotalNoneCompleted(comActWorkScreenVO.getNoneList().stream().mapToInt(PieElementVO::getNum).sum()); |
| | | |
| | | //统计平均耗时、平均每天完成个数 |
| | | Map<String,Object> avgMap = comActNeighborCircleDAO.countAvgByCommunityId(communityId); |
| | | comActWorkScreenVO.setAvgTime(avgMap.get("avgTime") == null?"0h":convertTimeStr(Double.valueOf(avgMap.get("avgTime").toString()).intValue())); |
| | | |
| | | ComActDO comActDO = comActDAO.selectById(communityId); |
| | | BigDecimal days = new BigDecimal(DateUtil.betweenDay(comActDO.getCreateAt(),new Date(),false)); |
| | | BigDecimal num = new BigDecimal(comActWorkScreenVO.getTotalCompleted()); |
| | | BigDecimal rt = num.divide(days,1, RoundingMode.HALF_UP); |
| | | comActWorkScreenVO.setEveryDayNum(rt.toString()); |
| | | return R.ok(comActWorkScreenVO); |
| | | } |
| | | |
| | | private String convertTimeStr(int minute) { |
| | | int hour = minute/60; |
| | | int min = minute%60; |
| | | StringBuilder timestr = new StringBuilder(); |
| | | if(hour > 0){ |
| | | timestr.append(hour).append("h"); |
| | | } |
| | | if(min > 0){ |
| | | timestr.append(min).append("min"); |
| | | } |
| | | return timestr.toString(); |
| | | } |
| | | |
| | | @Override |
| | | public R dynamicWork(Long communityId){ |
| | | ComDynamicWorkScreenVO workScreenVO = new ComDynamicWorkScreenVO(); |
| | | String date = DateUtils.getDateFormatString(new Date(),moth_format_str); |
| | | Map<String,Long> countMap = comActDynDAO.countByCommunityId(communityId,date); |
| | | if(!countMap.isEmpty()){ |
| | | workScreenVO.setTotalNum(countMap.get("dynTotal")== null ? 0L : Long.valueOf(countMap.get("dynTotal").toString())); |
| | | workScreenVO.setCurrentNum(countMap.get("currentNum")== null ? 0L : Long.valueOf(countMap.get("currentNum").toString())); |
| | | } |
| | | |
| | | //计算平均每天动态 |
| | | DateScreenVO countAvg = comActDynDAO.countByAvgCommunityId(communityId); |
| | | if(countAvg != null){ |
| | | int day = DateUtils.differentDays(countAvg.getStartTime(),countAvg.getEndTime()); |
| | | if(day > 0){ |
| | | workScreenVO.setCurrentAvgNum(workScreenVO.getTotalNum().intValue()/day); |
| | | } |
| | | } |
| | | |
| | | //查询最新的10条社区动态 |
| | | List<String> dynList = new ArrayList<>(); |
| | | List<ComActDynDO> actDynDOList = comActDynDAO.selectList(new QueryWrapper<ComActDynDO>().lambda().eq(ComActDynDO::getCommunityId,communityId).orderByDesc(ComActDynDO::getCreateAt).last("limit 10")); |
| | | if(!actDynDOList.isEmpty()){ |
| | | actDynDOList.forEach(actDyn -> { |
| | | dynList.add(actDyn.getTitle()); |
| | | }); |
| | | } |
| | | workScreenVO.setDynList(dynList); |
| | | |
| | | //统计近半年数据 |
| | | List<DynamicWorkVO> list = new ArrayList<>(); |
| | | for(DynamicWorkVO dynamicWorkVO: listHalfYearByDyn()){ |
| | | DynamicWorkVO result = comActDynDAO.countByTime(dynamicWorkVO.getStart(),dynamicWorkVO.getEnd(),communityId); |
| | | result.setMonth(dynamicWorkVO.getMonth()); |
| | | list.add(result); |
| | | } |
| | | workScreenVO.setList(list); |
| | | |
| | | return R.ok(workScreenVO); |
| | | } |
| | | |
| | | private List<DynamicWorkVO> listHalfYearByDyn() { |
| | | List<DynamicWorkVO> dateList = new ArrayList<>(); |
| | | Date now = new Date(); |
| | | for(int i= 6;i>=1;i--){ |
| | | Date date = DateUtils.getDateM(now,-i); |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | // if(m == 0){ |
| | | // m = 12; |
| | | // } |
| | | // m--; |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day/2; |
| | | String month = DateUtil.format(date,moth_format_str); |
| | | DynamicWorkVO dynamicWorkVO = new DynamicWorkVO(); |
| | | dynamicWorkVO.setMonth(monthStr[m]+"月上旬"); |
| | | dynamicWorkVO.setStart(month+ "-01 00:00:00"); |
| | | dynamicWorkVO.setEnd(month+ "-"+half+" 23:59:58"); |
| | | dateList.add(dynamicWorkVO); |
| | | DynamicWorkVO dynamicWorkVO1 = new DynamicWorkVO(); |
| | | dynamicWorkVO1.setMonth(monthStr[m]+"月下旬"); |
| | | dynamicWorkVO1.setStart(month+ "-"+half+" 23:59:58"); |
| | | dynamicWorkVO1.setEnd(DateUtils.getDateFormatString(endDay,"yyyy-MM-dd HH:mm:ss")); |
| | | dateList.add(dynamicWorkVO1); |
| | | } |
| | | return dateList; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActEasyPhotoActivityMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="status" property="status" /> |
| | | <result column="content" property="content" /> |
| | | <result column="activity_start_at" property="activityStartAt" /> |
| | | <result column="activity_ent_at" property="activityEndAt" /> |
| | | <result column="release_at" property="releaseAt" /> |
| | | <result column="good_reward" property="goodReward" /> |
| | | <result column="excellent_reward" property="excellentReward" /> |
| | | <result column="ordinary_reward" property="ordinaryReward" /> |
| | | <result column="count" property="count" /> |
| | | <result column="logo" property="logo" /> |
| | | <result column="create_at" property="createAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, status, content, activity_start_at, activity_end_at, release_at, good_reward, excellent_reward, ordinary_reward, count, create_at, logo |
| | | </sql> |
| | | |
| | | </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.ComActEasyPhotoActivityRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityRecordDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="activity_id" property="activityId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="easy_id" property="easyId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="reward_amount" property="rewardAmount" /> |
| | | <result column="join_at" property="joinAt" /> |
| | | <result column="create_at" property="createAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, activity_id, community_id, easy_id, type, reward_amount, join_at, create_at |
| | | </sql> |
| | | |
| | | </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.ComActUserWalletChangeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActUserWalletChangeDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="income_amount_top" property="incomeAmountTop" /> |
| | | <result column="income_amount_back" property="incomeAmountBack" /> |
| | | <result column="available_amount_top" property="availableAmountTop" /> |
| | | <result column="available_amount_back" property="availableAmountBack" /> |
| | | <result column="settlement_amount_top" property="settlementAmountTop" /> |
| | | <result column="settlement_amount_back" property="settlementAmountBack" /> |
| | | <result column="service_id" property="serviceId" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="wallet_id" property="walletId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, community_id, wallet_id, income_amount_top, income_amount_back, available_amount_top, available_amount_back, settlement_amount_top, settlement_amount_back, service_id, create_at |
| | | </sql> |
| | | |
| | | </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.ComActUserWalletMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActUserWalletDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="income_amount" property="incomeAmount" /> |
| | | <result column="available_amount" property="availableAmount" /> |
| | | <result column="settlement_amount" property="settlementAmount" /> |
| | | <result column="easy_count" property="easyCount" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, community_id, income_amount, available_amount, settlement_amount, easy_count, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="getCommunityName" resultType="Map"> |
| | | SELECT |
| | | ca.`name`, |
| | | sua.content |
| | | FROM |
| | | com_act AS ca |
| | | LEFT JOIN sys_user_agreement AS sua ON sua.community_id = ca.community_id |
| | | WHERE |
| | | ca.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="getWalletRanking" resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO"> |
| | | SELECT |
| | | su.nick_name, |
| | | cauw.income_amount, |
| | | cauw.easy_count |
| | | FROM |
| | | com_act_user_wallet AS cauw |
| | | LEFT JOIN sys_user AS su ON su.user_id = cauw.user_id |
| | | where cauw.community_id = #{walletTradeDTO.communityId} |
| | | ORDER BY |
| | | cauw.income_amount 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.ComActUserWalletTradeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActUserWalletTradeDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="service_id" property="serviceId" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="type" property="type" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="wallet_id" property="walletId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, community_id, service_id, amount, type, remark, create_at, create_by, wallet_id |
| | | </sql> |
| | | |
| | | <select id="getUserWalletTradeList" resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeVO" |
| | | parameterType="com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO"> |
| | | SELECT |
| | | cauwt.id, |
| | | ca.`name` AS communityName, |
| | | cauwt.type, |
| | | cauwt.remark, |
| | | cauwt.change_type, |
| | | cauwt.amount, |
| | | cauwt.create_at |
| | | FROM |
| | | com_act_user_wallet_trade AS cauwt |
| | | LEFT JOIN com_act AS ca ON ca.community_id = cauwt.community_id |
| | | where cauwt.community_id = #{walletTradeDTO.communityId} |
| | | and cauwt.user_id = #{walletTradeDTO.userId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | return eventService.getScreenEventList(eventListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 工作大屏-事件播报数据统计 |
| | | * @param communityId 社区id |
| | | * @return 事件播报数据统计 |
| | | */ |
| | | @GetMapping("/work/event") |
| | | public R eventWork(@RequestParam("communityId")Long communityId) { |
| | | return eventService.eventWork(communityId); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | R add(@RequestParam("ids") String ids,@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId){ |
| | | R add(@RequestParam("ids") String ids,@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId) throws Exception { |
| | | return eventVisitingTasksService.add(ids,communityId,userId); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/taskList") |
| | | R taskList(@RequestBody EventTasksQuery query){ |
| | | R taskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | |
| | | return eventVisitingTasksService.taskList(query); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/exportTaskList") |
| | | List<EventVisitingTasksVO> exportTaskList(@RequestBody EventTasksQuery query){ |
| | | List<EventVisitingTasksVO> exportTaskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | return eventVisitingTasksService.exportTaskList(query); |
| | | } |
| | | |
| | |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventListVO; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.model.vos.screen.DateScreenVO; |
| | | import com.panzhihua.common.model.vos.screen.EventDetailWorkVO; |
| | | import com.panzhihua.common.model.vos.screen.EventTypeWorkVO; |
| | | import com.panzhihua.common.model.vos.screen.EventWorkVO; |
| | | import com.panzhihua.service_grid.model.dos.EventDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | IPage<EventSpecialPopulationVO> specialPopulationList(Page page, @Param("specialPopulationDTO") PageEventSpecialPopulationDTO specialPopulationDTO); |
| | | |
| | | Map<String,Long> countByCommunityId(@Param("communityId") Long communityId,@Param("nowDate")String nowDate); |
| | | |
| | | DateScreenVO countByAvgCommunityId(@Param("communityId") Long communityId); |
| | | |
| | | List<EventDetailWorkVO> getWorkScreenEventList(@Param("communityId") Long communityId); |
| | | |
| | | EventWorkVO countByTime(@Param("start")String start, @Param("end")String end, @Param("communityId")Long communityId); |
| | | |
| | | EventTypeWorkVO getComplete(@Param("communityId") Long communityId); |
| | | |
| | | EventTypeWorkVO getNoComplete(@Param("communityId") Long communityId); |
| | | } |
| | |
| | | Integer cancel(@Param("id")Long id,@Param("status") Integer status); |
| | | |
| | | Map<String, Object> findUserById(Long userId); |
| | | |
| | | String getLabel(Long id); |
| | | } |
| | |
| | | * 家庭来源 |
| | | */ |
| | | private String familySource; |
| | | |
| | | /** |
| | | * 访问后的填写的地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 访问后的经纬度 |
| | | */ |
| | | private String latLng; |
| | | |
| | | /** |
| | | * 本地或外地:1本地2外地 |
| | | */ |
| | | private Integer outOrLocal; |
| | | |
| | | |
| | | /** |
| | | * 网格ID |
| | | */ |
| | |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | Boolean updateLcUploadFlag(Long id); |
| | | |
| | | R eventWork(Long communityId); |
| | | } |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | R taskList(EventTasksQuery query); |
| | | R taskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 删除走访任务 |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R add(String ids, Long communityId, Long userId); |
| | | R add(String ids, Long communityId, Long userId) throws Exception; |
| | | |
| | | List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query); |
| | | List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 撤销 |
| | |
| | | package com.panzhihua.service_grid.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventListVO; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.model.vos.screen.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.ExcelSelectListUtil; |
| | | import com.panzhihua.common.utlis.LngLatUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | private EventGridDataService eventGridDataService; |
| | | @Resource |
| | | private EventResourceMapper eventResourceMapper; |
| | | |
| | | private final String moth_format_str = "yyyy-MM"; |
| | | |
| | | private final String[] monthStr = new String[]{"一","二","三","四","五","六","七","八","九","十","十一","十二"}; |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public R eventWork(Long communityId){ |
| | | EventWorkScreenVO workScreenVO = new EventWorkScreenVO(); |
| | | String date = DateUtils.getDateFormatString(new Date(),moth_format_str); |
| | | Map<String,Long> countMap = this.eventMapper.countByCommunityId(communityId,date); |
| | | if(!countMap.isEmpty()){ |
| | | workScreenVO.setResolvedNum(countMap.get("resolvedNum")== null ? 0L : Long.valueOf(countMap.get("resolvedNum").toString())); |
| | | workScreenVO.setPendingNum(countMap.get("pendingNum")== null ? 0L : Long.valueOf(countMap.get("pendingNum").toString())); |
| | | workScreenVO.setPropagandaNum(countMap.get("propagandaNum")== null ? 0L : Long.valueOf(countMap.get("propagandaNum").toString())); |
| | | workScreenVO.setCurrentNum(countMap.get("currentNum")== null ? 0L : Long.valueOf(countMap.get("currentNum").toString())); |
| | | } |
| | | |
| | | //计算处理时间消耗的时间 |
| | | DateScreenVO countAvg = this.eventMapper.countByAvgCommunityId(communityId); |
| | | if(countAvg != null){ |
| | | int second = (int) (countAvg.getStartTime().getTime() - countAvg.getEndTime().getTime())/1000; |
| | | if(second > 0){ |
| | | second = second/workScreenVO.getResolvedNum().intValue(); |
| | | workScreenVO.setAvgCost(second); |
| | | } |
| | | } |
| | | //查询最新事件轮播列表 |
| | | List<EventDetailWorkVO> eventList = this.eventMapper.getWorkScreenEventList(communityId); |
| | | if(!eventList.isEmpty()){ |
| | | workScreenVO.setEventList(eventList); |
| | | } |
| | | |
| | | //统计近半年数据 |
| | | List<EventWorkVO> list = new ArrayList<>(); |
| | | for(EventWorkVO eventWorkVO: listHalfYearByDyn()){ |
| | | EventWorkVO result = this.eventMapper.countByTime(eventWorkVO.getStart(),eventWorkVO.getEnd(),communityId); |
| | | result.setMonth(eventWorkVO.getMonth()); |
| | | list.add(result); |
| | | } |
| | | workScreenVO.setList(list); |
| | | |
| | | //查询完成事件统计 |
| | | EventTypeWorkVO complete = this.eventMapper.getComplete(communityId); |
| | | if(complete != null){ |
| | | workScreenVO.setComplete(complete); |
| | | } |
| | | //查询未完成事件统计 |
| | | EventTypeWorkVO noComplete = this.eventMapper.getNoComplete(communityId); |
| | | if(complete != null){ |
| | | workScreenVO.setNoComplete(noComplete); |
| | | } |
| | | return R.ok(workScreenVO); |
| | | } |
| | | |
| | | private List<EventWorkVO> listHalfYearByDyn() { |
| | | List<EventWorkVO> dateList = new ArrayList<>(); |
| | | Date now = new Date(); |
| | | for(int i= 6;i>=1;i--){ |
| | | Date date = DateUtils.getDateM(now,-i); |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | // if(m == 0){ |
| | | // m = 11; |
| | | // } |
| | | // m--; |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day/2; |
| | | String month = DateUtil.format(date,moth_format_str); |
| | | EventWorkVO eventWorkVO = new EventWorkVO(); |
| | | eventWorkVO.setMonth(monthStr[m]+"月上旬"); |
| | | eventWorkVO.setStart(month+ "-01 00:00:00"); |
| | | eventWorkVO.setEnd(month+ "-"+half+" 23:59:58"); |
| | | dateList.add(eventWorkVO); |
| | | EventWorkVO eventWorkVO1 = new EventWorkVO(); |
| | | eventWorkVO1.setMonth(monthStr[m]+"月下旬"); |
| | | eventWorkVO1.setStart(month+ "-"+half+" 23:59:58"); |
| | | eventWorkVO1.setEnd(DateUtils.getDateFormatString(endDay,"yyyy-MM-dd HH:mm:ss")); |
| | | dateList.add(eventWorkVO1); |
| | | } |
| | | return dateList; |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | EventServiceImpl service = new EventServiceImpl(); |
| | | List<EventWorkVO> list = service.listHalfYearByDyn(); |
| | | System.out.println(list); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_grid.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.PopulPoliticalOutlookEnum; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventVisitingTasksDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.crypto.BadPaddingException; |
| | | import javax.crypto.IllegalBlockSizeException; |
| | | import javax.crypto.NoSuchPaddingException; |
| | | import java.security.InvalidKeyException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | * @param eventVisitingTasksAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | public R add(EventVisitingTasksAddDTO eventVisitingTasksAddDTO) { |
| | | public R add(EventVisitingTasksAddDTO eventVisitingTasksAddDTO){ |
| | | EventVisitingTasksDO eventVisitingTasksDO = new EventVisitingTasksDO(); |
| | | BeanUtils.copyProperties(eventVisitingTasksAddDTO, eventVisitingTasksDO); |
| | | eventVisitingTasksDO.setCreateAt(new Date()); |
| | | if (eventVisitingTasksMapper.insert(eventVisitingTasksDO) > 0) { |
| | | if(eventVisitingTasksMapper.insert(eventVisitingTasksDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | |
| | | /** |
| | | * 修改重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R edit(EventVisitingTasksEditDTO eventVisitingTasksEditDTO) { |
| | | public R edit(EventVisitingTasksEditDTO eventVisitingTasksEditDTO){ |
| | | EventVisitingTasksDO eventVisitingTasksDO = new EventVisitingTasksDO(); |
| | | BeanUtils.copyProperties(eventVisitingTasksEditDTO, eventVisitingTasksDO); |
| | | //eventVisitingTasksDO.setUpdateAt(new Date()); |
| | | if (eventVisitingTasksMapper.updateById(eventVisitingTasksDO) > 0) { |
| | | if(eventVisitingTasksMapper.updateById(eventVisitingTasksDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | |
| | | /** |
| | | * 分页查找重点人群走访记录 |
| | | * |
| | | * @param pageEventVisitingTasksDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R<IPage<EventVisitingTasksVO>> query(PageEventVisitingTasksDTO pageEventVisitingTasksDTO) { |
| | | Page page = new Page(1, 10); |
| | | if (pageEventVisitingTasksDTO.getPageNum() != null) { |
| | | public R<IPage<EventVisitingTasksVO>> query(PageEventVisitingTasksDTO pageEventVisitingTasksDTO){ |
| | | Page page = new Page(1,10); |
| | | if(pageEventVisitingTasksDTO.getPageNum()!=null) { |
| | | page.setCurrent(pageEventVisitingTasksDTO.getPageNum()); |
| | | } |
| | | if (pageEventVisitingTasksDTO.getPageSize() != null) { |
| | | if(pageEventVisitingTasksDTO.getPageSize()!=null) { |
| | | page.setSize(pageEventVisitingTasksDTO.getPageSize()); |
| | | } |
| | | return R.ok(); |
| | |
| | | * @param EventVisitingTasksDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | public R delete(EventVisitingTasksDeleteDTO EventVisitingTasksDeleteDTO) { |
| | | public R delete(EventVisitingTasksDeleteDTO EventVisitingTasksDeleteDTO){ |
| | | return R.fail(); |
| | | } |
| | | |
| | |
| | | * @param id 重点人群走访记录 id |
| | | * @return 查找结果 |
| | | */ |
| | | public R<EventVisitingTasksDetailsVO> eventVisitingTasksDetails(Long id) { |
| | | public R<EventVisitingTasksDetailsVO> eventVisitingTasksDetails(Long id){ |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if (eventVisitingTasksDO != null) { |
| | | if(eventVisitingTasksDO!=null) { |
| | | EventVisitingTasksDetailsVO eventVisitingTasksDetailsVO = new EventVisitingTasksDetailsVO(); |
| | | BeanUtils.copyProperties(eventVisitingTasksDO, eventVisitingTasksDetailsVO); |
| | | eventVisitingTasksDetailsVO.setImgList(eventResourceMapper.findListByRefId(eventVisitingTasksDO.getId(), 2, 1)); |
| | | eventVisitingTasksDetailsVO.setVosList(eventResourceMapper.findListByRefId(eventVisitingTasksDO.getId(), 2, 2)); |
| | | eventVisitingTasksDetailsVO.setVideoList(eventResourceMapper.findListByRefId(eventVisitingTasksDO.getId(), 2, 3)); |
| | | eventVisitingTasksDetailsVO.setImgList(eventResourceMapper.findListByRefId(eventVisitingTasksDO.getId(),2,1)); |
| | | eventVisitingTasksDetailsVO.setVosList(eventResourceMapper.findListByRefId(eventVisitingTasksDO.getId(),2,2)); |
| | | eventVisitingTasksDetailsVO.setVideoList(eventResourceMapper.findListByRefId(eventVisitingTasksDO.getId(),2,3)); |
| | | return R.ok(eventVisitingTasksDetailsVO); |
| | | } |
| | | return R.fail(); |
| | |
| | | @Override |
| | | public R count(Long communityId) { |
| | | |
| | | Map<String, Long> countMap = eventVisitingTasksMapper.count(communityId); |
| | | Map<String,Long> countMap = eventVisitingTasksMapper.count(communityId); |
| | | EventVisitCountVO eventVisitCountVO = new EventVisitCountVO(); |
| | | eventVisitCountVO.setVisit(countMap.get("visit")); |
| | | eventVisitCountVO.setVisited(countMap.get("visited")); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R taskList(EventTasksQuery query) { |
| | | public R taskList(EventTasksQuery query) throws Exception{ |
| | | |
| | | IPage<EventVisitingTasksVO> page = eventVisitingTasksMapper.findListByPage(new Page(query.getPageNum(), query.getPageSize()), query); |
| | | IPage<EventVisitingTasksVO> page = eventVisitingTasksMapper.findListByPage(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | for(EventVisitingTasksVO eventVisitingTasksVO:page.getRecords()){ |
| | | if(eventVisitingTasksVO.getNationCode() != null){ |
| | | eventVisitingTasksVO.setNation(PopulPoliticalOutlookEnum.getCnDescByName(eventVisitingTasksVO.getNationCode())); |
| | | } |
| | | if(eventVisitingTasksVO.getVisiterTele() != null){ |
| | | |
| | | } |
| | | eventVisitingTasksVO.setVisiterTele(AESUtil.decrypt128(eventVisitingTasksVO.getVisiterTele(), aesKey)); |
| | | } |
| | | page.getRecords().forEach(e->{ |
| | | |
| | | }); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public R delete(String ids, Long communityId) { |
| | | String[] idarr = ids.split(","); |
| | | for (String id : idarr) { |
| | | if (StringUtils.isEmpty(id)) { |
| | | for(String id:idarr){ |
| | | if(StringUtils.isEmpty(id)){ |
| | | continue; |
| | | } |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectOne(new QueryWrapper<EventVisitingTasksDO>().eq("id", Long.valueOf(id)).eq("grid_member_community", communityId)); |
| | | if (eventVisitingTasksDO == null) { |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectOne(new QueryWrapper<EventVisitingTasksDO>().eq("id",Long.valueOf(id)).eq("grid_member_community",communityId)); |
| | | if(eventVisitingTasksDO == null){ |
| | | throw new RuntimeException("无权限"); |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | |
| | | |
| | | @Override |
| | | public R visitorList(EventVisitListQuery query) { |
| | | IPage<EventVisitListVO> page = eventVisitingTasksMapper.visitorList(new Page(query.getPageNum(), query.getPageSize()), query); |
| | | IPage<EventVisitListVO> page = eventVisitingTasksMapper.visitorList(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @Override |
| | | public R list(EventTasksQuery query) { |
| | | IPage<AppVisitTasksVO> page = eventVisitingTasksMapper.list(new Page(query.getPageNum(), query.getPageSize()), query); |
| | | IPage<AppVisitTasksVO> page = eventVisitingTasksMapper.list(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @Override |
| | | public R detail(Long id) throws Exception { |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if (eventVisitingTasksDO != null) { |
| | | if(eventVisitingTasksDO!=null) { |
| | | EventVisitingTasksDetailsVO eventVisitingTasksDetailsVO = new EventVisitingTasksDetailsVO(); |
| | | BeanUtils.copyProperties(eventVisitingTasksDO, eventVisitingTasksDetailsVO); |
| | | ; |
| | | eventVisitingTasksDetailsVO.setVisiterTele(AESUtil.decrypt128(eventVisitingTasksDO.getVisiterTele(), aesKey)); |
| | | eventVisitingTasksDetailsVO.setTableContentJson(JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson())); |
| | | return R.ok(eventVisitingTasksDetailsVO); |
| | | } |
| | | return R.fail(); |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R add(String ids, Long communityId, Long userId) { |
| | | Map<String, Object> map = eventVisitingTasksMapper.findUserByCommunityId(communityId, 6); |
| | | if (CollectionUtils.isEmpty(map)) { |
| | | public R add(String ids, Long communityId, Long userId) throws Exception { |
| | | Map<String,Object> map = eventVisitingTasksMapper.findUserByCommunityId(communityId,6); |
| | | if(CollectionUtils.isEmpty(map)){ |
| | | return R.fail("网格员不存在"); |
| | | } |
| | | String[] id = ids.split(","); |
| | | for (String idstr : id) { |
| | | if (StringUtils.isEmpty(idstr)) { |
| | | for(String idstr:id){ |
| | | if(StringUtils.isEmpty(idstr)){ |
| | | continue; |
| | | } |
| | | addVisitingTask(Long.valueOf(idstr), map, communityId, userId); |
| | | addVisitingTask(Long.valueOf(idstr),map,communityId,userId); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query) { |
| | | IPage<EventVisitingTasksVO> page = eventVisitingTasksMapper.findListByPage(new Page(query.getPageNum(), query.getPageSize()), query); |
| | | |
| | | public List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query) throws Exception { |
| | | IPage<EventVisitingTasksVO> page = eventVisitingTasksMapper.findListByPage(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | return page.getRecords(); |
| | | } |
| | | |
| | | |
| | | private void addVisitingTask(Long id, Map<String, Object> gridMap, Long communityId, Long userId) { |
| | | |
| | | private void addVisitingTask(Long id, Map<String, Object> gridMap,Long communityId,Long userId) throws Exception{ |
| | | |
| | | Integer count = eventVisitingTasksMapper.countNoneComplete(id); |
| | | if (count > 0) { |
| | | if(count > 0){ |
| | | return; |
| | | } |
| | | Map<String, Object> map = eventVisitingTasksMapper.findPopulationById(id); |
| | | if (CollectionUtils.isEmpty(map)) { |
| | | return; |
| | | Map<String,Object> map = eventVisitingTasksMapper.findPopulationById(id); |
| | | if(CollectionUtils.isEmpty(map)){ |
| | | return ; |
| | | } |
| | | EventVisitingTasksDO visitingTasksDO = new EventVisitingTasksDO(); |
| | | // visitingTasksDO.setGridMemberStreet(Long.valueOf(gridMap.get("street_id").toString())); |
| | |
| | | visitingTasksDO.setVisiterId(Long.valueOf(map.get("id").toString())); |
| | | visitingTasksDO.setVisiterName(map.get("name").toString()); |
| | | visitingTasksDO.setVisiterSex(Integer.valueOf(map.get("sex").toString())); |
| | | visitingTasksDO.setVisiterTele(map.get("phone") == null ? "" : map.get("phone").toString()); |
| | | if(map.get("phone") != null){ |
| | | visitingTasksDO.setVisiterTele(AESUtil.decrypt128(map.get("phone").toString(),aesKey)); |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | sb.append(map.get("address")).append(map.get("road")).append(map.get("door_no")).append(map.get("floor")).append("栋").append(map.get("unit_no")).append("单元").append(map.get("house_no")).append("号"); |
| | | visitingTasksDO.setVisiterAddress(sb.toString()); |
| | | visitingTasksDO.setVisiterType(0); |
| | | visitingTasksDO.setActOpara(0); |
| | | if (map.get("lat") != null && map.get("lng") != null) { |
| | | visitingTasksDO.setHappentLatLng(map.get("lat") + "-" + map.get("lng")); |
| | | if(map.get("lat") != null && map.get("lng") != null){ |
| | | visitingTasksDO.setHappentLatLng(map.get("lat")+"-"+map.get("lng")); |
| | | } |
| | | visitingTasksDO.setEventStatus(EventTasksStatusEnum.DZF.getCode()); |
| | | visitingTasksDO.setReporting(0); |
| | |
| | | visitingTasksDO.setUrgent(false); |
| | | visitingTasksDO.setUrgentDell(false); |
| | | visitingTasksDO.setCreateBy(userId); |
| | | visitingTasksDO.setOutOrLocal(map.get("out_or_local") == null?null:Integer.valueOf(map.get("out_or_local").toString())); |
| | | |
| | | if(map.get("label") != null){ |
| | | List<String> option = getOption(map.get("label").toString()); |
| | | if(!CollectionUtils.isEmpty(option)){ |
| | | JSONObject json = new JSONObject(); |
| | | json.put("option",option); |
| | | visitingTasksDO.setTableContentJson(json.toJSONString()); |
| | | } |
| | | } |
| | | |
| | | eventVisitingTasksMapper.insert(visitingTasksDO); |
| | | } |
| | | |
| | | private List<String> getOption(String label) { |
| | | List<String> option = new ArrayList<>(); |
| | | if(!Objects.isNull(label)) { |
| | | if (label.contains("精神障碍")) { |
| | | option.add("精神障碍异常1"); |
| | | option.add("精神障碍异常2"); |
| | | option.add("精神障碍异常3"); |
| | | option.add("精神障碍异常4"); |
| | | |
| | | } else if (label.contains("吸毒")) { |
| | | option.add("疑似复吸"); |
| | | option.add("失联"); |
| | | option.add("复吸"); |
| | | option.add("空挂户"); |
| | | } else if (label.contains("刑满释放")) { |
| | | option.add("刑满释放异常1"); |
| | | option.add("刑满释放异常2"); |
| | | option.add("刑满释放异常3"); |
| | | option.add("刑满释放异常4"); |
| | | } else if (label.contains("社区矫正")) { |
| | | option.add("社区矫正异常1"); |
| | | option.add("社区矫正异常2"); |
| | | option.add("社区矫正异常3"); |
| | | option.add("社区矫正异常4"); |
| | | } |
| | | } |
| | | return option; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | public R cancel(Long id) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if (eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()) { |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()){ |
| | | return R.fail("当前状态不可撤销"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.cancel(id, EventTasksStatusEnum.YCX.getCode()); |
| | | if (rt > 0) { |
| | | int rt = eventVisitingTasksMapper.cancel(id,EventTasksStatusEnum.YCX.getCode()); |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | public R reset(Long id) { |
| | | |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if (eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.YCX.getCode()) { |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.YCX.getCode()){ |
| | | return R.fail("当前状态不可恢复"); |
| | | } |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(id, EventTasksStatusEnum.DZF.getCode()); |
| | | if (rt > 0) { |
| | | int rt = eventVisitingTasksMapper.updateEventStatus(id,EventTasksStatusEnum.DZF.getCode()); |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public synchronized R start(Long id, Long userId) { |
| | | public synchronized R start(Long id,Long userId) { |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if (eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()) { |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()){ |
| | | return R.fail("当前状态不可开始走访"); |
| | | } |
| | | Map<String, Object> map = eventVisitingTasksMapper.findUserById(userId); |
| | | Map<String,Object> map = eventVisitingTasksMapper.findUserById(userId); |
| | | EventVisitingTasksDO start = new EventVisitingTasksDO(); |
| | | start.setId(id); |
| | | start.setGridMemberStreet(Long.valueOf(map.get("street_id").toString())); |
| | | start.setGridMemberCommunity(Long.valueOf(map.get("community_id").toString())); |
| | | start.setGridMember(Long.valueOf(map.get("user_id").toString())); |
| | | start.setGridMemberName(map.get("name").toString()); |
| | | start.setGridMenberTele(map.get("phone") == null ? "" : map.get("phone").toString()); |
| | | start.setGridMenberTele(map.get("phone") ==null?"":map.get("phone").toString()); |
| | | start.setEventStatus(EventTasksStatusEnum.JXZ.getCode()); |
| | | int rt = eventVisitingTasksMapper.start(start); |
| | | if (rt > 0) { |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | @Override |
| | | public R complete(EventVisitCompleteDTO taskCompleteDTO) { |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(taskCompleteDTO.getId()); |
| | | if (eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.JXZ.getCode()) { |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.JXZ.getCode()){ |
| | | return R.fail("当前状态不可完成走访"); |
| | | } |
| | | if (taskCompleteDTO.getException().intValue() == 0) { |
| | | if(taskCompleteDTO.getException().intValue() == 0){ |
| | | taskCompleteDTO.setEventStatus(EventTasksStatusEnum.ZJJJ.getCode()); |
| | | } else { |
| | | }else{ |
| | | taskCompleteDTO.setEventStatus(EventTasksStatusEnum.YC.getCode()); |
| | | } |
| | | |
| | | if (!CollectionUtils.isEmpty(taskCompleteDTO.getImgList())) { |
| | | taskCompleteDTO.getImgList().forEach(e -> { |
| | | createResource(eventVisitingTasksDO.getId(), eventVisitingTasksDO.getDellUserId(), 2, 1, e); |
| | | JSONObject json = JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson()); |
| | | json.put("check",taskCompleteDTO.getOption()); |
| | | taskCompleteDTO.setOption(json.toJSONString()); |
| | | |
| | | if(!CollectionUtils.isEmpty(taskCompleteDTO.getImgList())){ |
| | | taskCompleteDTO.getImgList().forEach(e->{ |
| | | createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,1,e); |
| | | }); |
| | | } |
| | | if (!CollectionUtils.isEmpty(taskCompleteDTO.getVosList())) { |
| | | taskCompleteDTO.getVosList().forEach(e -> { |
| | | createResource(eventVisitingTasksDO.getId(), eventVisitingTasksDO.getDellUserId(), 2, 2, e); |
| | | if(!CollectionUtils.isEmpty(taskCompleteDTO.getVosList())){ |
| | | taskCompleteDTO.getVosList().forEach(e->{ |
| | | createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,2,e); |
| | | }); |
| | | } |
| | | if (!CollectionUtils.isEmpty(taskCompleteDTO.getVideoList())) { |
| | | taskCompleteDTO.getVosList().forEach(e -> { |
| | | createResource(eventVisitingTasksDO.getId(), eventVisitingTasksDO.getDellUserId(), 2, 3, e); |
| | | if(!CollectionUtils.isEmpty(taskCompleteDTO.getVideoList())){ |
| | | taskCompleteDTO.getVosList().forEach(e->{ |
| | | createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,3,e); |
| | | }); |
| | | } |
| | | |
| | | int rt = eventVisitingTasksMapper.complete(taskCompleteDTO); |
| | | if (rt > 0) { |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | <select id="getMapGridListByApp" resultType="com.panzhihua.common.model.vos.grid.EventMapGridVO"> |
| | | SELECT |
| | | grid_id, |
| | | grid_name |
| | | grid_name, |
| | | grid_community_id |
| | | FROM |
| | | event_grid_member_relation |
| | | WHERE |
| | |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="countByCommunityId" resultType="Map"> |
| | | SELECT |
| | | count( e.id ) AS resolvedNum, |
| | | ( |
| | | SELECT |
| | | count( e1.id ) |
| | | FROM |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | egd1.grid_community_id = #{communityId} |
| | | AND e1.event_category = 1 |
| | | AND e1.event_process_status = 1 |
| | | AND e1.event_status |
| | | AND e1.event_deal_status = 1 |
| | | ) AS pendingNum, |
| | | ( |
| | | SELECT |
| | | count( e2.id ) |
| | | FROM |
| | | `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | WHERE |
| | | egd2.grid_community_id = #{communityId} |
| | | AND e2.event_category = 2 |
| | | AND e2.event_status = 2 |
| | | ) AS propagandaNum, |
| | | ( |
| | | SELECT |
| | | count( e3.id ) |
| | | FROM |
| | | `event` AS e3 |
| | | LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id |
| | | WHERE |
| | | e3.event_status = 2 |
| | | AND e3.create_at LIKE CONCAT(#{nowDate},'%')) as currentNum |
| | | |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_category = 1 |
| | | AND e.event_process_status = 2 |
| | | AND e.event_deal_status = 4 |
| | | </select> |
| | | |
| | | <select id="countByAvgCommunityId" resultType="com.panzhihua.common.model.vos.screen.DateScreenVO"> |
| | | SELECT |
| | | e.create_at AS startTime,( |
| | | SELECT |
| | | e1.create_at |
| | | FROM |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | egd1.grid_community_id = #{communityId} |
| | | AND e1.event_process_status = 2 |
| | | ORDER BY |
| | | e1.create_at DESC |
| | | LIMIT 1 |
| | | ) AS endTime |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_process_status = 2 |
| | | ORDER BY |
| | | e.create_at ASC |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getWorkScreenEventList" resultType="com.panzhihua.common.model.vos.screen.EventDetailWorkVO"> |
| | | SELECT |
| | | e.id, |
| | | su.nick_name AS userName, |
| | | su.image_url, |
| | | e.create_at, |
| | | e.event_type, |
| | | e.event_process_status, |
| | | e.event_deal_status, |
| | | e.major, |
| | | e.red_card, |
| | | e.yellow_card, |
| | | e.urgent, |
| | | e.danger_level, |
| | | e.event_des, |
| | | e.happen_address, |
| | | e.happent_address, |
| | | e.happent_lat_lng |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | ORDER BY |
| | | e.create_at DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | <select id="countByTime" resultType="com.panzhihua.common.model.vos.screen.EventWorkVO"> |
| | | SELECT |
| | | ( |
| | | SELECT |
| | | COUNT( e.id ) |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} and e.event_status = 2 AND e.create_at <![CDATA[<=]]> #{end}) AS eventTotal, |
| | | ( |
| | | SELECT |
| | | COUNT( e1.id ) |
| | | FROM |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | egd1.grid_community_id = #{communityId} and e1.event_status = 2 AND #{start} <![CDATA[<=]]> e1.create_at AND e1.create_at <![CDATA[<=]]> #{end}) AS eventAdd, |
| | | ( |
| | | SELECT |
| | | COUNT( e2.id ) |
| | | FROM |
| | | `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | WHERE |
| | | egd2.grid_community_id = #{communityId} and e2.event_process_status = 2 AND #{start} <![CDATA[<=]]> e2.create_at AND e2.create_at <![CDATA[<=]]> #{end}) AS eventSolve |
| | | FROM |
| | | DUAL |
| | | </select> |
| | | |
| | | <select id="getComplete" resultType="com.panzhihua.common.model.vos.screen.EventTypeWorkVO"> |
| | | SELECT |
| | | count( e.id ) AS zaTotal,( |
| | | SELECT |
| | | count( e1.id ) |
| | | FROM |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | e1.event_category = 1 |
| | | AND e1.event_process_status = 2 |
| | | AND e1.event_type = 2 |
| | | AND egd1.grid_community_id = #{communityId} |
| | | ) AS ggTotal,( |
| | | SELECT |
| | | count( e2.id ) |
| | | FROM |
| | | `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | WHERE |
| | | e2.event_category = 1 |
| | | AND e2.event_process_status = 2 |
| | | AND e2.event_type = 3 |
| | | AND egd2.grid_community_id = #{communityId} |
| | | ) AS mdTotal,( |
| | | SELECT |
| | | count( e3.id ) |
| | | FROM |
| | | `event` AS e3 |
| | | LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id |
| | | WHERE |
| | | e3.event_category = 1 |
| | | AND e3.event_process_status = 2 |
| | | AND e3.event_type = 4 |
| | | AND egd3.grid_community_id = #{communityId} |
| | | ) AS bwdTotal,( |
| | | SELECT |
| | | count( e4.id ) |
| | | FROM |
| | | `event` AS e4 |
| | | LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id |
| | | WHERE |
| | | e4.event_category = 1 |
| | | AND e4.event_process_status = 2 |
| | | AND e4.event_type = 5 |
| | | AND egd4.grid_community_id = #{communityId} |
| | | ) AS tfTotal,( |
| | | SELECT |
| | | count( e5.id ) |
| | | FROM |
| | | `event` AS e5 |
| | | LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id |
| | | WHERE |
| | | e5.event_category = 1 |
| | | AND e5.event_process_status = 2 |
| | | AND e5.event_type = 6 |
| | | AND egd5.grid_community_id = #{communityId} |
| | | ) AS tsTotal, |
| | | (select count(id) from com_act_easy_photo as caep where community_id = #{communityId} and handle_status = 2) as sspTotal |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | e.event_category = 1 |
| | | AND e.event_process_status = 2 |
| | | AND e.event_type = 1 |
| | | AND egd.grid_community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="getNoComplete" resultType="com.panzhihua.common.model.vos.screen.EventTypeWorkVO"> |
| | | SELECT |
| | | count( e.id ) AS zaTotal,( |
| | | SELECT |
| | | count( e1.id ) |
| | | FROM |
| | | `event` AS e1 |
| | | LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id |
| | | WHERE |
| | | e1.event_category = 1 |
| | | AND e1.event_process_status = 1 |
| | | AND e1.event_status = 2 |
| | | AND e1.event_type = 2 |
| | | AND egd1.grid_community_id = #{communityId} |
| | | ) AS ggTotal,( |
| | | SELECT |
| | | count( e2.id ) |
| | | FROM |
| | | `event` AS e2 |
| | | LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id |
| | | WHERE |
| | | e2.event_category = 1 |
| | | AND e2.event_process_status = 1 |
| | | AND e2.event_status = 2 |
| | | AND e2.event_type = 3 |
| | | AND egd2.grid_community_id = #{communityId} |
| | | ) AS mdTotal,( |
| | | SELECT |
| | | count( e3.id ) |
| | | FROM |
| | | `event` AS e3 |
| | | LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id |
| | | WHERE |
| | | e3.event_category = 1 |
| | | AND e3.event_process_status = 1 |
| | | AND e3.event_status = 2 |
| | | AND e3.event_type = 4 |
| | | AND egd3.grid_community_id = #{communityId} |
| | | ) AS bwdTotal,( |
| | | SELECT |
| | | count( e4.id ) |
| | | FROM |
| | | `event` AS e4 |
| | | LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id |
| | | WHERE |
| | | e4.event_category = 1 |
| | | AND e4.event_process_status = 1 |
| | | AND e4.event_status = 2 |
| | | AND e4.event_type = 5 |
| | | AND egd4.grid_community_id = #{communityId} |
| | | ) AS tfTotal,( |
| | | SELECT |
| | | count( e5.id ) |
| | | FROM |
| | | `event` AS e5 |
| | | LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id |
| | | WHERE |
| | | e5.event_category = 1 |
| | | AND e5.event_process_status = 1 |
| | | AND e5.event_status = 2 |
| | | AND e5.event_type = 6 |
| | | AND egd5.grid_community_id = #{communityId} |
| | | ) AS tsTotal, |
| | | (select count(id) from com_act_easy_photo as caep where community_id = #{communityId} and handle_status = 1) as sspTotal |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | e.event_category = 1 |
| | | AND e.event_process_status = 1 |
| | | AND e.event_status = 2 |
| | | AND e.event_type = 1 |
| | | AND egd.grid_community_id = #{communityId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="findListByPage" parameterType="com.panzhihua.common.model.query.visit.EventTasksQuery" resultType="com.panzhihua.common.model.vos.visit.EventVisitingTasksVO"> |
| | | select vt.id,vt.create_at,vt.create_by,vt.visiter_id,vt.visiter_name,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.event_status, |
| | | vt.event_status,p.card_no_str,p.label,u.name as creator |
| | | select vt.id,vt.create_at,vt.create_by,vt.visiter_id,vt.visiter_name,vt.visiter_tele,vt.visiter_sex,vt.visiter_address,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.event_status, |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.card_no_str,p.label,u.name as creator,p.nation_code |
| | | from event_visiting_tasks vt left join com_mng_population p on vt.visiter_id = p.id |
| | | left join sys_user u on vt.create_by = u.user_id |
| | | where vt.grid_member_community = #{query.communityId} |
| | | <if test="query.status != null and query.status != ''"> |
| | | and vt.event_status = #{query.status} |
| | | where p.act_id = #{query.communityId} |
| | | <if test = "query.status == 1"> |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | </if> |
| | | <if test = "query.status == 2"> |
| | | and (vt.event_status = 1 or vt.event_status = 2) |
| | | </if> |
| | | <if test="query.tag != null and query.tag != ''"> |
| | | p.label like concat('%',#{query.tag},'%') |
| | |
| | | <if test = "query.communityId !=null"> |
| | | and vt.grid_member_community = #{query.communityId} |
| | | </if> |
| | | <if test = "query.status != null and query.status == 1"> |
| | | <if test = "query.status == 1"> |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | </if> |
| | | <if test = "query.status != null and query.status == 2"> |
| | | <if test = "query.status == 2"> |
| | | and (vt.event_status = 1 or vt.event_status = 2) |
| | | </if> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="findPopulationById" resultType="java.util.Map"> |
| | | SELECT p.id,p.name,p.sex,p.phone,p.road,p.door_no,p.floor,p.unit_no,p.house_no,v.address,v.lng,v.lat FROM com_mng_population p |
| | | SELECT p.id,p.name,p.sex,p.phone,p.road,p.door_no,p.floor,p.unit_no,p.house_no,v.address,v.lng,v.lat,p.label,p.out_or_local FROM com_mng_population p |
| | | LEFT JOIN com_mng_village v ON p.village_id = v.village_id WHERE p.id = #{id} |
| | | </select> |
| | | |
| | |
| | | |
| | | <update id="complete" parameterType="com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO"> |
| | | update event_visiting_tasks set event_status = #{eventStatus},address = #{address},address_remark=#{addressRemark}, |
| | | family_phone =#{familyPhone},family_source = #{familySource},lat_lng=#{lat_lng},dell_desc = #{dellDesc},exception = #{exception},submit_date = NOW() |
| | | family_phone =#{familyPhone},family_source = #{familySource},lat_lng=#{latLng},dell_desc = #{dellDesc},table_content_json = #{option} |
| | | exception = #{exception},submit_date = NOW() |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <select id="getLabel" parameterType="java.lang.Long" resultType="java.lang.String"> |
| | | select label from com_mng_population where id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | * @return 协议集合 |
| | | */ |
| | | @PostMapping("listagreement") |
| | | public R listAgreement() { |
| | | return userService.listAgreement(); |
| | | public R listAgreement(@RequestParam("communityId") Long communityId) { |
| | | return userService.listAgreement(communityId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 协议名字 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | } |
| | |
| | | * 用户协议 |
| | | * @return 协议集合 |
| | | */ |
| | | R listAgreement(); |
| | | R listAgreement(Long communityId); |
| | | /** |
| | | * 编辑用户协议 |
| | | * @param sysUserAgreementVO 编辑内容 |
| | |
| | | * @return 协议集合 |
| | | */ |
| | | @Override |
| | | public R listAgreement() { |
| | | List<SysUserAgreementDO> sysUserAgreementDOS = sysUserAgreementDAO.selectList(new LambdaQueryWrapper<>()); |
| | | public R listAgreement(Long communityId) { |
| | | List<SysUserAgreementDO> sysUserAgreementDOS = sysUserAgreementDAO.selectList(new LambdaQueryWrapper<SysUserAgreementDO>() |
| | | .eq(SysUserAgreementDO::getCommunityId,communityId)); |
| | | if (ObjectUtils.isEmpty(sysUserAgreementDOS)) { |
| | | return R.fail(); |
| | | } |