From b463144cacc4d398f59ed564a388c5df15e0060a Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Fri, 1 Nov 2024 20:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=B7=A5=E5=8D=95=E5=92=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 4a90687814372a45f55626625c2fe10857e6d08c) --- .../admin/DlRepairTicketsController.java | 14 ++++++++++++++ .../service/DlRepairTicketsService.java | 9 +++++++++ .../impl/DlRepairTicketsServiceImpl.java | 18 ++++++++++++++++++ .../src/main/resources/application-local.yaml | 2 ++ 4 files changed, 43 insertions(+) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java index 93cc3124..41fe1162 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java @@ -348,5 +348,19 @@ public class DlRepairTicketsController { dlRepairTicketsService.updateTicket(respVO); return CommonResult.ok(); } + + /** + * 删除工单 + * + * @author 小李 + * @date 20:05 2024/11/1 + * @param id 工单ID + **/ + @DeleteMapping("/remove") + @Operation(summary = "删除工单") + public CommonResult removeTicketById(@RequestParam("id") String id) { + dlRepairTicketsService.removeTicketById(id); + return CommonResult.ok(); + } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java index a29750f8..97151564 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java @@ -226,4 +226,13 @@ public interface DlRepairTicketsService extends IService { * @param respVO 请求对象 **/ void updateTicket(DlRepairTicketsRespVO respVO); + + /** + * 删除工单 + * + * @author 小李 + * @date 20:05 2024/11/1 + * @param id 工单ID + **/ + void removeTicketById(String id); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index baab5102..50c32faa 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -1532,6 +1532,24 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairOrderInfo::getGoodsId, id)); + // 删除工单 + baseMapper.deleteById(id); + // 删除工单子表 + titemService.remove(new LambdaQueryWrapper().eq(DlRepairTitem::getTicketId, id)); + } } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 314f6e42..1b9cd8ce 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -56,6 +56,8 @@ spring: # url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例 username: lanan_dev password: lighting@2024 +# username: lanan +# password: 123456 # username: sa # SQL Server 连接的示例 # password: Yudao@2024 # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例