Răsfoiți Sursa

提交全图监控

chenxiaofei 1 lună în urmă
părinte
comite
5aef1d15d4

+ 2 - 1
sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/RemoteContractService.java

@@ -1,6 +1,7 @@
 package com.sckw.contract.api;
 
 import com.sckw.contract.api.model.dto.res.*;
+import com.sckw.contract.api.model.vo.KwcContractLogisticsDto;
 import com.sckw.contract.api.model.vo.TradeContractGoodsDto;
 import com.sckw.contract.api.model.vo.TradeContractResDto;
 
@@ -103,5 +104,5 @@ public interface RemoteContractService {
      */
     List<Long> queryTradeContractInfo(Long contractId);
 
-    TradeContractResDto queryContractByContractId(Long contractId);
+    KwcContractLogisticsDto queryContractByContractId(Long contractId);
 }

+ 147 - 0
sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/model/vo/KwcContractLogisticsDto.java

@@ -0,0 +1,147 @@
+package com.sckw.contract.api.model.vo;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 物流合同(承运合同/托运合同)
+ * @TableName kwc_contract_logistics
+ */
+@Data
+public class KwcContractLogisticsDto implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 7160755505692180593L;
+    /**
+     * 主键
+     */
+
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 合同编号
+     */
+    private String contractNo;
+
+    /**
+     * 合同名称
+     */
+    private String name;
+
+    /**
+     * 签约方式
+     */
+    private Integer signingWay;
+
+    /**
+     * 计费方式(1按装货量、2按卸货量、3按车次)
+     */
+    private Integer charging;
+
+    /**
+     * 交易方式(1预付款、2货到付款)
+     */
+    private Integer trading;
+
+    /**
+     * 派车方式(1手动派车、2自动派车)
+     */
+    private Integer dispatching;
+    /**
+     * 开始日期
+     */
+    private Date startTime;
+
+    /**
+     * 结束日期
+     */
+    @TableField(insertStrategy = FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
+    private Date endTime;
+
+    /**
+     * 数量
+     */
+    private BigDecimal amount;
+
+    /**
+     * 履行量
+     */
+    private BigDecimal performedAmount;
+
+    /**
+     * 签署文件
+     */
+    private String signingUrl;
+
+    /**
+     * 已签署文件
+     */
+    private String signedUrl;
+
+    /**
+     * 签约编号
+     */
+    private String signingNo;
+
+    /**
+     * 合同关联id
+     */
+    private Long contractPid;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 用户状态  0已签约 1已完结 2已保存(草稿) 3签约中
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 修改人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    /**
+     * 业务id
+     */
+    private String businessId;
+    /**
+     * 通用价格
+     */
+    private BigDecimal commonPrice;
+
+}

+ 4 - 0
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/vo/RTruckVo.java

@@ -84,4 +84,8 @@ public class RTruckVo implements Serializable {
      * 车辆状态
      */
     private Integer status;
+     /**
+     * 能源类型
+     */
+    private Integer energyType;
 }

+ 6 - 9
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/dubbo/RemoteContractServiceImpl.java

@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.google.common.collect.Sets;
 import com.sckw.contract.api.RemoteContractService;
 import com.sckw.contract.api.model.dto.res.*;
-import com.sckw.contract.api.model.vo.GoodsInfoDto;
-import com.sckw.contract.api.model.vo.TradeContractGoodsDto;
-import com.sckw.contract.api.model.vo.TradeContractResDto;
-import com.sckw.contract.api.model.vo.TradeContractUnitDto;
+import com.sckw.contract.api.model.vo.*;
 import com.sckw.contract.dao.*;
 import com.sckw.contract.model.dto.res.QueryContractValidCountResDto;
 import com.sckw.contract.model.entity.*;
@@ -304,16 +301,16 @@ public class RemoteContractServiceImpl implements RemoteContractService {
     }
 
     @Override
