Commit 8e57b8fc authored by hezhen's avatar hezhen

Merge branch 'master-chw' into dev-chw

parents 88dd7332 50dc5403
......@@ -62,10 +62,10 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
throw new BaseException("参数不能为空",ResultCode.FAILED_CODE);
}
String vehicleId=StringUtils.isBlank(vehicle.getId()) ? "" : vehicle.getId();
/* List<Vehicle> list=vehicleBiz.getListByExample(vehicleId,vehicle.getName());
List<Vehicle> list=vehicleBiz.getListByExample(vehicleId,vehicle.getNumberPlate());
if (list.size() > 0){
throw new BaseException("公司名称不能重复",ResultCode.FAILED_CODE);
}*/
throw new BaseException("车牌号不能重复",ResultCode.FAILED_CODE);
}
setPriceType(vehicle);
VehicleApply vehicleApply=new VehicleApply();
BeanUtils.copyProperties(vehicle,vehicleApply);
......
......@@ -1605,18 +1605,18 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
public List<Vehicle> getListByExample(String vehicleId,String name){
public List<Vehicle> getListByExample(String vehicleId,String numberPlate){
Example example=new Example(Vehicle.class);
example.createCriteria().andEqualTo("name",name).andNotEqualTo("id",vehicleId);
example.createCriteria().andEqualTo("numberPlate",numberPlate).andNotEqualTo("id",vehicleId);
return selectByExample(example);
}
public String addOrUpd(VehicleApply vehicleApply){
String vehicleId=StringUtils.isBlank(vehicleApply.getVehicleId()) ? "" : vehicleApply.getVehicleId();
/* List<Vehicle> list=getListByExample(vehicleId,vehicleApply.getName());
List<Vehicle> list=getListByExample(vehicleId,vehicleApply.getNumberPlate());
if (list.size() > 0){
throw new BaseException("公司名称不能重复", ResultCode.FAILED_CODE);
}*/
throw new BaseException("车牌号不能重复", ResultCode.FAILED_CODE);
}
Vehicle vehicle= JSONUtil.toBean(vehicleApply.getChangeJson(),Vehicle.class);
if (StringUtils.isNotBlank(vehicleId)){
vehicle.setExtensionList(null);
......
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