Quellcode durchsuchen

修复司机评分

donglang vor 1 Monat
Ursprung
Commit
e884537847
15 geänderte Dateien mit 216 neuen und 87 gelöschten Zeilen
  1. 7 6
      sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/RemoteContractService.java
  2. 35 0
      sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/model/vo/ContractLogisticsScoreVO.java
  3. 8 3
      sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/RemoteFleetService.java
  4. 34 0
      sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/dto/RUpdateDriverScoreDto.java
  5. 12 3
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/dubbo/RemoteContractServiceImpl.java
  6. 1 2
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/repository/KwcContractLogisticsScoreRepository.java
  7. 3 12
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractTradeService.java
  8. 37 26
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/dubbo/RemoteFleetServiceImpl.java
  9. 0 5
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/KwfDriver.java
  10. 0 7
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfDriverRepository.java
  11. 5 6
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfDriverScoreRepository.java
  12. 62 6
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/AbstractWaybillOrderHandler.java
  13. 2 2
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/CancelHandler.java
  14. 4 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/ComeIntoHandler.java
  15. 6 6
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/UnloadingHandler.java

+ 7 - 6
sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/RemoteContractService.java

@@ -1,11 +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.LogisticsEntDtoVO;
-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 java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -123,5 +119,10 @@ public interface RemoteContractService {
      */
     List<Long> queryEntByContractIds(List<Long> contractIds);
 
-    List<TradeContractUnitDto> queryContractUnitByContractId(Long contractId);
+
+    /**
+     * 查询物流企业评分
+     */
+    ContractLogisticsScoreVO findLogisticsScoreByEntId(Long supEntId, Long entId);
+
 }

+ 35 - 0
sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/model/vo/ContractLogisticsScoreVO.java

@@ -0,0 +1,35 @@
+package com.sckw.contract.api.model.vo;
+
+import com.sckw.core.model.base.BaseModel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 物流企业评分对象
+ * 
+ * @author tangyishan
+ * @date 2025-12-05
+ */
+
+@Data
+public class ContractLogisticsScoreVO extends BaseModel
+{
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 供应商企业id
+     */
+    private Long providerEntId;
+
+    /**
+     * 物流企业id
+     */
+    private Long logisticsEntId;
+
+    /**
+     * 物流企业评分
+     */
+    private BigDecimal score;
+
+}

+ 8 - 3
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/RemoteFleetService.java

@@ -1,7 +1,9 @@
 package com.sckw.fleet.api;
 
+import com.sckw.fleet.api.model.dto.RUpdateDriverScoreDto;
 import com.sckw.fleet.api.model.vo.*;
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -122,10 +124,13 @@ public interface RemoteFleetService {
 
     DriverConductRulesVO findDriverConductRulesByEntId(Long entId);
 
-    void updateDriverScore(Long entId, Long driverId, Integer score);
-
     List<RTruckVo> findTruckByEntIds(Long entId);
 
-    List<RDriverScoreVo> findDriverScoreIdByEntIds(Long proEntId, Long entId, List<Long> driverIds);
+    RDriverScoreVo findDriverScoreIdByEntIds(Long proEntId, Long entId, Long driverId);
+
+    RDriverScoreVo addDriverScoreIdByEntIds(Long proEntId, Long entId, Long driverId, BigDecimal score);
+
+    void updateDriverScoreIdByEntIds(RUpdateDriverScoreDto score);
+
 
 }

+ 34 - 0
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/dto/RUpdateDriverScoreDto.java

@@ -0,0 +1,34 @@
+package com.sckw.fleet.api.model.dto;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+/**
+ * @Author: tangyishan
+ * @CreateTime: 2025-12-11  14:46
+ * @Description: 更新司机评分参数
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class RUpdateDriverScoreDto {
+
+    /** 司机评分id */
+    private Long id;
+
+    /** 供应商企业id */
+    @NotNull
+    private Long supEntId;
+
+    /** 物流企业id */
+    @NotNull
+    private Long logEntId;
+
+    /** 变动评分 */
+    private BigDecimal score;
+
+}

