更新
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,11 +246,13 @@ 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());
|
||||||
for (ShopInspectionCategory shopInspectionCategory : shopInspectionCategories) {
|
if (CollectionUtil.isNotEmpty(shopInspectionCategories)) {
|
||||||
LambdaQueryWrapper<InspectionCategoryTemplate> templateLambdaQueryWrapper =new LambdaQueryWrapper<>();
|
for (ShopInspectionCategory shopInspectionCategory : shopInspectionCategories) {
|
||||||
templateLambdaQueryWrapper.eq(InspectionCategoryTemplate::getCategoryId,shopInspectionCategory.getId()).orderByAsc(InspectionCategoryTemplate::getSkuPrice);
|
LambdaQueryWrapper<InspectionCategoryTemplate> templateLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
List<InspectionCategoryTemplate> list = categoryTemplateService.list(templateLambdaQueryWrapper);
|
templateLambdaQueryWrapper.eq(InspectionCategoryTemplate::getCategoryId, shopInspectionCategory.getId()).orderByAsc(InspectionCategoryTemplate::getSkuPrice);
|
||||||
shopInspectionCategory.setTemplates(list);
|
List<InspectionCategoryTemplate> list = categoryTemplateService.list(templateLambdaQueryWrapper);
|
||||||
|
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,27 +592,34 @@ public class RescueDriverInfoServiceImpl extends ServiceImpl<RescueDriverInfoMap
|
|||||||
detailService.save(rescueInfoDetail);
|
detailService.save(rescueInfoDetail);
|
||||||
rescueInfo.setRescueStatus("5");
|
rescueInfo.setRescueStatus("5");
|
||||||
rescueInfoService.updateById(rescueInfo);
|
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
|
//处理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());
|
||||||
try {
|
try {
|
||||||
|
/** 将车辆推送到维修中*/
|
||||||
|
CustomerMainSaveReqVO saveReqVO = new CustomerMainSaveReqVO();
|
||||||
|
// 绑定用户id
|
||||||
|
saveReqVO.setUserId(rescueInfo.getUserId());
|
||||||
|
// 绑定用户手机号
|
||||||
|
saveReqVO.setPhoneNumber(rescueInfo.getConnectionPhone());
|
||||||
|
// 客户名称
|
||||||
|
if(ObjectUtil.isNotEmpty(rescueInfo.getConnectionName())) {
|
||||||
|
saveReqVO.setCusName(rescueInfo.getConnectionName());
|
||||||
|
}else {
|
||||||
|
saveReqVO.setCusName(rescueInfo.getConnectionPhone());
|
||||||
|
}
|
||||||
|
// 车辆信息
|
||||||
|
CarMain carMain = new CarMain();
|
||||||
|
carMain.setLicenseNumber(rescueInfo.getLicenseNum());
|
||||||
|
|
||||||
|
saveReqVO.setCar(carMain);
|
||||||
|
//推送到维修中
|
||||||
|
customerCarService.saveCustomerAndCar(saveReqVO);
|
||||||
|
|
||||||
|
|
||||||
// 收集客户信息
|
// 收集客户信息
|
||||||
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