Browse Source

Merge branch 'dev_zhili' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_zhili

 Conflicts:
	epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java
	epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java
	epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
master
wangxianzhang 3 years ago
parent
commit
a635d3d7fb
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  2. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java
  3. 33
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java
  4. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java
  5. 23
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java
  6. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java
  7. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java
  8. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  9. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  10. 43
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java
  11. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  12. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java
  13. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
  14. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  15. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  16. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java
  17. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  18. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  19. 70
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  20. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  21. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  22. 62
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml
  23. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  24. 16
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  25. 5
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java
  26. 23
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java
  27. 112
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java
  28. 107
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java
  29. 17
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java
  30. 23
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java
  31. 95
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java
  32. 1
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java
  33. 35
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java
  34. 14
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java
  35. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  36. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java
  37. 13
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java
  38. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java
  39. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java
  40. 23
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java
  41. 3
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java
  42. 25
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  43. 282
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  44. 31
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  45. 19
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml
  46. 14
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml
  47. 106
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml
  48. 16
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml
  49. 14
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml
  50. 15
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml
  51. 12
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.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),
ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14),
SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15),
IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19),
;
private final String code;

8
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java

@ -17,6 +17,7 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -42,6 +43,7 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable {
/**
* 客户ID
*/
@JsonIgnore
private String customerId;
/**
@ -62,31 +64,37 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable {
/**
*
*/
@JsonIgnore
private Integer delFlag;
/**
* 乐观锁
*/
@JsonIgnore
private String revision;
/**
* 创建人
*/
@JsonIgnore
private String createdBy;
/**
* 创建时间
*/
@JsonIgnore
private Date createdTime;
/**
* 更新人
*/
@JsonIgnore
private String updatedBy;
/**
* 更新时间
*/
@JsonIgnore
private Date updatedTime;
}

33
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class CategorySelfOrgFormDTO extends PageFormDTO implements Serializable {
/**
* 默认展示全部此列可空
*/
private String categoryCode;
/**
* token中获取
*/
@NotBlank(message = "customerId不能为空",groups = PageFormDTO.AddUserInternalGroup.class)
private String customerId;
/**
* token中获取
*/
@NotBlank(message = "staffId不能为空",groups = PageFormDTO.AddUserInternalGroup.class)
private String staffId;
/**
* 当前登录用户所属组织id
*/
private String agencyId;
}

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java

@ -48,4 +48,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable {
private Integer ranking;
private String remark;
private String categoryCode;
}

23
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class ServiceListFormDTO extends PageFormDTO implements Serializable {
@NotBlank(message = "type不能为空:志愿者:volunteer;社区自组织:community_org", groups = PageFormDTO.AddUserInternalGroup.class)
private String type;
/**
* 服务方id ,
* 可能是来源于多元主题分析里的社区自组织也可能是来源于志愿者
*/
@NotBlank(message = "serverId不能为空", groups = PageFormDTO.AddUserInternalGroup.class)
private String serverId;
private String customerId;
}

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java

@ -24,4 +24,9 @@ public class PartyUnitListResultDTO implements Serializable {
* 协办单位名字
*/
private String assistanceUnitName;
/**
* 协办单位类型1社区自组织2联建单位
*/
private String assistanceUnitType;
}

20
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 多元主体分析-社区自组织饼图
*/
@Data
public class SelfOrgCategoryTotalResDTO implements Serializable {
private String categoryCode;
private String categoryName;
/**
* 当前分类下的社区自组织数量
*/
private Integer total;
}

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

43
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java