+ 12 - 3
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/dubbo/RemoteContractServiceImpl.java

@@ -69,6 +69,7 @@ public class RemoteContractServiceImpl implements RemoteContractService {
     private final KwcContractLogisticsUnitRepository kwcContractLogisticsUnitRepository;
     private final KwcContractLogisticsGoodsRepository kwcContractLogisticsGoodsRepository;
     private final KwcContractTradeService kwcContractTradeService;
+    private final KwcContractLogisticsScoreRepository contractLogisticsScoreRepository;
 
     @Override
     public Map<Long, ContractCommonInfoResDto> queryContractBaseInfo(List<Long> contractIds) {
@@ -393,10 +394,18 @@ public class RemoteContractServiceImpl implements RemoteContractService {
         return kwcContractTradeService.queryEntByContractId(contractId);
     }
 
-
     @Override
-    public List<Long> queryEntByContractIds(List<Long> contractIds) {
-        return kwcContractTradeService.queryEntByContractIds(contractIds);
+    public ContractLogisticsScoreVO findLogisticsScoreByEntId(Long supEntId, Long entId) {
+        KwcContractLogisticsScore contractLogisticsScore = kwcContractTradeService.queryEntScoreByEntId(supEntId, entId);
+        if (contractLogisticsScore == null) {
+            return new ContractLogisticsScoreVO();
+        }
+
+        ContractLogisticsScoreVO vo = new ContractLogisticsScoreVO();
+        vo.setProviderEntId(contractLogisticsScore.getProviderEntId());
+        vo.setLogisticsEntId(contractLogisticsScore.getLogisticsEntId());
+        vo.setScore(contractLogisticsScore.getScore());
+        return vo;
     }
 
 

+ 1 - 2
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/repository/KwcContractLogisticsScoreRepository.java

@@ -15,7 +15,7 @@ import org.springframework.stereotype.Repository;
 @Repository
 public class KwcContractLogisticsScoreRepository extends ServiceImpl<KwcContractLogisticsScoreMapper, KwcContractLogisticsScore> {
 
-    public KwcContractLogisticsScore queryScoredByEntId(Long proEntId, Long logEntId) {
+    public KwcContractLogisticsScore findLogisticsScoreByEntId(Long proEntId, Long logEntId) {
         return getOne(Wrappers.<KwcContractLogisticsScore>lambdaQuery()
                 .eq(KwcContractLogisticsScore::getProviderEntId, proEntId)
                 .eq(KwcContractLogisticsScore::getLogisticsEntId, logEntId)
@@ -23,5 +23,4 @@ public class KwcContractLogisticsScoreRepository extends ServiceImpl<KwcContract
     }
 
 
-
 }

+ 3 - 12
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractTradeService.java

@@ -2216,22 +2216,13 @@ public class KwcContractTradeService {
 
     }
 
-    //查询物流合同物流企业信息
-    public List<Long> queryEntByContractIds(List<Long> contractIds) {
-        List<KwcContractLogisticsUnit> contractLogisticsUnits = kwcContractLogisticsUnitRepository.queryByContractIds(contractIds);
-        if (CollectionUtils.isEmpty(contractLogisticsUnits)) {
-            return Collections.emptyList();
-        }
-        return contractLogisticsUnits.stream().map(KwcContractLogisticsUnit::getEntId).collect(Collectors.toList());
-    }
-
     //查询物流企业评分数据
     public KwcContractLogisticsScore queryEntScoreByEntId(Long proEntId, Long logEntId) {
-        KwcContractLogisticsScore entScore = contractLogisticsScoreRepository.queryScoredByEntId(proEntId, logEntId);
-        if (entScore == null) {
+        KwcContractLogisticsScore logisticsScore = contractLogisticsScoreRepository.findLogisticsScoreByEntId(proEntId, logEntId);
+        if (logisticsScore == null) {
             return new KwcContractLogisticsScore();
         }
-        return entScore;
+        return logisticsScore;
     }
 
 }

+ 37 - 26
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/dubbo/RemoteFleetServiceImpl.java

@@ -8,7 +8,9 @@ import com.sckw.core.model.constant.Global;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.fleet.api.RemoteFleetService;
+import com.sckw.fleet.api.model.dto.RUpdateDriverScoreDto;
 import com.sckw.fleet.api.model.vo.*;
 import com.sckw.fleet.dao.KwfDriverMapper;
 import com.sckw.fleet.dao.KwfTruckMapper;
@@ -20,6 +22,7 @@ import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -597,21 +600,6 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
         return rulesVO;
     }
 
-    @Override
-    public void updateDriverScore(Long entId, Long driverId, Integer score) {
-        if (score == null) {
-            throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "加分分数不能为空!");
-        }
-        KwfDriver driver = driverRepository.findByEntAndDriverIds(entId, driverId);
-        if (driver == null) {
-            throw new BusinessPlatfromException(ErrorCodeEnum.DATA_NOT_EXIST, "司机数据不存在!");
-        }
-        int currentScore = driver.getScore() == null || driver.getScore() < 0  ? 0 : driver.getScore();
-        driver.setScore(currentScore + score);
-
-        driverRepository.updateById(driver);
-    }
-
     @Override
     public List<RTruckVo> findTruckByEntIds(Long entId) {
         List<KwfTruck> truckList = kwfTruckRepository.findTruckByEntIds(entId);
@@ -622,27 +610,50 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
     }
 
 
-    public List<RDriverScoreVo> findDriverScoreIdByEntIds(Long proEntId, Long logEntId, List<Long> driverIds) {
-        List<KwfDriverScore> driverScores = driverScoreRepository.findDriverScoreByEntIds(proEntId, logEntId, driverIds);
-        if(CollectionUtils.isEmpty(driverScores)){
-            return new ArrayList<>();
+    public RDriverScoreVo findDriverScoreIdByEntIds(Long proEntId, Long logEntId, Long driverId) {
+        KwfDriverScore driverScore = driverScoreRepository.findDriverScoreByEntIds(proEntId, logEntId, driverId);
+        if(driverScore == null){
+            return new RDriverScoreVo();
         }
-        return driverScores.stream().map(this::getDriverScoreVo).collect(Collectors.toList());
+        RDriverScoreVo vo = new RDriverScoreVo();
+        vo.setProviderEntId(driverScore.getProviderEntId());
+        vo.setLogisticsEntId(driverScore.getLogisticsEntId());
+        vo.setDriverId(driverScore.getDriverId());
+        vo.setProviderEntName(driverScore.getProviderEntName());
+        vo.setScore(driverScore.getScore());
 
+        return vo;
     }
 
-    /**
-     *  获取司机评分数据
-     * @param driverScore 车辆对象
-     * @return 车辆数据
-     */
-    private RDriverScoreVo getDriverScoreVo(KwfDriverScore driverScore) {
+    public  RDriverScoreVo addDriverScoreIdByEntIds(Long proEntId, Long entId, Long driverId, BigDecimal score) {
+        KwfDriverScore driverScore = new KwfDriverScore();
+        driverScore.setProviderEntId(proEntId);
+        driverScore.setLogisticsEntId(entId);
+        driverScore.setDriverId(driverId);
+        driverScore.setScore(score);
+        driverScore.setCreateBy(LoginUserHolder.getUserId());
+        driverScore.setUpdateBy(LoginUserHolder.getUserId());
+        boolean saveResult = driverScoreRepository.save(driverScore);
+        if (!saveResult) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "添加司机评分失败!");
+        }
+
         RDriverScoreVo vo = new RDriverScoreVo();
         vo.setProviderEntId(driverScore.getProviderEntId());
         vo.setLogisticsEntId(driverScore.getLogisticsEntId());
         vo.setDriverId(driverScore.getDriverId());
         vo.setProviderEntName(driverScore.getProviderEntName());
         vo.setScore(driverScore.getScore());
+
         return vo;
     }
+    public void updateDriverScoreIdByEntIds(RUpdateDriverScoreDto score) {
+        KwfDriverScore driverScore = new KwfDriverScore();
+        driverScore.setId(score.getId());
+        driverScore.setScore(score.getScore());
+        boolean saveResult = driverScoreRepository.updateById(driverScore);
+        if (!saveResult) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "修改司机评分失败!");
+        }
+    }
 }

+ 0 - 5
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/KwfDriver.java

@@ -71,9 +71,4 @@ public class KwfDriver extends BaseModel {
      */
     private Integer authStatus;
 
-    /**
-     * 自动派车评分
-     */
-    private Integer score;
-
 }

+ 0 - 7
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfDriverRepository.java

@@ -36,11 +36,4 @@ public class KwfDriverRepository extends ServiceImpl<KwfDriverMapper, KwfDriver>
                 .in(KwfDriver::getId,driveIdList));
     }
 
