This commit is contained in:
nyoung 2024-09-02 21:25:04 +08:00
parent a4d7ebc849
commit a75b052167
23 changed files with 130 additions and 89 deletions

View File

@ -10,6 +10,8 @@ import cn.hutool.poi.excel.ExcelWriter;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.core.text.Convert;
import cn.iocoder.yudao.module.core.text.ServletUtils;
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
import cn.iocoder.yudao.module.payment.service.OrderInfoService;
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
@ -127,8 +129,8 @@ public class InspectionMallPartnersController extends BaseController {
}
partner.setPartnerId(worker.getPartnerId());
}
PageHelper.startPage(pageNum,pageSize);
List<InspectionInfo> list = orderInfoService.workOrder(partner.getPartnerId(),carNum,goodsTitle, customerSource, payType,startTime,roleId,endTime);
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
List<InspectionInfo> list = orderInfoService.workOrder(page,partner.getPartnerId(),carNum,goodsTitle, customerSource, payType,startTime,roleId,endTime);
return getDataTable(list);
}
@ -166,8 +168,8 @@ public class InspectionMallPartnersController extends BaseController {
}
partner.setPartnerId(worker.getPartnerId());
}
PageHelper.startPage(pageNum,pageSize);
List<InspectionInfo> list = orderInfoService.delworkOrder(partner.getPartnerId(),carNum,goodsTitle, customerSource, payType,startTime,roleId,endTime);
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
List<InspectionInfo> list = orderInfoService.delworkOrder(page,partner.getPartnerId(),carNum,goodsTitle, customerSource, payType,startTime,roleId,endTime);
return getDataTable(list);
}
@ -195,8 +197,10 @@ public class InspectionMallPartnersController extends BaseController {
}
partner.setPartnerId(worker.getPartnerId());
}
PageHelper.startPage(1,500);
List<InspectionInfo> list = orderInfoService.workOrder(partner.getPartnerId(),carNum,goodsTitle, customerSource, payType,startTime,roleId,endTime);
int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
List<InspectionInfo> list = orderInfoService.workOrder(page,partner.getPartnerId(),carNum,goodsTitle, customerSource, payType,startTime,roleId,endTime);
List<List<String>> rows =new ArrayList<>();
Map<String, Object> stringObjectMap = orderInfoService.workOrderData(partner.getPartnerId(), carNum, goodsTitle, customerSource, payType, startTime, roleId, endTime);

View File

@ -18,6 +18,7 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService;
import cn.iocoder.yudao.module.system.service.dict.DictTypeService;
import cn.iocoder.yudao.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import cn.iocoder.yudao.module.core.controller.BaseController;
import cn.iocoder.yudao.module.core.page.TableDataInfo;
@ -323,8 +324,8 @@ public class PartnerOwnController extends BaseController {
if (!partnersTmp.getUserId().equals(user.getId())){
return null;
}
PageHelper.startPage(pageNum,pageSize);
List<PartnerWorker> workList = partnerList.getWorkList(partnerId,postId, workName, phoneNum);
Page<PartnerWorker> page = new Page<>(pageNum, pageSize);
List<PartnerWorker> workList = partnerList.getWorkList(page,partnerId,postId, workName, phoneNum);
return getDataTable(workList);
}
@ -344,8 +345,8 @@ public class PartnerOwnController extends BaseController {
if (!partnerId.equals(partners.getPartnerId())){
return null;
}
PageHelper.startPage(pageNum,pageSize);
List<InspectionInfo> inspectionInfos = partnerList.inspectionList(partnerId, status, carNum);
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
List<InspectionInfo> inspectionInfos = partnerList.inspectionList(page,partnerId, status, carNum);
return getDataTable(inspectionInfos);
}
@ -365,8 +366,8 @@ public class PartnerOwnController extends BaseController {
if (ObjectUtil.isEmpty(worker)){
return null;
}
PageHelper.startPage(pageNum,pageSize);
List<InspectionInfo> inspectionInfos = partnerList.inspectionList(partnerId, status, searchValue);
Page<InspectionInfo> page = new Page<>(pageNum,pageSize);
List<InspectionInfo> inspectionInfos = partnerList.inspectionList(page,partnerId, status, searchValue);
return getDataTable(inspectionInfos);
}
//增加检测步骤信息