@ -34,8 +34,10 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.SelfOrgCategoryTotalResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.ExportCommunitySelfOrganizationExcel;
import com.epmet.excel.IcCommunitySelfOrganizationExcel;
@ -281,4 +283,45 @@ public class IcCommunitySelfOrganizationController {
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionDTO>>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO));
}
/**
* 多元主体分析-各分类下的社区自组织数量饼图
*
* @param tokenDto
* @return
*/
@PostMapping("/total-pie")
public Result<List<SelfOrgCategoryTotalResDTO>> totalPie(@LoginUser TokenDto tokenDto) {
return new Result<List<SelfOrgCategoryTotalResDTO>>().ok(icCommunitySelfOrganizationService.querySelfOrgCategoryTotal(tokenDto.getCustomerId(), tokenDto.getUserId()));
}
/**
* 多元主体分析-分类下的社区自组织列表
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("/category-list")
public Result<PageData<CommunitySelfOrganizationListDTO>> queryCategoryList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setIsPage(true);
return new Result<PageData<CommunitySelfOrganizationListDTO>>().ok(icCommunitySelfOrganizationService.queryCategoryList(formDTO));
}
/**
* 003多元主题分析-地图详情信息已包含
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("/coordinate-list")
public Result<PageData<CommunitySelfOrganizationListDTO>> queryCoordinateList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setIsPage(false);
return new Result<PageData<CommunitySelfOrganizationListDTO>>().ok(icCommunitySelfOrganizationService.queryCoordinateList(formDTO));
}
}

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -264,4 +264,16 @@ public class IcPartyUnitController {
public Result<List<PartyUnitListResultDTO>> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){
return new Result<List<PartyUnitListResultDTO>>().ok(icPartyUnitService.getPartyUnitList(formDTO));
}
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
@PostMapping("assistanceUnitList")
public Result<List<PartyUnitListResultDTO>> getAssistanceUnitList(@LoginUser TokenDto tokenDto){
return new Result<List<PartyUnitListResultDTO>>().ok(icPartyUnitService.getAssistanceUnitList(tokenDto));
}
}

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

@ -10,12 +10,15 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.page.PageData;
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.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.*;
@ -267,4 +270,29 @@ public class ResiDemandController {
demandSatisfactionService.evaluateDemandAuto(formDTO);
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));
}
/**
* 根据服务方id查询服务过的需求列表
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("service-list")
public Result<PageData<DemandRecResultDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<PageData<DemandRecResultDTO>>().ok(icUserDemandRecService.queryServiceList(formDTO));
}
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java

@ -19,8 +19,10 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.CategorySelfOrgFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.SelfOrgCategoryTotalResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import org.apache.ibatis.annotations.Mapper;
@ -65,4 +67,10 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao<IcCommunitySelfO
*/
List<String> selectOrgByOrgName(@Param("names")List<String> names, @Param("customerId") String customerId);
List<IcCommunitySelfOrganizationDTO> selectOrgByCustomerId(@Param("customerId") String customerId);
List<SelfOrgCategoryTotalResDTO> selectCountGroupByCategory(@Param("customerId") String customerId,@Param("agencyId") String agencyId);
List<CommunitySelfOrganizationListDTO> queryCategoryList(CategorySelfOrgFormDTO formDTO);
List<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO);
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java

@ -84,4 +84,12 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
* @date 2022/5/17 18:51
*/
List<PartyUnitListResultDTO> getCommunitySelfList(@Param("ids") List<String> ids);
/**
* Desc: 协办单位列表
* @param agencyId
* @author zxc
* @date 2022/5/18 13:48
*/
List<PartyUnitListResultDTO> getAssistanceUnitList(@Param("agencyId")String agencyId);
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java

@ -140,4 +140,6 @@ public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
* @Date 2022/1/21 15:53
*/
List<ServicePointDTO> getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType);
List<DemandRecResultDTO> queryServiceList(ServiceListFormDTO formDTO);
}

29
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java

