From c9cbc0947f6fe578d1f178d73a2dd46d95bec275 Mon Sep 17 00:00:00 2001 From: wang-hao-jie <1550036656@qq.com> Date: 星期一, 07 二月 2022 08:40:22 +0800 Subject: [PATCH] 违章记录 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java index c048824..5ed99cf 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java @@ -64,6 +64,9 @@ @Autowired private DepartmentService departmentService; + @Autowired + private IEventLogService iEventLogService; + @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) @ApiOperation(value = "閫氳繃id鑾峰彇") public Result<OrderTask> get(@PathVariable String id) { @@ -249,15 +252,21 @@ @RequestMapping(value = "/signFor", method = RequestMethod.POST) @ApiOperation(value = "绛炬敹") - public Object signFor(String orderId,int status,String content,String customerReceiveId) { + public Object signFor(String orderId,int status,String content,String customerReceiveId,int time,String carId) { if(status==1){ if(StrUtil.isEmpty(customerReceiveId)){ return ResultUtil.error("姝e父绛炬敹锛屾帴璐т汉id蹇呭~"); } } + + if(StrUtil.isEmpty(carId)){ + return ResultUtil.error("杞﹁締id涓嶈兘涓虹┖"); + } OrderTask orderTask = iOrderTaskService.getById(orderId); orderTask.setStatus(status); orderTask.setUserId(securityUtil.getCurrUser().getId()); + orderTask.setTime(time); + orderTask.setCarId(carId); if(StrUtil.isNotEmpty(customerReceiveId)){ orderTask.setCustomerReceiveId(customerReceiveId); } @@ -270,6 +279,13 @@ } } iOrderTaskService.saveOrUpdate(orderTask); + + Car car = iCarService.getById(orderTask.getCarId()); + EventLog eventLog = new EventLog(); + eventLog.setCarNo(car.getCarNo()); + eventLog.setRefId(orderId); + eventLog.setType(6);//6:閰嶉�佸畬鎴� + iEventLogService.saveOrUpdate(eventLog); return ResultUtil.success("娣诲姞鎴愬姛"); } @@ -277,7 +293,7 @@ @ApiOperation(value = "鍒嗛〉鑾峰彇") public Result<IPage<OrderTask>> getByPage(PageVo page) { - IPage<OrderTask> data = iOrderTaskService.page(PageUtil.initMpPage(page)); + IPage<OrderTask> data = iOrderTaskService.page2(PageUtil.initMpPage(page)); return new ResultUtil<IPage<OrderTask>>().setData(data); } -- Gitblit v1.9.1