更新
This commit is contained in:
parent
407c7c20c1
commit
95157aa43f
@ -183,8 +183,5 @@ public class CustomerCarServiceImpl extends ServiceImpl<CustomerCarMapper, Custo
|
||||
if (StringUtils.isEmpty(saveReqVO.getCar().getLicenseNumber())){
|
||||
throw new Exception("车牌号不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(saveReqVO.getCar().getCarBrand())){
|
||||
throw new Exception("车辆品牌不能为空");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
package cn.iocoder.yudao.module.rescue.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.CoordinateUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
||||
import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO;
|
||||
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
|
||||
import cn.iocoder.yudao.module.partner.service.IPartnerCustomerInfoService;
|
||||
import cn.iocoder.yudao.module.rescue.domain.*;
|
||||
@ -81,6 +85,8 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
||||
private IPartnerCustomerInfoService customerInfoService;
|
||||
@Resource
|
||||
private CustomerMainService customerMainService;
|
||||
@Autowired
|
||||
private CustomerCarService customerCarService;
|
||||
|
||||
public static String Redis_Driver_Key = "Rescue:Driver:";
|
||||
public static String Redis_Driver_Position_Key = "DriverPosition:";
|
||||
@ -585,6 +591,21 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
||||
detailService.save(rescueInfoDetail);
|
||||
rescueInfo.setRescueStatus("5");
|
||||
rescueInfoService.updateById(rescueInfo);
|
||||
/** 将车辆推送到维修中*/
|
||||
CustomerMainSaveReqVO saveReqVO = new CustomerMainSaveReqVO();
|
||||
// 绑定用户id
|
||||
saveReqVO.setUserId(rescueInfo.getUserId());
|
||||
// 绑定用户手机号
|
||||
saveReqVO.setPhoneNumber(rescueInfo.getConnectionPhone());
|
||||
// 客户名称
|
||||
saveReqVO.setCusName(rescueInfo.getConnectionName());
|
||||
// 车辆信息
|
||||
CarMain carMain = new CarMain();
|
||||
carMain.setCarLicenseImg(rescueInfo.getLicenseNum());
|
||||
|
||||
saveReqVO.setCar(carMain);
|
||||
//推送到维修中
|
||||
customerCarService.saveCustomerAndCar(saveReqVO);
|
||||
//处理司机状态
|
||||
//查询司机是否还存在未结束的救援订单
|
||||
//处理redis
|
||||
@ -620,7 +641,6 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
||||
}
|
||||
|
||||
|
||||
|
||||
//所在顶级机构
|
||||
String redisKey = Redis_Driver_Key + driverInfo.getTenantId() + ":" + rescueInfo.getDriverId();
|
||||
Object temp = redisCache.getCacheMapValue(redisKey, "rescueIds");
|
||||
|
Loading…
Reference in New Issue
Block a user