View File

@ -9,6 +9,8 @@ import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.core.text.Convert;
import cn.iocoder.yudao.module.core.text.ServletUtils;
import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService;
import cn.iocoder.yudao.module.payment.service.OrderInfoService;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
@ -20,6 +22,7 @@ import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
@ -201,8 +204,10 @@ public class ShopInspectionGoodsController extends BaseController
}
shopInspectionOrder.setPartnerId(partner.getPartnerId());
shopInspectionOrder.setValidationTime(new Date());
startPage();
List<OrderInfo> list = orderInfoService.orderListSystem(shopInspectionOrder);
int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
Page<OrderInfo> page = new Page<>(pageNum,pageSize);
List<OrderInfo> list = orderInfoService.orderListSystem(page,shopInspectionOrder);
return getDataTable(list);
}

View File

@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory;
import cn.iocoder.yudao.module.inspection.query.PartnerListQuery;
import cn.iocoder.yudao.module.inspection.vo.*;
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -31,8 +32,8 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
List<HotGoodsVo> hotGoodsList(@Param("partnerId") Long partnerId,@Param("dateStr")String dateStr);
List<GoodsVo> manageGoodsList(@Param("partnerId") Long partnerId, @Param("isListing")String isListing,@Param("goodsTitle") String goodsTitle);
List<OrderAppDetail> orderList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum,@Param("title") String title);
List<PartnerWorker> getWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum);
List<InspectionInfo> inspectionList(@Param("partnerId")Long partnerId,@Param("status") String status, @Param("carNum")String carNum);
List<PartnerWorker> getWorkList(Page<PartnerWorker> page,@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum);
List<InspectionInfo> inspectionList(Page<InspectionInfo> page,@Param("partnerId")Long partnerId, @Param("status") String status, @Param("carNum")String carNum);
List<InspectionInfo> workerInspectionList(@Param("workerId")Long workerId,@Param("status") String status, @Param("searchValue")String searchValue);
List<OrderInfo> validationList(@Param("partnerId") Long partnerId, @Param("searchValue") String searchValue);
List<InspectionPickCar> getPickCarList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum, @Param("pickStatus") String pickStatus);

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -65,11 +66,11 @@ public interface InspectionInfoMapper extends BaseMapper<InspectionInfo>
* @return 结果
*/
public int deleteInspectionInfoByIds(Long[] ids);
List<InspectionInfo> workOrder(@Param("partnerId") Long partnerId, @Param("carNum")String carNum, @Param("goodsTitle")String goodsTitle
,@Param("customerSource")String customerSource,@Param("payType")String payType,@Param("startTime")String startTime
,@Param("roleId") Long roleId,@Param("endTime")String endTime);
List<InspectionInfo> workOrder(Page<InspectionInfo> page,@Param("partnerId") Long partnerId, @Param("carNum")String carNum, @Param("goodsTitle")String goodsTitle
, @Param("customerSource")String customerSource, @Param("payType")String payType, @Param("startTime")String startTime
, @Param("roleId") Long roleId, @Param("endTime")String endTime);
List<InspectionInfo> delworkOrder(@Param("partnerId") Long partnerId, @Param("carNum")String carNum, @Param("goodsTitle")String goodsTitle
List<InspectionInfo> delworkOrder(Page<InspectionInfo> page,@Param("partnerId") Long partnerId, @Param("carNum")String carNum, @Param("goodsTitle")String goodsTitle
,@Param("customerSource")String customerSource,@Param("payType")String payType,@Param("startTime")String startTime
,@Param("roleId") Long roleId,@Param("endTime")String endTime);

View File

@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.iocoder.yudao.module.inspection.entity.*;
import cn.iocoder.yudao.module.inspection.query.PartnerListQuery;
@ -52,11 +53,11 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
Long orderDetailByCode(Long partnerId,String code) throws Exception;
void takeOut(Long partnerId,Long orderId,Long workId,String carNum) throws Exception;
void addWorker(Long partnerId,String realName,String phoneNum,Long postId) throws Exception;
List<PartnerWorker> getWorkList(Long partnerId, Long postId, String workName, String phoneNum);
List<PartnerWorker> getWorkList(Page<PartnerWorker> page,Long partnerId, Long postId, String workName, String phoneNum);
void delWorker(Long partnerId,Long workId);
List<InspectionInfo> inspectionList(Long partnerId,String status,String carNum);
List<InspectionInfo> inspectionList(Page<InspectionInfo> page,Long partnerId, String status, String carNum);
InspectionInfoVo inspectionDetail(Long inspectionInfoId);
List<InspectionInfo> workerInspectionList(Long partnerId,String status,String searchValue);

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.inspection.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo;
@ -61,8 +62,8 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
* @return 结果
*/
public int deleteInspectionInfoById(Long id);
List<InspectionInfo> workOrder(Long partnerId, String carNum, String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime);
List<InspectionInfo> delworkOrder(Long partnerId, String carNum, String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime);
List<InspectionInfo> workOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
List<InspectionInfo> delworkOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime);
Map<String,Object> workOrderData(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);

