Browse Source

Merge remote-tracking branch 'origin/dev_zhili' into dev_zhili

dev
yinzuomei 3 years ago
parent
commit
65504d06a0
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  2. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  3. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  4. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java
  5. 5
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java
  6. 23
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java
  7. 112
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java
  8. 107
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java
  9. 17
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java
  10. 83
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java
  11. 14
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java
  12. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  13. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java
  14. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java
  15. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java
  16. 23
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java
  17. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java
  18. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  19. 288
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  20. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  21. 19
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml
  22. 14
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml
  23. 106
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml
  24. 16
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml
  25. 14
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml
  26. 15
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java

@ -24,6 +24,7 @@ public enum DictTypeEnum {
GRID_TYPE("grid_type", "网格类型", 12), GRID_TYPE("grid_type", "网格类型", 12),
ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14),
SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15), SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15),
IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19),
; ;
private final String code; private final String code;

9
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java

@ -7,7 +7,9 @@ import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.PartyUnitListResultDTO;
@ -21,7 +23,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 本服务对外开放的API,其他服务通过引用此client调用该服务 * 本服务对外开放的API,其他服务通过引用此client调用该服务
@ -119,4 +120,10 @@ public interface EpmetHeartOpenFeignClient {
*/ */
@PostMapping("/heart/icpartyunit/getPartyUnitList") @PostMapping("/heart/icpartyunit/getPartyUnitList")
Result<List<PartyUnitListResultDTO>> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO); Result<List<PartyUnitListResultDTO>> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO);
/**
* @description 事件管理-转需求
**/
@PostMapping("/heart/residemand/iceventtodemand")
Result<DemandRecId> icEventToDemand(@RequestBody IcDemandFormDTO formDTO);
} }

8
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java

@ -8,7 +8,9 @@ import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.PartyUnitListResultDTO;
@ -17,7 +19,6 @@ import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO;
import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.EpmetHeartOpenFeignClient;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 本服务对外开放的API,其他服务通过引用此client调用该服务 * 本服务对外开放的API,其他服务通过引用此client调用该服务
@ -116,4 +117,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli
public Result<List<PartyUnitListResultDTO>> getPartyUnitList(PartyUnitListFormDTO formDTO) { public Result<List<PartyUnitListResultDTO>> getPartyUnitList(PartyUnitListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO); return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO);
} }
@Override
public Result<DemandRecId> queryUserVolunteerInfo(IcDemandFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO);
}
} }

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java

@ -11,11 +11,14 @@ import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType; import com.epmet.constant.SystemMessageType;
import com.epmet.constant.UserDemandConstant; import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.demand.*; import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.*; import com.epmet.dto.result.demand.*;
@ -267,4 +270,16 @@ public class ResiDemandController {
demandSatisfactionService.evaluateDemandAuto(formDTO); demandSatisfactionService.evaluateDemandAuto(formDTO);
return new Result(); return new Result();
} }
/**
* 事件管理-转需求
*
* @return
*/
@PostMapping("iceventtodemand")
public Result<DemandRecId> icEventToDemand(@RequestBody IcDemandFormDTO formDTO) {
ReportDemandFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ReportDemandFormDTO.class);
return new Result<DemandRecId>().ok(icUserDemandRecService.saveOrUpdateDemand(dto));
}
} }

5
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java

