Commit 91312b8b authored by hezhen's avatar hezhen

Merge branch 'dev-chw' of http://113.105.137.151:22280/youjj/cloud-platform into dev-chw

parents 068d69cb 658d642e
...@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.common.util.Query; ...@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.common.util.Query;
import com.github.wxiaoqi.security.common.util.ReflectionUtils; import com.github.wxiaoqi.security.common.util.ReflectionUtils;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -24,6 +25,10 @@ import java.util.Map; ...@@ -24,6 +25,10 @@ import java.util.Map;
*/ */
@Slf4j @Slf4j
public class BaseController<Biz extends BaseBiz,Entity> extends CommonBaseController{ public class BaseController<Biz extends BaseBiz,Entity> extends CommonBaseController{
public static Logger getLog() {
return log;
}
@Autowired @Autowired
protected Biz baseBiz; protected Biz baseBiz;
......
...@@ -186,7 +186,6 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp ...@@ -186,7 +186,6 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
@ResponseBody @ResponseBody
@ApiOperation(value = "申请调车下单") @ApiOperation(value = "申请调车下单")
public ObjectRestResponse applyOrder(@RequestBody ApplyOrderDTO dto) { public ObjectRestResponse applyOrder(@RequestBody ApplyOrderDTO dto) {
//查询列表数据 //查询列表数据
if (StrUtil.isBlank(getCurrentUserId())) { if (StrUtil.isBlank(getCurrentUserId())) {
throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE); throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE);
...@@ -311,7 +310,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp ...@@ -311,7 +310,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
ShuntApply shuntApply = baseBiz.selectById(dto.getApplyId()); ShuntApply shuntApply = baseBiz.selectById(dto.getApplyId());
if(null == shuntApply || shuntApply.getStatus() != STATUS_CRT) { if(null == shuntApply || shuntApply.getStatus() != STATUS_CRT) {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE); throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE,Sets.newSet("该需求已失效"));
} }
RentVehicleBO detail = new RentVehicleBO(); RentVehicleBO detail = new RentVehicleBO();
...@@ -331,8 +330,13 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp ...@@ -331,8 +330,13 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
setBookEndDateTime(DateUtil.date(shuntApply.getEndTime()).toString()); setBookEndDateTime(DateUtil.date(shuntApply.getEndTime()).toString());
}}); }});
try {
//预约车辆 //预约车辆
orderRentVehicleService.acquireVehicle(detail, null , null); orderRentVehicleService.acquireVehicle(detail, null , null);
}catch (Exception e) {
getLog().error(e.getMessage(), e);
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE,Sets.newSet("无法选择该车辆"));
}
shuntApply.setVehicleId(dto.getVehicleId()); shuntApply.setVehicleId(dto.getVehicleId());
shuntApply.setStatus(STATUS_CONFIRM); shuntApply.setStatus(STATUS_CONFIRM);
......
...@@ -13,9 +13,13 @@ import java.util.Date; ...@@ -13,9 +13,13 @@ import java.util.Date;
@Data @Data
@Table(name = "vehicle") @Table(name = "vehicle")
public class Vehicle { public class Vehicle {
/**
* 1--房车、2--机车、3--游艇、4--豪车
*/
public static final int GOODS_TYPE_RV = 1; public static final int GOODS_TYPE_RV = 1;
public static final int GOODS_TYPE_HM = 2; public static final int GOODS_TYPE_HM = 2;
public static final int GOODS_TYPE_YACHT = 3; public static final int GOODS_TYPE_YACHT = 3;
public static final int GOODS_TYPE_LUXURY = 3;
public static final int STATE_UP = 1; public static final int STATE_UP = 1;
public static final int STATE_DOWN = 2; public static final int STATE_DOWN = 2;
......
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