From d15abf5626eb6461d54bfd83a7e12cf8d8cb6494 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 10 May 2023 17:50:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=BA=A2=E8=89=B2=E4=BB=A3=E5=8A=9E?= =?UTF-8?q?=E3=80=91=E6=8F=90=E4=BA=A4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AgentServiceList4WorkPcResultDTO.java | 2 ++ .../ResiMyCreatedAgentServiceResultDTO.java | 2 ++ .../LingShanAgentServiceController.java | 22 ++++++++++-- .../service/LingShanAgentServiceService.java | 2 ++ .../impl/LingShanAgentServiceServiceImpl.java | 34 +++++++++++-------- 5 files changed, 46 insertions(+), 16 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceList4WorkPcResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceList4WorkPcResultDTO.java index 1ec156b2d9..00c4d6f08d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceList4WorkPcResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/AgentServiceList4WorkPcResultDTO.java @@ -27,4 +27,6 @@ public class AgentServiceList4WorkPcResultDTO { private Date processTime; private Integer satisfaction; + + private String content; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/ResiMyCreatedAgentServiceResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/ResiMyCreatedAgentServiceResultDTO.java index db90db2c38..b4db654125 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/ResiMyCreatedAgentServiceResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/agentservice/ResiMyCreatedAgentServiceResultDTO.java @@ -40,4 +40,6 @@ public class ResiMyCreatedAgentServiceResultDTO { private Integer processStatus; private String processStatusName; + + private Integer satisfaction; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java index 219cfae250..682d69c6d1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/LingShanAgentServiceController.java @@ -167,6 +167,24 @@ public class LingShanAgentServiceController { return new Result(); } + /** + * @Description: 删除 + * @param input: + * @Return com.epmet.commons.tools.utils.Result + * @Author: wangxianzhang + * @Date: 2023/5/10 5:29 PM + */ + @PostMapping("workpc/delete") + public Result workPcDelete(@RequestBody Map input) { + String id = (String) input.get("id"); + if (StringUtils.isBlank(id)) { + throw new ValidateException("ID为必填项"); + } + + lingShanServiceAgentService.workPcDelete(id); + return new Result(); + } + /** * @Description: pc工作端:服务列表 * @param orgId: @@ -194,10 +212,10 @@ public class LingShanAgentServiceController { Date processTimeStart = null, processTimeEnd = null; if (StringUtils.isNotBlank(processTimeStartStr)) { - processTimeStart = DateUtils.parse(processTimeStartStr, DateUtils.DATE_TIME_PATTERN); + processTimeStart = DateUtils.parse(processTimeStartStr, DateUtils.DATE_PATTERN); } if (StringUtils.isNotBlank(processTimeEndStr)) { - processTimeEnd = DateUtils.parse(processTimeEndStr, DateUtils.DATE_TIME_PATTERN); + processTimeEnd = DateUtils.parse(processTimeEndStr, DateUtils.DATE_PATTERN); } PageData pd = lingShanServiceAgentService.workPcServiceList(orgId, orgType, serviceCategory, content, agentName, diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java index 0a7cda1e30..22990448cf 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/LingShanAgentServiceService.java @@ -26,4 +26,6 @@ public interface LingShanAgentServiceService { PageData workPcServiceList(String orgId, String orgType, String serviceCategory, String content, String agentName, Date processTimeStart, Date processTimeEnd, Integer pageNo, Integer pageSize); + + void workPcDelete(String id); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java index 9a3beacd9e..734acf0e95 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/LingShanAgentServiceServiceImpl.java @@ -129,22 +129,20 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ // 执行状态变更校验 statusChangeCheck(service.getProcessStatus(), processType); - Date now = new Date(); - LingshanAgentServiceRecordEntity e2Update = new LingshanAgentServiceRecordEntity(); e2Update.setId(id); // 处理,处理受理状态和描述,以及处理时间 e2Update.setProcessStatus(processType); e2Update.setProcessDesc(processDesc); - e2Update.setProcessTime(now); if (LingShanAgentServiceProcessStatusEnum.ACCEPTED.getStatusCode() == processType.intValue()) { - // 如果是受理,则记录受理人 + // 如果是受理,则记录受理人和受理时间 LoginUserDetailsResultDTO loginUserDetails = epmetUserRemoteService.getLoginUserDetails(); e2Update.setAgentId(loginUserDetails.getUserId()); CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), loginUserDetails.getUserId()); if (staffInfo != null) { e2Update.setAgentName(staffInfo.getRealName()); } + e2Update.setProcessTime(new Date()); } agentServiceRecordDao.updateById(e2Update); @@ -295,16 +293,13 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ } LambdaQueryWrapper 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 l = agentServiceRecordDao.selectList(q); + 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.ge(processTimeStart != null , LingshanAgentServiceRecordEntity::getProcessTime, processTimeStart); + q.le(processTimeEnd != null , LingshanAgentServiceRecordEntity::getProcessTime, processTimeEnd); + Page pd = agentServiceRecordDao.selectPage(new Page<>(pageNo, pageSize), q); List ds = pd.getRecords().stream().map(serviceEntity -> { @@ -316,6 +311,7 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ AgentServiceList4WorkPcResultDTO d = new AgentServiceList4WorkPcResultDTO(); d.setId(serviceEntity.getId()); + d.setContent(serviceEntity.getContent()); d.setOrgNamePath(getOrgNamePath(serviceEntity.getGridId())); d.setServiceCategory(serviceEntity.getServiceCategory()); d.setServiceCategoryName(categoryName); @@ -335,6 +331,16 @@ public class LingShanAgentServiceServiceImpl implements LingShanAgentServiceServ return new PageData<>(ds, pd.getTotal()); } + @Override + public void workPcDelete(String id) { + LingshanAgentServiceRecordEntity service; + if ((service = agentServiceRecordDao.selectById(id)) == null) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "【代办服务】未找到指定的服务信息,ID:" + id); + } + + agentServiceRecordDao.deleteById(id); + } + /** * 通过gridid列表,拼接处组织名称path,例如:开发者社区-Java第一网格,开发者社区-Python第一网格 */