init
This commit is contained in:
3
sl-express-ms-driver-domain/.gitignore
vendored
Normal file
3
sl-express-ms-driver-domain/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.idea
|
||||
target/
|
||||
*.iml
|
||||
0
sl-express-ms-driver-domain/README.md
Normal file
0
sl-express-ms-driver-domain/README.md
Normal file
46
sl-express-ms-driver-domain/pom.xml
Normal file
46
sl-express-ms-driver-domain/pom.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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-domain</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<description>司机微服务-实体</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<sl-express-common.version>1.2-SNAPSHOT</sl-express-common.version>
|
||||
<sl-express-ms-base-domain.version>1.1-SNAPSHOT</sl-express-ms-base-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.base</groupId>
|
||||
<artifactId>sl-express-ms-base-domain</artifactId>
|
||||
<version>${sl-express-ms-base-domain.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.sl.ms.driver.domain.dto.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@ApiModel("延迟提货对象")
|
||||
public class DriverDelayDeliveryDTO {
|
||||
@ApiModelProperty(value = "司机作业单id", required = true)
|
||||
@NotNull(message = "司机作业单id不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "延迟时间", required = true, example = "2022-07-18 15:20:00")
|
||||
@NotNull(message = "延迟时间不能为空")
|
||||
private String delayTime;
|
||||
|
||||
@ApiModelProperty(value = "延迟原因", required = true)
|
||||
@NotNull(message = "延迟原因不能为空")
|
||||
private String delayReason;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.sl.ms.driver.domain.dto.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@ApiModel("司机交付对象")
|
||||
public class DriverDeliverDTO {
|
||||
@ApiModelProperty(value = "司机作业id", required = true)
|
||||
@NotNull
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "交付凭证,多个图片url以逗号分隔", required = true)
|
||||
@NotNull
|
||||
private String transportCertificate;
|
||||
|
||||
@ApiModelProperty(value = "交付图片,多个图片url以逗号分隔", required = true)
|
||||
@NotNull
|
||||
private String deliverPicture;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.sl.ms.driver.domain.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sl.ms.driver.domain.enums.DriverJobStatus;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 司机作业单分页查询
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("司机作业单分页查询")
|
||||
public class DriverJobPageQueryDTO {
|
||||
|
||||
@ApiModelProperty(value = "页码", required = true, example = "1")
|
||||
private Integer page;
|
||||
|
||||
@ApiModelProperty(value = "页尺寸", required = true, example = "10")
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value = "司机作业单id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "司机id")
|
||||
private Long driverId;
|
||||
|
||||
@ApiModelProperty(value = "运输任务id")
|
||||
private Long transportTaskId;
|
||||
|
||||
@ApiModelProperty(value = "作业状态,1为待提货)、2为在途(在途和已交付)、3为改派、5为已作废、6为已完成(已回车登记)")
|
||||
private List<DriverJobStatus> statusList;
|
||||
|
||||
@ApiModelProperty(value = "最小任务时间", example = "2022-07-13 00:00:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime minTaskTime;
|
||||
|
||||
@ApiModelProperty(value = "最大任务时间", example = "2022-07-13 23:59:59")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime maxTaskTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.sl.ms.driver.domain.dto.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@ApiModel("提货对象")
|
||||
public class DriverPickUpDTO {
|
||||
@ApiModelProperty(value = "司机作业id", required = true)
|
||||
@NotNull
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "提货凭证,多个图片url以逗号分隔", required = true)
|
||||
@NotNull
|
||||
private String cargoPickUpPicture;
|
||||
|
||||
@ApiModelProperty(value = "货物照片,多个图片url以逗号分隔", required = true)
|
||||
@NotNull
|
||||
private String cargoPicture;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.sl.ms.driver.domain.dto.request;
|
||||
|
||||
import com.sl.ms.base.domain.enums.TruckAccidentTypeEnum;
|
||||
import com.sl.ms.base.domain.enums.TruckBreakRulesTypeEnum;
|
||||
import com.sl.ms.base.domain.enums.TruckFaultTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@Data
|
||||
public class DriverReturnRegisterDTO {
|
||||
|
||||
@ApiModelProperty(value = "运输任务id", required = true)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "出车时间", required = true, example = "2022-07-18 17:00:00")
|
||||
private String outStorageTime;
|
||||
|
||||
@ApiModelProperty(value = "回车时间", required = true, example = "2022-07-18 17:00:00")
|
||||
private String intoStorageTime;
|
||||
|
||||
@ApiModelProperty(value = "车辆是否违章", required = true)
|
||||
private Boolean isBreakRules;
|
||||
|
||||
@ApiModelProperty(value = "违章类型,1-闯红灯,2-无证驾驶,3-超载,4-酒后驾驶,5-超速行驶,6-其他")
|
||||
private TruckBreakRulesTypeEnum breakRulesType;
|
||||
|
||||
@ApiModelProperty(value = "违章说明,类型为“其他”时填写")
|
||||
private String breakRulesDescription;
|
||||
|
||||
@ApiModelProperty(value = "罚款金额")
|
||||
private BigDecimal penaltyAmount;
|
||||
|
||||
@ApiModelProperty(value = "扣分数据")
|
||||
private Integer deductPoints;
|
||||
|
||||
@ApiModelProperty(value = "车辆是否故障", required = true)
|
||||
private Boolean isFault;
|
||||
|
||||
@ApiModelProperty(value = "车辆是否可用")
|
||||
private Boolean isAvailable;
|
||||
|
||||
@ApiModelProperty(value = "故障类型,1-发动机启动困难,2-不着车,3-漏油,4-漏水,5-照明失灵,6-有异响,7-排烟异常,8-温度异常,9-其他")
|
||||
private TruckFaultTypeEnum faultType;
|
||||
|
||||
@ApiModelProperty(value = "故障说明,类型为“其他”时填写")
|
||||
private String faultDescription;
|
||||
|
||||
@ApiModelProperty(value = "故障图片")
|
||||
private String faultImages;
|
||||
|
||||
@ApiModelProperty(value = "是否出现事故", required = true)
|
||||
private Boolean isAccident;
|
||||
|
||||
@ApiModelProperty(value = "事故类型,1-直行事故,2-追尾事故,3-超车事故,4-左转弯事故,5-右转弯事故,6-弯道事故,7-坡道事故,8-会车事故,9-其他")
|
||||
private TruckAccidentTypeEnum accidentType;
|
||||
|
||||
@ApiModelProperty(value = "事故说明,类型为“其他”时填写")
|
||||
private String accidentDescription;
|
||||
|
||||
@ApiModelProperty(value = "事故图片")
|
||||
private String accidentImages;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.sl.ms.driver.domain.dto.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@ApiModel("每日里程")
|
||||
public class DailyMileageDTO {
|
||||
@ApiModelProperty(value = "日期,格式:2022-07-16 00:00:00")
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
@ApiModelProperty(value = "里程,单位:公里;计算公式:原始数据(单位米)/1000 四舍五入取整")
|
||||
private Long mileage;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.sl.ms.driver.domain.dto.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.sl.ms.driver.domain.enums.DriverJobStatus;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 司机作业单
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("司机作业单")
|
||||
public class DriverJobDTO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 起始机构id
|
||||
*/
|
||||
private Long startAgencyId;
|
||||
|
||||
/**
|
||||
* 目的机构id
|
||||
*/
|
||||
private Long endAgencyId;
|
||||
|
||||
/**
|
||||
* 作业状态,1为待执行(对应 待提货)、2为进行中(对应在途)、3为改派(对应 已交付)、4为已完成(对应 已交付)、5为已作废
|
||||
*/
|
||||
private DriverJobStatus status;
|
||||
|
||||
/**
|
||||
* 司机id
|
||||
*/
|
||||
private Long driverId;
|
||||
|
||||
/**
|
||||
* 运输任务id
|
||||
*/
|
||||
private Long transportTaskId;
|
||||
|
||||
/**
|
||||
* 提货对接人
|
||||
*/
|
||||
private String startHandover;
|
||||
|
||||
/**
|
||||
* 交付对接人
|
||||
*/
|
||||
private String finishHandover;
|
||||
|
||||
/**
|
||||
* 计划发车时间
|
||||
*/
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime planDepartureTime;
|
||||
|
||||
/**
|
||||
* 实际发车时间
|
||||
*/
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime actualDepartureTime;
|
||||
|
||||
/**
|
||||
* 计划到达时间
|
||||
*/
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime planArrivalTime;
|
||||
|
||||
/**
|
||||
* 实际到达时间
|
||||
*/
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime actualArrivalTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime created;
|
||||
|
||||
/**
|
||||
* 是否可提货
|
||||
*/
|
||||
private Boolean enablePickUp = false;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.sl.ms.driver.domain.dto.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("任务数据统计")
|
||||
public class DriverJobStatisticsDTO {
|
||||
@ApiModelProperty("任务数量,基于计划完成时间统计")
|
||||
private Integer taskAmounts;
|
||||
|
||||
@ApiModelProperty("完成任务数量,基于实际完成时间统计")
|
||||
private Integer completedAmounts;
|
||||
|
||||
@ApiModelProperty("运输里程,单位:公里,基于实际完成时间统计")
|
||||
private Long transportMileage;
|
||||
|
||||
@ApiModelProperty("每日里程,基于实际完成时间统计")
|
||||
private List<DailyMileageDTO> dailyMileage;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.sl.ms.driver.domain.enums;
|
||||
|
||||
import cn.hutool.core.util.EnumUtil;
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.sl.transport.common.enums.BaseEnum;
|
||||
|
||||
/**
|
||||
* 司机任务状态
|
||||
*
|
||||
* @author itcast
|
||||
*/
|
||||
public enum DriverJobStatus implements BaseEnum {
|
||||
/**
|
||||
* 待执行,对应 待提货
|
||||
*/
|
||||
PENDING(1, "待执行"),
|
||||
/**
|
||||
* 进行中,对应 在途
|
||||
*/
|
||||
PROCESSING(2, "进行中"),
|
||||
/**
|
||||
* 改派,对应已交付
|
||||
*/
|
||||
CONFIRM(3, "改派"),
|
||||
/**
|
||||
* 已交付,对应 已交付
|
||||
*/
|
||||
DELIVERED(4, "已交付"),
|
||||
/**
|
||||
* 已作废
|
||||
*/
|
||||
CANCELLED(5, "已作废"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
COMPLETED(6, "已完成");
|
||||
|
||||
|
||||
DriverJobStatus(Integer code, String value) {
|
||||
this.code = code;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 类型值
|
||||
*/
|
||||
private final String value;
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static DriverJobStatus codeOf(Integer code) {
|
||||
return EnumUtil.getBy(DriverJobStatus::getCode, code);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user