更新
This commit is contained in:
parent
95157aa43f
commit
fc12805d24
@ -117,7 +117,7 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
ShopMallPartners partner = new ShopMallPartners();
|
ShopMallPartners partner = new ShopMallPartners();
|
||||||
if (roles.contains("jcshop")){
|
if (roles.contains("jcshop")){
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
partner = shopMallPartnersService.getOne(queryWrapper);
|
partner = shopMallPartnersService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
return error();
|
return error();
|
||||||
@ -150,7 +150,7 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
ShopMallPartners partner = new ShopMallPartners();
|
ShopMallPartners partner = new ShopMallPartners();
|
||||||
if (roles.contains("jcshop")){
|
if (roles.contains("jcshop")){
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
partner = shopMallPartnersService.getOne(queryWrapper);
|
partner = shopMallPartnersService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
return error();
|
return error();
|
||||||
@ -270,7 +270,7 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
ShopMallPartners partner = new ShopMallPartners();
|
ShopMallPartners partner = new ShopMallPartners();
|
||||||
if (roles.contains("jcshop")){
|
if (roles.contains("jcshop")){
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
partner = shopMallPartnersService.getOne(queryWrapper);
|
partner = shopMallPartnersService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
return CommonResult.error(-1,"信息有误");
|
return CommonResult.error(-1,"信息有误");
|
||||||
|
@ -186,7 +186,7 @@ public class ShopInspectionGoodsController extends BaseController
|
|||||||
ShopMallPartners partner = new ShopMallPartners();
|
ShopMallPartners partner = new ShopMallPartners();
|
||||||
if (roles.contains("jcshop")){
|
if (roles.contains("jcshop")){
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
partner = appInspectionPartnerService.getOne(queryWrapper);
|
partner = appInspectionPartnerService.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
return error();
|
return error();
|
||||||
|
@ -174,7 +174,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
ShopMallPartners partner = new ShopMallPartners();
|
ShopMallPartners partner = new ShopMallPartners();
|
||||||
if (roles.contains("jcshop")){
|
if (roles.contains("jcshop")){
|
||||||
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ShopMallPartners> queryWrapper =new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0");
|
queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1");
|
||||||
partner = this.getOne(queryWrapper);
|
partner = this.getOne(queryWrapper);
|
||||||
if (ObjectUtil.isEmpty(partner)){
|
if (ObjectUtil.isEmpty(partner)){
|
||||||
throw new Exception("信息有误");
|
throw new Exception("信息有误");
|
||||||
|
@ -246,12 +246,14 @@ public class ShopInspectionGoodsServiceImpl extends ServiceImpl<ShopInspectionGo
|
|||||||
public List<ShopInspectionCategory> categoryList() throws Exception {
|
public List<ShopInspectionCategory> categoryList() throws Exception {
|
||||||
ShopMallPartners one = appInspectionPartnerService.shopInfoByUserId();
|
ShopMallPartners one = appInspectionPartnerService.shopInfoByUserId();
|
||||||
List<ShopInspectionCategory> shopInspectionCategories = appInspectionPartnerService.categoryList(one.getPartnerId());
|
List<ShopInspectionCategory> shopInspectionCategories = appInspectionPartnerService.categoryList(one.getPartnerId());
|
||||||
|
if (CollectionUtil.isNotEmpty(shopInspectionCategories)) {
|
||||||
for (ShopInspectionCategory shopInspectionCategory : shopInspectionCategories) {
|
for (ShopInspectionCategory shopInspectionCategory : shopInspectionCategories) {
|
||||||
LambdaQueryWrapper<InspectionCategoryTemplate> templateLambdaQueryWrapper =new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<InspectionCategoryTemplate> templateLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
templateLambdaQueryWrapper.eq(InspectionCategoryTemplate::getCategoryId,shopInspectionCategory.getId()).orderByAsc(InspectionCategoryTemplate::getSkuPrice);
|
templateLambdaQueryWrapper.eq(InspectionCategoryTemplate::getCategoryId, shopInspectionCategory.getId()).orderByAsc(InspectionCategoryTemplate::getSkuPrice);
|
||||||
List<InspectionCategoryTemplate> list = categoryTemplateService.list(templateLambdaQueryWrapper);
|
List<InspectionCategoryTemplate> list = categoryTemplateService.list(templateLambdaQueryWrapper);
|
||||||
shopInspectionCategory.setTemplates(list);
|
shopInspectionCategory.setTemplates(list);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return shopInspectionCategories;
|
return shopInspectionCategories;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,12 +65,6 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
|
|||||||
private PartnerCustomerInfoMapper customerInfoMapper;
|
private PartnerCustomerInfoMapper customerInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PartnerCustomerInfoMapper partnerCustomerInfoMapper;
|
private PartnerCustomerInfoMapper partnerCustomerInfoMapper;
|
||||||
@Resource
|
|
||||||
private CustomerMainService customerMainService;
|
|
||||||
@Autowired
|
|
||||||
private CarMainService carMainService;
|
|
||||||
@Resource
|
|
||||||
private CustomerCarService customerCarService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询客户信息列表
|
* 查询客户信息列表
|
||||||
@ -237,26 +231,6 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
|
|||||||
throw new Exception("手机号不符合规范");
|
throw new Exception("手机号不符合规范");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建客户信息
|
|
||||||
CustomerMain customerMain = new CustomerMain();
|
|
||||||
customerMain.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
||||||
customerMain.setUserId(user.getId());
|
|
||||||
customerMain.setCusName(partnerCustomerInfo.getCustomerName());
|
|
||||||
customerMain.setPhoneNumber(partnerCustomerInfo.getCustomerPhone());
|
|
||||||
customerMain.setSex(partnerCustomerInfo.getSex());
|
|
||||||
customerMain.setIsHangAccount("0");
|
|
||||||
customerMain.setTypeCode("01");
|
|
||||||
// 设置客户初始来源
|
|
||||||
//customerMain.setDataFrom("01");
|
|
||||||
// 设置注册方式
|
|
||||||
customerMain.setInviterType("01");
|
|
||||||
|
|
||||||
// 保存客户信息
|
|
||||||
customerMainService.saveOrUpdate(customerMain);
|
|
||||||
|
|
||||||
// 保存车辆信息和客户与车辆关联关系
|
|
||||||
carMainService.saveOrUpdateBatch(saveCarList);
|
|
||||||
customerCarService.saveBatch(saveCustomerCarList);
|
|
||||||
|
|
||||||
// 保存用户车辆信息
|
// 保存用户车辆信息
|
||||||
for (ShopUserCar userCar : saveUserCarList) {
|
for (ShopUserCar userCar : saveUserCarList) {
|
||||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.rescue.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
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.core.util.ObjectUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||||
@ -591,6 +592,13 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
|||||||
detailService.save(rescueInfoDetail);
|
detailService.save(rescueInfoDetail);
|
||||||
rescueInfo.setRescueStatus("5");
|
rescueInfo.setRescueStatus("5");
|
||||||
rescueInfoService.updateById(rescueInfo);
|
rescueInfoService.updateById(rescueInfo);
|
||||||
|
|
||||||
|
//处理司机状态
|
||||||
|
//查询司机是否还存在未结束的救援订单
|
||||||
|
//处理redis
|
||||||
|
DriverInfo driverInfo = driverInfoService.getById(rescueInfo.getDriverId());
|
||||||
|
AdminUserRespDTO user = userService.getUser(driverInfo.getUserId());
|
||||||
|
try {
|
||||||
/** 将车辆推送到维修中*/
|
/** 将车辆推送到维修中*/
|
||||||
CustomerMainSaveReqVO saveReqVO = new CustomerMainSaveReqVO();
|
CustomerMainSaveReqVO saveReqVO = new CustomerMainSaveReqVO();
|
||||||
// 绑定用户id
|
// 绑定用户id
|
||||||
@ -598,20 +606,20 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
|||||||
// 绑定用户手机号
|
// 绑定用户手机号
|
||||||
saveReqVO.setPhoneNumber(rescueInfo.getConnectionPhone());
|
saveReqVO.setPhoneNumber(rescueInfo.getConnectionPhone());
|
||||||
// 客户名称
|
// 客户名称
|
||||||
|
if(ObjectUtil.isNotEmpty(rescueInfo.getConnectionName())) {
|
||||||
saveReqVO.setCusName(rescueInfo.getConnectionName());
|
saveReqVO.setCusName(rescueInfo.getConnectionName());
|
||||||
|
}else {
|
||||||
|
saveReqVO.setCusName(rescueInfo.getConnectionPhone());
|
||||||
|
}
|
||||||
// 车辆信息
|
// 车辆信息
|
||||||
CarMain carMain = new CarMain();
|
CarMain carMain = new CarMain();
|
||||||
carMain.setCarLicenseImg(rescueInfo.getLicenseNum());
|
carMain.setLicenseNumber(rescueInfo.getLicenseNum());
|
||||||
|
|
||||||
saveReqVO.setCar(carMain);
|
saveReqVO.setCar(carMain);
|
||||||
//推送到维修中
|
//推送到维修中
|
||||||
customerCarService.saveCustomerAndCar(saveReqVO);
|
customerCarService.saveCustomerAndCar(saveReqVO);
|
||||||
//处理司机状态
|
|
||||||
//查询司机是否还存在未结束的救援订单
|
|
||||||
//处理redis
|
|
||||||
DriverInfo driverInfo = driverInfoService.getById(rescueInfo.getDriverId());
|
|
||||||
AdminUserRespDTO user = userService.getUser(driverInfo.getUserId());
|
|
||||||
try {
|
|
||||||
// 收集客户信息
|
// 收集客户信息
|
||||||
PartnerCustomerInfo customerInfo = new PartnerCustomerInfo();
|
PartnerCustomerInfo customerInfo = new PartnerCustomerInfo();
|
||||||
customerInfo.setCustomerName(rescueInfo.getConnectionName());
|
customerInfo.setCustomerName(rescueInfo.getConnectionName());
|
||||||
@ -629,11 +637,6 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
|||||||
|
|
||||||
customerInfo.setUserCarList(userCarList);
|
customerInfo.setUserCarList(userCarList);
|
||||||
|
|
||||||
// 设置客户来源
|
|
||||||
CustomerMain customerMain = new CustomerMain();
|
|
||||||
customerMain.setDataFrom("02");
|
|
||||||
customerMainService.saveOrUpdate(customerMain);
|
|
||||||
|
|
||||||
// 调用插入客户信息的方法
|
// 调用插入客户信息的方法
|
||||||
customerInfoService.insertPartnerCustomerInfo(customerInfo);
|
customerInfoService.insertPartnerCustomerInfo(customerInfo);
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
Loading…
Reference in New Issue
Block a user