Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test
1 文件已重命名
19个文件已修改
1个文件已添加
| | |
| | | |
| | | DZF(1,"待走访"), |
| | | JXZ(2,"进行中"), |
| | | ZJJJ(3,"自己解决"), |
| | | ZJJJ(3,"正常"), |
| | | DYZ(4,"待验证"), |
| | | CG(5,"草稿"), |
| | | YCX(6,"已撤销"), |
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; |
| | | } |
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; |
| | | } |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("需走访人id") |
| | | private Long visiterId; |
| | | |
| | | @ApiModelProperty("需走访人姓名") |
| | | private String visiterName; |
| | | |
| | | @ApiModelProperty("网格员id") |
| | | private Long gridMember; |
| | |
| | | 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("状态") |
| | |
| | | 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.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") |
| | |
| | | private Integer visiterSex; |
| | | |
| | | @ApiModelProperty(value = "需走访人电话") |
| | | @EncryptDecryptField |
| | | private String visiterTele; |
| | | |
| | | @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; |
| | | |
| | | |
| | | } |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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("重点人群走访记录返回参数") |
| | | @EncryptDecryptClass |
| | | public class EventVisitingTasksVO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | |
| | | private Integer visiterSex; |
| | | |
| | | @ApiModelProperty(value = "需走访人电话") |
| | | @EncryptDecryptField |
| | | private String visiterTele; |
| | | |
| | | |
| | |
| | | import com.panzhihua.common.model.query.visit.EventVisitListQuery; |
| | | 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.*; |
| | |
| | | |
| | | /** |
| | | * 查询事件详细信息 |
| | | * |
| | | * @param id 事件 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增网格和网格员的关联关系 |
| | | * |
| | | * @param eventGridMemberAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改网格和网格员的关联关系 |
| | | * |
| | | * @param eventGridMemberEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找网格和网格员的关联关系 |
| | | * |
| | | * @param pageEventGridMemberRelationDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增网格员定时上报地理预警记录 |
| | | * |
| | | * @param eventGridMemberWarnLogAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除重点人群记录 |
| | | * |
| | | * @param eventMainMemberDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询重点人群记录详细信息 |
| | | * |
| | | * @param id 重点人群记录 id |
| | | * @return 查找结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增事件或者走访中关联的图片音频和视频文件 |
| | | * |
| | | * @param eventResourceAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改事件或者走访中关联的图片音频和视频文件 |
| | | * |
| | | * @param eventResourceEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找事件或者走访中关联的图片音频和视频文件 |
| | | * |
| | | * @param pageEventResourceDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除事件或者走访中关联的图片音频和视频文件 |
| | | * |
| | | * @param eventResourceDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询事件或者走访中关联的图片音频和视频文件详细信息 |
| | | * |
| | | * @param id 事件或者走访中关联的图片音频和视频文件 id |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/eventresource/{id}") |
| | | R<EventResourceDetailsVO> eventResourceDetails(@PathVariable("id") Long id); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增事件处理流转记录 |
| | | * |
| | | * @param eventTransferRecordAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改事件处理流转记录 |
| | | * |
| | | * @param eventTransferRecordEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查找事件处理流转记录 |
| | | * |
| | | * @param pageEventTransferRecordDTO |
| | | * @return 维护结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除事件处理流转记录 |
| | | * |
| | | * @param eventTransferRecordDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | |
| | | /** |
| | | * 走访任务列表 |
| | | * |
| | | * app走访任务列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/appTaskList") |
| | | R appTaskList(@RequestBody EventTasksQuery query); |
| | | /** |
| | | * 后台走访任务列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | @GetMapping("/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; |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | 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(";"); |
| | |
| | | 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); |
| | | }); |
| | | } |
| | |
| | | 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.grid.EventDetailsVO; |
| | | 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.model.dos.EventVisitingTasksDO; |
| | | import com.panzhihua.service_grid.service.EventVisitingTasksService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | } |
| | | |
| | | /** |
| | | * app走访任务列表 |
| | | * @param query |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @PostMapping("/appTaskList") |
| | | R appTaskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | |
| | | return eventVisitingTasksService.appTaskList(query); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param query |
| | | * @return |
| | |
| | | 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 |
| | |
| | | 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.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; |
| | |
| | | R count(Long communityId); |
| | | |
| | | /** |
| | | * app走访任务 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | R appTaskList(EventTasksQuery query) throws Exception; |
| | | |
| | | /** |
| | | * 走访任务列表 |
| | | * |
| | | * @param query |
| | |
| | | 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.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | | import com.panzhihua.common.enums.PopulPoliticalOutlookEnum; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventVisitingTasksEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventVisitingTasksDTO; |
| | | import com.panzhihua.common.model.dtos.EventResourceDTO; |
| | | 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.EventDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventResourceVO; |
| | | import com.panzhihua.common.model.vos.visit.*; |
| | | import com.panzhihua.common.utlis.CopyUtil; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.crypto.BadPaddingException; |
| | | import javax.crypto.IllegalBlockSizeException; |
| | | import javax.crypto.NoSuchPaddingException; |
| | | import java.security.InvalidKeyException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | if(eventVisitingTasksVO.getNationCode() != null){ |
| | | eventVisitingTasksVO.setNation(PopulPoliticalOutlookEnum.getCnDescByName(eventVisitingTasksVO.getNationCode())); |
| | | } |
| | | if(eventVisitingTasksVO.getVisiterTele() != null){ |
| | | |
| | | } |
| | | eventVisitingTasksVO.setVisiterTele(AESUtil.decrypt128(eventVisitingTasksVO.getVisiterTele(), aesKey)); |
| | | } |
| | | page.getRecords().forEach(e->{ |
| | | return R.ok(page); |
| | | } |
| | | |
| | | }); |
| | | @Override |
| | | public R 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); |
| | | } |
| | | |
| | |
| | | @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)); |
| | | eventVisitingTasksDetailsVO.setTableContentJson(JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson())); |
| | | return R.ok(eventVisitingTasksDetailsVO); |
| | | } |
| | |
| | | visitingTasksDO.setVisiterId(Long.valueOf(map.get("id").toString())); |
| | | visitingTasksDO.setVisiterName(map.get("name").toString()); |
| | | visitingTasksDO.setVisiterSex(Integer.valueOf(map.get("sex").toString())); |
| | | if(map.get("phone") != null){ |
| | | visitingTasksDO.setVisiterTele(AESUtil.decrypt128(map.get("phone").toString(),aesKey)); |
| | | } |
| | | 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); |
| | |
| | | @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, EventResourceDTO resourceDTO) { |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | eventResourceDO.setRefId(id); |
| | | eventResourceDO.setClassification(classification); |
| | | eventResourceDO.setType(type); |
| | | eventResourceDO.setCreateBy(dellUserId); |
| | | eventResourceDO.setUrl(resourceDTO.getUrl()); |
| | | eventResourceDO.setResourceTime(resourceDTO.getResourceTime()); |
| | | eventResourceMapper.insert(eventResourceDO); |
| | | } |
| | | |
| | | @Override |
| | |
| | | return false; |
| | | } |
| | | |
| | | private void createResource(Long id, Long dellUserId, int classification, int type, String url) { |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | eventResourceDO.setRefId(id); |
| | | eventResourceDO.setClassification(classification); |
| | | eventResourceDO.setType(type); |
| | | eventResourceDO.setCreateBy(dellUserId); |
| | | eventResourceDO.setUrl(url); |
| | | eventResourceMapper.insert(eventResourceDO); |
| | | } |
| | | |
| | | } |
| | |
| | | </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"> |
| | |
| | | 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 p.act_id = #{query.communityId} |
| | | <if test = "query.status == 1"> |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | where 1=1 |
| | | <if test = "query.communityId != null"> |
| | | and p.act_id = #{query.communityId} |
| | | </if> |
| | | <if test = "query.status == 2"> |
| | | and (vt.event_status = 1 or vt.event_status = 2) |
| | | <if test = "query.status != null and query.status != 0"> |
| | | and vt.event_status = #{query.status} |
| | | </if> |
| | | <if test="query.tag != null and query.tag != ''"> |
| | | p.label like concat('%',#{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} |
| | | </if> |
| | | <if test = "query.communityId !=null"> |
| | | and vt.grid_member_community = #{query.communityId} |
| | | <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.status == 1"> |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | and (vt.event_status = 1 or vt.event_status = 6) |
| | | </if> |
| | | <if test = "query.status == 2"> |
| | | and (vt.event_status = 1 or vt.event_status = 2) |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | </if> |
| | | <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> |