diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java index c4bdcc86..811a1336 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java @@ -379,6 +379,14 @@ public class DlRepairSoServiceImpl extends ServiceImpl { * @param id id **/ CustomerAndCarVO getCusAndCarById(String id); + + /** + * 用于刷新工单的更新时间 + * + * @author 小李 + * @date 10:31 2024/11/27 + * @param id 工单ID + **/ + void refreshUpdateTime(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 44bf316f..8d1ca7da 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 @@ -443,6 +443,10 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl recordTypeList = dictDataApi.getDictDataList(DICT_REPAIR_RECORDS_TYPE); Map typeMap = recordTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue, DictDataRespDTO::getLabel)); result.setRecords(records.stream().peek(item -> item.setType(typeMap.get(item.getType()))).collect(Collectors.toList())); + + // 更新主表时间 + refreshUpdateTime(id); + return result; } @@ -1862,6 +1866,21 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() + .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 a15315ac..e633dfcd 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 @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.tickets.service.impl; +import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem; import cn.iocoder.yudao.module.tickets.mapper.DlRepairTitemMapper; import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService; @@ -70,6 +71,10 @@ public class DlRepairTitemServiceImpl extends ServiceImpl getProjList(String ticketId,String isOpen) { + // 更新工单主表时间 + repairTicketsService.removeTicketById(ticketId); return dlRepairTitemMapper.selectProjList(ticketId,isOpen); } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java index 7323477e..2418d9ac 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlTicketWaresServiceImpl.java @@ -243,6 +243,11 @@ public class DlTicketWaresServiceImpl extends ServiceImpl repairWorkerService.sentMessage(id, "您有新的配件申请单需要审核")); } + + // 更新工单主表时间 + if (ObjectUtil.isNotEmpty(respVO.getTicketId())){ + repairTicketsService.refreshUpdateTime(respVO.getTicketId()); + } } /** @@ -255,6 +260,11 @@ public class DlTicketWaresServiceImpl extends ServiceImpl