@ -21,12 +21,11 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.SelfOrgCategoryTotalResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
@ -160,4 +159,26 @@ public interface IcCommunitySelfOrganizationService extends BaseService<IcCommun
void importCommunitySelfOrganization(TokenDto tokenDto, HttpServletResponse response, InputStream inputStream, String taskId) throws IOException;
List<IcCommunitySelfOrganizationEntity> queryListById(List<String> communityOrgIds);
/**
* 多元主体分析-各分类下的社区自组织数量饼图
* @param customerId
* @param userId
* @return
*/
List<SelfOrgCategoryTotalResDTO> querySelfOrgCategoryTotal(String customerId, String userId);
/**
* 多元主体分析-分类下的社区自组织列表
* @param formDTO
* @return
*/
PageData<CommunitySelfOrganizationListDTO> queryCategoryList(CategorySelfOrgFormDTO formDTO);
/**
* 多元主体分析-地图坐标及详情
* @param formDTO
* @return
*/
PageData<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO);
}

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -152,4 +152,13 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
* @date 2022/5/17 17:53
*/
List<PartyUnitListResultDTO> getPartyUnitList(PartyUnitListFormDTO formDTO);
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
List<PartyUnitListResultDTO> getAssistanceUnitList(TokenDto tokenDto);
}

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -247,4 +247,11 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
* @Date 2022/1/21 16:02
*/
Map<String, Integer> getServicePoint(String customerId, String serviceType);
/**
* 根据服务方id查询服务过的需求列表
* @param formDTO
* @return
*/
PageData<DemandRecResultDTO> queryServiceList(ServiceListFormDTO formDTO);
}

70
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

@ -35,10 +35,7 @@ import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.ServicePointDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity;
@ -709,4 +706,69 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
return Collections.EMPTY_LIST;
}
/**
* 多元主体分析-各分类下的社区自组织数量饼图
*
* @param customerId
* @param staffId
* @return
*/
@Override
public List<SelfOrgCategoryTotalResDTO> querySelfOrgCategoryTotal(String customerId, String staffId) {
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode());
if (!dictMapRes.success() || MapUtils.isEmpty(dictMapRes.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区自组织分类查询异常");
}
CustomerStaffInfoCacheResult staffInfo=getStaffInfo(customerId,staffId);
List<SelfOrgCategoryTotalResDTO> list = baseDao.selectCountGroupByCategory(customerId, staffInfo.getAgencyId());
Map<String, Integer> map = list.stream().collect(Collectors.toMap(SelfOrgCategoryTotalResDTO::getCategoryCode, SelfOrgCategoryTotalResDTO::getTotal, (key1, key2) -> key2));
List<SelfOrgCategoryTotalResDTO> resultList = new ArrayList<>();
for (String key : dictMapRes.getData().keySet()) {
SelfOrgCategoryTotalResDTO resDTO = new SelfOrgCategoryTotalResDTO();
resDTO.setCategoryCode(key);
resDTO.setCategoryName(dictMapRes.getData().get(key));
resDTO.setTotal(map.containsKey(key) ? map.get(key) : NumConstant.ZERO);
resultList.add(resDTO);
}
return resultList;
}
private CustomerStaffInfoCacheResult getStaffInfo(String customerId, String staffId) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId);
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前工作人员信息异常");
}
return staffInfo;
}
/**
* 多元主体分析-分类下的社区自组织列表
*
* @param formDTO
* @return
*/
@Override
public PageData<CommunitySelfOrganizationListDTO> queryCategoryList(CategorySelfOrgFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId());
formDTO.setAgencyId(staffInfo.getAgencyId());
PageInfo<CommunitySelfOrganizationListDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCategoryList(formDTO));
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
/**
* 多元主体分析-地图坐标及详情
*
* @param formDTO
* @return
*/
@Override
public PageData<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId());
formDTO.setAgencyId(staffInfo.getAgencyId());
PageInfo<CommunitySelfOrganizationListDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO));
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
}

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -614,6 +614,21 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
return result;
}
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
@Override
public List<PartyUnitListResultDTO> getAssistanceUnitList(TokenDto tokenDto) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo){
throw new EpmetException("未查询到此工作人员信息"+tokenDto.getUserId());
}
return baseDao.getAssistanceUnitList(staffInfo.getAgencyId());
}
private String getServiceMatter(Map<String, String> map, String matter) {
List<String> matters = Arrays.asList(matter.split(StrConstant.COLON));
List<String> list = matters.stream().map(map::get).collect(Collectors.toList());

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -1704,5 +1704,20 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
}
return list.stream().collect(Collectors.toMap(ServicePointDTO::getServerId, ServicePointDTO::getPoint));
}
/**
* 根据服务方id查询服务过的需求列表
*
* @param formDTO
* @return
*/
@Override
public PageData<DemandRecResultDTO> queryServiceList(ServiceListFormDTO formDTO) {
PageInfo<DemandRecResultDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryServiceList(formDTO));
return new PageData<>(pageInfo.getList(),pageInfo.getTotal());
}
}

