Răsfoiți Sursa

修改钱包和车辆列表bug

donglang 6 luni în urmă
părinte
comite
75bbe3f710
26 a modificat fișierele cu 843 adăugiri și 161 ștergeri
  1. 2 2
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/ErrorCodeEnum.java
  2. 4 0
      sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/RemoteFleetService.java
  3. 122 0
      sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/vo/DriverConductRulesVO.java
  4. 109 0
      sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/vo/TruckDispatchCoefficientVO.java
  5. 61 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/dubbo/RemoteFleetServiceImpl.java
  6. 46 15
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/KwfDriverConductRules.java
  7. 8 8
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/KwfTruckDispatchCoefficient.java
  8. 49 12
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/request/DriverConductRulesUpdateRequest.java
  9. 8 8
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/request/TruckDispatchCoefficientUpdateRequest.java
  10. 55 20
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverConductRulesVO.java
  11. 8 8
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckDispatchCoefficientVO.java
  12. 8 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfDriverConductRulesRepository.java
  13. 8 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfTruckDispatchCoefficientRepository.java
  14. 41 23
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfAutoDispatchService.java
  15. 2 1
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java
  16. 14 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/request/KwpBizWalletQueryRequest.java
  17. 33 16
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/wallet/KwpBizWalletService.java
  18. 1 1
      sckw-modules/sckw-product/src/main/java/com/sckw/product/controller/KwpGoodsController.java
  19. 38 25
      sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java
  20. 79 2
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/AbstractWaybillOrderHandler.java
  21. 29 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/CancelHandler.java
  22. 39 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/ComeIntoHandler.java
  23. 32 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/UnloadingHandler.java
  24. 7 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/repository/KwtWaybillOrderAddressRepository.java
  25. 16 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/repository/KwtWaybillOrderNodeRepository.java
  26. 24 19
      sql/2025/12/01/2025_12_04_donglang.sql

+ 2 - 2
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/ErrorCodeEnum.java

@@ -71,8 +71,8 @@ public enum ErrorCodeEnum {
     WAYBILL_ORDER_STATUS_ERROR("80005", " 物流运单状态异常"),
     WAYBILL_ORDER_TICKET_NOT_FOUND("80006", " 当前物流运单装卸货信息不存在"),
     WAYBILL_ORDER_NOT_TRUCK("80007", " 物流运单无关联车辆数据"),
-    WAYBILL_ORDER_NOT_TICKET("80007", " 物流运单无关联装卸货数据"),
-
+    WAYBILL_ORDER_NOT_TICKET("80008", " 物流运单无关联装卸货数据"),
+    WAYBILL_NODE_NOT_EXIST("80009", " 物流运单无节点数据"),
 
 
     // ====================== 司机/车辆(90000~99999)======================

+ 4 - 0
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/RemoteFleetService.java

@@ -116,4 +116,8 @@ public interface RemoteFleetService {
 
     RFleetVo findFleetByTruckId(Long truckId, Long entId);
 
+    TruckDispatchCoefficientVO findAutoTruckDispatchByEntId(Long entId);
+
+    DriverConductRulesVO findDriverConductRulesByEntId(Long entId);
+
 }

+ 122 - 0
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/vo/DriverConductRulesVO.java

@@ -0,0 +1,122 @@
+package com.sckw.fleet.api.model.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 司机行为规则返回模型
+ *
+ * @author Generated
+ * @since 2024
+ */
+@Data
+public class DriverConductRulesVO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -5360767484446805797L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 单趟严重超时(违规次数/扣分)
+     */
+    private Integer unloadSeriousTimeout;
+
+    /**
+     * 单趟严重超时倍数
+     */
+    private BigDecimal unloadSeriousTimeoutMultiple;
+
+    /**
+     * 单据错误/缺失(违规次数/扣分)
+     */
+    private Integer documentErrorMissing;
+
+    /**
+     * 未按时到场(违规次数/扣分)
+     */
+    private Integer notOnTimeArrive;
+
+    /**
+     * 虚假卸货(违规次数/扣分)
+     */
+    private Integer fakeUnload;
+
+    /**
+     * 虚假卸货偏差距离
+     */
+    private Integer fakeUnloadDistance;
+
+    /**
+     * 违规取消运单(违规次数/扣分)
+     */
+    private Integer illegalCancelOrder;
+
+    /**
+     * 违规取消运单分钟数
+     */
+    private Integer illegalCancelOrderMinutes;
+
+    /**
+     * 连续按时到场(达标次数/加分)
+     */
+    private Integer continuousOnTimeArrive;
+
+    /**
+     * 连续按时到场次数
+     */
+    private Integer continuousOnTimeArriveTimes;
+
+    /**
+     * 连续准时卸货(达标次数/加分)
+     */
+    private Integer continuousOnTimeUnload;
+
+    /**
+     * 连续准时卸货次数
+     */
+    private Integer continuousOnTimeUnloadTimes;
+
+    /**
+     * 连续准确填写卸货信息(达标次数/加分)
+     */
+    private Integer continuousAccurateUnload;
+
+    /**
+     * 连续准确填写卸货信息次数
+     */
+    private Integer continuousAccurateUnloadTimes;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 创建人(用户ID,默认-1)
+     */
+    private Long createUser;
+
+    /**
+     * 更新人(用户ID,默认-1)
+     */
+    private Long updateUser;
+
+}

+ 109 - 0
sckw-modules-api/sckw-fleet-api/src/main/java/com/sckw/fleet/api/model/vo/TruckDispatchCoefficientVO.java

@@ -0,0 +1,109 @@
+package com.sckw.fleet.api.model.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 司机行为规则返回模型
+ *
+ * @author Generated
+ * @since 2024
+ */
+@Data
+public class TruckDispatchCoefficientVO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -5360767484446805797L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 车辆工作时长
+     */
+    private Integer vehicleWorkHours;
+
+    /**
+     * 车辆装货时长
+     */
+    private Integer vehicleLoadingHours;
+
+    /**
+     * 车辆卸货时长
+     */
+    private Integer vehicleUnloadingHours;
+
+    /**
+     * 司机超时限制
+     */
+    private Integer driverTimeoutLimit;
+
+    /**
+     * 车辆平均载重
+     */
+    private Integer vehicleAvgLoad;
+
+    /**
+     * 车辆平均速度
+     */
+    private Integer vehicleAvgSpeed;
+
+    /**
+     * 车辆最大任务数
+     */
+    private Integer vehicleMaxTasks;
+
+    /**
+     * 司机接单限制
+     */
+    private Integer driverOrderLimit;
+
+    /**
+     * 场内车辆容量
+     */
+    private Integer yardVehicleCapacity;
+
+    /**
+     * 最大占比
+     */
+    private Integer maxRatio;
+
+    /**
+     * 缓冲系数
+     */
+    private BigDecimal bufferCoefficient;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 创建人(用户ID,默认-1)
+     */
+    private Long createUser;
+
+    /**
+     * 更新人(用户ID,默认-1)
+     */
+    private Long updateUser;
+
+
+
+}

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

@@ -44,6 +44,8 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
     private final KwfTruckRouteRepository kwfTruckRouteRepository;
     private final KwfTruckAxleNumRepository kwfTruckAxleNumRepository;
     private final KwfFleetRepository kwfFleetRepository;