@ -66,6 +66,11 @@ public class IcEventDTO implements Serializable {
*/ */
private String sourceType; private String sourceType;
/**
* 发生时间
*/
private Date happenTime;
/** /**
* 事件内容 * 事件内容
*/ */

23
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java

@ -43,23 +43,22 @@ public class IcEventOperationLogDTO implements Serializable {
/** /**
* 1发布事件add * 1发布事件add
2reply * 2reply
3立项shift_project * 3立项shift_project
4转需求shift_demand * 4转需求shift_demand
5办结close_case; * 5办结close_case;
*/ */
private String actionCode; private String actionCode;
/** /**
* 1发布事件publish * 1发布事件publish
2撤回事件recall * 2撤回事件recall
3reply * 3reply
4立项shift_project * 4立项shift_project
5办结close_case; * 5转需求: shift_demand
6选择是否已解决choose_resolve; * 6办结close_case;
7首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中 * 7选择是否已解决choose_resolve;
* 8首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
*/ */
private String actionDesc; private String actionDesc;

112
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java

@ -0,0 +1,112 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 居民端-上报需求或者修改需求
*/
@Data
public class IcDemandFormDTO implements Serializable {
private static final long serialVersionUID = -2931148629441558468L;
public interface Add extends CustomerClientShowGroup {
}
public interface AddInternalGroup {
}
public interface Update extends CustomerClientShowGroup {
}
public interface UpdateInternalGroup {
}
@NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class)
private String demandRecId;
@NotBlank(message = "customerId不能为空", groups = {AddInternalGroup.class, UpdateInternalGroup.class})
private String customerId;
/**
* 网格id
*/
@NotBlank(message = "所属网格不能为空",groups = {AddInternalGroup.class})
private String gridId;
/**
* 需求内容1000字
*/
@NotBlank(message = "需求内容不能为空", groups = {Add.class, Update.class})
@Length(max = 1000, message = "需求内容至多输入1000字", groups = {Add.class, Update.class})
private String content;
/**
* 二级需求分类编码
*/
@NotBlank(message = "需求类别不能为空",groups = Add.class)
private String categoryCode;
/**
* 父级需求分类编码
*/
@NotBlank(message = "父级分类不能为空",groups = Add.class)
private String parentCode;
/**
* 希望服务时间
*/
@NotNull(message = "服务时间不能为空",groups = {Add.class, Update.class})
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date wantServiceTime;
/**
* 需求人user.id或者ic_resi_user.id
*/
@NotBlank(message = "需求人不能为空",groups ={AddInternalGroup.class, UpdateInternalGroup.class})
private String demandUserId;
/**
* 需求人联系姓名
*/
@NotBlank(message = "联系人不能为空",groups = {Add.class, Update.class})
private String demandUserName;
/**
* 需求人联系电话
*/
@NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class})
private String demandUserMobile;
/**
* 服务地点工作端指派默认居民居住房屋地址居民端地图选择
*/
@NotBlank(message = "服务地点不能为空",groups = {Add.class, Update.class})
private String serviceLocation;
/**
* 门牌号详细地址
*/
@Length(max = 200, message = "门牌号至多输入200字", groups = {Add.class, Update.class})
private String locationDetail;
/**
* 经度,需求人是ic的居民时取所住楼栋的中心点位
*/
private String longitude;
/**
* 纬度,需求人是ic的居民时取所住楼栋的中心点位
*/
private String latitude;
}

107
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java

@ -0,0 +1,107 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description 事件管理新增
* @Author sun
*/
@Data
public class IcEventAddEditFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 网格ID
*/
@NotBlank(message = "网格ID不能为空", groups = {AddGroup.class})
private String gridId;
/**
* 报事人Id
*/
private String reportUserId;
/**
* 报事人姓名
*/
@NotBlank(message = "报事人不能为空", groups = {AddGroup.class})
private String name;
/**
* 手机号
*/
@Length(max = 11, message = "手机号位数不能超过11位", groups = AddGroup.class)
private String mobile;
/**
* 身份证号
*/
@NotBlank(message = "身份证号不能为空", groups = {AddGroup.class})
@Length(min = 15, max = 18, message = "身份证号位数不正确", groups = AddGroup.class)
private String idCard;
/**
* 反映渠道
*/
@NotBlank(message = "反映渠道不能为空", groups = {AddGroup.class})
private String sourceType;
/**
* 事件内容
*/
@NotBlank(message = "事件内容不能为空", groups = {AddGroup.class})
private String eventContent;
/**
* 图片集合
*/
private List<String> imageList;
/**
* 二类分类Id
*/
private List<String> categoryList;
/**
* 事件地址
*/
//@NotBlank(message = "事件地址不能为空", groups = {AddGroup.class})
private String address;
/**
* 经度
*/
private String latitude;
/**
* 维度
*/
private String longitude;
/**
* 处理方式[0:已回复 1:已转项目 1:已转需求]
*/
private String operationType;
/**
* 项目需求ID
*/
private String operationId;
/**
* 回复内容
*/
private String content;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* 立项接口入参对象
*/
private EventToProjectFormDTO project;
/**
* 转需求接口入参对象
*/
private IcDemandFormDTO demand;
private String customerId;
private String userId;
private String app;
private String client;
}

17
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java