62
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml

@ -38,7 +38,10 @@
<select id="selectPerson" resultType="com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO">
select
person_name AS personName,
person_phone as personPhone
person_phone as personPhone,
ID,
CUSTOMER_ID,
ORG_ID
from ic_community_self_organization_personnel
where org_id = #{orgId}
and del_flag = 0
@ -117,4 +120,61 @@
AND customer_id = #{customerId}
</select>
<select id="selectCountGroupByCategory" parameterType="map" resultType="com.epmet.dto.result.SelfOrgCategoryTotalResDTO">
SELECT
i.CATEGORY_CODE AS categoryCode,
count( i.ID ) AS total
FROM
ic_community_self_organization i
WHERE
i.DEL_FLAG = '0'
AND I.CATEGORY_CODE IS NOT NULL
AND I.CATEGORY_CODE !=''
AND i.CUSTOMER_ID = #{customerId}
AND ( i.ORG_ID = #{agencyId} OR i.PIDS LIKE concat('%',#{agencyId},'%') )
GROUP BY
i.CATEGORY_CODE
</select>
<select id="queryCategoryList" parameterType="com.epmet.dto.form.CategorySelfOrgFormDTO" resultType="com.epmet.dto.result.CommunitySelfOrganizationListDTO">
SELECT
so.ORGANIZATION_NAME AS organizationName,
so.CATEGORY_CODE AS categoryCode,
so.ID as orgId
FROM ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.CATEGORY_CODE IS NOT NULL
AND so.CATEGORY_CODE !=''
AND (so.ORG_ID = #{agencyId} or so.PIDS LIKE concat('%',#{agencyId},'%'))
AND so.CUSTOMER_ID = #{customerId}
<if test="null != categoryCode and categoryCode != '' ">
AND so.CATEGORY_CODE =#{categoryCode}
</if>
ORDER BY so.ORG_ID ASC,so.ORGANIZATION_CREATED_TIME DESC
</select>
<select id="queryCoordinateList" resultMap="selectCommunitySelfOrganizationListMap" parameterType="com.epmet.dto.form.CommunitySelfOrganizationListFormDTO">
SELECT
so.ORGANIZATION_NAME AS organizationName,
so.CATEGORY_CODE AS categoryCode,
so.ORGANIZATION_PERSON_COUNT AS organizationPersonCount,
IFNULL(DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y-%m-%d'),DATE_FORMAT(so.CREATED_TIME,'%Y-%m-%d')) AS organizationCreatedTime,
so.PRINCIPAL_NAME AS principalName,
so.PRINCIPAL_PHONE AS principalPhone,
so.SERVICE_ITEM AS serviceItem,
so.LONGITUDE AS longitude,
so.LATITUDE AS latitude,
so.ID as orgId,
so.remark
FROM ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.CATEGORY_CODE IS NOT NULL
AND so.CATEGORY_CODE !=''
AND (so.ORG_ID = #{agencyId} or so.PIDS LIKE concat('%',#{agencyId},'%'))
AND so.CUSTOMER_ID = #{customerId}
<if test="null != categoryCode and categoryCode != '' ">
AND so.CATEGORY_CODE =#{categoryCode}
</if>
ORDER BY so.ORG_ID ASC,so.ORGANIZATION_CREATED_TIME DESC
</select>
</mapper>

23
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

@ -102,6 +102,29 @@
)
</select>
<!-- 协办单位列表 -->
<select id="getAssistanceUnitList" resultType="com.epmet.dto.result.PartyUnitListResultDTO">
SELECT t.* FROM (
SELECT
ID AS assistanceUnitId,
UNIT_NAME AS assistanceUnitName,
'2' AS assistanceUnitType,
CREATED_TIME
FROM ic_party_unit
WHERE DEL_FLAG = '0'
AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
UNION ALL
SELECT
ID AS assistanceUnitId,
ORGANIZATION_NAME AS assistanceUnitName,
'1' AS assistanceUnitType,
CREATED_TIME
FROM ic_community_self_organization
WHERE DEL_FLAG = '0'
AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
) t ORDER BY CREATED_TIME desc
</select>
<update id="updateSatisfaction" parameterType="map">
update ic_party_unit
set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW()

16
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -641,4 +641,20 @@
GROUP BY
b.SERVER_ID
</select>
<select id="queryServiceList" parameterType="com.epmet.dto.form.ServiceListFormDTO" resultType="com.epmet.dto.result.demand.DemandRecResultDTO">
SELECT
r.ID as demandRecId,
r.CONTENT,
r.REPORT_TIME as reportTime
FROM
ic_user_demand_rec r
INNER JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID )
WHERE
r.CUSTOMER_ID = #{customerId}
AND r.STATUS = 'finished'
and s.SERVER_ID=#{serverId}
order by r.REPORT_TIME desc
</select>
</mapper>

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 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
2reply
3立项shift_project
4转需求shift_demand
5办结close_case;
* 2reply
* 3立项shift_project
* 4转需求shift_demand
* 5办结close_case;
*/
private String actionCode;
/**
* 1发布事件publish
2撤回事件recall
3reply
4立项shift_project
5办结close_case;
6选择是否已解决choose_resolve;
7首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
* 2撤回事件recall
* 3reply
* 4立项shift_project
* 5转需求: shift_demand
* 6办结close_case;
* 7选择是否已解决choose_resolve;
* 8首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
*/
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;
/**
* 网格ID
* 所属网格
*/
private String gridId;
/**
* 所属小区ID
* 上报渠道
*/
private String sourceType;
/**
* 所属楼宇Id
* 事件内容
*/
private String eventContent;
/**
* 单元id
* 报事人
*/
private String name;
/**
* 所属家庭Id
* 手机号
*/
private String mobile;
/**
* 起始迁入时间
* 起始上报时间yyyy-MM-dd HH:mm:ss
*/
private String startTime;
/**
* 终止迁入时间
* 终止上报时间yyyy-MM-dd HH:mm:ss
*/
private String endTime;
/**
* 手机号
* 状态处理中processing已办结closed_case
*/
private String status;
/**
* 页码
*/

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

@ -0,0 +1,23 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/5/18 09:57
* @DESC
*/
@Data
public class SatisfactionEvaluationListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 1790517675681175478L;
public interface SatisfactionEvaluationListForm{}
@NotBlank(message = "projectId不能为空",groups = SatisfactionEvaluationListForm.class)
private String projectId;
}

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

1
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java

@ -69,7 +69,6 @@ public class ProjectManageListResultDTO implements Serializable {
@JsonIgnore
private Date updatedTime;
@JsonIgnore
private String isHandle;
public ProjectManageListResultDTO() {

35
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java

@ -0,0 +1,35 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/5/18 09:58
* @DESC
*/
@Data
public class SatisfactionEvaluationListResultDTO implements Serializable {
private static final long serialVersionUID = 4086193179665858119L;
/**
* 评价人
*/
private String evaluationUser;
@JsonIgnore
private String userId;
/**
* 评价时间
*/
private String time;
/**
* 评价内容
*/
private String content;
}

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

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

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

@ -351,4 +351,16 @@ public class ProjectController {
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<PageData>().ok(projectService.projectList(formDTO));
}
/**
* Desc: 满意度评价列表
* @param formDTO
* @author zxc
* @date 2022/5/18 10:03
*/
@PostMapping("satisfaction-evaluation-list")
public Result<PageData> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class);
return new Result<PageData>().ok(projectService.satisfactionEvaluationList(formDTO));
}
}

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

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