+    private final KwfTruckDispatchCoefficientRepository truckDispatchCoefficientRepository;
+    private final KwfDriverConductRulesRepository driverConductRulesRepository;
 
     /**
      * @param driverIds 司机档案主键id,多个已逗号隔开
@@ -489,5 +491,64 @@ public class RemoteFleetServiceImpl implements RemoteFleetService {
         kwfTruckRepository.save(truck);
     }
 
+    @Override
+    public TruckDispatchCoefficientVO findAutoTruckDispatchByEntId(Long entId) {
+        KwfTruckDispatchCoefficient result = truckDispatchCoefficientRepository.findAutoTruckDispatchByEntId(entId);
+        if (result == null) {
+            return new TruckDispatchCoefficientVO();
+        }
+
+        TruckDispatchCoefficientVO rulesVO = new TruckDispatchCoefficientVO();
+        rulesVO.setId(result.getId());
+        rulesVO.setEntId(result.getEntId());
+        rulesVO.setVehicleWorkHours(result.getVehicleWorkHours());
+        rulesVO.setVehicleLoadingHours(result.getVehicleLoadingHours());
+        rulesVO.setVehicleUnloadingHours(result.getVehicleUnloadingHours());
+        rulesVO.setDriverTimeoutLimit(result.getDriverTimeoutLimit());
+        rulesVO.setVehicleAvgLoad(result.getVehicleAvgLoad());
+        rulesVO.setVehicleAvgSpeed(result.getVehicleAvgSpeed());
+        rulesVO.setVehicleMaxTasks(result.getVehicleMaxTasks());
+        rulesVO.setDriverOrderLimit(result.getDriverOrderLimit());
+        rulesVO.setYardVehicleCapacity(result.getYardVehicleCapacity());
+        rulesVO.setMaxRatio(result.getMaxRatio());
+        rulesVO.setBufferCoefficient(result.getBufferCoefficient());
+        rulesVO.setCreateTime(result.getCreateTime());
+        rulesVO.setUpdateTime(result.getUpdateTime());
+        rulesVO.setCreateUser(result.getCreateUser());
+        rulesVO.setUpdateUser(result.getUpdateUser());
+        return rulesVO;
+
+    }
 
+    @Override
+    public DriverConductRulesVO findDriverConductRulesByEntId(Long entId) {
+        KwfDriverConductRules result = driverConductRulesRepository.findDriverConductRulesByEntId(entId);
+        if (result == null) {
+            return new DriverConductRulesVO();
+        }
+
+        DriverConductRulesVO rulesVO = new DriverConductRulesVO();
+        rulesVO.setId(result.getId());
+        rulesVO.setEntId(result.getEntId());
+        rulesVO.setUnloadSeriousTimeout(result.getUnloadSeriousTimeout());
+        rulesVO.setUnloadSeriousTimeoutMultiple(result.getUnloadSeriousTimeoutMultiple());
+        rulesVO.setDocumentErrorMissing(result.getDocumentErrorMissing());
+        rulesVO.setNotOnTimeArrive(result.getNotOnTimeArrive());
+        rulesVO.setFakeUnload(result.getFakeUnload());
+        rulesVO.setFakeUnloadDistance(result.getFakeUnloadDistance());
+        rulesVO.setIllegalCancelOrder(result.getIllegalCancelOrder());
+        rulesVO.setIllegalCancelOrderMinutes(result.getIllegalCancelOrderMinutes());
+        rulesVO.setContinuousOnTimeArrive(result.getContinuousOnTimeArrive());
+        rulesVO.setContinuousOnTimeArriveTimes(result.getContinuousOnTimeArriveTimes());
+        rulesVO.setContinuousOnTimeUnload(result.getContinuousOnTimeUnload());
+        rulesVO.setContinuousOnTimeUnloadTimes(result.getContinuousOnTimeUnloadTimes());
+        rulesVO.setContinuousAccurateUnload(result.getContinuousAccurateUnload());
+        rulesVO.setContinuousAccurateUnloadTimes(result.getContinuousAccurateUnloadTimes());
+        rulesVO.setCreateTime(result.getCreateTime());
+        rulesVO.setUpdateTime(result.getUpdateTime());
+        rulesVO.setCreateUser(result.getCreateUser());
+        rulesVO.setUpdateUser(result.getUpdateUser());
+
+        return rulesVO;
+    }
 }

+ 46 - 15
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/KwfDriverConductRules.java

@@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -37,22 +38,28 @@ public class KwfDriverConductRules implements Serializable {
     private Long entId;
 
     /**
-     * 未按时到场(违规次数/扣分)
+     * 单趟严重超时(违规次数/扣分)
      */
-    @TableField("not_on_time_arrive")
-    private Integer notOnTimeArrive;
+    @TableField("unload_serious_timeout")
+    private Integer unloadSeriousTimeout;
 
     /**
-     * 违规取消运单(违规次数/扣分)
+     * 单趟严重超时倍数
      */
-    @TableField("illegal_cancel_order")
-    private Integer illegalCancelOrder;
+    @TableField("unload_serious_timeout_multiple")
+    private BigDecimal unloadSeriousTimeoutMultiple;
 
     /**
-     * 卸货严重超时(违规次数/扣分)
+     * 单据错误/缺失(违规次数/扣分)
      */
-    @TableField("unload_serious_timeout")
-    private Integer unloadSeriousTimeout;
+    @TableField("document_error_missing")
+    private Integer documentErrorMissing;
+
+    /**
+     * 未按时到场(违规次数/扣分)
+     */
+    @TableField("not_on_time_arrive")
+    private Integer notOnTimeArrive;
 
     /**
      * 虚假卸货(违规次数/扣分)
@@ -61,10 +68,22 @@ public class KwfDriverConductRules implements Serializable {
     private Integer fakeUnload;
 
     /**
-     * 单据错误/缺失(违规次数/扣分)
+     * 虚假卸货偏差距离
      */
-    @TableField("document_error_missing")
-    private Integer documentErrorMissing;
+    @TableField("fake_unload_distance")
+    private Integer fakeUnloadDistance;
+
+    /**
+     * 违规取消运单(违规次数/扣分)
+     */
+    @TableField("illegal_cancel_order")
+    private Integer illegalCancelOrder;
+
+    /**
+     * 违规取消运单分钟数
+     */
+    @TableField("illegal_cancel_order_minutes")
+    private Integer illegalCancelOrderMinutes;
 
     /**
      * 连续按时到场(达标次数/加分)
@@ -72,12 +91,24 @@ public class KwfDriverConductRules implements Serializable {
     @TableField("continuous_on_time_arrive")
     private Integer continuousOnTimeArrive;
 
+    /**
+     * 连续按时到场次数
+     */
+    @TableField("continuous_on_time_arrive_times")
+    private Integer continuousOnTimeArriveTimes;
+
     /**
      * 连续准时卸货(达标次数/加分)
      */
     @TableField("continuous_on_time_unload")
     private Integer continuousOnTimeUnload;
 
+    /**
+     * 连续准时卸货次数
+     */
+    @TableField("continuous_on_time_unload_times")
+    private Integer continuousOnTimeUnloadTimes;
+
     /**
      * 连续准确填写卸货信息(达标次数/加分)
      */
@@ -85,10 +116,10 @@ public class KwfDriverConductRules implements Serializable {
     private Integer continuousAccurateUnload;
 
     /**
-     * 是否删除(0未删除,1删除)
+     * 连续准确填写卸货信息次数
      */
-    @TableField("del_flag")
-    private Integer delFlag;
+    @TableField("continuous_accurate_unload_times")
+    private Integer continuousAccurateUnloadTimes;
 
     /**
      * 创建时间

+ 8 - 8
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/KwfTruckDispatchCoefficient.java

@@ -41,37 +41,37 @@ public class KwfTruckDispatchCoefficient implements Serializable {
      * 车辆工作时长
      */
     @TableField("vehicle_work_hours")
-    private BigDecimal vehicleWorkHours;
+    private Integer vehicleWorkHours;
 
     /**
      * 车辆装货时长
      */
     @TableField("vehicle_loading_hours")
-    private BigDecimal vehicleLoadingHours;
+    private Integer vehicleLoadingHours;
 
     /**
      * 车辆卸货时长
      */
     @TableField("vehicle_unloading_hours")
-    private BigDecimal vehicleUnloadingHours;
+    private Integer vehicleUnloadingHours;
 
     /**
      * 司机超时限制
      */
     @TableField("driver_timeout_limit")
-    private BigDecimal driverTimeoutLimit;
+    private Integer driverTimeoutLimit;
 
     /**
      * 车辆平均载重
      */
     @TableField("vehicle_avg_load")
-    private BigDecimal vehicleAvgLoad;
+    private Integer vehicleAvgLoad;
 
     /**
      * 车辆平均速度
      */
     @TableField("vehicle_avg_speed")
-    private BigDecimal vehicleAvgSpeed;
+    private Integer vehicleAvgSpeed;
 
     /**
      * 车辆最大任务数
@@ -83,7 +83,7 @@ public class KwfTruckDispatchCoefficient implements Serializable {
      * 司机接单限制
      */
     @TableField("driver_order_limit")
-    private BigDecimal driverOrderLimit;
+    private Integer driverOrderLimit;
 
     /**
      * 场内车辆容量
@@ -95,7 +95,7 @@ public class KwfTruckDispatchCoefficient implements Serializable {
      * 最大占比
      */
     @TableField("max_ratio")
-    private BigDecimal maxRatio;
+    private Integer maxRatio;
 
     /**
      * 缓冲系数

+ 49 - 12
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/request/DriverConductRulesUpdateRequest.java

@@ -5,6 +5,7 @@ import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.math.BigDecimal;
 
 /**
  * @author zk
@@ -24,22 +25,28 @@ public class DriverConductRulesUpdateRequest implements Serializable {
     private Long id;
 
     /**
-     * 未按时到场(违规次数/扣分)
+     * 单趟严重超时(违规次数/扣分)
      */
-    @Schema(description = "未按时到场")
-    private Integer notOnTimeArrive;
+    @Schema(description = "单趟严重超时")
+    private Integer unloadSeriousTimeout;
 
     /**
-     * 违规取消运单(违规次数/扣分)
+     * 单趟严重超时倍数
      */
-    @Schema(description = "违规取消运单")
-    private Integer illegalCancelOrder;
+    @Schema(description = "单趟严重超时倍数")
+    private BigDecimal unloadSeriousTimeoutMultiple;
 
     /**
-     * 卸货严重超时(违规次数/扣分)
+     * 单据错误/缺失(违规次数/扣分)
      */
-    @Schema(description = "卸货严重超时")
-    private Integer unloadSeriousTimeout;
+    @Schema(description = "单据错误/缺失")
+    private Integer documentErrorMissing;
+
+    /**
+     * 未按时到场(违规次数/扣分)
+     */
+    @Schema(description = "未按时到场")
+    private Integer notOnTimeArrive;
 
     /**
      * 虚假卸货(违规次数/扣分)
@@ -48,10 +55,22 @@ public class DriverConductRulesUpdateRequest implements Serializable {
     private Integer fakeUnload;
 
     /**
-     * 单据错误/缺失(违规次数/扣分)
+     * 虚假卸货偏差距离
      */
-    @Schema(description = "单据错误/缺失")
-    private Integer documentErrorMissing;
+    @Schema(description = "虚假卸货偏差距离")
+    private Integer fakeUnloadDistance;
+
+    /**
+     * 违规取消运单(违规次数/扣分)
+     */
+    @Schema(description = "违规取消运单")
+    private Integer illegalCancelOrder;
+
+    /**
+     * 违规取消运单分钟数
+     */
+    @Schema(description = "违规取消运单分钟数")
+    private Integer illegalCancelOrderMinutes;
 
     /**
      * 连续按时到场(达标次数/加分)
@@ -59,18 +78,36 @@ public class DriverConductRulesUpdateRequest implements Serializable {
     @Schema(description = "连续按时到场")
     private Integer continuousOnTimeArrive;
 
+    /**
+     * 连续按时到场次数
+     */
+    @Schema(description = "连续按时到场次数")
+    private Integer continuousOnTimeArriveTimes;
+
     /**
      * 连续准时卸货(达标次数/加分)
      */
     @Schema(description = "连续准时卸货")
     private Integer continuousOnTimeUnload;
 
+    /**
+     * 连续准时卸货次数
+     */
+    @Schema(description = "连续准时卸货次数")
+    private Integer continuousOnTimeUnloadTimes;
+
     /**
      * 连续准确填写卸货信息(达标次数/加分)
      */
     @Schema(description = "连续准确填写卸货信息")
     private Integer continuousAccurateUnload;
 
+    /**
+     * 连续准确填写卸货信息次数
+     */
+    @Schema(description = "连续准确填写卸货信息次数")
+    private Integer continuousAccurateUnloadTimes;
+
 
 
 }

