diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java index a5c4a534..9dc07ff2 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java @@ -40,13 +40,23 @@ public interface CarMainService extends IService { void deleteCarMain(String id); /** - * 获得车辆信息 + * 获得车辆及关联客户信息 * * @param id 编号 * @return 车辆信息 */ CarMain getCarMain(String id); + + /** + * 通过id查询车辆信息 + * @author PQZ + * @date 18:08 2024/10/18 + * @param id 车辆id + * @return cn.iocoder.yudao.module.custom.vo.CarMainRespVO + **/ + CarMainRespVO queryCarById(String id); + /** * 获得车辆信息分页 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java index 25097d52..2585ae24 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java @@ -180,6 +180,19 @@ public class CarMainServiceImpl extends ServiceImpl impl return carMainRespVO; } + /** + * 通过id查询车辆信息 + * + * @param id 车辆id + * @return cn.iocoder.yudao.module.custom.vo.CarMainRespVO + * @author PQZ + * @date 18:08 2024/10/18 + **/ + @Override + public CarMainRespVO queryCarById(String id) { + return baseMapper.findOne(id); + } + /** * 获得车辆信息分页 * diff --git a/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml index 1ecba2ea..11b4ffd0 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml @@ -85,6 +85,7 @@ SELECT , bcb.brand_name AS brandStr, + bcb.logo_img AS logoImg, bcm.model_name AS modelStr FROM `base_car_main` tbcm 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 8220d08a..a3bea824 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 @@ -8,12 +8,16 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.base.entity.RepairWorker; import cn.iocoder.yudao.module.base.service.RepairRecordsService; import cn.iocoder.yudao.module.base.service.RepairWorkerService; +import cn.iocoder.yudao.module.base.vo.RepairRecordsPageReqVO; +import cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO; import cn.iocoder.yudao.module.booking.entity.DlRepairBooking; import cn.iocoder.yudao.module.booking.service.DlRepairBookingService; import cn.iocoder.yudao.module.custom.entity.CustomerCar; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; import cn.iocoder.yudao.module.custom.service.CarMainService; import cn.iocoder.yudao.module.custom.service.CustomerCarService; import cn.iocoder.yudao.module.custom.service.CustomerMainService; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import cn.iocoder.yudao.module.order.service.RepairOrderInfoService; import cn.iocoder.yudao.module.order.vo.RepairOrderInfoSaveReqVO; @@ -140,6 +144,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl itemList = titemService.list(new LambdaQueryWrapper().eq(DlRepairTitem::getTicketId, id)); List items = itemList.stream().map(item -> BeanUtil.toBean(item, DlRepairTitemReqVO.class)).collect(Collectors.toList()); @@ -278,6 +289,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl dlRepairOthers.stream().filter(i -> i.getId().equals(item.getOtherId())).findFirst().ifPresent(item::setOther)); } result.setItems(items); + // 查询工单操作记录 + RepairRecordsPageReqVO entity = new RepairRecordsPageReqVO(); + entity.setTicketId(id); + List records = repairRecordsService.queryList(entity); + result.setRecords(records); return result; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java index 6b6394d3..1ec18ecf 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java @@ -1,6 +1,9 @@ package cn.iocoder.yudao.module.tickets.vo; +import cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO; import cn.iocoder.yudao.module.booking.entity.DlRepairBooking; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; import cn.iocoder.yudao.module.tickets.entity.DlRepairTickets; import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem; import lombok.Data; @@ -19,6 +22,8 @@ public class DlRepairTicketsRespVO extends DlRepairTickets { private List itemList; /** 关联的预约单信息 */ private DlRepairBooking booking; + /** 操作记录*/ + private List records; /** 上面有地方在用,只能新用一个了,子表数组 */ private List items; @@ -34,4 +39,10 @@ public class DlRepairTicketsRespVO extends DlRepairTickets { /** 记录类型 */ private String recordType; + + + /** 客户信息 */ + private CustomerMain customerInfo; + /** 车辆信息 */ + private CarMainRespVO carInfo; }