13
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java

@ -20,10 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.ProjectEvaluationListFormDTO;
import com.epmet.dto.form.ProjectInitEvaluationFormDTO;
import com.epmet.dto.result.EvaluationListResultDTO;
import com.epmet.dto.result.ProjectEvaluateDetailResultDTO;
import com.epmet.dto.result.ProjectEvaluateInfoResultDTO;
import com.epmet.dto.result.ProjectEvaluationListResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.ProjectSatisfactionDetailEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -69,4 +66,12 @@ public interface ProjectSatisfactionDetailDao extends BaseDao<ProjectSatisfactio
*/
List<ProjectEvaluateDetailResultDTO> selectProjectEvaluateDetail(@Param("projectIds")List<String> projectIds);
/**
* Desc: 满意度评价列表
* @param projectId
* @author zxc
* @date 2022/5/18 10:03
*/
List<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(@Param("projectId")String projectId);
}

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
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
*/
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 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
2reply
3立项shift_project
4转需求shift_demand
5办结close_case;
* 2reply
* 3立项shift_project
* 4转需求shift_demand
* 5办结close_case;
*/
private String actionCode;
/**
* 1发布事件publish
2撤回事件recall
3reply
4立项shift_project
5办结close_case;
6选择是否已解决choose_resolve;
7首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
* 2撤回事件recall
* 3reply
* 4立项shift_project
* 5转需求: shift_demand
* 6办结close_case;
* 7选择是否已解决choose_resolve;
* 8首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
*/
private String actionDesc;

