Browse Source

陆运修改

Signed-off-by: sunhz <mpcoo@foxmail.com>
sunhz 3 years ago
parent
commit
e5ecf189fe
22 changed files with 935 additions and 87 deletions
  1. 1 1
      blade-ops/blade-report/pom.xml
  2. 48 0
      blade-ops/blade-report/src/main/java/org/springblade/report/ureport/LandBean.java
  3. 34 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/dto/OrderTrackDTO.java
  4. 9 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/OrderItem.java
  5. 109 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/OrderTrack.java
  6. 23 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/feign/ILandClient.java
  7. 36 0
      blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/OrderTrackVO.java
  8. 17 5
      blade-service/blade-land/pom.xml
  9. 74 0
      blade-service/blade-land/src/main/java/org/springblade/land/config/XxlJobConfig.java
  10. 5 13
      blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderIndexController.java
  11. 21 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderItemController.java
  12. 126 0
      blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderTrackController.java
  13. 129 0
      blade-service/blade-land/src/main/java/org/springblade/land/handler/JobHandler.java
  14. 43 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/OrderTrackMapper.java
  15. 27 0
      blade-service/blade-land/src/main/java/org/springblade/land/mapper/OrderTrackMapper.xml
  16. 16 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/IOrderItemService.java
  17. 41 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/IOrderTrackService.java
  18. 115 65
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderItemServiceImpl.java
  19. 7 3
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderServiceImpl.java
  20. 41 0
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderTrackServiceImpl.java
  21. 12 0
      blade-service/blade-land/src/main/resources/application.yml
  22. 1 0
      pom.xml

+ 1 - 1
blade-ops/blade-report/pom.xml

@@ -58,7 +58,7 @@
         </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
-            <artifactId>blade-deliver-goods-api</artifactId>
+            <artifactId>blade-land-api</artifactId>
             <version>2.8.2.RELEASE</version>
             <scope>compile</scope>
         </dependency>

+ 48 - 0
blade-ops/blade-report/src/main/java/org/springblade/report/ureport/LandBean.java

@@ -0,0 +1,48 @@
+package org.springblade.report.ureport;
+
+import lombok.AllArgsConstructor;
+import org.springblade.land.entity.OrderItem;
+import org.springblade.land.feign.ILandClient;
+import org.springblade.report.util.ParamUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+@Component
+@AllArgsConstructor
+public class LandBean {
+
+	private final ILandClient landClient;
+
+	public List<OrderItem> loadLandItemData(String dsName, String datasetName, Map<String, Object> params) {
+		String orderNo = ParamUtil.getString(params.get("orderNo"));
+		Long corpId = ParamUtil.getLong(params.get("corpId"));
+		String addressDetail = ParamUtil.getString(params.get("addressDetail"));
+		String billNo = ParamUtil.getString(params.get("billNo"));
+		String ctnType = ParamUtil.getString(params.get("ctnType"));
+		Long fleetId = ParamUtil.getLong(params.get("fleetId"));
+		Long vehicleId = ParamUtil.getLong(params.get("vehicleId"));
+		Long driverId = ParamUtil.getLong(params.get("driverId"));
+		String tel = ParamUtil.getString(params.get("tel"));
+		String beginArrivalTime = ParamUtil.getString(params.get("beginArrivalTime"));
+		String endArrivalTime = ParamUtil.getString(params.get("endArrivalTime"));
+		String tenantId = ParamUtil.getString(params.get("tenantId"));
+
+		OrderItem item = new OrderItem();
+		item.setOrderNo(orderNo);
+		item.setCorpId(corpId);
+		item.setAddressDetail(addressDetail);
+		item.setBillNo(billNo);
+		item.setCtnType(ctnType);
+		item.setFleetId(fleetId);
+		item.setVehicleId(vehicleId);
+		item.setDriverId(driverId);
+		item.setTel(tel);
+		item.setBeginArrivalTime(beginArrivalTime);
+		item.setEndArrivalTime(endArrivalTime);
+		item.setTenantId(tenantId);
+		item.setTag(0);
+		return landClient.listReport(item).getData();
+	}
+}

+ 34 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/dto/OrderTrackDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.dto;
+
+import org.springblade.land.entity.OrderTrack;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 陆运订单轨迹表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrderTrackDTO extends OrderTrack {
+	private static final long serialVersionUID = 1L;
+
+}

+ 9 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/OrderItem.java