View File

@ -37,6 +37,7 @@ import cn.iocoder.yudao.util.SendSmsUtil;
import cn.iocoder.yudao.util.VehicleLicenseOCR;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import cn.iocoder.yudao.util.StringUtils;
@ -1055,8 +1056,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
}
@Override
public List<PartnerWorker> getWorkList(Long partnerId,Long postId,String workName,String phoneNum) {
return baseMapper.getWorkList(partnerId,postId,workName,phoneNum);
public List<PartnerWorker> getWorkList(Page<PartnerWorker> page,Long partnerId,Long postId,String workName,String phoneNum) {
return baseMapper.getWorkList(page,partnerId,postId,workName,phoneNum);
}
@Override
@ -1070,8 +1071,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
}
@Override
public List<InspectionInfo> inspectionList(Long partnerId,String status,String carNum) {
return baseMapper.inspectionList(partnerId,status,carNum);
public List<InspectionInfo> inspectionList(Page<InspectionInfo> page,Long partnerId, String status, String carNum) {
return baseMapper.inspectionList(page,partnerId,status,carNum);
}
@Override

View File

@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import cn.iocoder.yudao.util.SendSmsUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.iocoder.yudao.util.StringUtils;
import cn.iocoder.yudao.module.inspection.entity.*;
@ -105,12 +106,12 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
LambdaQueryWrapper<PartnerWorker> workerQueryWrapper =new LambdaQueryWrapper<>();
workerQueryWrapper.eq(PartnerWorker::getUserId,loginUser.getId()).eq(PartnerWorker::getPartnerId,partners.getPartnerId());
PartnerWorker worker = workerService.getOne(workerQueryWrapper);
AdminUserDO workerUser =userService.getUser(worker.getUserId());
if (ObjectUtils.isNotEmpty(worker)){
inspectionInfo.setWorkId(worker.getId());
}else {
throw new Exception("请先将接待员加入员工");
}
AdminUserDO workerUser =userService.getUser(worker.getUserId());
String buyName = StringUtils.isNotEmpty(inspectionInfo.getBuyName())?inspectionInfo.getBuyName():"未知客户";
String buyPhone = StringUtils.isNotEmpty(inspectionInfo.getBuyPhone())?inspectionInfo.getBuyPhone():StringUtils.isNotEmpty(inspectionInfo.getBuyName())?inspectionInfo.getBuyName():"";
AdminUserDO user = userService.getUserByMobile(buyPhone);
@ -296,13 +297,13 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
return baseMapper.deleteInspectionInfoById(id);
}
@Override
public List<InspectionInfo> workOrder(Long partnerId, String carNum, String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime){
return baseMapper.workOrder(partnerId,carNum,goodsTitle, customerSource, payType, startTime,roleId,endTime);
public List<InspectionInfo> workOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime){
return baseMapper.workOrder(page,partnerId,carNum,goodsTitle, customerSource, payType, startTime,roleId,endTime);
}
@Override
public List<InspectionInfo> delworkOrder(Long partnerId, String carNum, String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime){
return baseMapper.delworkOrder(partnerId,carNum,goodsTitle, customerSource, payType, startTime,roleId,endTime);
public List<InspectionInfo> delworkOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime){
return baseMapper.delworkOrder(page,partnerId,carNum,goodsTitle, customerSource, payType, startTime,roleId,endTime);
}
@Override