-    public TradeContractResDto queryContractByContractId(Long contractId) {
-        KwcContractTrade kwcContractTrade = kwcContractTradeMapper.selectById(contractId);
+    public KwcContractLogisticsDto queryContractByContractId(Long contractId) {
+        KwcContractLogistics kwcContractTrade = kwcContractLogisticsMapper.selectById(contractId);
         if (Objects.nonNull(kwcContractTrade)) {
-            TradeContractResDto tradeContractResDto = BeanUtils.toBean(kwcContractTrade, TradeContractResDto.class);
+            KwcContractLogisticsDto tradeContractResDto = new KwcContractLogisticsDto();
             tradeContractResDto.setId(kwcContractTrade.getId());
-            tradeContractResDto.setContactName(kwcContractTrade.getName());
+            tradeContractResDto.setName(kwcContractTrade.getName());
             tradeContractResDto.setContractNo(kwcContractTrade.getContractNo());
             return tradeContractResDto;
         }
-        return new TradeContractResDto();
+        return new KwcContractLogisticsDto();
     }
 
 

+ 1 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/dubbo/RemoteFleetServiceImpl.java

@@ -342,6 +342,7 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
         rTruckVo.setTruckType(StringUtils.isBlank(truck.getType()) ? "": String.valueOf(truck.getType()));
         rTruckVo.setStatus(truck.getStatus());
         rTruckVo.setCarAxis(truck.getCarAxis());
+        rTruckVo.setEnergyType(truck.getEnergyType());
         return rTruckVo;
     }
 

+ 12 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/KwtWaybillOrderController.java

@@ -20,10 +20,12 @@ import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.transport.api.model.param.AddLogisticOrderParam;
 import com.sckw.transport.dubbo.TransportServiceImpl;
 import com.sckw.transport.model.dto.*;
+import com.sckw.transport.model.dto.WaybillOrderSelectReq;
 import com.sckw.transport.model.param.WaybillOrderNodeReq;
 import com.sckw.transport.model.param.WaybillOrderReq;
 import com.sckw.transport.model.param.WaybillOrderResp;
 import com.sckw.transport.model.vo.*;
+import com.sckw.transport.model.vo.WaybillOrderSelectOptionVo;
 import com.sckw.transport.service.KwtWaybillOrderService;
 import com.sckw.transport.service.KwtWaybillOrderV1Service;
 import io.swagger.v3.oas.annotations.Operation;
@@ -744,4 +746,14 @@ public class KwtWaybillOrderController {
         return BaseResult.success(waybillOrderV1Service.queryTruckList());
     }
 
+
+    /**
+     * 运单号下拉列表(支持输入匹配)
+     */
+    @PostMapping("/waybillOrderSelect")
+    @Operation(summary = "运单号下拉列表", description = "支持根据运单号输入匹配,返回运单号、车牌号、司机信息等")
+    public BaseResult<List<WaybillOrderSelectOptionVo>> getWaybillOrderSelectList(@RequestBody WaybillOrderSelectReq req) {
+
+        return BaseResult.success(waybillOrderService.getWaybillOrderSelectList(req));
+    }
 }

+ 31 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/WaybillOrderSelectReq.java

@@ -0,0 +1,31 @@
+package com.sckw.transport.model.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 运单号下拉查询请求
+ * @author system
+ */
+@Data
+@Schema(description = "运单号下拉查询请求")
+public class WaybillOrderSelectReq implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 运单号
+     */
+    @Schema(description = "运单号(模糊匹配)")
+    private String wOrderNo;
+
+    /**
+     * 企业ID
+     */
+    @Schema(description = "企业ID")
+    private Long entId;
+}

+ 4 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/MapVehicleVo.java

@@ -35,6 +35,10 @@ public class MapVehicleVo implements Serializable {
 
     @Schema(description = "车辆ID")
     private Long truckId;
+    @Schema(description = "能源类型")
+    private String energyType;
+    @Schema(description = "能源类型描述")
+    private String energyTypeDesc;
 
     @Schema(description = "司机姓名")
     private String driverName;

+ 35 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/WaybillOrderSelectOptionVo.java

@@ -0,0 +1,35 @@
+package com.sckw.transport.model.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 运单号下拉选项VO
+ * @author system
+ */
+@Data
+@Schema(description = "运单号下拉选项")
+public class WaybillOrderSelectOptionVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Schema(description = "运单ID")
+    private Long id;
+
+    @Schema(description = "运单号")
+    private String wOrderNo;
+
+    @Schema(description = "车牌号")
+    private String truckNo;
+
+    @Schema(description = "司机姓名")
+    private String driverName;
+
+    @Schema(description = "司机手机号")
+    private String driverPhone;
+
+    @Schema(description = "运单状态")
+    private Integer status;
+}

+ 28 - 5
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/repository/KwtWaybillOrderRepository.java

@@ -11,15 +11,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sckw.core.model.enums.CarWaybillEnum;
 import com.sckw.transport.dao.KwtWaybillOrderMapper;
 import com.sckw.transport.model.KwtWaybillOrder;