@ -13,38 +13,37 @@ public class IcEventListFormDTO implements Serializable {
private static final long serialVersionUID = 9156247659994638103L; private static final long serialVersionUID = 9156247659994638103L;
/** /**
* 网格ID * 所属网格
*/ */
private String gridId; private String gridId;
/** /**
* 所属小区ID * 上报渠道
*/ */
private String sourceType; private String sourceType;
/** /**
* 所属楼宇Id * 事件内容
*/ */
private String eventContent; private String eventContent;
/** /**
* 单元id * 报事人
*/ */
private String name; private String name;
/** /**
* 所属家庭Id * 手机号
*/ */
private String mobile; private String mobile;
/** /**
* 起始迁入时间 * 起始上报时间yyyy-MM-dd HH:mm:ss
*/ */
private String startTime; private String startTime;
/** /**
* 终止迁入时间 * 终止上报时间yyyy-MM-dd HH:mm:ss
*/ */
private String endTime; private String endTime;
/** /**
* 手机号 * 状态处理中processing已办结closed_case
*/ */
private String status; private String status;
/** /**
* 页码 * 页码
*/ */

83
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java

@ -1,10 +1,9 @@
package com.epmet.dto.result; package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.List; import java.util.List;
@ -17,7 +16,7 @@ public class IcEventListResultDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 迁入Id * 事件Id
*/ */
private String eventId; private String eventId;
/** /**
@ -25,96 +24,88 @@ public class IcEventListResultDTO implements Serializable {
*/ */
private String gridId; private String gridId;
/** /**
* 网格名称 * 所属网格
*/ */
private String gridName; private String gridName;
/** /**
* 所属小区ID * 事件内容
*/ */
private String eventContent; private String eventContent;
/** /**
* 所属小区名称 * 图片[url集合]
*/ */
private List<String> imageList; private List<String> imageList;
/** /**
* 所属小区名称 * 音频[url集合]
*/ */
private List<String> voiceList; private List<String> voiceList;
/** /**
* 所属楼宇Id * 上报渠道[字典表]
*/
private String sourceType;
/**
* 上报渠道
*/ */
private String sourceTypeName; private String sourceTypeName;
/** /**
* 所属楼宇名称 * 地址
*/ */
private String address; private String address;
/** /**
* 单元id * 报事人
*/ */
private String name; private String name;
/** /**
* 单元名称 * 手机号
*/ */
private String mobile; private String mobile;
/** /**
* 所属家庭Id * 群众满意度[满意度 - 不满意:bad基本满意:good非常满意:perfect]
*/ */
private String satisfaction; private String satisfaction;
/** /**
* 所属家庭名称 * 群众满意度[满意度 - 不满意:bad基本满意:good非常满意:perfect]
*/ */
private String isResiUser; private String satisfactionName;
/** /**
* 所属家庭Id * 上报时间
*/ */
private String status; private String createdTime;
/** /**
* 姓名 * 状态处理中processing已办结closed_case
*/ */
private String createdUserId; private String status;
/** /**
* 迁入时间 * 状态处理中processing已办结closed_case
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String statusName;
private Date inTime;
/** /**
* 迁入原因 * 事件创建人
*/ */
private String inReason; private String createdUserId;
/** /**
* 来源地区编码 * 事件附件
*/ */
private String sourceAddressCode; @JsonIgnore
private List<EventDetailResultDTO.Attachment> attachmentList;
@Data
public static class Attachment {
/** /**
* 来源地区编码全路径 * url
*/ */
private String sourceAddressPathCode; private String url;
/**
* 来源地区地址
*/
private String sourceAddress;
/** /**
* 迁移证号码 * 附件类型
*/ */
private String moveNumber; private String type;
/** /**
* 户主姓名 * 附件类型
*/ */
private String householderName; private Integer duration;
}
/**
* 与户主关系[字典表]
*/
private String householderRelation;
/**
* 与户主关系[字典表]
*/
private String householderRelationName;
} }

14
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java

@ -12,6 +12,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO;
import com.epmet.dto.form.IcEventAddEditFormDTO;
import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.form.ProcessAnalysisEventListFormDTO;
import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventListResultDTO;
@ -51,11 +52,14 @@ public class IcEventController {
} }
@NoRepeatSubmit @NoRepeatSubmit
@PostMapping("save") @PostMapping("add")
public Result save(@RequestBody IcEventDTO dto){ public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcEventAddEditFormDTO formDTO){
//效验数据 ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class);
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); formDTO.setCustomerId(tokenDto.getCustomerId());
icEventService.save(dto); formDTO.setUserId(tokenDto.getUserId());
formDTO.setApp(tokenDto.getApp());
formDTO.setClient(tokenDto.getClient());
icEventService.save(formDTO);
return new Result(); return new Result();
} }

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java

@ -359,8 +359,8 @@ public class ProjectController {
* @date 2022/5/18 10:03 * @date 2022/5/18 10:03
*/ */
@PostMapping("satisfaction-evaluation-list") @PostMapping("satisfaction-evaluation-list")
public Result<List<SatisfactionEvaluationListResultDTO>> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ public Result<PageData> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class); ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class);
return new Result<List<SatisfactionEvaluationListResultDTO>>().ok(projectService.satisfactionEvaluationList(formDTO)); return new Result<PageData>().ok(projectService.satisfactionEvaluationList(formDTO));
} }
} }

6
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java

