From 13c9e4032de40598787a453de77ba0db94666664 Mon Sep 17 00:00:00 2001
From: wjli <591616088@qq.com>
Date: 星期四, 25 五月 2023 15:53:07 +0800
Subject: [PATCH] 接货图片和签收图片的完善
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 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 3b5ff7f..0fb4216 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
@@ -561,6 +561,55 @@
return ResultUtil.success("娣诲姞鎴愬姛");
}
+ @RequestMapping(value = "/signForX", method = RequestMethod.POST)
+ @ApiOperation(value = "绛炬敹")
+ public Object signForX(String orderId, int status, String content, String customerReceiveId, int time, String carId,String img) {
+ 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);
+ }
+ if(StrUtil.isNotEmpty(img)){
+ if(StrUtil.isNotEmpty(orderTask.getImg())){
+ String imgO = orderTask.getImg();
+ orderTask.setImg(imgO+","+img);
+ }else{
+ orderTask.setImg(","+img);
+ }
+ }
+
+ if (!StrUtil.isEmpty(content)) {
+ orderTask.setRemarks(content);
+ } else {
+ if (status == 2) {
+ return ResultUtil.error("璇峰~鍐欏紓甯哥鏀跺師鍥�");
+ }
+ }
+ 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);
+
+ saveLog();
+ return ResultUtil.success("娣诲姞鎴愬姛");
+ }
+
private void saveLog() {
QueryWrapper<OrderLog> wp = new QueryWrapper<>();
wp.eq("type", 2);
--
Gitblit v1.9.1