Browse Source

【红色代办】提交一下

master
wxz 2 years ago
parent
commit
2cf36636a9
  1. 30
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceList4WorkPcResultDTO.java
  2. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/ResiMyCreatedAgentServiceResultDTO.java
  3. 47
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java
  4. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java
  5. 89
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java
  6. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/LingshanAgentServiceRecordDao.xml
  7. 0
      epmet-user/epmet-user-server/src/main/resources/excel/lingshan/special_crowd_jiedurenyuan_import.xlsx

30
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceList4WorkPcResultDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.result.agentservice;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* @Description PC工作端-服务列表
* @Author wangxianzhang
* @Time 2023/5/10 2:58 PM
*/
@Data
public class AgentServiceList4WorkPcResultDTO {
private String id;
private String orgNamePath;
private String serviceCategory;
private String serviceCategoryName;
private String applicantName;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createdTime;
private String agentName;
private Integer processStatus;
private String processStatusDisplay;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date processTime;
private Integer satisfaction;
}

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/ResiMyCreatedAgentServiceResultDTO.java

@ -1,17 +1,19 @@
package com.epmet.dto.result.agentservice; package com.epmet.dto.result.agentservice;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@Data @Data
public class ResiMyCreatedAgentServiceResultDTO { public class ResiMyCreatedAgentServiceResultDTO {
private String id;
private String serviceCategory; private String serviceCategory;
private String serviceCategoryName; private String serviceCategoryName;
private String content; private String content;
private Date createdTime; private Date createdTime;
// 待受理 // 待受理
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date exceptServeTime; private Date exceptServeTime;
private String exceptServeAddress; private String exceptServeAddress;

47
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java

@ -5,10 +5,12 @@ 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.ValidateException; import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.DateUtils;
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.dto.form.agentservice.WorkCloseAgentServiceFormDTO; import com.epmet.dto.form.agentservice.WorkCloseAgentServiceFormDTO;
import com.epmet.dto.form.lingshan.AgentServiceResiSubmitFormDTO; import com.epmet.dto.form.lingshan.AgentServiceResiSubmitFormDTO;
import com.epmet.dto.result.agentservice.AgentServiceList4WorkPcResultDTO;
import com.epmet.dto.result.agentservice.ResiMyCreatedAgentServiceResultDTO; import com.epmet.dto.result.agentservice.ResiMyCreatedAgentServiceResultDTO;
import com.epmet.dto.result.agentservice.WorkServiceAgentResultDTO; import com.epmet.dto.result.agentservice.WorkServiceAgentResultDTO;
import com.epmet.service.LingShanAgentServiceService; import com.epmet.service.LingShanAgentServiceService;
@ -16,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -79,6 +82,13 @@ public class LingShanAgentServiceController {
return new Result(); return new Result();
} }
/**
* @Description: 居民端-评价
* @param form:
* @Return com.epmet.commons.tools.utils.Result
* @Author: wangxianzhang
* @Date: 2023/5/10 2:53 PM
*/
@PostMapping("resi/evaluate") @PostMapping("resi/evaluate")
public Result resiEvaluate(@RequestBody Map<String, Object> form) { public Result resiEvaluate(@RequestBody Map<String, Object> form) {
String id = (String) form.get("id"); String id = (String) form.get("id");
@ -157,5 +167,42 @@ public class LingShanAgentServiceController {
return new Result(); return new Result();
} }
/**
* @Description: pc工作端服务列表
* @param orgId:
* @param orgType:
* @param serviceCategory:
* @param content:
* @param agentName:
* @param processTimeStartStr:
* @param processTimeEndStr:
* @Return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.result.agentservice.AgentServiceList4WorkPcResultDTO>>
* @Author: wangxianzhang
* @Date: 2023/5/10 3:00 PM
*/
@GetMapping("workpc/serviceList")
public Result<PageData<AgentServiceList4WorkPcResultDTO>> workPcServiceList(@RequestParam(value = "orgId", required = false) String orgId,
@RequestParam(value = "orgType", required = false) String orgType,
@RequestParam(value = "serviceCategory", required = false) String serviceCategory,
@RequestParam(value = "content", required = false) String content,
@RequestParam(value = "agentName", required = false) String agentName,
@RequestParam(value = "processTimeStart", required = false) String processTimeStartStr,
@RequestParam(value = "processTimeEnd", required = false) String processTimeEndStr,
@RequestParam(value = "pageNo") Integer pageNo,
@RequestParam(value = "pageSize") Integer pageSize) {
Date processTimeStart = null, processTimeEnd = null;
if (StringUtils.isNotBlank(processTimeStartStr)) {
processTimeStart = DateUtils.parse(processTimeStartStr, DateUtils.DATE_TIME_PATTERN);
}
if (StringUtils.isNotBlank(processTimeEndStr)) {
processTimeEnd = DateUtils.parse(processTimeEndStr, DateUtils.DATE_TIME_PATTERN);
}
PageData<AgentServiceList4WorkPcResultDTO> pd = lingShanServiceAgentService.workPcServiceList(orgId, orgType, serviceCategory, content, agentName,
processTimeStart, processTimeEnd, pageNo, pageSize);
return new Result<PageData<AgentServiceList4WorkPcResultDTO>>().ok(pd);
}
} }

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java

