From c0a85a7f75e1ba32b135c03c789756c9080a21a3 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Wed, 27 Nov 2024 14:56:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=81=9A=E4=BA=86=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E4=BB=A5=E5=90=8E=EF=BC=8C=E6=8E=92=E5=88=97=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E9=83=BD=E8=A6=81=E5=88=B0=E7=AC=AC=E4=B8=80=E4=BD=8D?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DlRepairTicketsServiceImpl.java | 42 +++++++++++++++++-- .../impl/DlRepairTitemServiceImpl.java | 4 +- 2 files changed, 40 insertions(+), 6 deletions(-) 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 8d1ca7da..4c047ff9 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 @@ -510,6 +510,9 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl item.getValue().equals(worker.getWorkType())).findFirst().orElse(null); String message = String.format("您的爱车%s已由%s %s接单了", tickets.getCarNo(), (dictDataRespDTO != null ? dictDataRespDTO.getLabel() : "维修工"), worker.getUserName()); repairWorkerService.sentMessageToCus(id, message, false); + + // 更新工单主表时间 + refreshUpdateTime(id); } /** @@ -1075,6 +1085,9 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() - .set(DlRepairTickets::getUpdateTime, LocalDateTime.now()) - .eq(DlRepairTickets::getId, id) - ); + if (ObjectUtil.isNotEmpty(id)){ + baseMapper.update(new LambdaUpdateWrapper() + .set(DlRepairTickets::getUpdateTime, LocalDateTime.now()) + .eq(DlRepairTickets::getId, id) + ); + } } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java index e633dfcd..24f0f6b2 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTitemServiceImpl.java @@ -57,7 +57,7 @@ public class DlRepairTitemServiceImpl extends ServiceImpl getProjectList(String ticketId){ - return baseMapper.selectList(new LambdaQueryWrapper().and(item -> { + return baseMapper.selectList(new LambdaQueryWrapper().and(item -> { item.eq(DlRepairTitem::getItemType, "01") .eq(DlRepairTitem::getTicketId, ticketId); })); @@ -162,7 +162,7 @@ public class DlRepairTitemServiceImpl extends ServiceImpl getProjList(String ticketId,String isOpen) { // 更新工单主表时间 - repairTicketsService.removeTicketById(ticketId); + repairTicketsService.refreshUpdateTime(ticketId); return dlRepairTitemMapper.selectProjList(ticketId,isOpen); } }