Compare commits

..

No commits in common. "a5e1f068c34c47874c83c70cf4b0d709133a4f6a" and "47f55f5ce15942548a224c60936b802770a21f65" have entirely different histories.

3 changed files with 3 additions and 50 deletions

View File

@ -9,8 +9,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.security.core.LoginUser;
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.service.IPartnerCustomerInfoService;
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
@ -40,8 +38,6 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* 请填写功能名称Service业务层处理
*
@ -72,8 +68,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
private IDelOrderInfoService delInspectionOrderService;
@Autowired
private IDelInspectionInfoService delInspectionInfoService;
@Resource
private CustomerMainService customerMainService;
/**
* 查询请填写功能名称
*
@ -200,12 +195,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
customerInfo.setCustomerName(user.getNickname());
customerInfo.setSex("0");
customerInfo.setUserAge(user.getUserAge());
// 设置客户来源
CustomerMain customerMain = new CustomerMain();
customerMain.setDataFrom("01");
customerMainService.saveOrUpdate(customerMain);
customerInfoService.insertPartnerCustomerInfo(customerInfo);
}
//追加订单明细记录

View File

@ -248,7 +248,7 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
customerMain.setIsHangAccount("0");
customerMain.setTypeCode("01");
// 设置客户初始来源
//customerMain.setDataFrom("01");
customerMain.setDataFrom("01");
// 设置注册方式
customerMain.setInviterType("01");

View File

@ -3,14 +3,9 @@ package cn.iocoder.yudao.module.rescue.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.CoordinateUtil;
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.mapper.RescueDriverInfoMapper;
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.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
@ -77,10 +72,6 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
private WechatPayConfig wechatPayConfig;
@Resource
private RedissonDelayQueue redissonDelayQueue;
@Autowired
private IPartnerCustomerInfoService customerInfoService;
@Resource
private CustomerMainService customerMainService;
public static String Redis_Driver_Key = "Rescue:Driver:";
public static String Redis_Driver_Position_Key = "DriverPosition:";
@ -590,33 +581,6 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
//处理redis
DriverInfo driverInfo = driverInfoService.getById(rescueInfo.getDriverId());
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();
Object temp = redisCache.getCacheMapValue(redisKey, "rescueIds");
@ -624,7 +588,7 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
String s = temp.toString();
if (StringUtils.isNotEmpty(s)) {
String resStr = "";
String[] rescueIds = temp.toString().split(",");
String[] rescueIds = temp.toString().split(",");
for (String tmp : rescueIds) {
if (!tmp.equals(rescueId.toString())) {
resStr = resStr + "," + tmp;