View File

@ -3,11 +3,14 @@ package cn.iocoder.yudao.module.partner.controller;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.core.controller.BaseController;
import cn.iocoder.yudao.module.core.page.TableDataInfo;
import cn.iocoder.yudao.module.core.text.Convert;
import cn.iocoder.yudao.module.core.text.ServletUtils;
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
import cn.iocoder.yudao.module.partner.service.IPartnerCustomerInfoService;
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
import cn.iocoder.yudao.util.ExcelUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@ -35,8 +38,10 @@ public class PartnerCustomerInfoController extends BaseController
public TableDataInfo list(PartnerCustomerInfo partnerCustomerInfo) throws Exception {
ShopMallPartners partners = partnerService.shopInfo();
partnerCustomerInfo.setPartnerId(partners.getPartnerId());
startPage();
List<PartnerCustomerInfo> list = partnerCustomerInfoService.selectPartnerCustomerInfoList(partnerCustomerInfo);
int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
Page<PartnerCustomerInfo> page = new Page<>(pageNum,pageSize);
List<PartnerCustomerInfo> list = partnerCustomerInfoService.selectPartnerCustomerInfoList(page,partnerCustomerInfo);
return getDataTable(list);
}
@ -47,7 +52,8 @@ public class PartnerCustomerInfoController extends BaseController
@PostMapping("/export")
public void export(HttpServletResponse response, PartnerCustomerInfo partnerCustomerInfo)
{
List<PartnerCustomerInfo> list = partnerCustomerInfoService.selectPartnerCustomerInfoList(partnerCustomerInfo);
Page<PartnerCustomerInfo> page = new Page<>();
List<PartnerCustomerInfo> list = partnerCustomerInfoService.selectPartnerCustomerInfoList(page,partnerCustomerInfo);
ExcelUtil<PartnerCustomerInfo> util = new ExcelUtil<PartnerCustomerInfo>(PartnerCustomerInfo.class);
util.exportExcel(response, list, "客户信息数据");
}

View File

@ -3,7 +3,9 @@ package cn.iocoder.yudao.module.partner.mapper;
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -22,7 +24,7 @@ public interface PartnerCustomerInfoMapper extends BaseMapper<PartnerCustomerInf
* @param partnerCustomerInfo 客户信息
* @return 客户信息集合
*/
public List<PartnerCustomerInfo> selectPartnerCustomerInfoList(PartnerCustomerInfo partnerCustomerInfo);
public List<PartnerCustomerInfo> selectPartnerCustomerInfoList(Page<PartnerCustomerInfo> page ,@Param("vo") PartnerCustomerInfo partnerCustomerInfo);
/**
* 查询客户信息

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.partner.service;
import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
@ -19,7 +20,7 @@ public interface IPartnerCustomerInfoService extends IService<PartnerCustomerInf
* @param partnerCustomerInfo 客户信息
* @return 客户信息集合
*/
public List<PartnerCustomerInfo> selectPartnerCustomerInfoList(PartnerCustomerInfo partnerCustomerInfo);
public List<PartnerCustomerInfo> selectPartnerCustomerInfoList(Page<PartnerCustomerInfo> page ,PartnerCustomerInfo partnerCustomerInfo);
/**
* 查询客户信息

View File

@ -17,6 +17,7 @@ import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import cn.iocoder.yudao.util.DateUtils;
import cn.iocoder.yudao.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
@ -56,13 +57,11 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
* @return 客户信息
*/
@Override
public List<PartnerCustomerInfo> selectPartnerCustomerInfoList(PartnerCustomerInfo partnerCustomerInfo)
public List<PartnerCustomerInfo> selectPartnerCustomerInfoList(Page<PartnerCustomerInfo> page ,PartnerCustomerInfo partnerCustomerInfo)
{
List<PartnerCustomerInfo> partnerCustomerInfos = baseMapper.selectPartnerCustomerInfoList(partnerCustomerInfo);
List<PartnerCustomerInfo> partnerCustomerInfos = baseMapper.selectPartnerCustomerInfoList(page,partnerCustomerInfo);
for (PartnerCustomerInfo customerInfo : partnerCustomerInfos) {
LambdaQueryWrapper<ShopUserCar> queryWrapper1 =new LambdaQueryWrapper<>();
queryWrapper1.eq(ShopUserCar::getUserId,customerInfo.getUserId());
List<ShopUserCar> list = userCarService.list(queryWrapper1);
List<ShopUserCar> list = userCarService.selectUserCarsByUserId(customerInfo.getUserId());
if (CollectionUtil.isNotEmpty(list)){
customerInfo.setUserCarList(list);
}else {
@ -105,11 +104,13 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
RoleDO role = roleService.queryRole("jcyh");
UserSaveReqVO userSaveReqVO = new UserSaveReqVO();
user = new AdminUserDO();
BeanUtils.copyProperties(partnerCustomerInfo,user);
userSaveReqVO.setUsername(partnerCustomerInfo.getCustomerPhone());
userSaveReqVO.setNickname(partnerCustomerInfo.getCustomerName());
Long uid = userService.createUser(new UserSaveReqVO());
userSaveReqVO.setPassword("123456");
Long uid = userService.createUser(userSaveReqVO);
user.setId(uid);
Set<Long> ids = new HashSet<>();
ids.add(role.getId());
permissionService.assignUserRole(uid,ids);
@ -182,14 +183,12 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl<PartnerCustomerI
shopUserCar.setUserId(partnerCustomerInfo.getUserId());
}
if (CollectionUtil.isNotEmpty(userCarList)){
LambdaQueryWrapper<ShopUserCar> queryWrapper1 =new LambdaQueryWrapper<>();
queryWrapper1.eq(ShopUserCar::getUserId,partnerCustomerInfo.getUserId());
userCarService.remove(queryWrapper1);
userCarService.deleteShopUserCarByUserId(partnerCustomerInfo.getUserId());
userCarService.saveBatch(userCarList);
}
if (!StringUtils.isEmpty(partnerCustomerInfo.getCustomerPhone())&&!StringUtils.isEmpty(partnerCustomerInfo.getRoleCode())){
AdminUserDO sysUser = userService.selectUserByPhone(partnerCustomerInfo.getCustomerPhone());
RoleDO sysRole = roleService.queryRole(partnerCustomerInfo.getRoleCode());
// RoleDO sysRole = roleService.queryRole(partnerCustomerInfo.getRoleCode());
if (ObjectUtils.isNotEmpty(sysUser)){
Set<Long> ids = new HashSet<Long>();

View File

@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.core.controller.BaseController;
import cn.iocoder.yudao.module.core.page.PageDomain;
import cn.iocoder.yudao.module.core.page.TableDataInfo;
import cn.iocoder.yudao.module.core.page.TableSupport;
import cn.iocoder.yudao.module.core.text.Convert;
import cn.iocoder.yudao.module.core.text.ServletUtils;
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
import cn.iocoder.yudao.module.payment.entity.OrderInfo;
import cn.iocoder.yudao.module.payment.entity.commentVo;
@ -119,8 +121,10 @@ public class OrderController extends BaseController {
*/
@GetMapping("/orderListSystem")
public TableDataInfo orderListSystem(OrderInfo shopInspectionOrder) {
startPage();
List<OrderInfo> list = orderInfoService.orderListSystem(shopInspectionOrder);
int pageNum = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
int pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
Page<OrderInfo> page = new Page<>(pageNum,pageSize);
List<OrderInfo> list = orderInfoService.orderListSystem(page,shopInspectionOrder);
return getDataTable(list);
}

View File

@ -29,7 +29,7 @@ public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
List<InspectionInfo> inspectionList(@Param("status") String status, @Param("userId")Long userId);
List<OrderInfo> orderListSystem(OrderInfo orderInfo);
List<OrderInfo> orderListSystem(Page<OrderInfo> page,@Param("vo") OrderInfo orderInfo);
List<JSONObject> statisticsZXTMonth(@Param("partnerId") Long partnerId,@Param("startTime")String startTime,@Param("endTime")String endTime);

View File

@ -20,10 +20,10 @@ import java.util.Map;
public interface OrderInfoService extends IService<OrderInfo> {
void reviewOrder(String orderId,Integer starLevel,String reviewStr) throws Exception;
List<OrderInfo> orderListApp(String status, String title, String type);
List<InspectionInfo> workOrder(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
List<InspectionInfo> workOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
Map<String,Object> workOrderData(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime);
List<InspectionInfo> delworkOrder(Long partnerId,String carNum,String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime);
List<OrderInfo> orderListSystem(OrderInfo orderInfo);
List<InspectionInfo> delworkOrder(Page<InspectionInfo> page,Long partnerId,String carNum,String goodsTitle,String customerSource,String payType,String startTime,Long roleId,String endTime);
List<OrderInfo> orderListSystem(Page<OrderInfo> page,OrderInfo orderInfo);
Long createOrder(OrderInfo orderInfo) throws Exception;
JSONObject pickCarDetail(Long pickCarId);

View File

@ -106,14 +106,14 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
@Override
public List<InspectionInfo> workOrder(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime) {
public List<InspectionInfo> workOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime) {
if (StringUtils.isNotEmpty(startTime)){
startTime = startTime+" 00:00:00";
}
if (StringUtils.isNotEmpty(endTime)){
endTime = endTime+" 23:59:59";
}
return iInspectionInfoService.workOrder(partnerId,carNum,goodsTitle, customerSource, payType, startTime, roleId,endTime);
return iInspectionInfoService.workOrder(page,partnerId,carNum,goodsTitle, customerSource, payType, startTime, roleId,endTime);
}
@Override
@ -128,19 +128,19 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
@Override
public List<InspectionInfo> delworkOrder(Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime) {
public List<InspectionInfo> delworkOrder(Page<InspectionInfo> page,Long partnerId, String carNum, String goodsTitle, String customerSource, String payType, String startTime, Long roleId, String endTime) {
if (StringUtils.isNotEmpty(startTime)){
startTime = startTime+" 00:00:00";
}
if (StringUtils.isNotEmpty(endTime)){
endTime = endTime+" 23:59:59";
}
return iInspectionInfoService.delworkOrder(partnerId,carNum,goodsTitle, customerSource, payType, startTime, roleId,endTime);
return iInspectionInfoService.delworkOrder(page,partnerId,carNum,goodsTitle, customerSource, payType, startTime, roleId,endTime);
}
@Override
public List<OrderInfo> orderListSystem(OrderInfo orderInfo) {
return baseMapper.orderListSystem(orderInfo);
public List<OrderInfo> orderListSystem(Page<OrderInfo> page,OrderInfo orderInfo) {
return baseMapper.orderListSystem(page,orderInfo);
}
@Override

View File

@ -73,4 +73,6 @@ public interface ShopUserCarMapper extends BaseMapper<ShopUserCar>
List<ShopUserCar> getDbCars(Long userId);
ShopUserCar selectUserCarsByUserIdCarNum(@Param("userId") Long userId,@Param("carNum") String carNum);
void deleteShopUserCarByUserId(Long userId);
}

View File

@ -74,4 +74,6 @@ public interface IShopUserCarService extends IService<ShopUserCar>
JSONObject appVehicleLicenseOCR2(String imagePath) throws Exception;
void infoCardOCR( String imagePath) throws TencentCloudSDKException;
JSONObject getInfoCard();
void deleteShopUserCarByUserId(Long userId);
}

View File

@ -399,6 +399,12 @@ public class ShopUserCarServiceImpl extends ServiceImpl<ShopUserCarMapper,ShopUs
res.put("idCardImage",sysUser.getIdCardImage());
return res;
}
@Override
public void deleteShopUserCarByUserId(Long userId) {
baseMapper.deleteShopUserCarByUserId(userId);
}
//处理年检日期保养日期
void dealCarDate(ShopUserCar shopUserCar){
//注册日期

View File

@ -24,17 +24,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectPartnerCustomerInfoList" parameterType="cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo" resultMap="PartnerCustomerInfoResult">
select pci.*,sr.name from partner_customer_info pci
select pci.*,sr.name as roleName,sr.code as roleCode from partner_customer_info pci
left join shop_user_car suc on suc.user_id = pci.user_id
left join system_users su on su.id = pci.user_id
left join system_user_role sur on sur.user_id = su.id
left join system_role sr on sr.id = sur.role_id
<where>
and pci.partner_id = #{partnerId}
<if test="carNum != null and carNum != ''"> and suc.car_no like concat('%', #{carNum}, '%')</if>
<if test="customerName != null and customerName != ''"> and pci.customer_name like concat('%', #{customerName}, '%')</if>
<if test="customerPhone != null and customerPhone != ''"> and pci.customer_phone like concat('%', #{customerPhone}, '%')</if>
<if test="roleCode != null and roleCode != ''"> and sr.code = #{roleCode}</if>
and pci.partner_id = #{vo.partnerId}
<if test="vo.carNum != null and vo.carNum != ''"> and suc.car_no like concat('%', #{vo.carNum}, '%')</if>
<if test="vo.customerName != null and vo.customerName != ''"> and pci.customer_name like concat('%', #{vo.customerName}, '%')</if>
<if test="vo.customerPhone != null and vo.customerPhone != ''"> and pci.customer_phone like concat('%', #{vo.customerPhone}, '%')</if>
<if test="vo.roleCode != null and vo.roleCode != ''"> and sr.code = #{vo.roleCode}</if>
</where>
group by pci.id

View File

@ -59,38 +59,38 @@
LEFT JOIN system_users su ON su.id = oi.user_id
left join shop_user_car suc on suc.car_id = oi.user_car_id
where 1=1
<if test="orderStatus!=null and orderStatus!='' ">
and oi.order_status = #{orderStatus}
<if test="vo.orderStatus!=null and vo.orderStatus!='' ">
and oi.order_status = #{vo.orderStatus}
</if>
<if test="validationTime!=null">
<if test="vo.validationTime!=null">
and oi.validation_time is not null
</if>
<if test="realName!=null and realName!='' ">
and oi.real_name like concat('%',#{realName},'%')
<if test="vo.realName!=null and vo.realName!='' ">
and oi.real_name like concat('%',#{vo.realName},'%')
</if>
<if test="orderNo!=null and orderNo!='' ">
and oi.order_no like concat('%',#{orderNo},'%')
<if test="vo.orderNo!=null and vo.orderNo!='' ">
and oi.order_no like concat('%',#{vo.orderNo},'%')
</if>
<if test="goodsTitle!=null and goodsTitle!='' ">
and oi.goods_title like concat('%',#{goodsTitle},'%')
<if test="vo.goodsTitle!=null and vo.goodsTitle!='' ">
and oi.goods_title like concat('%',#{vo.goodsTitle},'%')
</if>
<if test="validationRealName!=null and validationRealName!='' ">
and oi.validation_real_name like concat('%',#{validationRealName},'%')
<if test="vo.validationRealName!=null and vo.validationRealName!='' ">
and oi.validation_real_name like concat('%',#{vo.validationRealName},'%')
</if>
<if test="phonenumber!=null and phonenumber!='' ">
and su.mobile like concat('%',#{phonenumber},'%')
<if test="vo.phonenumber!=null and vo.phonenumber!='' ">
and su.mobile like concat('%',#{vo.phonenumber},'%')
</if>
<if test="realPayMoney!=null ">
and oi.pay_money <![CDATA[>=]]> #{realPayMoney}
<if test="vo.realPayMoney!=null ">
and oi.pay_money <![CDATA[>=]]> #{vo.realPayMoney}
</if>
<if test="startTime!=null ">
and oi.pay_time <![CDATA[>=]]> #{startTime}
<if test="vo.startTime!=null ">
and oi.pay_time <![CDATA[>=]]> #{vo.startTime}
</if>
<if test="endTime!=null ">
and oi.pay_time <![CDATA[<=]]> #{endTime}
<if test="vo.endTime!=null ">
and oi.pay_time <![CDATA[<=]]> #{vo.endTime}
</if>
<if test="partnerId!=null ">
and oi.partner_id = #{partnerId}
<if test="vo.partnerId!=null ">
and oi.partner_id = #{vo.partnerId}
</if>
order by order_time desc
</select>

View File

@ -152,7 +152,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{carId}
</foreach>
</delete>
<delete id="deleteShopUserCarByUserId">
delete from shop_user_car
where user_id = #{userId}
</delete>
</mapper>