+ 8 - 8
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/request/TruckDispatchCoefficientUpdateRequest.java

@@ -28,37 +28,37 @@ public class TruckDispatchCoefficientUpdateRequest implements Serializable {
      * 车辆工作时长
      */
     @Schema(description = "车辆工作时长")
-    private BigDecimal vehicleWorkHours;
+    private Integer vehicleWorkHours;
 
     /**
      * 车辆装货时长
      */
     @Schema(description = "车辆装货时长")
-    private BigDecimal vehicleLoadingHours;
+    private Integer vehicleLoadingHours;
 
     /**
      * 车辆卸货时长
      */
     @Schema(description = "车辆卸货时长")
-    private BigDecimal vehicleUnloadingHours;
+    private Integer vehicleUnloadingHours;
 
     /**
      * 司机超时限制
      */
     @Schema(description = "司机超时限制")
-    private BigDecimal driverTimeoutLimit;
+    private Integer driverTimeoutLimit;
 
     /**
      * 车辆平均载重
      */
     @Schema(description = "车辆平均载重")
-    private BigDecimal vehicleAvgLoad;
+    private Integer vehicleAvgLoad;
 
     /**
      * 车辆平均速度
      */
     @Schema(description = "车辆平均速度")
-    private BigDecimal vehicleAvgSpeed;
+    private Integer vehicleAvgSpeed;
 
     /**
      * 车辆最大任务数
@@ -70,7 +70,7 @@ public class TruckDispatchCoefficientUpdateRequest implements Serializable {
      * 司机接单限制
      */
     @Schema(description = "司机接单限制")
-    private BigDecimal driverOrderLimit;
+    private Integer driverOrderLimit;
 
     /**
      * 场内车辆容量
@@ -82,7 +82,7 @@ public class TruckDispatchCoefficientUpdateRequest implements Serializable {
      * 最大占比
      */
     @Schema(description = "最大占比")
-    private BigDecimal maxRatio;
+    private Integer maxRatio;
 
     /**
      * 缓冲系数

+ 55 - 20
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverConductRulesVO.java

@@ -6,6 +6,7 @@ import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -33,22 +34,28 @@ public class KwfDriverConductRulesVO implements Serializable {
     private Long entId;
 
     /**
-     * 未按时到场(违规次数/扣分)
+     * 单趟严重超时(违规次数/扣分)
      */
-    @Schema(description = "未按时到场")
-    private Integer notOnTimeArrive;
+    @Schema(description = "单趟严重超时")
+    private Integer unloadSeriousTimeout;
 
     /**
-     * 违规取消运单(违规次数/扣分)
+     * 单趟严重超时倍数
      */
-    @Schema(description = "违规取消运单")
-    private Integer illegalCancelOrder;
+    @Schema(description = "单趟严重超时倍数")
+    private BigDecimal unloadSeriousTimeoutMultiple;
 
     /**
-     * 卸货严重超时(违规次数/扣分)
+     * 单据错误/缺失(违规次数/扣分)
      */
-    @Schema(description = "卸货严重超时")
-    private Integer unloadSeriousTimeout;
+    @Schema(description = "单据错误/缺失")
+    private Integer documentErrorMissing;
+
+    /**
+     * 未按时到场(违规次数/扣分)
+     */
+    @Schema(description = "未按时到场")
+    private Integer notOnTimeArrive;
 
     /**
      * 虚假卸货(违规次数/扣分)
@@ -57,10 +64,22 @@ public class KwfDriverConductRulesVO implements Serializable {
     private Integer fakeUnload;
 
     /**
-     * 单据错误/缺失(违规次数/扣分)
+     * 虚假卸货偏差距离
      */
-    @Schema(description = "单据错误/缺失")
-    private Integer documentErrorMissing;
+    @Schema(description = "虚假卸货偏差距离")
+    private Integer fakeUnloadDistance;
+
+    /**
+     * 违规取消运单(违规次数/扣分)
+     */
+    @Schema(description = "违规取消运单")
+    private Integer illegalCancelOrder;
+
+    /**
+     * 违规取消运单分钟数
+     */
+    @Schema(description = "违规取消运单分钟数")
+    private Integer illegalCancelOrderMinutes;
 
     /**
      * 连续按时到场(达标次数/加分)
@@ -68,12 +87,24 @@ public class KwfDriverConductRulesVO implements Serializable {
     @Schema(description = "连续按时到场")
     private Integer continuousOnTimeArrive;
 
+    /**
+     * 连续按时到场次数
+     */
+    @Schema(description = "连续按时到场次数")
+    private Integer continuousOnTimeArriveTimes;
+
     /**
      * 连续准时卸货(达标次数/加分)
      */
     @Schema(description = "连续准时卸货")
     private Integer continuousOnTimeUnload;
 
+    /**
+     * 连续准时卸货次数
+     */
+    @Schema(description = "连续准时卸货次数")
+    private Integer continuousOnTimeUnloadTimes;
+
     /**
      * 连续准确填写卸货信息(达标次数/加分)
      */
@@ -81,10 +112,10 @@ public class KwfDriverConductRulesVO implements Serializable {
     private Integer continuousAccurateUnload;
 
     /**
-     * 是否删除(0未删除,1删除)
+     * 连续准确填写卸货信息次数
      */
-    @Schema(description = "是否删除")
-    private Integer delFlag;
+    @Schema(description = "连续准确填写卸货信息次数")
+    private Integer continuousAccurateUnloadTimes;
 
     /**
      * 创建时间
@@ -121,15 +152,20 @@ public class KwfDriverConductRulesVO implements Serializable {
         KwfDriverConductRulesVO rulesVO = KwfDriverConductRulesVO.getInstance();
         rulesVO.setId(rules.getId());
         rulesVO.setEntId(rules.getEntId());
-        rulesVO.setNotOnTimeArrive(rules.getNotOnTimeArrive());
-        rulesVO.setIllegalCancelOrder(rules.getIllegalCancelOrder());
         rulesVO.setUnloadSeriousTimeout(rules.getUnloadSeriousTimeout());
-        rulesVO.setFakeUnload(rules.getFakeUnload());
+        rulesVO.setUnloadSeriousTimeoutMultiple(rules.getUnloadSeriousTimeoutMultiple());
         rulesVO.setDocumentErrorMissing(rules.getDocumentErrorMissing());
+        rulesVO.setNotOnTimeArrive(rules.getNotOnTimeArrive());
+        rulesVO.setFakeUnload(rules.getFakeUnload());
+        rulesVO.setFakeUnloadDistance(rules.getFakeUnloadDistance());
+        rulesVO.setIllegalCancelOrder(rules.getIllegalCancelOrder());
+        rulesVO.setIllegalCancelOrderMinutes(rules.getIllegalCancelOrderMinutes());
         rulesVO.setContinuousOnTimeArrive(rules.getContinuousOnTimeArrive());
+        rulesVO.setContinuousOnTimeArriveTimes(rules.getContinuousOnTimeArriveTimes());
         rulesVO.setContinuousOnTimeUnload(rules.getContinuousOnTimeUnload());
+        rulesVO.setContinuousOnTimeUnloadTimes(rules.getContinuousOnTimeUnloadTimes());
         rulesVO.setContinuousAccurateUnload(rules.getContinuousAccurateUnload());
-        rulesVO.setDelFlag(rules.getDelFlag());
+        rulesVO.setContinuousAccurateUnloadTimes(rules.getContinuousAccurateUnloadTimes());
         rulesVO.setCreateTime(rules.getCreateTime());
         rulesVO.setUpdateTime(rules.getUpdateTime());
         rulesVO.setCreateUser(rules.getCreateUser());
@@ -138,5 +174,4 @@ public class KwfDriverConductRulesVO implements Serializable {
         return rulesVO;
     }
 
-
 }

+ 8 - 8
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckDispatchCoefficientVO.java

@@ -37,37 +37,37 @@ public class KwfTruckDispatchCoefficientVO implements Serializable {
      * 车辆工作时长
      */
     @Schema(description = "车辆工作时长")
-    private BigDecimal vehicleWorkHours;
+    private Integer vehicleWorkHours;
 
     /**
      * 车辆装货时长
      */
     @Schema(description = "车辆装货时长")
-    private BigDecimal vehicleLoadingHours;
+    private Integer vehicleLoadingHours;
 
     /**
      * 车辆卸货时长
      */
     @Schema(description = "车辆卸货时长")
-    private BigDecimal vehicleUnloadingHours;
+    private Integer vehicleUnloadingHours;
 
     /**
      * 司机超时限制
      */
     @Schema(description = "司机超时限制")
-    private BigDecimal driverTimeoutLimit;
+    private Integer driverTimeoutLimit;
 
     /**
      * 车辆平均载重
      */
     @Schema(description = "车辆平均载重")
-    private BigDecimal vehicleAvgLoad;
+    private Integer vehicleAvgLoad;
 
     /**
      * 车辆平均速度
      */
     @Schema(description = "车辆平均速度")
-    private BigDecimal vehicleAvgSpeed;
+    private Integer vehicleAvgSpeed;
 
     /**
      * 车辆最大任务数
@@ -79,7 +79,7 @@ public class KwfTruckDispatchCoefficientVO implements Serializable {
      * 司机接单限制
      */
     @Schema(description = "司机接单限制")
-    private BigDecimal driverOrderLimit;
+    private Integer driverOrderLimit;
 
     /**
      * 场内车辆容量
@@ -91,7 +91,7 @@ public class KwfTruckDispatchCoefficientVO implements Serializable {
      * 最大占比
      */
     @Schema(description = "最大占比")
-    private BigDecimal maxRatio;
+    private Integer maxRatio;
 
     /**
      * 缓冲系数

+ 8 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfDriverConductRulesRepository.java

@@ -1,10 +1,13 @@
 package com.sckw.fleet.repository;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sckw.fleet.dao.KwfDriverConductRulesMapper;
 import com.sckw.fleet.model.KwfDriverConductRules;
 import org.springframework.stereotype.Repository;
 
+import java.util.Objects;
+
 /**
  * @desc 司机行为规则 Repository接口
  * @author donglang
@@ -13,4 +16,9 @@ import org.springframework.stereotype.Repository;
 @Repository
 public class KwfDriverConductRulesRepository extends ServiceImpl<KwfDriverConductRulesMapper, KwfDriverConductRules> {
 
+    public KwfDriverConductRules findDriverConductRulesByEntId(Long entId) {
+        return getOne(Wrappers.<KwfDriverConductRules>lambdaQuery()
+                .eq(Objects.nonNull(entId), KwfDriverConductRules::getEntId, entId));
+    }
+
 }

+ 8 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfTruckDispatchCoefficientRepository.java

@@ -1,10 +1,13 @@
 package com.sckw.fleet.repository;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sckw.fleet.dao.KwfTruckDispatchCoefficientMapper;
 import com.sckw.fleet.model.KwfTruckDispatchCoefficient;
 import org.springframework.stereotype.Repository;
 
+import java.util.Objects;
+
 /**
  * @desc 司机行为规则 Repository接口
  * @author donglang
@@ -13,4 +16,9 @@ import org.springframework.stereotype.Repository;
 @Repository
 public class KwfTruckDispatchCoefficientRepository extends ServiceImpl<KwfTruckDispatchCoefficientMapper, KwfTruckDispatchCoefficient> {
 
+    public KwfTruckDispatchCoefficient findAutoTruckDispatchByEntId(Long entId) {
+        return getOne(Wrappers.<KwfTruckDispatchCoefficient>lambdaQuery()
+                .eq(Objects.nonNull(entId), KwfTruckDispatchCoefficient::getEntId, entId));
+    }
+
 }

+ 41 - 23
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfAutoDispatchService.java

@@ -83,16 +83,16 @@ public class KwfAutoDispatchService {
     private KwfTruckDispatchCoefficient initAutoDispatchCoefficient(Long entId) {
         KwfTruckDispatchCoefficient dispatchCoefficient = new KwfTruckDispatchCoefficient();
         dispatchCoefficient.setEntId(entId);
-        dispatchCoefficient.setVehicleWorkHours(new BigDecimal("10.00"));
-        dispatchCoefficient.setVehicleLoadingHours(new BigDecimal("1.00"));
-        dispatchCoefficient.setVehicleUnloadingHours(new BigDecimal("1.00"));
-        dispatchCoefficient.setDriverTimeoutLimit(new BigDecimal("2.00"));
-        dispatchCoefficient.setVehicleAvgLoad(new BigDecimal("26.00"));
-        dispatchCoefficient.setVehicleAvgSpeed(new BigDecimal("50.00"));
+        dispatchCoefficient.setVehicleWorkHours(10);
+        dispatchCoefficient.setVehicleLoadingHours(1);
+        dispatchCoefficient.setVehicleUnloadingHours(1);
+        dispatchCoefficient.setDriverTimeoutLimit(2);
+        dispatchCoefficient.setVehicleAvgLoad(26);
+        dispatchCoefficient.setVehicleAvgSpeed(50);
         dispatchCoefficient.setVehicleMaxTasks(3);
-        dispatchCoefficient.setDriverOrderLimit(new BigDecimal("10.00"));
+        dispatchCoefficient.setDriverOrderLimit(10);
         dispatchCoefficient.setYardVehicleCapacity(70);
-        dispatchCoefficient.setMaxRatio(new BigDecimal("50.00"));
+        dispatchCoefficient.setMaxRatio(50);
         dispatchCoefficient.setBufferCoefficient(new BigDecimal("1.20"));
         dispatchCoefficient.setCreateUser(LoginUserHolder.getUserId());
         dispatchCoefficient.setUpdateUser(LoginUserHolder.getUserId());
@@ -221,7 +221,6 @@ public class KwfAutoDispatchService {
             throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "当前登录用户未关联企业ID,无法查询规则");
         }
         KwfDriverConductRules driverConductRules = driverConductRulesRepository.getOne(Wrappers.<KwfDriverConductRules>lambdaQuery()
-                .eq(KwfDriverConductRules::getDelFlag, 0)
                 .eq(KwfDriverConductRules::getEntId, LoginUserHolder.getEntId()));
         //无数据则初始化
         if (driverConductRules == null && request.getIsInit()) {
@@ -239,14 +238,20 @@ public class KwfAutoDispatchService {
     private KwfDriverConductRules initDriverConductRules(Long entId) {
         KwfDriverConductRules rules = new KwfDriverConductRules();
         rules.setEntId(entId);
-        rules.setNotOnTimeArrive(2);
-        rules.setIllegalCancelOrder(2);
-        rules.setUnloadSeriousTimeout(2);
-        rules.setFakeUnload(2);
+        rules.setUnloadSeriousTimeout(5);
+        rules.setUnloadSeriousTimeoutMultiple(new BigDecimal("2.00"));
         rules.setDocumentErrorMissing(2);
-        rules.setContinuousOnTimeArrive(2);
-        rules.setContinuousOnTimeUnload(2);
-        rules.setContinuousAccurateUnload(2);
+        rules.setNotOnTimeArrive(2);
+        rules.setFakeUnload(5);
+        rules.setFakeUnloadDistance(5);
+        rules.setIllegalCancelOrder(1);
+        rules.setIllegalCancelOrderMinutes(60);
+        rules.setContinuousOnTimeArrive(5);
+        rules.setContinuousOnTimeArriveTimes(10);
+        rules.setContinuousOnTimeUnload(5);
+        rules.setContinuousOnTimeUnloadTimes(10);
+        rules.setContinuousAccurateUnload(5);
+        rules.setContinuousAccurateUnloadTimes(10);
         rules.setCreateUser(LoginUserHolder.getUserId());
         rules.setUpdateUser(LoginUserHolder.getUserId());
 
@@ -275,15 +280,22 @@ public class KwfAutoDispatchService {
         KwfDriverConductRules newDriverConductRules = new KwfDriverConductRules();
         BeanUtils.copyProperties(oldDriverConductRules, newDriverConductRules);
 
-        newDriverConductRules.setNotOnTimeArrive(request.getNotOnTimeArrive());
-        newDriverConductRules.setIllegalCancelOrder(request.getIllegalCancelOrder());
         newDriverConductRules.setUnloadSeriousTimeout(request.getUnloadSeriousTimeout());
-        newDriverConductRules.setFakeUnload(request.getFakeUnload());
+        newDriverConductRules.setUnloadSeriousTimeoutMultiple(request.getUnloadSeriousTimeoutMultiple());
         newDriverConductRules.setDocumentErrorMissing(request.getDocumentErrorMissing());
+        newDriverConductRules.setNotOnTimeArrive(request.getNotOnTimeArrive());
+        newDriverConductRules.setFakeUnload(request.getFakeUnload());
+        newDriverConductRules.setFakeUnloadDistance(request.getFakeUnloadDistance());
+        newDriverConductRules.setIllegalCancelOrder(request.getIllegalCancelOrder());
+        newDriverConductRules.setIllegalCancelOrderMinutes(request.getIllegalCancelOrderMinutes());
         newDriverConductRules.setContinuousOnTimeArrive(request.getContinuousOnTimeArrive());
+        newDriverConductRules.setContinuousOnTimeArriveTimes(request.getContinuousOnTimeArriveTimes());
         newDriverConductRules.setContinuousOnTimeUnload(request.getContinuousOnTimeUnload());
+        newDriverConductRules.setContinuousOnTimeUnloadTimes(request.getContinuousOnTimeUnloadTimes());
         newDriverConductRules.setContinuousAccurateUnload(request.getContinuousAccurateUnload());
+        newDriverConductRules.setContinuousAccurateUnloadTimes(request.getContinuousAccurateUnloadTimes());
         newDriverConductRules.setUpdateUser(LoginUserHolder.getUserId());
+
         boolean updateResult = driverConductRulesRepository.updateById(newDriverConductRules);
         if (!updateResult) {
             throw new BusinessPlatfromException(ErrorCodeEnum.DATA_UPDATE_FAIL, "更新司机行为规则失败");
@@ -321,14 +333,20 @@ public class KwfAutoDispatchService {
         }
         List<String> changeItems = new ArrayList<>();
         // 对比所有字段
+        compareAndAddItem(changeItems, "单趟严重超时", oldRule.getUnloadSeriousTimeout(), request.getUnloadSeriousTimeout());
+        compareAndAddItem(changeItems, "单趟严重超时倍数", oldRule.getUnloadSeriousTimeoutMultiple(), request.getUnloadSeriousTimeoutMultiple());
+        compareAndAddItem(changeItems, "单据错误/缺失", oldRule.getDocumentErrorMissing(), request.getDocumentErrorMissing());
         compareAndAddItem(changeItems, "未按时到场", oldRule.getNotOnTimeArrive(), request.getNotOnTimeArrive());
-        compareAndAddItem(changeItems, "违规取消运单", oldRule.getIllegalCancelOrder(), request.getIllegalCancelOrder());
-        compareAndAddItem(changeItems, "卸货严重超时", oldRule.getUnloadSeriousTimeout(), request.getUnloadSeriousTimeout());
         compareAndAddItem(changeItems, "虚假卸货", oldRule.getFakeUnload(), request.getFakeUnload());
-        compareAndAddItem(changeItems, "单据错误/缺失", oldRule.getDocumentErrorMissing(), request.getDocumentErrorMissing());
+        compareAndAddItem(changeItems, "虚假卸货偏差距离", oldRule.getFakeUnloadDistance(), request.getFakeUnloadDistance());
+        compareAndAddItem(changeItems, "违规取消运单", oldRule.getIllegalCancelOrder(), request.getIllegalCancelOrder());
+        compareAndAddItem(changeItems, "违规取消运单分钟数", oldRule.getIllegalCancelOrderMinutes(), request.getIllegalCancelOrderMinutes());
         compareAndAddItem(changeItems, "连续按时到场", oldRule.getContinuousOnTimeArrive(), request.getContinuousOnTimeArrive());
+        compareAndAddItem(changeItems, "连续按时到场次数", oldRule.getContinuousOnTimeArriveTimes(), request.getContinuousOnTimeArriveTimes());
         compareAndAddItem(changeItems, "连续准时卸货", oldRule.getContinuousOnTimeUnload(), request.getContinuousOnTimeUnload());
+        compareAndAddItem(changeItems, "连续准时卸货次数", oldRule.getContinuousOnTimeUnloadTimes(), request.getContinuousOnTimeUnloadTimes());
         compareAndAddItem(changeItems, "连续准确填写卸货信息", oldRule.getContinuousAccurateUnload(), request.getContinuousAccurateUnload());
+        compareAndAddItem(changeItems, "连续准确填写卸货信息次数", oldRule.getContinuousAccurateUnloadTimes(), request.getContinuousAccurateUnloadTimes());
 
         if (changeItems.isEmpty()) {
             return "";
@@ -345,7 +363,7 @@ public class KwfAutoDispatchService {
      * @param newValue 新值
      */
     private void compareAndAddItem(List<String> items, String fieldName, Integer oldValue, Integer newValue) {
-        // 仅当值不同时添加文案
+        // 仅当值不同时添加文案  //TODO  donglang BigDecimal
         if (Objects.equals(oldValue, newValue)) {
             items.add(String.format("%s由【%s】设置为【%s】", fieldName, oldValue, newValue));
         }

+ 2 - 1
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java

@@ -366,7 +366,8 @@ public class KwfTruckService {
         KwfTruckReport truckReport = kwfTruckReportRepository.getOne(Wrappers.<KwfTruckReport>lambdaQuery()
                 .eq(BaseModel::getDelFlag, 0)
                 .eq(KwfTruckReport::getTruckId, truckId)
-                .eq(KwfTruckReport::getEntId, entId));
+                .eq(KwfTruckReport::getEntId, entId)
+                .last("limit 1"));
         if (truckReport == null) {
             return new KwfDriver();
         }

+ 14 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/request/KwpBizWalletQueryRequest.java

@@ -15,16 +15,30 @@ import lombok.Data;
 @Data
 public class KwpBizWalletQueryRequest extends PageRequest {
 
+    /**
+     * 供应商企业id
+     */
+    @Schema(description = "供应商企业id")
+    private Long supEntId;
+
     /**
      * 供应商企业名称
      */
     @Schema(description = "供应商企业名称")
     private String supEntName;
 
+    /**
+     * 采购商企业id
+     */
+    @Schema(description = "采购商企业id")
+    private Long proEntId;
+
     /**
      * 采购商企业名称
      */
     @Schema(description = "采购商企业名称")
     private String proEntName;
 
+
+
 }

+ 33 - 16
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/wallet/KwpBizWalletService.java

@@ -26,7 +26,6 @@ import com.sckw.payment.request.KwpBizWalletPrepayRequest;
 import com.sckw.payment.request.KwpBizWalletQueryRequest;
 import com.sckw.payment.request.KwpBizWalletSaveRequest;
 import com.sckw.system.api.RemoteSystemService;
-import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.EntTypeResDto;
 import com.sckw.system.api.model.dto.res.KwsEntDeptDto;
 import com.sckw.system.api.model.dto.res.KwsEnterpriseResDto;
@@ -232,22 +231,8 @@ public class KwpBizWalletService {
             return walletList;
         }
         return walletList.stream()
-                // 过滤供应商企业名称
-                .filter(wallet -> {
-                    if (org.springframework.util.StringUtils.hasText(request.getSupEntName())) {
-                        return wallet.getEntName() != null && wallet.getEntName().toLowerCase().contains(request.getSupEntName().toLowerCase());
-                    }
-                    return true;
-                })
-                // 过滤采购商企业名称
                 .map(wallet -> {
-                    List<KwpBizWalletVO> filteredVOs = wallet.getWalletVOList().stream()
-                            .filter(vo -> {
-                                if (org.springframework.util.StringUtils.hasText(request.getProEntName())) {
-                                    return vo.getProEntName() != null && vo.getProEntName().toLowerCase().contains(request.getProEntName().toLowerCase());
-                                }
-                                return true;
-                            }).collect(Collectors.toList());
+                    List<KwpBizWalletVO> filteredVOs = matchesAllConditions(request, wallet);
                     wallet.setWalletVOList(filteredVOs);
                     return wallet;
                 })
@@ -257,6 +242,38 @@ public class KwpBizWalletService {
     }
 
 
+    /**
+     * 过滤条件
+     * @param request
+     * @param wallet
+     * @return
+     */
+    private static List<KwpBizWalletVO> matchesAllConditions(KwpBizWalletQueryRequest request, KwpBizWalletPageResponse wallet) {
+        List<KwpBizWalletVO> filteredVOs = wallet.getWalletVOList().stream().filter(vo -> {
+            boolean matches = true;
+            // 过滤供应商企业ID
+            if (matches && request.getSupEntId() != null) {
+                matches = vo.getSupEntId() != null && vo.getSupEntId().equals(request.getSupEntId());
+            }
+            // 过滤供应商企业名称
+            if (matches && org.springframework.util.StringUtils.hasText(request.getSupEntName())) {
+                matches = vo.getSupEntName() != null && vo.getSupEntName().toLowerCase().contains(request.getSupEntName().toLowerCase());
+            }
+
+            // 过滤采购商企业ID
+            if (matches && request.getProEntId() != null) {
+                matches = vo.getProEntId() != null && vo.getProEntId().equals(request.getProEntId());
+            }
+            // 过滤采购商企业名称
+            if (matches && org.springframework.util.StringUtils.hasText(request.getProEntName())) {
+                matches = vo.getProEntName() != null && vo.getProEntName().toLowerCase().contains(request.getProEntName().toLowerCase());
+            }
+            return matches;
+        }).collect(Collectors.toList());
+        return filteredVOs;
+    }
+
+
     /**
      * 查询企业名称
      */

+ 1 - 1
sckw-modules/sckw-product/src/main/java/com/sckw/product/controller/KwpGoodsController.java

@@ -153,7 +153,7 @@ public class KwpGoodsController {
      * @return: com.sckw.core.web.response.HttpResult
      */
     @GetMapping("/batchPutOnShelves")
-    public HttpResult batchPutOnShelves(@RequestParam Long id) {
+    public HttpResult batchPutOnShelves(@RequestParam List<Long> id) {
         kwpGoodsService.batchPutOnShelves(id);
         return HttpResult.ok("上架成功");
     }

+ 38 - 25
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -842,38 +842,51 @@ public class KwpGoodsService {
      * @return: void
      */
     @Transactional(rollbackFor = Exception.class)
-    public void batchPutOnShelves(Long id) {
+    public void batchPutOnShelves(List<Long> ids) {
         LambdaQueryWrapper<KwpGoods> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(KwpGoods::getId, id).eq(KwpGoods::getEntId, LoginUserHolder.getEntId()).eq(KwpGoods::getDelFlag, Global.NO).last("LIMIT 1");
-        KwpGoods goods = kwpGoodsMapper.selectOne(wrapper);
-        if (Objects.isNull(goods)) {
+        wrapper.in(KwpGoods::getId, ids)
+                .eq(KwpGoods::getEntId, LoginUserHolder.getEntId())
+                .eq(KwpGoods::getDelFlag, Global.NO);
+        List<KwpGoods> goodsList = kwpGoodsMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(goodsList)) {
             throw new BusinessException("商品不存在!");
         }
-        if (Objects.equals(GoodsStatusEnum.PUT_ON_SHELVES.getCode(), goods.getStatus())) {
+        //校验
+        boolean hasPutOnShelves = goodsList.stream()
+                .anyMatch(good -> Objects.equals(GoodsStatusEnum.PUT_ON_SHELVES.getCode(), good.getStatus()));
+        if (hasPutOnShelves) {
             throw new BusinessException("上架操作仅针对“已下架”“草稿”状态的单据!");
         }
-        if (Objects.equals(GoodsStatusEnum.SAVED.getCode(), goods.getStatus())) {
-            UpdateGoodsParam updateParam = BeanUtils.copyProperties(goods, UpdateGoodsParam.class);
-            updateParam.setAttributes(BeanUtils.copyToList(kwpGoodsAttributeService.getByGoodsId(id), GoodsAttributes.class));
-            //价格
-            List<KwpGoodsPriceRange> priceRanges = kwpGoodsPriceRangeService.getByGoodsId(id);
-            BigDecimal price = Optional.ofNullable(priceRanges)
-                    .filter(priceRangeList -> !priceRangeList.isEmpty())
-                    .map(priceRangeList -> priceRangeList.get(0))
-                    .map(KwpGoodsPriceRange::getPrice)
-                    .orElse(null);
-            updateParam.setPrice(price);
-            updateParam.setImages(BeanUtils.copyToList(kwpGoodsImageService.getByGoodsId(id), GoodsImages.class));
-            updateParam.setAddressInfo(BeanUtils.copyProperties(kwpGoodsAddressService.getByGoodsId(id), AddressInfo.class));
-            String msg = judgeParameters(updateParam);
-            if (StringUtils.isNotBlank(msg)) {
-                throw new CustomPromptException(HttpStatus.GOODS_PUT_ON_SHELVES_FAIL_CODE, msg);
+
+        for (KwpGoods goods : goodsList) {
+            if (Objects.equals(GoodsStatusEnum.SAVED.getCode(), goods.getStatus())) {
+                UpdateGoodsParam updateParam = BeanUtils.copyProperties(goods, UpdateGoodsParam.class);
+                updateParam.setAttributes(BeanUtils.copyToList(kwpGoodsAttributeService.getByGoodsId(goods.getId()), GoodsAttributes.class));
+                //价格
+                List<KwpGoodsPriceRange> priceRanges = kwpGoodsPriceRangeService.getByGoodsId(goods.getId());
+                BigDecimal price = Optional.ofNullable(priceRanges)
+                        .filter(priceRangeList -> !priceRangeList.isEmpty())
+                        .map(priceRangeList -> priceRangeList.get(0))
+                        .map(KwpGoodsPriceRange::getPrice)
+                        .orElse(null);
+                updateParam.setPrice(price);
+                updateParam.setImages(BeanUtils.copyToList(kwpGoodsImageService.getByGoodsId(goods.getId()), GoodsImages.class));
+                updateParam.setAddressInfo(BeanUtils.copyProperties(kwpGoodsAddressService.getByGoodsId(goods.getId()), AddressInfo.class));
+                String msg = judgeParameters(updateParam);
+                if (StringUtils.isNotBlank(msg)) {
+                    throw new CustomPromptException(HttpStatus.GOODS_PUT_ON_SHELVES_FAIL_CODE, msg);
+                }
             }
+
+            LambdaUpdateWrapper<KwpGoods> updateWrapper = new LambdaUpdateWrapper<>();
+            updateWrapper.set(KwpGoods::getStatus, GoodsStatusEnum.PUT_ON_SHELVES.getCode())
+                    .set(KwpGoods::getAddedTime, new Date())
+                    .eq(KwpGoods::getId, goods.getId());
+            kwpGoodsMapper.update(null, updateWrapper);
         }
-        LambdaUpdateWrapper<KwpGoods> updateWrapper = new LambdaUpdateWrapper<>();
-        updateWrapper.set(KwpGoods::getStatus, GoodsStatusEnum.PUT_ON_SHELVES.getCode()).set(KwpGoods::getAddedTime, new Date()).eq(KwpGoods::getId, id);
-        kwpGoodsMapper.update(null, updateWrapper);
-        sendMsg(MessageEnum.PRODUCT_ON_SHELVES, goods);
+        goodsList.forEach(e -> {
+            sendMsg(MessageEnum.PRODUCT_ON_SHELVES, e);
+        });
     }
 
     /**

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

@@ -4,7 +4,10 @@ package com.sckw.transport.handler;
 import com.alibaba.fastjson.JSON;
 import com.sckw.core.common.enums.enums.ErrorCodeEnum;
 import com.sckw.core.exception.BusinessPlatfromException;
+import com.sckw.core.model.enums.CarWaybillV1Enum;
 import com.sckw.fleet.api.RemoteFleetService;
+import com.sckw.fleet.api.model.vo.DriverConductRulesVO;
+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;
@@ -16,6 +19,9 @@ import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+
 /**
  * Author: donglang
  * Time: 2025-11-19
@@ -72,7 +78,9 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
             updateStatus(waybillOrder);
             // 6. 生成节点轨迹
             createNodeTrace(param, waybillOrder);
-            // 7. 后置处理
+            //7.自动派单计算分值
+            calculateAutoDispatchScore(param, waybillOrder);
+            // 8. 后置处理
             OrderTakingResp handlerResult = afterProcess(param, waybillOrder);
 
             log.info("{}处理完成", getProcessName());
@@ -157,7 +165,11 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
         return node;
     }
 
-    // 7. 后置处理
+    // //7.自动派单计算分值
+    protected abstract void calculateAutoDispatchScore(T param, KwtWaybillOrder waybillOrder);
+
+
+    // 8. 后置处理
     protected OrderTakingResp afterProcess(T param, KwtWaybillOrder waybillOrder) {
         return new OrderTakingResp();
     }
@@ -191,8 +203,73 @@ public abstract class AbstractWaybillOrderHandler<T extends WaybillOrderProcessP
         return subtask;
     }
 
+    /**
+     * 查询运单节点
+     */
+    protected KwtWaybillOrderNode getNodesByOrderId(Long waybillOrderId, Integer status) {
+        KwtWaybillOrderNode orderNode = waybillOrderNodeRepository.queryNodesByOrderId(waybillOrderId, status);
+        if (orderNode == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_NODE_NOT_EXIST, "未找到关联的运单节点数据!");
+        }
+        return orderNode;
+    }
+
+
 
 
 
+
+
+    /**
+     * 查询司机所在企业的派车系数
+     */
+    protected TruckDispatchCoefficientVO getAutoTruckDispatchByEntId(Long entId) {
+        TruckDispatchCoefficientVO truckDispatchVO = remoteFleetService.findAutoTruckDispatchByEntId(entId);
+        if (truckDispatchVO == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.DATA_NOT_EXIST, "未找到自动派车系数!");
+        }
+        return truckDispatchVO;
+    }
+
+    /**
+     * 查询司机所在企业的司机行为规则
+     */
+    protected DriverConductRulesVO getDriverConductRulesByEntId(Long entId) {
+        DriverConductRulesVO driverRulesVO = remoteFleetService.findDriverConductRulesByEntId(entId);
+        if (driverRulesVO == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.DATA_NOT_EXIST, "未找到司机行为规则数据!");
+        }
+        return driverRulesVO;
+    }
+
+
+
+    /**
+     * 计算两个时间的分钟差值(正数:comeIntoTime 在 takingOrderTime 之后;负数:时间顺序异常;null:时间为空)
+     * @param startTime 开始时间
+     * @param endTime 结束时间
+     * @return
+     */
+    public Long calculateTimeDiffMinutes(Date startTime, Date endTime) {
+        // 校验
+        if (startTime == null || endTime == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR,
+                    "计算时间差失败:,startTime=[" + startTime + "], endTime=[" + endTime + "]");
+        }
+
+        // 计算时间戳差值(毫秒)
+        long diffMillis = endTime.getTime() - startTime.getTime();
+
+        long diffMinutes = TimeUnit.MILLISECONDS.toMinutes(diffMillis);
+
+        // 时间顺序异常提醒(结束时间早于开始时间)
+        if (diffMinutes < 0) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR,
+                    "时间顺序异常,结束时间早于开始时间,startTime=[" + startTime + "], endTime=[" + endTime + "], 差值:[" + diffMinutes + "]分钟");
+        }
+        return diffMinutes;
+    }
+
+
 }
 

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

@@ -4,10 +4,12 @@ package com.sckw.transport.handler;
 import com.sckw.core.common.enums.enums.ErrorCodeEnum;
 import com.sckw.core.exception.BusinessPlatfromException;
 import com.sckw.core.model.enums.CarWaybillV1Enum;
+import com.sckw.fleet.api.model.vo.DriverConductRulesVO;
 import com.sckw.order.api.model.OrderDetailVo;
 import com.sckw.order.api.model.UpdateActualAmountParam;
 import com.sckw.transport.model.KwtLogisticsOrder;
 import com.sckw.transport.model.KwtWaybillOrder;
+import com.sckw.transport.model.KwtWaybillOrderNode;
 import com.sckw.transport.model.KwtWaybillOrderSubtask;
 import com.sckw.transport.model.param.WaybillOrderCancelParam;
 import com.sckw.transport.repository.KwtLogisticsOrderRepository;
@@ -16,8 +18,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.Objects;
-import java.util.Optional;
 
 /**
  * Author: donglang
@@ -119,5 +121,31 @@ public class CancelHandler extends AbstractWaybillOrderHandler<WaybillOrderCance
         return "司机[" + waybillOrder.getDriverName() + "]取消订单";
     }
 
+    @Override
+    protected void calculateAutoDispatchScore(WaybillOrderCancelParam param, KwtWaybillOrder waybillOrder) {
+        // 获取司机行为规则配置(司机违规取消运单分钟数)
+        DriverConductRulesVO driverRulesVO = getDriverConductRulesByEntId(waybillOrder.getEntId());
+        Integer illegalCancelOrderMinutes = driverRulesVO.getIllegalCancelOrderMinutes();
+        if (illegalCancelOrderMinutes == null) {
+            log.warn("获取司机违规取消运单分钟数失败:企业{}的司机违规取消运单分钟数配置为空,运单ID:{}", waybillOrder.getEntId(), waybillOrder.getId());
+            throw new BusinessPlatfromException(ErrorCodeEnum.DATA_NOT_EXIST, "司机违规取消运单分钟数配置为空!");
+        }
+        //司机接单时间
+        KwtWaybillOrderNode takingOrderNodes = getNodesByOrderId(waybillOrder.getId(), CarWaybillV1Enum.PENDING_VEHICLE.getCode());
+        Date takingOrderTime = takingOrderNodes.getCreateTime() != null ? takingOrderNodes.getCreateTime() : null;
+        //司机取消接单时间
+        KwtWaybillOrderNode cancelNode = getNodesByOrderId(waybillOrder.getId(), CarWaybillV1Enum.APPROVAL_TREAT.getCode());
+        Date cancelNodeTime = cancelNode.getCreateTime() != null ? cancelNode.getCreateTime() : null;
+
+        // 计算两个时间的分钟差
+        Long timeDiffMinutes = calculateTimeDiffMinutes(takingOrderTime, cancelNodeTime);
+
+        if (timeDiffMinutes > illegalCancelOrderMinutes.longValue()) {
+            log.info("司机取消运单超时!司机违规取消运单分钟数限制:" + illegalCancelOrderMinutes + "分钟,实际:" + timeDiffMinutes + "分钟");
+            //执行扣分逻辑 TODO DONGLANG
+        }
+
+    }
+
 
 }

+ 39 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/handler/ComeIntoHandler.java

@@ -8,6 +8,7 @@ import com.sckw.core.exception.BusinessPlatfromException;
 import com.sckw.core.model.enums.AddressTypeEnum;
 import com.sckw.core.model.enums.CarWaybillV1Enum;
 import com.sckw.fleet.api.model.vo.RTruckVo;
+import com.sckw.fleet.api.model.vo.TruckDispatchCoefficientVO;
 import com.sckw.transport.model.KwtWaybillOrder;
 import com.sckw.transport.model.KwtWaybillOrderNode;
 import com.sckw.transport.model.KwtWaybillOrderTicket;
@@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.Objects;
 
 /**
@@ -99,4 +101,41 @@ public class ComeIntoHandler extends AbstractWaybillOrderHandler<WaybillOrderCme
         log.info("记录【称重】节点轨迹成功,节点ID:{}", node2.getId());
     }
 
+    /**
+     * 自动派单计算分值
+     * @param param
+     * @param waybillOrder
+     */
+    @Override
+    protected void calculateAutoDispatchScore(WaybillOrderCmeIntoWeighParam param, KwtWaybillOrder waybillOrder) {
+        // 获取自动派单系数配置(司机超时限制)
+        TruckDispatchCoefficientVO truckDispatchVO = getAutoTruckDispatchByEntId(waybillOrder.getEntId());
+        Integer driverTimeout = truckDispatchVO.getDriverTimeoutLimit();
+        if (driverTimeout == null) {
+            log.warn("企业{}的司机超时限制配置为空,运单ID:{}", waybillOrder.getEntId(), waybillOrder.getId());
+            throw new BusinessPlatfromException(ErrorCodeEnum.DATA_NOT_EXIST, "司机超时限制配置为空!");
+        }
+        //司机接单时间
+        KwtWaybillOrderNode takingOrderNodes = getNodesByOrderId(waybillOrder.getId(), CarWaybillV1Enum.PENDING_VEHICLE.getCode());
+        Date takingOrderTime = takingOrderNodes.getCreateTime() != null ? takingOrderNodes.getCreateTime() : null;
+        //司机到底装货点时间
+        KwtWaybillOrderNode comeIntoNode = getNodesByOrderId(waybillOrder.getId(), CarWaybillV1Enum.REFUSE_TRAFFIC.getCode());
+        Date comeIntoTime = comeIntoNode.getCreateTime() != null ? comeIntoNode.getCreateTime() : null;
+
+        // 计算两个时间的分钟差
+        Long timeDiffMinutes = calculateTimeDiffMinutes(takingOrderTime, comeIntoTime);
+        //超时
+        if (timeDiffMinutes > driverTimeout.longValue()) {
+            log.info("司机到底装货点耗时超时!司机超时限制:" + driverTimeout + "分钟,实际:" + timeDiffMinutes + "分钟");
+            //执行扣分逻辑 TODO DONGLANG
+
+        }
+
+
+
+
+
+    }
+
+
 }

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

@@ -6,10 +6,12 @@ import com.sckw.core.exception.BusinessPlatfromException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.enums.AddressTypeEnum;
 import com.sckw.core.model.enums.CarWaybillV1Enum;
+import com.sckw.fleet.api.model.vo.DriverConductRulesVO;
 import com.sckw.order.api.model.OrderDetailVo;
 import com.sckw.transport.model.*;
 import com.sckw.transport.model.param.WaybillOrderUnloadParam;
 import com.sckw.transport.repository.KwtWaybillOrderSubtaskRepository;
+import com.sckw.transport.utils.DistanceUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -200,4 +202,34 @@ public class UnloadingHandler extends AbstractWaybillOrderHandler<WaybillOrderUn
             log.info("记录【卸货】节点轨迹成功,节点ID:{}", node.getId());
         }
     }
