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 11b4ffd0..6cffa5c4 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CarMainMapper.xml @@ -85,12 +85,10 @@ SELECT , bcb.brand_name AS brandStr, - bcb.logo_img AS logoImg, - bcm.model_name AS modelStr + bcb.logo_img AS logoImg FROM `base_car_main` tbcm LEFT JOIN base_car_brand bcb ON bcb.deleted = 0 AND tbcm.car_brand = bcb.id - LEFT JOIN base_car_model bcm ON bcm.deleted = 0 AND tbcm.car_model = bcm.id WHERE tbcm.deleted = 0 AND diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java index db3ad74a..fde8d479 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java @@ -26,8 +26,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static cn.iocoder.yudao.common.BaseConstants.REPAIR_RECORD_TYPE_RECORD; - /** * 维修记录 Service 实现类 * @@ -106,10 +104,8 @@ public class RepairRecordsServiceImpl extends ServiceImpl itemList = itemService.getByMainId(REPAIR_RECORD_TYPE_RECORD, item.getId(), pageReqVO.getIsOpen()); - item.setItemList(itemList); //相对路径按照“,”分隔 - item.setImages(itemList.stream().map(RepairRecordsItem::getImage).collect(Collectors.joining(","))); + item.setImages(item.getItemList().stream().map(RepairRecordsItem::getImage).collect(Collectors.joining(","))); }); return list; } 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 6f0b41ab..a4605b3e 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 @@ -342,7 +342,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl itemList = titemService.list(new LambdaQueryWrapper().eq(DlRepairTitem::getTicketId, id)); diff --git a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml index 83ecb10f..6b9f4cee 100644 --- a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml @@ -8,14 +8,43 @@ 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> - - SELECT main.*, - drt.item_name AS projectName + drt.item_name AS projectName, + drri.id AS item_id, + drri.record_id AS item_record_id, + drri.ticket_id AS item_ticket_id, + drri.repair_item_id AS item_repair_item_id, + drri.remark AS item_remark, + drri.image AS item_image, + drri.is_open AS item_is_open, + drri.create_time AS item_create_time FROM dl_repair_records main LEFT JOIN dl_repair_titem drt ON main.repair_item_id = drt.id AND drt.deleted = 0 + LEFT JOIN dl_repair_records_item drri ON main.id = drri.record_id - main.deleted = '0' + main.deleted = '0' AND drri.deleted = '0' AND main.ticket_id = #{entity.ticketId} @@ -28,8 +57,11 @@ AND main.type = #{entity.type} + + AND drri.is_open = #{entity.type} + - order by main.create_time desc + order by main.create_time desc,drri.create_time