From fc12805d240c384191a5e683071c037ab7b05670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 13 Nov 2024 17:32:00 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectionMallPartnersController.java | 6 +-- .../ShopInspectionGoodsController.java | 2 +- .../impl/AppInspectionPartnerServiceImpl.java | 2 +- .../impl/ShopInspectionGoodsServiceImpl.java | 12 +++--- .../impl/PartnerCustomerInfoServiceImpl.java | 26 ------------ .../impl/RescueDriverInfoServiceImpl.java | 41 ++++++++++--------- 6 files changed, 34 insertions(+), 55 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java index 4d5d3018..bb16d0e2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java @@ -117,7 +117,7 @@ public class InspectionMallPartnersController extends BaseController { ShopMallPartners partner = new ShopMallPartners(); if (roles.contains("jcshop")){ LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); partner = shopMallPartnersService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return error(); @@ -150,7 +150,7 @@ public class InspectionMallPartnersController extends BaseController { ShopMallPartners partner = new ShopMallPartners(); if (roles.contains("jcshop")){ LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); partner = shopMallPartnersService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return error(); @@ -270,7 +270,7 @@ public class InspectionMallPartnersController extends BaseController { ShopMallPartners partner = new ShopMallPartners(); if (roles.contains("jcshop")){ LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); partner = shopMallPartnersService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return CommonResult.error(-1,"信息有误"); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java index ce67a2df..35071c7f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java @@ -186,7 +186,7 @@ public class ShopInspectionGoodsController extends BaseController ShopMallPartners partner = new ShopMallPartners(); if (roles.contains("jcshop")){ LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); partner = appInspectionPartnerService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return error(); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 69287197..0db942eb 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -174,7 +174,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); partner = this.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ throw new Exception("信息有误"); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java index d12aeda4..4325ebba 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java @@ -246,11 +246,13 @@ public class ShopInspectionGoodsServiceImpl extends ServiceImpl categoryList() throws Exception { ShopMallPartners one = appInspectionPartnerService.shopInfoByUserId(); List shopInspectionCategories = appInspectionPartnerService.categoryList(one.getPartnerId()); - for (ShopInspectionCategory shopInspectionCategory : shopInspectionCategories) { - LambdaQueryWrapper templateLambdaQueryWrapper =new LambdaQueryWrapper<>(); - templateLambdaQueryWrapper.eq(InspectionCategoryTemplate::getCategoryId,shopInspectionCategory.getId()).orderByAsc(InspectionCategoryTemplate::getSkuPrice); - List list = categoryTemplateService.list(templateLambdaQueryWrapper); - shopInspectionCategory.setTemplates(list); + if (CollectionUtil.isNotEmpty(shopInspectionCategories)) { + for (ShopInspectionCategory shopInspectionCategory : shopInspectionCategories) { + LambdaQueryWrapper templateLambdaQueryWrapper = new LambdaQueryWrapper<>(); + templateLambdaQueryWrapper.eq(InspectionCategoryTemplate::getCategoryId, shopInspectionCategory.getId()).orderByAsc(InspectionCategoryTemplate::getSkuPrice); + List list = categoryTemplateService.list(templateLambdaQueryWrapper); + shopInspectionCategory.setTemplates(list); + } } return shopInspectionCategories; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java index 1dfda244..4948842b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java @@ -65,12 +65,6 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl Date: Thu, 14 Nov 2024 10:08:11 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/service/impl/InspectionInfoServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index f8c760a0..c2b35d86 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -248,7 +248,9 @@ public class InspectionInfoServiceImpl extends ServiceImpl listByUserId = roleService.getListByUserId(roleId); List ids = listByUserId.stream().map(UserDTO::getId).collect(Collectors.toList()); - ids.add(inspectionInfo.getLeadManId()); + if (ObjectUtil.isNull(inspectionInfo.getLeadManId())) { + ids.add(inspectionInfo.getLeadManId()); + } // 获取当前共单引车员的id if (CollUtil.isNotEmpty(ids)) { for (Long id : ids) { From 5179cbb0137718cd60a39338833781748230dd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 14 Nov 2024 10:19:16 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/service/impl/InspectionInfoServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index f8c760a0..e287950c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -248,7 +248,9 @@ public class InspectionInfoServiceImpl extends ServiceImpl listByUserId = roleService.getListByUserId(roleId); List ids = listByUserId.stream().map(UserDTO::getId).collect(Collectors.toList()); - ids.add(inspectionInfo.getLeadManId()); + if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())) { + ids.add(inspectionInfo.getLeadManId()); + } // 获取当前共单引车员的id if (CollUtil.isNotEmpty(ids)) { for (Long id : ids) { From 0205bedce10f00729f0361bead84a4074ed75b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 14 Nov 2024 10:20:43 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/service/impl/InspectionInfoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index c2b35d86..e287950c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -248,7 +248,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl listByUserId = roleService.getListByUserId(roleId); List ids = listByUserId.stream().map(UserDTO::getId).collect(Collectors.toList()); - if (ObjectUtil.isNull(inspectionInfo.getLeadManId())) { + if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())) { ids.add(inspectionInfo.getLeadManId()); } // 获取当前共单引车员的id From 4662ae356e9d6d871e8da2beab8356d43a835dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 14 Nov 2024 17:50:14 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/InspectionSocket.java | 34 ++++++++- .../controller/InspectionInfoController.java | 13 ++++ .../controller/PartnerOwnController.java | 3 +- .../inspection/entity/InspectionInfo.java | 2 + .../mapper/InspectionWorkNodeMapper.java | 2 + .../service/IInspectionWorkNodeService.java | 7 ++ .../impl/AppInspectionPartnerServiceImpl.java | 5 ++ .../impl/InspectionInfoServiceImpl.java | 2 + .../impl/InspectionWorkNodeServiceImpl.java | 33 ++++++++- .../inspection/vo/InspectionInfoVo.java | 3 + .../mapper/InspectionWorkNodeMapper.xml | 5 ++ .../inspection/InspectionInfoMapper.xml | 70 +++++++++++-------- 12 files changed, 143 insertions(+), 36 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/admin/InspectionSocket.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/admin/InspectionSocket.java index 1554b927..a98cb262 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/admin/InspectionSocket.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/admin/InspectionSocket.java @@ -9,7 +9,11 @@ import javax.websocket.*; import javax.websocket.server.PathParam; import javax.websocket.server.ServerEndpoint; import java.io.IOException; +import java.util.Map; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.LinkedBlockingQueue; /**`1 @@ -88,12 +92,36 @@ public class InspectionSocket { * 发送给指定的用户 * @param message */ - public void sendMessage(String message, String userId) throws IOException { - if (sessionMap.containsKey(userId)){ + private final Map> messageQueueMap = new ConcurrentHashMap<>(); + + public void sendMessage(String message, String userId) { + if (sessionMap.containsKey(userId)) { Session session = sessionMap.get(userId); - session.getAsyncRemote().sendText(message); + messageQueueMap.putIfAbsent(userId, new LinkedBlockingQueue<>()); + + // 将消息加入用户的队列 + messageQueueMap.get(userId).offer(message); + + // 异步处理消息队列 + processQueue(session, userId); } } + private void processQueue(Session session, String userId) { + BlockingQueue queue = messageQueueMap.get(userId); + + CompletableFuture.runAsync(() -> { + String nextMessage; + while ((nextMessage = queue.poll()) != null) { + session.getAsyncRemote().sendText(nextMessage, result -> { + if (!result.isOK()) { + System.err.println("Message sending failed for user: " + userId); + } + }); + } + }); + } + + } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index adb7f370..8bfb43f0 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -137,6 +137,19 @@ public class InspectionInfoController extends BaseController { return success("接单成功"); } + /** + * 员工取消接单 + * + * @param inspectionId 工单id + * @param workNodeId 节点id (geStelectInspection这个方法中返回了) + * @return + */ + @PostMapping("cancelAnOrder") + public CommonResult cancelAnOrder(Integer inspectionId, String workNodeId) { + inspectionWorkNodeService.cancelAnOrder(inspectionId, workNodeId); + return success("接单成功"); + } + /** * 项目操作(退办理、重审、项目完成) * diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java index 464dea4b..b257ef81 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java @@ -539,8 +539,9 @@ public class PartnerOwnController extends BaseController { @RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum, @RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize) { LoginUser user = SecurityFrameworkUtils.getLoginUser(); + // .eq(PartnerWorker::getUserId,user.getId()) LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(PartnerWorker::getUserId,user.getId()).eq(PartnerWorker::getPartnerId,partnerId); + queryWrapper.eq(PartnerWorker::getPartnerId,partnerId); PartnerWorker worker = partnerWorkerService.getOne(queryWrapper); if (ObjectUtil.isEmpty(worker)){ return null; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index 5a5f52fd..a7778deb 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -161,4 +161,6 @@ public class InspectionInfo extends TenantBaseDO private String workNodeStatus; @TableField(exist = false) private String selectType; + @TableField(exist = false) + private String projectName; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java index 3340c22a..50e9d5f0 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java @@ -29,4 +29,6 @@ public interface InspectionWorkNodeMapper extends BaseMapper IPage getRoyaltyList(@Param("page")IPage page,@Param("inspectionWorkNode") InspectionWorkNode inspectionWorkNode); Map getRoyaltySum(@Param("inspectionWorkNode") InspectionWorkNode inspectionWorkNode); + + void cancelAnOrder(InspectionWorkNode workNode); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java index d1d16fb2..e838d732 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java @@ -23,6 +23,13 @@ public interface IInspectionWorkNodeService extends IService */ void updateInspectionWorkNode(Integer inspectionId, String workNodeId); + /** + * 员工取消接单 + * @param inspectionId + * @param workNodeId + */ + void cancelAnOrder(Integer inspectionId, String workNodeId); + /** * 更新流程图片 步骤信息 * @param inspectionWorkNode diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 0db942eb..69bb9f37 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -119,6 +119,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl partnerList(Page page, PartnerListQuery partnerListQuery) { @@ -1495,6 +1497,9 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl workNodes = inspectionWorkNodeService.getWeorkNodesById(Integer.parseInt(String.valueOf(inspectionInfoId))); + res.setWorkNodes(workNodes); return res; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index e287950c..42f707b9 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -251,6 +251,8 @@ public class InspectionInfoServiceImpl extends ServiceImpl workNodes; } diff --git a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml index 67fd11ec..c5afee77 100644 --- a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml @@ -1,6 +1,11 @@ + + UPDATE inspection_work_node + SET status = '0', deal_user_id = null, deal_user_name = null, deal_images = null, remark = null + WHERE id = #{id} AND inspection_info_id = #{inspectionInfoId} + - From 035d61cb3359b99ac983f70c19b934d488040d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Fri, 15 Nov 2024 17:46:37 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 13 ++- .../inspection/entity/InspectionStepInfo.java | 2 + .../inspection/entity/InspectionWorkNode.java | 5 + .../mapper/InspectionWorkNodeMapper.java | 6 ++ .../service/IInspectionWorkNodeService.java | 6 ++ .../impl/InspectionInfoServiceImpl.java | 2 +- .../impl/InspectionWorkNodeServiceImpl.java | 101 ++++++++++++------ .../mapper/InspectionWorkNodeMapper.xml | 9 ++ .../inspection/InspectionInfoMapper.xml | 8 +- 9 files changed, 117 insertions(+), 35 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index 8bfb43f0..b275071d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -63,7 +63,7 @@ public class InspectionInfoController extends BaseController { /** * 获取【请填写功能名称】详细信息 */ - @PreAuthorize("@ss.hasPermi('system:info:query')") +// @PreAuthorize("@ss.hasPermi('system:info:query')") @GetMapping(value = "/{id}") public CommonResult getInfo(@PathVariable("id") Long id) { return success(inspectionInfoService.selectInspectionInfoById(id)); @@ -242,4 +242,15 @@ public class InspectionInfoController extends BaseController { inspectionWorkNode.setDealUserId(loginUser.getId()); return success(inspectionWorkNodeService.getRoyaltySum(inspectionWorkNode)); } + + /** + * 重新审核 + * @param inspectionWorkNode + * @return + */ + @PostMapping("recheck") + public CommonResult recheck(@RequestBody InspectionWorkNode inspectionWorkNode){ + inspectionWorkNodeService.recheck(inspectionWorkNode); + return success("操作成功"); + } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java index 9fdaa285..bafac7a6 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java @@ -40,6 +40,8 @@ public class InspectionStepInfo extends Model { private Date updateTime; //更新人id private Integer updater; + //检测节点id + private String workNodeId; @TableField(exist = false) private String nickname; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java index 4c1536fe..8e3a1054 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java @@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.IdType; import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; +import java.util.List; + import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -98,4 +100,7 @@ public class InspectionWorkNode extends TenantBaseDO { private String rescueStart; @TableField(exist = false) private String rescueEnd; + /*重检或复检时需要传*/ + @TableField(exist = false) + private List workNodes; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java index 50e9d5f0..d2bcaf7d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java @@ -31,4 +31,10 @@ public interface InspectionWorkNodeMapper extends BaseMapper Map getRoyaltySum(@Param("inspectionWorkNode") InspectionWorkNode inspectionWorkNode); void cancelAnOrder(InspectionWorkNode workNode); + + /** + * 批量修改检测状态 + * @param workNodes + */ + void recheck(@Param("list") List workNodes); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java index e838d732..526ee66e 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java @@ -54,4 +54,10 @@ public interface IInspectionWorkNodeService extends IService IPage getRoyaltyList(IPage page, InspectionWorkNode inspectionWorkNode); Map getRoyaltySum(InspectionWorkNode inspectionWorkNode); + + /** + * 重新检测 + * @param workNodes + */ + void recheck(InspectionWorkNode workNodes); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 42f707b9..98cb040f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -300,7 +300,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl workerQueryWrapper = new LambdaQueryWrapper<>(); workerQueryWrapper.eq(PartnerWorker::getUserId, loginUser.getId()).eq(PartnerWorker::getPartnerId, partners.getPartnerId()); - PartnerWorker worker = workerService.getOne(workerQueryWrapper); +// PartnerWorker worker = workerService.getOne(workerQueryWrapper); AdminUserDO workerUser = userService.getUser(loginUser.getId()); // if (ObjectUtils.isNotEmpty(worker)) { inspectionInfo.setWorkId(workerUser.getId()); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java index 2f00dffa..aa5ebb0d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java @@ -96,21 +96,21 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl() - .eq(DlInspectionProject::getId, workNode.getProjectId())); - - InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); - inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId()))); - if (ObjectUtil.isNotNull(project)) { - inspectionStepInfo.setTitle(project.getProjectName() + "项目开始检测"); - } else { - inspectionStepInfo.setTitle("项目检测开始"); - } - inspectionStepInfo.setCreateTime(DateUtil.date()); - inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(workerUser.getId()))); - inspectionStepService.save(inspectionStepInfo); +// //新增步骤 +// //根据projectId查询项目名称 +// DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper() +// .eq(DlInspectionProject::getId, workNode.getProjectId())); +// +// InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); +// inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId()))); +// if (ObjectUtil.isNotNull(project)) { +// inspectionStepInfo.setTitle(project.getProjectName() + "项目开始检测"); +// } else { +// inspectionStepInfo.setTitle("项目检测开始"); +// } +// inspectionStepInfo.setCreateTime(DateUtil.date()); +// inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(workerUser.getId()))); +// inspectionStepService.save(inspectionStepInfo); } /** @@ -173,13 +173,19 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, workNode.getInspectionInfoId()); + //是否还有进行中或者待开始的状态 + queryWrapper.in(InspectionWorkNode::getStatus, "0","1"); List inspectionWorkNodes = this.list(queryWrapper); - //判断当前是否是最后一个项目 根据顺序号判断 - boolean flag = hasNextNode(inspectionWorkNodes, workNode); + boolean flag = true; + //判断是否是最后一个流程 + if (inspectionWorkNodes.size() == 1 && inspectionWorkNodes.get(0).getId().equals(workNode.getId())){ + flag = false; + } + // 插入步骤信息 InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); @@ -200,6 +206,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl listByUserId = roleService.getListByUserId(nextNode.getRoleId()); - List ids = listByUserId.stream().map(UserDTO::getId).collect(Collectors.toList()); - if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())){ - ids.add(inspectionInfo.getLeadManId()); - } - sendSocketMessage(ids); } +// else { +// //修改工单表当前流程 +// inspectionInfo.setNowOrderNum(workNode.getOrderNum() + 1); +// //获取下一节点 +// InspectionWorkNode nextNode = getNextNode(inspectionWorkNodes, workNode); +// /*给下一单人员发送信息*/ +// List listByUserId = roleService.getListByUserId(nextNode.getRoleId()); +// List ids = listByUserId.stream().map(UserDTO::getId).collect(Collectors.toList()); +// if (ObjectUtil.isNotNull(inspectionInfo.getLeadManId())){ +// ids.add(inspectionInfo.getLeadManId()); +// } +// sendSocketMessage(ids); +// } //将节点状态改为已完成 inspectionWorkNode.setStatus("2"); @@ -295,6 +303,38 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl + + UPDATE inspection_work_node + SET status = '0', deal_user_id = null, deal_user_name = null, deal_images = null, remark = null + WHERE id in ( + + #{item.id} + + ) + @@ -45,8 +45,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" From 6a75c68a5dd596cfd9d977a98405ae91bb124fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 18 Nov 2024 17:19:40 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AppSwiperController.java | 2 +- .../InspectionEquInfoController.java | 5 +++++ .../controller/InspectionInfoController.java | 4 ++++ .../InspectionMallPartnersController.java | 2 +- .../inspection/entity/InspectionInfo.java | 2 ++ .../service/IInspectionInfoService.java | 7 +++++++ .../impl/AppInspectionPartnerServiceImpl.java | 3 +++ .../impl/InspectionInfoServiceImpl.java | 11 ++++++++++ .../impl/InspectionWorkNodeServiceImpl.java | 2 +- .../inspection/vo/InspectionInfoVo.java | 2 ++ .../inspection/InspectionInfoMapper.xml | 21 ++++++++++++------- .../main/resources/mapper/UserRoleMapper.xml | 6 +++--- 12 files changed, 53 insertions(+), 14 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java index c4c0152f..61b29578 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java @@ -141,7 +141,7 @@ public class AppSwiperController extends BaseController { LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); LoginUser user = SecurityFrameworkUtils.getLoginUser(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); ShopMallPartners partner = partnersService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return error("信息有误"); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java index 39bfe0fc..3c428f50 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.inspection.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; @@ -43,6 +44,10 @@ public class InspectionEquInfoController extends BaseController public CommonResult list(Integer pageNum,Integer pageSize,InspectionEquInfo inspectionEquInfo) throws Exception { Page page =new Page(pageNum,pageSize); + if (ObjectUtil.isNull(inspectionEquInfo.getPartnerId())) { + ShopMallPartners partners = partnerService.shopInfoByUserId(); + inspectionEquInfo.setPartnerId(partners.getPartnerId()); + } IPage list = inspectionEquInfoService.selectInspectionEquInfoList(page,inspectionEquInfo); return success(list); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index b275071d..a42fb464 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -92,6 +92,10 @@ public class InspectionInfoController extends BaseController { public CommonResult edit(@RequestBody InspectionInfo inspectionInfo) throws Exception { return toAjax(inspectionInfoService.updateInspectionInfo(inspectionInfo)); } + @PostMapping("/updateLeadMan") + public CommonResult updateLeadMan(@RequestBody InspectionInfo inspectionInfo){ + return toAjax(inspectionInfoService.updateLeadMan(inspectionInfo)); + } @PostMapping("/del") diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java index bb16d0e2..67e6885a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java @@ -183,7 +183,7 @@ public class InspectionMallPartnersController extends BaseController { ShopMallPartners partner = new ShopMallPartners(); if (roles.contains("jcshop")){ LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); partner = shopMallPartnersService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index a7778deb..12c1ddf9 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -163,4 +163,6 @@ public class InspectionInfo extends TenantBaseDO private String selectType; @TableField(exist = false) private String projectName; + @TableField(exist = false) + private String leadManName; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java index ef2fb65e..948ad93e 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java @@ -49,6 +49,13 @@ public interface IInspectionInfoService extends IService * @return 结果 */ public int updateInspectionInfo(InspectionInfo inspectionInfo) throws Exception; + /** + * 修改引车员 + * + * @param inspectionInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateLeadMan(InspectionInfo inspectionInfo); /** * 批量删除【请填写功能名称】 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 69bb9f37..07dc376f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -184,6 +184,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapperWork =new LambdaQueryWrapper<>(); queryWrapperWork.eq(PartnerWorker::getUserId,user.getId()); + queryWrapperWork.orderByAsc(PartnerWorker::getPartnerId); + queryWrapperWork.last("limit 1"); PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork); if (ObjectUtil.isEmpty(worker)){ throw new Exception("信息有误"); @@ -1467,6 +1469,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl workNodes; + @TableField(exist = false) + private Long leadManId; } diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml index 44c4c981..ac6ee032 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml @@ -275,7 +275,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" iwn.status AS workNodeStatus, oi.order_no AS orderNo, oi.phonenumber AS buyPhone, - ip.project_name AS projectName + ip.project_name AS projectName, + su.nickname AS leadManName FROM inspection_info ii LEFT JOIN @@ -284,36 +285,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order_info oi ON ii.inspection_order_id = oi.id LEFT JOIN inspection_project ip ON iwn.project_id = ip.id + LEFT JOIN + system_users su ON ii.lead_man_id = su.id - - (ii.lead_man_id = #{inspectionInfo.leadManId} - OR iwn.role_id IN - - #{roleId} - ) AND ii.car_num LIKE CONCAT('%', #{inspectionInfo.carNum}, '%') + AND + (ii.lead_man_id = #{inspectionInfo.leadManId} + OR iwn.role_id IN + + #{roleId} + ) AND ii.status = '0' AND iwn.status = '0' -- AND ii.now_order_num = iwn.order_num + ORDER BY ii.create_time DESC AND ii.status = '0' AND iwn.status = '1' AND iwn.deal_user_id = #{inspectionInfo.dealUserId} + ORDER BY iwn.update_time DESC AND iwn.status = '2' AND iwn.deal_user_id = #{inspectionInfo.dealUserId} + ORDER BY iwn.update_time DESC - ORDER BY ii.create_time DESC diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/UserRoleMapper.xml b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/UserRoleMapper.xml index 7525388f..7e1c4ae1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/UserRoleMapper.xml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/UserRoleMapper.xml @@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + From a56689848bb669d28770ffe4c3b5ddd08e3fc9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 20 Nov 2024 15:46:13 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/inspection/controller/PartnerOwnController.java | 6 ++++++ .../yudao/module/system/service/dict/DictDataService.java | 1 + .../module/system/service/dict/DictDataServiceImpl.java | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java index 9d3d7b69..4e15a293 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java @@ -603,6 +603,12 @@ public class PartnerOwnController extends BaseController { dictDataService.deleteDictData(dictId); return success(); } + //批量删除客户来源 + @PostMapping("/delCustomerSourceBatch") + public CommonResult delCustomerSourceBatch(@RequestBody List dictIds){ + dictDataService.deleteDictDataBatch(dictIds); + return success(); + } @PostMapping("/vehicleLicenseOCR") public CommonResult vehicleLicenseOCR(String imagePath) throws Exception diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java index da700a1d..a5bb2740 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataService.java @@ -123,4 +123,5 @@ public interface DictDataService { **/ List getDictDataListById(List dataIds); + void deleteDictDataBatch(List dictIds); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java index dbabe2ec..67e6fafd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java @@ -202,4 +202,10 @@ public class DictDataServiceImpl implements DictDataService { return dictDataMapper.selectList(new LambdaQueryWrapperX().in(DictDataDO::getId, dataIds)); } + @Override + public void deleteDictDataBatch(List dictIds) { + // 删除字典数据 + dictDataMapper.deleteByIds(dictIds); + } + }