@ -1,6 +1,8 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.result.IcEventListResultDTO;
import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.IcEventResultDTO;
import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO;
import com.epmet.entity.IcEventEntity; import com.epmet.entity.IcEventEntity;
@ -12,6 +14,8 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.List;
/** /**
* 事件管理表 * 事件管理表
* *
@ -21,6 +25,8 @@ import java.util.Map;
@Mapper @Mapper
public interface IcEventDao extends BaseDao<IcEventEntity> { public interface IcEventDao extends BaseDao<IcEventEntity> {
List<IcEventListResultDTO> icEventList(IcEventListFormDTO formDTO);
/** /**
* 查询事件处理状态比例 * 查询事件处理状态比例
* @param gridPids * @param gridPids

12
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java

@ -58,12 +58,12 @@ public class IcEventAttachmentEntity extends BaseEpmetEntity {
/** /**
* 附件状态审核中auditing * 附件状态审核中auditing
auto_passed: 自动通过 auto_passed: 自动通过
review结果不确定需要人工审核 review结果不确定需要人工审核
block: 结果违规 block: 结果违规
rejected人工审核驳回; rejected人工审核驳回;
approved人工审核通过 approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态 现在图片是同步审核的所以图片只有auto_passed一种状态
*/ */
private String status; private String status;

5
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java

@ -66,6 +66,11 @@ public class IcEventEntity extends BaseEpmetEntity {
*/ */
private String sourceType; private String sourceType;
/**
* 发生时间
*/
private Date happenTime;
/** /**
* 事件内容 * 事件内容
*/ */

23
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java

@ -43,23 +43,22 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity {
/** /**
* 1发布事件add * 1发布事件add
2reply * 2reply
3立项shift_project * 3立项shift_project
4转需求shift_demand * 4转需求shift_demand
5办结close_case; * 5办结close_case;
*/ */
private String actionCode; private String actionCode;
/** /**
* 1发布事件publish * 1发布事件publish
2撤回事件recall * 2撤回事件recall
3reply * 3reply
4立项shift_project * 4立项shift_project
5办结close_case; * 5转需求: shift_demand
6选择是否已解决choose_resolve; * 6办结close_case;
7首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中 * 7选择是否已解决choose_resolve;
* 8首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
*/ */
private String actionDesc; private String actionDesc;

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java

@ -3,6 +3,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.IcEventAddEditFormDTO;
import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventListResultDTO;
import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.IcEventResultDTO;
@ -10,7 +11,6 @@ import com.epmet.dto.result.ProcessStatusRatioResultDTO;
import com.epmet.entity.IcEventEntity; import com.epmet.entity.IcEventEntity;
import java.util.Date; import java.util.Date;
import java.util.Map;
/** /**
* 事件管理表 * 事件管理表
@ -48,7 +48,7 @@ public interface IcEventService extends BaseService<IcEventEntity> {
* @author generator * @author generator
* @date 2022-05-17 * @date 2022-05-17
*/ */
void save(IcEventDTO dto); void save(IcEventAddEditFormDTO dto);
/** /**
* 默认更新 * 默认更新

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java

@ -382,6 +382,6 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @author zxc * @author zxc
* @date 2022/5/18 10:03 * @date 2022/5/18 10:03
*/ */
List<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO);
} }