-    public KwfDriver findByEntAndDriverIds(Long entId, Long driveId) {
-        return getOne(Wrappers.<KwfDriver>lambdaQuery()
-                .eq(BaseModel::getDelFlag,0)
-                .eq(KwfDriver::getEntId,entId)
-                .eq(KwfDriver::getId,driveId)
-                .last("limit 1"));
-    }
 }

+ 5 - 6
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfDriverScoreRepository.java

@@ -7,7 +7,7 @@ import com.sckw.fleet.dao.KwfDriverScoreMapper;
 import com.sckw.fleet.model.KwfDriverScore;
 import org.springframework.stereotype.Repository;
 
-import java.util.List;
+import java.math.BigDecimal;
 
 
 /**
@@ -17,14 +17,13 @@ import java.util.List;
 @Repository
 public class KwfDriverScoreRepository extends ServiceImpl<KwfDriverScoreMapper, KwfDriverScore> {
 
-    public List<KwfDriverScore> findDriverScoreByEntIds(Long proEntId, Long logEntId, List<Long> driverIds) {
-        return list(Wrappers.<KwfDriverScore>lambdaQuery()
+    public KwfDriverScore findDriverScoreByEntIds(Long proEntId, Long logEntId, Long driverId) {
+        return getOne(Wrappers.<KwfDriverScore>lambdaQuery()
                 .eq(BaseModel::getDelFlag,0)
                 .eq(KwfDriverScore::getProviderEntId,proEntId)
                 .eq(KwfDriverScore::getLogisticsEntId,logEntId)
-                .in(KwfDriverScore::getDriverId,driverIds)
-                .orderByDesc(KwfDriverScore::getScore)
-                .orderByDesc(BaseModel::getId));
+                .eq(KwfDriverScore::getDriverId,driverId)
+                .last("limit 1"));
     }
 
 }

+ 62 - 6
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/AbstractWaybillOrderHandler.java

@@ -3,17 +3,19 @@ package com.sckw.transport.handler;
 
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.sckw.contract.api.RemoteContractService;
+import com.sckw.contract.api.model.vo.ContractLogisticsScoreVO;
 import com.sckw.core.common.enums.enums.ErrorCodeEnum;
 import com.sckw.core.exception.BusinessPlatfromException;
 import com.sckw.core.model.enums.CarWaybillV1Enum;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.fleet.api.RemoteFleetService;
+import com.sckw.fleet.api.model.dto.RUpdateDriverScoreDto;
 import com.sckw.fleet.api.model.vo.DriverConductRulesVO;
+import com.sckw.fleet.api.model.vo.RDriverScoreVo;
 import com.sckw.fleet.api.model.vo.TruckDispatchCoefficientVO;
 import com.sckw.order.api.dubbo.TradeOrderInfoService;
-import com.sckw.transport.model.KwtWaybillOrder;
-import com.sckw.transport.model.KwtWaybillOrderNode;
-import com.sckw.transport.model.KwtWaybillOrderSubtask;
+import com.sckw.transport.model.*;
 import com.sckw.transport.model.param.*;
 import com.sckw.transport.repository.*;
 import lombok.extern.slf4j.Slf4j;
@@ -21,6 +23,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -53,6 +56,8 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
     protected KwtLogisticsOrderAddressRepository logisticsOrderAddressRepository;
     @Autowired
     protected KwtLogisticsOrderCirculateRepository logisticsOrderCirculateRepository;
+    @Autowired
+    protected KwtLogisticsOrderUnitRepository logisticsOrderUnitRepository;
 
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
     protected RemoteFleetService remoteFleetService;
@@ -60,6 +65,8 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 80000)
     protected TradeOrderInfoService tradeOrderInfoService;
 
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteContractService remoteContractService;
 
 
     /**
@@ -219,9 +226,18 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
     }
 
 
-
-
-
+    // 查询供应商id
+    protected Long getSupplierId(KwtWaybillOrder waybillOrder) {
+        if (waybillOrder == null) {
+            return 0L;
+        }
+        //查询订单托运单位(自动派单订单承运单位只为供应商)
+        KwtLogisticsOrderUnit logisticsOrderUnit = logisticsOrderUnitRepository.queryByLOrderIdAndUnitType(waybillOrder.getLOrderId(), 1);
+        if (logisticsOrderUnit == null || logisticsOrderUnit.getEntId() == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.LOGISTICS_ORDER_NOT_ENT, "未找到关联的物流订单托运企业(供应商)!");
+        }
+        return logisticsOrderUnit.getEntId();
+    }
 
 
     /**
@@ -307,6 +323,46 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
         return diffMinutes;
     }
 
+    /**
+     * 修改司机评分
+     * @param supeEntId
+     * @param entId
+     * @param driverId
+     * @param score
+     */
+    public void updateDriverScore(Long supeEntId, Long entId, Long driverId, Integer score) {
+        if (score == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "加分分数不能为空!");
+        }
+        //1. 查询司机的评分
+        RDriverScoreVo driverScore = remoteFleetService.findDriverScoreIdByEntIds(supeEntId, entId, driverId);
+        //2.司机没评分,初始化时间分数(企业分数)
+        if (driverScore == null) {
+            ContractLogisticsScoreVO logisticsScore = remoteContractService.findLogisticsScoreByEntId(supeEntId, entId);
+            if (logisticsScore == null) {
+                throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "修改司机分数,企业无评分!");
+            }
+            driverScore = remoteFleetService.addDriverScoreIdByEntIds(supeEntId, entId, driverId, logisticsScore.getScore());
+            if (driverScore == null) {
+                throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "初始化司机评分失败!");
+            }
+        }
+        //司机当前分数
+        BigDecimal currentScore = driverScore.getScore() == null || driverScore.getScore() .compareTo(BigDecimal.ZERO) < 0
+                ? BigDecimal.ZERO : driverScore.getScore();
+        //司机加减分数
+        BigDecimal scoreChange = BigDecimal.valueOf(score);
+
+        //3. 修改司机评分
+        RUpdateDriverScoreDto driverScoreDto = new RUpdateDriverScoreDto();
+        driverScoreDto.setId(driverScore.getDriverId());
+        driverScoreDto.setScore(currentScore.add(scoreChange));
+        remoteFleetService.updateDriverScoreIdByEntIds(driverScoreDto);
+
+        //4.新增司机评分明细
+
+    }
+
 
 }
 