+
+    @Override
+    protected void calculateAutoDispatchScore(WaybillOrderUnloadParam param, KwtWaybillOrder waybillOrder) {
+        // 获取司机行为规则配置(虚假卸货偏差距离)
+        DriverConductRulesVO driverRulesVO = getDriverConductRulesByEntId(waybillOrder.getEntId());
+        Integer distance = driverRulesVO.getFakeUnloadDistance();
+        if (distance == null) {
+            log.warn("获取虚假卸货偏差距离失败:企业{}的虚假卸货偏差距离配置为空,运单ID:{}", waybillOrder.getEntId(), waybillOrder.getId());
+            throw new BusinessPlatfromException(ErrorCodeEnum.DATA_NOT_EXIST, "虚假卸货偏差距离配置为空!");
+        }
+        //查询运单卸货地址
+        KwtWaybillOrderAddress address = waybillOrderAddressRepository.queryByBillOrderIdAndType(waybillOrder.getId(), AddressTypeEnum.SHIPMENT.getCode());
+        if (address == null) {
+            throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_TICKET, "物流运单无关联卸货地址信息!");
+        }
+        //实际卸货地址
+        KwtWaybillOrderNode unloadingNodes = getNodesByOrderId(waybillOrder.getId(), CarWaybillV1Enum.COMPLETION_LOADING.getCode());
+
+        //应卸货地与实际卸货地之间距离
+        double distanceKm = DistanceUtils.calculateDistance(
+                Optional.ofNullable(address.getLng()).map(Double::valueOf).orElse(null),
+                Optional.ofNullable(address.getLat()).map(Double::valueOf).orElse(null),
+                Optional.ofNullable(unloadingNodes.getLng()).map(Double::valueOf).orElse(null),
+                Optional.ofNullable(unloadingNodes.getLat()).map(Double::valueOf).orElse(null));
+        if (distanceKm > distance) {
+            log.info("司机未在真实卸货地点进行卸货!卸货地址偏差:" + distanceKm + "KM");
+            //执行扣分逻辑 TODO DONGLANG
+        }
+
+    }
 }

+ 7 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/repository/KwtWaybillOrderAddressRepository.java

@@ -33,4 +33,11 @@ public class KwtWaybillOrderAddressRepository extends ServiceImpl<KwtWaybillOrde
                 .eq(KwtWaybillOrderAddress::getDelFlag, 0)
                 .in(KwtWaybillOrderAddress::getWSubtaskId, subWayBillOrderIds));
     }
+
+    public KwtWaybillOrderAddress queryByBillOrderIdAndType(Long wOrderId, Integer type) {
+        return getOne(Wrappers.<KwtWaybillOrderAddress>lambdaQuery()
+                .eq(KwtWaybillOrderAddress::getWOrderId, wOrderId)
+                .eq(KwtWaybillOrderAddress::getType, type)
+                .eq(KwtWaybillOrderAddress::getDelFlag,0));
+    }
 }

+ 16 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/repository/KwtWaybillOrderNodeRepository.java

@@ -32,4 +32,20 @@ public class KwtWaybillOrderNodeRepository extends ServiceImpl<KwtWaybillOrderNo
         wrapper.orderByAsc(KwtWaybillOrderNode::getId);
         return this.list(wrapper);
     }
+
+    /**
+     * 通过运单id查询运单节点数据
+     * @param wOrderId
+     * @return
+     */
+    public KwtWaybillOrderNode queryNodesByOrderId(Long wOrderId, Integer status) {
+        return getOne(Wrappers.<KwtWaybillOrderNode>lambdaQuery()
+                .eq(KwtWaybillOrderNode::getWOrderId, wOrderId)
+                .eq(KwtWaybillOrderNode::getOrderStatus, status)
+                .orderByAsc(KwtWaybillOrderNode::getCreateTime)
+                .orderByAsc(KwtWaybillOrderNode::getId));
+    }
+
+
+
 }

+ 24 - 19
sql/2025/12/01/2025_12_04_donglang.sql

@@ -1,17 +1,22 @@
 
 create table kwf_driver_conduct_rules
 (
-    id                              bigint          NOT NULL AUTO_INCREMENT COMMENT '主键',
-    ent_id                          bigint          NOT NULL comment '企业id',
-    not_on_time_arrive              int             NOT NULL comment '未按时到场(违规次数/扣分)',
-    illegal_cancel_order            int             NOT NULL comment '违规取消运单(违规次数/扣分)',
-    unload_serious_timeout          int             NOT NULL comment '卸货严重超时(违规次数/扣分)',
-    fake_unload                     int             NOT NULL comment '虚假卸货(违规次数/扣分)',
-    document_error_missing          int             NOT NULL comment '单据错误/缺失(违规次数/扣分)',
-    continuous_on_time_arrive       int             NOT NULL comment '连续按时到场(达标次数/加分)',
-    continuous_on_time_unload       int             NOT NULL comment '连续准时卸货(达标次数/加分)',
-    continuous_accurate_unload      int             NOT NULL comment '连续准确填写卸货信息(达标次数/加分)',
-    del_flag                        int             NOT NULL DEFAULT '0' COMMENT '是否删除(0未删除,1删除)',
+    id                               bigint          NOT NULL AUTO_INCREMENT COMMENT '主键',
+    ent_id                           bigint          NOT NULL comment '企业id',
+    unload_serious_timeout           int             NOT NULL comment '单趟严重超时(违规次数/扣分)',
+    unload_serious_timeout_multiple  decimal(8,2)    NOT NULL DEFAULT '00.00' comment '单趟严重超时倍数',
+    document_error_missing           int             NOT NULL comment '单据错误/缺失(违规次数/扣分)',
+    not_on_time_arrive               int             NOT NULL comment '未按时到场(违规次数/扣分)',
+    fake_unload                      int             NOT NULL comment '虚假卸货(违规次数/扣分)',
+    fake_unload_distance             int             NOT NULL comment '虚假卸货偏差距离',
+    illegal_cancel_order             int             NOT NULL comment '违规取消运单(违规次数/扣分)',
+    illegal_cancel_order_minutes     int              NOT NULL comment '违规取消运单分钟数',
+    continuous_on_time_arrive        int             NOT NULL comment '连续按时到场(达标次数/加分)',
+    continuous_on_time_arrive_times  int             NOT NULL comment '连续按时到场次数',
+    continuous_on_time_unload        int             NOT NULL comment '连续准时卸货(达标次数/加分)',
+    continuous_on_time_unload_times  int             NOT NULL comment '连续准时卸货次数',
+    continuous_accurate_unload       int             NOT NULL comment '连续准确填写卸货信息(达标次数/加分)',
+    continuous_accurate_unload_times int             NOT NULL comment '连续准确填写卸货信息次数',
     create_time                     datetime        NOT NULL default CURRENT_TIMESTAMP comment '创建时间',
     update_time                     datetime        NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP comment '更新时间',
     create_user                     bigint          NOT NULL DEFAULT '-1' comment '创建人',
@@ -39,16 +44,16 @@ create table kwt_truck_dispatch_coefficient
 (
     id                              bigint          NOT NULL AUTO_INCREMENT COMMENT '主键',
     ent_id                          bigint          NOT NULL comment '企业id',
-    vehicle_work_hours              decimal(8,2)    NOT NULL DEFAULT '00.00' comment '车辆工作时长',
-    vehicle_loading_hours           decimal(8,2)    NOT NULL DEFAULT '00.00' comment '车辆装货时长',
-    vehicle_unloading_hours         decimal(8,2)    NOT NULL DEFAULT '00.00' comment '车辆卸货时长',
-    driver_timeout_limit            decimal(8,2)    NOT NULL DEFAULT '00.00' comment '司机超时限制',
-    vehicle_avg_load                decimal(8,2)    NOT NULL DEFAULT '00.00' comment '车辆平均载重',
-    vehicle_avg_speed               decimal(8,2)    NOT NULL DEFAULT '00.00' comment '车辆平均速度',
+    vehicle_work_hours              int             NOT NULL comment  '车辆工作时长',
+    vehicle_loading_hours           int             NOT NULL comment  '车辆装货时长',
+    vehicle_unloading_hours         int             NOT NULL comment '车辆卸货时长',
+    driver_timeout_limit            int             NOT NULL comment '司机超时限制',
+    vehicle_avg_load                int             NOT NULL comment '车辆平均载重',
+    vehicle_avg_speed               int             NOT NULL comment '车辆平均速度',
     vehicle_max_tasks               int             NOT NULL comment '车辆最大任务数',
-    driver_order_limit              decimal(8,2)    NOT NULL DEFAULT '00.00' comment '司机接单限制',
+    driver_order_limit              int             NOT NULL comment '司机接单限制',
     yard_vehicle_capacity           int             NOT NULL comment '场内车辆容量',
-    max_ratio                       decimal(8,2)    NOT NULL DEFAULT '00.00' comment '最大占比',
+    max_ratio                       int             NOT NULL comment '最大占比',
     buffer_coefficient              decimal(8,2)    NOT NULL DEFAULT '00.00' comment '缓冲系数',
     create_time                     datetime        NOT NULL default CURRENT_TIMESTAMP comment '创建时间',
     update_time                     datetime        NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP comment '更新时间',