1
This commit is contained in:
parent
c6e571e56c
commit
fe9b6be1b5
@ -40,13 +40,23 @@ public interface CarMainService extends IService<CarMain> {
|
|||||||
void deleteCarMain(String id);
|
void deleteCarMain(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得车辆信息
|
* 获得车辆及关联客户信息
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @return 车辆信息
|
* @return 车辆信息
|
||||||
*/
|
*/
|
||||||
CarMain getCarMain(String id);
|
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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得车辆信息分页
|
* 获得车辆信息分页
|
||||||
*
|
*
|
||||||
|
@ -180,6 +180,19 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
|||||||
return carMainRespVO;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得车辆信息分页
|
* 获得车辆信息分页
|
||||||
*
|
*
|
||||||
|
@ -85,6 +85,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
<include refid="baseCarMainColumn"></include>,
|
<include refid="baseCarMainColumn"></include>,
|
||||||
bcb.brand_name AS brandStr,
|
bcb.brand_name AS brandStr,
|
||||||
|
bcb.logo_img AS logoImg,
|
||||||
bcm.model_name AS modelStr
|
bcm.model_name AS modelStr
|
||||||
FROM
|
FROM
|
||||||
`base_car_main` tbcm
|
`base_car_main` tbcm
|
||||||
|
@ -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.entity.RepairWorker;
|
||||||
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
|
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
|
||||||
import cn.iocoder.yudao.module.base.service.RepairWorkerService;
|
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.entity.DlRepairBooking;
|
||||||
import cn.iocoder.yudao.module.booking.service.DlRepairBookingService;
|
import cn.iocoder.yudao.module.booking.service.DlRepairBookingService;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CustomerCar;
|
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.CarMainService;
|
||||||
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
||||||
import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
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.custom.vo.CustomerMainRespVO;
|
||||||
import cn.iocoder.yudao.module.order.service.RepairOrderInfoService;
|
import cn.iocoder.yudao.module.order.service.RepairOrderInfoService;
|
||||||
import cn.iocoder.yudao.module.order.vo.RepairOrderInfoSaveReqVO;
|
import cn.iocoder.yudao.module.order.vo.RepairOrderInfoSaveReqVO;
|
||||||
@ -137,6 +141,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RepairRecordsService repairRecordsService;
|
private RepairRecordsService repairRecordsService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 维修工单表 新增
|
* 维修工单表 新增
|
||||||
*
|
*
|
||||||
@ -249,6 +254,12 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
// 查工单主表
|
// 查工单主表
|
||||||
DlRepairTickets dlRepairTickets = baseMapper.selectById(id);
|
DlRepairTickets dlRepairTickets = baseMapper.selectById(id);
|
||||||
DlRepairTicketsRespVO result = BeanUtil.toBean(dlRepairTickets, DlRepairTicketsRespVO.class);
|
DlRepairTicketsRespVO result = BeanUtil.toBean(dlRepairTickets, DlRepairTicketsRespVO.class);
|
||||||
|
//查车辆
|
||||||
|
CarMainRespVO carInfo = carMainService.queryCarById(dlRepairTickets.getCarId());
|
||||||
|
result.setCarInfo(carInfo);
|
||||||
|
//查用户信息
|
||||||
|
CustomerMain customerInfo = customerService.getCustomerById(dlRepairTickets.getUserId());
|
||||||
|
result.setCustomerInfo(customerInfo);
|
||||||
// 查工单子表
|
// 查工单子表
|
||||||
List<DlRepairTitem> itemList = titemService.list(new LambdaQueryWrapper<DlRepairTitem>().eq(DlRepairTitem::getTicketId, id));
|
List<DlRepairTitem> itemList = titemService.list(new LambdaQueryWrapper<DlRepairTitem>().eq(DlRepairTitem::getTicketId, id));
|
||||||
List<DlRepairTitemReqVO> items = itemList.stream().map(item -> BeanUtil.toBean(item, DlRepairTitemReqVO.class)).collect(Collectors.toList());
|
List<DlRepairTitemReqVO> items = itemList.stream().map(item -> BeanUtil.toBean(item, DlRepairTitemReqVO.class)).collect(Collectors.toList());
|
||||||
@ -275,6 +286,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
items.forEach(item -> dlRepairOthers.stream().filter(i -> i.getId().equals(item.getOtherId())).findFirst().ifPresent(item::setOther));
|
items.forEach(item -> dlRepairOthers.stream().filter(i -> i.getId().equals(item.getOtherId())).findFirst().ifPresent(item::setOther));
|
||||||
}
|
}
|
||||||
result.setItems(items);
|
result.setItems(items);
|
||||||
|
// 查询工单操作记录
|
||||||
|
RepairRecordsPageReqVO entity = new RepairRecordsPageReqVO();
|
||||||
|
entity.setTicketId(id);
|
||||||
|
List<RepairRecordsRespVO> records = repairRecordsService.queryList(entity);
|
||||||
|
result.setRecords(records);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.tickets.vo;
|
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.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.DlRepairTickets;
|
||||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -19,10 +22,18 @@ public class DlRepairTicketsRespVO extends DlRepairTickets {
|
|||||||
private List<DlRepairTitem> itemList;
|
private List<DlRepairTitem> itemList;
|
||||||
/** 关联的预约单信息 */
|
/** 关联的预约单信息 */
|
||||||
private DlRepairBooking booking;
|
private DlRepairBooking booking;
|
||||||
|
/** 操作记录*/
|
||||||
|
private List<RepairRecordsRespVO> records;
|
||||||
|
|
||||||
/** 上面有地方在用,只能新用一个了,子表数组 */
|
/** 上面有地方在用,只能新用一个了,子表数组 */
|
||||||
private List<DlRepairTitemReqVO> items;
|
private List<DlRepairTitemReqVO> items;
|
||||||
|
|
||||||
/** 预约记录ID */
|
/** 预约记录ID */
|
||||||
private String bookingId;
|
private String bookingId;
|
||||||
|
|
||||||
|
|
||||||
|
/** 客户信息 */
|
||||||
|
private CustomerMain customerInfo;
|
||||||
|
/** 车辆信息 */
|
||||||
|
private CarMainRespVO carInfo;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user