Commit 6723a534 authored by 周健威's avatar 周健威

申请调车相关

parent 9af4f1f2
......@@ -26,6 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import static com.github.wxiaoqi.security.common.vo.PageDataVO.pageInfo;
import static com.xxfc.platform.order.entity.ShuntApply.STATUS_CNL;
import static com.xxfc.platform.order.entity.ShuntApply.STATUS_CRT;
@RestController
@RequestMapping("shuntApply")
......@@ -57,9 +59,32 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE);
}
shuntApply.setUserId(getCurrentUserIdInt());
shuntApply.setStatus(STATUS_CRT);
return add(shuntApply);
}
@RequestMapping(value = "/cancelApply", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "取消申请")
public ObjectRestResponse addApply(@RequestBody CnlApplyDTO dto) {
//查询列表数据
if (StrUtil.isBlank(getCurrentUserId())) {
throw new BaseException(ResultCode.AJAX_WECHAT_NOTEXIST_CODE);
}
ShuntApply shuntApply = baseBiz.selectById(dto.getApplyId());
if(null == shuntApply) {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE);
}
baseBiz.updateSelectiveById(new ShuntApply(){{
setId(shuntApply.getId());
setStatus(STATUS_CNL);
}});
return ObjectRestResponse.succ();
}
@RequestMapping(value = "/pageList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "申请列表")
......@@ -142,4 +167,9 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
public static class ApplyOrderDTO extends AddRentVehicleDTO {
Integer applyId;
}
@Data
public static class CnlApplyDTO {
Integer applyId;
}
}
\ No newline at end of file
......@@ -52,9 +52,14 @@ public interface VehicleFeign {
@RequestMapping(value = "/vehicleModel/app/addScore", method = RequestMethod.GET)
public RestResponse addScore(@RequestParam(value = "id") Integer id, @RequestParam(value = "score") Integer score);
//租车预约(无需审核)
@RequestMapping(value = "/vehicleInfo/rent/book/vehicle", method = RequestMethod.POST)
public ObjectRestResponse<VehicleBookRecord> rentApplyVehicle(@RequestBody RentVehicleBookDTO rentVehicleBookDTO);
//租车预约(需要审核)
@RequestMapping(value = "/vehicleInfo/apply/book/vehicle", method = RequestMethod.POST)
public ObjectRestResponse<VehicleBookRecord> applyBookVehicle(@RequestBody RentVehicleBookDTO rentVehicleBookDTO);
@RequestMapping(value = "/branchCompany/app/unauth/detail/{id}", method = RequestMethod.GET)
public ObjectRestResponse<CompanyDetail> getCompanyDetail(@PathVariable(value = "id") Integer id);
......
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