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); } }