@@ -329,6 +329,9 @@ public class OrderItem implements Serializable {
 	private Integer isDeleted;
 
 	@TableField(exist = false)
+	private Long corpId;
+
+	@TableField(exist = false)
 	private String corpName;
 
 	@TableField(exist = false)
@@ -395,6 +398,12 @@ public class OrderItem implements Serializable {
 	private BigDecimal profit;
 
 	@TableField(exist = false)
+	private String businessType;
+
+	@TableField(exist = false)
+	private String shippingMode;
+
+	@TableField(exist = false)
 	private String source;
 
 }

+ 109 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/OrderTrack.java

@@ -0,0 +1,109 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 陆运订单轨迹表实体类
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+@Data
+@TableName("land_order_track")
+@ApiModel(value = "OrderTrack对象", description = "陆运订单轨迹表")
+public class OrderTrack implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	@TableId
+	private Long id;
+	/**
+	 * 明细ID
+	 */
+	@ApiModelProperty(value = "明细ID")
+	private Long itemId;
+	/**
+	 * 车牌号
+	 */
+	@ApiModelProperty(value = "车牌号")
+	private String plateNo;
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty(value = "经度")
+	private String lon;
+	/**
+	 * 纬度
+	 */
+	@ApiModelProperty(value = "纬度")
+	private String lat;
+	/**
+	 * 地址
+	 */
+	@ApiModelProperty(value = "地址")
+	private String adr;
+	/**
+	 * 定位时间
+	 */
+	@ApiModelProperty(value = "定位时间")
+	private String utc;
+	/**
+	 * 速度(km/h)
+	 */
+	@ApiModelProperty(value = "速度(km/h)")
+	private String spd;
+	/**
+	 * 方向
+	 */
+	@ApiModelProperty(value = "方向")
+	private String drc;
+	/**
+	 * 省
+	 */
+	@ApiModelProperty(value = "省")
+	private String province;
+	/**
+	 * 市
+	 */
+	@ApiModelProperty(value = "市")
+	private String city;
+	/**
+	 * 县
+	 */
+	@ApiModelProperty(value = "县")
+	private String country;
+	/**
+	 * 时间
+	 */
+	@ApiModelProperty(value = "时间")
+	private Date createTime;
+
+
+}

+ 23 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/feign/ILandClient.java

@@ -0,0 +1,23 @@
+package org.springblade.land.feign;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.land.entity.OrderItem;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+@FeignClient(
+	value = "blade-land"
+)
+public interface ILandClient {
+
+	String LAND_ORDER_ITEM = "/order-item";
+
+	String LIST_REPORT = LAND_ORDER_ITEM + "/list-report";
+
+	@PostMapping(LIST_REPORT)
+	R<List<OrderItem>> listReport(@RequestBody OrderItem orderItem);
+
+}

+ 36 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/vo/OrderTrackVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.vo;
+
+import org.springblade.land.entity.OrderTrack;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 陆运订单轨迹表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "OrderTrackVO对象", description = "陆运订单轨迹表")
+public class OrderTrackVO extends OrderTrack {
+	private static final long serialVersionUID = 1L;
+
+}

+ 17 - 5
blade-service/blade-land/pom.xml

@@ -37,12 +37,21 @@
             <groupId>org.springblade</groupId>
             <artifactId>blade-starter-swagger</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-transaction</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-core-boot</artifactId>
         </dependency>
 
+        <!--Job-->
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-client-api</artifactId>
@@ -61,11 +70,14 @@
             <version>2.8.2.RELEASE</version>
             <scope>compile</scope>
         </dependency>
+
         <dependency>
-            <groupId>org.springblade</groupId>
-            <artifactId>blade-starter-transaction</artifactId>
+            <groupId>com.sinoiov</groupId>
+            <artifactId>openapi-sdk</artifactId>
+            <version>6.0</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/src/main/resources/lib/sinoiov.jar</systemPath>
         </dependency>
-    </dependencies>
-
 
+    </dependencies>
 </project>

+ 74 - 0
blade-service/blade-land/src/main/java/org/springblade/land/config/XxlJobConfig.java

@@ -0,0 +1,74 @@
+package org.springblade.land.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Configuration
+public class XxlJobConfig {
+	private final Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+	@Value("${xxl.job.admin.addresses}")
+	private String adminAddresses;
+
+	@Value("${xxl.job.executor.appname}")
+	private String appName;
+
+	@Value("${xxl.job.executor.ip}")
+	private String ip;
+
+	@Value("${xxl.job.executor.port}")
+	private int port;
+
+	@Value("${xxl.job.accessToken}")
+	private String accessToken;
+
+	@Value("${xxl.job.executor.logpath}")
+	private String logPath;
+
+	@Value("${xxl.job.executor.logretentiondays}")
+	private int logRetentionDays;
+
+
+	@Bean
+	public XxlJobSpringExecutor xxlJobExecutor() {
+		logger.info(">>>>>>>>>>> xxl-job config init.");
+		XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+		xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+		xxlJobSpringExecutor.setAppName(appName);
+		xxlJobSpringExecutor.setIp(ip);
+		xxlJobSpringExecutor.setPort(port);
+		xxlJobSpringExecutor.setAccessToken(accessToken);
+		xxlJobSpringExecutor.setLogPath(logPath);
+		xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+
+		return xxlJobSpringExecutor;
+	}
+
+	/**
+	 * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
+	 *
+	 *      1、引入依赖:
+	 *          <dependency>
+	 *             <groupId>org.springframework.cloud</groupId>
+	 *             <artifactId>spring-cloud-commons</artifactId>
+	 *             <version>${version}</version>
+	 *         </dependency>
+	 *
+	 *      2、配置文件,或者容器启动变量
+	 *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
+	 *
+	 *      3、获取IP
+	 *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
+	 */
+
+
+}

