Browse Source
# Conflicts: # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.javadev_shibei_match
73 changed files with 2706 additions and 16 deletions
@ -0,0 +1,28 @@ |
|||
package com.epmet.dataaggre.dto.epmetuser.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 人大代表个人中心,是否显示@me |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 15:01 |
|||
*/ |
|||
@Data |
|||
public class UserEventLogoResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 3232361347890014097L; |
|||
/** |
|||
* true:人大代表;false:不是人大代表;此列用来判断是否显示@我 |
|||
*/ |
|||
private Boolean isNpc; |
|||
/** |
|||
* 展示红点:true;隐藏:false |
|||
*/ |
|||
private Boolean redDot; |
|||
public UserEventLogoResultDTO(){ |
|||
this.isNpc=false; |
|||
this.redDot=false; |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.epmet.enums; |
|||
|
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
/** |
|||
* @Description 入职级别枚举 |
|||
* @author wxz |
|||
* @date 2021.08.03 14:29:01 |
|||
*/ |
|||
@Slf4j |
|||
public enum OrgLevelEnums { |
|||
|
|||
GRID("grid", "网格"), |
|||
COMMUNITY("community", "社区"), |
|||
STREET("street", "街道"), |
|||
DISTRICT("district", "区"), |
|||
CITY("city", "市"), |
|||
PROVINCE("province", "省"), |
|||
|
|||
DEPARTMENT("department", "部门"), |
|||
; |
|||
|
|||
private String level; |
|||
private String levelName; |
|||
|
|||
OrgLevelEnums(String level, String levelName) { |
|||
this.level = level; |
|||
this.levelName = levelName; |
|||
} |
|||
|
|||
/** |
|||
* @Description 级别枚举对象 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.08.03 14:46 |
|||
*/ |
|||
public static OrgLevelEnums getLevelObject(String level) { |
|||
for (OrgLevelEnums l :OrgLevelEnums.values()) { |
|||
if (l.getLevel().equals(level)) { |
|||
return l; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* @Description 级别中文名称 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.08.03 14:47 |
|||
*/ |
|||
public static String getLevelName(String level) { |
|||
OrgLevelEnums levelObject = getLevelObject(level); |
|||
return levelObject == null ? null : levelObject.getLevelName(); |
|||
} |
|||
|
|||
public String getLevel() { |
|||
return level; |
|||
} |
|||
|
|||
public String getLevelName() { |
|||
return levelName; |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 1:38 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class EventProjectInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5622220354099001615L; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 操作人【xxx社区-张三】 |
|||
*/ |
|||
private String operationName; |
|||
|
|||
/** |
|||
* 操作时间 |
|||
*/ |
|||
private String operationTime; |
|||
|
|||
/** |
|||
* 报事说明 |
|||
*/ |
|||
private String projectDeclare; |
|||
|
|||
public EventProjectInfoDTO() { |
|||
this.projectId = ""; |
|||
this.operationName = ""; |
|||
this.operationTime = ""; |
|||
this.projectDeclare = ""; |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.result.ResiEventIdDTO; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 选择已解决,未解决?? |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 13:53 |
|||
*/ |
|||
@Data |
|||
public class ChooseResolveFormDTO extends ResiEventIdDTO implements Serializable { |
|||
private static final long serialVersionUID = 7888566055415227282L; |
|||
|
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
/** |
|||
* 是否解决:已解决 resolved,未解决 un_solved |
|||
*/ |
|||
@NotBlank(message = "resolveStatus不能为空",groups = AddUserInternalGroup.class) |
|||
private String resolveStatus; |
|||
|
|||
|
|||
//以下参数从token中获取
|
|||
/** |
|||
* 当前用户id |
|||
*/ |
|||
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) |
|||
private String userId; |
|||
|
|||
/** |
|||
* 当前客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 1:27 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class EventDetailFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -297495947153154171L; |
|||
|
|||
public interface EventDetailForm{} |
|||
|
|||
@NotBlank(message = "报事ID不能为空",groups = EventDetailForm.class) |
|||
private String eventId; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 10:43 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class EventListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5882062169112022561L; |
|||
|
|||
public interface EventListForm{} |
|||
|
|||
/** |
|||
* 报事列表类型【处理中:processed 待处理:undisposed 已办结:transferred】 |
|||
*/ |
|||
@NotBlank(message = "报事列表类型不能为空",groups = EventListForm.class) |
|||
private String eventType; |
|||
|
|||
@NotBlank(message = "",groups = EventListForm.class) |
|||
private String orgId; |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 我的报事列表查询 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 14:07 |
|||
*/ |
|||
@Data |
|||
public class MyReportedFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8426911903236849796L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
/** |
|||
* 未处理:un_read;处理中:processing;已办结:closed_case |
|||
*/ |
|||
@NotBlank(message = "statusCondition不能为空",groups = AddUserInternalGroup.class) |
|||
private String statusCondition; |
|||
|
|||
private Integer pageNo; |
|||
private Integer pageSize; |
|||
|
|||
//以下参数从token中获取
|
|||
/** |
|||
* 当前用户id |
|||
*/ |
|||
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) |
|||
private String userId; |
|||
|
|||
/** |
|||
* 当前客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.result.ResiEventIdDTO; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 撤回事件入参 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 11:28 |
|||
*/ |
|||
@Data |
|||
public class ReCallEventFormDTO extends ResiEventIdDTO implements Serializable { |
|||
private static final long serialVersionUID = 2127663703852717437L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
//以下参数从token中获取
|
|||
/** |
|||
* 当前用户id |
|||
*/ |
|||
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) |
|||
private String userId; |
|||
|
|||
/** |
|||
* 当前客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 11:07 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class ReplyListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3875624725235229558L; |
|||
|
|||
public interface ReplyListForm{} |
|||
|
|||
@NotBlank(message = "报事ID不能为空",groups = ReplyListForm.class) |
|||
private String resiEventId; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 我要报事-提交(尹) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 10:46 |
|||
*/ |
|||
@Data |
|||
public class ResiEventFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -778643059131036832L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
|
|||
//以下参数从token中获取
|
|||
/** |
|||
* 当前用户id |
|||
*/ |
|||
@NotBlank(message = "userId不能为空",groups =AddUserInternalGroup.class) |
|||
private String userId; |
|||
|
|||
/** |
|||
* 当前客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 10:55 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class UpdateViewTimeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 7104400078458366322L; |
|||
|
|||
public interface UpdateViewTimeForm{} |
|||
|
|||
/** |
|||
* 居民端用户:resi_user;工作人员:staff |
|||
*/ |
|||
@NotBlank(message = "viewType不能为空",groups = UpdateViewTimeForm.class) |
|||
private String viewType; |
|||
|
|||
@NotBlank(message = "事件ID不能为空",groups = UpdateViewTimeForm.class) |
|||
private String eventId; |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.dto.EventProjectInfoDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 1:30 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class EventDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3905105043326445613L; |
|||
|
|||
/** |
|||
* 报事时间 |
|||
*/ |
|||
private String eventTime; |
|||
|
|||
/** |
|||
* 报事内容 |
|||
*/ |
|||
private String eventContent; |
|||
|
|||
/** |
|||
* 报事地址 |
|||
*/ |
|||
private String eventAddress; |
|||
|
|||
/** |
|||
* 所属网格【xx社区-xx网格】 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 是否办结【是:true,否:false】 |
|||
*/ |
|||
private Boolean isClosed; |
|||
|
|||
/** |
|||
* 是否解决【是:true,否:false】 |
|||
*/ |
|||
private Boolean isResolve; |
|||
|
|||
/** |
|||
* 是否可以撤回【true:是,false:否】 |
|||
*/ |
|||
private Boolean isRollback; |
|||
|
|||
/** |
|||
* 报事图片 |
|||
*/ |
|||
private List<String> eventImgs; |
|||
|
|||
/** |
|||
* 报事提到的人 |
|||
*/ |
|||
private List<String> eventPerson; |
|||
|
|||
/** |
|||
* 项目信息 |
|||
*/ |
|||
private EventProjectInfoDTO projectInfo; |
|||
|
|||
public EventDetailResultDTO() { |
|||
this.eventTime = ""; |
|||
this.eventContent = ""; |
|||
this.eventAddress = ""; |
|||
this.gridName = ""; |
|||
this.isClosed = false; |
|||
this.isResolve = false; |
|||
this.isRollback = false; |
|||
this.eventImgs = new ArrayList<>(); |
|||
this.eventPerson = new ArrayList<>(); |
|||
this.projectInfo = new EventProjectInfoDTO(); |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 10:41 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class EventListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8550265282744924930L; |
|||
|
|||
/** |
|||
* 报事标题 |
|||
*/ |
|||
private String eventTitle; |
|||
|
|||
/** |
|||
* 报事时间 |
|||
*/ |
|||
private String eventTime; |
|||
|
|||
/** |
|||
* 报事ID |
|||
*/ |
|||
private String eventId; |
|||
|
|||
/** |
|||
* 是否立项【true:是,false:否】 |
|||
*/ |
|||
private Boolean isProject; |
|||
|
|||
/** |
|||
* 红点显示【true:显示,false:不显示】 |
|||
*/ |
|||
private Boolean redDot; |
|||
|
|||
/** |
|||
* 报事图片 |
|||
*/ |
|||
private List<String> eventImgs; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 报事列表 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 14:11 |
|||
*/ |
|||
@Data |
|||
public class MyReportedResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -7372245830000262134L; |
|||
|
|||
/** |
|||
* 事件id |
|||
*/ |
|||
private String resiEventId; |
|||
|
|||
/** |
|||
* 事件内容 |
|||
*/ |
|||
private String eventContent; |
|||
|
|||
/** |
|||
* 图片列表,可为空 |
|||
*/ |
|||
private List<String> imgList; |
|||
|
|||
/** |
|||
* true展示;false不展示 |
|||
*/ |
|||
private Boolean redDot; |
|||
|
|||
/** |
|||
* 处理中:processing;已办结:closed_case |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* true:已转项目;false:未立项 |
|||
*/ |
|||
private Boolean shiftProject; |
|||
|
|||
/** |
|||
* 列表显示时间用此列:yyyy-MM-dd HH:mm:ss;处理中:上报事件时间,处理中:最新一次处理事件;已办结:办结时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
private Date showTime; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 11:07 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class ReplyListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4875335642497226847L; |
|||
|
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 事件id |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/8/3 10:48 |
|||
*/ |
|||
@Data |
|||
public class ResiEventIdDTO implements Serializable { |
|||
private static final long serialVersionUID = 1553798655658549134L; |
|||
public interface ResiEventIdGroup { |
|||
} |
|||
/** |
|||
* 居民端报的事件id |
|||
*/ |
|||
@NotBlank(message = "事件id不能为空",groups = ResiEventIdGroup.class) |
|||
private String resiEventId; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/8/3 2:45 下午 |
|||
* @DESC |
|||
*/ |
|||
public interface EventConstant { |
|||
|
|||
/** |
|||
* 【处理中:processed 待处理:undisposed 已办结:transferred】 |
|||
*/ |
|||
String EVENT_PROCESSED = "processed"; |
|||
String EVENT_UN_DISPOSED = "undisposed"; |
|||
String EVENT_TRANSFERRED = "transferred"; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.EventListFormDTO; |
|||
import com.epmet.dto.form.UpdateViewTimeFormDTO; |
|||
import com.epmet.dto.result.EventListResultDTO; |
|||
import com.epmet.service.ResiEventService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 居民报事表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("event") |
|||
public class EventController { |
|||
|
|||
@Autowired |
|||
private ResiEventService resiEventService; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,158 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.*; |
|||
import com.epmet.dto.result.EventDetailResultDTO; |
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.result.EventListResultDTO; |
|||
import com.epmet.dto.result.MyReportedResultDTO; |
|||
import com.epmet.dto.result.ResiEventIdDTO; |
|||
import com.epmet.service.ResiEventService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
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 java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 居民报事表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("resievent") |
|||
public class ResiEventController { |
|||
|
|||
@Autowired |
|||
private ResiEventService resiEventService; |
|||
|
|||
/** |
|||
* @Description 报事详情-两端通用 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 1:47 下午 |
|||
*/ |
|||
@PostMapping("eventdetail") |
|||
public Result<EventDetailResultDTO> eventDetail(@RequestBody EventDetailFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return new Result<EventDetailResultDTO>().ok(resiEventService.eventDetail(formDTO)); |
|||
} |
|||
/** |
|||
* 我要报事-提交(尹) |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 10:46 |
|||
*/ |
|||
public Result<ResiEventIdDTO> report(@LoginUser TokenDto tokenDto, @RequestBody ResiEventFormDTO formDTO){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
//校验参数
|
|||
//todo
|
|||
return new Result<ResiEventIdDTO>().ok(resiEventService.report(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* 我要报事-撤回(尹) |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 10:54 |
|||
*/ |
|||
@PostMapping("recall") |
|||
public Result recall(@LoginUser TokenDto tokenDto,@RequestBody ReCallEventFormDTO formDTO){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,ResiEventIdDTO.ResiEventIdGroup.class,ReCallEventFormDTO.AddUserInternalGroup.class); |
|||
resiEventService.reCall(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 选择已解决,未解决 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 13:57 |
|||
*/ |
|||
@PostMapping("chooseresolve") |
|||
public Result chooseResolve(@LoginUser TokenDto tokenDto,@RequestBody ChooseResolveFormDTO formDTO){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,ResiEventIdDTO.ResiEventIdGroup.class,ChooseResolveFormDTO.AddUserInternalGroup.class); |
|||
resiEventService.chooseResolve(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 我的报事列表查询 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.MyReportedResultDTO>> |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 14:27 |
|||
*/ |
|||
@PostMapping("myreported") |
|||
public Result<List<MyReportedResultDTO>> queryMyReported(@LoginUser TokenDto tokenDto, @RequestBody MyReportedFormDTO formDTO){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,MyReportedFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<MyReportedResultDTO>>().ok(resiEventService.queryMyReported(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 群众直报(待处理、处理中、已办结)列表 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 10:53 上午 |
|||
*/ |
|||
@PostMapping("eventlist") |
|||
public Result<List<EventListResultDTO>> eventList(@RequestBody EventListFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, EventListFormDTO.EventListForm.class); |
|||
return new Result<List<EventListResultDTO>>().ok(resiEventService.eventList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 查看报事时,更新时间操作 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 11:01 上午 |
|||
*/ |
|||
@PostMapping("updateviewtime") |
|||
public Result updateViewTime(@RequestBody UpdateViewTimeFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, UpdateViewTimeFormDTO.UpdateViewTimeForm.class); |
|||
resiEventService.updateViewTime(formDTO); |
|||
return new Result(); |
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.ReplyListFormDTO; |
|||
import com.epmet.dto.result.ReplyListResultDTO; |
|||
import com.epmet.service.ResiEventReplyService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
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 java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 事件回复表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("resieventreply") |
|||
public class ResiEventReplyController { |
|||
|
|||
@Autowired |
|||
private ResiEventReplyService resiEventReplyService; |
|||
|
|||
/** |
|||
* @Description 报事详情-回复列表-两端通用 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 11:11 上午 |
|||
*/ |
|||
@PostMapping("list") |
|||
public Result<List<ReplyListResultDTO>> replyList(@RequestBody ReplyListFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, ReplyListFormDTO.ReplyListForm.class); |
|||
return new Result<List<ReplyListResultDTO>>().ok(resiEventReplyService.replyList(formDTO)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiEventAttachmentEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 事件附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiEventAttachmentDao extends BaseDao<ResiEventAttachmentEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiEventEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 居民报事表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiEventDao extends BaseDao<ResiEventEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiEventMentionEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 事件被@人表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiEventMentionDao extends BaseDao<ResiEventMentionEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiEventOperationLogEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 事件操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiEventOperationLogDao extends BaseDao<ResiEventOperationLogEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiEventReplyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 事件回复表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiEventReplyDao extends BaseDao<ResiEventReplyEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiEventReportOrgEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 事件相关组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiEventReportOrgDao extends BaseDao<ResiEventReportOrgEntity> { |
|||
|
|||
} |
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 事件附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_event_attachment") |
|||
public class ResiEventAttachmentEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 事件Id,关联resi_event的id |
|||
*/ |
|||
private String resiEventId; |
|||
|
|||
/** |
|||
* 附件名 |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 附件地址 |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 排序字段 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,141 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 居民报事表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_event") |
|||
public class ResiEventEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 居民端用户所在网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 居民端用户所在网格的所属组织 |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 居民端用户所在网格的所有上级组织,包含AGENCY_ID |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 报事的人 |
|||
*/ |
|||
private String reportUserId; |
|||
|
|||
/** |
|||
* 1:党员;0:不是党员;默认0 |
|||
*/ |
|||
private String isParty; |
|||
|
|||
/** |
|||
* 事件内容 |
|||
*/ |
|||
private String eventContent; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 处理中:processing;已办结:closed_case |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 1:已转项目;0:未转项目;默认0 |
|||
*/ |
|||
private Boolean shiftProject; |
|||
|
|||
/** |
|||
* 项目id;shift_project=1时,此列有值 |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 1:已撤回;0:未撤回正常展示;默认0 |
|||
*/ |
|||
private Boolean recallFlag; |
|||
|
|||
/** |
|||
* 撤回时间 |
|||
*/ |
|||
private Date recallTime; |
|||
|
|||
/** |
|||
* 事件是否被阅读过;1已读;针对报事人待处理列表 |
|||
*/ |
|||
private Boolean readFlag; |
|||
|
|||
/** |
|||
* 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/办结更新为1; |
|||
*/ |
|||
private Boolean redDot; |
|||
|
|||
/** |
|||
* 最近一次操作时间(回复、立项、办结更新此列) |
|||
*/ |
|||
private Date latestOperatedTime; |
|||
|
|||
/** |
|||
* 是否解决:已解决 resolved,未解决 un_solved |
|||
*/ |
|||
private String resolveStatus; |
|||
|
|||
/** |
|||
* 结案说明可放这。 |
|||
*/ |
|||
private String closeRemark; |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 事件被@人表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_event_mention") |
|||
public class ResiEventMentionEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 事件id |
|||
*/ |
|||
private String resiEventId; |
|||
|
|||
/** |
|||
* 人大代表:npc_user |
|||
*/ |
|||
private String userType; |
|||
|
|||
/** |
|||
* 居民端用户id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 居民注册网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 居民所属社区,就是grid_id的所属组织 |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 居民注册网格的所有上级 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 含义:已读read,未读:un_read;人大代表从未读=>已读,点击查看详情前更新为已读; |
|||
*/ |
|||
private String readFlag; |
|||
|
|||
/** |
|||
* (1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:报事人回复or工作人员回复、立项、办结更新为1; |
|||
*/ |
|||
private Boolean redDot; |
|||
|
|||
} |
@ -0,0 +1,89 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 事件操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_event_operation_log") |
|||
public class ResiEventOperationLogEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 事件id |
|||
*/ |
|||
private String resiEventId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 居民端用户:resi_user;工作人员:staff;报事人:report_user |
|||
*/ |
|||
private String userIdentity; |
|||
|
|||
/** |
|||
* 1、发布事件:publish; |
|||
2、撤回事件:recall; |
|||
3、复:reply; |
|||
4、立项:shift_project; |
|||
5、办结:close_case; |
|||
6、选择是否已解决:choose_resolve; |
|||
7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中; |
|||
|
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 1、发布事件:publish; |
|||
2、撤回事件:recall; |
|||
3、复:reply; |
|||
4、立项:shift_project; |
|||
5、办结:close_case; |
|||
6、选择是否已解决:choose_resolve; |
|||
7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中; |
|||
*/ |
|||
private String actionDesc; |
|||
|
|||
/** |
|||
* 操作时间 |
|||
*/ |
|||
private Date operateTime; |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 事件回复表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_event_reply") |
|||
public class ResiEventReplyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 事件Id,关联resi_event的id |
|||
*/ |
|||
private String resiEventId; |
|||
|
|||
/** |
|||
* 回复人用户Id |
|||
*/ |
|||
private String fromUserId; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 报事人:xxx路尹女士;人大:人大代表-张三;组织:组织名:阜新路社区 |
|||
*/ |
|||
private String userShowName; |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 事件相关组织表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_event_report_org") |
|||
public class ResiEventReportOrgEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 事件id |
|||
*/ |
|||
private String resiEventId; |
|||
|
|||
/** |
|||
* 报给?: |
|||
网格:grid; |
|||
社区:community; |
|||
乡(镇、街道)级:street; |
|||
区县级: district; |
|||
市级: city; |
|||
省级:province。 |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 报给的组织或者网格id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* org_id的上级组织id,org_id是跟组织,此列为0 |
|||
*/ |
|||
private String orgPid; |
|||
|
|||
/** |
|||
* org_id的所有上级组织id,org_id是跟组织,此列为0 |
|||
*/ |
|||
private String orgPids; |
|||
|
|||
/** |
|||
* 含义:已读read,未读:un_read;组织下的工作人员从待处理=>处理中,点击查看详情前更新为已读; |
|||
*/ |
|||
private String orgRead; |
|||
|
|||
/** |
|||
* (1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:人大代表回复or报事人回复or工作人员回复、立项、办结更新为1; |
|||
*/ |
|||
private Boolean redDot; |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.dto.form.ReplyListFormDTO; |
|||
import com.epmet.dto.result.ReplyListResultDTO; |
|||
import com.epmet.entity.ResiEventReplyEntity; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 事件回复表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
public interface ResiEventReplyService extends BaseService<ResiEventReplyEntity> { |
|||
|
|||
/** |
|||
* @Description 报事详情-回复列表-两端通用 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 11:11 上午 |
|||
*/ |
|||
List<ReplyListResultDTO> replyList(ReplyListFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.dto.form.*; |
|||
import com.epmet.dto.result.EventDetailResultDTO; |
|||
import com.epmet.dto.result.EventListResultDTO; |
|||
import com.epmet.entity.ResiEventEntity; |
|||
import com.epmet.dto.result.MyReportedResultDTO; |
|||
import com.epmet.dto.result.ResiEventIdDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 居民报事表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
public interface ResiEventService extends BaseService<ResiEventEntity> { |
|||
|
|||
/** |
|||
* @Description 群众直报(待处理、处理中、已办结)列表 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 10:53 上午 |
|||
*/ |
|||
List<EventListResultDTO> eventList(EventListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 查看报事时,更新时间操作 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 11:01 上午 |
|||
*/ |
|||
void updateViewTime(UpdateViewTimeFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 报事详情-两端通用 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 1:47 下午 |
|||
*/ |
|||
EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO); |
|||
|
|||
/** |
|||
* 我要报事-提交(尹) |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.dto.result.ResiEventResultDTO |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 10:51 |
|||
*/ |
|||
ResiEventIdDTO report(ResiEventFormDTO formDTO); |
|||
|
|||
/** |
|||
* 撤回事件 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 13:45 |
|||
*/ |
|||
void reCall(ReCallEventFormDTO formDTO); |
|||
|
|||
/** |
|||
* 选择已解决,未解决 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 13:58 |
|||
*/ |
|||
void chooseResolve(ChooseResolveFormDTO formDTO); |
|||
|
|||
/** |
|||
* 我的报事列表查询 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.result.MyReportedResultDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 14:28 |
|||
*/ |
|||
List<MyReportedResultDTO> queryMyReported(MyReportedFormDTO formDTO); |
|||
} |
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.dao.ResiEventReplyDao; |
|||
import com.epmet.dto.form.ReplyListFormDTO; |
|||
import com.epmet.dto.result.ReplyListResultDTO; |
|||
import com.epmet.entity.ResiEventReplyEntity; |
|||
import com.epmet.service.ResiEventReplyService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 事件回复表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Service |
|||
public class ResiEventReplyServiceImpl extends BaseServiceImpl<ResiEventReplyDao, ResiEventReplyEntity> implements ResiEventReplyService { |
|||
|
|||
/** |
|||
* @Description 报事详情-回复列表-两端通用 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 11:11 上午 |
|||
*/ |
|||
@Override |
|||
public List<ReplyListResultDTO> replyList(ReplyListFormDTO formDTO) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,166 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.constant.EventConstant; |
|||
import com.epmet.dao.ResiEventDao; |
|||
import com.epmet.dto.form.EventDetailFormDTO; |
|||
import com.epmet.dto.form.EventListFormDTO; |
|||
import com.epmet.dto.form.UpdateViewTimeFormDTO; |
|||
import com.epmet.dto.result.EventDetailResultDTO; |
|||
import com.epmet.dto.result.EventListResultDTO; |
|||
import com.epmet.dto.form.ChooseResolveFormDTO; |
|||
import com.epmet.dto.form.MyReportedFormDTO; |
|||
import com.epmet.dto.form.ReCallEventFormDTO; |
|||
import com.epmet.dto.form.ResiEventFormDTO; |
|||
import com.epmet.dto.result.MyReportedResultDTO; |
|||
import com.epmet.dto.result.ResiEventIdDTO; |
|||
import com.epmet.entity.ResiEventEntity; |
|||
import com.epmet.service.ResiEventService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 居民报事表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-08-03 |
|||
*/ |
|||
@Service |
|||
public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEventEntity> implements ResiEventService { |
|||
|
|||
/** |
|||
* @Description 群众直报(待处理、处理中、已办结)列表 |
|||
* 未处理:按照创建时间正序; |
|||
* 处理中:按照最新操作时间由近到远排序; |
|||
* 已办结:按照办结时间由近到远排序; |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 10:53 上午 |
|||
*/ |
|||
@Override |
|||
public List<EventListResultDTO> eventList(EventListFormDTO formDTO) { |
|||
// 处理中
|
|||
if (formDTO.getEventType().equals(EventConstant.EVENT_PROCESSED)){ |
|||
|
|||
// 待处理
|
|||
}else if (formDTO.getEventType().equals(EventConstant.EVENT_UN_DISPOSED)){ |
|||
|
|||
// 已办结
|
|||
}else if (formDTO.getEventType().equals(EventConstant.EVENT_TRANSFERRED)){ |
|||
|
|||
} |
|||
return new ArrayList<>(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 查看报事时,更新时间操作 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 11:01 上午 |
|||
*/ |
|||
@Override |
|||
public void updateViewTime(UpdateViewTimeFormDTO formDTO) { |
|||
|
|||
} |
|||
|
|||
/** |
|||
* @Description 报事详情-两端通用 |
|||
* @Param formDTO |
|||
* @author zxc |
|||
* @date 2021/8/3 1:47 下午 |
|||
*/ |
|||
@Override |
|||
public EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO) { |
|||
return null; |
|||
} |
|||
/** |
|||
* 我要报事-提交(尹) |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.dto.result.ResiEventResultDTO |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 10:51 |
|||
*/ |
|||
@Override |
|||
public ResiEventIdDTO report(ResiEventFormDTO formDTO) { |
|||
//todo
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* 撤回事件 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 13:45 |
|||
*/ |
|||
@Override |
|||
public void reCall(ReCallEventFormDTO formDTO) { |
|||
// todo
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* 选择已解决,未解决 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 13:58 |
|||
*/ |
|||
@Override |
|||
public void chooseResolve(ChooseResolveFormDTO formDTO) { |
|||
// todo
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* 我的报事列表查询 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.result.MyReportedResultDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/8/3 14:28 |
|||
*/ |
|||
@Override |
|||
public List<MyReportedResultDTO> queryMyReported(MyReportedFormDTO formDTO) { |
|||
// todo
|
|||
|
|||
|
|||
|
|||
|
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
CREATE TABLE `resi_event` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键,事件id', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '居民端用户所在网格id', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端用户所在网格的所属组织', |
|||
`PIDS` varchar(64) NOT NULL COMMENT '居民端用户所在网格的所有上级组织,包含AGENCY_ID', |
|||
`REPORT_USER_ID` varchar(64) NOT NULL COMMENT '报事的人', |
|||
`IS_PARTY` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:党员;0:不是党员;默认0', |
|||
`EVENT_CONTENT` varchar(1024) NOT NULL COMMENT '事件内容', |
|||
`LATITUDE` varchar(32) DEFAULT NULL COMMENT '纬度', |
|||
`LONGITUDE` varchar(32) DEFAULT NULL COMMENT '经度', |
|||
`ADDRESS` varchar(255) NOT NULL COMMENT '地址', |
|||
`STATUS` varchar(32) NOT NULL COMMENT '处理中:processing;已办结:closed_case', |
|||
`SHIFT_PROJECT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:已转项目;0:未转项目;默认0', |
|||
`PROJECT_ID` varchar(64) DEFAULT NULL COMMENT '项目id;shift_project=1时,此列有值', |
|||
`RECALL_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:已撤回;0:未撤回正常展示;默认0', |
|||
`RECALL_TIME` datetime DEFAULT NULL COMMENT '撤回时间', |
|||
`READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '事件是否被阅读过;1已读;针对报事人待处理列表', |
|||
`RED_DOT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/办结更新为1; ', |
|||
`LATEST_OPERATED_TIME` datetime NOT NULL COMMENT '最近一次操作时间(回复、立项、办结更新此列)', |
|||
`RESOLVE_STATUS` varchar(32) DEFAULT NULL COMMENT '是否解决:已解决 resolved,未解决 un_solved', |
|||
`CLOSE_REMARK` varchar(255) DEFAULT NULL COMMENT '结案说明可放这。', |
|||
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='居民报事表'; |
|||
|
|||
CREATE TABLE `resi_event_attachment` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`RESI_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id,关联resi_event的id', |
|||
`ATTACHMENT_NAME` varchar(64) NOT NULL COMMENT '附件名', |
|||
`ATTACHMENT_FORMAT` varchar(64) NOT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', |
|||
`ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', |
|||
`ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', |
|||
`SORT` int(1) NOT NULL COMMENT '排序字段', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件附件表'; |
|||
|
|||
|
|||
CREATE TABLE `resi_event_mention` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`RESI_EVENT_ID` varchar(64) NOT NULL COMMENT '事件id', |
|||
`USER_TYPE` varchar(32) NOT NULL COMMENT '人大代表:npc_user', |
|||
`USER_ID` varchar(64) NOT NULL COMMENT '居民端用户id', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '居民注册网格ID', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '居民所属社区,就是grid_id的所属组织', |
|||
`PIDS` varchar(255) NOT NULL COMMENT '居民注册网格的所有上级', |
|||
`READ_FLAG` varchar(10) NOT NULL DEFAULT 'un_read' COMMENT '含义:已读read,未读:un_read;人大代表从未读=>已读,点击查看详情前更新为已读;', |
|||
`RED_DOT` tinyint(1) NOT NULL DEFAULT '1' COMMENT '(1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:报事人回复or工作人员回复、立项、办结更新为1;', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 1删除;0未删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件被@人表'; |
|||
|
|||
|
|||
CREATE TABLE `resi_event_report_org` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`RESI_EVENT_ID` varchar(64) NOT NULL COMMENT '事件id', |
|||
`ORG_TYPE` varchar(32) NOT NULL COMMENT '报给?:\r\n网格:grid;\r\n社区:community;\r\n乡(镇、街道)级:street;\r\n区县级: district;\r\n市级: city;\r\n省级:province。', |
|||
`ORG_ID` varchar(64) NOT NULL COMMENT '报给的组织或者网格id', |
|||
`ORG_PID` varchar(64) NOT NULL COMMENT 'org_id的上级组织id,org_id是跟组织,此列为0', |
|||
`ORG_PIDS` varchar(255) NOT NULL COMMENT 'org_id的所有上级组织id,org_id是跟组织,此列为0', |
|||
`ORG_READ` varchar(10) NOT NULL DEFAULT 'un_read' COMMENT '含义:已读read,未读:un_read;组织下的工作人员从待处理=>处理中,点击查看详情前更新为已读;', |
|||
`RED_DOT` tinyint(1) NOT NULL DEFAULT '1' COMMENT '(1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:人大代表回复or报事人回复or工作人员回复、立项、办结更新为1;', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 1删除;0未删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件相关组织表'; |
|||
|
|||
|
|||
|
|||
CREATE TABLE `resi_event_reply` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`RESI_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id,关联resi_event的id', |
|||
`FROM_USER_ID` varchar(64) NOT NULL COMMENT '回复人用户Id', |
|||
`CONTENT` varchar(255) NOT NULL COMMENT '内容', |
|||
`USER_SHOW_NAME` varchar(64) NOT NULL COMMENT '报事人:xxx路尹女士;人大:人大代表-张三;组织:组织名:阜新路社区', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件回复表'; |
|||
|
|||
|
|||
CREATE TABLE `resi_event_operation_log` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`RESI_EVENT_ID` varchar(64) NOT NULL COMMENT '事件id', |
|||
`USER_ID` varchar(64) NOT NULL COMMENT '用户id', |
|||
`USER_IDENTITY` varchar(32) NOT NULL COMMENT '居民端用户:resi_user;工作人员:staff;报事人:report_user', |
|||
`ACTION_CODE` varchar(32) NOT NULL COMMENT '1、发布事件:publish;\r\n2、撤回事件:recall;\r\n3、复:reply;\r\n4、立项:shift_project;\r\n5、办结:close_case;\r\n6、选择是否已解决:choose_resolve;\r\n7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中;\r\n', |
|||
`ACTION_DESC` varchar(32) NOT NULL COMMENT '1、发布事件:publish;\r\n2、撤回事件:recall;\r\n3、复:reply;\r\n4、立项:shift_project;\r\n5、办结:close_case;\r\n6、选择是否已解决:choose_resolve;\r\n7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中;', |
|||
`OPERATE_TIME` datetime NOT NULL COMMENT '操作时间', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 1删除;0未删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件操作日志表'; |
@ -0,0 +1,8 @@ |
|||
<?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.epmet.dao.ResiEventAttachmentDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?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.epmet.dao.ResiEventDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?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.epmet.dao.ResiEventMentionDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?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.epmet.dao.ResiEventOperationLogDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?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.epmet.dao.ResiEventReplyDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?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.epmet.dao.ResiEventReportOrgDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,13 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 我要报事人大代表列表 |
|||
* @author wxz |
|||
* @date 2021.08.03 09:16:59 |
|||
*/ |
|||
@Data |
|||
public class ResiEventNpcListFormDTO { |
|||
private String gridId; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Description 群众直报-上报目标级别查询 |
|||
* @author wxz |
|||
* @date 2021.08.03 13:47:23 |
|||
*/ |
|||
@Data |
|||
public class ResiEventTargetLevelFormDTO { |
|||
|
|||
@NotBlank(message = "网格ID不能为空") |
|||
private String gridId; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Description 我要报事-人大代表列表 |
|||
* @author wxz |
|||
* @date 2021.08.03 09:12:57 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class ResiEventNpcResultDTO { |
|||
|
|||
private String userId; |
|||
|
|||
private String gridId; |
|||
|
|||
private String displayName; |
|||
|
|||
private String headImgUrl; |
|||
|
|||
private String agencyId; |
|||
|
|||
private String pids; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
/** |
|||
* @Description 群众直报目标层级Result |
|||
* @author wxz |
|||
* @date 2021.08.03 13:43:58 |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ResiEventTargetLevelResultDTO implements Comparable { |
|||
|
|||
private String orgLevel; |
|||
private String levelName; |
|||
private String orgId; |
|||
private String orgPid; |
|||
private String orgPids; |
|||
|
|||
//排序索引,用于排序
|
|||
private Integer index; |
|||
|
|||
@Override |
|||
public int compareTo(Object o) { |
|||
ResiEventTargetLevelResultDTO df = (ResiEventTargetLevelResultDTO) o; |
|||
return this.index.compareTo(df.getIndex()); |
|||
} |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.ResiEventNpcListFormDTO; |
|||
import com.epmet.dto.form.ResiEventTargetLevelFormDTO; |
|||
import com.epmet.dto.result.ResiEventNpcResultDTO; |
|||
import com.epmet.dto.result.ResiEventTargetLevelResultDTO; |
|||
import com.epmet.service.ResiEventService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
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.validation.constraints.NotBlank; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.TreeSet; |
|||
|
|||
/** |
|||
* @author wxz |
|||
* @Description 群众直报/报事controller |
|||
* @date 2021.08.02 09:58:40 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("resi-event") |
|||
public class ResiEventController { |
|||
|
|||
@Autowired |
|||
private ResiEventService resiEventService; |
|||
|
|||
/** |
|||
* @return |
|||
* @Description 查询人大代表列表 |
|||
* @author wxz |
|||
* @date 2021.08.03 09:17 |
|||
*/ |
|||
@PostMapping("/npc-list-ingrid") |
|||
public Result<HashMap<String, List<ResiEventNpcResultDTO>>> listNpc(@RequestBody ResiEventNpcListFormDTO input) { |
|||
ValidatorUtils.validateEntity(input); |
|||
String gridId = input.getGridId(); |
|||
List<ResiEventNpcResultDTO> npcs = resiEventService.listNpcByGrid(gridId); |
|||
|
|||
HashMap<String, List<ResiEventNpcResultDTO>> wrapper = new HashMap<>(); |
|||
wrapper.put("reportTargets", npcs); |
|||
return new Result<HashMap<String, List<ResiEventNpcResultDTO>>>().ok(wrapper); |
|||
} |
|||
|
|||
/** |
|||
* @return |
|||
* @Description 查询上报目标列表 |
|||
* @author wxz |
|||
* @date 2021.08.03 13:47 |
|||
*/ |
|||
@PostMapping("/report-target-level-list") |
|||
public Result<HashMap> listReportTargetLevels(@RequestBody ResiEventTargetLevelFormDTO input) { |
|||
ValidatorUtils.validateEntity(input); |
|||
String gridId = input.getGridId(); |
|||
TreeSet<ResiEventTargetLevelResultDTO> targetList = resiEventService.listReportTargetLevels(gridId); |
|||
|
|||
HashMap<String, TreeSet<ResiEventTargetLevelResultDTO>> warpper = new HashMap<>(); |
|||
warpper.put("reportTargets", targetList); |
|||
|
|||
return new Result<HashMap>().ok(warpper); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.result.ResiEventNpcResultDTO; |
|||
import com.epmet.dto.result.ResiEventTargetLevelResultDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.TreeSet; |
|||
|
|||
/** |
|||
* @Description 报事service |
|||
* @author wxz |
|||
* @date 2021.08.02 09:59:16 |
|||
*/ |
|||
public interface ResiEventService { |
|||
/** |
|||
* @Description 查询网格的人大代表列表 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.08.03 09:29 |
|||
*/ |
|||
List<ResiEventNpcResultDTO> listNpcByGrid(String gridId); |
|||
|
|||
/** |
|||
* @Description 查询上报目标列表 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.08.03 13:50 |
|||
*/ |
|||
TreeSet<ResiEventTargetLevelResultDTO> listReportTargetLevels(String gridId); |
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.feign.ResultDataResolver; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constant.BadgeConstant; |
|||
import com.epmet.constant.OrgInfoConstant; |
|||
import com.epmet.dto.form.ListUserByBadgeFormDTO; |
|||
import com.epmet.dto.form.OrgInfoFormDTO; |
|||
import com.epmet.dto.result.*; |
|||
import com.epmet.enums.OrgLevelEnums; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.feign.GovOrgOpenFeignClient; |
|||
import com.epmet.service.ResiEventService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
import java.util.stream.Stream; |
|||
|
|||
/** |
|||
* @author wxz |
|||
* @Description 报事service |
|||
* @date 2021.08.02 09:59:36 |
|||
*/ |
|||
@Service |
|||
public class ResiEventServiceImpl implements ResiEventService, ResultDataResolver { |
|||
|
|||
@Autowired |
|||
GovOrgOpenFeignClient govOrgOpenFeignClient; |
|||
|
|||
@Autowired |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
|
|||
@Override |
|||
public List<ResiEventNpcResultDTO> listNpcByGrid(String gridId) { |
|||
|
|||
// 查询网格所属的组织信息
|
|||
Result<GridInfoResultDTO> gridInfoResult = govOrgOpenFeignClient.queryGridInfo(gridId); |
|||
GridInfoResultDTO gridInfoData = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); |
|||
String parentAgencyId = gridInfoData.getParentAgencyId(); |
|||
String pids = gridInfoData.getPids(); |
|||
|
|||
//查询人大代表列表
|
|||
ListUserByBadgeFormDTO npcForm = new ListUserByBadgeFormDTO(gridId, BadgeConstant.BADGE_KEY_NPC); |
|||
Result<List<ListUserByBadgeResultDTO>> npcResult = epmetUserOpenFeignClient.listUsersByBadge(npcForm); |
|||
List<ListUserByBadgeResultDTO> npcData = getResultDataOrThrowsException(npcResult, ServiceConstant.EPMET_USER_SERVER, null, null); |
|||
|
|||
List<ResiEventNpcResultDTO> npcResultList = npcData.stream() |
|||
.map(npc -> new ResiEventNpcResultDTO(npc.getUserId(), gridId, "人大代表-".concat(npc.getRealName()), npc.getHeadImgUrl(), parentAgencyId, pids)) |
|||
.collect(Collectors.toList()); |
|||
|
|||
return npcResultList; |
|||
} |
|||
|
|||
/** |
|||
* @Description 此处会调用org上游接口批量获取父级组织信息,由于上游接口排序不可控,因此此处需要使用TreeSet做排序 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.08.03 15:51 |
|||
*/ |
|||
@Override |
|||
public TreeSet<ResiEventTargetLevelResultDTO> listReportTargetLevels(String gridId) { |
|||
TreeSet<ResiEventTargetLevelResultDTO> targetLevels = new TreeSet<>(); |
|||
|
|||
Result<GridInfoResultDTO> gridInfoResult = govOrgOpenFeignClient.queryGridInfo(gridId); |
|||
GridInfoResultDTO gridInfoData = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); |
|||
String pidsPath = gridInfoData.getPids(); |
|||
List<String> parentOrgIds = Arrays.asList(pidsPath.split(":")); |
|||
// 翻转列表
|
|||
Collections.reverse(parentOrgIds); |
|||
|
|||
// 一.网格信息(只有一条,但是为了适应接口,组装成了列表)
|
|||
List<String> currentGridId = Arrays.asList(gridId); |
|||
Result<List<OrgInfoResultDTO>> currentGridInfoResult = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, currentGridId)); |
|||
List<OrgInfoResultDTO> currentGridInfos = getResultDataOrThrowsException(currentGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); |
|||
OrgInfoResultDTO currentGridInfo = currentGridInfos.get(0); |
|||
|
|||
// 因为上游接口的值对应问题,这里只好做一个适配,拼接起来,希望上游代码不要再改了...
|
|||
String pids = currentGridInfo.getPids().concat(":").concat(currentGridInfo.getAgencyId()); |
|||
// 父ID列表的index排序字段是从0开始,网格要排在他们前面,则网格的index为-1
|
|||
targetLevels.add(new ResiEventTargetLevelResultDTO(OrgLevelEnums.GRID.getLevel(), OrgLevelEnums.GRID.getLevelName(), currentGridInfo.getOrgId(), currentGridInfo.getAgencyId(), pids, -1)); |
|||
|
|||
// 二.父级组织信息
|
|||
Result<List<OrgInfoResultDTO>> parentOrgInfoResult = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.AGENCY, parentOrgIds)); |
|||
List<OrgInfoResultDTO> parentOrgInfos = getResultDataOrThrowsException(parentOrgInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); |
|||
parentOrgInfos.forEach(porg -> { |
|||
String levelName = OrgLevelEnums.getLevelName(porg.getLevel()); |
|||
if (StringUtils.isBlank(levelName)) { |
|||
throw new RenException(String.format("根据级别%s没有找到对应的组织级别枚举", porg.getLevel())); |
|||
} |
|||
//parentOrgIds.indexOf(porg.getOrgId()为当前orgId在pids中的位置,得到之后,赋值给index字段,treeset会利用这个字段进行排序
|
|||
ResiEventTargetLevelResultDTO pLevel = new ResiEventTargetLevelResultDTO(porg.getLevel(), levelName, porg.getOrgId(), porg.getPid(), porg.getPids(), parentOrgIds.indexOf(porg.getOrgId())); |
|||
targetLevels.add(pLevel); |
|||
}); |
|||
|
|||
return targetLevels; |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class ListUserByBadgeFormDTO { |
|||
|
|||
@NotBlank(message = "网格ID不能为空") |
|||
private String gridId; |
|||
|
|||
@NotBlank(message = "徽章key不能为空") |
|||
private String badgeKey; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
/** |
|||
* @author wxz |
|||
* @Description 根据徽章查询用户结果集 |
|||
* @date 2021.08.02 10:23:37 |
|||
*/ |
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ListUserByBadgeResultDTO { |
|||
private String userId; |
|||
private String gridId; |
|||
private String realName; |
|||
private String headImgUrl; |
|||
} |
Loading…
Reference in new issue