From 601d2f9df6efa3de3bbc261d5f63628d8e8be6a9 Mon Sep 17 00:00:00 2001
From: zhangzeli <123456>
Date: 星期一, 10 一月 2022 11:20:14 +0800
Subject: [PATCH] bug
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/OrderTaskController.java | 40 ++++++++++++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 4 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 64e9320..13ff276 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
@@ -5,7 +5,9 @@
import cn.exrick.xboot.core.common.utils.SecurityUtil;
import cn.exrick.xboot.core.common.vo.PageVo;
import cn.exrick.xboot.core.common.vo.Result;
+import cn.exrick.xboot.core.entity.Department;
import cn.exrick.xboot.core.entity.User;
+import cn.exrick.xboot.core.service.DepartmentService;
import cn.exrick.xboot.core.service.UserService;
import cn.exrick.xboot.your.entity.*;
import cn.exrick.xboot.your.service.*;
@@ -59,6 +61,12 @@
@Autowired
private ICarService iCarService;
+ @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) {
@@ -78,7 +86,7 @@
QueryWrapper<Area> wrapper3 = new QueryWrapper<Area>();
wrapper3.eq("user_id",one.getFollowUserId());
- area = iAreaService.getOne(wrapper);
+ area = iAreaService.getOne(wrapper3);
return area;
}
return area;
@@ -105,9 +113,11 @@
map.put("sum",sum);
map.put("name","");
if(list.size()>0){
- String areaSectionId = list.get(0).getAreaSectionId();
+ OrderTask orderTask = list.get(0);
+ String areaSectionId = orderTask.getAreaSectionId();
AreaSection a = iAreaSectionService.getById(areaSectionId);
- map.put("name",a.getName());
+ Area area2 = iAreaService.getById(orderTask.getAreaId());
+ map.put("name",area2.getName()+a.getName());
list.clear();
}
return new ResultUtil<Object>().setData(map);
@@ -219,6 +229,15 @@
}
}
map.put("content",content);
+
+ map.put("lng","");
+ map.put("lat","");
+ String deptId = securityUtil.getCurrUser().getDepartmentId();
+ if(StrUtil.isNotEmpty(deptId)){
+ Department department = departmentService.get(deptId);
+ map.put("lng",department.getLng());
+ map.put("lat",department.getLat());
+ }
return new ResultUtil<Object>().setData(map);
}
@@ -233,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);
}
@@ -254,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("娣诲姞鎴愬姛");
}
--
Gitblit v1.9.1