This commit is contained in:
PQZ 2024-11-07 15:15:52 +08:00
commit 8adf0e01f3
4 changed files with 11 additions and 4 deletions

View File

@ -108,6 +108,7 @@ public class DlRepairBookingController {
Map<String,String> repairTypeMap = repairTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue,DictDataRespDTO::getLabel)); Map<String,String> repairTypeMap = repairTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue,DictDataRespDTO::getLabel));
List<DlRepairBooking> respVOList = dlRepairBookingService.list(new LambdaQueryWrapper<DlRepairBooking>() List<DlRepairBooking> respVOList = dlRepairBookingService.list(new LambdaQueryWrapper<DlRepairBooking>()
.eq(DlRepairBooking::getUserId,userId) .eq(DlRepairBooking::getUserId,userId)
.isNull(DlRepairBooking::getTicketsId)
.orderByDesc(DlRepairBooking::getBookingTime)); .orderByDesc(DlRepairBooking::getBookingTime));
List<DlRepairBookingRespVO> rtnList = new ArrayList<>(); List<DlRepairBookingRespVO> rtnList = new ArrayList<>();
for(DlRepairBooking booking:respVOList){ for(DlRepairBooking booking:respVOList){

View File

@ -97,7 +97,7 @@ public class DlRepairBookingServiceImpl extends ServiceImpl<DlRepairBookingMappe
// 选择了服务顾问 // 选择了服务顾问
if (ObjectUtil.isNotEmpty(repairBookingRespVO.getAdviserId())){ if (ObjectUtil.isNotEmpty(repairBookingRespVO.getAdviserId())){
// 发送消息通知 // 发送消息通知
repairWorkerService.sentMessage(Long.valueOf(repairBookingRespVO.getAdviserId()), message); repairWorkerService.sentMessage(Long.valueOf(repairBookingRespVO.getAdviserId()), message + ",预约的服务顾问为:" + repairBookingRespVO.getAdviserName());
}else { }else {
// 没选服务顾问 // 没选服务顾问
// 获取所有的服务顾问 // 获取所有的服务顾问

View File

@ -270,7 +270,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
if (ObjectUtil.isNotEmpty(repairType)) { if (ObjectUtil.isNotEmpty(repairType)) {
repairOrderInfo.setGoodsTitle(repairType.getLabel()); repairOrderInfo.setGoodsTitle(repairType.getLabel());
} else { } else {
repairOrderInfo.setGoodsTitle("维修费用"); repairOrderInfo.setGoodsTitle("维修");
} }
repairOrderInfo.setGoodsType("2"); repairOrderInfo.setGoodsType("2");
CustomerMainRespVO customerById = customerMainService.getCustomerById(ticketsRespVO.getUserId()); CustomerMainRespVO customerById = customerMainService.getCustomerById(ticketsRespVO.getUserId());
@ -433,13 +433,18 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
RepairOrderInfo repairOrderInfo = new RepairOrderInfo(); RepairOrderInfo repairOrderInfo = new RepairOrderInfo();
repairOrderInfo.setId(one.getId()); repairOrderInfo.setId(one.getId());
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType()); repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
repairOrderInfoService.updateById(repairOrderInfo);
// 更新工单 // 更新工单
// 在这里把工单的状态更新为已完成---需要判断如果是线上支付需要在支付回调更新 // 在这里把工单的状态更新为已完成---需要判断如果是线上支付需要在支付回调更新
if (!repairTicketsRespVO.getPayType().equals("01")){ if (!repairTicketsRespVO.getPayType().equals("01")){
repairTicketsRespVO.setIsFinish("1"); repairTicketsRespVO.setIsFinish("1");
baseMapper.updateById(repairTicketsRespVO); baseMapper.updateById(repairTicketsRespVO);
}else {
// 线下结账和签单挂账直接算已支付
repairOrderInfo.setPayTime(LocalDateTime.now());
repairOrderInfo.setOrderStatus("1");
} }
repairOrderInfoService.updateById(repairOrderInfo);
} }
/** /**
@ -1052,7 +1057,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
施工完成又分四种情况阶段完成完成并移交下一班组完成并移交总检完成工单其中部分完成同开始施工施工中的记录上传一致只上传不改变 施工完成又分四种情况阶段完成完成并移交下一班组完成并移交总检完成工单其中部分完成同开始施工施工中的记录上传一致只上传不改变
*/ */
// 消息生成 // 消息生成
String message = createMessage(tickets.getNowRepairName(), tickets.getCarNo(), titem.getItemName(), respVO.getRecordType(), respVO.getFinishType(), respVO.getNextName()); String message = createMessage(tickets.getNowRepairName(), tickets.getCarNo(),null==titem?"":titem.getItemName(), respVO.getRecordType(), respVO.getFinishType(), respVO.getNextName());
// 通知服务顾问 // 通知服务顾问
// 如果员工完成了订单 // 如果员工完成了订单
if (RecordTypeEnum.SGWCZJ.getCode().equals(respVO.getRecordType()) && "03".equals(respVO.getFinishType())) { if (RecordTypeEnum.SGWCZJ.getCode().equals(respVO.getRecordType()) && "03".equals(respVO.getFinishType())) {

View File

@ -98,6 +98,7 @@ public class DlRepairTitemServiceImpl extends ServiceImpl<DlRepairTitemMapper, D
titem.setItemCount(dlRepairTitemReqVO.getItemCount()); titem.setItemCount(dlRepairTitemReqVO.getItemCount());
titem.setItemPrice(dlRepairTitemReqVO.getItemPrice()); titem.setItemPrice(dlRepairTitemReqVO.getItemPrice());
titem.setItemDiscount(dlRepairTitemReqVO.getItemDiscount()); titem.setItemDiscount(dlRepairTitemReqVO.getItemDiscount());
titem.setItemStatus(dlRepairTitemReqVO.getItemStatus());
// 计算总价 // 计算总价
BigDecimal total = titem.getItemPrice().multiply(BigDecimal.valueOf(titem.getItemCount())).multiply(titem.getItemDiscount()); BigDecimal total = titem.getItemPrice().multiply(BigDecimal.valueOf(titem.getItemCount())).multiply(titem.getItemDiscount());
titem.setItemMoney(total); titem.setItemMoney(total);