|
@@ -15,14 +15,11 @@ import com.aoyang.tms.controller.vo.TruckOrderManageVO;
|
|
|
import com.aoyang.tms.controller.vo.TruckOrderStatisticsVO;
|
|
import com.aoyang.tms.controller.vo.TruckOrderStatisticsVO;
|
|
|
import com.aoyang.tms.entity.*;
|
|
import com.aoyang.tms.entity.*;
|
|
|
import com.aoyang.tms.feign.MessageFeign;
|
|
import com.aoyang.tms.feign.MessageFeign;
|
|
|
-import com.aoyang.tms.feign.UserFeignClient;
|
|
|
|
|
import com.aoyang.tms.feign.result.SmsSendLog;
|
|
import com.aoyang.tms.feign.result.SmsSendLog;
|
|
|
import com.aoyang.tms.service.*;
|
|
import com.aoyang.tms.service.*;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -249,6 +246,19 @@ public class WorkOrderManageController {
|
|
|
userName = URLDecoder.decode(userName, "UTF-8");
|
|
userName = URLDecoder.decode(userName, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException ignored) {
|
|
} catch (UnsupportedEncodingException ignored) {
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 保存卸车点
|
|
|
|
|
+ WorkSpot workSpot = new WorkSpot();
|
|
|
|
|
+ workSpot.setOrgId(orgId);
|
|
|
|
|
+ workSpot.setType(2);
|
|
|
|
|
+ workSpot.setSpotName(orderVO.getSpotName());
|
|
|
|
|
+ workSpot.setContactName(orderVO.getContactName());
|
|
|
|
|
+ workSpot.setContactPhone(orderVO.getContactPhone());
|
|
|
|
|
+ workSpot.setCreater(userId);
|
|
|
|
|
+ workSpot.setCreaterName(userName);
|
|
|
|
|
+ workSpot.setCreateDate(LocalDateTime.now());
|
|
|
|
|
+ workSpotService.save(workSpot);
|
|
|
|
|
+
|
|
|
String ids = orderVO.getTruckIds();
|
|
String ids = orderVO.getTruckIds();
|
|
|
String[] truckIds = ids.split(",");
|
|
String[] truckIds = ids.split(",");
|
|
|
List<WorkOrder> workOrders = new ArrayList<>(truckIds.length);
|
|
List<WorkOrder> workOrders = new ArrayList<>(truckIds.length);
|
|
@@ -258,6 +268,8 @@ public class WorkOrderManageController {
|
|
|
StringBuffer monbiles = new StringBuffer();
|
|
StringBuffer monbiles = new StringBuffer();
|
|
|
WorkOrder workOrder = new WorkOrder();
|
|
WorkOrder workOrder = new WorkOrder();
|
|
|
BeanUtils.copyProperties(orderVO, workOrder);
|
|
BeanUtils.copyProperties(orderVO, workOrder);
|
|
|
|
|
+ workOrder.setSpotId(workSpot.getSpotId());
|
|
|
|
|
+ workOrder.setSpotName(workSpot.getSpotName());
|
|
|
workOrder.setTruckId(Long.parseLong(truckId));
|
|
workOrder.setTruckId(Long.parseLong(truckId));
|
|
|
workOrder.setType(2);
|
|
workOrder.setType(2);
|
|
|
workOrder.setOrderStatus(WorkOrderEnum.TODO.orderStatus());
|
|
workOrder.setOrderStatus(WorkOrderEnum.TODO.orderStatus());
|
|
@@ -319,18 +331,6 @@ public class WorkOrderManageController {
|
|
|
}
|
|
}
|
|
|
Boolean flag = workOrderService.saveBatch(workOrders);
|
|
Boolean flag = workOrderService.saveBatch(workOrders);
|
|
|
|
|
|
|
|
- // 保存卸车点
|
|
|
|
|
- WorkSpot workSpot = new WorkSpot();
|
|
|
|
|
- workSpot.setOrgId(orgId);
|
|
|
|
|
- workSpot.setType(2);
|
|
|
|
|
- workSpot.setSpotName(orderVO.getSpotName());
|
|
|
|
|
- workSpot.setContactName(orderVO.getContactName());
|
|
|
|
|
- workSpot.setContactPhone(orderVO.getContactPhone());
|
|
|
|
|
- workSpot.setCreater(userId);
|
|
|
|
|
- workSpot.setCreaterName(userName);
|
|
|
|
|
- workSpot.setCreateDate(LocalDateTime.now());
|
|
|
|
|
- flag = workSpotService.save(workSpot);
|
|
|
|
|
-
|
|
|
|
|
return new Result<>(flag);
|
|
return new Result<>(flag);
|
|
|
}
|
|
}
|
|
|
|
|
|