+ 2 - 2
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/CancelHandler.java

@@ -148,8 +148,8 @@ public class CancelHandler extends AbstractWaybillOrderHandler<WaybillOrderCance
             log.info("司机取消运单超时!司机违规取消运单分钟数限制:" + illegalCancelOrderMinutes + "分钟,实际:" + timeDiffMinutes + "分钟");
             //1、更新司机分数(减分)
             illegalCancelOrder = -Math.abs(illegalCancelOrder);
-            remoteFleetService.updateDriverScore(waybillOrder.getEntId(), waybillOrder.getDriverId(), illegalCancelOrder);
-
+            Long supplierId = getSupplierId(waybillOrder);
+            updateDriverScore(supplierId, waybillOrder.getEntId(), waybillOrder.getDriverId(), illegalCancelOrder);
             //2、更新企业分数(减分)
 
         }

+ 4 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/ComeIntoHandler.java

@@ -143,8 +143,8 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
             }
             // 扣分:将配置值转为负数实现扣分
             notOnTimeArrive = -Math.abs(notOnTimeArrive);
-            remoteFleetService.updateDriverScore(waybillOrder.getEntId(), waybillOrder.getDriverId(), notOnTimeArrive);
-
+            Long supplierId = getSupplierId(waybillOrder);
+            updateDriverScore(supplierId, waybillOrder.getEntId(), waybillOrder.getDriverId(), notOnTimeArrive);
             //2、更新企业分数(减分)
 
         }