+import com.sckw.transport.model.vo.WaybillOrderSelectOptionVo;
 import jakarta.validation.constraints.NotBlank;
 import org.springframework.stereotype.Repository;
 
 import java.time.LocalDateTime;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-import java.util.Set;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @Author: 马超伟
@@ -30,6 +28,31 @@ import java.util.Set;
 
 @Repository
 public class KwtWaybillOrderRepository extends ServiceImpl<KwtWaybillOrderMapper, KwtWaybillOrder> {
+
+    /**
+     * 查询运单号下拉列表(支持模糊查询)
+     * @param entId 企业ID
+     * @param wOrderNo 运单号(模糊匹配)
+     * @return 运单号列表
+     */
+    public List<KwtWaybillOrder> selectWaybillOrderOptions(Long entId, String wOrderNo) {
+        LambdaQueryWrapper<KwtWaybillOrder> wrapper = Wrappers.<KwtWaybillOrder>lambdaQuery()
+                .select(KwtWaybillOrder::getId,
+                        KwtWaybillOrder::getWOrderNo,
+                        KwtWaybillOrder::getTruckNo,
+                        KwtWaybillOrder::getDriverName,
+                        KwtWaybillOrder::getDriverPhone,
+                        KwtWaybillOrder::getStatus)
+                .eq(KwtWaybillOrder::getDelFlag, 0)
+                .eq(entId != null, KwtWaybillOrder::getEntId, entId)
+                .like(StringUtils.isNotBlank(wOrderNo), KwtWaybillOrder::getWOrderNo, wOrderNo)
+                .orderByDesc(KwtWaybillOrder::getCreateTime)
+                .last("LIMIT 100");
+
+        return list(wrapper);
+
+    }
+
     public Page<KwtWaybillOrder> findPage(String truckNo,int pageNum, int pageSize, Date beforeDate, Date date) {
         Page<KwtWaybillOrder> page = new Page<>(pageNum, pageSize);
         LambdaQueryWrapper<KwtWaybillOrder> wrapper = Wrappers.<KwtWaybillOrder>lambdaQuery()

+ 9 - 4
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtLogisticsConsignmentService.java

@@ -17,6 +17,7 @@ import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.sckw.contract.api.RemoteContractService;
 import com.sckw.contract.api.model.dto.res.ContractCommonInfoResDto;
+import com.sckw.contract.api.model.vo.KwcContractLogisticsDto;
 import com.sckw.contract.api.model.vo.TradeContractResDto;
 import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
@@ -2517,7 +2518,11 @@ public class KwtLogisticsConsignmentService {
         }
         //根据物流订单号查询物流合同
         KwtLogisticsOrderContract orderContract = logisticsOrderContractRepository.queryByLogOrderId(logisticsOrder.getId());
-        TradeContractResDto tradeContractResDto = contractService.queryContractByContractId(orderContract.getContractId());
+        if (Objects.isNull(orderContract)){
+            log.info("物流合同不存在,物流订单号:{}", logisticsOrder.getId());
+            throw new BusinessException("物流合同不存在");
+        }
+        KwcContractLogisticsDto tradeContractResDto = contractService.queryContractByContractId(orderContract.getContractId());
         //根据订单号查询物流公司信息
         List<KwtLogisticsOrderUnit> unitList = logisticsOrderUnitRepository.queryByLOrderId(logisticsOrder.getId());
         Map<String, KwtLogisticsOrderUnit> logOrderIdUnitTypeKeyAndUnitMap = Maps.newHashMap();
@@ -2552,7 +2557,7 @@ public class KwtLogisticsConsignmentService {
     }
 
     @NotNull
-    private static LogisticsOrderDetailResp getLogisticsOrderDetailResp(KwtLogisticsOrderContract orderContract,TradeContractResDto tradeContractResDto, Map<String, KwtLogisticsOrderUnit> logOrderIdUnitTypeKeyAndUnitMap, KwtLogisticsOrder logisticsOrder,
+    private static LogisticsOrderDetailResp getLogisticsOrderDetailResp(KwtLogisticsOrderContract orderContract,KwcContractLogisticsDto tradeContractResDto, Map<String, KwtLogisticsOrderUnit> logOrderIdUnitTypeKeyAndUnitMap, KwtLogisticsOrder logisticsOrder,
                                                                         KwpGoods kwpGoods, Map<String, KwtLogisticsOrderAddress> logOrderIdAndUnitTypeKeyAndAddressMap, List<KwtWaybillOrderSubtask> waybillOrderSubtasks) {
         LogisticsOrderDetailResp logisticsOrderDetailResp = new LogisticsOrderDetailResp();
         //设置合同信息
@@ -2674,11 +2679,11 @@ public class KwtLogisticsConsignmentService {
         logisticsOrderDetailResp.setUnitInfoVO(unitInfoVO);
     }
 
-    private static void setContractInfo(KwtLogisticsOrderContract orderContract,TradeContractResDto tradeContractResDto, LogisticsOrderDetailResp logisticsOrderDetailResp) {
+    private static void setContractInfo(KwtLogisticsOrderContract orderContract,KwcContractLogisticsDto tradeContractResDto, LogisticsOrderDetailResp logisticsOrderDetailResp) {
         LogisticsOrderDetailResp.ContractInfoVO contractInfoVO = new LogisticsOrderDetailResp.ContractInfoVO();
         if (Objects.nonNull(tradeContractResDto)){
             contractInfoVO.setContractNo(tradeContractResDto.getContractNo());
-            contractInfoVO.setContractName(tradeContractResDto.getContactName());
+            contractInfoVO.setContractName(tradeContractResDto.getName());
         }
         logisticsOrderDetailResp.setContractInfoVO(contractInfoVO);
     }

+ 28 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderService.java

@@ -31,9 +31,11 @@ import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.transport.dao.*;
+import com.sckw.transport.repository.KwtWaybillOrderRepository;
 import com.sckw.transport.model.*;
 import com.sckw.transport.model.dto.*;
 import com.sckw.transport.model.vo.*;
+import com.sckw.transport.model.dto.WaybillOrderSelectReq;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.validation.Valid;
@@ -65,6 +67,8 @@ public class KwtWaybillOrderService {
     @Autowired
     KwtWaybillOrderMapper waybillOrderDao;
     @Autowired
+    KwtWaybillOrderRepository waybillOrderRepository;
+    @Autowired
     KwtWaybillOrderV1Mapper waybillOrderV1Dao;
     @Autowired
     KwtLogisticsOrderMapper logisticsOrderDao;
@@ -107,6 +111,30 @@ public class KwtWaybillOrderService {
     @Value("${message.waybill.refuseSendCar.pc}")
     private String refuseSendCarPcUrl;
 
+    /**
+     * 查询运单号下拉列表(支持模糊查询)
+     * @param req 查询请求
+     * @return 运单号列表
+     */
+    public List<WaybillOrderSelectOptionVo> getWaybillOrderSelectList(WaybillOrderSelectReq req) {
+        Long entId = req.getEntId() != null ? req.getEntId() : LoginUserHolder.getEntId();
+        List<KwtWaybillOrder> waybillOrders = waybillOrderRepository.selectWaybillOrderOptions(entId, req.getWOrderNo());
+        if (org.apache.commons.collections4.CollectionUtils.isEmpty(waybillOrders)) {
+            return List.of();
+        }
+
+        return waybillOrders.stream().map(order -> {
+            WaybillOrderSelectOptionVo vo = new WaybillOrderSelectOptionVo();
+            vo.setId(order.getId());
+            vo.setWOrderNo(order.getWOrderNo());
+            vo.setTruckNo(order.getTruckNo());
+            vo.setDriverName(order.getDriverName());
+            vo.setDriverPhone(order.getDriverPhone());
+            vo.setStatus(order.getStatus());
+            return vo;
+        }).collect(Collectors.toList());
+    }
+
     /**
      * @param driverId 司机ID
      * @desc 统计司机任务数(待接单 / 出车 / 执行 / 完结)

+ 38 - 6
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/kwfTruckTraceService.java

@@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.sckw.contract.api.RemoteContractService;
+import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.UrlConstants;
 import com.sckw.core.model.enums.AddressTypeEnum;
@@ -35,6 +36,7 @@ import com.sckw.redis.utils.RedissonUtils;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.KwsEnterpriseResDto;
+import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.transport.common.config.UrlConfigProperties;
 import com.sckw.transport.model.*;
 import com.sckw.transport.model.dto.TruckDto;
@@ -811,10 +813,24 @@ public class kwfTruckTraceService {
         List<Long> wOrderIds = waybillOrders.stream()
                 .map(KwtWaybillOrder::getId)
                 .collect(Collectors.toList());
-        
+        //获取车辆id
+        List<Long> truckIds = waybillOrders.stream()
+                .map(KwtWaybillOrder::getTruckId)
+                .distinct()
+                .collect(Collectors.toList());
+        //根据车辆id获取车辆信息
+        List<RTruckVo> truckVos = fleetService.findTruckByTruckIds(truckIds);
+        Map<Long, RTruckVo> truckIdMap = new HashMap<>();
+        if (CollectionUtils.isNotEmpty(truckVos)){
+            // 构建车辆ID到车辆信息的映射
+            truckIdMap = truckVos.stream()
+                    .filter(Objects::nonNull)
+                    .collect(Collectors.toMap(RTruckVo::getId, Function.identity(), (k1, k2) -> k1));
+        }
+
         // 查询子运单信息
         List<KwtWaybillOrderSubtask> subtasks = kwtWaybillOrderSubtaskRepository.queryByWOrderIds(wOrderIds);
-        final Map<Long, KwtWaybillOrderSubtask> wOrderIdSubtaskMap;
+         Map<Long, KwtWaybillOrderSubtask> wOrderIdSubtaskMap;
         if (CollectionUtils.isNotEmpty(subtasks)) {
             wOrderIdSubtaskMap = subtasks.stream()
                     .filter(subtask -> subtask.getWOrderId() != null)
@@ -889,12 +905,23 @@ public class kwfTruckTraceService {
                     })
                     .collect(Collectors.toList());
         }
-        
+        //查询字段
+        List<SysDictResDto> sysDictResDtos = remoteSystemService.queryDictByType(DictTypeEnum.ENERGY_TYPE.getType());
+        Map<String, SysDictResDto> energyTypeMap  = new HashMap<>();
+        if (CollectionUtils.isNotEmpty(sysDictResDtos)) {
+            // 构建字典映射
+            energyTypeMap = sysDictResDtos.stream()
+                    .collect(Collectors.toMap(SysDictResDto::getValue, Function.identity(), (k1, k2) -> k1));
+         }
+
         // 转换为 VO
         Map<String, KwtLogisticsOrderUnit> finalUnitMap = unitMap;
         Map<Long, KwtLogisticsOrderGoods> finalGoodsMap = goodsMap;
+        Map<Long, RTruckVo> finalTruckIdMap = truckIdMap;
+        Map<String, SysDictResDto> finalEnergyTypeMap = energyTypeMap;
         List<MapVehicleVo> result = filteredOrders.stream()
-                .map(order -> buildMapVehicleVo(order, wOrderIdSubtaskMap, finalUnitMap, finalGoodsMap, locationInfoMap, exceptionCountMap))
+                .map(order -> buildMapVehicleVo(order, wOrderIdSubtaskMap, finalUnitMap, finalGoodsMap,
+                        locationInfoMap, exceptionCountMap, finalTruckIdMap, finalEnergyTypeMap))
                 .collect(Collectors.toList());
         
         // 根据排序类型进行排序
@@ -1126,7 +1153,9 @@ public class kwfTruckTraceService {
                                            Map<String, KwtLogisticsOrderUnit> unitMap,
                                            Map<Long, KwtLogisticsOrderGoods> goodsMap,
                                            Map<String, VehicleLocationInfo> locationInfoMap,
-                                           Map<String, Integer> exceptionCountMap) {
+                                           Map<String, Integer> exceptionCountMap,
+                                           Map<Long, RTruckVo> truckIdMap,
+                                           Map<String, SysDictResDto> energyTypeMap) {
         MapVehicleVo vo = new MapVehicleVo();
         
         // 车辆和司机信息
@@ -1204,7 +1233,10 @@ public class kwfTruckTraceService {
         // 从异常表查询该运单的异常数量
         Integer exceptionCount = exceptionCountMap.getOrDefault(order.getWOrderNo(), 0);
         vo.setExceptionCount(exceptionCount);
-        
+        RTruckVo truckVo = truckIdMap.getOrDefault(order.getTruckId(), new RTruckVo());
+        vo.setEnergyType(Objects.isNull(truckVo.getEnergyType())? "":String.valueOf(truckVo.getEnergyType()));
+        SysDictResDto dictResDto = energyTypeMap.getOrDefault(String.valueOf(truckVo.getEnergyType()), new SysDictResDto());
+        vo.setEnergyType(dictResDto.getLabel());
         return vo;
     }