@ -2,9 +2,11 @@ package com.epmet.service;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.form.lingshan.AgentServiceResiSubmitFormDTO; import com.epmet.dto.form.lingshan.AgentServiceResiSubmitFormDTO;
import com.epmet.dto.result.agentservice.AgentServiceList4WorkPcResultDTO;
import com.epmet.dto.result.agentservice.ResiMyCreatedAgentServiceResultDTO; import com.epmet.dto.result.agentservice.ResiMyCreatedAgentServiceResultDTO;
import com.epmet.dto.result.agentservice.WorkServiceAgentResultDTO; import com.epmet.dto.result.agentservice.WorkServiceAgentResultDTO;
import java.util.Date;
import java.util.List; import java.util.List;
public interface LingShanAgentServiceService { public interface LingShanAgentServiceService {
@ -21,4 +23,7 @@ public interface LingShanAgentServiceService {
void resiWithDraw(String id); void resiWithDraw(String id);
void resiEvaluate(String id, Integer satisfication); void resiEvaluate(String id, Integer satisfication);
PageData<AgentServiceList4WorkPcResultDTO> workPcServiceList(String orgId, String orgType, String serviceCategory, String content,
String agentName, Date processTimeStart, Date processTimeEnd, Integer pageNo, Integer pageSize);
} }

89
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java

@ -2,6 +2,7 @@ package com.epmet.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.epmet.LingShanAgentServiceProcessStatusEnum; import com.epmet.LingShanAgentServiceProcessStatusEnum;
import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -10,22 +11,27 @@ import com.epmet.commons.tools.exception.ExceptionUtils;
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.CustomerResiUserRedis; import com.epmet.commons.tools.redis.common.CustomerResiUserRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.redis.common.bean.ResiUserInfoCache; import com.epmet.commons.tools.redis.common.bean.ResiUserInfoCache;
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.PidUtils; import com.epmet.commons.tools.utils.PidUtils;
import com.epmet.constant.OrgInfoConstant;
import com.epmet.dao.LingshanAgentServiceCategoryDao; import com.epmet.dao.LingshanAgentServiceCategoryDao;
import com.epmet.dao.LingshanAgentServiceRecordDao; import com.epmet.dao.LingshanAgentServiceRecordDao;
import com.epmet.dto.form.lingshan.AgentServiceResiSubmitFormDTO; import com.epmet.dto.form.lingshan.AgentServiceResiSubmitFormDTO;
import com.epmet.dto.result.agentservice.AgentServiceList4WorkPcResultDTO;
import com.epmet.dto.result.agentservice.ResiMyCreatedAgentServiceResultDTO; import com.epmet.dto.result.agentservice.ResiMyCreatedAgentServiceResultDTO;
import com.epmet.dto.result.agentservice.WorkServiceAgentResultDTO; import com.epmet.dto.result.agentservice.WorkServiceAgentResultDTO;
import com.epmet.entity.LingshanAgentServiceCategoryEntity; import com.epmet.entity.LingshanAgentServiceCategoryEntity;
import com.epmet.entity.LingshanAgentServiceRecordEntity; import com.epmet.entity.LingshanAgentServiceRecordEntity;
import com.epmet.remote.EpmetUserRemoteService;
import com.epmet.service.LingShanAgentServiceService; import com.epmet.service.LingShanAgentServiceService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.redisson.api.RLock; import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -47,6 +53,9 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ
@Autowired @Autowired
private DistributedLock distributedLock; private DistributedLock distributedLock;
@Autowired
private EpmetUserRemoteService epmetUserRemoteService;
public static final String AGENT_SERVICE_LOCK_PREFIX = "lingshan:agentservice:statuschange:"; public static final String AGENT_SERVICE_LOCK_PREFIX = "lingshan:agentservice:statuschange:";
@ -247,4 +256,84 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ
e2update.setSatisfication(satisfication); e2update.setSatisfication(satisfication);
agentServiceRecordDao.updateById(e2update); agentServiceRecordDao.updateById(e2update);
} }
@Override
public PageData<AgentServiceList4WorkPcResultDTO> workPcServiceList(String orgId, String orgType, String serviceCategory, String content,
String agentName, Date processTimeStart, Date processTimeEnd, Integer pageNo, Integer pageSize) {
String orgIdPath;
if (StringUtils.isBlank(orgId)) {
// 没传组织id,则默认使用当前人员所属的组织
orgIdPath = epmetUserRemoteService.getLoginUserDetails().getOrgIdPath();
} else {
if (StringUtils.isBlank(orgType)) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null,
"【代办服务】缺少组织类型参数");
}
if (OrgInfoConstant.AGENCY.equals(orgType)) {
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId);
orgIdPath = PidUtils.convertPid2OrgIdPath(agencyInfo.getId(), agencyInfo.getPids());
} else if (OrgInfoConstant.GRID.equals(orgType)) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(orgId);
orgIdPath = PidUtils.convertPid2OrgIdPath(gridInfo.getId(), gridInfo.getPids());
} else {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null,
"【代办服务】未知的组织类型");
}
}
LambdaQueryWrapper<LingshanAgentServiceRecordEntity> q = new LambdaQueryWrapper<>();
// q.likeRight(LingshanAgentServiceRecordEntity::getOrgIdPath, orgIdPath);
// q.eq(StringUtils.isNotBlank(serviceCategory), LingshanAgentServiceRecordEntity::getServiceCategory, serviceCategory);
// q.like(StringUtils.isNotBlank(content), LingshanAgentServiceRecordEntity::getContent, content);
// q.like(StringUtils.isNotBlank(agentName), LingshanAgentServiceRecordEntity::getAgentName, agentName);
// q.like(StringUtils.isNotBlank(agentName), LingshanAgentServiceRecordEntity::getAgentName, agentName);
// q.ge(processTimeStart != null , LingshanAgentServiceRecordEntity::getProcessTime, processTimeStart);
// q.le(processTimeStart != null , LingshanAgentServiceRecordEntity::getProcessTime, processTimeEnd);
// PageHelper.startPage(pageNo, pageSize);
List<LingshanAgentServiceRecordEntity> l = agentServiceRecordDao.selectList(q);
Page<LingshanAgentServiceRecordEntity> pd = agentServiceRecordDao.selectPage(new Page<>(pageNo, pageSize), q);
List<AgentServiceList4WorkPcResultDTO> ds = pd.getRecords().stream().map(serviceEntity -> {
String categoryName = null;
LingshanAgentServiceCategoryEntity categoryEntity = agentServiceCategoryDao.selectById(serviceEntity.getServiceCategory());
if (categoryEntity != null) {
categoryName = categoryEntity.getCategoryName();
}
AgentServiceList4WorkPcResultDTO d = new AgentServiceList4WorkPcResultDTO();
d.setId(serviceEntity.getId());
d.setOrgNamePath(getOrgNamePath(serviceEntity.getGridId()));
d.setServiceCategory(serviceEntity.getServiceCategory());
d.setServiceCategoryName(categoryName);
d.setApplicantName(serviceEntity.getApplicantName());
d.setCreatedTime(serviceEntity.getCreatedTime());
d.setAgentName(serviceEntity.getAgentName());
d.setProcessStatus(serviceEntity.getProcessStatus());
d.setProcessStatusDisplay(LingShanAgentServiceProcessStatusEnum.getByStatus(serviceEntity.getProcessStatus()).getStatusName());
if (!(LingShanAgentServiceProcessStatusEnum.REJECTED.getStatusCode() == serviceEntity.getProcessStatus().intValue())) {
// 驳回的话,不显示处理时间;受理、办结状态显示;待受理还没有处理时间
d.setProcessTime(serviceEntity.getProcessTime());
}
d.setSatisfaction(serviceEntity.getSatisfication());
return d;
}).collect(Collectors.toList());
return new PageData<>(ds, pd.getTotal());
}
/**
* 通过gridid列表拼接处组织名称path例如开发者社区-Java第一网格开发者社区-Python第一网格
*/
private String getOrgNamePath(String gridId) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(gridId);
if (gridInfo == null) {
return null;
}
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(gridInfo.getPid());
String agencyName = agencyInfo.getOrganizationName();
return agencyName.concat("-").concat(gridInfo.getGridName());
}
} }