@@ -230,7 +230,8 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
         updateNode(waybillOrder, nodeIds, continuousOnTimeArriveTimes, continuousOnTimeArrive);
 
         //2 .更新司机分数(加分)
-        remoteFleetService.updateDriverScore(waybillOrder.getEntId(), waybillOrder.getDriverId(), continuousOnTimeArrive);
+        Long supplierId = getSupplierId(waybillOrder);
+        updateDriverScore(supplierId, waybillOrder.getEntId(), waybillOrder.getDriverId(), continuousOnTimeArrive);
 
         //3. 更新企业分数(加分)
 

+ 6 - 6
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/UnloadingHandler.java

@@ -273,8 +273,8 @@ public class UnloadingHandler extends AbstractWaybillOrderHandler<WaybillOrderUn
             log.info("【司机虚假卸货】运单ID={},卸货地址偏差={}KM",waybillOrder.getId(), distanceKm);
             //1、更新司机分数(减分)
             fakeUnload = -Math.abs(fakeUnload);
-            remoteFleetService.updateDriverScore(waybillOrder.getEntId(), waybillOrder.getDriverId(), fakeUnload);
-
+            Long supplierId = getSupplierId(waybillOrder);
+            updateDriverScore(supplierId, waybillOrder.getEntId(), waybillOrder.getDriverId(), fakeUnload);
             //2、更新企业分数(减分)
 
         }