+ 5 - 13
blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderIndexController.java

@@ -17,37 +17,29 @@
 package org.springblade.land.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
 import org.springblade.client.entity.CorpsDesc;
 import org.springblade.client.feign.ICorpsDescClient;
 import org.springblade.client.feign.ILandVehicleClient;
 import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.CollectionUtil;
-import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.ObjectUtil;
-import org.springblade.core.tool.utils.StringUtil;
 import org.springblade.land.entity.Order;
 import org.springblade.land.entity.OrderItem;
 import org.springblade.land.service.IOrderItemService;
 import org.springblade.land.service.IOrderService;
-import org.springblade.land.vo.OrderItemVO;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
  * 陆运订单明细表 控制器
@@ -74,7 +66,7 @@ public class OrderIndexController extends BladeController {
 	 */
 	@GetMapping("/count")
 	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "统计", notes = "")
+	@ApiOperation(value = "统计")
 	public R count() {
 		// 今日新增柜数
 		int newly = orderItemService.count(new LambdaQueryWrapper<OrderItem>()
@@ -124,7 +116,7 @@ public class OrderIndexController extends BladeController {
 	 */
 	@GetMapping("/active")
 	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "运行车辆", notes = "")
+	@ApiOperation(value = "运行车辆")
 	public R<List<OrderItem>> active() {
 		LambdaQueryWrapper<OrderItem> itemQueryWrapper = new LambdaQueryWrapper<>();
 		itemQueryWrapper.in(OrderItem::getStatus, 2, 3, 5)

+ 21 - 0
blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderItemController.java

@@ -33,6 +33,7 @@ import org.springblade.land.vo.OrderItemVO;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * 陆运订单明细表 控制器
@@ -70,6 +71,16 @@ public class OrderItemController extends BladeController {
 	}
 
 	/**
+	 * 陆运订单明细报表
+	 */
+	@PostMapping("/list-report")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入orderItem")
+	public R<List<OrderItem>> listReport(@RequestBody OrderItem orderItem) {
+		return R.data(orderItemService.getListNoPage(orderItem));
+	}
+
+	/**
 	 * 统计
 	 */
 	@GetMapping("/count")
@@ -202,6 +213,16 @@ public class OrderItemController extends BladeController {
 	}
 
 	/**
+	 * 提箱
+	 */
+	@GetMapping("/borrow")
+	@ApiOperationSupport(order = 14)
+	@ApiOperation(value = "提箱", notes = "传入id")
+	public R borrow(Long id) {
+		return R.status(orderItemService.borrow(id));
+	}
+
+	/**
 	 * 到厂
 	 */
 	@GetMapping("/arrival")

+ 126 - 0
blade-service/blade-land/src/main/java/org/springblade/land/controller/OrderTrackController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.land.entity.OrderTrack;
+import org.springblade.land.service.IOrderTrackService;
+import org.springblade.land.vo.OrderTrackVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 陆运订单轨迹表 控制器
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/order-track")
+@Api(value = "陆运订单轨迹表", tags = "陆运订单轨迹表接口")
+public class OrderTrackController extends BladeController {
+
+	private final IOrderTrackService orderTrackService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderTrack")
+	public R<OrderTrack> detail(OrderTrack orderTrack) {
+		OrderTrack detail = orderTrackService.getOne(Condition.getQueryWrapper(orderTrack));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 陆运订单轨迹表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入orderTrack")
+	public R<IPage<OrderTrack>> list(OrderTrack orderTrack, Query query) {
+		IPage<OrderTrack> pages = orderTrackService.page(Condition.getPage(query), Condition.getQueryWrapper(orderTrack));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 陆运订单轨迹表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入orderTrack")
+	public R<IPage<OrderTrackVO>> page(OrderTrackVO orderTrack, Query query) {
+		IPage<OrderTrackVO> pages = orderTrackService.selectOrderTrackPage(Condition.getPage(query), orderTrack);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 陆运订单轨迹表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入orderTrack")
+	public R save(@Valid @RequestBody OrderTrack orderTrack) {
+		return R.status(orderTrackService.save(orderTrack));
+	}
+
+	/**
+	 * 修改 陆运订单轨迹表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入orderTrack")
+	public R update(@Valid @RequestBody OrderTrack orderTrack) {
+		return R.status(orderTrackService.updateById(orderTrack));
+	}
+
+	/**
+	 * 新增或修改 陆运订单轨迹表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入orderTrack")
+	public R submit(@Valid @RequestBody OrderTrack orderTrack) {
+		return R.status(orderTrackService.saveOrUpdate(orderTrack));
+	}
+
+
+	/**
+	 * 删除 陆运订单轨迹表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(orderTrackService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 129 - 0
blade-service/blade-land/src/main/java/org/springblade/land/handler/JobHandler.java

@@ -0,0 +1,129 @@
+package org.springblade.land.handler;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.openapi.sdk.service.DataExchangeService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import com.xxl.job.core.log.XxlJobLogger;
+import lombok.AllArgsConstructor;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.StringUtil;
+import org.springblade.land.entity.OrderItem;
+import org.springblade.land.entity.OrderTrack;
+import org.springblade.land.service.IOrderItemService;
+import org.springblade.land.service.IOrderTrackService;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.*;
+
+@Component
+@AllArgsConstructor
+public class JobHandler {
+
+	private final IOrderItemService orderItemService;
+
+	private final IOrderTrackService orderTrackService;
+
+	private static final Map<String, String> TOKEN = new ConcurrentHashMap<>();
+
+	private static final String SUCCESS = "1001";
+
+	private static final String OVERTIME = "1013";
+
+	private static final String LOGIN_URL = "https://openapi-test.sinoiov.cn/save/apis/login";
+
+	private static final String BS_URL = "https://openapi-test.sinoiov.cn/save/apis/transTimeManage";
+
+	@XxlJob("locateJobHandler")
+	public ReturnT<String> locateJobHandler(String param) throws Exception {
+		try {
+			JSONObject json = JSON.parseObject(param);
+			String tenantId = json.getString("tenantId");
+			String token = getToken(json);
+
+			List<OrderItem> itemList = orderItemService.list(new LambdaQueryWrapper<OrderItem>()
+				.in(OrderItem::getStatus, 2, 3, 5, 6)
+				.eq(OrderItem::getKind, 2)
+				.eq(OrderItem::getIsDeleted, 0)
+				.eq(OrderItem::getTenantId, tenantId)
+			);
+
+			// 创建线程池
+			ExecutorService newFixedThreadPool = new ThreadPoolExecutor(5, 200, 0L,
+				TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(1024),
+				Executors.defaultThreadFactory(),
+				new ThreadPoolExecutor.AbortPolicy());
+			for (OrderItem item : itemList) {
+				newFixedThreadPool.execute(() -> {
+					// 业务处理
+					try {
+						String data = getData(json, token, item.getPlateNo());
+						OrderTrack track = JSON.parseObject(data, OrderTrack.class);
+						if (!ObjectUtil.isEmpty(track)) {
+							track.setItemId(item.getId());
+							track.setPlateNo(item.getPlateNo());
+							orderTrackService.save(track);
+						}
+					} catch (Exception e) {
+						XxlJobLogger.log(e);
+					}
+				});
+			}
+			return ReturnT.SUCCESS;
+		} catch (Exception e) {
+			XxlJobLogger.log(e);
+			return ReturnT.FAIL;
+		}
+	}
+
+	private String getToken(JSONObject json) throws Exception {
+		String tenantId = json.getString("tenantId");
+		String token = TOKEN.get(tenantId);
+		if (StringUtil.isNotBlank(token)) {
+			return token;
+		}
+
+		Map<String, String> map = new HashMap<>(4);
+		map.put("user", json.getString("user"));
+		map.put("pwd", json.getString("pwd"));
+		map.put("srt", json.getString("srt"));
+		map.put("cid", json.getString("cid"));
+
+		DataExchangeService des = new DataExchangeService(5000, 8000);
+		String res = des.postHttps(LOGIN_URL, map);
+
+		JSONObject result = JSON.parseObject(res);
+		if (!SUCCESS.equals(result.getString("status"))) {
+			throw new RuntimeException("登录失败:" + result.getString("status"));
+		}
+		TOKEN.put(tenantId, result.getString("result"));
+		return result.getString("result");
+	}
+
+	private String getData(JSONObject json, String token, String plateNo) throws Exception {
+		Map<String, String> map = new HashMap<>(4);
+		map.put("token", token);
+		map.put("cid", json.getString("cid"));
+		map.put("srt", json.getString("srt"));
+		map.put("vclN", plateNo);
+		map.put("vco", "2");
+
+		DataExchangeService des = new DataExchangeService(5000, 8000);
+		String res = des.postHttps(BS_URL, map);
+
+		JSONObject result = JSON.parseObject(res);
+		if (!SUCCESS.equals(result.getString("status"))) {
+			if (!OVERTIME.equals(result.getString("status"))) {
+				throw new RuntimeException("获取数据失败:" + result.getString("status"));
+			}
+			return null;
+		}
+		return result.getString("result");
+	}
+
+}

+ 43 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/OrderTrackMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.land.entity.OrderTrack;
+import org.springblade.land.vo.OrderTrackVO;
+
+import java.util.List;
+
+/**
+ * 陆运订单轨迹表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+public interface OrderTrackMapper extends BaseMapper<OrderTrack> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param orderTrack
+	 * @return
+	 */
+	List<OrderTrackVO> selectOrderTrackPage(IPage page, OrderTrackVO orderTrack);
+
+}

+ 27 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/OrderTrackMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.land.mapper.OrderTrackMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderTrackResultMap" type="org.springblade.land.entity.OrderTrack">
+        <id column="id" property="id"/>
+        <result column="item_id" property="itemId"/>
+        <result column="plate_no" property="plateNo"/>
+        <result column="lon" property="lon"/>
+        <result column="lat" property="lat"/>
+        <result column="adr" property="adr"/>
+        <result column="utc" property="utc"/>
+        <result column="spd" property="spd"/>
+        <result column="drc" property="drc"/>
+        <result column="province" property="province"/>
+        <result column="city" property="city"/>
+        <result column="country" property="country"/>
+        <result column="create_time" property="createTime"/>
+    </resultMap>
+
+
+    <select id="selectOrderTrackPage" resultMap="orderTrackResultMap">
+        select * from land_order_track where is_deleted = 0
+    </select>
+
+</mapper>

+ 16 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/IOrderItemService.java

@@ -53,6 +53,14 @@ public interface IOrderItemService extends IService<OrderItem> {
 	IPage<OrderItem> getList(OrderItem orderItem, Query query);
 
 	/**
+	 * 列表
+	 *
+	 * @param orderItem
+	 * @return
+	 */
+	List<OrderItem> getListNoPage(OrderItem orderItem);
+
+	/**
 	 * 列表 统计
 	 *
 	 * @param orderItem
@@ -125,6 +133,14 @@ public interface IOrderItemService extends IService<OrderItem> {
 	boolean cancelAccept(Long id);
 
 	/**
+	 * 提箱
+	 *
+	 * @param id
+	 * @return
+	 */
+	boolean borrow(Long id);
+
+	/**
 	 * 到厂
 	 *
 	 * @param id

+ 41 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/IOrderTrackService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.land.entity.OrderTrack;
+import org.springblade.land.vo.OrderTrackVO;
+
+/**
+ * 陆运订单轨迹表 服务类
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+public interface IOrderTrackService extends IService<OrderTrack> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param orderTrack
+	 * @return
+	 */
+	IPage<OrderTrackVO> selectOrderTrackPage(IPage<OrderTrackVO> page, OrderTrackVO orderTrack);
+
+}

+ 115 - 65
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderItemServiceImpl.java

@@ -88,78 +88,21 @@ public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem
 
 	@Override
 	public IPage<OrderItem> getList(OrderItem orderItem, Query query) {
-		List<Long> orderIdList = Collections.emptyList();
-		if (StringUtil.isNotBlank(orderItem.getBelongCompany()) || StringUtil.isNotBlank(orderItem.getStation()) || StringUtil.isNotBlank(orderItem.getFactory())) {
-			orderIdList = orderMapper.selectList(new LambdaQueryWrapper<Order>()
-				.like(StringUtil.isNotBlank(orderItem.getBelongCompany()), Order::getBelongCompany, orderItem.getBelongCompany())
-				.like(StringUtil.isNotBlank(orderItem.getStation()), Order::getStation, orderItem.getStation())
-				.like(StringUtil.isNotBlank(orderItem.getFactory()), Order::getFactory, orderItem.getFactory())
-				.like(StringUtil.isNotBlank(orderItem.getAddressDetail()), Order::getAddressDetail, orderItem.getAddressDetail())
-				.between(StringUtil.isNotBlank(orderItem.getBeginCrateTime()) && StringUtil.isNotBlank(orderItem.getEndCrateTime()), Order::getCreateTime, orderItem.getBeginCrateTime(), orderItem.getEndCrateTime())
-				.eq(Order::getIsDeleted, 0)
-				.eq(Order::getTenantId, AuthUtil.getTenantId())
-			).stream().map(Order::getId).collect(Collectors.toList());
-
-			if (CollectionUtil.isEmpty(orderIdList)) {
-				return new Page<>();
-			}
-		}
-
-		LambdaQueryWrapper<OrderItem> itemQueryWrapper = new LambdaQueryWrapper<>();
-		if (orderItem.getTag() == 4) {
-			itemQueryWrapper.notIn(OrderItem::getStatus, 0, 1);
-		} else if (orderItem.getTag() == 3) {
-			itemQueryWrapper.notIn(OrderItem::getStatus, 0);
+		LambdaQueryWrapper<OrderItem> wrapper = getWrapper(orderItem);
+		if (ObjectUtil.isEmpty(wrapper)) {
+			return new Page<>();
 		}
 
-		itemQueryWrapper.in(CollectionUtil.isNotEmpty(orderIdList), OrderItem::getOrderId, orderIdList)
-			.like(StringUtil.isNotBlank(orderItem.getGoods()), OrderItem::getGoods, orderItem.getGoods())
-			.like(StringUtil.isNotBlank(orderItem.getBillNo()), OrderItem::getBillNo, orderItem.getBillNo())
-			.like(StringUtil.isNotBlank(orderItem.getTel()), OrderItem::getTel, orderItem.getTel())
-			.like(StringUtil.isNotBlank(orderItem.getCtnNo()), OrderItem::getCtnNo, orderItem.getCtnNo())
-			.between(StringUtil.isNotBlank(orderItem.getBeginArrivalTime()) && StringUtil.isNotBlank(orderItem.getEndArrivalTime()), OrderItem::getArrivalTime, orderItem.getBeginArrivalTime(), orderItem.getEndArrivalTime())
-			.eq(ObjectUtil.isNotEmpty(orderItem.getFleetId()), OrderItem::getFleetId, orderItem.getFleetId())
-			.eq(ObjectUtil.isNotEmpty(orderItem.getVehicleId()), OrderItem::getVehicleId, orderItem.getVehicleId())
-			.eq(ObjectUtil.isNotEmpty(orderItem.getDriverId()), OrderItem::getDriverId, orderItem.getDriverId())
-			.eq(ObjectUtil.isNotEmpty(orderItem.getStatus()), OrderItem::getStatus, orderItem.getStatus())
-			.eq(OrderItem::getKind, 2)
-			.eq(OrderItem::getIsDeleted, 0)
-			.eq(OrderItem::getTenantId, AuthUtil.getTenantId())
-			.orderByDesc(OrderItem::getUpdateTime);
-		IPage<OrderItem> pages = baseMapper.selectPage(Condition.getPage(query), itemQueryWrapper);
+		IPage<OrderItem> pages = baseMapper.selectPage(Condition.getPage(query), wrapper);
 		pages.getRecords().forEach(record -> {
 			Order order = orderMapper.selectById(record.getOrderId());
-			record.setOrderNo(order.getOrderNo());
-			record.setBelongCompany(order.getBelongCompany());
-			record.setStation(order.getStation());
-			record.setFactory(order.getFactory());
-			record.setAddressDetail(order.getAddressDetail());
-
-			if (ObjectUtil.isNotEmpty(order.getCorpId())) {
-				R<CorpsDesc> corp = corpsDescClient.getCorpMessage(order.getCorpId());
-				if (corp.isSuccess() && corp.getData() != null) {
-					record.setCorpName(corp.getData().getCname());
-				}
-			}
-			if (ObjectUtil.isNotEmpty(record.getFleetId())) {
-				R<CorpsDesc> fleet = corpsDescClient.getCorpMessage(record.getFleetId());
-				if (fleet.isSuccess() && fleet.getData() != null) {
-					record.setFleetName(fleet.getData().getCname());
-				}
-			}
-			if (ObjectUtil.isNotEmpty(record.getDriverId())) {
-				LandDriver driver = landDriverClient.getDriver(record.getDriverId());
-				record.setDriverName(driver.getName());
-			}
-
-			if (orderItem.getTag() == 0) {
-				BigDecimal d = record.getLandAmountD().add(record.getOneFeeD()).add(record.getTwoFeeD()).add(record.getThreeFeeD()).add(record.getFourFeeD()).add(record.getFiveFeeD());
-				BigDecimal c = record.getLandAmountC().add(record.getOneFeeC()).add(record.getTwoFeeC()).add(record.getThreeFeeC()).add(record.getFourFeeC()).add(record.getFiveFeeC());
-				record.setProfit(d.subtract(c));
-			}
+			filling(record, order, orderItem.getTag());
 
 			// 手机端
 			if (StringUtil.isNotBlank(orderItem.getSource())) {
+				record.setBusinessType(order.getBusinessType());
+				record.setShippingMode(order.getShippingMode());
+
 				List<OrderAddress> orderAddressList = orderAddressMapper.selectList(new LambdaQueryWrapper<OrderAddress>()
 					.eq(OrderAddress::getOrderId, record.getOrderId())
 					.eq(OrderAddress::getIsDeleted, 0)
@@ -171,6 +114,21 @@ public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem
 	}
 
 	@Override
+	public List<OrderItem> getListNoPage(OrderItem orderItem) {
+		LambdaQueryWrapper<OrderItem> wrapper = getWrapper(orderItem);
+		if (ObjectUtil.isEmpty(wrapper)) {
+			return new ArrayList<>();
+		}
+
+		List<OrderItem> itemList = baseMapper.selectList(wrapper);
+		itemList.forEach(item -> {
+			Order order = orderMapper.selectById(item.getOrderId());
+			filling(item, order, orderItem.getTag());
+		});
+		return itemList;
+	}
+
+	@Override
 	public Map<String, Object> getCount(OrderItem orderItem) {
 		LambdaQueryWrapper<OrderItem> itemQueryWrapper = new LambdaQueryWrapper<>();
 		if (orderItem.getTag() == 4) {
@@ -437,6 +395,22 @@ public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	@GlobalTransactional(rollbackFor = Exception.class)
+	public boolean borrow(Long id) {
+		OrderItem item = new OrderItem();
+		item.setId(id);
+		item.setStatus(6);
+		item.setBorrowTime(new Date());
+		item.setUpdateUser(AuthUtil.getUserId());
+		item.setUpdateTime(new Date());
+		baseMapper.updateById(item);
+
+		addChange(id, "提箱", 1);
+		return true;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@GlobalTransactional(rollbackFor = Exception.class)
 	public boolean arrival(Long id) {
 		OrderItem item = new OrderItem();
 		item.setId(id);
@@ -624,6 +598,82 @@ public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem
 		orderChangeMapper.insert(change);
 	}
 
+	private LambdaQueryWrapper<OrderItem> getWrapper(OrderItem orderItem) {
+		List<Long> orderIdList = Collections.emptyList();
+		if (ObjectUtil.isNotEmpty(orderItem.getCorpId()) || StringUtil.isNotBlank(orderItem.getStation())
+			|| StringUtil.isNotBlank(orderItem.getFactory()) || StringUtil.isNotBlank(orderItem.getOrderNo())) {
+			orderIdList = orderMapper.selectList(new LambdaQueryWrapper<Order>()
+				.eq(ObjectUtil.isNotEmpty(orderItem.getCorpId()), Order::getCorpId, orderItem.getCorpId())
+				.like(StringUtil.isNotBlank(orderItem.getOrderNo()), Order::getOrderNo, orderItem.getOrderNo())
+				.like(StringUtil.isNotBlank(orderItem.getStation()), Order::getStation, orderItem.getStation())
+				.like(StringUtil.isNotBlank(orderItem.getFactory()), Order::getFactory, orderItem.getFactory())
+				.like(StringUtil.isNotBlank(orderItem.getAddressDetail()), Order::getAddressDetail, orderItem.getAddressDetail())
+				.eq(Order::getIsDeleted, 0)
+				.eq(Order::getTenantId, AuthUtil.getTenantId())
+			).stream().map(Order::getId).collect(Collectors.toList());
+
+			if (CollectionUtil.isEmpty(orderIdList)) {
+				return null;
+			}
+		}
+
+		LambdaQueryWrapper<OrderItem> itemQueryWrapper = new LambdaQueryWrapper<>();
+		if (orderItem.getTag() == 4) {
+			itemQueryWrapper.notIn(OrderItem::getStatus, 0, 1);
+		} else if (orderItem.getTag() == 3) {
+			itemQueryWrapper.notIn(OrderItem::getStatus, 0);
+		}
+
+		itemQueryWrapper.in(CollectionUtil.isNotEmpty(orderIdList), OrderItem::getOrderId, orderIdList)
+			.like(StringUtil.isNotBlank(orderItem.getGoods()), OrderItem::getGoods, orderItem.getGoods())
+			.like(StringUtil.isNotBlank(orderItem.getBillNo()), OrderItem::getBillNo, orderItem.getBillNo())
+			.like(StringUtil.isNotBlank(orderItem.getTel()), OrderItem::getTel, orderItem.getTel())
+			.like(StringUtil.isNotBlank(orderItem.getCtnNo()), OrderItem::getCtnNo, orderItem.getCtnNo())
+			.between(StringUtil.isNotBlank(orderItem.getBeginArrivalTime()) && StringUtil.isNotBlank(orderItem.getEndArrivalTime()), OrderItem::getArrivalTime, orderItem.getBeginArrivalTime(), orderItem.getEndArrivalTime())
+			.between(StringUtil.isNotBlank(orderItem.getBeginCrateTime()) && StringUtil.isNotBlank(orderItem.getEndCrateTime()), OrderItem::getCreateTime, orderItem.getBeginCrateTime(), orderItem.getEndCrateTime())
+			.eq(StringUtil.isNotBlank(orderItem.getCtnType()), OrderItem::getCtnType, orderItem.getCtnType())
+			.eq(ObjectUtil.isNotEmpty(orderItem.getFleetId()), OrderItem::getFleetId, orderItem.getFleetId())
+			.eq(ObjectUtil.isNotEmpty(orderItem.getVehicleId()), OrderItem::getVehicleId, orderItem.getVehicleId())
+			.eq(ObjectUtil.isNotEmpty(orderItem.getDriverId()), OrderItem::getDriverId, orderItem.getDriverId())
+			.eq(ObjectUtil.isNotEmpty(orderItem.getStatus()), OrderItem::getStatus, orderItem.getStatus())
+			.eq(OrderItem::getKind, 2)
+			.eq(OrderItem::getIsDeleted, 0)
+			.eq(OrderItem::getTenantId, AuthUtil.getTenantId())
+			.orderByDesc(OrderItem::getUpdateTime);
+		return itemQueryWrapper;
+	}
+
+	private void filling(OrderItem item, Order order, Integer tag) {
+		item.setOrderNo(order.getOrderNo());
+		item.setBelongCompany(order.getBelongCompany());
+		item.setStation(order.getStation());
+		item.setFactory(order.getFactory());
+		item.setAddressDetail(order.getAddressDetail());
+
+		if (ObjectUtil.isNotEmpty(order.getCorpId())) {
+			R<CorpsDesc> corp = corpsDescClient.getCorpMessage(order.getCorpId());
+			if (corp.isSuccess() && corp.getData() != null) {
+				item.setCorpName(corp.getData().getCname());
+			}
+		}
+		if (ObjectUtil.isNotEmpty(item.getFleetId())) {
+			R<CorpsDesc> fleet = corpsDescClient.getCorpMessage(item.getFleetId());
+			if (fleet.isSuccess() && fleet.getData() != null) {
+				item.setFleetName(fleet.getData().getCname());
+			}
+		}
+		if (ObjectUtil.isNotEmpty(item.getDriverId())) {
+			LandDriver driver = landDriverClient.getDriver(item.getDriverId());
+			item.setDriverName(driver.getName());
+		}
+
+		if (tag == 0) {
+			BigDecimal d = item.getLandAmountD().add(item.getOneFeeD()).add(item.getTwoFeeD()).add(item.getThreeFeeD()).add(item.getFourFeeD()).add(item.getFiveFeeD());
+			BigDecimal c = item.getLandAmountC().add(item.getOneFeeC()).add(item.getTwoFeeC()).add(item.getThreeFeeC()).add(item.getFourFeeC()).add(item.getFiveFeeC());
+			item.setProfit(d.subtract(c));
+		}
+	}
+
 	private void sendMsgToCorp(OrderItem item, String mold) {
 		item.setSendUserId(item.getCreateUser());
 		sendMsg(MessageUtil.toCorp(item, mold));

+ 7 - 3
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderServiceImpl.java

@@ -431,7 +431,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 		long orderId = order.getId();
 
 		BigDecimal freight = BigDecimal.ZERO;
-		for (OrderItem item : order.getItemList()) {
+		List<OrderItem> itemList = order.getItemList();
+		for (OrderItem item : itemList) {
 			if (ObjectUtil.isEmpty(item.getId())) {
 				item.setOrderId(orderId);
 				item.setBillNo(order.getBillNo());
@@ -471,7 +472,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 					.append(address.getCorpName()).append("(")
 					.append(address.getContacts()).append(" ")
 					.append(address.getTel()).append(") ")
-					.append(address.getAddress()).append(";\n");
+					.append(address.getAddress()).append("\n");
 			}
 		}
 
@@ -500,7 +501,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 
 		order.setFreight(freight);
 		if (addressDetail.length() > 0) {
-			order.setAddressDetail(addressDetail.deleteCharAt(addressDetail.lastIndexOf(";")).toString());
+			order.setAddressDetail(addressDetail.deleteCharAt(addressDetail.lastIndexOf("\n")).toString());
+		}
+		if (CollectionUtil.isNotEmpty(itemList)) {
+			order.setArrivalTime(itemList.get(0).getArrivalTime());
 		}
 		baseMapper.updateById(order);
 		return orderId;

+ 41 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/OrderTrackServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.land.entity.OrderTrack;
+import org.springblade.land.mapper.OrderTrackMapper;
+import org.springblade.land.service.IOrderTrackService;
+import org.springblade.land.vo.OrderTrackVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 陆运订单轨迹表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-04-22
+ */
+@Service
+public class OrderTrackServiceImpl extends ServiceImpl<OrderTrackMapper, OrderTrack> implements IOrderTrackService {
+
+	@Override
+	public IPage<OrderTrackVO> selectOrderTrackPage(IPage<OrderTrackVO> page, OrderTrackVO orderTrack) {
+		return page.setRecords(baseMapper.selectOrderTrackPage(page, orderTrack));
+	}
+
+}

+ 12 - 0
blade-service/blade-land/src/main/resources/application.yml

@@ -11,3 +11,15 @@ oss:
   access-key: D99KGE6ZTQXSATTJWU24
   secret-key: QyVqGnhIQQE734UYSUFlGOZViE6+ZlDEfUG3NjhJ
   bucket-name: bladex
+
+xxl:
+  job:
+    accessToken: ''
+    admin:
+      addresses: http://127.0.0.1:10031/xxl-job-admin
+    executor:
+      appname: blade-land
+      ip: 127.0.0.1
+      logpath: applogs/xxl-job/jobhandler
+      logretentiondays: -1
+      port: 10032

+ 1 - 0
pom.xml

@@ -129,6 +129,7 @@
                     <configuration>
                         <fork>true</fork>
                         <finalName>${project.build.finalName}</finalName>
+                        <includeSystemScope>true</includeSystemScope>
                     </configuration>
                     <executions>
                         <execution>