Merge remote-tracking branch 'origin/test' into test
| | |
| | | */ |
| | | @Getter |
| | | public enum LcRequestEnum { |
| | | /** |
| | | * 浪潮接口请求返回失败枚举 |
| | | */ |
| | | FALSE("0", "失败"), |
| | | /** |
| | | *浪潮接口请求返回成功枚举 |
| | | */ |
| | | SUCCESS("200", "成功"); |
| | | |
| | | private final String code; |
| | |
| | | */ |
| | | @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; |
| | |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * @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; |
| | | } |
| | | } |
| | |
| | | * @author xyh |
| | | * @date 2021/6/21 15:44 |
| | | */ |
| | | @ApiModel("走访任务查询") |
| | | @ApiModel("走访查询") |
| | | @Data |
| | | public class EventTasksQuery extends PageDTO implements Serializable { |
| | | |
| | | @ApiModelProperty("app状态:0全部,1已完成,2未完成,3正常,7异常| 后台任务状态:0全部,1待走访 2正常,5已撤销,6异常") |
| | | @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; |
| | | |
| | |
| | | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | |
| | | @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 = "走访内容根据重点人员类型输入项不同,录入全部的表单内容数据") |
| | |
| | | @ApiModelProperty(value = "视频列表") |
| | | 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.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | |
| | | |
| | | |
| | | |
| | | @ExcelIgnore |
| | | @ApiModelProperty(value = "需走访人ID") |
| | | private Long visiterId; |
| | | |
| | |
| | | private String visiterTele; |
| | | |
| | | |
| | | @ExcelIgnore |
| | | private Integer visiterType; |
| | | |
| | | @ApiModelProperty(value = "事件标题") |
| | |
| | | |
| | | @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)") |
| | | private String happentLatLng; |
| | | // |
| | | @ExcelIgnore |
| | | private Integer eventStatus; |
| | | |
| | | public String getEventStatusName() { |
| | |
| | | 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; |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * 开始走访 |
| | |
| | | @PostMapping("/taskList") |
| | | public R taskList(@RequestBody EventTasksQuery query){ |
| | | // query.setCommunityId(this.getCommunityId()); |
| | | query.setUserId(this.getUserId()); |
| | | return gridService.taskList(query); |
| | | // query.setUserId(this.getUserId()); |
| | | return gridService.appTaskList(query); |
| | | } |
| | | |
| | | @ApiOperation(value = "走访详情-xyh", response = EventVisitingTasksDetailsVO.class) |
| | |
| | | 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; |
| | |
| | | @GetMapping("/count") |
| | | @ApiOperation(value = "走访任务统计", response= EventVisitCountVO.class) |
| | | public R count(){ |
| | | return gridService.countVisit(null); |
| | | return gridService.countVisit(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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 { |
| | | } |
| | |
| | | package com.panzhihua.serviceapi.model.dto; |
| | | |
| | | 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.util.Date; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 |
| | | * description 实有人口信息 |
| | | * |
| | | * @author manailin |
| | | * Date 2021-06-22 15:30 |
| | | **/ |
| | | @Data |
| | | public class ComMngPopulationDTO implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | * 性别(1.男 2.女 3.未知) |
| | | */ |
| | | private Integer sex; |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | // private Integer age; |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | |
| | | */ |
| | | private String villageName; |
| | | |
| | | /** |
| | | * 与户主关系(1.户主 2.配偶 3.子女 4.孙女 5.父母 6.其他) |
| | | */ |
| | | // private Integer relation; |
| | | // |
| | | // private String relationStr; |
| | | |
| | | /** |
| | | * 文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他) |
| | |
| | | * 出生年月日 |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 居住地房屋id |
| | | */ |
| | | // private Long houseId; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.未知) |
| | | */ |
| | | public interface sex{ |
| | | int nan = 1; |
| | | int nv = 2; |
| | | int no = 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否租住 |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | |
| | | /** |
| | | * 政治面貌 |
| | | */ |
| | | public interface politicalOutlook{ |
| | | int dang = 1; |
| | | int tuan = 3; |
| | | int wu = 12; |
| | | int qun = 13; |
| | | int no = 13; |
| | | } |
| | | |
| | | /** |
| | | * 外地or本地(1.本地 2.外地) |
| | | */ |
| | | public interface outOrLocal{ |
| | | int bd = 1; |
| | | int wd = 2; |
| | | } |
| | | |
| | | } |
| | |
| | | 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"); |
| | |
| | | |
| | | |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * 新增走访任务 |
| | | * @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) throws Exception { |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * app走访任务列表 |
| | | * @param query |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @PostMapping("/appTaskList") |
| | | R appTaskList(@RequestBody EventTasksQuery query) throws Exception { |
| | | |
| | | return eventVisitingTasksService.appTaskList(query); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param query |
| | | * @return |
| | |
| | | package com.panzhihua.service_grid.model.dos; |
| | | |
| | | 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; |
| | |
| | | * */ |
| | | @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 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | 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; |
| | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param ids |
| | | * @param idDTO |
| | | * @param communityId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R add(String ids, Long communityId, Long userId) throws Exception; |
| | | R add(IdDTO idDTO, Long communityId, Long userId) throws Exception; |
| | | |
| | | List<EventVisitingTasksVO> exportTaskList(EventTasksQuery query) throws Exception; |
| | | |
| | |
| | | import com.panzhihua.common.enums.EventTasksStatusEnum; |
| | | 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; |
| | |
| | | @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); |
| | | 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) throws Exception { |
| | | 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("网格员不存在"); |
| | | } |
| | | String[] id = ids.split(","); |
| | | String[] id = idDTO.getId().split(","); |
| | | for(String idstr:id){ |
| | | if(StringUtils.isEmpty(idstr)){ |
| | | continue; |
| | |
| | | IPage<EventVisitingTasksVO> page = eventVisitingTasksMapper.findListByPage(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | return page.getRecords(); |
| | | } |
| | | |
| | | |
| | | |
| | | private void addVisitingTask(Long id, Map<String, Object> gridMap,Long communityId,Long userId) throws Exception{ |
| | | |
| | |
| | | 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()); |
| | |
| | | LEFT JOIN sys_user u ON u.user_id = gmr.grid_member_id |
| | | where 1=1 |
| | | <if test = "query.userId != null"> |
| | | u.use_id = #{query.userId} |
| | | 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 or vt.event_status = 4) |
| | | and (vt.event_status = 3 or vt.event_status = 7) |
| | | </if> |
| | | <if test = "query.status == 3"> |
| | | and vt.event_status = 6 |
| | | </if> |
| | | <if test = "query.status == 4"> |
| | | and vt.event_status = 7 |
| | | <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_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, |
| | | 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 WHERE 1=1 |
| | | 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} |
| | | 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> |
| | | <if test = "query.status != null"> |
| | | and vt.event_status = #{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> |
| | |
| | | |
| | | |
| | | @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; |
| | | } |
| | |
| | | @XxlJob("automationUploadVisitRecord") |
| | | public ReturnT<String> automationUploadVisitRecord(String param) { |
| | | log.info("向浪潮服务器自动上传重点人员和流动人员走访记录开始"); |
| | | ApiServiceFeign.automationUploadVisitRecord(); |
| | | apiServiceFeign.automationUploadVisitRecord(); |
| | | log.info("向浪潮服务器自动上传重点人员和流动人员走访记录完成"); |
| | | return ReturnT.SUCCESS; |
| | | } |