@@ -303,8 +303,8 @@ public class UnloadingHandler extends AbstractWaybillOrderHandler<WaybillOrderUn
         if (timeOut) {
             //1、更新司机分数(减分)
             timeoutScore = -Math.abs(timeoutScore);
-            remoteFleetService.updateDriverScore(waybillOrder.getEntId(), waybillOrder.getDriverId(), timeoutScore);
-
+            Long supplierId = getSupplierId(waybillOrder);
+            updateDriverScore(supplierId, waybillOrder.getEntId(), waybillOrder.getDriverId(), timeoutScore);
             //2、更新企业分数(减分)
         }
 
@@ -449,8 +449,8 @@ public class UnloadingHandler extends AbstractWaybillOrderHandler<WaybillOrderUn
         updateNode(waybillOrder, nodeIds, continuousCount, continuousOnTimeUnload);
 
         //2 .更新司机分数(加分)
-        remoteFleetService.updateDriverScore(waybillOrder.getEntId(), waybillOrder.getDriverId(), continuousOnTimeUnload);
-
+        Long supplierId = getSupplierId(waybillOrder);
+        updateDriverScore(supplierId, waybillOrder.getEntId(), waybillOrder.getDriverId(), continuousOnTimeUnload);
         //3. 更新企业分数(加分)
 
     }