Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
f3e4ba39d1
@ -9,6 +9,8 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
|
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||||
|
import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
||||||
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
|
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
|
||||||
import cn.iocoder.yudao.module.partner.service.IPartnerCustomerInfoService;
|
import cn.iocoder.yudao.module.partner.service.IPartnerCustomerInfoService;
|
||||||
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
|
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
|
||||||
@ -38,6 +40,8 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Service业务层处理
|
* 【请填写功能名称】Service业务层处理
|
||||||
*
|
*
|
||||||
@ -68,7 +72,8 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
private IDelOrderInfoService delInspectionOrderService;
|
private IDelOrderInfoService delInspectionOrderService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDelInspectionInfoService delInspectionInfoService;
|
private IDelInspectionInfoService delInspectionInfoService;
|
||||||
|
@Resource
|
||||||
|
private CustomerMainService customerMainService;
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】
|
* 查询【请填写功能名称】
|
||||||
*
|
*
|
||||||
@ -195,6 +200,12 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
customerInfo.setCustomerName(user.getNickname());
|
customerInfo.setCustomerName(user.getNickname());
|
||||||
customerInfo.setSex("0");
|
customerInfo.setSex("0");
|
||||||
customerInfo.setUserAge(user.getUserAge());
|
customerInfo.setUserAge(user.getUserAge());
|
||||||
|
|
||||||
|
// 设置客户来源
|
||||||
|
CustomerMain customerMain = new CustomerMain();
|
||||||
|
customerMain.setDataFrom("01");
|
||||||
|
customerMainService.saveOrUpdate(customerMain);
|
||||||
|
|
||||||
customerInfoService.insertPartnerCustomerInfo(customerInfo);
|
customerInfoService.insertPartnerCustomerInfo(customerInfo);
|
||||||
}
|
}
|
||||||
//追加订单明细记录
|
//追加订单明细记录
|
||||||
|
@ -248,7 +248,7 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
|
|||||||
customerMain.setIsHangAccount("0");
|
customerMain.setIsHangAccount("0");
|
||||||
customerMain.setTypeCode("01");
|
customerMain.setTypeCode("01");
|
||||||
// 设置客户初始来源
|
// 设置客户初始来源
|
||||||
customerMain.setDataFrom("01");
|
//customerMain.setDataFrom("01");
|
||||||
// 设置注册方式
|
// 设置注册方式
|
||||||
customerMain.setInviterType("01");
|
customerMain.setInviterType("01");
|
||||||
|
|
||||||
|
@ -3,9 +3,14 @@ package cn.iocoder.yudao.module.rescue.service.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.CoordinateUtil;
|
import cn.hutool.core.util.CoordinateUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||||
|
import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
||||||
|
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
|
||||||
|
import cn.iocoder.yudao.module.partner.service.IPartnerCustomerInfoService;
|
||||||
import cn.iocoder.yudao.module.rescue.domain.*;
|
import cn.iocoder.yudao.module.rescue.domain.*;
|
||||||
import cn.iocoder.yudao.module.rescue.mapper.RescueDriverInfoMapper;
|
import cn.iocoder.yudao.module.rescue.mapper.RescueDriverInfoMapper;
|
||||||
import cn.iocoder.yudao.module.rescue.utils.RedissonDelayQueue;
|
import cn.iocoder.yudao.module.rescue.utils.RedissonDelayQueue;
|
||||||
|
import cn.iocoder.yudao.module.shop.entity.ShopUserCar;
|
||||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
@ -72,6 +77,10 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
|||||||
private WechatPayConfig wechatPayConfig;
|
private WechatPayConfig wechatPayConfig;
|
||||||
@Resource
|
@Resource
|
||||||
private RedissonDelayQueue redissonDelayQueue;
|
private RedissonDelayQueue redissonDelayQueue;
|
||||||
|
@Autowired
|
||||||
|
private IPartnerCustomerInfoService customerInfoService;
|
||||||
|
@Resource
|
||||||
|
private CustomerMainService customerMainService;
|
||||||
|
|
||||||
public static String Redis_Driver_Key = "Rescue:Driver:";
|
public static String Redis_Driver_Key = "Rescue:Driver:";
|
||||||
public static String Redis_Driver_Position_Key = "DriverPosition:";
|
public static String Redis_Driver_Position_Key = "DriverPosition:";
|
||||||
@ -581,6 +590,33 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
|||||||
//处理redis
|
//处理redis
|
||||||
DriverInfo driverInfo = driverInfoService.getById(rescueInfo.getDriverId());
|
DriverInfo driverInfo = driverInfoService.getById(rescueInfo.getDriverId());
|
||||||
AdminUserRespDTO user = userService.getUser(driverInfo.getUserId());
|
AdminUserRespDTO user = userService.getUser(driverInfo.getUserId());
|
||||||
|
|
||||||
|
// 收集客户信息
|
||||||
|
PartnerCustomerInfo customerInfo = new PartnerCustomerInfo();
|
||||||
|
customerInfo.setCustomerName(rescueInfo.getConnectionName());
|
||||||
|
customerInfo.setCustomerPhone(rescueInfo.getConnectionPhone());
|
||||||
|
customerInfo.setUserId(rescueInfo.getUserId());
|
||||||
|
|
||||||
|
// 收集客户车辆信息
|
||||||
|
List<ShopUserCar> userCarList = new ArrayList<>();
|
||||||
|
ShopUserCar userCar = new ShopUserCar();
|
||||||
|
userCar.setCarNo(rescueInfo.getLicenseNum());
|
||||||
|
userCar.setCarModel(rescueInfo.getCarType());
|
||||||
|
userCar.setCarBrand(rescueInfo.getCarBrand());
|
||||||
|
userCar.setUserId(user.getId());
|
||||||
|
userCarList.add(userCar);
|
||||||
|
|
||||||
|
customerInfo.setUserCarList(userCarList);
|
||||||
|
|
||||||
|
// 设置客户来源
|
||||||
|
CustomerMain customerMain = new CustomerMain();
|
||||||
|
customerMain.setDataFrom("02");
|
||||||
|
customerMainService.saveOrUpdate(customerMain);
|
||||||
|
|
||||||
|
// 调用插入客户信息的方法
|
||||||
|
customerInfoService.insertPartnerCustomerInfo(customerInfo);
|
||||||
|
|
||||||
|
|
||||||
//所在顶级机构
|
//所在顶级机构
|
||||||
String redisKey = Redis_Driver_Key + driverInfo.getTenantId() + ":" + rescueInfo.getDriverId();
|
String redisKey = Redis_Driver_Key + driverInfo.getTenantId() + ":" + rescueInfo.getDriverId();
|
||||||
Object temp = redisCache.getCacheMapValue(redisKey, "rescueIds");
|
Object temp = redisCache.getCacheMapValue(redisKey, "rescueIds");
|
||||||
|
Loading…
Reference in New Issue
Block a user