Bladeren bron

提交全图监控

chenxiaofei 1 maand geleden
bovenliggende
commit
9a1b1e93a9

+ 23 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/GenerateTraceReq.java

@@ -18,26 +18,46 @@ public class GenerateTraceReq implements Serializable {
 
     @Serial
     private static final long serialVersionUID = 1L;
-
+    /**
+     * 日期(格式:yyyy-MM-dd)
+     */
     @Schema(description = "日期(格式:yyyy-MM-dd)", example = "2025-11-18", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotBlank(message = "日期不能为空")
     private String date;
 
+    /**
+     * 运单号
+     */
     @Schema(description = "运单号", example = "T88565469682136456969", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotBlank(message = "运单号不能为空")
     private String wayOrderNo;
 
+    /**
+     * 车牌号
+     */
     @Schema(description = "车牌号", example = "川A888528", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotBlank(message = "车牌号不能为空")
     private String truckNo;
-
+    /**
+     * 当前位置(经纬度,格式:经度,纬度)
+     */
     @Schema(description = "当前位置(经纬度,格式:经度,纬度)", example = "104.065735,30.659462", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotBlank(message = "当前位置不能为空")
     private String currentLocation;
 
+    /**
+     * 当前详细地址
+     */
+    @Schema(description = "当前详细地址")
+    private String currentDetailAddress;
+    /**
+     * 异常位置详细地址
+     */
     @Schema(description = "异常位置详细地址")
     private String exceptionLocation;
-
+    /**
+     * 异常类型(1-车辆偏航,2-急刹车,3-超速,4-异常停车)
+     */
     @Schema(description = "异常类型(1-车辆偏航,2-急刹车,3-超速,4-异常停车)")
     private Integer exceptionType;
 }

+ 18 - 6
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/VehicleExceptionQueryReq.java

@@ -11,22 +11,34 @@ import lombok.Data;
 @Data
 @Schema(description = "车辆异常查询请求")
 public class VehicleExceptionQueryReq {
-    
+    /**
+     * 运输企业ID
+     */
     @Schema(description = "运输企业ID", requiredMode = Schema.RequiredMode.REQUIRED)
     private Long entId;
-    
+    /**
+     * 异常类型(1-车辆偏航,2-急刹车,3-超速,4-异常停车)
+     */
     @Schema(description = "异常类型(1-车辆偏航,2-急刹车,3-超速,4-异常停车)")
     private Integer exceptionType;
-    
+    /**
+     * 车牌号
+     */
     @Schema(description = "车牌号")
     private String truckNo;
-    
+    /**
+     * 定位状态(1-在线,0-离线)
+     */
     @Schema(description = "定位状态(1-在线,0-离线)")
     private Integer locationStatus;
-    
+    /**
+     * 开始时间
+     */
     @Schema(description = "页码", example = "1")
     private Integer pageNum = 1;
-    
+    /**
+     * 结束时间
+     */
     @Schema(description = "每页数量", example = "20")
     private Integer pageSize = 20;
 }

+ 53 - 15
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/VehicleExceptionVo.java

@@ -11,46 +11,84 @@ import lombok.Data;
 @Data
 @Schema(description = "车辆异常图片信息")
 public class VehicleExceptionVo {
-    
-    @Schema(description = "图片ID")
+    /**
+     * 主键ID
+     */
+    @Schema(description = "ID")
     private Long id;
-    
+
+    /**
+     * 车牌号
+     */
     @Schema(description = "车牌号")
     private String truckNo;
-    
+    /**
+     * 异常类型代码(1-车辆偏航,2-急刹车,3-超速,4-异常停车)
+     */
     @Schema(description = "异常类型代码(1-车辆偏航,2-急刹车,3-超速,4-异常停车)")
     private Integer exceptionType;
-    
+    /**
+     * 异常类型名称
+     */
     @Schema(description = "异常类型名称")
     private String exceptionTypeName;
-    
+    /**
+     * 图片URL
+     */
     @Schema(description = "图片URL")
     private String imageUrl;
-    
+    /**
+     * 异常时间(yyyy-MM-dd HH:mm:ss)
+     */
     @Schema(description = "异常时间(yyyy-MM-dd HH:mm:ss)")
     private String exceptionTime;
-    
+    /**
+     * 经度
+     */
     @Schema(description = "经度")
     private String longitude;
-    
+
+    /**
+     * 纬度
+     */
     @Schema(description = "纬度")
     private String latitude;
-    
+
+    /**
+     * 位置描述
+     */
     @Schema(description = "位置描述")
     private String location;
-    
+    /**
+     * 定位状态(1-在线,0-离线)
+     */
     @Schema(description = "定位状态(1-在线,0-离线)")
     private Integer locationStatus;
-    
+
+    /**
+     * 定位状态描述
+     */
     @Schema(description = "定位状态描述")
     private String locationStatusDesc;
-    
+    /**
+     * 速度(km/h)
+     */
     @Schema(description = "异常详情描述")
     private String description;
-    
+    /**
+     * 速度(km/h)
+     */
+    @Schema(description = "速度(km/h)")
+    private String speed;
+
+    /**
+     * 司机姓名
+     */
     @Schema(description = "司机姓名")
     private String driverName;
-    
+    /**
+     * 司机电话
+     */
     @Schema(description = "司机电话")
     private String driverPhone;
 }

+ 1 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsConsignmentService.java

@@ -3085,6 +3085,7 @@ public class KwtLogisticsConsignmentService {
                     .map(o -> getOrderStatusStatistics(o, statusAndLogOrdersMap))
                     .collect(Collectors.toList());
             orderStatusStatisticsResp.setOrderStatusStatistics(statistics);
+            return orderStatusStatisticsResp;
          }
         List<KwtLogisticsOrder> logisticsOrders =logisticsOrderRepository.queryList(logOrderIds,req.getTradeOrderId(), req.getOrderNo(),req.getOrderStatus(),
                 req.getStartTime(), req.getEndTime());

+ 8 - 5
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/kwfTruckTraceService.java

@@ -65,9 +65,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
 import org.jetbrains.annotations.NotNull;
 import org.springframework.stereotype.Service;
 
-import java.time.Duration;
-import java.time.LocalDateTime;
-import java.time.ZoneOffset;
+import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -1355,7 +1353,12 @@ public class kwfTruckTraceService {
     @NotNull
     private static VehiclesTrajectoryReq getVehiclesTrajectoryReq(GenerateTraceReq req, KwtWaybillOrder order, String longitude, String latitude, KwtLogisticsOrder logisticsOrder, RFleetVo fleetByTruckId) {
         VehiclesTrajectoryReq vehiclesTrajectoryReq = new VehiclesTrajectoryReq();
-        vehiclesTrajectoryReq.setTs(req.getDate());
+        String dateStr = req.getDate();
+        // 输入的日期字符串
+        LocalDate date = LocalDate.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+        LocalDateTime dateTime = date.atTime(LocalTime.now());
+        String result = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        vehiclesTrajectoryReq.setTs(result);
         vehiclesTrajectoryReq.setMobile(order.getDriverPhone());
         vehiclesTrajectoryReq.setTruckNo(req.getTruckNo());
         vehiclesTrajectoryReq.setLongitude(longitude);
@@ -1376,7 +1379,7 @@ public class kwfTruckTraceService {
         VehiclesTrajectoryReq.VehicleDataVO vehicleDataVO = new VehiclesTrajectoryReq.VehicleDataVO();
         vehicleDataVO.setCarNo(req.getTruckNo());
         if (fleetByTruckId != null){
-            vehicleDataVO.setFleetId(fleetByTruckId.getId().toString());
+            vehicleDataVO.setFleetId(Objects.nonNull(fleetByTruckId.getId())?fleetByTruckId.getId().toString():"");
             vehicleDataVO.setFleetName(fleetByTruckId.getName());
         }
         vehiclesTrajectoryReq.setVehicleDataVO(vehicleDataVO);