288
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -4,39 +4,55 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
import com.epmet.commons.tools.scan.param.ImgTaskDTO;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.dao.IcEventDao; import com.epmet.dao.IcEventDao;
import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.AgencyInfoFormDTO; import com.epmet.dto.form.*;
import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.entity.IcEventEntity; import com.epmet.entity.*;
import com.epmet.enums.EcEventProcessStatusEnum; import com.epmet.enums.EcEventProcessStatusEnum;
import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.IcEventService; import com.epmet.resi.group.constant.TopicConstant;
import com.epmet.service.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays; import java.util.*;
import java.util.Date; import java.util.concurrent.atomic.AtomicReference;
import java.util.List; import java.util.stream.Collectors;
import java.util.Map;
/** /**
* 事件管理表 * 事件管理表
@ -47,23 +63,75 @@ import java.util.Map;
@Service @Service
public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntity> implements IcEventService, ResultDataResolver { public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntity> implements IcEventService, ResultDataResolver {
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
private String textSyncScanMethod;
@Value("${openapi.scan.method.imgSyncScan}")
private String imgSyncScanMethod;
@Autowired @Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient; private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired @Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient; private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Autowired
private ProjectTraceService projectTraceService;
@Autowired
private EpmetHeartOpenFeignClient epmetHeartOpenFeignClient;
@Autowired
private GovIssueOpenFeignClient govIssueOpenFeignClient;
@Autowired
private IcEventAttachmentService icEventAttachmentService;
@Autowired
private IcEventCategoryService icEventCategoryService;
@Autowired
private IcEventReplyService icEventReplyService;
@Autowired
private IcEventOperationLogService icEventOperationLogService;
@Override @Override
public PageData<IcEventListResultDTO> list(IcEventListFormDTO formDTO) { public PageData<IcEventListResultDTO> list(IcEventListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<IcEventListResultDTO> list = null; List<IcEventListResultDTO> list = baseDao.icEventList(formDTO);
PageInfo<IcEventListResultDTO> pageInfo = new PageInfo<>(list); PageInfo<IcEventListResultDTO> pageInfo = new PageInfo<>(list);
if (!CollectionUtils.isEmpty(list)) {} if (!CollectionUtils.isEmpty(list)) {
//查询网格名称(组织-网格)
List<String> gridIds = list.stream().map(IcEventListResultDTO::getGridId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList());
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes = govOrgOpenFeignClient.getGridListByGridIds(gridIds);
List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>();
Map<String, String> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2));
//与户主关系字典表数据
Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode());
Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>();
//封装数据
for (IcEventListResultDTO dto : list) {
if (gridInfoMap.containsKey(dto.getGridId())) {
dto.setGridName(gridInfoMap.get(dto.getGridId()));
}
if (StringUtils.isNotBlank(dto.getSourceType())) {
dto.setSourceTypeName(statusMap.get(dto.getSourceType()));
}
//每个事件对应的图片数据
List<String> imageList = new ArrayList<>();
List<String> voiceList = new ArrayList<>();
dto.getAttachmentList().forEach(file -> {
if ("image".equals(file.getType())) {
imageList.add(file.getUrl());
} else if ("voice".equals(file.getType())) {
voiceList.add(file.getUrl());
}
});
dto.setImageList(imageList);
dto.setVoiceList(voiceList);
}
}
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal());
} }
private QueryWrapper<IcEventEntity> getWrapper(Map<String, Object> params){ private QueryWrapper<IcEventEntity> getWrapper(Map<String, Object> params) {
String id = (String)params.get(FieldConstant.ID_HUMP); String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcEventEntity> wrapper = new QueryWrapper<>(); QueryWrapper<IcEventEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -79,9 +147,193 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(IcEventDTO dto) { public void save(IcEventAddEditFormDTO formDTO) {
IcEventEntity entity = ConvertUtils.sourceToTarget(dto, IcEventEntity.class); //获取当前工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
}
//获取网格缓存信息
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(formDTO.getGridId());
if (null == gridInfo) {
throw new EpmetException(String.format("未查询到网格{%s}信息", formDTO.getGridId()));
}
//1.参数校验,安全校验
//1-1.判断是否勾选处理方式,勾选了则分类不能为空
if (StringUtils.isNotBlank(formDTO.getOperationType()) && CollectionUtils.isEmpty(formDTO.getCategoryList())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件分类不能为空");
}
//1-2.判断勾选已完成则处理方式不能选择立项或转需求
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())
&& StringUtils.isNotBlank(formDTO.getOperationType()) && ("1".equals(formDTO.getOperationType()) || "2".equals(formDTO.getOperationType()))) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件勾选已完成则不允许立项或转需求");
}
//1-3.安全校验事件内容、图片内容
//事件内容
if (StringUtils.isNotBlank(formDTO.getEventContent())) {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
taskDTO.setContent(formDTO.getEventContent());
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
if (!textSyncScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
}
}
//图片内容
if (!CollectionUtils.isEmpty(formDTO.getImageList())) {
ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO();
formDTO.getImageList().forEach(imgUrl -> {
ImgTaskDTO task = new ImgTaskDTO();
task.setDataId(UUID.randomUUID().toString().replace("-", ""));
task.setUrl(imgUrl);
imgScanParamDTO.getTasks().add(task);
});
Result<SyncScanResult> imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO);
if (!imgScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!imgScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode(), EpmetErrorCode.IMG_SCAN_FAILED.getMsg());
}
}
}
//2.判断是否立项或转需求
//2-1.项目立项
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) {
EventToProjectResultDTO project = projectTraceService.eventToProject(formDTO.getProject());
formDTO.setOperationId(project.getProjectId());
}
//2-2.转需求
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "2".equals(formDTO.getOperationType())) {
IcDemandFormDTO dto = formDTO.getDemand();
//需求人默认是当前用户id
dto.setDemandUserId(formDTO.getUserId());
dto.setCustomerId(formDTO.getCustomerId());
Result<DemandRecId> recIdResult = epmetHeartOpenFeignClient.icEventToDemand(dto);
if (!recIdResult.success() || recIdResult.getData() == null) {
throw new RenException(recIdResult.getCode(), recIdResult.getMsg());
}
formDTO.setOperationId(recIdResult.getData().getDemandRecId());
}
//3.新增事件数据、附件数据、分类数据、回复数据、操作记录数据
//3-1.事件数据保存
IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class);
entity.setAgencyId(gridInfo.getPid());
entity.setGridPids(gridInfo.getPids());
insert(entity); insert(entity);
//3-2.附件数据保存
List<IcEventAttachmentEntity> imageEntityList = new ArrayList<>();
if (!CollectionUtils.isEmpty(formDTO.getImageList())) {
int sort = 0;
for (String url : formDTO.getImageList()) {
IcEventAttachmentEntity attachment = new IcEventAttachmentEntity();
attachment.setCustomerId(formDTO.getCustomerId());
attachment.setAttachmentUrl(url);
attachment.setIcEventId(entity.getId());
attachment.setCreatedBy(formDTO.getUserId());
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setSort(sort++);
attachment.setAttachmentType("image");
attachment.setStatus(TopicConstant.AUTO_PASSED);
imageEntityList.add(attachment);
}
icEventAttachmentService.insertBatch(imageEntityList);
}
//3-3.分类数据保存
if (!CollectionUtils.isEmpty(formDTO.getCategoryList())) {
CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), formDTO.getCategoryList());
AtomicReference<IcEventCategoryEntity> categoryEntity = null;
category.getCategoryList().forEach(ca -> {
if (ca.getId().equals(formDTO.getCategoryList().get(0))) {
categoryEntity.set(new IcEventCategoryEntity());
categoryEntity.get().setCustomerId(formDTO.getCustomerId());
categoryEntity.get().setIcEventId(entity.getId());
categoryEntity.get().setCategoryId(ca.getId());
categoryEntity.get().setCategoryPids(ca.getPids());
categoryEntity.get().setCategoryCode(ca.getCategoryCode());
}
});
if (categoryEntity.get() != null) {
icEventCategoryService.insert(categoryEntity.get());
}
}
//3-4.操作记录数据保存
List<IcEventOperationLogEntity> logList = new ArrayList<>();
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), new Date(), "add", "publish"));
Date date = new Date();
//3-5.回复数据保存
if (StringUtils.isNotBlank(formDTO.getContent())) {
IcEventReplyEntity replyEntity = new IcEventReplyEntity();
replyEntity.setCustomerId(formDTO.getCustomerId());
replyEntity.setIcEventId(entity.getId());
replyEntity.setFromUserId(formDTO.getUserId());
replyEntity.setContent(formDTO.getContent());
replyEntity.setUserShowName(staffInfo.getAgencyName() + "-" + staffInfo.getRealName());
icEventReplyService.insert(replyEntity);
//回复对应的操作记录
date.setTime(date.getTime() + 6000 * 1);
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "reply", "reply"));
}
//立项对应的操作记录
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) {
date.setTime(date.getTime() + 6000 * 1);
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_project", "shift_project"));
}
//转需求对应的操作记录
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "2".equals(formDTO.getOperationType())) {
date.setTime(date.getTime() + 6000 * 1);
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_demand", "shift_demand"));
}
//选择了已完成
if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) {
date.setTime(date.getTime() + 6000 * 1);
logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case"));
}
icEventOperationLogService.insertBatch(logList);
}
/**
* 根据分类Id集合查询对应数据信息
*
* @return
*/
private CategoryTagResultDTO queryCategory(String customerId, List<String> categoryIdList) {
CategoryTagListFormDTO categoryTag = new CategoryTagListFormDTO();
categoryTag.setCustomerId(customerId);
categoryTag.setCategoryIdList(categoryIdList);
Result<CategoryTagResultDTO> resultDTOResult = govIssueOpenFeignClient.getCategoryTagList(categoryTag);
if (!resultDTOResult.success()) {
throw new RenException("项目立项,调用issue服务查询分类、标签基础信息失败");
}
return resultDTOResult.getData();
}
/**
* 事件管理操作日志记录
*
* @return
*/
private IcEventOperationLogEntity logEntity(String customerId, String icEventId, String userId, Date date, String actionCode, String actionDesc) {
IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity();
logEntity.setCustomerId(customerId);
logEntity.setIcEventId(icEventId);
logEntity.setUserId(userId);
logEntity.setUserIdentity("staff");
logEntity.setActionCode(actionCode);
logEntity.setActionDesc(actionDesc);
logEntity.setOperateTime(date);
return logEntity;
} }
@Override @Override
@ -100,6 +352,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
/** /**
* 查询时间的grid_pids * 查询时间的grid_pids
*
* @param agencyId * @param agencyId
* @return * @return
*/ */
@ -142,7 +395,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO(); ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO();
BigDecimal processingCount = new BigDecimal(0); BigDecimal processingCount = new BigDecimal(0);
BigDecimal closedCount = new BigDecimal(0);; BigDecimal closedCount = new BigDecimal(0);
;
BigDecimal processingRatio = null; BigDecimal processingRatio = null;
BigDecimal closedRatio = null; BigDecimal closedRatio = null;
@ -188,7 +442,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
PageHelper.startPage(pageNo, pageSize); PageHelper.startPage(pageNo, pageSize);
List<IcEventResultDTO> list = baseDao.listProcessAnalysisEvents( List<IcEventResultDTO> list = baseDao.listProcessAnalysisEvents(
EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime
,queryEndTime); , queryEndTime);
// 3.补充数据 // 3.补充数据
for (IcEventResultDTO event : list) { for (IcEventResultDTO event : list) {

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -3239,7 +3239,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
* @date 2022/5/18 10:03 * @date 2022/5/18 10:03
*/ */
@Override @Override
public List<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { public PageData<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) {
PageData<SatisfactionEvaluationListResultDTO> data = new PageData<>(new ArrayList<>(),NumConstant.ZERO);
PageInfo<SatisfactionEvaluationListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); PageInfo<SatisfactionEvaluationListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId()));
List<SatisfactionEvaluationListResultDTO> result = pageInfo.getList(); List<SatisfactionEvaluationListResultDTO> result = pageInfo.getList();
if (CollectionUtils.isNotEmpty(result)){ if (CollectionUtils.isNotEmpty(result)){
@ -3248,8 +3249,10 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
throw new EpmetException("查询user信息失败..."); throw new EpmetException("查询user信息失败...");
} }
listResult.getData().forEach(u -> result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName()))); listResult.getData().forEach(u -> result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName())));
data.setList(result);
data.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
} }
return result; return data;
} }
/** /**

19
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml

@ -3,25 +3,6 @@
<mapper namespace="com.epmet.dao.IcEventAttachmentDao"> <mapper namespace="com.epmet.dao.IcEventAttachmentDao">
<resultMap type="com.epmet.entity.IcEventAttachmentEntity" id="icEventAttachmentMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="icEventId" column="IC_EVENT_ID"/>
<result property="attachmentName" column="ATTACHMENT_NAME"/>
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="attachmentUrl" column="ATTACHMENT_URL"/>
<result property="sort" column="SORT"/>
<result property="status" column="STATUS"/>
<result property="reason" column="REASON"/>
<result property="duration" column="DURATION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper> </mapper>

14
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml

@ -3,20 +3,6 @@
<mapper namespace="com.epmet.dao.IcEventCategoryDao"> <mapper namespace="com.epmet.dao.IcEventCategoryDao">
<resultMap type="com.epmet.entity.IcEventCategoryEntity" id="icEventCategoryMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="icEventId" column="IC_EVENT_ID"/>
<result property="categoryId" column="CATEGORY_ID"/>
<result property="categoryPids" column="CATEGORY_PIDS"/>
<result property="categoryCode" column="CATEGORY_CODE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper> </mapper>

106
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

@ -3,41 +3,26 @@
<mapper namespace="com.epmet.dao.IcEventDao"> <mapper namespace="com.epmet.dao.IcEventDao">
<resultMap type="com.epmet.entity.IcEventEntity" id="icEventMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/> <resultMap id="icEventMap" type="com.epmet.dto.result.IcEventListResultDTO">
<result property="gridId" column="GRID_ID"/> <id property="eventId" column="id"/>
<result property="agencyId" column="AGENCY_ID"/> <result property="gridId" column="grid_id"/>
<result property="gridPids" column="GRID_PIDS"/> <result property="sourceType" column="source_type" />
<result property="reportUserId" column="REPORT_USER_ID"/> <result property="address" column="address" />
<result property="name" column="NAME"/> <result property="name" column="name" />
<result property="mobile" column="MOBILE"/> <result property="mobile" column="mobile" />
<result property="idCard" column="ID_CARD"/> <result property="satisfaction" column="satisfaction" />
<result property="sourceType" column="SOURCE_TYPE"/> <result property="satisfactionName" column="satisfaction" />
<result property="eventContent" column="EVENT_CONTENT"/> <result property="createdTime" column="created_time" />
<result property="latitude" column="LATITUDE"/> <result property="status" column="status" />
<result property="longitude" column="LONGITUDE"/> <result property="createdUserId" column="created_by" />
<result property="address" column="ADDRESS"/> <collection property="attachmentList" ofType="com.epmet.dto.result.IcEventListResultDTO$Attachment">
<result property="status" column="STATUS"/> <result column="icEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result property="closeCaseTime" column="CLOSE_CASE_TIME"/> <result column="url" property="url"/>
<result property="operationType" column="OPERATION_TYPE"/> <result column="type" property="type"/>
<result property="operationId" column="OPERATION_ID"/> <result column="duration" property="duration"/>
<result property="readFlag" column="READ_FLAG"/> </collection>
<result property="redDot" column="RED_DOT"/>
<result property="latestOperatedTime" column="LATEST_OPERATED_TIME"/>
<result property="resolveStatus" column="RESOLVE_STATUS"/>
<result property="closeRemark" column="CLOSE_REMARK"/>
<result property="commentUserId" column="COMMENT_USER_ID"/>
<result property="commentContent" column="COMMENT_CONTENT"/>
<result property="commentTime" column="COMMENT_TIME"/>
<result property="auditStatus" column="AUDIT_STATUS"/>
<result property="auditReason" column="AUDIT_REASON"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap> </resultMap>
<select id="getProcessStatusRatio" resultType="java.util.Map"> <select id="getProcessStatusRatio" resultType="java.util.Map">
select STATUS status, count(1) eventCount select STATUS status, count(1) eventCount
@ -86,5 +71,56 @@
</where> </where>
</select> </select>
<select id="icEventList" parameterType="map" resultMap="icEventMap">
SELECT
ie.id eventId,
ie.grid_id gridId,
ie.event_content eventContent,
ie.source_type sourceType,
ie.address address,
ie.`name` name,
ie.mobile mobile,
ie.satisfaction satisfaction,
IF(ie.satisfaction = 'bad','不满意',IF (ie.satisfaction = 'good','基本满意',IF (ie.satisfaction = 'perfect','非常满意',''))) satisfactionName,
ie.created_time createdTime,
ie.`status` status,
ie.created_by createdUserId,
rea.attachment_url as img_url,
rea.id AS iceventattachmentid,
rea.attachment_url AS url,
rea.attachment_type AS type,
rea.duration AS duration
FROM
ic_event ie
LEFT JOIN ic_event_attachment rea ON(ie.id = rea.ic_event_id AND rea.del_flag = '0')
WHERE
ie.del_flag = '0'
<if test="gridId != null and gridId != '' ">
AND ie.grid_id = #{gridId}
</if>
<if test="sourceType != null and sourceType != '' ">
AND ie.source_type = #{sourceType}
</if>
<if test="eventContent != null and eventContent != '' ">
AND ie.event_content LIKE CONCAT('%', #{eventContent}, '%')
</if>
<if test="name != null and name != '' ">
AND ie.`name` LIKE CONCAT('%', #{name}, '%')
</if>
<if test="mobile != null and mobile != '' ">
AND ie.mobile = #{mobile}
</if>
<if test="startTime != null and startTime != '' ">
AND DATE_FORMAT(ie.created_time,"%Y-%m-%d %H:%i") <![CDATA[>=]]> #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
AND DATE_FORMAT(ie.created_time,"%Y-%m-%d %H:%i") <![CDATA[<=]]> #{endTime}
</if>
<if test="status != null and status != '' ">
AND ie.`status` = #{status}
</if>
order by ie.latest_operated_time desc, rea.sort asc
</select>
</mapper> </mapper>

16
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml

@ -3,22 +3,6 @@
<mapper namespace="com.epmet.dao.IcEventOperationLogDao"> <mapper namespace="com.epmet.dao.IcEventOperationLogDao">
<resultMap type="com.epmet.entity.IcEventOperationLogEntity" id="icEventOperationLogMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="icEventId" column="IC_EVENT_ID"/>
<result property="userId" column="USER_ID"/>
<result property="userIdentity" column="USER_IDENTITY"/>
<result property="actionCode" column="ACTION_CODE"/>
<result property="actionDesc" column="ACTION_DESC"/>
<result property="operateTime" column="OPERATE_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper> </mapper>

14
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml

@ -3,20 +3,6 @@
<mapper namespace="com.epmet.dao.IcEventReplyDao"> <mapper namespace="com.epmet.dao.IcEventReplyDao">
<resultMap type="com.epmet.entity.IcEventReplyEntity" id="icEventReplyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="icEventId" column="IC_EVENT_ID"/>
<result property="fromUserId" column="FROM_USER_ID"/>
<result property="content" column="CONTENT"/>
<result property="userShowName" column="USER_SHOW_NAME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper> </mapper>

15
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml

@ -3,21 +3,6 @@
<mapper namespace="com.epmet.dao.IcEventScanTaskDao"> <mapper namespace="com.epmet.dao.IcEventScanTaskDao">
<resultMap type="com.epmet.entity.IcEventScanTaskEntity" id="icEventScanTaskMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="icEventId" column="IC_EVENT_ID"/>
<result property="icEventAttachmentId" column="IC_EVENT_ATTACHMENT_ID"/>
<result property="taskId" column="TASK_ID"/>
<result property="status" column="STATUS"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper> </mapper>
Loading…
Cancel
Save