3
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.tools.page.PageData;
import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.IcEventAddEditFormDTO;
import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.result.IcEventListResultDTO;
import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO;
@ -50,7 +51,7 @@ public interface IcEventService extends BaseService<IcEventEntity> {
* @author generator
* @date 2022-05-17
*/
void save(IcEventDTO dto);
void save(IcEventAddEditFormDTO dto);
/**
* 默认更新

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

@ -1,20 +1,3 @@
/**
* 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;
@ -393,4 +376,12 @@ public interface ProjectService extends BaseService<ProjectEntity> {
*/
PageData projectList(ProjectManageListFormDTO formDTO);
/**
* Desc: 满意度评价列表
* @param formDTO
* @author zxc
* @date 2022/5/18 10:03
*/
PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO);
}

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

@ -4,37 +4,55 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
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.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
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.page.PageData;
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.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.DateUtils;
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.dto.CustomerAgencyDTO;
import com.epmet.dto.IcEventDTO;
import com.epmet.dto.form.AgencyInfoFormDTO;
import com.epmet.dto.form.IcEventListFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.result.*;
import com.epmet.entity.IcEventEntity;
import com.epmet.entity.*;
import com.epmet.enums.EcEventProcessStatusEnum;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.feign.GovIssueOpenFeignClient;
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.PageInfo;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
@ -46,23 +64,75 @@ import java.util.stream.Collectors;
@Service
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
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
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
public PageData<IcEventListResultDTO> list(IcEventListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<IcEventListResultDTO> list = null;
List<IcEventListResultDTO> list = baseDao.icEventList(formDTO);
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());
}
private QueryWrapper<IcEventEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<IcEventEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcEventEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -78,9 +148,193 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcEventDTO dto) {
IcEventEntity entity = ConvertUtils.sourceToTarget(dto, IcEventEntity.class);
public void save(IcEventAddEditFormDTO formDTO) {
//获取当前工作人员缓存信息
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);
//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
@ -99,6 +353,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
/**
* 查询时间的grid_pids
*
* @param agencyId
* @return
*/
@ -141,7 +396,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO();
BigDecimal processingCount = new BigDecimal(0);
BigDecimal closedCount = new BigDecimal(0);;
BigDecimal closedCount = new BigDecimal(0);
;
BigDecimal processingRatio = null;
BigDecimal closedRatio = null;
@ -187,7 +443,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
PageHelper.startPage(pageNo, pageSize);
List<IcEventResultDTO> list = baseDao.listProcessAnalysisEvents(
EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime
,queryEndTime);
, queryEndTime);
// 3.补充数据
for (IcEventResultDTO event : list) {

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

@ -42,6 +42,7 @@ import com.epmet.commons.tools.utils.*;
import com.epmet.constant.*;
import com.epmet.dao.ProjectDao;
import com.epmet.dao.ProjectOrgRelationDao;
import com.epmet.dao.ProjectSatisfactionDetailDao;
import com.epmet.dao.ProjectSatisfactionStatisticsDao;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
@ -96,8 +97,7 @@ import java.util.stream.Collectors;
@Slf4j
public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntity> implements ProjectService {
private Logger logger = LogManager.getLogger(ProjectServiceImpl.class);
@Autowired
private ProjectRedis projectRedis;
@Autowired
private CustomerProjectParameterService parameterService;
@Autowired
@ -150,6 +150,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
private LoginUserUtil loginUserUtil;
@Autowired
private BlockChainUploadService blockChainUploadService;
@Autowired
private ProjectSatisfactionDetailDao satisfactionDetailDao;
private final static String ONE_DAY = "<1";
@ -3230,7 +3232,30 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return result;
}
/**
/**
* Desc: 满意度评价列表
* @param formDTO
* @author zxc
* @date 2022/5/18 10:03
*/
@Override
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()));
List<SatisfactionEvaluationListResultDTO> result = pageInfo.getList();
if (CollectionUtils.isNotEmpty(result)){
Result<List<UserBaseInfoResultDTO>> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList()));
if (!listResult.success()){
throw new EpmetException("查询user信息失败...");
}
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 data;
}
/**
* @Description 区间项目分类数量处理
* 查询的是时间段内的分类项目数查询的时间 是传入一个日期拼上时间在进行比较大小
* @param categories

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

@ -3,25 +3,6 @@
<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>

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

@ -3,20 +3,6 @@
<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>

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

@ -3,41 +3,26 @@
<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"/>
<result property="gridId" column="GRID_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridPids" column="GRID_PIDS"/>
<result property="reportUserId" column="REPORT_USER_ID"/>
<result property="name" column="NAME"/>
<result property="mobile" column="MOBILE"/>
<result property="idCard" column="ID_CARD"/>
<result property="sourceType" column="SOURCE_TYPE"/>
<result property="eventContent" column="EVENT_CONTENT"/>
<result property="latitude" column="LATITUDE"/>
<result property="longitude" column="LONGITUDE"/>
<result property="address" column="ADDRESS"/>
<result property="status" column="STATUS"/>
<result property="closeCaseTime" column="CLOSE_CASE_TIME"/>
<result property="operationType" column="OPERATION_TYPE"/>
<result property="operationId" column="OPERATION_ID"/>
<result property="readFlag" column="READ_FLAG"/>
<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 id="icEventMap" type="com.epmet.dto.result.IcEventListResultDTO">
<id property="eventId" column="id"/>
<result property="gridId" column="grid_id"/>
<result property="sourceType" column="source_type" />
<result property="address" column="address" />
<result property="name" column="name" />
<result property="mobile" column="mobile" />
<result property="satisfaction" column="satisfaction" />
<result property="satisfactionName" column="satisfaction" />
<result property="createdTime" column="created_time" />
<result property="status" column="status" />
<result property="createdUserId" column="created_by" />
<collection property="attachmentList" ofType="com.epmet.dto.result.IcEventListResultDTO$Attachment">
<result column="icEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result column="url" property="url"/>
<result column="type" property="type"/>
<result column="duration" property="duration"/>
</collection>
</resultMap>
<select id="getProcessStatusRatio" resultType="java.util.Map">
select STATUS status, count(1) eventCount
@ -105,5 +90,56 @@
</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>

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

@ -3,22 +3,6 @@
<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>

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

@ -3,20 +3,6 @@
<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>

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

@ -3,21 +3,6 @@
<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>

12
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml

@ -75,4 +75,16 @@
)
</select>
<!-- 满意度评价列表 -->
<select id="satisfactionEvaluationList" resultType="com.epmet.dto.result.SatisfactionEvaluationListResultDTO">
SELECT
created_by AS userId,
`COMMENT` AS content,
CREATED_TIME AS time
FROM project_satisfaction_detail
WHERE DEL_FLAG = '0'
AND PROJECT_ID = #{projectId}
ORDER BY CREATED_TIME DESC
</select>
</mapper>
Loading…
Cancel
Save