init
This commit is contained in:
3
sl-express-ms-base-api/.gitignore
vendored
Normal file
3
sl-express-ms-base-api/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.idea
|
||||
target/
|
||||
*.iml
|
36
sl-express-ms-base-api/pom.xml
Normal file
36
sl-express-ms-base-api/pom.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.sl-express</groupId>
|
||||
<artifactId>sl-express-parent</artifactId>
|
||||
<version>1.4</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.sl-express.ms.base</groupId>
|
||||
<artifactId>sl-express-ms-base-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>
|
||||
<sl-express-sl-base-domain.version>1.1-SNAPSHOT</sl-express-sl-base-domain.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sl-express.ms.base</groupId>
|
||||
<artifactId>sl-express-ms-base-domain</artifactId>
|
||||
<version>${sl-express-sl-base-domain.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@@ -0,0 +1,53 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import com.sl.ms.base.domain.base.AreaDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色API
|
||||
*/
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "Area", path = "/area")
|
||||
@ApiIgnore
|
||||
public interface AreaFeign {
|
||||
/**
|
||||
* 根据id获取行政区域详情
|
||||
*
|
||||
* @param id 行政区域id
|
||||
* @return 行政区域id
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
AreaDto get(@PathVariable(value = "id") Long id);
|
||||
|
||||
/**
|
||||
* 根据区域编码获取区域
|
||||
*
|
||||
* @param code 行政编码
|
||||
* @return 行政区域
|
||||
*/
|
||||
@GetMapping("/code/{code}")
|
||||
AreaDto getByCode(@PathVariable(value = "code") String code);
|
||||
|
||||
/**
|
||||
* 根据父级id查询子级行政区域
|
||||
*
|
||||
* @param parentId 父级id
|
||||
* @return 子级行政区域列表
|
||||
*/
|
||||
@GetMapping("/children")
|
||||
public List<AreaDto> findChildren(@RequestParam("parentId") Long parentId);
|
||||
|
||||
/**
|
||||
* 根据id批量查询
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return 行政区域列表
|
||||
*/
|
||||
@GetMapping("/batch")
|
||||
public List<AreaDto> findBatch(@RequestParam("ids") List<Long> ids);
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import com.itheima.auth.sdk.dto.UserDTO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
/**
|
||||
* 权限系统feign
|
||||
*/
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "Auth", path = "/auth")
|
||||
@ApiIgnore
|
||||
public interface AuthFeign {
|
||||
|
||||
/**
|
||||
* 根据用户id获得详细信息
|
||||
*
|
||||
* @param id 用户id
|
||||
* @return 用户信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
UserDTO getByUserId(@PathVariable("id") Long id);
|
||||
}
|
@@ -0,0 +1,83 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import com.sl.ms.base.domain.base.GoodsTypeDto;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "GoodsType", path = "base/goodsType")
|
||||
@ApiIgnore
|
||||
public interface GoodsTypeFeign {
|
||||
/**
|
||||
* 添加货物类型
|
||||
*
|
||||
* @param dto 货物类型信息
|
||||
* @return 货物类型信息
|
||||
*/
|
||||
@PostMapping
|
||||
GoodsTypeDto saveGoodsType(@RequestBody GoodsTypeDto dto);
|
||||
|
||||
/**
|
||||
* 根据id获取货物类型详情
|
||||
*
|
||||
* @param id 货物类型id
|
||||
* @return 货物类型信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
GoodsTypeDto fineById(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 根据id列表,获取货物类型列表
|
||||
*
|
||||
* @param ids 货物类型id
|
||||
* @return 货物类型列表
|
||||
*/
|
||||
@GetMapping
|
||||
List<GoodsTypeDto> findAll(@RequestParam(name = "ids", required = false) List<Long> ids);
|
||||
|
||||
/**
|
||||
* 查询所有状态可用的货物类型列表
|
||||
*
|
||||
* @return 货物类型列表
|
||||
*/
|
||||
@GetMapping("all")
|
||||
List<GoodsTypeDto> findAll();
|
||||
|
||||
/**
|
||||
* 获取分页货物类型数据
|
||||
*
|
||||
* @param page 页码
|
||||
* @param pageSize 页尺寸
|
||||
* @param name 货物类型名称
|
||||
* @param truckTypeId 车辆类型Id
|
||||
* @return 分页货物类型数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
PageResponse<GoodsTypeDto> findByPage(
|
||||
@RequestParam(name = "page") Integer page,
|
||||
@RequestParam(name = "pageSize") Integer pageSize,
|
||||
@RequestParam(name = "name", required = false) String name,
|
||||
@RequestParam(name = "truckTypeId", required = false) Long truckTypeId);
|
||||
|
||||
/**
|
||||
* 更新货物类型信息
|
||||
*
|
||||
* @param id 货物类型id
|
||||
* @param dto 货物类型信息
|
||||
* @return 货物类型信息
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
GoodsTypeDto update(@PathVariable(name = "id") Long id, @RequestBody GoodsTypeDto dto);
|
||||
|
||||
/**
|
||||
* 删除货物类型
|
||||
*
|
||||
* @param id 货物类型id
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/{id}/disable")
|
||||
void disable(@PathVariable(name = "id") Long id);
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
/**
|
||||
* 通用的消息中间件发送接口
|
||||
*/
|
||||
@ApiIgnore
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "MQ", path = "/mq")
|
||||
public interface MQFeign {
|
||||
|
||||
/**
|
||||
* 发送实时消息
|
||||
*
|
||||
* @param exchange 交换机
|
||||
* @param routingKey 路由key,非必须
|
||||
* @param msg 消息对象(json字符串)
|
||||
* @return 是否成功
|
||||
*/
|
||||
@PostMapping
|
||||
boolean sendMsg(@RequestParam("exchange") String exchange,
|
||||
@RequestParam(value = "routingKey", required = false) String routingKey,
|
||||
@RequestParam("msg") String msg);
|
||||
|
||||
/**
|
||||
* 发送延迟消息
|
||||
*
|
||||
* @param exchange 交换机
|
||||
* @param routingKey 路由key,非必须
|
||||
* @param msg 消息对象(json字符串)
|
||||
* @param delay 延时时间,单位:毫秒
|
||||
* @return 是否成功
|
||||
*/
|
||||
@PostMapping("delay")
|
||||
boolean sendMsg(@RequestParam("exchange") String exchange,
|
||||
@RequestParam(value = "routingKey", required = false) String routingKey,
|
||||
@RequestParam("msg") String msg,
|
||||
@RequestParam(value = "delay") int delay);
|
||||
|
||||
}
|
@@ -0,0 +1,90 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import com.sl.ms.base.domain.base.LatestMessageDTO;
|
||||
import com.sl.ms.base.domain.base.MessageAddDTO;
|
||||
import com.sl.ms.base.domain.base.MessageDTO;
|
||||
import com.sl.ms.base.domain.base.MessageQueryDTO;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息API
|
||||
*/
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "Message", path = "messages")
|
||||
@ApiIgnore
|
||||
public interface MessageFeign {
|
||||
/**
|
||||
* 新增消息
|
||||
*
|
||||
* @param messageAddDTO 消息新增对象
|
||||
*/
|
||||
@PostMapping
|
||||
void add(@RequestBody MessageAddDTO messageAddDTO);
|
||||
|
||||
/**
|
||||
* 标记已读
|
||||
*
|
||||
* @param id 消息id
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
void update2Read(@PathVariable("id") Long id);
|
||||
|
||||
/**
|
||||
* 批量已读
|
||||
*
|
||||
* @param ids 消息id列表
|
||||
*/
|
||||
@PutMapping("/batchRead")
|
||||
void batchRead(@RequestBody List<Long> ids);
|
||||
|
||||
/**
|
||||
* 全部已读
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param contentType 消息类型,300:快递员端公告,301:寄件相关消息,302:签收相关消息,303:快件取消消息,304派件消息,200:司机端公告,201:司机端系统通知
|
||||
*/
|
||||
@PutMapping("readAll/{userId}/{contentType}")
|
||||
void readAll(@PathVariable("userId") Long userId,
|
||||
@PathVariable("contentType") Integer contentType);
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
*
|
||||
* @param messageQueryDTO 消息查询对象
|
||||
* @return 消息列表
|
||||
*/
|
||||
@GetMapping
|
||||
List<MessageDTO> list(@SpringQueryMap MessageQueryDTO messageQueryDTO);
|
||||
|
||||
/**
|
||||
* 根据类型查询消息数量
|
||||
*
|
||||
* @param messageQueryDTO 消息查询对象
|
||||
* @return 消息条数
|
||||
*/
|
||||
@GetMapping("/countType")
|
||||
Integer countType(@SpringQueryMap MessageQueryDTO messageQueryDTO);
|
||||
|
||||
/**
|
||||
* 最新消息查询
|
||||
*
|
||||
* @param messageQueryDTO 消息查询对象
|
||||
* @return 最新消息对象
|
||||
*/
|
||||
@GetMapping("latestMessage")
|
||||
LatestMessageDTO latestMessage(@SpringQueryMap MessageQueryDTO messageQueryDTO);
|
||||
|
||||
/**
|
||||
* 分页查询消息列表
|
||||
*
|
||||
* @param messageQueryDTO 消息查询对象
|
||||
* @return 分页数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
PageResponse<MessageDTO> page(@SpringQueryMap MessageQueryDTO messageQueryDTO);
|
||||
}
|
@@ -0,0 +1,83 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import com.sl.ms.base.domain.base.WorkPatternAddDTO;
|
||||
import com.sl.ms.base.domain.base.WorkPatternDTO;
|
||||
import com.sl.ms.base.domain.base.WorkPatternQueryDTO;
|
||||
import com.sl.ms.base.domain.base.WorkPatternUpdateDTO;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工作模式API
|
||||
*/
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "workPattern", path = "work-patterns")
|
||||
@ApiIgnore
|
||||
public interface WorkPatternFeign {
|
||||
|
||||
/**
|
||||
* 查询工作模式
|
||||
*
|
||||
* @return 工作模式列表
|
||||
*/
|
||||
@GetMapping("all")
|
||||
@ApiOperation("工作模式列表查询")
|
||||
List<WorkPatternDTO> findAll();
|
||||
|
||||
/**
|
||||
* 分页查询工作模式
|
||||
*
|
||||
* @param workPatternQueryDTO 分页查询条件
|
||||
* @return 工作模式数据
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@ApiOperation("工作模式分页查询")
|
||||
PageResponse<WorkPatternDTO> list(@SpringQueryMap WorkPatternQueryDTO workPatternQueryDTO);
|
||||
|
||||
/**
|
||||
* 根据工作模式id查询工作模式详情
|
||||
*
|
||||
* @param id 工作模式id
|
||||
* @return 工作模式
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation("根据工作模式id获取工作模式详情")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "工作模式id")})
|
||||
WorkPatternDTO getById(@PathVariable("id") Long id);
|
||||
|
||||
/**
|
||||
* 删除工作模式,逻辑删除
|
||||
*
|
||||
* @param id 工作模式ID
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@ApiOperation("工作模式删除")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "工作模式id")})
|
||||
void delete(@PathVariable("id") Long id);
|
||||
|
||||
/**
|
||||
* 新增工作模式
|
||||
*
|
||||
* @param workPatternAddDTO 工作模式
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation("新增工作模式")
|
||||
void add(@RequestBody WorkPatternAddDTO workPatternAddDTO);
|
||||
|
||||
/**
|
||||
* 更新工作模式
|
||||
*
|
||||
* @param workPatternUpdateDTO 工作模式
|
||||
*/
|
||||
@PutMapping("")
|
||||
void put(@RequestBody WorkPatternUpdateDTO workPatternUpdateDTO);
|
||||
}
|
@@ -0,0 +1,89 @@
|
||||
package com.sl.ms.base.api.common;
|
||||
|
||||
import com.sl.ms.base.domain.base.WorkSchedulingAddDTO;
|
||||
import com.sl.ms.base.domain.base.WorkSchedulingDTO;
|
||||
import com.sl.ms.base.domain.base.WorkSchedulingQueryDTO;
|
||||
import com.sl.ms.base.domain.base.WorkSchedulingUpdateDTO;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 排班API
|
||||
*/
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "workScheduling", path = "work-schedulings")
|
||||
@ApiIgnore
|
||||
public interface WorkSchedulingFeign {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询排班信息
|
||||
*
|
||||
* @param workSchedulingQueryDTO 查询排班的条件和分页信息
|
||||
* @return 排班
|
||||
*/
|
||||
@GetMapping
|
||||
PageResponse<WorkSchedulingDTO> list(@SpringQueryMap WorkSchedulingQueryDTO workSchedulingQueryDTO);
|
||||
|
||||
/**
|
||||
* 批量新增排班
|
||||
*
|
||||
* @param workSchedulingAddDTOList 排班列表
|
||||
*/
|
||||
@PostMapping("batch")
|
||||
void batch(@RequestBody List<WorkSchedulingAddDTO> workSchedulingAddDTOList);
|
||||
|
||||
/**
|
||||
* 根据排班id删除排班信息
|
||||
*
|
||||
* @param id 排班信息id
|
||||
* @param operator 操作人
|
||||
*/
|
||||
@DeleteMapping("{id}/{operator}")
|
||||
void delete(@PathVariable("id") Long id, @PathVariable("operator") Long operator);
|
||||
|
||||
/**
|
||||
* 根据排班信息id,更新排班
|
||||
*
|
||||
* @param workSchedulingUpdateDTO 排班信息
|
||||
*/
|
||||
@PutMapping("")
|
||||
void update(@RequestBody WorkSchedulingUpdateDTO workSchedulingUpdateDTO);
|
||||
|
||||
/**
|
||||
* 根据用户id查询用户的当日到当月的排班计划
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return 这个月排班计划
|
||||
*/
|
||||
@GetMapping("currentSchedule/{userId}")
|
||||
WorkSchedulingDTO currentSchedule(@PathVariable("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 根据网点id查询该网点所有员工的排班信息
|
||||
*
|
||||
* @param agencyId 网点id
|
||||
* @return 该网点所有员工的排班信息
|
||||
*/
|
||||
@GetMapping("todayScheduleByAgencyId/{agencyId}")
|
||||
List<WorkSchedulingDTO> monthScheduleByAgencyId(@PathVariable("agencyId") Long agencyId);
|
||||
|
||||
/**
|
||||
* 根据员工id列表或者网点id,查询员工 某一天的的排班情况
|
||||
*
|
||||
* @param userIds 用户IDs
|
||||
* @param agencyId 机构ID
|
||||
* @param type 用户类型
|
||||
* @param time 时间
|
||||
* @return 今日到这月末的排班
|
||||
*/
|
||||
@GetMapping("todaySchedule/{userType}")
|
||||
List<WorkSchedulingDTO> monthSchedule(@RequestParam(value = "userIdList", required = false) String userIds,
|
||||
@RequestParam(value = "agencyId", required = false) Long agencyId,
|
||||
@PathVariable("userType") Byte type,
|
||||
@RequestParam("time") Long time);
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
package com.sl.ms.base.api.trips;
|
||||
|
||||
import com.sl.ms.base.domain.truck.TransportTripsTruckDriverDto;
|
||||
import com.sl.ms.base.domain.truck.TruckTripsDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "TripsType", path = "base/trips")
|
||||
//@RequestMapping("base/transportLine/trips")
|
||||
@ApiIgnore
|
||||
public interface TripsFeign {
|
||||
/**
|
||||
* 添加车次
|
||||
*
|
||||
* @param dto 车次信息
|
||||
* @return 车次信息
|
||||
*/
|
||||
@PostMapping
|
||||
TruckTripsDto save(@RequestBody TruckTripsDto dto);
|
||||
|
||||
/**
|
||||
* 根据id获取车次详情
|
||||
*
|
||||
* @param id 车次id
|
||||
* @return 车次信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckTripsDto fineById(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 获取车次列表
|
||||
*
|
||||
* @param transportLineId 线路id
|
||||
* @param ids 车次id列表
|
||||
* @return 车次列表
|
||||
*/
|
||||
@GetMapping
|
||||
List<TruckTripsDto> findAll(@RequestParam(name = "transportLineId", required = false) Long transportLineId, @RequestParam(name = "ids", required = false) List<Long> ids);
|
||||
|
||||
/**
|
||||
* 更新车次信息
|
||||
*
|
||||
* @param id 车次id
|
||||
* @param dto 车次信息
|
||||
* @return 车次信息
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
TruckTripsDto update(@PathVariable(name = "id") Long id, @RequestBody TruckTripsDto dto);
|
||||
|
||||
/**
|
||||
* 删除车次信息
|
||||
*
|
||||
* @param id 车次信息
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/{id}/disable")
|
||||
void disable(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 批量保存车次与车辆和司机关联关系
|
||||
*
|
||||
* @param dtoList 车次与车辆和司机关联关系
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PostMapping("{id}/truckDriver")
|
||||
void batchSaveTruckDriver(@PathVariable(value = "id", required = false) Long transportTripsId, @RequestBody List<TransportTripsTruckDriverDto> dtoList);
|
||||
|
||||
/**
|
||||
* 获取车次与车辆和司机关联关系列表
|
||||
*
|
||||
* @param transportTripsId 车次id
|
||||
* @param truckId 车辆id
|
||||
* @param driverId 司机id
|
||||
* @return 车次与车辆和司机关联关系列表
|
||||
*/
|
||||
@GetMapping("/truckDriver")
|
||||
List<TransportTripsTruckDriverDto> findAllTruckDriverTransportTrips(@RequestParam(name = "transportTripsId", required = false) Long transportTripsId, @RequestParam(name = "truckId", required = false) Long truckId, @RequestParam(name = "driverId", required = false) Long driverId);
|
||||
|
||||
}
|
@@ -0,0 +1,114 @@
|
||||
package com.sl.ms.base.api.truck;
|
||||
|
||||
import com.sl.ms.base.domain.enums.TruckRunStatusEnum;
|
||||
import com.sl.ms.base.domain.truck.TruckDto;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "Truck", path = "base/truck")
|
||||
@ApiIgnore
|
||||
public interface TruckFeign {
|
||||
/**
|
||||
* 添加车辆
|
||||
*
|
||||
* @param dto 车辆信息
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@PostMapping
|
||||
TruckDto saveTruck(@RequestBody TruckDto dto);
|
||||
|
||||
/**
|
||||
* 根据id获取车辆详情
|
||||
*
|
||||
* @param id 车辆id
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckDto fineById(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 获取车辆分页数据
|
||||
*
|
||||
* @param page 页码
|
||||
* @param pageSize 页尺寸
|
||||
* @param truckTypeId 车辆类型id
|
||||
* @param status
|
||||
* @param licensePlate 车牌好吗
|
||||
* @return 车辆分页数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
PageResponse<TruckDto> findByPage(@RequestParam(name = "page") Integer page,
|
||||
@RequestParam(name = "pageSize") Integer pageSize,
|
||||
@RequestParam(name = "truckTypeId", required = false) Long truckTypeId,
|
||||
@RequestParam(name = "status", required = false) Integer status,
|
||||
@RequestParam(name = "licensePlate", required = false) String licensePlate);
|
||||
|
||||
/**
|
||||
* 获取车辆列表
|
||||
*
|
||||
* @param ids 车辆id列表
|
||||
* @return 车辆列表
|
||||
*/
|
||||
@GetMapping
|
||||
List<TruckDto> findAll(@RequestParam(name = "ids", required = false) List<Long> ids);
|
||||
|
||||
/**
|
||||
* 更新车辆信息
|
||||
*
|
||||
* @param id 车辆id
|
||||
* @param dto 车辆信息
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
TruckDto update(@PathVariable(name = "id") Long id, @RequestBody TruckDto dto);
|
||||
|
||||
/**
|
||||
* 统计车辆数量
|
||||
*
|
||||
* @return 车辆数量
|
||||
*/
|
||||
@GetMapping("/count")
|
||||
Map<Integer, Long> count();
|
||||
|
||||
/**
|
||||
* 删除车辆
|
||||
*
|
||||
* @param id 车辆id
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/{id}/disable")
|
||||
void disable(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 启用车辆
|
||||
*
|
||||
* @param id 车辆id
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/{id}/enable")
|
||||
void enable(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 删除车辆
|
||||
*
|
||||
* @param id 车辆id
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/{id}/del")
|
||||
void del(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 更新车辆状态
|
||||
* 调用时机 车辆出库
|
||||
* @param id 车辆id
|
||||
* @param status 车辆状态枚举
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/updateRunStatus")
|
||||
void updateRunStatus(@RequestParam(name = "id") Long id, @RequestParam("status") TruckRunStatusEnum status);
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package com.sl.ms.base.api.truck;
|
||||
|
||||
import com.sl.ms.base.domain.truck.TruckLicenseDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "TruckLicense", path = "base/truck/license")
|
||||
@ApiIgnore
|
||||
public interface TruckLicenseFeign {
|
||||
/**
|
||||
* 保存车辆行驶证信息
|
||||
*
|
||||
* @param dto 车辆行驶证信息
|
||||
* @return 车辆行驶证信息
|
||||
*/
|
||||
@PostMapping
|
||||
TruckLicenseDto saveTruckLicense(@RequestBody TruckLicenseDto dto);
|
||||
|
||||
/**
|
||||
* 根据id获取车辆行驶证详情
|
||||
*
|
||||
* @param id 车辆行驶证id
|
||||
* @return 车辆行驶证信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckLicenseDto fineById(@PathVariable(name = "id") Long id);
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package com.sl.ms.base.api.truck;
|
||||
|
||||
import com.sl.ms.base.domain.enums.StatusEnum;
|
||||
import com.sl.ms.base.domain.truck.TruckPlanDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "TruckPlan", path = "base/plan")
|
||||
@ApiIgnore
|
||||
public interface TruckPlanFeign {
|
||||
/**
|
||||
* 获取未分配运输任务的车次计划列表
|
||||
* @return 未分配运输任务的车次计划列表
|
||||
*/
|
||||
@GetMapping("/unassignedPlan/{shardTotal}/{shardIndex}")
|
||||
List<TruckPlanDto> pullUnassignedPlan(@PathVariable(name = "shardTotal") Integer shardTotal, @PathVariable(name = "shardIndex") Integer shardIndex);
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID获取
|
||||
* @param id 数据库ID
|
||||
* @return 返回信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckPlanDto findById(@PathVariable("id") Long id);
|
||||
|
||||
/**
|
||||
* 计划完成
|
||||
* @param currentOrganId 结束机构id
|
||||
* @param planId 计划ID
|
||||
* @param truckId 车辆ID
|
||||
* @param statusEnum 车辆状态枚举
|
||||
* @return 车次与车辆和司机关联关系列表
|
||||
*/
|
||||
@PutMapping("finished")
|
||||
void finished(@RequestParam("currentOrganId") Long currentOrganId, @RequestParam("planId") Long planId, @RequestParam("truckId") Long truckId, @RequestParam("statusEnum") StatusEnum statusEnum);
|
||||
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package com.sl.ms.base.api.truck;
|
||||
|
||||
import com.sl.ms.base.domain.truck.TruckReturnRegisterDTO;
|
||||
import com.sl.ms.base.domain.truck.TruckReturnRegisterListDTO;
|
||||
import com.sl.ms.base.domain.truck.TruckReturnRegisterPageQueryDTO;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "TruckReturnRegister", path = "base/returnRegister")
|
||||
@ApiIgnore
|
||||
public interface TruckReturnRegisterFeign {
|
||||
/**
|
||||
* 新增回车登记
|
||||
*
|
||||
* @param truckReturnRegisterDTO 回车登记对象
|
||||
*/
|
||||
@PostMapping
|
||||
void save(@RequestBody TruckReturnRegisterDTO truckReturnRegisterDTO);
|
||||
|
||||
/**
|
||||
* 分页查询回车登记列表
|
||||
*
|
||||
* @param truckReturnRegisterPageQueryDTO 分页查询条件
|
||||
* @return 回车登记分页结果
|
||||
*/
|
||||
@PostMapping("pageQuery")
|
||||
PageResponse<TruckReturnRegisterListDTO> pageQuery(@RequestBody TruckReturnRegisterPageQueryDTO truckReturnRegisterPageQueryDTO);
|
||||
|
||||
/**
|
||||
* 根据id查询回车登记详情
|
||||
*
|
||||
* @param id 回车登记id
|
||||
* @return 回车登记详情
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckReturnRegisterDTO findById(@PathVariable("id") Long id);
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
package com.sl.ms.base.api.truck;
|
||||
|
||||
import com.sl.ms.base.domain.truck.TruckTypeDto;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "TruckType", path = "base/truck/type")
|
||||
public interface TruckTypeFeign {
|
||||
/**
|
||||
* 添加车辆类型
|
||||
*
|
||||
* @param dto 车辆类型信息
|
||||
* @return 车辆类型信息
|
||||
*/
|
||||
@PostMapping
|
||||
TruckTypeDto saveTruckType(@RequestBody TruckTypeDto dto);
|
||||
|
||||
/**
|
||||
* 根据id获取车辆类型详情
|
||||
*
|
||||
* @param id 车辆类型id
|
||||
* @return 车辆类型信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckTypeDto fineById(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 获取车辆类型分页数据
|
||||
*
|
||||
* @param page 页码
|
||||
* @param pageSize 页尺寸
|
||||
* @param name 车辆类型名称
|
||||
* @param minAllowableLoad 车辆载重最小值(闭区间)
|
||||
* @param maxAllowableLoad 车辆载重最大值(开区间)
|
||||
* @param minAllowableVolume 车辆体积最小值(闭区间)
|
||||
* @param maxAllowableVolume 车辆体积最小值(开区间)
|
||||
* @param id 车型id
|
||||
* @return 车辆类型分页数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
PageResponse<TruckTypeDto> findByPage(@RequestParam(name = "page") Integer page,
|
||||
@RequestParam(name = "pageSize") Integer pageSize,
|
||||
@RequestParam(name = "name", required = false) String name,
|
||||
@RequestParam(name = "minAllowableLoad", required = false) BigDecimal minAllowableLoad,
|
||||
@RequestParam(name = "maxAllowableLoad", required = false) BigDecimal maxAllowableLoad,
|
||||
@RequestParam(name = "minAllowableVolume", required = false) BigDecimal minAllowableVolume,
|
||||
@RequestParam(name = "maxAllowableVolume", required = false) BigDecimal maxAllowableVolume,
|
||||
@RequestParam(name = "id", required = false) Long id);
|
||||
|
||||
/**
|
||||
* 获取车辆类型列表
|
||||
*
|
||||
* @param ids 车辆类型id
|
||||
* @return 车辆类型列表
|
||||
*/
|
||||
@GetMapping
|
||||
List<TruckTypeDto> findAll(@RequestParam(name = "ids", required = false) List<Long> ids);
|
||||
|
||||
/**
|
||||
* 更新车辆类型信息
|
||||
*
|
||||
* @param id 车辆类型id
|
||||
* @param dto 车辆类型信息
|
||||
* @return 车辆类型信息
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
TruckTypeDto update(@PathVariable(name = "id") Long id, @RequestBody TruckTypeDto dto);
|
||||
|
||||
/**
|
||||
* 删除车辆类型
|
||||
*
|
||||
* @param id 车辆类型Id
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PutMapping("/{id}/disable")
|
||||
void disable(@PathVariable(name = "id") Long id);
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
package com.sl.ms.base.api.user;
|
||||
|
||||
import com.sl.ms.base.domain.user.TruckDriverDto;
|
||||
import com.sl.ms.base.domain.user.TruckDriverLicenseDto;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-base", contextId = "Driver", path = "sys/driver")
|
||||
@ApiIgnore
|
||||
public interface DriverFeign {
|
||||
/**
|
||||
* 保存司机基本信息
|
||||
*
|
||||
* @param dto 司机基本信息
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PostMapping
|
||||
TruckDriverDto saveDriver(@RequestBody TruckDriverDto dto);
|
||||
|
||||
/**
|
||||
* 获取司机基本信息列表
|
||||
*
|
||||
* @param userIds 司机id列表
|
||||
* @return 司机基本信息列表
|
||||
*/
|
||||
@GetMapping
|
||||
List<TruckDriverDto> findAllDriver(@RequestParam(name = "userIds",required = false) List<Long> userIds);
|
||||
|
||||
/**
|
||||
* 获取司机基本信息
|
||||
*
|
||||
* @param id 司机id
|
||||
* @return 司机基本信息
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
TruckDriverDto findOneDriver(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 保存司机驾驶证信息
|
||||
*
|
||||
* @param dto 司机驾驶证信息
|
||||
* @return 返回信息
|
||||
*/
|
||||
@PostMapping("/driverLicense")
|
||||
TruckDriverLicenseDto saveDriverLicense(@RequestBody TruckDriverLicenseDto dto);
|
||||
|
||||
/**
|
||||
* 获取司机驾驶证信息
|
||||
*
|
||||
* @param id 司机id
|
||||
* @return 司机驾驶证信息
|
||||
*/
|
||||
@GetMapping("/{id}/driverLicense")
|
||||
TruckDriverLicenseDto findOneDriverLicense(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 绑定司机列表
|
||||
* @param truckId 车辆ID
|
||||
* @return 司机数量
|
||||
*/
|
||||
@GetMapping("/count")
|
||||
List<TruckDriverDto> findByTruckId(@RequestParam(name = "truckId", required = false) Long truckId);
|
||||
|
||||
/**
|
||||
* 获取司机分页数据
|
||||
*
|
||||
* @param page 页码
|
||||
* @param pageSize 页尺寸
|
||||
* @return 司机分页数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
PageResponse<TruckDriverDto> findByPage(@RequestParam(name = "page") Integer page,
|
||||
@RequestParam(name = "pageSize") Integer pageSize);
|
||||
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/findAll")
|
||||
List<TruckDriverDto> findAll(@RequestParam(name = "ids", required = false) List<Long> ids);
|
||||
}
|
Reference in New Issue
Block a user