Merge branch 'repair' of http://122.51.230.86:3000/dianliang/lanan-system into repair
This commit is contained in:
commit
8adf0e01f3
@ -108,6 +108,7 @@ public class DlRepairBookingController {
|
||||
Map<String,String> repairTypeMap = repairTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue,DictDataRespDTO::getLabel));
|
||||
List<DlRepairBooking> respVOList = dlRepairBookingService.list(new LambdaQueryWrapper<DlRepairBooking>()
|
||||
.eq(DlRepairBooking::getUserId,userId)
|
||||
.isNull(DlRepairBooking::getTicketsId)
|
||||
.orderByDesc(DlRepairBooking::getBookingTime));
|
||||
List<DlRepairBookingRespVO> rtnList = new ArrayList<>();
|
||||
for(DlRepairBooking booking:respVOList){
|
||||
|
@ -97,7 +97,7 @@ public class DlRepairBookingServiceImpl extends ServiceImpl<DlRepairBookingMappe
|
||||
// 选择了服务顾问
|
||||
if (ObjectUtil.isNotEmpty(repairBookingRespVO.getAdviserId())){
|
||||
// 发送消息通知
|
||||
repairWorkerService.sentMessage(Long.valueOf(repairBookingRespVO.getAdviserId()), message);
|
||||
repairWorkerService.sentMessage(Long.valueOf(repairBookingRespVO.getAdviserId()), message + ",预约的服务顾问为:" + repairBookingRespVO.getAdviserName());
|
||||
}else {
|
||||
// 没选服务顾问
|
||||
// 获取所有的服务顾问
|
||||
|
@ -270,7 +270,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
if (ObjectUtil.isNotEmpty(repairType)) {
|
||||
repairOrderInfo.setGoodsTitle(repairType.getLabel());
|
||||
} else {
|
||||
repairOrderInfo.setGoodsTitle("维修费用");
|
||||
repairOrderInfo.setGoodsTitle("维修");
|
||||
}
|
||||
repairOrderInfo.setGoodsType("2");
|
||||
CustomerMainRespVO customerById = customerMainService.getCustomerById(ticketsRespVO.getUserId());
|
||||
@ -433,13 +433,18 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
RepairOrderInfo repairOrderInfo = new RepairOrderInfo();
|
||||
repairOrderInfo.setId(one.getId());
|
||||
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
|
||||
repairOrderInfoService.updateById(repairOrderInfo);
|
||||
|
||||
// 更新工单
|
||||
// 在这里把工单的状态更新为已完成---需要判断,如果是线上支付,需要在支付回调更新
|
||||
if (!repairTicketsRespVO.getPayType().equals("01")){
|
||||
repairTicketsRespVO.setIsFinish("1");
|
||||
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())) {
|
||||
|
@ -98,6 +98,7 @@ public class DlRepairTitemServiceImpl extends ServiceImpl<DlRepairTitemMapper, D
|
||||
titem.setItemCount(dlRepairTitemReqVO.getItemCount());
|
||||
titem.setItemPrice(dlRepairTitemReqVO.getItemPrice());
|
||||
titem.setItemDiscount(dlRepairTitemReqVO.getItemDiscount());
|
||||
titem.setItemStatus(dlRepairTitemReqVO.getItemStatus());
|
||||
// 计算总价
|
||||
BigDecimal total = titem.getItemPrice().multiply(BigDecimal.valueOf(titem.getItemCount())).multiply(titem.getItemDiscount());
|
||||
titem.setItemMoney(total);
|
||||
|
Loading…
Reference in New Issue
Block a user