工单配置

This commit is contained in:
yanglei 2026-02-27 11:07:01 +08:00
parent d94dfa14a9
commit 76592d42aa
10 changed files with 73 additions and 54 deletions

View File

@ -4,11 +4,12 @@ import com.cdzy.common.model.request.PageParam;
import com.cdzy.common.model.response.JsonResult; import com.cdzy.common.model.response.JsonResult;
import com.cdzy.operations.model.dto.EbikeSaveConfigurationDto; import com.cdzy.operations.model.dto.EbikeSaveConfigurationDto;
import com.cdzy.operations.model.dto.EbikeUpdateConfigurationDto; import com.cdzy.operations.model.dto.EbikeUpdateConfigurationDto;
import com.cdzy.operations.model.entity.EbikeDispatchConfiguration; import com.cdzy.operations.model.entity.EbikeWorkOrderConfiguration;
import com.cdzy.operations.service.EbikeDispatchConfigurationService; import com.cdzy.operations.service.EbikeWorkOrderConfigurationService;
import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -19,17 +20,17 @@ import org.springframework.web.bind.annotation.RestController;
import static com.cdzy.operations.model.entity.table.EbikeDispatchConfigurationTableDef.EBIKE_DISPATCH_CONFIGURATION; import static com.cdzy.operations.model.entity.table.EbikeDispatchConfigurationTableDef.EBIKE_DISPATCH_CONFIGURATION;
/** /**
* 调度配置 控制层 * 工单配置 控制层
* *
* @author yanglei * @author yanglei
* @since 2026-01-08 17:08 * @since 2026-01-08 17:08
*/ */
@RestController @RestController
@RequestMapping("/ebikeDispatchConfiguration") @RequestMapping("/ebikeWorkOrderConfiguration")
public class EbikeDispatchConfigurationController { public class EbikeWorkOrderConfigurationController {
@Resource @Resource
private EbikeDispatchConfigurationService dispatchConfigurationService; private EbikeWorkOrderConfigurationService dispatchConfigurationService;
/** /**
* 添加 * 添加
@ -38,7 +39,7 @@ public class EbikeDispatchConfigurationController {
* @return 主键id * @return 主键id
*/ */
@PostMapping("save") @PostMapping("save")
public JsonResult<?> save(@RequestBody EbikeSaveConfigurationDto dto) { public JsonResult<?> save(@RequestBody @Validated EbikeSaveConfigurationDto dto) {
dispatchConfigurationService.saveConfiguration(dto); dispatchConfigurationService.saveConfiguration(dto);
return JsonResult.success(); return JsonResult.success();
} }
@ -62,7 +63,7 @@ public class EbikeDispatchConfigurationController {
* @return {@code true} 更新成功{@code false} 更新失败 * @return {@code true} 更新成功{@code false} 更新失败
*/ */
@PostMapping("update") @PostMapping("update")
public JsonResult<?> update(@RequestBody EbikeUpdateConfigurationDto dto) { public JsonResult<?> update(@RequestBody @Validated EbikeUpdateConfigurationDto dto) {
dispatchConfigurationService.updateConfiguration(dto); dispatchConfigurationService.updateConfiguration(dto);
return JsonResult.success(); return JsonResult.success();
} }
@ -75,7 +76,7 @@ public class EbikeDispatchConfigurationController {
*/ */
@GetMapping("getById") @GetMapping("getById")
public JsonResult<?> getById(@RequestParam("configurationId") Long configurationId) { public JsonResult<?> getById(@RequestParam("configurationId") Long configurationId) {
EbikeDispatchConfiguration result = dispatchConfigurationService.getById(configurationId); EbikeWorkOrderConfiguration result = dispatchConfigurationService.getById(configurationId);
return JsonResult.success(result); return JsonResult.success(result);
} }
@ -89,7 +90,7 @@ public class EbikeDispatchConfigurationController {
public JsonResult<?> page(PageParam page) { public JsonResult<?> page(PageParam page) {
QueryWrapper queryWrapper = QueryWrapper.create() QueryWrapper queryWrapper = QueryWrapper.create()
.select(EBIKE_DISPATCH_CONFIGURATION.ALL_COLUMNS); .select(EBIKE_DISPATCH_CONFIGURATION.ALL_COLUMNS);
Page<EbikeDispatchConfiguration> orderPage = dispatchConfigurationService.pageAs(page.getPage(), queryWrapper, EbikeDispatchConfiguration.class); Page<EbikeWorkOrderConfiguration> orderPage = dispatchConfigurationService.pageAs(page.getPage(), queryWrapper, EbikeWorkOrderConfiguration.class);
return JsonResult.success(orderPage); return JsonResult.success(orderPage);
} }
} }

View File

@ -1,6 +1,6 @@
package com.cdzy.operations.mapper; package com.cdzy.operations.mapper;
import com.cdzy.operations.model.entity.EbikeDispatchConfiguration; import com.cdzy.operations.model.entity.EbikeWorkOrderConfiguration;
import com.mybatisflex.core.BaseMapper; import com.mybatisflex.core.BaseMapper;
/** /**
@ -10,5 +10,5 @@ import com.mybatisflex.core.BaseMapper;
* @since 2025-12-03 16:21 * @since 2025-12-03 16:21
*/ */
public interface EbikeDispatchConfigurationMapper extends BaseMapper<EbikeDispatchConfiguration> { public interface EbikeDispatchConfigurationMapper extends BaseMapper<EbikeWorkOrderConfiguration> {
} }

View File

@ -1,6 +1,5 @@
package com.cdzy.operations.model.dto; package com.cdzy.operations.model.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -30,6 +29,12 @@ public class EbikeSaveConfigurationDto {
/** /**
* 配置项骑行时长 * 配置项骑行时长
*/ */
@NotBlank(message = "调度完成后多长时间内骑行是有效的不能为空") @NotNull(message = "调度完成后多长时间内骑行是有效的不能为空")
private Integer rideDuration; private Integer rideDuration;
/**
* 巡检间隔时长()
*/
@NotNull(message = "巡检间隔时长不能为空")
private Integer inspectionIntervalDuration;
} }

View File

@ -1,6 +1,5 @@
package com.cdzy.operations.model.dto; package com.cdzy.operations.model.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -32,4 +31,9 @@ public class EbikeUpdateConfigurationDto {
* 配置项骑行时长 * 配置项骑行时长
*/ */
private Integer rideDuration; private Integer rideDuration;
/**
* 巡检间隔时长()
*/
private Integer inspectionIntervalDuration;
} }

View File

@ -13,7 +13,7 @@ import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
* 车辆调度配置 实体类 * 工单配置 实体类
* *
* @author yanglei * @author yanglei
* @since 2025-12-03 16:18 * @since 2025-12-03 16:18
@ -23,8 +23,8 @@ import java.time.LocalDateTime;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Table("ebike_dispatch_configuration") @Table("ebike_work_order_configuration")
public class EbikeDispatchConfiguration implements Serializable { public class EbikeWorkOrderConfiguration implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -50,6 +50,11 @@ public class EbikeDispatchConfiguration implements Serializable {
*/ */
private Integer rideDuration; private Integer rideDuration;
/**
* 巡检间隔时长()
*/
private Integer inspectionIntervalDuration;
/** /**
* 创建时间 * 创建时间
*/ */

View File

@ -2,24 +2,24 @@ package com.cdzy.operations.service;
import com.cdzy.operations.model.dto.EbikeSaveConfigurationDto; import com.cdzy.operations.model.dto.EbikeSaveConfigurationDto;
import com.cdzy.operations.model.dto.EbikeUpdateConfigurationDto; import com.cdzy.operations.model.dto.EbikeUpdateConfigurationDto;
import com.cdzy.operations.model.entity.EbikeDispatchConfiguration; import com.cdzy.operations.model.entity.EbikeWorkOrderConfiguration;
import com.mybatisflex.core.service.IService; import com.mybatisflex.core.service.IService;
/** /**
* 车辆相关配置 服务层 * 工单配置 服务层
* *
* @author yanglei * @author yanglei
* @since 2025-12-03 16:22 * @since 2025-12-03 16:22
*/ */
public interface EbikeDispatchConfigurationService extends IService<EbikeDispatchConfiguration> { public interface EbikeWorkOrderConfigurationService extends IService<EbikeWorkOrderConfiguration> {
/** /**
* 根据运营商id获取配置项(sql会自动拼接运营商id) * 根据运营商id获取配置项(sql会自动拼接运营商id)
* *
* @return 配置项 * @return 配置项
*/ */
EbikeDispatchConfiguration getConfigurationByOperationId(Long operationId); EbikeWorkOrderConfiguration getConfigurationByOperationId(Long operationId);
/** /**
* 保存配置项 * 保存配置项

View File

@ -29,7 +29,7 @@ import com.cdzy.operations.model.entity.EbikeBikeInfo;
import com.cdzy.operations.model.entity.EbikeBikeOrder; import com.cdzy.operations.model.entity.EbikeBikeOrder;
import com.cdzy.operations.model.entity.EbikeBikeQr; import com.cdzy.operations.model.entity.EbikeBikeQr;
import com.cdzy.operations.model.entity.EbikeDefaultBillingConfiguration; import com.cdzy.operations.model.entity.EbikeDefaultBillingConfiguration;
import com.cdzy.operations.model.entity.EbikeDispatchConfiguration; import com.cdzy.operations.model.entity.EbikeWorkOrderConfiguration;
import com.cdzy.operations.model.entity.EbikeEcuInfo; import com.cdzy.operations.model.entity.EbikeEcuInfo;
import com.cdzy.operations.model.entity.EbikeInventoryRecord; import com.cdzy.operations.model.entity.EbikeInventoryRecord;
import com.cdzy.operations.model.entity.EbikeRegion; import com.cdzy.operations.model.entity.EbikeRegion;
@ -39,7 +39,7 @@ import com.cdzy.operations.model.entity.EbikeSpecialDay;
import com.cdzy.operations.model.entity.EbikeSpecialTime; import com.cdzy.operations.model.entity.EbikeSpecialTime;
import com.cdzy.operations.model.vo.*; import com.cdzy.operations.model.vo.*;
import com.cdzy.operations.service.EbikeBikeInfoService; import com.cdzy.operations.service.EbikeBikeInfoService;
import com.cdzy.operations.service.EbikeDispatchConfigurationService; import com.cdzy.operations.service.EbikeWorkOrderConfigurationService;
import com.cdzy.operations.service.EbikeEcuInfoService; import com.cdzy.operations.service.EbikeEcuInfoService;
import com.cdzy.operations.service.EbikeInventoryRecordService; import com.cdzy.operations.service.EbikeInventoryRecordService;
import com.cdzy.operations.service.EbikeInventoryService; import com.cdzy.operations.service.EbikeInventoryService;
@ -128,7 +128,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
private EbikeBikeOrderMapper orderMapper; private EbikeBikeOrderMapper orderMapper;
@Resource @Resource
private EbikeDispatchConfigurationService dispatchConfigurationService; private EbikeWorkOrderConfigurationService dispatchConfigurationService;
@Resource @Resource
private EbikeRegionMapper ebikeRegionMapper; private EbikeRegionMapper ebikeRegionMapper;
@ -521,7 +521,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
ebikeEcuInfoService.lock(ebikeEcuInfo); ebikeEcuInfoService.lock(ebikeEcuInfo);
EbikeDispatchConfiguration configuration = dispatchConfigurationService.getConfigurationByOperationId(info.getOperatorId()); EbikeWorkOrderConfiguration configuration = dispatchConfigurationService.getConfigurationByOperationId(info.getOperatorId());
if (configuration != null && configuration.getDispatchDuration() != null) { if (configuration != null && configuration.getDispatchDuration() != null) {
redisUtil.saveNoDocument(bikeCode, LocalDateTime.now(), configuration.getDispatchDuration(), TimeUnit.HOURS); redisUtil.saveNoDocument(bikeCode, LocalDateTime.now(), configuration.getDispatchDuration(), TimeUnit.HOURS);

View File

@ -700,7 +700,7 @@ public class EbikeBikeOrderServiceImpl extends ServiceImpl<EbikeBikeOrderMapper,
bikeOrder.setHandleAt(LocalDateTime.now()); bikeOrder.setHandleAt(LocalDateTime.now());
updateById(bikeOrder); updateById(bikeOrder);
queryWrapper.clear(); queryWrapper.clear();
EbikeDispatchConfiguration dispatchConfiguration = ebikeDispatchConfigurationMapper.selectOneByQuery(queryWrapper); EbikeWorkOrderConfiguration dispatchConfiguration = ebikeDispatchConfigurationMapper.selectOneByQuery(queryWrapper);
redisUtil.saveDispatchOrder(bikeOrder.getOrderId(), bikeOrder, dispatchConfiguration != null ? dispatchConfiguration.getDispatchDuration() : 24L, TimeUnit.HOURS); redisUtil.saveDispatchOrder(bikeOrder.getOrderId(), bikeOrder, dispatchConfiguration != null ? dispatchConfiguration.getDispatchDuration() : 24L, TimeUnit.HOURS);
} }
@ -1010,7 +1010,7 @@ public class EbikeBikeOrderServiceImpl extends ServiceImpl<EbikeBikeOrderMapper,
throw new EbikeException("列表中车辆工单均不存在或已作废"); throw new EbikeException("列表中车辆工单均不存在或已作废");
} }
queryWrapper.clear(); queryWrapper.clear();
EbikeDispatchConfiguration dispatchConfiguration = ebikeDispatchConfigurationMapper.selectOneByQuery(queryWrapper); EbikeWorkOrderConfiguration dispatchConfiguration = ebikeDispatchConfigurationMapper.selectOneByQuery(queryWrapper);
for (EbikeBikeOrder bikeOrder : list) { for (EbikeBikeOrder bikeOrder : list) {
bikeOrder.setSiteId(dispatchVo.getSiteId()); bikeOrder.setSiteId(dispatchVo.getSiteId());
bikeOrder.setHandleState(OrderHandleState.PROCESSED); bikeOrder.setHandleState(OrderHandleState.PROCESSED);

View File

@ -5,8 +5,8 @@ import com.cdzy.common.ex.EbikeException;
import com.cdzy.operations.mapper.EbikeDispatchConfigurationMapper; import com.cdzy.operations.mapper.EbikeDispatchConfigurationMapper;
import com.cdzy.operations.model.dto.EbikeSaveConfigurationDto; import com.cdzy.operations.model.dto.EbikeSaveConfigurationDto;
import com.cdzy.operations.model.dto.EbikeUpdateConfigurationDto; import com.cdzy.operations.model.dto.EbikeUpdateConfigurationDto;
import com.cdzy.operations.model.entity.EbikeDispatchConfiguration; import com.cdzy.operations.model.entity.EbikeWorkOrderConfiguration;
import com.cdzy.operations.service.EbikeDispatchConfigurationService; import com.cdzy.operations.service.EbikeWorkOrderConfigurationService;
import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl; import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -18,16 +18,16 @@ import static com.cdzy.operations.model.entity.table.EbikeDispatchConfigurationT
/** /**
* 车辆相关配置 实现类 * 工单配置 实现类
* *
* @author yanglei * @author yanglei
* @since 2025-12-03 16:22 * @since 2025-12-03 16:22
*/ */
@Service @Service
public class EbikeDispatchConfigurationServiceImpl extends ServiceImpl<EbikeDispatchConfigurationMapper, EbikeDispatchConfiguration> implements EbikeDispatchConfigurationService { public class EbikeWorkOrderConfigurationServiceImpl extends ServiceImpl<EbikeDispatchConfigurationMapper, EbikeWorkOrderConfiguration> implements EbikeWorkOrderConfigurationService {
@Override @Override
public EbikeDispatchConfiguration getConfigurationByOperationId(Long operationId) { public EbikeWorkOrderConfiguration getConfigurationByOperationId(Long operationId) {
QueryWrapper queryWrapper = QueryWrapper.create() QueryWrapper queryWrapper = QueryWrapper.create()
.select(EBIKE_DISPATCH_CONFIGURATION.ALL_COLUMNS) .select(EBIKE_DISPATCH_CONFIGURATION.ALL_COLUMNS)
.and(EBIKE_DISPATCH_CONFIGURATION.OPERATOR_ID.eq(operationId, Objects.nonNull(operationId))); .and(EBIKE_DISPATCH_CONFIGURATION.OPERATOR_ID.eq(operationId, Objects.nonNull(operationId)));
@ -40,10 +40,11 @@ public class EbikeDispatchConfigurationServiceImpl extends ServiceImpl<EbikeDisp
if (dto.getOperatorId() == null) { if (dto.getOperatorId() == null) {
throw new EbikeException("保存配置时运营商id不能为空"); throw new EbikeException("保存配置时运营商id不能为空");
} }
EbikeDispatchConfiguration configuration = EbikeDispatchConfiguration.builder() EbikeWorkOrderConfiguration configuration = EbikeWorkOrderConfiguration.builder()
.operatorId(dto.getOperatorId()) .operatorId(dto.getOperatorId())
.dispatchDuration(dto.getDispatchDuration()) .dispatchDuration(dto.getDispatchDuration())
.rideDuration(dto.getRideDuration()) .rideDuration(dto.getRideDuration())
.inspectionIntervalDuration(dto.getInspectionIntervalDuration())
.createdBy(StpUtil.getLoginIdAsLong()) .createdBy(StpUtil.getLoginIdAsLong())
.build(); .build();
this.mapper.insert(configuration); this.mapper.insert(configuration);
@ -55,12 +56,13 @@ public class EbikeDispatchConfigurationServiceImpl extends ServiceImpl<EbikeDisp
QueryWrapper queryWrapper = QueryWrapper.create() QueryWrapper queryWrapper = QueryWrapper.create()
.select(EBIKE_DISPATCH_CONFIGURATION.ALL_COLUMNS) .select(EBIKE_DISPATCH_CONFIGURATION.ALL_COLUMNS)
.where(EBIKE_DISPATCH_CONFIGURATION.CONFIGURATION_ID.eq(dto.getConfigurationId())); .where(EBIKE_DISPATCH_CONFIGURATION.CONFIGURATION_ID.eq(dto.getConfigurationId()));
EbikeDispatchConfiguration configuration = this.mapper.selectOneByQuery(queryWrapper); EbikeWorkOrderConfiguration configuration = this.mapper.selectOneByQuery(queryWrapper);
if (Objects.isNull(configuration)) { if (Objects.isNull(configuration)) {
throw new EbikeException("配置项不存在"); throw new EbikeException("配置项不存在");
} }
configuration.setDispatchDuration(dto.getDispatchDuration()); configuration.setDispatchDuration(dto.getDispatchDuration());
configuration.setRideDuration(dto.getRideDuration()); configuration.setRideDuration(dto.getRideDuration());
configuration.setInspectionIntervalDuration(dto.getInspectionIntervalDuration());
this.mapper.update(configuration); this.mapper.update(configuration);
} }
} }

View File

@ -63,8 +63,8 @@ CREATE SEQUENCE IF NOT EXISTS ebike_default_billing_configuration_configuration_
MAXVALUE 9223372036854775807 MAXVALUE 9223372036854775807
CACHE 1; CACHE 1;
-- 创建 ebike_dispatch_configuration_configuration_id_seq 序列 -- 创建 ebike_work_order_configuration_configuration_id_seq 序列
CREATE SEQUENCE IF NOT EXISTS ebike_dispatch_configuration_configuration_id_seq CREATE SEQUENCE IF NOT EXISTS ebike_work_order_configuration_configuration_id_seq
START WITH 1 START WITH 1
INCREMENT BY 1 INCREMENT BY 1
MINVALUE 1 MINVALUE 1
@ -419,14 +419,15 @@ COMMENT ON COLUMN "public"."ebike_default_billing_configuration"."updated_at" IS
COMMENT ON TABLE "public"."ebike_default_billing_configuration" IS '运营区默认计费规则'; COMMENT ON TABLE "public"."ebike_default_billing_configuration" IS '运营区默认计费规则';
-- ---------------------------- -- ----------------------------
-- Table structure for ebike_dispatch_configuration -- Table structure for ebike_work_order_configuration
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS "public"."ebike_dispatch_configuration"; DROP TABLE IF EXISTS "public"."ebike_work_order_configuration";
CREATE TABLE "public"."ebike_dispatch_configuration" ( CREATE TABLE "public"."ebike_work_order_configuration" (
"configuration_id" int8 NOT NULL DEFAULT nextval('ebike_dispatch_configuration_configuration_id_seq'::regclass), "configuration_id" int8 NOT NULL DEFAULT nextval('ebike_work_order_configuration_configuration_id_seq'::regclass),
"operator_id" int8 NOT NULL, "operator_id" int8 NOT NULL,
"dispatch_duration" int4 NOT NULL, "dispatch_duration" int4 NOT NULL,
"ride_duration" int4 NOT NULL, "ride_duration" int4 NOT NULL,
"inspection_interval_duration" int4 NOT NULL,
"created_by" int8, "created_by" int8,
"created_time" timestamp(6) DEFAULT CURRENT_TIMESTAMP, "created_time" timestamp(6) DEFAULT CURRENT_TIMESTAMP,
"updated_by" int8, "updated_by" int8,
@ -434,15 +435,16 @@ CREATE TABLE "public"."ebike_dispatch_configuration" (
"is_deleted" bool NOT NULL DEFAULT false "is_deleted" bool NOT NULL DEFAULT false
) )
; ;
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."configuration_id" IS '主键ID'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."configuration_id" IS '主键ID';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."operator_id" IS '运营商id'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."operator_id" IS '运营商id';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."dispatch_duration" IS '车辆多长时间无单生成调度工单'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."dispatch_duration" IS '车辆多长时间无单生成调度工单';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."ride_duration" IS '调度完成后多长时间内骑行是有效的'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."ride_duration" IS '调度完成后多长时间内骑行是有效的';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."created_by" IS '创建人ID'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."inspection_interval_duration" IS '巡检间隔时长';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."created_time" IS '创建时间'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."created_by" IS '创建人ID';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."updated_by" IS '最后修改人ID'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."created_time" IS '创建时间';
COMMENT ON COLUMN "public"."ebike_dispatch_configuration"."updated_time" IS '最后修改时间'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."updated_by" IS '最后修改人ID';
COMMENT ON TABLE "public"."ebike_dispatch_configuration" IS '车辆调度配置'; COMMENT ON COLUMN "public"."ebike_work_order_configuration"."updated_time" IS '最后修改时间';
COMMENT ON TABLE "public"."ebike_work_order_configuration" IS '车辆调度配置';
-- ---------------------------- -- ----------------------------
-- Table structure for ebike_ecu_info -- Table structure for ebike_ecu_info
@ -957,16 +959,16 @@ ALTER TABLE "public"."ebike_borrow_battery_record" ADD CONSTRAINT "ebike_borrow_
ALTER TABLE "public"."ebike_default_billing_configuration" ADD CONSTRAINT "ebike_default_ebike_default_billing_configuration_pkey" PRIMARY KEY ("default_billing_configuration_id"); ALTER TABLE "public"."ebike_default_billing_configuration" ADD CONSTRAINT "ebike_default_ebike_default_billing_configuration_pkey" PRIMARY KEY ("default_billing_configuration_id");
-- ---------------------------- -- ----------------------------
-- Indexes structure for table ebike_dispatch_configuration -- Indexes structure for table ebike_work_order_configuration
-- ---------------------------- -- ----------------------------
CREATE INDEX "idx_ebike_dispatch_configuration_operation_id" ON "public"."ebike_dispatch_configuration" USING btree ( CREATE INDEX "idx_ebike_work_order_configuration_operator_id" ON "public"."ebike_work_order_configuration" USING btree (
"configuration_id" "pg_catalog"."int8_ops" ASC NULLS LAST "configuration_id" "pg_catalog"."int8_ops" ASC NULLS LAST
); );
-- ---------------------------- -- ----------------------------
-- Primary Key structure for table ebike_dispatch_configuration -- Primary Key structure for table ebike_work_order_configuration
-- ---------------------------- -- ----------------------------
ALTER TABLE "public"."ebike_dispatch_configuration" ADD CONSTRAINT "ebike_bike_configuration_pkey" PRIMARY KEY ("configuration_id"); ALTER TABLE "public"."ebike_work_order_configuration" ADD CONSTRAINT "ebike_work_order_configuration_pkey" PRIMARY KEY ("configuration_id");
-- ---------------------------- -- ----------------------------
-- Primary Key structure for table ebike_ecu_info -- Primary Key structure for table ebike_ecu_info