5
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/LingshanAgentServiceRecordDao.xml

@ -13,16 +13,17 @@
<result property="gridId" column="GRID_ID"/> <result property="gridId" column="GRID_ID"/>
<result property="orgIdPath" column="ORG_ID_PATH"/> <result property="orgIdPath" column="ORG_ID_PATH"/>
<result property="serviceCategory" column="SERVICE_CATEGORY"/> <result property="serviceCategory" column="SERVICE_CATEGORY"/>
<result property="attachments" column="ATTACHMENTS"/>
<result property="exceptServeTime" column="EXCEPT_SERVE_TIME"/> <result property="exceptServeTime" column="EXCEPT_SERVE_TIME"/>
<result property="exceptServeAddress" column="EXCEPT_SERVE_ADDRESS"/> <result property="exceptServeAddress" column="EXCEPT_SERVE_ADDRESS"/>
<result property="attachments" column="ATTACHMENTS"/>
<result property="processTime" column="PROCESS_TIME"/> <result property="processTime" column="PROCESS_TIME"/>
<result property="processDesc" column="PROCESS_DESC"/> <result property="processDesc" column="PROCESS_DESC"/>
<result property="processStatus" column="PROCESS_STATUS"/>
<result property="processAttachments" column="PROCESS_ATTACHMENTS"/>
<result property="closeDesc" column="CLOSE_DESC"/> <result property="closeDesc" column="CLOSE_DESC"/>
<result property="closeTime" column="CLOSE_TIME"/> <result property="closeTime" column="CLOSE_TIME"/>
<result property="contactName" column="CONTACT_NAME"/> <result property="contactName" column="CONTACT_NAME"/>
<result property="contactMobile" column="CONTACT_MOBILE"/> <result property="contactMobile" column="CONTACT_MOBILE"/>
<result property="processStatus" column="PROCESS_STATUS"/>
<result property="content" column="CONTENT"/> <result property="content" column="CONTENT"/>
<result property="satisfication" column="SATISFICATION"/> <result property="satisfication" column="SATISFICATION"/>
<result property="revision" column="REVISION"/> <result property="revision" column="REVISION"/>

0
epmet-user/epmet-user-server/src/main/resources/excel/lingshan/special_crowd_xidurenyuan_import.xlsx → epmet-user/epmet-user-server/src/main/resources/excel/lingshan/special_crowd_jiedurenyuan_import.xlsx

Loading…
Cancel
Save