Merge branch 'test' into 'master'
Test
See merge request root/zhihuishequ!86
2 文件已重命名
1个文件已删除
47个文件已添加
59个文件已修改
| | |
| | | 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.api; |
| | | |
| | | /** |
| | | * 攀枝花综治网格化-事件上报接口列表-测试环境接口 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/06/16 |
| | | */ |
| | | public class LcApiConstants |
| | | { |
| | | |
| | | /** |
| | | * 将浪潮对接接口中所需的固定账号名称,账号和密码登陆来获取token |
| | | */ |
| | | public static final String LC_UPLOAD_NAME ="18080799023"; |
| | | /** |
| | | * 将浪潮对接接口中所需的固定用户密码 |
| | | */ |
| | | public static final String LC_UPLOAD_PASSWORD ="123456"; |
| | | /** |
| | | * 将浪潮对接接口中所需的token存在Redis里面的KEY |
| | | */ |
| | | public static final String LANG_CHAO_TOKEN ="lang_chao_token"; |
| | | /** |
| | | * 获取token |
| | | */ |
| | | public static final String GRID_GET_TOKEN_URL = "http://171.217.92.33:53303/aaToken?username=#username&password=#password"; |
| | | /** |
| | | * 提交事件登记(自处) |
| | | */ |
| | | public static final String GRID_REGIST_EVENT_URL = "http://171.217.92.33:53303/businessData/registEventInfo"; |
| | | /** |
| | | * 上传附件,仅上传文件流,服务器根据文件名自行匹配 |
| | | */ |
| | | public static final String GRID_EVENT_FILE_UPLOAD_URL = "http://171.217.92.33:53303/businessData/upload"; |
| | | /** |
| | | * 事件类型获取 |
| | | */ |
| | | public static final String GRID_EVENT_CATEGORY_URL = "http://171.217.92.33:53303/businessData/getEventType"; |
| | | /** |
| | | * 事件查询接口 |
| | | */ |
| | | public static final String GRID_EVENT_INFO_URL = "http://171.217.92.33:53303/businessData/getEventListInfo"; |
| | | /** |
| | | * 获取指定APP登记事件详情信息 |
| | | */ |
| | | public static final String GRID_EVENT_INFO_DETAIL_URL = "http://171.217.92.33:53303/businessData/getEventDetails"; |
| | | /** |
| | | * 获取指定事件信息 |
| | | */ |
| | | public static final String GRID_APP_EVENT_INFO_DETAIL_URL = "http://171.217.92.33:53303/businessData/getAppointEventInfo"; |
| | | /** |
| | | * 通过AREAID获取辖区网格树 |
| | | */ |
| | | public static final String GRID_GET_EVENT_INFO_AREA_ID_URL = "http://171.217.92.33:53303/area/getAreaGridTreeByAreaId"; |
| | | /** |
| | | * 获取所有或者根据姓名和工号查询,分页 |
| | | */ |
| | | public static final String GRID_GET_GETALL_SEARCH_PAGE_URL = "http://171.217.92.33:53303/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp&limit=200&page=1"; |
| | | |
| | | /** |
| | | * 下面的接口全部都是走访任务接口 |
| | | */ |
| | | /** |
| | | * 流动人口 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_PAGE_URL = "http://171.217.92.33:53303/businessData/getFPVisitRecordByPageApp"; |
| | | |
| | | |
| | | /** |
| | | * 流动人口 走访详情(民警带领下工作或者自己走访) |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_DETAIL_URL = "http://171.217.92.33:53303/businessData/getFPVisitRecordDetailByIdApp"; |
| | | |
| | | |
| | | /** |
| | | * 流动人口 添加走访记录 (民警带领下工作或者自己走访) |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_SAVE_URL = "http://171.217.92.33:53303/businessData/saveFpVisitRecordAppDock"; |
| | | |
| | | |
| | | /** |
| | | * 重点人员 日常管理 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_PAGE_URL = "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordByPageApp"; |
| | | |
| | | |
| | | /** |
| | | * 重点人员 日常管理 走访详情 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_DETAIL_URL = "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordDetailByIdApp"; |
| | | |
| | | |
| | | /** |
| | | *重点人员 日常管理 添加走访记录 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL = "http://171.217.92.33:53303/businessData/saveKeyPersonVisitRecordAppDock"; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.api; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 浪潮接口请求返回结果对象 |
| | | * @author manailin |
| | | * @date 2021/06/20 |
| | | */ |
| | | @Getter |
| | | public enum LcRequestEnum { |
| | | /** |
| | | * 浪潮接口请求返回失败枚举 |
| | | */ |
| | | FALSE("0", "失败"), |
| | | /** |
| | | *浪潮接口请求返回成功枚举 |
| | | */ |
| | | SUCCESS("200", "成功"); |
| | | |
| | | private final String code; |
| | | private final String result; |
| | | |
| | | LcRequestEnum(String code, String result) { |
| | | this.code = code; |
| | | this.result = result; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | /** |
| | | * 攀枝花综治网格化-事件接口请求返回的对象 |
| | | * des |
| | | * |
| | | * @author manailin |
| | | * @date 2021/06/20 |
| | | */ |
New file |
| | |
| | | package com.panzhihua.common.api; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 攀枝花综治网格化 |
| | | * 浪潮重点人员走访接口,人员类型 |
| | | * @author manailin |
| | | * @date 2021/06/20 |
| | | */ |
| | | @Getter |
| | | public enum LcVisitRecordKeyPersonLabelEnum { |
| | | /** |
| | | * 浪潮接口请求参数:吸毒人员类型 |
| | | */ |
| | | XD(1, "p01_drug"), |
| | | /** |
| | | *浪潮接口请求参数:重精人员类型 |
| | | */ |
| | | JS(2, "p01_trouble_schiz"), |
| | | /** |
| | | * 浪潮接口请求参数:释放人员类型 |
| | | */ |
| | | XM(3, "p01_release"), |
| | | /** |
| | | * 浪潮接口请求参数:纠正人员类型 |
| | | */ |
| | | SJ(4, "p01_be_corrected"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | LcVisitRecordKeyPersonLabelEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public static int getCodeByName(String name) { |
| | | for (LcVisitRecordKeyPersonLabelEnum item : LcVisitRecordKeyPersonLabelEnum.values()) { |
| | | if (item.name.equals(name)) { |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | public static String getCnDescByName(Integer code) { |
| | | for (LcVisitRecordKeyPersonLabelEnum item : LcVisitRecordKeyPersonLabelEnum.values()) { |
| | | if (item.code.equals(code)) { |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return "其他"; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | DZF(1,"待走访"), |
| | | JXZ(2,"进行中"), |
| | | ZJJJ(3,"自己解决"), |
| | | ZJJJ(3,"正常"), |
| | | DYZ(4,"待验证"), |
| | | CG(5,"草稿"), |
| | | YCX(6,"已撤销"), |
| | |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return -1; |
| | | return 0; |
| | | } |
| | | |
| | | public static String getCnDescByName(Integer code) { |
| | |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setHouseHold(oneData.get(27).trim()); |
| | | } |
| | | for (int i = 28; i < headSize; i++) { |
| | | if(StringUtils.isEmpty(oneData.get(28))){ |
| | | vo.setHouseHold(oneData.get(28).trim()); |
| | | }else{ |
| | | vo.setIsResidence(PopulIsOkEnum.getCodeByName(oneData.get(28).trim())); |
| | | } |
| | | for (int i = 29; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0,headData.get(i).indexOf("("))); |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author xyh |
| | | * @date 2021/6/25 15:22 |
| | | */ |
| | | @ApiModel("附件资源DTO") |
| | | @Data |
| | | public class EventResourceDTO implements Serializable { |
| | | |
| | | @ApiModelProperty("地址") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("时间:秒") |
| | | private Integer resourceTime; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | |
| | | /** |
| | | * @author xyh |
| | | * @date 2021/6/28 16:30 |
| | | */ |
| | | @ApiModel("id参数") |
| | | public class IdDTO { |
| | | |
| | | private String id; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value="查询结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value="发布类型 1 图文 2 投票") |
| | | @ApiModelProperty(value="活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") |
| | | private Integer type; |
| | | |
| | | /** |
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.dtos.grid; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 浪潮上传走访内容对象 |
| | | * |
| | | * @author manailin |
| | | * @version 1.0 |
| | | * @date 2021-06-24 |
| | | * @since 1.0 |
| | | */ |
| | | @Data |
| | | public class LcEventVisitingTasksListDTO { |
| | | |
| | | |
| | | /** |
| | | * id 列: id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 网格员所处的街道 列: grid_member_street |
| | | */ |
| | | private Long gridMemberStreet; |
| | | /** |
| | | * 网格员所处社区 列: grid_member_community |
| | | */ |
| | | private Long gridMemberCommunity; |
| | | /** |
| | | * 网格员 列: grid_member |
| | | */ |
| | | private Long gridMember; |
| | | /** |
| | | * 网格员名字 列: grid_member_name |
| | | */ |
| | | private String gridMemberName; |
| | | /** |
| | | * 网格员联系方式 列: grid_menber_tele |
| | | */ |
| | | private String gridMenberTele; |
| | | /** |
| | | * 需走访人ID 列: visiter_id |
| | | */ |
| | | private Long visiterId; |
| | | /** |
| | | * 需走访人名字 列: visiter_name |
| | | */ |
| | | private String visiterName; |
| | | /** |
| | | * 需走访人员性别 列: visiter_sex |
| | | */ |
| | | private Integer visiterSex; |
| | | /** |
| | | * 需走访人电话 列: visiter_tele |
| | | */ |
| | | private String visiterTele; |
| | | /** |
| | | * 需走访人居住地址 列: visiter_address |
| | | */ |
| | | private String visiterAddress; |
| | | /** |
| | | * 人员类型1吸毒2严重精神障碍3刑释人员4社区矫正人员 列: visiter_type |
| | | */ |
| | | private Integer visiterType; |
| | | /** |
| | | * 事件标题 列: event_title |
| | | */ |
| | | private String eventTitle; |
| | | /** |
| | | * 事件类型 列: event_type |
| | | */ |
| | | private Integer eventType; |
| | | /** |
| | | * 事件描述 列: event_des |
| | | */ |
| | | private String eventDes; |
| | | /** |
| | | * 社区处理(0是无需社区1是社区处理) 列: act_opara |
| | | */ |
| | | private Integer actOpara; |
| | | /** |
| | | * 发生时间 列: happen_time |
| | | */ |
| | | private Date happenTime; |
| | | /** |
| | | * 发生地点 列: happent_address |
| | | */ |
| | | private String happentAddress; |
| | | /** |
| | | * 发生的精度纬度信息(逗号隔开) 列: happent_lat_lng |
| | | */ |
| | | private String happentLatLng; |
| | | /** |
| | | * 事件状态(1待处理2自己已解决3待验证4草稿箱5已撤销6异常) 列: event_status |
| | | */ |
| | | private Integer eventStatus; |
| | | /** |
| | | * 上报状态 列: reporting |
| | | */ |
| | | private Integer reporting; |
| | | /** |
| | | * 当前处理对象类型(1、网格员2、社区3、是街道) 列: dell_type |
| | | */ |
| | | private Integer dellType; |
| | | /** |
| | | * 处理人ID 列: dell_user_id |
| | | */ |
| | | private Long dellUserId; |
| | | /** |
| | | * 处理人名称 列: dell_user_name |
| | | */ |
| | | private String dellUserName; |
| | | /** |
| | | * 处理时间 列: dell_date |
| | | */ |
| | | private Date dellDate; |
| | | /** |
| | | * 解决人针对解决事件的处理描述 列: dell_desc |
| | | */ |
| | | private String dellDesc; |
| | | /** |
| | | * 是否有效 列: invalid |
| | | */ |
| | | private Boolean invalid; |
| | | /** |
| | | * 是否紧急 列: urgent |
| | | */ |
| | | private Boolean urgent; |
| | | /** |
| | | * 是否催办 列: urgent_dell |
| | | */ |
| | | private Boolean urgentDell; |
| | | /** |
| | | * 上报提交时间 列: submit_date |
| | | */ |
| | | private Date submitDate; |
| | | /** |
| | | * 是否异常行为 列: exception |
| | | */ |
| | | private Integer exception; |
| | | /** |
| | | * 走访内容根据重点人员类型输入项不同,录入全部的表单内容数据 列: table_content_json |
| | | */ |
| | | private String tableContentJson; |
| | | /** |
| | | * 创建人 列: create_by |
| | | */ |
| | | private Long createBy; |
| | | /** |
| | | * 创建事件 列: create_at |
| | | */ |
| | | /** |
| | | * 创建人 列: create_by |
| | | */ |
| | | private Long gridId; |
| | | |
| | | private Date createAt; |
| | | /** |
| | | * 修改人 列: update_by |
| | | */ |
| | | private Long updateBy; |
| | | /** |
| | | * 修改时间 列: update_at |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 地址备注 |
| | | */ |
| | | private String addressRemark; |
| | | /** |
| | | * 家庭联系电话 |
| | | */ |
| | | private String familyPhone; |
| | | |
| | | /** |
| | | * 家庭来源 |
| | | */ |
| | | private String familySource; |
| | | /** |
| | | * 是否已经上传浪潮服务器市平台 |
| | | */ |
| | | private Boolean lcUpload; |
| | | |
| | | @ApiModelProperty(value = "音频") |
| | | private List<EventResourceVO> audios; |
| | | |
| | | @ApiModelProperty(value = "视频") |
| | | private List<EventResourceVO> videos; |
| | | |
| | | @ApiModelProperty(value = "图片") |
| | | private List<EventResourceVO> pics; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid.admin; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | |
| | | /** |
| | | * 居民列表-请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("居民列表-请求参数") |
| | | public class ComMngPopulationListDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "走访状态(1待走访2已走访3待验证5已撤销)") |
| | | private Integer eventStatus; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "人员标签", hidden = false, example = "") |
| | | private String label; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "性别 1.男 2.女", hidden = false, example = "1") |
| | | private Integer sex; |
| | | |
| | | @Max(10) |
| | | @ApiModelProperty("政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") |
| | | private Integer politicalOutlook; |
| | | |
| | | @Max(2) |
| | | @ApiModelProperty("关联实有房屋(1.是 2.否)") |
| | | private Integer isHouse; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "关键词", hidden = false, example = "") |
| | | private String keyWord; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "社区id", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | } |
File was renamed from springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitCompleteDTO.java |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | package com.panzhihua.common.model.dtos.visit; |
| | | |
| | | import com.panzhihua.common.model.dtos.EventResourceDTO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("地址备注") |
| | | private String addressRemark; |
| | | |
| | | @ApiModelProperty("异常类型") |
| | | @ApiModelProperty("0正常,1异常") |
| | | private Integer exception; |
| | | |
| | | @ApiModelProperty("异常描述") |
| | |
| | | |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty("生活来源") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("完成时间") |
| | | @NotEmpty(message = "完成时间不能为空") |
| | | private String submitDate; |
| | | |
| | | @ApiModelProperty(value = "音频列表") |
| | | List<String> vosList; |
| | | List<EventResourceDTO> vosList; |
| | | |
| | | @ApiModelProperty(value = "图片列表") |
| | | List<String> imgList; |
| | | List<EventResourceDTO> imgList; |
| | | |
| | | @ApiModelProperty(value = "视频列表") |
| | | List<String> videoList; |
| | | List<EventResourceDTO> videoList; |
| | | |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | * @author xyh |
| | | * @date 2021/6/21 15:44 |
| | | */ |
| | | @ApiModel("走访任务查询") |
| | | @ApiModel("走访查询") |
| | | @Data |
| | | public class EventTasksQuery extends PageDTO implements Serializable { |
| | | |
| | | @ApiModelProperty("状态:0全部,1已完成,2未完成") |
| | | @ApiModelProperty("走访任务状态,app:0全部,1待走访,2已完成 | 后台:0全部,1待走访 3正常,6已撤销,7异常") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("走访记录状态,app:0全部,3正常,7异常") |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty("人员标签") |
| | | private Integer tag; |
| | |
| | | private Long visiterId; |
| | | |
| | | private Long communityId; |
| | | |
| | | private Long userId; |
| | | } |
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; |
| | | } |
| | |
| | | */ |
| | | private List<String> userTagStr = Lists.newArrayList(); |
| | | |
| | | private Long houseId; |
| | | |
| | | |
| | | } |
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; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid.admin; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 居民管理-列表返回参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("居民管理列表返回参数") |
| | | @EncryptDecryptClass |
| | | public class ComMngPopulationListVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty("标签") |
| | | private String label; |
| | | |
| | | @ApiModelProperty("走访时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "身份证号码") |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") |
| | | private Integer politicalOutlook; |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("关联实有房屋(0.否 1.是)") |
| | | private String isHouse; |
| | | |
| | | @ApiModelProperty(value = "走访状态(1待走访2已走访3待验证5已撤销)") |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty(value = "户口所在地") |
| | | private String censusRegister; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "是否是户主(1.是 2.否)") |
| | | private Integer isRelation; |
| | | |
| | | @ApiModelProperty(value = "居住地房屋id") |
| | | private Long houseId; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.screen; |
| | | |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("实有人口文化程度统计") |
| | | private List<ComActPopulationCultureVO> cultureGroup; |
| | | |
| | | @ApiModelProperty("大屏网格数据") |
| | | private List<EventGridStatisticsVO> gridStatisticsList; |
| | | |
| | | @ApiModelProperty("小区列表数据") |
| | | private List<CivilVillageStatisticsVO> villageStatisticsList; |
| | | |
| | | |
| | | } |
| | |
| | | @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("协议内容") |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | 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.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | */ |
| | | @ApiModel("app走访任务VO") |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class AppVisitTasksVO implements Serializable { |
| | | private static final long serialVersionUID = -5758072851661612412L; |
| | | |
| | | @ApiModelProperty("id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("需走访人id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long visiterId; |
| | | |
| | | @ApiModelProperty("需走访人姓名") |
| | | private String visiterName; |
| | | |
| | | @ApiModelProperty("网格员id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty("网格员") |
| | | private String gridMemberName; |
| | | |
| | | @ApiModelProperty("处理人id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long dellUserId; |
| | | |
| | | @ApiModelProperty("处理人") |
| | | private String dellUserName; |
| | | |
| | | @ApiModelProperty("需走访人电话") |
| | | @EncryptDecryptField |
| | | private String visiterTele; |
| | | |
| | | @ApiModelProperty("完成时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date submitDate; |
| | | |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("创建人") |
| | | private String creator; |
| | | |
| | | @ApiModelProperty("撤销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date cancelTime; |
| | | |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty("状态") |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | 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.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.EventTasksVisitorTypeEnum; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | public class EventVisitListVO { |
| | | |
| | | @ApiModelProperty("id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("真实姓名") |
| | |
| | | private String cardNoStr; |
| | | |
| | | @ApiModelProperty(value = "人员标签") |
| | | private String visiterTypeName; |
| | | |
| | | private Integer visiterType; |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | |
| | | private String eventStatusName; |
| | | |
| | | public String getEventStatusName() { |
| | | |
| | | return EventTasksStatusEnum.getName(eventStatus); |
| | | } |
| | | |
| | | public String getVisiterTypeName(){ |
| | | return EventTasksVisitorTypeEnum.getName(visiterType); |
| | | if(eventStatus != null){ |
| | | return EventTasksStatusEnum.getName(eventStatus); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | 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.dtos.EventResourceDTO; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * */ |
| | | @Data |
| | | @ApiModel("重点人群走访记录详细返回参数") |
| | | @EncryptDecryptClass |
| | | public class EventVisitingTasksDetailsVO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "网格员所处的街道") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberStreet; |
| | | |
| | | @ApiModelProperty(value = "网格员所处社区") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberCommunity; |
| | | |
| | | @ApiModelProperty(value = "网格员") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | |
| | | private String gridMenberTele; |
| | | |
| | | @ApiModelProperty(value = "需走访人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long visiterId; |
| | | |
| | | @ApiModelProperty(value = "需走访人名字") |
| | |
| | | private Integer visiterSex; |
| | | |
| | | @ApiModelProperty(value = "需走访人电话") |
| | | @EncryptDecryptField |
| | | private String visiterTele; |
| | | |
| | | @ApiModelProperty(value = "需走访人居住地址") |
| | |
| | | private Integer dellType; |
| | | |
| | | @ApiModelProperty(value = "处理人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long dellUserId; |
| | | |
| | | @ApiModelProperty(value = "处理人名称") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date dellDate; |
| | | |
| | | @ApiModelProperty(value = "解决人针对解决事件的处理描述") |
| | | @ApiModelProperty(value = "异常描述") |
| | | private String dellDesc; |
| | | |
| | | @ApiModelProperty(value = "是否有效") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date submitDate; |
| | | |
| | | @ApiModelProperty(value = "是否异常行为") |
| | | @ApiModelProperty(value = "是否异常行为:0否,1是") |
| | | private Boolean exception; |
| | | |
| | | @ApiModelProperty(value = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | | private JSONObject tableContentJson; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建事件") |
| | |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "修改人") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | |
| | | private List<String> optionList; |
| | | |
| | | @ApiModelProperty(value = "音频列表") |
| | | List<String> vosList; |
| | | List<EventResourceDTO> vosList; |
| | | |
| | | @ApiModelProperty(value = "图片列表") |
| | | List<String> imgList; |
| | | List<EventResourceDTO> imgList; |
| | | |
| | | @ApiModelProperty(value = "视频列表") |
| | | List<String> videoList; |
| | | List<EventResourceDTO> videoList; |
| | | |
| | | @ApiModelProperty(value = "家庭联系方式") |
| | | private String familyPhone; |
| | | |
| | | @ApiModelProperty(value = "生活来源") |
| | | private String familySource; |
| | | |
| | | @ApiModelProperty(value = "地址备注") |
| | | private String addressRemark; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("异常选择") |
| | | private String option; |
| | | |
| | | @ApiModelProperty("走访后的经纬度(,隔开)") |
| | | private String latLng; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.visit; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | 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.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.EventTasksVisitorTypeEnum; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * */ |
| | | @Data |
| | | @ApiModel("重点人群走访记录返回参数") |
| | | @ExcelIgnoreUnannotated |
| | | @EncryptDecryptClass |
| | | public class EventVisitingTasksVO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ExcelProperty(value = "序号",index = 0) |
| | | private Integer rowNum; |
| | | // @ExcelProperty(value = "序号",index = 0) |
| | | // private Integer rowNum; |
| | | |
| | | @ExcelProperty(value = "创建时间",index = 1) |
| | | @ExcelProperty(value = "创建时间",index = 0) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "创建人",index = 2) |
| | | @ExcelProperty(value = "创建人",index = 1) |
| | | @ApiModelProperty(value = "创建人") |
| | | private String creator; |
| | | |
| | | @ExcelProperty(value = "走访对象",index = 3) |
| | | @ExcelProperty(value = "走访对象",index = 2) |
| | | @ApiModelProperty(value = "需走访人名字") |
| | | private String visiterName; |
| | | |
| | | |
| | | @ExcelProperty(value = "身份证号码",index = 4) |
| | | @ExcelProperty(value = "身份证号码",index = 3) |
| | | @ApiModelProperty(value = "身份证号码") |
| | | private String cardNoStr; |
| | | |
| | | @ExcelProperty(value = "走访地址",index = 5) |
| | | @ExcelProperty(value = "走访地址",index = 4) |
| | | @ApiModelProperty(value = "走访地址") |
| | | private String visiterAddress; |
| | | |
| | | @ExcelProperty(value = "人员标签",index = 6) |
| | | @ExcelProperty(value = "人员标签",index = 5) |
| | | @ApiModelProperty(value = "人员标签") |
| | | private String visiterTypeName; |
| | | |
| | | @ExcelProperty(value = "走访人",index = 7) |
| | | @ExcelProperty(value = "走访人",index = 6) |
| | | @ApiModelProperty(value = "走访人") |
| | | private String dellUserName; |
| | | |
| | | @ExcelProperty(value = "完成走访时间",index = 8) |
| | | @ExcelProperty(value = "完成走访时间",index = 7) |
| | | @ApiModelProperty(value = "完成走访时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date submitDate; |
| | | |
| | | @ExcelProperty(value = "撤销时间",index = 9) |
| | | @ExcelProperty(value = "撤销时间",index = 8) |
| | | @ApiModelProperty(value = "撤销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date cancelTime; |
| | | |
| | | @ExcelProperty(value = "状态",index = 10) |
| | | @ExcelProperty(value = "状态",index = 9) |
| | | @ApiModelProperty(value = "状态") |
| | | private String eventStatusName; |
| | | |
| | | |
| | | |
| | | @ExcelIgnore |
| | | @ApiModelProperty(value = "需走访人ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | 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; |
| | | // |
| | | // |
| | | @ExcelIgnore |
| | | @ApiModelProperty(value = "网格员所处的街道") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberStreet; |
| | | |
| | | @ApiModelProperty(value = "网格员所处社区") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMemberCommunity; |
| | | |
| | | @ApiModelProperty(value = "网格员") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long gridMember; |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | | private String gridMemberName; |
| | | |
| | | @ApiModelProperty(value = "网格员联系方式") |
| | | private String gridMenberTele; |
| | | |
| | | |
| | | @ApiModelProperty(value = "需走访人员性别") |
| | | private Integer visiterSex; |
| | | |
| | | @ApiModelProperty(value = "需走访人电话") |
| | | @EncryptDecryptField |
| | | private String visiterTele; |
| | | |
| | | |
| | | 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; |
| | | // |
| | | @ExcelIgnore |
| | | |
| | | @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; |
| | | private Integer eventStatus; |
| | | |
| | | public String getEventStatusName() { |
| | |
| | | } |
| | | 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") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | 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") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long createBy; |
| | | |
| | | |
| | | @ApiModelProperty(value = "修改人") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | 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; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiOperation(value = "提交事件登记关联的文件或者图片信息") |
| | | @PostMapping("lc/event/upload/event_and_file") |
| | | void automationUploadEventAndFile(); |
| | | |
| | | /** |
| | | * description 自动上传重点人员和流动人员走访记录 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @ApiOperation(value = "自动上传重点人员和流动人员走访记录") |
| | | @GetMapping("lc/auto/upload/visit_record") |
| | | void automationUploadVisitRecord(); |
| | | } |
| | |
| | | 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; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; |
| | |
| | | */ |
| | | @PostMapping("addeasyphoto") |
| | | R addEasyPhoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | /** |
| | | * 查询随手拍是否有活动 |
| | | * @return 活动详情 |
| | | */ |
| | | @PostMapping("getEasyPhotoActivity") |
| | | R getEasyPhotoActivity(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 发布微心愿 |
| | |
| | | */ |
| | | @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); |
| | | |
| | | /** |
| | | * 综治后台-居民列表 |
| | | * @param populationListDTO 请求参数 |
| | | * @return 居民列表 |
| | | */ |
| | | @PostMapping("/population/grid/list") |
| | | R getGridPopulationList(@RequestBody ComMngPopulationListDTO populationListDTO); |
| | | } |
| | |
| | | package com.panzhihua.common.service.grid; |
| | | |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.event.ScreenEventListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | * @since 1.0 |
| | | */ |
| | | @FeignClient(name = "grid") |
| | | public interface GridService { |
| | | |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | | * |
| | | * @param pageEventDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除事件 |
| | | * |
| | | * @param CommonEventDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除网格和网格员的关联关系 |
| | | * |
| | | * @param eventGridMemberRelationDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询网格和网格员的关联关系详细信息 |
| | | * |
| | | * @param id 网格和网格员的关联关系 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/eventgridmemberrelation/{id}") |
| | | R<EventGridMemberRelationDetailsVO> eventGridMemberRelationDetails(@PathVariable("id") Long id); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增网格员定时上报地理预警记录 |
| | | * @param eventGridMemberWarnLogAddDTO |
| | |
| | | |
| | | /** |
| | | * 修改网格员定时上报地理预警记录 |
| | | * |
| | | * @param eventGridMemberWarnLogEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找网格员定时上报地理预警记录 |
| | | * |
| | | * @param pageEventGridMemberWarnLogDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除网格员定时上报地理预警记录 |
| | | * |
| | | * @param eventGridMemberWarnLogDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询网格员定时上报地理预警记录详细信息 |
| | | * |
| | | * @param id 网格员定时上报地理预警记录 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/eventgridmemberwarnlog/{id}") |
| | | R<EventGridMemberWarnLogDetailsVO> eventGridMemberWarnLogDetails(@PathVariable("id") Long id); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增重点人群记录 |
| | | * |
| | | * @param eventMainMemberAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改重点人群记录 |
| | | * |
| | | * @param eventMainMemberEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找重点人群记录 |
| | | * |
| | | * @param pageEventMainMemberDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询事件处理流转记录详细信息 |
| | | * |
| | | * @param id 事件处理流转记录 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/eventtransferrecord/{id}") |
| | | R<EventTransferRecordDetailsVO> eventTransferRecordDetails(@PathVariable("id") Long id); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找重点人群走访记录 |
| | | * |
| | | * @param pageEventVisitingTasksDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询重点人群走访记录详细信息 |
| | | * |
| | | * @param id 重点人群走访记录 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增APP应用版本信息 |
| | | * |
| | | * @param eventApplicationAppReleaseAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改APP应用版本信息 |
| | | * |
| | | * @param eventApplicationAppReleaseEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找APP应用版本信息 |
| | | * |
| | | * @param pageEventApplicationAppReleaseDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除APP应用版本信息 |
| | | * |
| | | * @param eventApplicationAppReleaseDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询APP应用版本信息详细信息 |
| | | * |
| | | * @param id APP应用版本信息 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增用户协议和隐私政策信息 |
| | | * |
| | | * @param eventApplicationUserNoticeAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改用户协议和隐私政策信息 |
| | | * |
| | | * @param eventApplicationUserNoticeEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找用户协议和隐私政策信息 |
| | | * |
| | | * @param pageEventApplicationUserNoticeDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除用户协议和隐私政策信息 |
| | | * |
| | | * @param eventApplicationUserNoticeDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询用户协议和隐私政策信息详细信息 |
| | | * |
| | | * @param id 用户协议和隐私政策信息 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增区县/街道/社区/网格员网格数据管理 |
| | | * |
| | | * @param eventGridDataAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改区县/街道/社区/网格员网格数据管理 |
| | | * |
| | | * @param eventGridDataEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找区县/街道/社区/网格员网格数据管理 |
| | | * |
| | | * @param pageEventGridDataDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除区县/街道/社区/网格员网格数据管理 |
| | | * |
| | | * @param eventGridDataDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询区县/街道/社区/网格员网格数据管理详细信息 |
| | | * |
| | | * @param id 区县/街道/社区/网格员网格数据管理 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增网格员定时上报地理信息 |
| | | * |
| | | * @param eventGridMemberGpsLogAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改网格员定时上报地理信息 |
| | | * |
| | | * @param eventGridMemberGpsLogEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找网格员定时上报地理信息 |
| | | * |
| | | * @param pageEventGridMemberGpsLogDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除网格员定时上报地理信息 |
| | | * |
| | | * @param eventGridMemberGpsLogDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询网格员定时上报地理信息详细信息 |
| | | * |
| | | * @param id 网格员定时上报地理信息 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 添加事件 |
| | | * |
| | | * @param commonEventAddDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保存事件草稿 |
| | | * |
| | | * @param commonEventEditDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 突发事件上报社区 |
| | | * |
| | | * @param commonEventReportDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 突发事件撤销 |
| | | * |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 处理事件 |
| | | * |
| | | * @param commonEventDealDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 处理事件 |
| | | * |
| | | * @param commonEventVerifyDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 处理事件 |
| | | * |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 网格数据待处理统计信息 |
| | | * |
| | | * @param eventGridStatisticsDataDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询用户网格 |
| | | * |
| | | * @param pageEventGridDataDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 特殊人员信息上报 |
| | | * |
| | | * @param specialEventAddDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取指定特殊人员信息 |
| | | * |
| | | * @param idCard |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保存殊人群事件上报草稿 |
| | | * |
| | | * @param specialEventEditDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 草稿发布 |
| | | * |
| | | * @param commonEventPublicDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | * |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | @PostMapping("/easy/list") |
| | | R easyList(@RequestBody PageEasyAppDTO easyAppDTO); |
| | | |
| | | /** |
| | | * 查询随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | * |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | @PostMapping("/easy/detail") |
| | | R easyDetailByApp(@RequestParam("easyId") Long easyId); |
| | | |
| | | /** |
| | | * 查询随手拍类型列表 |
| | | * @return 类型列表 |
| | | * |
| | | * @return 类型列表 |
| | | */ |
| | | @PostMapping("/easy/type/list") |
| | | R easyTypeListByApp(); |
| | | |
| | | /** |
| | | * 随手拍处理 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | * |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @PostMapping("/easy/handle") |
| | | R easyHandle(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 随手拍公示状态切换 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 切换结果 |
| | | * |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 切换结果 |
| | | */ |
| | | @PostMapping("/easy/publicity") |
| | | R easyPublicity(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 随手拍上报社区 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 上报结果 |
| | | * |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 上报结果 |
| | | */ |
| | | @PostMapping("/easy/report") |
| | | R easyReport(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 添加发布宣传教育事件 |
| | | * @param publicityEventAddDTO 请求参数 |
| | | * @return 添加发布结果 |
| | | * |
| | | * @param publicityEventAddDTO 请求参数 |
| | | * @return 添加发布结果 |
| | | */ |
| | | @PostMapping("/event/addPublicity") |
| | | R addPublicity(@RequestBody PublicityEventAddDTO publicityEventAddDTO); |
| | | |
| | | /** |
| | | * 保存宣传教育事件草稿 |
| | | * @param publicityEventEditDTO 请求参数 |
| | | * @return 保存结果 |
| | | * |
| | | * @param publicityEventEditDTO 请求参数 |
| | | * @return 保存结果 |
| | | */ |
| | | @PostMapping("/event/savePublicityDraft") |
| | | R savePublicityDraft(@RequestBody PublicityEventEditDTO publicityEventEditDTO); |
| | | |
| | | /** |
| | | * 分页查询宣传教育事件 |
| | | * @param pagePublicityEventDTO 请求参数 |
| | | * @return 结果 |
| | | * |
| | | * @param pagePublicityEventDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/event/queryPublicity") |
| | | R queryPublicity(@RequestBody PagePublicityEventDTO pagePublicityEventDTO); |
| | | |
| | | /** |
| | | * 分页查询宣传教育事件 |
| | | * @param pagePublicityEventDTO 请求参数 |
| | | * @return 结果 |
| | | * |
| | | * @param pagePublicityEventDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/event/queryPublicityCommunity") |
| | | R queryPublicityCommunity(@RequestBody PagePublicityEventCommunityDTO pagePublicityEventDTO); |
| | |
| | | |
| | | /** |
| | | * 分页查询社区列表 |
| | | * @return 结果 |
| | | * |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/event/actList") |
| | | R actList(); |
| | | |
| | | /** |
| | | * 地图模块-根据网格id查询网格详细信息 |
| | | * @param gridId 网格id |
| | | * @return 网格详细信息 |
| | | * |
| | | * @param gridId 网格id |
| | | * @return 网格详细信息 |
| | | */ |
| | | @PostMapping("/map/getGridDetail") |
| | | R getGridDetail(@RequestParam("gridId") Long gridId); |
| | | |
| | | /** |
| | | * 地图模块-根据网格员id查询今日运动轨迹 |
| | | * @param userId 网格员id |
| | | * @return 运动轨迹 |
| | | * |
| | | * @param userId 网格员id |
| | | * @return 运动轨迹 |
| | | */ |
| | | @PostMapping("/map/getTrajectoryByApp") |
| | | R getTrajectoryByApp(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 地图模块-根据网格员id查询关联网格列表 |
| | | * @param userId 网格员id |
| | | * @return 网格列表 |
| | | * |
| | | * @param userId 网格员id |
| | | * @return 网格列表 |
| | | */ |
| | | @PostMapping("/map/getMapGridListByApp") |
| | | R getMapGridListByApp(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 获取最新版本信息 |
| | | * @return 版本信息 |
| | | * |
| | | * @return 版本信息 |
| | | */ |
| | | @GetMapping("/eventapplicationapprelease/edition") |
| | | R editionUpdate(); |
| | | |
| | | /** |
| | | * 首页待处理 |
| | | * |
| | | * @param eventGridTodoDataDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 后台获取网格员运动轨迹 |
| | | * |
| | | * @param workTrajectoryDTO 请求参数 |
| | | * @return 运动轨迹 |
| | | * @return 运动轨迹 |
| | | */ |
| | | @PostMapping("/map/gridMemberWorkTrajectory") |
| | | R gridMemberWorkTrajectory(@RequestBody EventGridMemberWorkTrajectoryDTO workTrajectoryDTO); |
| | | |
| | | /** |
| | | * 后台获取网格员预警记录 |
| | | * |
| | | * @param gridMemberWainDTO 请求参数 |
| | | * @return 预警记录 |
| | | * @return 预警记录 |
| | | */ |
| | | @PostMapping("/map/gridMemberWorkWarning") |
| | | R gridMemberWorkWarning(@RequestBody EventGridMemberWainDTO gridMemberWainDTO); |
| | | |
| | | /** |
| | | * 分页查询网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | * |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/list") |
| | | R getGridDataList(@RequestBody PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | * |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | */ |
| | | @PostMapping("/eventgriddata/member/list") |
| | | R getGridMemberLists(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查询管理事件 |
| | | * |
| | | * @param pageEventManageDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 社区网格后台标记事件无效 |
| | | * |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 社区网格后台重新发布已标记无效的事件 |
| | | * |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | * |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/add") |
| | | R addGridDataByAdmin(@RequestBody EventGridDataAddAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 后台修改网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | * |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/edit") |
| | | R editGridDataByAdmin(@RequestBody EventGridDataEditAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | * |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | @PostMapping("/easy/admin/list") |
| | | R easyListByAdmin(@RequestBody PageEasyAdminDTO easyAppDTO); |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | * |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | @PostMapping("/easy/admin/detail") |
| | | R easyDetailByAdmin(@RequestParam("easyId") Long easyId); |
| | | |
| | | /** |
| | | * 后台管理-随手拍处理 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | * |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @PostMapping("/easy/admin/handle") |
| | | R easyHandleByAdmin(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 后台管理-批量修改随手拍公示状态/删除随手拍 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | * |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | */ |
| | | @PostMapping("/easy/admin/publicity") |
| | | R easyPublicityByAdmin(@RequestBody ComActEasyPhotoEditAdminDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * |
| | | * @param gridId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 后台管理-统计模块 |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | * |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | */ |
| | | @GetMapping("/statistics/admin/eventStatistics") |
| | | R eventStatistics(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 后台管理-删除网格 |
| | | * @param Ids 网格id集合 |
| | | * @return 删除结果 |
| | | * |
| | | * @param Ids 网格id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/delete") |
| | | R deleteGridData(@RequestBody List<Long> Ids); |
| | | |
| | | /** |
| | | * 后台管理-网格员统计 |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | * |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | */ |
| | | @PostMapping("/statistics/admin/gridMemberStatistics") |
| | | R gridMemberStatistics(@RequestBody MemberStatisticsAdminDTO statisticsAdminDTO); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param eventDeleteDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量发布事件 |
| | | * |
| | | * @param commonEventBatchRepublishDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量事件标为无效 |
| | | * |
| | | * @param eventBatchRevokeDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量事件标为无效 |
| | | * |
| | | * @param pageEventGridNearbyDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据网格id查询网格统计数据 |
| | | * @param gridId 网格id |
| | | * @return 网格统计数据 |
| | | * |
| | | * @param gridId 网格id |
| | | * @return 网格统计数据 |
| | | */ |
| | | @PostMapping("/statistics/getGridEventStatistics") |
| | | R getGridEventStatisticsByApp(@RequestParam("gridId") Long gridId); |
| | | |
| | | /** |
| | | * 查询网格事件统计数据 |
| | | * |
| | | * @param statisticsDTO 请求参数 |
| | | * @return 网格事件统计数据 |
| | | * @return 网格事件统计数据 |
| | | */ |
| | | @PostMapping("/statistics/event/getGridEventStatistics") |
| | | R getGridEventDetailStatisticsByApp(@RequestBody GridEventStatisticsDTO statisticsDTO); |
| | | |
| | | /** |
| | | * 网格员上报地理位置 |
| | | * |
| | | * @param memberPositionDTO 请求参数 |
| | | * @return 上报结果 |
| | | * @return 上报结果 |
| | | */ |
| | | @PostMapping("/eventgridmembergpslog/add") |
| | | R gridReportPosition(@RequestBody GridMemberPositionDTO memberPositionDTO); |
| | | |
| | | /** |
| | | * 直接上报社区 |
| | | * |
| | | * @param commonEventDirectReportDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 定时任务扫描网格员工作状态 |
| | | * @return 定时任务扫描结果 |
| | | * |
| | | * @return 定时任务扫描结果 |
| | | */ |
| | | @PostMapping("/eventgridmemberwarnlog/judge") |
| | | R timedTaskGridMember(); |
| | | |
| | | /** |
| | | * 事件大屏查询事件列表 |
| | | * @param eventListDTO 请求参数 |
| | | * @return 事件列表 |
| | | * |
| | | * @param eventListDTO 请求参数 |
| | | * @return 事件列表 |
| | | */ |
| | | @PostMapping("/screen/event/list") |
| | | R getScreenEventList(@RequestBody ScreenEventListDTO eventListDTO); |
| | | |
| | | /** |
| | | * 特殊人群上报-社区人口数据列表 |
| | | * @param specialPopulationDTO 请求参数 |
| | | * @return 社区人口数据列表 |
| | | * |
| | | * @param specialPopulationDTO 请求参数 |
| | | * @return 社区人口数据列表 |
| | | */ |
| | | @PostMapping("/event/special/population/list") |
| | | R specialPopulationList(@RequestBody PageEventSpecialPopulationDTO specialPopulationDTO); |
| | |
| | | /** |
| | | * description 根据本地网格ID,查询对于的浪潮市平台对应的ID |
| | | * |
| | | * @param id 本地网格ID |
| | | * @param id 本地网格ID |
| | | * @return String 浪潮市平台对应的ID |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @GetMapping("/lc_compare/{id}") |
| | | String getLcGridIdByLocal(@PathVariable("id") Long id); |
| | | |
| | | /** |
| | | * description 根据本地网格ID,查询对于的浪潮市平台对应的ID |
| | | * |
| | | * @param localUserId 本地网格员ID |
| | | * @param localUserId 本地网格员ID |
| | | * @return String 浪潮市平台对应的ID |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @GetMapping("/lc_compare/getLcUserId") |
| | | String getLcUserIdByLocalUserId(@RequestParam("localUserId") String localUserId); |
| | | |
| | | /** |
| | | * description 获取所有未上传到浪潮平台的事件列表 |
| | | * |
| | |
| | | */ |
| | | @GetMapping("/event/getUnUploadEvent") |
| | | List<EventDetailsVO> getUnUploadEvent(); |
| | | |
| | | /** |
| | | * description 更新上传是否成功标识 |
| | | * |
| | | * @param id 事件主键ID |
| | | * @return Boolean 上传是否成功 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @GetMapping("/event/updateLcUploadFlag") |
| | | Boolean updateLcUploadFlag(@RequestParam("id")Long id); |
| | | Boolean updateLcUploadFlag(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 工作大屏-事件管理模块数据统计 |
| | |
| | | R eventWork(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 后台统计走访任务 |
| | | * description 获取所有未上传到浪潮平台的走访事件列表 |
| | | * |
| | | * @return String 事件列表 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @GetMapping("/eventvisitingtasks/getUnUploadVisitingTask") |
| | | List<LcEventVisitingTasksListDTO> getUnUploadVisitingTask(); |
| | | |
| | | /** |
| | | * description 更新走访任务上传是否成功标识 |
| | | * |
| | | * @param id 事件主键ID |
| | | * @return Boolean 上传是否成功 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/updateLcUploadFlagVisitingTask") |
| | | Boolean updateLcUploadFlagVisitingTask(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 后台统计走访任务 |
| | | * |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询走访记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 走访任务列表 |
| | | * |
| | | * app走访任务列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/appTaskList") |
| | | R appTaskList(@RequestBody EventTasksQuery query); |
| | | /** |
| | | * 后台走访任务列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 导出 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除走访任务 |
| | | * @param ids |
| | | * |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/delete") |
| | | R delete(@RequestParam("ids") String ids, @RequestParam("communityId") Long communityId); |
| | | R delete(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 被走访人员列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | R visitorList(@RequestBody EventVisitListQuery query); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 走访详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 撤销走访 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 恢复走访 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增走访 |
| | | * |
| | | * @param ids |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/add") |
| | | R addVisitingTask(@RequestParam("ids") String ids,@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId); |
| | | R addVisitingTask(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 开始走访 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/start") |
| | | R start(@RequestParam("id")Long id,@RequestParam("userId")Long userId); |
| | | R start(@RequestParam("id") Long id, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 完成走访记录 |
| | | * |
| | | * @param taskCompleteDTO |
| | | * @return |
| | | */ |
| | |
| | | * @return 协议集合 |
| | | */ |
| | | @PostMapping("listagreement") |
| | | R listAgreement(); |
| | | R listAgreement(@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 编辑用户协议 |
| | |
| | | @ApiOperation(value = "实有人口-下载模板") |
| | | @GetMapping("/export") |
| | | public R exportPopulation() { |
| | | //获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | //获取登陆用户绑定社区id |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | Long communityId = 2L;//this.getCommunityId(); |
| | | //生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "实有人口导入模板.xlsx"; |
| | |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("民族"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | | head3.add("政治面貌(群众/中共党员/共青团员)"); |
| | | head3.add("政治面貌(中共党员/中共预备党员/共青团员/民革党员/台盟盟员/群众)"); |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("是否租住(是/否)"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | head5.add("与户主关系(户主/配偶/子女/孙女/父母/其他)"); |
| | | head5.add("与户主关系(户主/本人/配偶/夫/妻/子/女/孙女/孙子/兄弟姐妹/父母/其他)"); |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("*街/路/巷(必填)"); |
| | | List<String> head7 = new ArrayList<String>(); |
| | | head7.add("*小区号(必填,政府对于每个小区都有特定编号)"); |
| | | List<String> head8 = new ArrayList<String>(); |
| | | head8.add("*楼排号(必填)"); |
| | | List<String> head9 = new ArrayList<String>(); |
| | | head9.add("*单元号(必填)"); |
| | | List<String> head10 = new ArrayList<String>(); |
| | | head10.add("*单元号(必填)"); |
| | | head10.add("*户室(必填,四位数表示。前两位楼层,后两位户号)"); |
| | | List<String> head11 = new ArrayList<String>(); |
| | | head11.add("*户室(必填,四位数表示。前两位楼层,后两位户号)"); |
| | | head11.add("建筑用途"); |
| | | List<String> head12 = new ArrayList<String>(); |
| | | head12.add("联系方式"); |
| | | head12.add("房屋面积"); |
| | | List<String> head13 = new ArrayList<String>(); |
| | | head13.add("籍贯"); |
| | | head13.add("房屋状态(自住/租住/其他)"); |
| | | List<String> head14 = new ArrayList<String>(); |
| | | head14.add("文化程度(小学/初中/高中/中专/大专/本科/硕士/博士/其他)"); |
| | | head14.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | List<String> head15 = new ArrayList<String>(); |
| | | head15.add("婚姻状况(未婚/已婚/离异/丧偶/分居/其他)"); |
| | | head15.add("管控状态(常规/关注/管控)"); |
| | | |
| | | List<String> head16 = new ArrayList<String>(); |
| | | head16.add("健康状况"); |
| | | head16.add("联系方式"); |
| | | List<String> head17 = new ArrayList<String>(); |
| | | head17.add("工作单位"); |
| | | head17.add("籍贯"); |
| | | List<String> head18 = new ArrayList<String>(); |
| | | head18.add("备注"); |
| | | head18.add("文化程度(小学/初中/高中/中专/大专/本科/硕士/博士/其他)"); |
| | | List<String> head19 = new ArrayList<String>(); |
| | | head19.add("户口所在地"); |
| | | head19.add("婚姻状况(未婚/已婚/初婚/再婚/复婚/丧偶/离婚/分居/其他)"); |
| | | List<String> head20 = new ArrayList<String>(); |
| | | head20.add("本地外地(本地/外地)"); |
| | | head20.add("健康状况"); |
| | | List<String> head21 = new ArrayList<String>(); |
| | | head21.add("房屋状态(自住/租住/其他)"); |
| | | head21.add("工作单位"); |
| | | List<String> head22 = new ArrayList<String>(); |
| | | head22.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | head22.add("本地外地(本地/外地)"); |
| | | List<String> head23 = new ArrayList<String>(); |
| | | head23.add("管控状态(常规/关注/管控)"); |
| | | head23.add("户口所在地"); |
| | | List<String> head24 = new ArrayList<String>(); |
| | | head24.add("是否为居住地(是/否)"); |
| | | head24.add("备注"); |
| | | List<String> head25 = new ArrayList<String>(); |
| | | head25.add("证件照(人面像)照片"); |
| | | List<String> head26 = new ArrayList<String>(); |
| | | head26.add("证件照(国徽面)照片"); |
| | | List<String> head27 = new ArrayList<String>(); |
| | | head27.add("户口本照片"); |
| | | List<String> head28 = new ArrayList<String>(); |
| | | head28.add("是否为居住地(是/否)"); |
| | | |
| | | |
| | | list.add(head0); |
| | |
| | | list.add(head6); |
| | | list.add(head7); |
| | | list.add(head8); |
| | | list.add(head9); |
| | | list.add(head10); |
| | | list.add(head11); |
| | | list.add(head12); |
| | |
| | | list.add(head22); |
| | | list.add(head23); |
| | | list.add(head24); |
| | | list.add(head25); |
| | | list.add(head26); |
| | | list.add(head27); |
| | | list.add(head28); |
| | | return list; |
| | | } |
| | | |
| | |
| | | data.add("汉族"); |
| | | data.add("群众"); |
| | | data.add("是"); |
| | | data.add("户主"); |
| | | data.add("本人"); |
| | | data.add("樱花街"); |
| | | data.add("115"); |
| | | data.add("15栋"); |
| | | data.add("1单元"); |
| | | data.add("1"); |
| | | data.add("1001"); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add("13768548521"); |
| | | data.add("中国"); |
| | | data.add("硕士"); |
| | | data.add("未婚"); |
| | | data.add(""); |
| | | data.add("阿里巴巴"); |
| | | data.add(""); |
| | | data.add("四川成都"); |
| | | data.add("本地"); |
| | | data.add("自住"); |
| | | data.add("公寓"); |
| | | data.add("常规"); |
| | | data.add("否"); |
| | | data.add("四川成都"); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add(""); |
| | | data.add("是"); |
| | | return data; |
| | | } |
| | | |
| | |
| | | package com.panzhihua.grid_app.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksEditDTO; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.visit.AppVisitTasksVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksDetailsVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @ApiOperation(value = "走访记录-xyh", response = AppVisitTasksVO.class) |
| | | @PostMapping("/list") |
| | | public R list(@RequestBody EventTasksQuery query){ |
| | | query.setCommunityId(this.getCommunityId()); |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | return gridService.list(query); |
| | | } |
| | | |
| | | @ApiOperation(value = "走访任务-xyh", response = AppVisitTasksVO.class) |
| | | @PostMapping("/taskList") |
| | | public R taskList(@RequestBody EventTasksQuery query){ |
| | | query.setCommunityId(this.getCommunityId()); |
| | | return gridService.taskList(query); |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | // query.setUserId(this.getUserId()); |
| | | return gridService.appTaskList(query); |
| | | } |
| | | |
| | | @ApiOperation(value = "走访详情-xyh", response = EventVisitingTasksDetailsVO.class) |
| | |
| | | return gridService.detail(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "开始走访-xyh") |
| | | @PostMapping("/start") |
| | | // @ApiOperation(value = "开始走访-xyh") |
| | | // @PostMapping("/start") |
| | | public R start(@RequestParam("id") Long id){ |
| | | return gridService.start(id,this.getUserId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "完成走访记录-xyh") |
| | | @PostMapping("/complete") |
| | | public R complete(@RequestBody @Validated EventVisitCompleteDTO taskCompleteDTO){ |
| | | public synchronized R complete(@RequestBody @Validated EventVisitCompleteDTO taskCompleteDTO){ |
| | | taskCompleteDTO.setUserId(this.getUserId()); |
| | | return gridService.complete(taskCompleteDTO); |
| | | } |
| | | } |
| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksAddDTO; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.visit.AppVisitTasksVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCountVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitListVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksVO; |
| | | import com.panzhihua.common.model.vos.visit.*; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @PostMapping("/taskList") |
| | | @ApiOperation(value = "走访任务列表", response= EventVisitingTasksVO.class) |
| | | public R taskList(@RequestBody EventTasksQuery query){ |
| | | query.setCommunityId(this.getCommunityId()); |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | return gridService.taskList(query); |
| | | } |
| | | |
| | |
| | | @PostMapping("/list") |
| | | @ApiOperation(value = "走访任务记录", response= AppVisitTasksVO.class) |
| | | public R list(@RequestBody EventTasksQuery query){ |
| | | query.setCommunityId(this.getCommunityId()); |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | return gridService.list(query); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "删除走访任务") |
| | | public R delete(@RequestParam("ids") String ids){ |
| | | return gridService.delete(ids,this.getCommunityId()); |
| | | public R delete(@RequestBody IdDTO idDTO){ |
| | | return gridService.delete(idDTO,this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 走访任务导出 |
| | | * @return |
| | | */ |
| | | @GetMapping("/export") |
| | | @GetMapping("/noToken/export") |
| | | @ApiOperation(value = "导出走访任务") |
| | | public void export(HttpServletResponse response,EventTasksQuery query){ |
| | | query.setCommunityId(this.getCommunityId()); |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | query.setPageNum(1L); |
| | | query.setPageSize(2000L); |
| | | ServletOutputStream os = null; |
| | |
| | | List<EventVisitingTasksVO> list = gridService.exportTaskList(query); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = "走访任务-"+ DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"); |
| | | String fileName = "走访任务-"+ DateUtil.format(new Date(),"yyyyMMddHHmmss"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20") + ".xlsx"); |
| | | // 如果不用模板的方式导出的话,是doWrite |
| | | EasyExcel.write(response.getOutputStream(), EventVisitingTasksVO.class).sheet(fileName).doWrite(list); |
| | | EasyExcel.write(os, EventVisitingTasksVO.class).sheet(fileName).doWrite(list); |
| | | os.flush(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | }finally { |
| | |
| | | @PostMapping("/visitorList") |
| | | @ApiOperation(value = "待走访人员列表", response= EventVisitListVO.class) |
| | | public R visitorList(@RequestBody EventVisitListQuery query){ |
| | | query.setCommunityId(this.getCommunityId()); |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | return gridService.visitorList(query); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail/{id}") |
| | | @ApiOperation(value = "待走访人员详情") |
| | | @ApiOperation(value = "待走访人员详情",response = EventVisitingTasksDetailsVO.class) |
| | | public R detail(@PathVariable("id") Long id){ |
| | | return gridService.detail(id); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "新增走访任务") |
| | | public R add(@RequestParam("ids") String ids){ |
| | | return gridService.addVisitingTask(ids,this.getCommunityId(),this.getUserId()); |
| | | public R add(@RequestBody IdDTO idDTO){ |
| | | return gridService.addVisitingTask(idDTO,this.getCommunityId(),this.getUserId()); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"居民模块"}) |
| | | @RestController |
| | | @RequestMapping("/population/") |
| | | public class PopulationApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | @ApiOperation(value = "居民列表@lyq",response = ComMngPopulationListVO.class) |
| | | @PostMapping("/list") |
| | | public R list(@RequestBody ComMngPopulationListDTO populationListDTO){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | populationListDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return communityService.getGridPopulationList(populationListDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | public void operLogPoinCut() { |
| | | } |
| | | |
| | | // /** |
| | | // * 设置操作异常切入点记录异常日志 扫描所有controller包下操作 |
| | | // */ |
| | | // @Pointcut("execution(* com.hyd.zcar.cms.controller..*.*(..))") |
| | | // public void operExceptionLogPoinCut() { |
| | | // } |
| | | |
| | | /** |
| | | * 正常返回通知,拦截用户操作日志,连接点正常执行完成后执行, 如果连接点抛出异常,则不会执行 |
| | |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("操作日志获取登录用户信息失败【{}】",joinPoint); |
| | | log.error("操作日志获取登录用户信息失败【{}】", joinPoint); |
| | | return; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo=new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO= JSONObject.parseObject(userInfo,LoginUserInfoVO.class); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | |
| | | SysOperLogVO operlog = new SysOperLogVO(); |
| | | try { |
| | |
| | | if (opLog != null) { |
| | | String operModul = opLog.operModul(); |
| | | int operType = opLog.operType(); |
| | | operlog.setTitle(operModul); // 操作模块 |
| | | operlog.setBusinessType(operType); // 操作类型 |
| | | operlog.setTitle(operModul); |
| | | // 操作模块 |
| | | operlog.setBusinessType(operType); |
| | | // 操作类型 |
| | | } |
| | | // 获取请求的类名 |
| | | String className = joinPoint.getTarget().getClass().getName(); |
| | |
| | | String methodName = method.getName(); |
| | | methodName = className + "." + methodName; |
| | | |
| | | operlog.setMethod(methodName); // 请求方法 |
| | | operlog.setMethod(methodName); |
| | | // 请求方法 |
| | | |
| | | if (joinPoint.getArgs().length > 0) { |
| | | for (Object o : joinPoint.getArgs()) { |
| | | if (o instanceof HttpServletRequest || o instanceof HttpServletResponse) { |
| | | continue; |
| | | } |
| | | operlog.setOperParam(JSONObject.toJSONString(o)); // 请求参数 |
| | | operlog.setOperParam(JSONObject.toJSONString(o)); |
| | | // 请求参数 |
| | | } |
| | | } |
| | | |
| | | operlog.setJsonResult(JSONObject.toJSONString(keys)); // 返回结果 |
| | | operlog.setJsonResult(JSONObject.toJSONString(keys)); |
| | | // 返回结果 |
| | | operlog.setAccount(loginUserInfoVO.getAccount()); |
| | | operlog.setOperName(loginUserInfoVO.getName()); // 请求用户名称 |
| | | operlog.setOperIp(IPUtil.getIpAddress(request)); // 请求IP |
| | | operlog.setOperUrl(request.getRequestURI()); // 请求URI |
| | | operlog.setOperName(loginUserInfoVO.getName()); |
| | | // 请求用户名称 |
| | | operlog.setOperIp(IPUtil.getIpAddress(request)); |
| | | // 请求IP |
| | | operlog.setOperUrl(request.getRequestURI()); |
| | | // 请求URI |
| | | operlog.setRequestMethod(request.getMethod()); |
| | | operlog.setOperLocation(IPUtil.getIpBelongAddress(request)); |
| | | operlog.setOperTime(new Date()); // 创建时间 |
| | | operlog.setOperTime(new Date()); |
| | | // 创建时间 |
| | | operlog.setAccount(loginUserInfoVO.getAccount()); |
| | | Long communityId = loginUserInfoVO.getCommunityId(); |
| | | operlog.setCommunityId(null==communityId?0:communityId); |
| | | operlog.setCommunityId(null == communityId ? 0 : communityId); |
| | | userService.addOperLog(operlog); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // /** |
| | | // * 异常返回通知,用于拦截异常日志信息 连接点抛出异常后执行 |
| | | // * |
| | | // * @param joinPoint 切入点 |
| | | // * @param e 异常信息 |
| | | // */ |
| | | // @AfterThrowing(pointcut = "operExceptionLogPoinCut()", throwing = "e") |
| | | // public void saveExceptionLog(JoinPoint joinPoint, Throwable e) { |
| | | // // 获取RequestAttributes |
| | | // RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | // // 从获取RequestAttributes中获取HttpServletRequest的信息 |
| | | // HttpServletRequest request = (HttpServletRequest) requestAttributes |
| | | // .resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // |
| | | // ExceptionLog excepLog = new ExceptionLog(); |
| | | // try { |
| | | // // 从切面织入点处通过反射机制获取织入点处的方法 |
| | | // MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
| | | // // 获取切入点所在的方法 |
| | | // Method method = signature.getMethod(); |
| | | // excepLog.setExcId(UuidUtil.get32UUID()); |
| | | // // 获取请求的类名 |
| | | // String className = joinPoint.getTarget().getClass().getName(); |
| | | // // 获取请求的方法名 |
| | | // String methodName = method.getName(); |
| | | // methodName = className + "." + methodName; |
| | | // // 请求的参数 |
| | | // Map<String, String> rtnMap = converMap(request.getParameterMap()); |
| | | // // 将参数所在的数组转换成json |
| | | // String params = JSON.toJSONString(rtnMap); |
| | | // excepLog.setExcRequParam(params); // 请求参数 |
| | | // excepLog.setOperMethod(methodName); // 请求方法名 |
| | | // excepLog.setExcName(e.getClass().getName()); // 异常名称 |
| | | // excepLog.setExcMessage(stackTraceToString(e.getClass().getName(), e.getMessage(), e.getStackTrace())); // 异常信息 |
| | | // excepLog.setOperUserId(UserShiroUtil.getCurrentUserLoginName()); // 操作员ID |
| | | // excepLog.setOperUserName(UserShiroUtil.getCurrentUserName()); // 操作员名称 |
| | | // excepLog.setOperUri(request.getRequestURI()); // 操作URI |
| | | // excepLog.setOperIp(IPUtil.getRemortIP(request)); // 操作员IP |
| | | // excepLog.setOperVer(operVer); // 操作版本号 |
| | | // excepLog.setOperCreateTime(new Date()); // 发生异常时间 |
| | | // |
| | | // exceptionLogService.insert(excepLog); |
| | | // |
| | | // } catch (Exception e2) { |
| | | // e2.printStackTrace(); |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | /** |
| | | * 转换request 请求参数 |
| | |
| | | * @param paramMap request获取的参数数组 |
| | | */ |
| | | public Map<String, String> converMap(Map<String, String[]> paramMap) { |
| | | Map<String, String> rtnMap = new HashMap<String, String>(); |
| | | Map<String, String> rtnMap = new HashMap<>(6); |
| | | for (String key : paramMap.keySet()) { |
| | | rtnMap.put(key, paramMap.get(key)[0]); |
| | | } |
| | | return rtnMap; |
| | | } |
| | | |
| | | private String getPostData(HttpServletRequest request) { |
| | | private String getPostData(HttpServletRequest request) { |
| | | StringBuffer data = new StringBuffer(); |
| | | String line = null; |
| | | BufferedReader reader = null; |
| | | try { |
| | | reader = request.getReader(); |
| | | while (null != (line = reader.readLine())) |
| | | while (null != (line = reader.readLine())) { |
| | | data.append(line); |
| | | } |
| | | } catch (IOException e) { |
| | | } finally { |
| | | } |
| | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.api.EventFile; |
| | | import com.panzhihua.common.model.dtos.api.EventInfo; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.serviceapi.biz.LcApiService; |
| | | import com.panzhihua.serviceapi.model.dto.LcGridData; |
| | | import com.panzhihua.serviceapi.model.dto.LcKeyPersonVisitRecordQueryDTO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @ApiOperation(value = "提交事件登记关联的文件或者图片信息") |
| | | @PostMapping("lc/event/upload/file") |
| | | public R automationUploadFile(@RequestBody EventFile eventFile) { |
| | | return lcApiService.submitEventRelationFile(eventFile); |
| | | return lcApiService.submitEventOrVisitRecordRelationFile(eventFile); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "获取指定事件信息") |
| | | @GetMapping("lc/event/getEventInfoById") |
| | | public String getEventInfoById(String eventId) { |
| | | try { |
| | | return lcApiService.getEventInfoById(eventId); |
| | | } catch (Exception e) { |
| | | log.error("获取指定事件信息出现错误:{}", e.getMessage()); |
| | | } |
| | | return eventId; |
| | | return lcApiService.getEventInfoById(eventId); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "获取所有或者根据姓名和工号查询,分页") |
| | | @GetMapping("lc/event/getGridMemberListByAreaIdOrName") |
| | | public String getGridMemberListByAreaIdOrName(String eventId) { |
| | | try { |
| | | return lcApiService.getGridMemberListByAreaIdOrName(eventId); |
| | | } catch (Exception e) { |
| | | log.error("获取所有或者根据姓名和工号查询,分页出现错误:{}", e.getMessage()); |
| | | } |
| | | return eventId; |
| | | return lcApiService.getGridMemberListByAreaIdOrName(eventId); |
| | | } |
| | | |
| | | /** |
| | |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * description 流动人口 走访详情 |
| | | * |
| | | * @param recordId 流动人口走访任务ID |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @ApiOperation(value = "流动人口 走访详情") |
| | | @GetMapping("lc/event/getFlowPersonVisitRecordDetailById") |
| | | public String getFlowPersonVisitRecordDetailById(String recordId) { |
| | | return lcApiService.getFlowPersonVisitRecordDetailById(recordId); |
| | | } |
| | | |
| | | /** |
| | | * description 流动人口 走访记录列表 |
| | | * |
| | | * @param lcKeyPersonVisitRecordQueryDTO 入参参数 |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @ApiOperation(value = " 流动人口 走访记录列表,分页") |
| | | @GetMapping("lc/event/getFlowPersonVisitRecordPage") |
| | | public String getFlowPersonVisitRecordPage(@RequestBody LcKeyPersonVisitRecordQueryDTO lcKeyPersonVisitRecordQueryDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | return lcApiService.getFlowPersonVisitRecordPage(lcKeyPersonVisitRecordQueryDTO, loginUserInfo.getUserId()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * description 重点人口 走访详情 |
| | | * |
| | | * @param recordId 流动人口走访任务ID |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @ApiOperation(value = "重点人口 走访详情") |
| | | @GetMapping("lc/event/getKeyPersonVisitRecordDetailById") |
| | | public String getKeyPersonVisitRecordDetailById(String recordId) { |
| | | return lcApiService.getKeyPersonVisitRecordDetailById(recordId); |
| | | } |
| | | |
| | | /** |
| | | * description 重点人口 走访记录列表 |
| | | * |
| | | * @param lcKeyPersonVisitRecordQueryDTO 入参参数 |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @ApiOperation(value = " 重点人口 走访记录列表") |
| | | @GetMapping("lc/event/getKeyPersonVisitRecordPage") |
| | | public String getKeyPersonVisitRecordPage(@RequestBody LcKeyPersonVisitRecordQueryDTO lcKeyPersonVisitRecordQueryDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | return lcApiService.getKeyPersonVisitRecordPage(lcKeyPersonVisitRecordQueryDTO, loginUserInfo.getUserId()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * description 自动上传走访记录 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @ApiOperation(value = "自动上传重点人员和流动人员走访记录") |
| | | @GetMapping("lc/auto/upload/visit_record") |
| | | public void automationUploadVisitRecord() { |
| | | try { |
| | | lcApiService.automationUploadVisitRecord(); |
| | | } catch (Exception e) { |
| | | log.error("自动上传重点人员走访记录:{}", e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.serviceapi.biz; |
| | | |
| | | import com.panzhihua.common.api.LcReturnObject; |
| | | import com.panzhihua.common.model.dtos.api.EventFile; |
| | | import com.panzhihua.common.model.dtos.api.EventInfo; |
| | | import com.panzhihua.common.model.dtos.grid.LcEventVisitingTasksListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.serviceapi.model.dto.LcFlowPersonVisitRecordDTO; |
| | | import com.panzhihua.serviceapi.model.dto.LcGridData; |
| | | import com.panzhihua.serviceapi.model.dto.LcKeyPersonVisitRecordDTO; |
| | | import com.panzhihua.serviceapi.model.dto.LcKeyPersonVisitRecordQueryDTO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | R submitEventRelationFile(EventFile eventFile); |
| | | R submitEventOrVisitRecordRelationFile(EventFile eventFile); |
| | | |
| | | /** |
| | | * description 获取指定事件信息 |
| | |
| | | */ |
| | | void automationUploadEventAndFile(); |
| | | |
| | | |
| | | /** |
| | | * description 流动人口 走访详情 |
| | | * |
| | | * @param recordId 流动人口走访任务ID |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | String getFlowPersonVisitRecordDetailById(String recordId); |
| | | |
| | | /** |
| | | * description 流动人口 走访记录列表 |
| | | * |
| | | * @param personVisitRecordQueryDTO 入参参数 |
| | | * @param loginUserId 当前登陆用户ID |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | String getFlowPersonVisitRecordPage(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, Long loginUserId); |
| | | |
| | | /** |
| | | * description 上传流动人口走访记录 |
| | | * |
| | | * @param lcFlowPersonVisitRecordDTO 入参参数 |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | String uploadFlowPersonVisitRecord(LcFlowPersonVisitRecordDTO lcFlowPersonVisitRecordDTO); |
| | | |
| | | /** |
| | | * description 请求上传流动人口走访记录导浪潮市平台服务器 |
| | | * |
| | | * @param lcEventVisitingTasksListDTO 走访事件对象 |
| | | * @param lcGrid 浪潮对应的网格ID |
| | | * @param lcGridUserId 浪潮网格员对应的用户ID |
| | | * @param populationDetail 实有人口基础信息 |
| | | * @param gridName 网格名称 |
| | | * @param data 精度维度数组 |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | LcReturnObject requestLcFlowPersonVisitRecord(LcEventVisitingTasksListDTO lcEventVisitingTasksListDTO, String lcGrid, String lcGridUserId, Object populationDetail, String gridName, String[] data); |
| | | |
| | | /** |
| | | * description 请求上传重点人口走访记录导浪潮市平台服务器 |
| | | * |
| | | * @param lcEventVisitingTasksListDTO 走访事件对象 |
| | | * @param lcGrid 浪潮对应的网格ID |
| | | * @param lcGridUserId 浪潮网格员对应的用户ID |
| | | * @param populationDetail 实有人口基础信息 |
| | | * @param gridName 网格名称 |
| | | * @param data 精度维度数组 |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | LcReturnObject requestLcKeyPersonVisitRecord(LcEventVisitingTasksListDTO lcEventVisitingTasksListDTO, String lcGrid, String lcGridUserId, Object populationDetail, String gridName, String[] data); |
| | | |
| | | /** |
| | | * description 上传重点人口走访记录 |
| | | * |
| | | * @param lcKeyPersonVisitRecordDTO 入参参数 |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | String uploadKeyPersonVisitRecord(LcKeyPersonVisitRecordDTO lcKeyPersonVisitRecordDTO); |
| | | |
| | | /** |
| | | * description 重点人口 走访详情 |
| | | * |
| | | * @param recordId 流动人口走访任务ID |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | String getKeyPersonVisitRecordDetailById(String recordId); |
| | | |
| | | /** |
| | | * description 重点人口 走访记录列表 |
| | | * |
| | | * @param personVisitRecordQueryDTO 入参参数 |
| | | * @param loginUserId 当前登陆用户ID |
| | | * @return String 事件信息 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | String getKeyPersonVisitRecordPage(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, Long loginUserId); |
| | | |
| | | /** |
| | | * description 自动上传重点人员走访记录 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | void automationUploadVisitRecord(); |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.panzhihua.common.api.LangchaoApiConstants; |
| | | import com.panzhihua.common.api.LcApiConstants; |
| | | import com.panzhihua.common.api.LcRequestEnum; |
| | | import com.panzhihua.common.api.LcReturnObject; |
| | | import com.panzhihua.common.api.LcVisitRecordKeyPersonLabelEnum; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.enums.LocalEventToLangChaoEventTypeEnum; |
| | | import com.panzhihua.common.model.dtos.api.EventFile; |
| | | import com.panzhihua.common.model.dtos.api.EventInfo; |
| | | import com.panzhihua.common.model.dtos.grid.LcEventVisitingTasksListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.serviceapi.biz.LcApiService; |
| | | import com.panzhihua.serviceapi.model.dto.LcFlowPersonVisitRecordDTO; |
| | | import com.panzhihua.serviceapi.model.dto.LcGridData; |
| | | import com.panzhihua.serviceapi.model.dto.LcKeyPersonVisitRecordDTO; |
| | | import com.panzhihua.serviceapi.model.dto.LcKeyPersonVisitRecordQueryDTO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 从redis获取token |
| | | * |
| | |
| | | */ |
| | | private String getAuthToken() { |
| | | ValueOperations<String, String> valueOperations = redisTemplate.opsForValue(); |
| | | if (valueOperations.get(LangchaoApiConstants.LANG_CHAO_TOKEN) == null) { |
| | | saveTokenFromRemoteRequest("18080799023", "123456"); |
| | | if (valueOperations.get(LcApiConstants.LANG_CHAO_TOKEN) == null) { |
| | | saveTokenFromRemoteRequest(LcApiConstants.LC_UPLOAD_NAME, LcApiConstants.LC_UPLOAD_PASSWORD); |
| | | } |
| | | return valueOperations.get(LangchaoApiConstants.LANG_CHAO_TOKEN); |
| | | return valueOperations.get(LcApiConstants.LANG_CHAO_TOKEN); |
| | | } |
| | | |
| | | @Override |
| | | public String saveTokenFromRemoteRequest(String name, String password) { |
| | | if (redisTemplate.hasKey(LangchaoApiConstants.LANG_CHAO_TOKEN)) { |
| | | Boolean authToken = redisTemplate.hasKey(LcApiConstants.LANG_CHAO_TOKEN); |
| | | if (authToken != null) { |
| | | //如果redis存在token,直接返回redis存储的token |
| | | ValueOperations<String, String> valueOperations = redisTemplate.opsForValue(); |
| | | return valueOperations.get(LangchaoApiConstants.LANG_CHAO_TOKEN); |
| | | return valueOperations.get(LcApiConstants.LANG_CHAO_TOKEN); |
| | | } else { |
| | | //如果第一次请求浪潮的token请求,请求完成后,保存对于的token到数据库中。便于12小时内重复调用 |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_TOKEN_URL.replace("#username", name).replace("#password", password)); |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_GET_TOKEN_URL.replace("#username", name).replace("#password", password)); |
| | | HttpResponse result = request.execute(); |
| | | ValueOperations<String, String> valueOperations = redisTemplate.opsForValue(); |
| | | valueOperations.set(LangchaoApiConstants.LANG_CHAO_TOKEN, result.body(), TokenConstant.EXPIRETIME, TimeUnit.MINUTES); |
| | | valueOperations.set(LcApiConstants.LANG_CHAO_TOKEN, result.body(), TokenConstant.EXPIRETIME, TimeUnit.MINUTES); |
| | | return result.toString(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String getAllEventTypeList() { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_EVENT_CATEGORY_URL); |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_EVENT_CATEGORY_URL); |
| | | request.auth(getAuthToken()); |
| | | HttpResponse result = request.execute(); |
| | | return result.body(); |
| | |
| | | |
| | | @Override |
| | | public String submitEventRegister(EventInfo eventInfo) { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_REGIST_EVENT_URL); |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_REGIST_EVENT_URL); |
| | | request.auth(getAuthToken()); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R submitEventRelationFile(EventFile eventFile) { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_EVENT_FILE_UPLOAD_URL); |
| | | public R submitEventOrVisitRecordRelationFile(EventFile eventFile) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_EVENT_FILE_UPLOAD_URL); |
| | | request.auth(getAuthToken()); |
| | | try { |
| | | HttpURLConnection httpUrl = (HttpURLConnection) new URL(eventFile.getFiles()).openConnection(); |
| | |
| | | |
| | | @Override |
| | | public String getEventInfoById(String eventId) { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_APP_EVENT_INFO_DETAIL_URL); |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_APP_EVENT_INFO_DETAIL_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("eventId", eventId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | |
| | | @Override |
| | | public List<LcGridData> getGridListByAreaId(String areaId) { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_EVENT_INFO_AREA_ID_URL); |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_GET_EVENT_INFO_AREA_ID_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("areaId", areaId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | |
| | | @Override |
| | | public String getGridMemberListByAreaIdOrName(String areaId) { |
| | | HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_GETALL_SEARCH_PAGE_URL); |
| | | HttpRequest request = HttpUtil.createGet(LcApiConstants.GRID_GET_GETALL_SEARCH_PAGE_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("areaId", areaId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public String getFlowPersonVisitRecordDetailById(String recordId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_FLOW_PERSON_DETAIL_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("id", recordId); |
| | | HttpResponse result = request.execute(); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public String getFlowPersonVisitRecordPage(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, Long loginUserId) { |
| | | HttpResponse result = getHttpResponse(personVisitRecordQueryDTO, loginUserId, LcApiConstants.VISIT_RECORD_FLOW_PERSON_PAGE_URL, "flowPeopleId"); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public String uploadFlowPersonVisitRecord(LcFlowPersonVisitRecordDTO lcFlowPersonVisitRecordDTO) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_FLOW_PERSON_SAVE_URL); |
| | | request.auth(getAuthToken()); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | | //对象转map |
| | | Map m = mapper.readValue(mapper.writeValueAsString(lcFlowPersonVisitRecordDTO), Map.class); |
| | | request.form(m); |
| | | } catch (JsonProcessingException e) { |
| | | log.info("方法uploadFlowPersonVisitRecord发生错误:{}", e.getMessage()); |
| | | } |
| | | HttpResponse result = request.execute(); |
| | | log.info("submit上传浪潮事件信息:{}", result.body()); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public String uploadKeyPersonVisitRecord(LcKeyPersonVisitRecordDTO lcKeyPersonVisitRecordDTO) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL); |
| | | request.auth(getAuthToken()); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | | //对象转map |
| | | Map m = mapper.readValue(mapper.writeValueAsString(lcKeyPersonVisitRecordDTO), Map.class); |
| | | request.form(m); |
| | | } catch (JsonProcessingException e) { |
| | | log.info("方法uploadKeyPersonVisitRecord发生错误:{}", e.getMessage()); |
| | | } |
| | | HttpResponse result = request.execute(); |
| | | log.info("submit上传浪潮事件信息:{}", result.body()); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public String getKeyPersonVisitRecordDetailById(String recordId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_KEY_PERSON_DETAIL_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("id", recordId); |
| | | HttpResponse result = request.execute(); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public String getKeyPersonVisitRecordPage(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, Long loginUserId) { |
| | | HttpResponse result = getHttpResponse(personVisitRecordQueryDTO, loginUserId, LcApiConstants.VISIT_RECORD_KEY_PERSON_PAGE_URL, "keyPersonId"); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public void automationUploadVisitRecord() { |
| | | List<LcEventVisitingTasksListDTO> unUploadTaskList = gridService.getUnUploadVisitingTask(); |
| | | unUploadTaskList.forEach(lcEventVisitingTasksListDTO -> { |
| | | String lcGrid = gridService.getLcGridIdByLocal(lcEventVisitingTasksListDTO.getGridId()); |
| | | String lcGridUserId = gridService.getLcUserIdByLocalUserId(lcEventVisitingTasksListDTO.getGridMember().toString()); |
| | | R populationDetail = communityService.detailPopulation(lcEventVisitingTasksListDTO.getVisiterId()); |
| | | R grid = gridService.eventGridDataDetails(lcEventVisitingTasksListDTO.getGridId()); |
| | | EventGridDataDetailsVO gridData = (EventGridDataDetailsVO) grid.getData(); |
| | | String[] data = lcEventVisitingTasksListDTO.getHappentLatLng().split(","); |
| | | if (lcEventVisitingTasksListDTO.getVisiterType() != null) { |
| | | log.info("上传数据导重点人口走访记录表"); |
| | | LcReturnObject lcReturnObject = requestLcKeyPersonVisitRecord(lcEventVisitingTasksListDTO, lcGrid, lcGridUserId, populationDetail.getData(), gridData.getGridName(), data); |
| | | if (LcRequestEnum.SUCCESS.getCode().equals(lcReturnObject.getCode())) { |
| | | uploadVisitRecord(lcEventVisitingTasksListDTO); |
| | | gridService.updateLcUploadFlagVisitingTask(lcEventVisitingTasksListDTO.getId()); |
| | | } |
| | | } else { |
| | | log.info("上传数据导流动人口走访记录表"); |
| | | LcReturnObject lcReturnObject = requestLcFlowPersonVisitRecord(lcEventVisitingTasksListDTO, lcGrid, lcGridUserId, populationDetail.getData(), gridData.getGridName(), data); |
| | | if (LcRequestEnum.SUCCESS.getCode().equals(lcReturnObject.getCode())) { |
| | | uploadVisitRecord(lcEventVisitingTasksListDTO); |
| | | gridService.updateLcUploadFlagVisitingTask(lcEventVisitingTasksListDTO.getId()); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void uploadVisitRecord(LcEventVisitingTasksListDTO lcEventVisitingTasksListDTO) { |
| | | log.info("开始上传走访任务附件文件"); |
| | | List<EventResourceVO> picsList = lcEventVisitingTasksListDTO.getPics(); |
| | | uploadVisitRecordFile(lcEventVisitingTasksListDTO, picsList, "IMAGE"); |
| | | List<EventResourceVO> audiosList = lcEventVisitingTasksListDTO.getAudios(); |
| | | uploadVisitRecordFile(lcEventVisitingTasksListDTO, audiosList, "AUDIO"); |
| | | List<EventResourceVO> videoList = lcEventVisitingTasksListDTO.getVideos(); |
| | | uploadVisitRecordFile(lcEventVisitingTasksListDTO, videoList, "VIDEO"); |
| | | log.info("结束上传走访任务附件文件"); |
| | | } |
| | | |
| | | private void uploadVisitRecordFile(LcEventVisitingTasksListDTO lcEventVisitingTasksListDTO, List<EventResourceVO> picsList, String type) { |
| | | picsList.forEach(eventResourceVO -> { |
| | | EventFile eventFile = new EventFile(); |
| | | eventFile.setDataId(lcEventVisitingTasksListDTO.getId().toString()); |
| | | eventFile.setFiles(eventResourceVO.getUrl()); |
| | | eventFile.setType(type); |
| | | eventFile.setModule("key_person"); |
| | | eventFile.setFileName(eventResourceVO.getResourceName()); |
| | | submitEventOrVisitRecordRelationFile(eventFile); |
| | | }); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public LcReturnObject requestLcFlowPersonVisitRecord(LcEventVisitingTasksListDTO lcEventVisitingTasksListDTO, String lcGrid, String lcGridUserId, Object populationDetail, String gridName, String[] data) { |
| | | //如果是流动人口走访 |
| | | LcFlowPersonVisitRecordDTO lcFlowPersonVisitRecordDTO = new LcFlowPersonVisitRecordDTO(); |
| | | lcFlowPersonVisitRecordDTO.setId(lcEventVisitingTasksListDTO.getId().toString()); |
| | | lcFlowPersonVisitRecordDTO.setUserId(lcGridUserId); |
| | | lcFlowPersonVisitRecordDTO.setGridPersonName(lcEventVisitingTasksListDTO.getGridMemberName()); |
| | | lcFlowPersonVisitRecordDTO.setGridPersonPhone(lcEventVisitingTasksListDTO.getGridMenberTele()); |
| | | JSONObject population = (JSONObject) JSONObject.toJSON(populationDetail); |
| | | lcFlowPersonVisitRecordDTO.setComMngPopulation(population.toJSONString()); |
| | | lcFlowPersonVisitRecordDTO.setGridId(lcGrid); |
| | | lcFlowPersonVisitRecordDTO.setGridName(gridName); |
| | | lcFlowPersonVisitRecordDTO.setWorkWithPoliceMan("0"); |
| | | lcFlowPersonVisitRecordDTO.setPoliceManName(null); |
| | | lcFlowPersonVisitRecordDTO.setPoliceManPhone(null); |
| | | lcFlowPersonVisitRecordDTO.setPoliceManWorkContent(null); |
| | | lcFlowPersonVisitRecordDTO.setVisitTime(lcEventVisitingTasksListDTO.getHappenTime().getTime()); |
| | | lcFlowPersonVisitRecordDTO.setVisitAddress(lcEventVisitingTasksListDTO.getHappentAddress()); |
| | | lcFlowPersonVisitRecordDTO.setLongitude(Double.valueOf(data[0])); |
| | | lcFlowPersonVisitRecordDTO.setLatitude(Double.valueOf(data[1])); |
| | | lcFlowPersonVisitRecordDTO.setHouseType(null); |
| | | lcFlowPersonVisitRecordDTO.setHouseAddress(lcEventVisitingTasksListDTO.getHappentAddress()); |
| | | lcFlowPersonVisitRecordDTO.setIsReportInfo(null); |
| | | lcFlowPersonVisitRecordDTO.setHaveCertificate("0"); |
| | | lcFlowPersonVisitRecordDTO.setCertificateType("身份证"); |
| | | lcFlowPersonVisitRecordDTO.setCertificateNumber(population.getString("cardNo")); |
| | | lcFlowPersonVisitRecordDTO.setCertificateDeadTime("0"); |
| | | lcFlowPersonVisitRecordDTO.setIsPropaganda("1"); |
| | | lcFlowPersonVisitRecordDTO.setIsCheckReview("1"); |
| | | lcFlowPersonVisitRecordDTO.setIsAbnormal(lcEventVisitingTasksListDTO.getException().toString()); |
| | | lcFlowPersonVisitRecordDTO.setAbnormalSituation(lcEventVisitingTasksListDTO.getTableContentJson()); |
| | | lcFlowPersonVisitRecordDTO.setRemark(lcEventVisitingTasksListDTO.getEventDes()); |
| | | log.info("事件请求数据:{}", JSONObject.toJSONString(lcFlowPersonVisitRecordDTO)); |
| | | String flowPersonData = uploadFlowPersonVisitRecord(lcFlowPersonVisitRecordDTO); |
| | | LcReturnObject lcReturnObject = JSONObject.parseObject(flowPersonData, LcReturnObject.class); |
| | | log.info("提交浪潮服务器,接口返回结果为:{}", lcReturnObject); |
| | | return lcReturnObject; |
| | | } |
| | | |
| | | @Override |
| | | public LcReturnObject requestLcKeyPersonVisitRecord(LcEventVisitingTasksListDTO lcEventVisitingTasksListDTO, String lcGrid, String lcGridUserId, Object populationDetail, String gridName, String[] data) { |
| | | LcKeyPersonVisitRecordDTO keyPersonVisitRecordDTO = new LcKeyPersonVisitRecordDTO(); |
| | | keyPersonVisitRecordDTO.setId(lcEventVisitingTasksListDTO.getId().toString()); |
| | | keyPersonVisitRecordDTO.setUserId(lcGridUserId); |
| | | keyPersonVisitRecordDTO.setGridPersonName(lcEventVisitingTasksListDTO.getGridMemberName()); |
| | | keyPersonVisitRecordDTO.setGridPersonPhone(lcEventVisitingTasksListDTO.getGridMenberTele()); |
| | | keyPersonVisitRecordDTO.setComMngPopulation(JSONObject.toJSONString(populationDetail)); |
| | | keyPersonVisitRecordDTO.setGridId(lcGrid); |
| | | keyPersonVisitRecordDTO.setGridName(gridName); |
| | | keyPersonVisitRecordDTO.setVisitTime(lcEventVisitingTasksListDTO.getHappenTime().getTime()); |
| | | keyPersonVisitRecordDTO.setVisitAddress(lcEventVisitingTasksListDTO.getHappentAddress()); |
| | | keyPersonVisitRecordDTO.setLongitude(Double.valueOf(data[0])); |
| | | keyPersonVisitRecordDTO.setLatitude(Double.valueOf(data[1])); |
| | | keyPersonVisitRecordDTO.setFamilyMemberContact(lcEventVisitingTasksListDTO.getFamilyPhone()); |
| | | keyPersonVisitRecordDTO.setHowLive(lcEventVisitingTasksListDTO.getFamilySource()); |
| | | keyPersonVisitRecordDTO.setIsAbnormal(lcEventVisitingTasksListDTO.getException().toString()); |
| | | keyPersonVisitRecordDTO.setAbnormalSituation(null); |
| | | keyPersonVisitRecordDTO.setAbnormalDes(lcEventVisitingTasksListDTO.getTableContentJson()); |
| | | keyPersonVisitRecordDTO.setRemark(lcEventVisitingTasksListDTO.getEventDes()); |
| | | keyPersonVisitRecordDTO.setType(LcVisitRecordKeyPersonLabelEnum.getCnDescByName(lcEventVisitingTasksListDTO.getVisiterType())); |
| | | log.info("事件请求数据:{}", JSONObject.toJSONString(keyPersonVisitRecordDTO)); |
| | | String remoteData = uploadKeyPersonVisitRecord(keyPersonVisitRecordDTO); |
| | | LcReturnObject lcReturnObject = JSONObject.parseObject(remoteData, LcReturnObject.class); |
| | | log.info("提交浪潮服务器,接口返回结果为:{}", remoteData); |
| | | return lcReturnObject; |
| | | } |
| | | |
| | | |
| | | private HttpResponse getHttpResponse(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, Long loginUserId, String requestUrl, String flowPeopleId) { |
| | | HttpRequest request = HttpUtil.createPost(requestUrl); |
| | | request.auth(getAuthToken()); |
| | | request.form("userId", loginUserId); |
| | | request.form("gridId", personVisitRecordQueryDTO.getGridId()); |
| | | request.form("limit", personVisitRecordQueryDTO.getLimit()); |
| | | request.form("startNumber", personVisitRecordQueryDTO.getStartNumber()); |
| | | request.form(flowPeopleId, personVisitRecordQueryDTO.getPersonId()); |
| | | return request.execute(); |
| | | } |
| | | |
| | | private void uploadLcApiEventFile(EventDetailsVO eventInfoVo, List<EventResourceVO> picsList, String type) { |
| | | picsList.forEach(eventResourceVO -> { |
| | | EventFile eventFile = new EventFile(); |
| | |
| | | eventFile.setType(type); |
| | | eventFile.setModule("event"); |
| | | eventFile.setFileName(eventResourceVO.getResourceName()); |
| | | submitEventRelationFile(eventFile); |
| | | submitEventOrVisitRecordRelationFile(eventFile); |
| | | }); |
| | | } |
| | | |
| | |
| | | * 工具方法 |
| | | * inputStream 转 File |
| | | */ |
| | | public static File inputStreamToFile(InputStream ins, String name) throws Exception { |
| | | private static File inputStreamToFile(InputStream ins, String name) throws Exception { |
| | | File file = new File(System.getProperty("java.io.tmpdir") + File.separator + name); |
| | | log.info(System.getProperty("java.io.tmpdir") + File.separator + name); |
| | | if (file.exists()) { |
New file |
| | |
| | | package com.panzhihua.serviceapi.model.dto; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * program 攀枝花智慧社区项目 |
| | | * description 实有人口信息 |
| | | * |
| | | * @author manailin |
| | | * Date 2021-06-22 15:30 |
| | | **/ |
| | | @Data |
| | | public class ComMngPopulationDTO implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 自增 id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 街道id |
| | | */ |
| | | private Long streetId; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long actId; |
| | | /** |
| | | * 小区id(实有房屋id) |
| | | */ |
| | | private Long villageId; |
| | | /** |
| | | * 家庭成员(姓名) |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 性别(1.男 2.女 3.未知) |
| | | */ |
| | | private Integer sex; |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | /** |
| | | * 临时用 |
| | | */ |
| | | private String cardNoStr; |
| | | /** |
| | | * 街路巷 |
| | | */ |
| | | private String road; |
| | | /** |
| | | * 门牌号 |
| | | */ |
| | | private String doorNo; |
| | | /** |
| | | * 楼排号 |
| | | */ |
| | | private String floor; |
| | | /** |
| | | * 单元号 |
| | | */ |
| | | private String unitNo; |
| | | /** |
| | | * 户室(房间号) |
| | | */ |
| | | private String houseNo; |
| | | /** |
| | | * 政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众) |
| | | */ |
| | | private Integer politicalOutlook; |
| | | /** |
| | | * 工作单位 |
| | | */ |
| | | private String workCompany; |
| | | /** |
| | | * 特殊情况 |
| | | */ |
| | | private String specialSituation; |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @EncryptDecryptField |
| | | private String phone; |
| | | /** |
| | | * 外地or本地(1.本地 2.外地) |
| | | */ |
| | | private Integer outOrLocal; |
| | | /** |
| | | * 户口所在地 |
| | | */ |
| | | private String censusRegister; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 标签集合(多个标签以,隔开) |
| | | */ |
| | | private String label; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | /** |
| | | * 籍贯 |
| | | */ |
| | | private String nativePlace; |
| | | /** |
| | | * 民族 |
| | | */ |
| | | private String nation; |
| | | /** |
| | | * 是否租住(0.否 1.是) |
| | | */ |
| | | private Integer isRent; |
| | | /** |
| | | * 小区名字 |
| | | */ |
| | | private String villageName; |
| | | |
| | | |
| | | /** |
| | | * 文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他) |
| | | */ |
| | | private Integer cultureLevel; |
| | | |
| | | /** |
| | | * 婚姻状况(1.未婚 2.已婚 3.离异 4.丧偶 5.分居 6.其他) |
| | | */ |
| | | private Integer marriage; |
| | | |
| | | |
| | | /** |
| | | * 健康状况 |
| | | */ |
| | | private String healthy; |
| | | |
| | | /** |
| | | * 居住地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 出生年月日 |
| | | */ |
| | | private String birthday; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.serviceapi.model.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 |
| | | * description 浪潮流动人员走访记录 |
| | | * |
| | | * @author manailin |
| | | * Date 2021-06-22 15:30 |
| | | **/ |
| | | @Data |
| | | public class LcFlowPersonVisitRecordDTO { |
| | | /** |
| | | * 走访记录id |
| | | */ |
| | | private String id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private String userId; |
| | | /** |
| | | * 网格员姓名 |
| | | */ |
| | | private String gridPersonName; |
| | | /** |
| | | * 网格员电话 |
| | | */ |
| | | private String gridPersonPhone; |
| | | /** |
| | | * 人员基础信息对象 |
| | | */ |
| | | private String comMngPopulation; |
| | | /** |
| | | * 网格ID |
| | | */ |
| | | private String gridId; |
| | | /** |
| | | * 网格名称,用于查询详情时候显示 |
| | | */ |
| | | private String gridName; |
| | | /** |
| | | * 是否在民警带领下工作 |
| | | */ |
| | | private String workWithPoliceMan; |
| | | /** |
| | | * 民警姓名 |
| | | */ |
| | | private String policeManName; |
| | | /** |
| | | * 民警电话 |
| | | */ |
| | | private String policeManPhone; |
| | | /** |
| | | * 工作内容 |
| | | */ |
| | | private String policeManWorkContent; |
| | | /** |
| | | * 走访时间 |
| | | */ |
| | | private Long visitTime; |
| | | /** |
| | | * 走访地址 |
| | | */ |
| | | private String visitAddress; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private Double longitude; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private Double latitude; |
| | | /** |
| | | * 住所类型 |
| | | */ |
| | | private String houseType; |
| | | /** |
| | | * 住所地址 |
| | | */ |
| | | private String houseAddress; |
| | | /** |
| | | * 是否申报流动人口信息 |
| | | */ |
| | | private String isReportInfo; |
| | | /** |
| | | * 是否办证 |
| | | */ |
| | | private String haveCertificate; |
| | | /** |
| | | * 证件类型 |
| | | */ |
| | | private String certificateType; |
| | | /** |
| | | * 证件号码 |
| | | */ |
| | | private String certificateNumber; |
| | | /** |
| | | * 证件到期时间 |
| | | */ |
| | | private String certificateDeadTime; |
| | | /** |
| | | * 是否宣传 |
| | | */ |
| | | private String isPropaganda; |
| | | /** |
| | | * 是否核查申报 |
| | | */ |
| | | private String isCheckReview; |
| | | /** |
| | | * 是否有异常 |
| | | */ |
| | | private String isAbnormal; |
| | | /** |
| | | * 异常情况 |
| | | */ |
| | | private String abnormalSituation; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.serviceapi.model.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 |
| | | * description 浪潮重点人员走访记录 |
| | | * |
| | | * @author manailin |
| | | * Date 2021-06-22 15:30 |
| | | **/ |
| | | @Data |
| | | public class LcKeyPersonVisitRecordDTO { |
| | | /** |
| | | * 走访记录id |
| | | */ |
| | | private String id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private String userId; |
| | | /** |
| | | * 网格员姓名 |
| | | */ |
| | | private String gridPersonName; |
| | | /** |
| | | * 网格员电话 |
| | | */ |
| | | private String gridPersonPhone; |
| | | /** |
| | | * 人员基础信息对象 |
| | | */ |
| | | private String comMngPopulation; |
| | | /** |
| | | * 网格ID |
| | | */ |
| | | private String gridId; |
| | | /** |
| | | * 网格名称,用于查询详情时候显示 |
| | | */ |
| | | private String gridName; |
| | | /** |
| | | * 走访时间 |
| | | */ |
| | | private Long visitTime; |
| | | /** |
| | | * 走访地址 |
| | | */ |
| | | private String visitAddress; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private Double longitude; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private Double latitude; |
| | | /** |
| | | * 家属联系方式 |
| | | */ |
| | | private String familyMemberContact; |
| | | /** |
| | | * 生活来源 |
| | | */ |
| | | private String howLive; |
| | | |
| | | /** |
| | | * 是否有异常 |
| | | */ |
| | | private String isAbnormal; |
| | | /** |
| | | * 异常情况类型 |
| | | */ |
| | | private String abnormalSituation; |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | private String abnormalDes; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * p01_drug吸毒人员 p01_trouble_schiz 严重精神障碍 p01_release 刑满释放 p01_be_corrected 社区矫正人员 |
| | | */ |
| | | private String type; |
| | | } |
New file |
| | |
| | | package com.panzhihua.serviceapi.model.dto; |
| | | |
| | | import lombok.Data; |
| | | /** |
| | | * program 攀枝花智慧社区项目 |
| | | * description 浪潮接口走访任务分页查询DTO |
| | | * |
| | | * @author manailin |
| | | * Date 2021-06-22 15:30 |
| | | **/ |
| | | @Data |
| | | public class LcKeyPersonVisitRecordQueryDTO { |
| | | |
| | | /** |
| | | * 网格ID |
| | | */ |
| | | private String gridId; |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | private String personId; |
| | | /** |
| | | * 开始数量 |
| | | */ |
| | | private String startNumber; |
| | | /** |
| | | * 查询长度 |
| | | */ |
| | | private String limit; |
| | | |
| | | } |
File was renamed from springcloud_k8s_panzhihuazhihuishequ/service_api/src/test/java/com/panzhihua/service_api/biz/impl/LcApiServiceImplTest.java |
| | |
| | | package com.panzhihua.service_api.biz.impl; |
| | | package com.panzhihua.serviceapi.biz.impl; |
| | | |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | |
| | | void submitEventRelationFile() throws URISyntaxException { |
| | | EventFile eventFile = new EventFile(); |
| | | eventFile.setDataId("1111116"); |
| | | //eventFile.setFiles("https://www.baidu.com/img/flexible/logo/pc/result@2.png"); |
| | | eventFile.setFiles("http://image.panzhihua.nhys.cdnhxx.com//idcard/4f843ad2d756456e900d5f24b419aa7c.mp4"); |
| | | eventFile.setType("mp4"); |
| | | eventFile.setModule("event"); |
| | | eventFile.setFileName("4f843ad2d756456e900d5f24b419aa7c.mp4"); |
| | | R result = lcApiService.submitEventRelationFile(eventFile); |
| | | R result = lcApiService.submitEventOrVisitRecordRelationFile(eventFile); |
| | | log.info(JSONObject.toJSONString(result)); |
| | | } |
| | | |
| | |
| | | EventGridDataDetailsVO gridData = (EventGridDataDetailsVO) grid.getData(); |
| | | eventInfo.setGridName(gridData.getGridName()); |
| | | eventInfo.setCaseTypeCode(LocalEventToLangChaoEventTypeEnum.getCodeByName(eventInfoVo.getEventType())); |
| | | String caseTypeName= LocalEventToLangChaoEventTypeEnum.getEventNameByCode(eventInfoVo.getEventType()); |
| | | String caseTypeName = LocalEventToLangChaoEventTypeEnum.getEventNameByCode(eventInfoVo.getEventType()); |
| | | eventInfo.setCaseTypeName(caseTypeName); |
| | | eventInfo.setHappenTime(String.valueOf(eventInfoVo.getHappenTime().getTime())); |
| | | eventInfo.setHappenAddress(eventInfoVo.getHappenAddress()); |
| | |
| | | eventFile.setType("png"); |
| | | eventFile.setModule("event"); |
| | | eventFile.setFileName(eventResourceVO.getResourceName()); |
| | | lcApiService.submitEventRelationFile(eventFile); |
| | | lcApiService.submitEventOrVisitRecordRelationFile(eventFile); |
| | | }); |
| | | List<EventResourceVO> audiosList = eventInfoVo.getAudios(); |
| | | audiosList.forEach(eventResourceVO -> { |
| | |
| | | eventFile.setType("mp3"); |
| | | eventFile.setModule("event"); |
| | | eventFile.setFileName(eventResourceVO.getResourceName()); |
| | | lcApiService.submitEventRelationFile(eventFile); |
| | | lcApiService.submitEventOrVisitRecordRelationFile(eventFile); |
| | | }); |
| | | List<EventResourceVO> videoList = eventInfoVo.getVideos(); |
| | | videoList.forEach(eventResourceVO -> { |
| | |
| | | eventFile.setType("mp4"); |
| | | eventFile.setModule("event"); |
| | | eventFile.setFileName(eventResourceVO.getResourceName()); |
| | | lcApiService.submitEventRelationFile(eventFile); |
| | | lcApiService.submitEventOrVisitRecordRelationFile(eventFile); |
| | | }); |
| | | log.info("结束上传附件图片信息"); |
| | | } |
| | |
| | | SerializerFeature.WriteDateUseDateFormat); |
| | | log.info(pretty); |
| | | } |
| | | |
| | | @Test |
| | | void requestLcFlowPersonVisitRecord() { |
| | | } |
| | | |
| | | @Test |
| | | void automationUploadVisitRecord() { |
| | | lcApiService.automationUploadVisitRecord(); |
| | | } |
| | | |
| | | @Test |
| | | void getGridMemberListByAreaIdOrName() { |
| | | String data = lcApiService.getGridMemberListByAreaIdOrName("jhRxqEQp"); |
| | | log.info(data); |
| | | } |
| | | |
| | | } |
| | |
| | | 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 发布内容 |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComMngPopulationService; |
| | |
| | | return comMngPopulationService.getPopulationRepairByApp(); |
| | | } |
| | | |
| | | /** |
| | | * 综治后台-居民列表 |
| | | * @param populationListDTO 请求参数 |
| | | * @return 居民列表 |
| | | */ |
| | | @PostMapping("/grid/list") |
| | | public R getGridPopulationAdminList(@RequestBody ComMngPopulationListDTO populationListDTO) { |
| | | return comMngPopulationService.getGridPopulationAdminList(populationListDTO); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
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); |
| | | } |
| | | } |
| | |
| | | " AND DATE_FORMAT(caa.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{actActivityListDTO.endTime} " + |
| | | " </if> " + |
| | | "<if test='actActivityListDTO.type!=null'>" + |
| | | " AND caa.type = #{actActivityListDTO.type} " + |
| | | " AND caa.status = #{actActivityListDTO.type} " + |
| | | " </if> " + |
| | | " </where> "+ |
| | | "ORDER BY " + |
| | |
| | | "<if test='comActDynVO.status != null '>" + |
| | | "AND d.`status` = #{comActDynVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.type != null '>" + |
| | | "AND d.type = #{comActDynVO.type} " + |
| | | " </if> " + |
| | | "<if test='comActDynVO.publishAtBegin != null '>" + |
| | | "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " + |
| | | "AND #{comActDynVO.publishAtEnd}" + |
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" + |
| | |
| | | "<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} \n" + |
| | | " </if> " + |
| | | "</where>"+ |
| | | "order by " + |
| | | "case when nc.`status`=1 then 0 else 1 end, \n" + |
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); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.area.AreaAddressVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.user.ComHouseMemberVo; |
| | |
| | | " id = #{populationId}") |
| | | PopulationDetailVO getPopulationDetailApp(@Param("populationId") Long populationId); |
| | | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " * " + |
| | | "FROM " + |
| | | " ( " + |
| | | " SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name` AS userName, " + |
| | | " cmp.label, " + |
| | | " cmp.card_no, " + |
| | | " cmp.card_no_str, " + |
| | | " cmp.sex, " + |
| | | " cmp.address, " + |
| | | " cmp.political_outlook, " + |
| | | " cmp.census_register, " + |
| | | " cmp.house_id, " + |
| | | " cmp.phone, " + |
| | | " IFNULL(cmp.house_id,0) as isHouse, " + |
| | | " ( SELECT event_status FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS eventStatus, " + |
| | | " ( SELECT create_at FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS createAt " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + |
| | | "AND (cmp.name like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%') or cmp.address like concat (#{populationListDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.sex != null'>" + |
| | | "AND cmp.sex = #{populationListDTO.sex} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 1'>" + |
| | | "AND cmp.house_id is not null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 2'>" + |
| | | "AND cmp.house_id is null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.communityId != null'>" + |
| | | "AND cmp.community_id = #{populationListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.politicalOutlook != null'>" + |
| | | "AND cmp.political_outlook = #{populationListDTO.politicalOutlook} " + |
| | | " </if> " + |
| | | " ) as population where 1=1 " + |
| | | "<if test='populationListDTO.eventStatus != null'>" + |
| | | "AND population.eventStatus = #{populationListDTO.eventStatus} " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<ComMngPopulationListVO> getGridPopulationAdminList(Page page,@Param("populationListDTO") ComMngPopulationListDTO populationListDTO); |
| | | |
| | | @Select("select relation from com_mng_population_house_user where house_id = #{houseId} and popul_id = #{populationId}") |
| | | Integer getPopulationRelationByHouseId(@Param("houseId") Long houseId, @Param("populationId") Long populationId); |
| | | |
| | | } |
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 + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 居住地房屋id |
| | | */ |
| | | // private Long houseId; |
| | | private Long houseId; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.未知) |
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); |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | |
| | | R getPopulationDetailApp(Long populationId); |
| | | |
| | | R getPopulationRepairByApp(); |
| | | |
| | | R getGridPopulationAdminList(ComMngPopulationListDTO populationListDTO); |
| | | } |
| | |
| | | if(comMngVillageDO == null){ |
| | | continue; |
| | | } |
| | | vo.setName(vo.getName().replace("栋","")); |
| | | List<ComMngBuildingDO> buildingDOList = this.baseMapper.selectList(new QueryWrapper<ComMngBuildingDO>().eq("street_id",comMngVillageDO.getStreetId()).eq("act_id",communityId).eq("village_id",comMngVillageDO.getVillageId()).eq("name",vo.getName())); |
| | | if(buildingDOList.size() > 0){ |
| | | sb.append("街路巷:").append(vo.getAlley()).append(",门牌号:").append(vo.getDoorNo()).append(",楼栋号:").append(vo.getName()).append(";"); |
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 com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationCultureVO; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO; |
| | | import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO; |
| | |
| | | + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo(); |
| | | vo.setAddress(address); |
| | | |
| | | //todo 后期优化改为批量 |
| | | //先判断房屋是否存在 |
| | | ComMngPopulationHouseDO populationHouseDO = comMngPopulationHouseDAO.selectOne(new QueryWrapper<ComMngPopulationHouseDO>().lambda() |
| | | .eq(ComMngPopulationHouseDO::getCommunityId, communityId).eq(ComMngPopulationHouseDO::getVillageId, comMngVillageDO.getVillageId()) |
| | |
| | | if (populationHouseDO == null) { |
| | | //房屋信息不存在建立房屋信息 |
| | | populationHouseDO = savePopulationHouse(vo, comMngVillageDO, communityId, address, areaPath, comActDO.getName()); |
| | | vo.setHouseId(populationHouseDO.getId()); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | |
| | | } else { |
| | | //如果存在人口信息,且是自用房,则更新人口默认的房屋信息 |
| | | if (vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) { |
| | | populationDO = updatePopulationHouseUse(vo, populationDO); |
| | | populationDO = updatePopulationDO(vo, populationDO); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private ComMngPopulationDO updatePopulationHouseUse(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO) throws Exception { |
| | | private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO) throws Exception { |
| | | populationDO.setRoad(vo.getRoad()); |
| | | populationDO.setDoorNo(vo.getDoorNo()); |
| | | populationDO.setFloor(vo.getFloor()); |
| | |
| | | populationDO.setHouseNo(vo.getHouseNo()); |
| | | populationDO.setCardNo(vo.getCardNo()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | if(vo.getIsResidence().intValue() == 1){ |
| | | populationDO.setHouseId(vo.getHouseId()); |
| | | } |
| | | if (StringUtils.isNotEmpty(populationDO.getPhone())) { |
| | | // populationDO.setPhone(AESUtil.encrypt128(populationDO.getPhone(), aesKey)); |
| | | populationDO.setPhone(populationDO.getPhone()); |
| | | } |
| | | this.baseMapper.updateById(populationDO); |
| | |
| | | populationDO.setCardNo(vo.getCardNo()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | | if(vo.getIsResidence().intValue() == 1){ |
| | | populationDO.setHouseId(vo.getHouseId()); |
| | | } |
| | | this.baseMapper.insert(populationDO); |
| | | return populationDO; |
| | | } |
| | |
| | | |
| | | //查询统计人口数据 |
| | | ComMngPopulationTotalVO populationTotalVO = populationDAO.getPopulationTotalByAdmin(communityId); |
| | | if(communityId.equals(2L)){ |
| | | populationTotalVO.setSpecialTotal(36); |
| | | } |
| | | statisticsVO.setPopulationTotalVO(populationTotalVO); |
| | | |
| | | return R.ok(statisticsVO); |
| | |
| | | setAgeGroup(comActPopulationScreenVO, communityId); |
| | | //统计学历 |
| | | setCultureGroup(comActPopulationScreenVO, communityId); |
| | | |
| | | //查询网格数据 |
| | | List<EventGridStatisticsVO> gridStatisticsList = this.baseMapper.getEventScreenGridData(communityId); |
| | | comActPopulationScreenVO.setGridStatisticsList(gridStatisticsList); |
| | | |
| | | //查询小区列表 |
| | | List<CivilVillageStatisticsVO> villageStatisticsList = this.baseMapper.getCivilScreenVillageList(communityId); |
| | | comActPopulationScreenVO.setVillageStatisticsList(villageStatisticsList); |
| | | |
| | | return R.ok(comActPopulationScreenVO); |
| | | } |
| | |
| | | List<ComMngPopulationDO> populationDOList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>()); |
| | | if(!populationDOList.isEmpty()){ |
| | | populationDOList.forEach(population -> { |
| | | try { |
| | | population.setCardNo(AESUtil.encrypt128(population.getCardNoStr(),aesKey)); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | this.baseMapper.updateById(population); |
| | | }); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridPopulationAdminList(ComMngPopulationListDTO populationListDTO){ |
| | | IPage<ComMngPopulationListVO> populationListIPage = this.baseMapper.getGridPopulationAdminList(new Page(populationListDTO.getPageNum(),populationListDTO.getPageSize()),populationListDTO); |
| | | if(!populationListIPage.getRecords().isEmpty()){ |
| | | populationListIPage.getRecords().forEach(population -> { |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(population.getCardNo()); |
| | | population.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("当前人口身份证获取年龄失败,实有人口id:" + population.getId()); |
| | | } |
| | | //查询此用户在当前房屋是否是户主 |
| | | Integer relation = this.baseMapper.getPopulationRelationByHouseId(population.getHouseId(),population.getId()); |
| | | if(relation == null || relation != 1){ |
| | | population.setIsRelation(2); |
| | | }else{ |
| | | population.setIsRelation(1); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(populationListIPage); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | // if(m == 0){ |
| | | // m = 12; |
| | | // } |
| | | // m--; |
| | | m++; |
| | | if(m == 12){ |
| | | m = 0; |
| | | } |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day/2; |
| | | String month = DateUtil.format(date,moth_format_str); |
| | |
| | | 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> |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.LcEventVisitingTasksListDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventVisitingTasksDTO; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksDetailsVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksVO; |
| | | import com.panzhihua.service_grid.service.EventVisitingTasksService; |
| | |
| | | } |
| | | /** |
| | | * 删除走访任务 |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/delete") |
| | | R delete(@RequestParam("ids") String ids, @RequestParam("communityId") Long communityId){ |
| | | return eventVisitingTasksService.delete(ids,communityId); |
| | | R delete(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId){ |
| | | return eventVisitingTasksService.delete(idDTO,communityId); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 新增走访任务 |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | R add(@RequestParam("ids") String ids,@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId){ |
| | | return eventVisitingTasksService.add(ids,communityId,userId); |
| | | R add(@RequestBody IdDTO idDTO, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) throws Exception { |
| | | return eventVisitingTasksService.add(idDTO,communityId,userId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/taskList") |
| | | R taskList(@RequestBody EventTasksQuery query){ |
| | | R taskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | |
| | | return eventVisitingTasksService.taskList(query); |
| | | } |
| | | |
| | | /** |
| | | * app走访任务列表 |
| | | * @param query |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @PostMapping("/appTaskList") |
| | | R appTaskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | |
| | | return eventVisitingTasksService.appTaskList(query); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/exportTaskList") |
| | | List<EventVisitingTasksVO> exportTaskList(@RequestBody EventTasksQuery query){ |
| | | List<EventVisitingTasksVO> exportTaskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | return eventVisitingTasksService.exportTaskList(query); |
| | | } |
| | | |
| | |
| | | R complete(@RequestBody EventVisitCompleteDTO taskCompleteDTO){ |
| | | return eventVisitingTasksService.complete(taskCompleteDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * description 获取所有未上传到浪潮平台的走访事件列表 |
| | | * |
| | | * @return String 事件列表 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @GetMapping("/getUnUploadVisitingTask") |
| | | List<LcEventVisitingTasksListDTO> getUnUploadVisitingTask() { |
| | | return eventVisitingTasksService.getUnUploadVisitingTask(); |
| | | } |
| | | |
| | | /** |
| | | * description 更新走访任务上传是否成功标识 |
| | | * |
| | | * @param id 事件主键ID |
| | | * @return Boolean 上传是否成功 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @PostMapping("/updateLcUploadFlagVisitingTask") |
| | | Boolean updateLcUploadFlagVisitingTask(@RequestParam("id") Long id) { |
| | | return eventVisitingTasksService.updateLcUploadFlagVisitingTask(id); |
| | | } |
| | | } |
| | |
| | | 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.EventResourceDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventResourceDTO; |
| | | import com.panzhihua.service_grid.model.dos.EventResourceDO; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | |
| | | */ |
| | | IPage<EventResourceVO> findByPage(Page page, @Param("pageEventResourceDTO")PageEventResourceDTO pageEventResourceDTO); |
| | | |
| | | List<String> findListByRefId(@Param("id")Long id,@Param("classification")Integer classification,@Param("type")Integer type); |
| | | List<EventResourceDTO> findListByRefId(@Param("id")Long id, @Param("classification")Integer classification, @Param("type")Integer type); |
| | | } |
| | |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.visit.AppVisitTasksVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitListVO; |
| | | import com.panzhihua.service_grid.model.dos.EventVisitingTasksDO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksVO; |
| | |
| | | * @return |
| | | */ |
| | | IPage<EventVisitingTasksVO> findListByPage(Page page, @Param("query")EventTasksQuery query); |
| | | |
| | | /** |
| | | * appc查看走访任务 |
| | | * @param page |
| | | * @param query |
| | | * @return |
| | | */ |
| | | IPage<EventVisitingTasksVO> appFindListByPage(Page page, @Param("query")EventTasksQuery query); |
| | | |
| | | /** |
| | | * 查询走访记录,任务 |
| | |
| | | |
| | | /** |
| | | * 完成走访 |
| | | * @param taskCompleteDTO |
| | | * @param complete |
| | | * @return |
| | | */ |
| | | Integer complete(EventVisitCompleteDTO taskCompleteDTO); |
| | | Integer complete(EventVisitingTasksDO complete); |
| | | |
| | | Integer start(EventVisitingTasksDO start); |
| | | |
| | |
| | | |
| | | Map<String, Object> findUserById(Long userId); |
| | | |
| | | String getLabel(Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_grid.model.dos; |
| | | |
| | | import java.util.*; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | |
| | | * */ |
| | | @Data |
| | | @TableName("event_visiting_tasks") |
| | | @EncryptDecryptClass |
| | | public class EventVisitingTasksDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | /** |
| | | * 需走访人电话 列: visiter_tele |
| | | */ |
| | | @EncryptDecryptField |
| | | private String visiterTele; |
| | | /** |
| | | * 需走访人居住地址 列: visiter_address |
| | |
| | | */ |
| | | private Integer outOrLocal; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 网格ID |
| | | */ |
| | | private Long gridId; |
| | | /** |
| | | * 是否已经上传浪潮服务器市平台 |
| | | */ |
| | | private Boolean lcUpload; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | 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.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksDetailsVO; |
| | | import com.panzhihua.common.model.vos.visit.EventVisitingTasksVO; |
| | | import com.panzhihua.service_grid.model.dos.EventVisitingTasksDO; |
| | | |
| | | import javax.crypto.BadPaddingException; |
| | | import javax.crypto.IllegalBlockSizeException; |
| | | import javax.crypto.NoSuchPaddingException; |
| | | import java.security.InvalidKeyException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | * @since 1.0 |
| | | */ |
| | | public interface EventVisitingTasksService extends IService<EventVisitingTasksDO> { |
| | | |
| | | /** |
| | | * 新增重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找重点人群走访记录 |
| | | * |
| | | * @param pageEventVisitingTasksDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除重点人群走访记录 |
| | | * |
| | | * @param EventVisitingTasksDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询重点人群走访记录详细信息 |
| | | * |
| | | * @param id 重点人群走访记录 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 后台统计走访任务 |
| | | * |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R count(Long communityId); |
| | | |
| | | /** |
| | | * 走访任务列表 |
| | | * app走访任务 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | R taskList(EventTasksQuery query); |
| | | R appTaskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 走访任务列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | R taskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 删除走访任务 |
| | | * @param ids |
| | | * |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R delete(String ids, Long communityId); |
| | | R delete(IdDTO idDTO, Long communityId); |
| | | |
| | | /** |
| | | * 需走访人员列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * app查询走访记录 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * app 走访详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param ids |
| | | * |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R add(String ids, Long communityId, Long userId); |
| | | R add(IdDTO idDTO, Long communityId, Long userId) throws Exception; |
| | | |
| | | List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query); |
| | | List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 撤销 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 恢复 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 开始 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R start(Long id,Long userId); |
| | | R start(Long id, Long userId); |
| | | |
| | | /** |
| | | * 完成 |
| | | * |
| | | * @param taskCompleteDTO |
| | | * @return |
| | | */ |
| | | R complete(EventVisitCompleteDTO taskCompleteDTO); |
| | | |
| | | /** |
| | | * description 获取所有未上传到浪潮平台的事件列表 |
| | | * |
| | | * @return String 事件列表 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | List<LcEventVisitingTasksListDTO> getUnUploadVisitingTask(); |
| | | |
| | | /** |
| | | * description 更新上传是否成功标识 |
| | | * |
| | | * @param id 事件主键ID |
| | | * @return Boolean 上传是否成功 |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | Boolean updateLcUploadFlagVisitingTask(Long id); |
| | | } |
| | |
| | | * @param eventResourceAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R add(EventResourceAddDTO eventResourceAddDTO){ |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | BeanUtils.copyProperties(eventResourceAddDTO, eventResourceDO); |
| | |
| | | * @param eventResourceEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R edit(EventResourceEditDTO eventResourceEditDTO){ |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | BeanUtils.copyProperties(eventResourceEditDTO, eventResourceDO); |
| | |
| | | * @param pageEventResourceDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R<IPage<EventResourceVO>> query(PageEventResourceDTO pageEventResourceDTO){ |
| | | Page page = new Page(1,10); |
| | | if(pageEventResourceDTO.getPageNum()!=null) { |
| | |
| | | * @param EventResourceDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @Override |
| | | public R delete(EventResourceDeleteDTO EventResourceDeleteDTO){ |
| | | return R.fail(); |
| | | } |
| | |
| | | * @param id 事件或者走访中关联的图片音频和视频文件 id |
| | | * @return 查找结果 |
| | | */ |
| | | @Override |
| | | public R<EventResourceDetailsVO> eventResourceDetails(Long id){ |
| | | EventResourceDO eventResourceDO = eventResourceMapper.selectById(id); |
| | | if(eventResourceDO!=null) { |
| | |
| | | List<EventDO> unEventList = baseMapper.selectList( |
| | | new QueryWrapper<EventDO>() |
| | | .eq("upload", false) |
| | | .eq("event_process_status", 2) |
| | | ); |
| | | unEventList.forEach(eventDO -> { |
| | | eventDetailsVOList.add(eventDetails(eventDO.getId()).getData()); |
| | |
| | | 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.setPropagandaNum(countMap.get("propagandaNum")== null ? 13L : 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; |
| | | int second = (int) (countAvg.getEndTime().getTime() - countAvg.getStartTime().getTime())/1000; |
| | | if(second > 0){ |
| | | second = second/workScreenVO.getResolvedNum().intValue(); |
| | | workScreenVO.setAvgCost(second); |
| | |
| | | DateTime endDay = DateUtil.endOfMonth(date); |
| | | |
| | | int m = DateUtil.month(endDay); |
| | | // if(m == 0){ |
| | | // m = 11; |
| | | // } |
| | | // m--; |
| | | m++; |
| | | if(m == 12){ |
| | | m = 0; |
| | | } |
| | | int day = DateUtil.dayOfMonth(endDay); |
| | | int half = day/2; |
| | | String month = DateUtil.format(date,moth_format_str); |
| | |
| | | package com.panzhihua.service_grid.service.impl; |
| | | |
| | | import cn.hutool.core.date.DatePattern; |
| | | import cn.hutool.core.date.DateUtil; |
| | | 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.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.enums.PopulPoliticalOutlookEnum; |
| | | import com.panzhihua.common.model.dtos.EventResourceDTO; |
| | | import com.panzhihua.common.model.dtos.IdDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.visit.EventVisitCompleteDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.query.visit.EventTasksQuery; |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import com.panzhihua.common.model.vos.visit.*; |
| | | import com.panzhihua.common.utlis.CopyUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_grid.dao.*; |
| | | import com.panzhihua.service_grid.model.dos.*; |
| | | import com.panzhihua.service_grid.dao.EventResourceMapper; |
| | | import com.panzhihua.service_grid.dao.EventVisitingTasksMapper; |
| | | import com.panzhihua.service_grid.model.dos.EventResourceDO; |
| | | import com.panzhihua.service_grid.model.dos.EventVisitingTasksDO; |
| | | import com.panzhihua.service_grid.service.EventResourceService; |
| | | import com.panzhihua.service_grid.service.EventVisitingTasksService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Resource |
| | | private EventResourceMapper eventResourceMapper; |
| | | |
| | | @Resource |
| | | private EventResourceService eventResourceService; |
| | | |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | | /** |
| | | * 新增重点人群走访记录 |
| | | * |
| | | * @param eventVisitingTasksAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除重点人群走访记录 |
| | | * |
| | | * @param EventVisitingTasksDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询重点人群走访记录详细信息 |
| | | * |
| | | * @param id 重点人群走访记录 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | } |
| | | |
| | | @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); |
| | | for(EventVisitingTasksVO eventVisitingTasksVO:page.getRecords()){ |
| | | if(eventVisitingTasksVO.getNationCode() != null){ |
| | | eventVisitingTasksVO.setNation(PopulPoliticalOutlookEnum.getCnDescByName(eventVisitingTasksVO.getNationCode())); |
| | | } |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @Override |
| | | public R appTaskList(EventTasksQuery query) throws Exception{ |
| | | |
| | | IPage<EventVisitingTasksVO> page = eventVisitingTasksMapper.appFindListByPage(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | for(EventVisitingTasksVO eventVisitingTasksVO:page.getRecords()){ |
| | | if(eventVisitingTasksVO.getNationCode() != null){ |
| | | eventVisitingTasksVO.setNation(PopulPoliticalOutlookEnum.getCnDescByName(eventVisitingTasksVO.getNationCode())); |
| | | } |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public R delete(String ids, Long communityId) { |
| | | String[] idarr = ids.split(","); |
| | | public R delete(IdDTO idDTO, Long communityId) { |
| | | StringBuilder rt = new StringBuilder(); |
| | | String[] idarr = idDTO.getId().split(","); |
| | | 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){ |
| | | throw new RuntimeException("无权限"); |
| | | String error = toDelete(Long.valueOf(id)); |
| | | if(!StringUtils.isEmpty(error)){ |
| | | rt.append(rt); |
| | | } |
| | | eventVisitingTasksMapper.deleteById(Long.valueOf(id)); |
| | | } |
| | | if(!StringUtils.isEmpty(rt)){ |
| | | return R.fail("部分删除失败:"+rt.toString()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private String toDelete(Long id) { |
| | | EventVisitingTasksDO eventVisitingTasksDO = eventVisitingTasksMapper.selectById(id); |
| | | if(eventVisitingTasksDO == null){ |
| | | return "["+id+"]数据不存在;"; |
| | | } |
| | | if(!Objects.equals(eventVisitingTasksDO.getEventStatus(),EventTasksStatusEnum.DZF.getCode())){ |
| | | return "["+eventVisitingTasksDO.getVisiterName()+"]状态不可删除;"; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R visitorList(EventVisitListQuery query) { |
| | | IPage<EventVisitListVO> page = eventVisitingTasksMapper.visitorList(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | page.getRecords().stream().forEach(e->{ |
| | | List<EventVisitingTasksDO> list = eventVisitingTasksMapper.selectList(new QueryWrapper<EventVisitingTasksDO>().eq("visiter_id",e.getId()).orderByDesc("id")); |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | e.setCreateAt(list.get(0).getCreateAt()); |
| | | e.setEventStatus(list.get(0).getEventStatus()); |
| | | } |
| | | }); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | if(eventVisitingTasksDO!=null) { |
| | | EventVisitingTasksDetailsVO eventVisitingTasksDetailsVO = new EventVisitingTasksDetailsVO(); |
| | | BeanUtils.copyProperties(eventVisitingTasksDO, eventVisitingTasksDetailsVO); |
| | | eventVisitingTasksDetailsVO.setVisiterTele(AESUtil.decrypt128(eventVisitingTasksDO.getVisiterTele(), aesKey)); |
| | | JSONObject jsonObject = JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson()); |
| | | eventVisitingTasksDetailsVO.setTableContentJson(JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson())); |
| | | if(jsonObject != null && jsonObject.get("check") != null){ |
| | | eventVisitingTasksDetailsVO.setOption(jsonObject.get("check").toString()); |
| | | } |
| | | 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)){ |
| | | return R.fail("网格员不存在"); |
| | | } |
| | | String[] id = ids.split(","); |
| | | public R add(IdDTO idDTO, Long communityId, Long userId) throws Exception { |
| | | |
| | | // Map<String,Object> map = eventVisitingTasksMapper.findUserByCommunityId(communityId,6); |
| | | // if(CollectionUtils.isEmpty(map)){ |
| | | // return R.fail("网格员不存在"); |
| | | // } |
| | | |
| | | StringBuilder rt = new StringBuilder(); |
| | | String[] id = idDTO.getId().split(","); |
| | | for(String idstr:id){ |
| | | if(StringUtils.isEmpty(idstr)){ |
| | | continue; |
| | | } |
| | | addVisitingTask(Long.valueOf(idstr),map,communityId,userId); |
| | | String error = addVisitingTask(Long.valueOf(idstr),communityId,userId); |
| | | if(!StringUtils.isEmpty(error)){ |
| | | rt.append(error); |
| | | } |
| | | } |
| | | |
| | | if(!StringUtils.isEmpty(rt)){ |
| | | return R.fail("部分新增失败"+rt.toString()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public List<EventVisitingTasksVO> exportTaskList(EventTasksQuery 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 String addVisitingTask(Long id, Long communityId,Long userId) throws Exception{ |
| | | |
| | | |
| | | private void addVisitingTask(Long id, Map<String, Object> gridMap,Long communityId,Long userId) { |
| | | Map<String,Object> map = eventVisitingTasksMapper.findPopulationById(id); |
| | | if(CollectionUtils.isEmpty(map)){ |
| | | return "被访问人ID["+id+"]不存在;"; |
| | | } |
| | | |
| | | Integer count = eventVisitingTasksMapper.countNoneComplete(id); |
| | | if(count > 0){ |
| | | return; |
| | | } |
| | | Map<String,Object> map = eventVisitingTasksMapper.findPopulationById(id); |
| | | if(CollectionUtils.isEmpty(map)){ |
| | | return ; |
| | | return "被访问人["+map.get("name")+"]只能同时存在一条待走访任务;"; |
| | | } |
| | | 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()); |
| | | visitingTasksDO.setVisiterTele(map.get("phone") == null ?null:map.get("phone").toString()); |
| | | 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")); |
| | | visitingTasksDO.setHappentLatLng(map.get("lat")+","+map.get("lng")); |
| | | } |
| | | visitingTasksDO.setEventStatus(EventTasksStatusEnum.DZF.getCode()); |
| | | visitingTasksDO.setReporting(0); |
| | |
| | | } |
| | | |
| | | eventVisitingTasksMapper.insert(visitingTasksDO); |
| | | return null; |
| | | } |
| | | |
| | | private List<String> getOption(String label) { |
| | |
| | | @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.DZF.getCode()){ |
| | | return R.fail("当前状态不可完成走访"); |
| | | } |
| | | EventVisitingTasksDO complete = new EventVisitingTasksDO(); |
| | | BeanUtils.copyProperties(taskCompleteDTO,complete); |
| | | if(taskCompleteDTO.getException().intValue() == 0){ |
| | | taskCompleteDTO.setEventStatus(EventTasksStatusEnum.ZJJJ.getCode()); |
| | | complete.setEventStatus(EventTasksStatusEnum.ZJJJ.getCode()); |
| | | }else{ |
| | | taskCompleteDTO.setEventStatus(EventTasksStatusEnum.YC.getCode()); |
| | | complete.setEventStatus(EventTasksStatusEnum.YC.getCode()); |
| | | } |
| | | |
| | | complete.setSubmitDate(DateUtil.parse(taskCompleteDTO.getSubmitDate(), DatePattern.NORM_DATETIME_FORMAT)); |
| | | JSONObject json = JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson()); |
| | | json.put("check",taskCompleteDTO.getOption()); |
| | | taskCompleteDTO.setOption(json.toJSONString()); |
| | | complete.setTableContentJson(json.toJSONString()); |
| | | |
| | | if(!CollectionUtils.isEmpty(taskCompleteDTO.getImgList())){ |
| | | if(!StringUtils.isEmpty(taskCompleteDTO.getImgList())){ |
| | | taskCompleteDTO.getImgList().forEach(e->{ |
| | | createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,1,e); |
| | | createResource(eventVisitingTasksDO.getId(),taskCompleteDTO.getUserId(),2,1,e); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(taskCompleteDTO.getVosList())){ |
| | | taskCompleteDTO.getVosList().forEach(e->{ |
| | | createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,2,e); |
| | | createResource(eventVisitingTasksDO.getId(),taskCompleteDTO.getUserId(),2,2,e); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(taskCompleteDTO.getVideoList())){ |
| | | taskCompleteDTO.getVosList().forEach(e->{ |
| | | createResource(eventVisitingTasksDO.getId(),eventVisitingTasksDO.getDellUserId(),2,3,e); |
| | | createResource(eventVisitingTasksDO.getId(),taskCompleteDTO.getUserId(),2,3,e); |
| | | }); |
| | | } |
| | | |
| | | int rt = eventVisitingTasksMapper.complete(taskCompleteDTO); |
| | | Map<String,Object> map = eventVisitingTasksMapper.findUserById(taskCompleteDTO.getUserId()); |
| | | complete.setGridMemberStreet(Long.valueOf(map.get("street_id").toString())); |
| | | complete.setGridMemberCommunity(Long.valueOf(map.get("community_id").toString())); |
| | | complete.setGridMember(Long.valueOf(map.get("user_id").toString())); |
| | | complete.setGridMemberName(map.get("name").toString()); |
| | | complete.setGridMenberTele(map.get("phone") ==null?"":map.get("phone").toString()); |
| | | |
| | | int rt = eventVisitingTasksMapper.complete(complete); |
| | | if(rt > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | private void createResource(Long id, Long dellUserId, int classification, int type,String url) { |
| | | |
| | | private void createResource(Long id, Long dellUserId, int classification, int type, EventResourceDTO resourceDTO) { |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | eventResourceDO.setRefId(id); |
| | | eventResourceDO.setClassification(classification); |
| | | eventResourceDO.setType(type); |
| | | eventResourceDO.setCreateBy(dellUserId); |
| | | eventResourceDO.setUrl(url); |
| | | eventResourceDO.setUrl(resourceDTO.getUrl()); |
| | | eventResourceDO.setResourceTime(resourceDTO.getResourceTime()); |
| | | eventResourceMapper.insert(eventResourceDO); |
| | | } |
| | | |
| | | @Override |
| | | public List<LcEventVisitingTasksListDTO> getUnUploadVisitingTask() { |
| | | List<LcEventVisitingTasksListDTO> lcEventVisitingTasksList =new ArrayList<>(); |
| | | List<EventVisitingTasksDO> eventVisitingTasksList = baseMapper.selectList( |
| | | new QueryWrapper<EventVisitingTasksDO>() |
| | | .eq("lc_upload", false) |
| | | .eq("event_status",2) |
| | | ); |
| | | lcEventVisitingTasksList= CopyUtil.beanCopyList(eventVisitingTasksList,LcEventVisitingTasksListDTO.class); |
| | | lcEventVisitingTasksList.forEach(visitingTasks -> { |
| | | addVisitingTasksFile(visitingTasks); |
| | | }); |
| | | return lcEventVisitingTasksList; |
| | | } |
| | | |
| | | private LcEventVisitingTasksListDTO addVisitingTasksFile(LcEventVisitingTasksListDTO visitingTasks) { |
| | | //查询事件关联附件 |
| | | List<EventResourceDO> eventResourceDOList = |
| | | eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() |
| | | .eq(EventResourceDO::getClassification, 2) |
| | | .eq(EventResourceDO::getRefId, visitingTasks.getId()) |
| | | ); |
| | | List<EventResourceVO> picList = new ArrayList<>(); |
| | | List<EventResourceVO> audioList = new ArrayList<>(); |
| | | List<EventResourceVO> videoList = new ArrayList<>(); |
| | | eventResourceDOList.forEach(eventResourceDO -> { |
| | | switch (eventResourceDO.getType()) { |
| | | case 1: |
| | | EventResourceVO picEventResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, picEventResourceVO); |
| | | picList.add(picEventResourceVO); |
| | | break; |
| | | case 2: |
| | | EventResourceVO audioResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, audioResourceVO); |
| | | audioList.add(audioResourceVO); |
| | | break; |
| | | case 3: |
| | | EventResourceVO videoResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, videoResourceVO); |
| | | videoList.add(videoResourceVO); |
| | | break; |
| | | } |
| | | }); |
| | | visitingTasks.setAudios(audioList); |
| | | visitingTasks.setPics(picList); |
| | | visitingTasks.setVideos(videoList); |
| | | return visitingTasks; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateLcUploadFlagVisitingTask(Long id) { |
| | | EventVisitingTasksDO eventVisitingTasksDO = baseMapper.selectById(id); |
| | | eventVisitingTasksDO.setLcUpload(true); |
| | | int flag = baseMapper.updateById(eventVisitingTasksDO); |
| | | if (flag > 0) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <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 |
| | |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | AND e.event_deal_status in (1,2,3,4,6) |
| | | ORDER BY |
| | | e.create_at DESC |
| | | LIMIT 10 |
| | |
| | | </select> |
| | | |
| | | <select id="findListByRefId" resultType="com.panzhihua.common.model.vos.grid.EventResourceVO"> |
| | | SELECT url FROM event_resource |
| | | SELECT url,resource_time FROM event_resource |
| | | where ref_id = #{id} and classification = #{classification} and type = #{type} order by id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="count" parameterType="java.lang.Long" resultType="java.util.Map"> |
| | | select count(id) as visit, |
| | | (select count(id) from event_visiting_tasks where grid_member_community = #{communityId} and event_status = 3) as visited, |
| | | (select count(id) from event_visiting_tasks where grid_member_community = #{communityId} and event_status = 6) as canceled |
| | | from event_visiting_tasks WHERE grid_member_community = #{communityId} and event_status = 1 |
| | | (select count(id) from event_visiting_tasks where event_status = 3) as visited, |
| | | (select count(id) from event_visiting_tasks where event_status = 6) as canceled |
| | | from event_visiting_tasks WHERE event_status = 1 |
| | | </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 != ''"> |
| | | where 1=1 |
| | | <if test = "query.communityId != null"> |
| | | and p.act_id = #{query.communityId} |
| | | </if> |
| | | <if test = "query.status != null and query.status != 0"> |
| | | and vt.event_status = #{query.status} |
| | | </if> |
| | | <if test="query.tag != null and query.tag != ''"> |
| | |
| | | order by vt.id desc |
| | | </select> |
| | | |
| | | <select id="list" parameterType="com.panzhihua.common.model.query.visit.EventTasksQuery" resultType="com.panzhihua.common.model.vos.visit.AppVisitTasksVO"> |
| | | SELECT vt.id,vt.visiter_name,vt.grid_member,vt.grid_member_name,vt.visiter_name,vt.visiter_tele,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.event_status,vt.visiter_address,vt.happent_lat_lng, |
| | | p.card_no_str,p.name,REPLACE(p.label,',','#') |
| | | FROM event_visiting_tasks vt LEFT JOIN com_mng_population p ON vt.visiter_id = p.id WHERE 1=1 |
| | | <if test = "query.visiterId !=null"> |
| | | and vt.visiter_id = #{query.visiterId} |
| | | <select id="appFindListByPage" 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.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 p.id = vt.visiter_id |
| | | LEFT JOIN com_mng_building mb ON(p.floor = mb.name AND p.village_id = mb.village_id) |
| | | LEFT JOIN event_grid_building_relation gbr ON mb.id = gbr.build_id |
| | | LEFT JOIN event_grid_data gd ON gd.id = gbr.grid_id |
| | | LEFT JOIN event_grid_member_relation gmr ON gmr.grid_id = gd.id |
| | | LEFT JOIN sys_user u ON u.user_id = gmr.grid_member_id |
| | | where 1=1 |
| | | <if test = "query.userId != null"> |
| | | and u.user_id = #{query.userId} |
| | | </if> |
| | | <if test = "query.communityId !=null"> |
| | | and vt.grid_member_community = #{query.communityId} |
| | | <if test = "query.status == 1"> |
| | | and (vt.event_status = 1 or vt.event_status = 6) |
| | | </if> |
| | | <if test = "query.status != null and query.status == 1"> |
| | | <if test = "query.status == 2"> |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | </if> |
| | | <if test = "query.status != null and query.status == 2"> |
| | | and (vt.event_status = 1 or vt.event_status = 2) |
| | | <if test = "query.status == 0"> |
| | | and (vt.event_status = 1 or vt.event_status = 3 or vt.event_status = 6 or vt.event_status = 6) |
| | | </if> |
| | | order by vt.id desc |
| | | </select> |
| | | |
| | | <select id="list" parameterType="com.panzhihua.common.model.query.visit.EventTasksQuery" resultType="com.panzhihua.common.model.vos.visit.AppVisitTasksVO"> |
| | | SELECT vt.id,vt.visiter_name,vt.grid_member,vt.grid_member_name,vt.visiter_id,vt.visiter_name,vt.visiter_tele,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.create_at,u.name as creator,vt.event_status,vt.visiter_address,vt.happent_lat_lng, |
| | | p.card_no_str,p.name,REPLACE(p.label,',','#') |
| | | 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 1=1 |
| | | <if test = "query.visiterId !=null"> |
| | | and vt.visiter_id = #{query.visiterId} |
| | | </if> |
| | | <if test = "query.eventStatus == 0"> |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | </if> |
| | | <if test = "query.eventStatus == 3 or query.eventStatus == 7"> |
| | | and vt.event_status = #{query.eventStatus} |
| | | </if> |
| | | order by vt.id desc |
| | | </select> |
| | | |
| | | <select id="visitorList" parameterType="com.panzhihua.common.model.query.visit.EventVisitListQuery" resultType="com.panzhihua.common.model.vos.visit.EventVisitListVO"> |
| | | SELECT p.id,p.name,p.card_no_str,p.label, TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.sex,p.political_outlook,p.phone,p.census_register,phu.relation, |
| | | MAX(vt.id),vt.create_at |
| | | SELECT p.id,p.name,p.card_no_str,p.label, TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.sex,p.political_outlook,p.phone,p.census_register,phu.relation |
| | | FROM com_mng_population p LEFT JOIN com_mng_population_house_user phu ON p.id = phu.popul_id |
| | | left join event_visiting_tasks vt ON p.id = vt.visiter_id |
| | | where 1=1 |
| | | <if test="sex != null"> |
| | | <if test="query.sex != null"> |
| | | and p.sex = #{query.sex} |
| | | </if> |
| | | <if test="political != null"> |
| | | <if test="query.political != null"> |
| | | and p.political_outlook = #{query.political} |
| | | </if> |
| | | <if test="houseHolder != null"> |
| | | <if test="query.houseHolder != null"> |
| | | and phu.relation = #{query.houseHolder} |
| | | </if> |
| | | <if test="tag != null"> |
| | | <if test="query.tag != null"> |
| | | and p.label like concat('%',#{query.tag},'%') |
| | | </if> |
| | | <if test="keyWord != null"> |
| | | <if test="query.keyWord != null"> |
| | | and (p.card_no_str like concat(#{query.keyWord},'%') or |
| | | p.name like concat(#{query.keyWord},'%')) |
| | | </if> |
| | |
| | | WHERE u.community_id = #{communityId} and u.type = #{type} limit 1 |
| | | </select> |
| | | |
| | | <select id="findUserByCommunityId" resultType="java.util.Map"> |
| | | SELECT u.user_id,u.name,u.phone,u.community_id,a.street_id, FROM sys_user u |
| | | <select id="findUserById" resultType="java.util.Map"> |
| | | SELECT u.user_id,u.name,u.phone,u.community_id,a.street_id FROM sys_user u |
| | | LEFT JOIN com_act a ON u.community_id = a.community_id |
| | | WHERE u.id = #{id} |
| | | WHERE u.user_id = #{id} |
| | | </select> |
| | | |
| | | <select id="findPopulationById" resultType="java.util.Map"> |
| | |
| | | </update> |
| | | |
| | | |
| | | <update id="complete" parameterType="com.panzhihua.common.model.vos.visit.EventVisitCompleteDTO"> |
| | | <update id="complete" parameterType="com.panzhihua.service_grid.model.dos.EventVisitingTasksDO"> |
| | | update event_visiting_tasks set event_status = #{eventStatus},address = #{address},address_remark=#{addressRemark}, |
| | | family_phone =#{familyPhone},family_source = #{familySource},lat_lng=#{latLng},dell_desc = #{dellDesc},table_content_json = #{option} |
| | | exception = #{exception},submit_date = NOW() |
| | | family_phone =#{familyPhone},family_source = #{familySource},lat_lng=#{latLng},dell_desc = #{dellDesc},table_content_json = #{tableContentJson}, |
| | | exception = #{exception},submit_date = #{submitDate},remark = #{remark}, |
| | | grid_member_street =#{gridMemberStreet},grid_member_community=#{gridMemberCommunity},grid_member=#{gridMember},grid_member_name=#{gridMemberName},grid_menber_tele=#{gridMenberTele} |
| | | 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> |
New file |
| | |
| | | package com.panzhihua.service_grid.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.panzhihua.common.model.dtos.grid.LcEventVisitingTasksListDTO; |
| | | import com.panzhihua.service_grid.ServiceGridApplication; |
| | | import com.panzhihua.service_grid.service.EventVisitingTasksService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.util.List; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.*; |
| | | |
| | | @Slf4j |
| | | @SpringBootTest(classes = ServiceGridApplication.class) |
| | | class EventVisitingTasksServiceImplTest { |
| | | |
| | | @Resource |
| | | private EventVisitingTasksService eventVisitingTasksService; |
| | | |
| | | @Test |
| | | void getUnUploadVisitingTask() { |
| | | List<LcEventVisitingTasksListDTO> data = eventVisitingTasksService.getUnUploadVisitingTask(); |
| | | String pretty = JSONArray.toJSONString(data, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue, |
| | | SerializerFeature.WriteDateUseDateFormat); |
| | | log.info(pretty); |
| | | } |
| | | } |
| | |
| | | * @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(); |
| | | } |
| | |
| | | |
| | | |
| | | @Resource |
| | | private ApiServiceFeign ApiServiceFeign; |
| | | private ApiServiceFeign apiServiceFeign; |
| | | |
| | | /** |
| | | * description 生成或更新redis里面的对接浪潮所需的token信息,token有效期12小时 |
| | |
| | | @XxlJob("langChaoGetToken") |
| | | public ReturnT<String> langChaoGetToken(String param) { |
| | | log.info("定时更新浪潮对接token。token有效期12小时"); |
| | | ApiServiceFeign.getToken("18080799023", "123456"); |
| | | apiServiceFeign.getToken("18080799023", "123456"); |
| | | log.info("定时更新浪潮对接token完成"); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | |
| | | @XxlJob("langChaoAutomationUpload") |
| | | public ReturnT<String> langChaoAutomationUpload(String param) { |
| | | log.info("向浪潮服务器提交网格事件登记开始"); |
| | | ApiServiceFeign.automationUploadEventAndFile(); |
| | | apiServiceFeign.automationUploadEventAndFile(); |
| | | log.info("向浪潮服务器提交网格事件登记完成"); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | /** |
| | | * description 自动上传重点人员和流动人员走访记录 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | @XxlJob("automationUploadVisitRecord") |
| | | public ReturnT<String> automationUploadVisitRecord(String param) { |
| | | log.info("向浪潮服务器自动上传重点人员和流动人员走访记录开始"); |
| | | apiServiceFeign.automationUploadVisitRecord(); |
| | | log.info("向浪潮服务器自动上传重点人员和流动人员走访记录完成"); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | } |