Commit cddf265b authored by 韩桐桐's avatar 韩桐桐

fix(jg):数据查询,校验是否是三环系统数据 (三个入参必须同时满足)

parent be3cc1f0
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sun.org.apache.xpath.internal.operations.Bool;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCar;
......@@ -9,6 +10,8 @@ import com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu;
import com.yeejoin.amos.boot.module.jg.api.service.IShCarService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.ShCarEquServiceImpl;
import io.swagger.annotations.ApiParam;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -40,6 +43,9 @@ import java.util.*;
public class ShCarController extends BaseController {
@Autowired
ShCarEquServiceImpl shCarEquService;
@Autowired
ShCarServiceImpl shCarServiceImpl;
@Autowired
......@@ -161,6 +167,36 @@ public class ShCarController extends BaseController {
return ResponseHelper.buildResponse(shCarServiceImpl.searchForSanHan(map));
}
/**
* 数据查询,校验是否是三环系统数据 (三个入参必须同时满足)
*
* @param useRegistrationCode 使用登记证编号
* @param carNumber 车牌号
* @param identificationCode 车辆VIN码
* @return result
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "数据查询,校验是否是三环系统数据", notes = "数据查询,校验是否是三环系统数据")
@GetMapping(value = "/searchForSanHanAllParams")
public ResponseModel<ShCar> searchForSanHan(@ApiParam(name = "使用登记证编号") @RequestParam String useRegistrationCode,
@ApiParam(name = "车牌号") @RequestParam String carNumber,
@ApiParam(name = "车辆VIN码") @RequestParam String identificationCode) {
if (StringUtils.isEmpty(useRegistrationCode) || StringUtils.isEmpty(carNumber) || StringUtils.isEmpty(identificationCode))
return ResponseHelper.buildResponse(new ShCar());
LambdaQueryWrapper<ShCar> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ShCar::getClaimedFlag, Boolean.FALSE);
wrapper.eq(ShCar::getCarNumber, carNumber.trim());
wrapper.eq(ShCar::getUseRegistrationCode, useRegistrationCode.trim());
wrapper.eq(ShCar::getFrameNumber, identificationCode.trim());
ShCar shCar = shCarServiceImpl.getBaseMapper().selectList(wrapper)
.stream()
.findFirst()
.orElse(new ShCar());
if (StringUtils.isEmpty(shCar.getSequenceNbr()))
return ResponseHelper.buildResponse(new ShCar());
return ResponseHelper.buildResponse(shCar);
}
/**
* 认领三环系统数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment