2025_12_04_donglang.sql 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. create table kwf_driver_conduct_rules
  2. (
  3. id bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  4. ent_id bigint NOT NULL DEFAULT '-1'comment '企业id',
  5. unload_serious_timeout_score int NOT NULL DEFAULT '-1'comment '单趟严重超时分数',
  6. unload_serious_timeout_multiple decimal(8,2) NOT NULL DEFAULT '00.00' comment '单趟严重超时倍数',
  7. document_error_missing_score int NOT NULL DEFAULT '-1'comment '单据错误/缺失分数',
  8. not_on_time_arrive_score int NOT NULL DEFAULT '-1'comment '未按时到场分数',
  9. fake_unload_score int NOT NULL DEFAULT '-1'comment '虚假卸货分数',
  10. fake_unload_distance int NOT NULL DEFAULT '-1'comment '虚假卸货偏差距离',
  11. illegal_cancel_order_score int NOT NULL DEFAULT '-1'comment '违规取消运单分数',
  12. illegal_cancel_order_minutes int NOT NULL DEFAULT '-1'comment '违规取消运单分钟数',
  13. continuous_on_time_arrive_score int NOT NULL DEFAULT '-1'comment '连续按时到场分数',
  14. continuous_on_time_arrive_times int NOT NULL DEFAULT '-1'comment '连续按时到场次数',
  15. continuous_on_time_unload_score int NOT NULL DEFAULT '-1'comment '连续准时卸货分数',
  16. continuous_on_time_unload_times int NOT NULL DEFAULT '-1'comment '连续准时卸货次数',
  17. continuous_accurate_unload_score int NOT NULL DEFAULT '-1'comment '连续准确填写卸货信息分数',
  18. continuous_accurate_unload_times int NOT NULL DEFAULT '-1'comment '连续准确填写卸货信息次数',
  19. create_time datetime NOT NULL default CURRENT_TIMESTAMP comment '创建时间',
  20. update_time datetime NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP comment '更新时间',
  21. create_user bigint NOT NULL DEFAULT '-1' comment '创建人',
  22. update_user bigint NOT NULL DEFAULT '-1' comment '更新人',
  23. PRIMARY KEY (`id`) USING BTREE
  24. ) comment '司机行为规则表';
  25. create table kwf_driver_conduct_rules_log
  26. (
  27. id bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  28. biz_id bigint NOT NULL DEFAULT '-1' comment '司机行为规则id',
  29. status int NOT NULL DEFAULT '0' COMMENT '状态(0-自动派单,1-司机行为规则)',
  30. description varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '日志内容',
  31. create_time datetime NOT NULL default CURRENT_TIMESTAMP comment '创建时间',
  32. create_user bigint NOT NULL DEFAULT '-1' comment '创建人',
  33. update_user bigint NOT NULL DEFAULT '-1' comment '更新人',
  34. PRIMARY KEY (`id`) USING BTREE
  35. ) comment '司机行为规则日志表';
  36. create table kwf_truck_dispatch_coefficient
  37. (
  38. id bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  39. ent_id bigint NOT NULL DEFAULT '-1' comment '企业id',
  40. vehicle_work_hours int NOT NULL DEFAULT '-1' comment '车辆工作时长',
  41. vehicle_loading_hours int NOT NULL DEFAULT '-1' comment '车辆装货时长',
  42. vehicle_unloading_hours int NOT NULL DEFAULT '-1' comment '车辆卸货时长',
  43. driver_timeout_limit int NOT NULL DEFAULT '-1' comment '司机超时限制',
  44. vehicle_avg_load int NOT NULL DEFAULT '-1' comment '车辆平均载重',
  45. vehicle_avg_speed int NOT NULL DEFAULT '-1' comment '车辆平均速度',
  46. vehicle_max_tasks int NOT NULL DEFAULT '-1' comment '车辆最大任务数',
  47. driver_order_limit int NOT NULL DEFAULT '-1' comment '司机接单限制',
  48. yard_vehicle_capacity int NOT NULL DEFAULT '-1' comment '场内车辆容量',
  49. max_ratio int NOT NULL DEFAULT '-1' comment '最大占比',
  50. buffer_coefficient decimal(8,2) NOT NULL DEFAULT '00.00' comment '缓冲系数',
  51. create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP comment '创建时间',
  52. update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP comment '更新时间',
  53. create_user bigint NOT NULL DEFAULT '-1' comment '创建人',
  54. update_user bigint NOT NULL DEFAULT '-1' comment '更新人',
  55. PRIMARY KEY (`id`) USING BTREE
  56. ) comment '自动派单系数表';
  57. ALTER TABLE kwo_trade_order ADD add_vehicles tinyint NOT NULL DEFAULT '0' COMMENT '是否需要增派运力(0-不需要,1-需要)';