init
This commit is contained in:
3
sl-express-ms-driver-api/.gitignore
vendored
Normal file
3
sl-express-ms-driver-api/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.idea
|
||||
target/
|
||||
*.iml
|
||||
0
sl-express-ms-driver-api/README.md
Normal file
0
sl-express-ms-driver-api/README.md
Normal file
44
sl-express-ms-driver-api/pom.xml
Normal file
44
sl-express-ms-driver-api/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.sl-express</groupId>
|
||||
<artifactId>sl-express-parent</artifactId>
|
||||
<version>1.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.sl-express.ms.driver</groupId>
|
||||
<artifactId>sl-express-ms-driver-api</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<description>司机微服务-Feign接口</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
<sl-express-common.version>1.2-SNAPSHOT</sl-express-common.version>
|
||||
<sl-express-ms-driver-domain.version>1.1-SNAPSHOT</sl-express-ms-driver-domain.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sl-express.common</groupId>
|
||||
<artifactId>sl-express-common</artifactId>
|
||||
<version>${sl-express-common.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sl-express.ms.driver</groupId>
|
||||
<artifactId>sl-express-ms-driver-domain</artifactId>
|
||||
<version>${sl-express-ms-driver-domain.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.sl.ms.driver.api;
|
||||
|
||||
|
||||
import com.sl.ms.driver.domain.dto.request.*;
|
||||
import com.sl.ms.driver.domain.dto.response.DriverJobDTO;
|
||||
import com.sl.ms.driver.domain.dto.response.DriverJobStatisticsDTO;
|
||||
import com.sl.ms.driver.domain.enums.DriverJobStatus;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
@ApiIgnore
|
||||
@FeignClient(value = "sl-express-ms-driver", contextId = "DriverJob", path = "driver-job")
|
||||
public interface DriverJobFeign {
|
||||
|
||||
/**
|
||||
* 更新司机作业状态,不允许 PENDING 状态,PROCESSING:出库业务,COMPLETED:入库业务
|
||||
*
|
||||
* @param id 司机作业单id
|
||||
* @param status 司机任务状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
@PutMapping
|
||||
boolean updateStatus(@RequestParam("id") Long id, @RequestParam("status") DriverJobStatus status);
|
||||
|
||||
/**
|
||||
* 根据id获取司机作业单信息
|
||||
*
|
||||
* @param id 司机作业单id
|
||||
* @return 司机作业单信息
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
DriverJobDTO findById(@PathVariable("id") Long id);
|
||||
|
||||
/**
|
||||
* 根据运输任务删除司机作业单
|
||||
*
|
||||
* @param transportTaskId 运输任务id
|
||||
* @return 是否成功
|
||||
*/
|
||||
@DeleteMapping("removeByTransportTaskId/{transportTaskId}")
|
||||
boolean removeByTransportTaskId(@PathVariable("transportTaskId") Long transportTaskId);
|
||||
|
||||
/**
|
||||
* 根据运输任务生成司机作业单
|
||||
*
|
||||
* @param transportTaskId 运输任务id
|
||||
* @param driverId 司机id
|
||||
* @return 司机作业单id
|
||||
*/
|
||||
@PostMapping("createDriverJob/{transportTaskId}/{driverId}")
|
||||
Long createDriverJob(@PathVariable("transportTaskId") Long transportTaskId, @PathVariable("driverId") Long driverId);
|
||||
|
||||
/**
|
||||
* 司机入库,修改运单的当前节点和下个节点 以及 修改运单为待调度状态,结束运输任务
|
||||
*
|
||||
* @param driverDeliverDTO 司机作业单id
|
||||
*/
|
||||
@PostMapping("intoStorage")
|
||||
void intoStorage(@RequestBody DriverDeliverDTO driverDeliverDTO);
|
||||
|
||||
/**
|
||||
* 司机出库,修改运单为运输中状态,开始运输任务
|
||||
*
|
||||
* @param driverPickUpDTO 提货对象
|
||||
*/
|
||||
@PostMapping("outStorage")
|
||||
void outStorage(@RequestBody DriverPickUpDTO driverPickUpDTO);
|
||||
|
||||
/**
|
||||
* 延迟提货,延迟时间以提货时间往后推最多不超过2小时
|
||||
*
|
||||
* @param driverDelayDeliveryDTO 运输任务延时对象
|
||||
*/
|
||||
@PutMapping("delayDelivery")
|
||||
void delayedDelivery(@RequestBody DriverDelayDeliveryDTO driverDelayDeliveryDTO);
|
||||
|
||||
/**
|
||||
* 回车登记
|
||||
*
|
||||
* @param driverReturnRegisterDTO 回车登记对象
|
||||
*/
|
||||
@PostMapping("returnRegister")
|
||||
void returnRegister(@RequestBody DriverReturnRegisterDTO driverReturnRegisterDTO);
|
||||
|
||||
/**
|
||||
* 司机作业单月度统计
|
||||
*
|
||||
* @param driverId 司机id
|
||||
* @param month 月份
|
||||
* @return 统计数据
|
||||
*/
|
||||
@GetMapping("jobMonthlyStatistics/{driverId}/{month}")
|
||||
DriverJobStatisticsDTO jobMonthlyStatistics(@PathVariable("driverId") String driverId, @PathVariable("month") String month);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param driverJobPageQueryDTO 查询条件
|
||||
* @return 司机作业单分页结果
|
||||
*/
|
||||
@PostMapping("pageQuery")
|
||||
PageResponse<DriverJobDTO> pageQuery(@RequestBody DriverJobPageQueryDTO driverJobPageQueryDTO);
|
||||
}
|
||||
Reference in New Issue
Block a user