开始运营限制配置
This commit is contained in:
parent
12aa882f43
commit
12f2980959
@ -9,6 +9,7 @@ import com.cdzy.operations.model.dto.EbikeSpecialBillingConfigurationDto;
|
|||||||
import com.cdzy.operations.model.entity.EbikeDefaultBillingConfiguration;
|
import com.cdzy.operations.model.entity.EbikeDefaultBillingConfiguration;
|
||||||
import com.cdzy.operations.model.entity.EbikeRegion;
|
import com.cdzy.operations.model.entity.EbikeRegion;
|
||||||
import com.cdzy.operations.model.vo.EbikeDefaultBillingConfigurationVo;
|
import com.cdzy.operations.model.vo.EbikeDefaultBillingConfigurationVo;
|
||||||
|
import com.cdzy.operations.model.vo.EbikeOperationConfigVo;
|
||||||
import com.cdzy.operations.model.vo.EbikeRegionVo;
|
import com.cdzy.operations.model.vo.EbikeRegionVo;
|
||||||
import com.cdzy.operations.model.vo.EbikeSpecialBillingConfigurationVo;
|
import com.cdzy.operations.model.vo.EbikeSpecialBillingConfigurationVo;
|
||||||
import com.cdzy.operations.service.EbikeDefaultBillingConfigurationService;
|
import com.cdzy.operations.service.EbikeDefaultBillingConfigurationService;
|
||||||
@ -220,8 +221,8 @@ public class EbikeRegionController {
|
|||||||
* @return 分页对象
|
* @return 分页对象
|
||||||
*/
|
*/
|
||||||
@PostMapping("operationConfiguration")
|
@PostMapping("operationConfiguration")
|
||||||
public JsonResult<?> operationConfiguration(@Validated @RequestBody EbikeSpecialBillingConfigurationVo configurationVo) {
|
public JsonResult<?> operationConfiguration(@Validated @RequestBody EbikeOperationConfigVo configurationVo) {
|
||||||
specialBillingConfigurationService.specialConfiguration(configurationVo);
|
ebikeRegionService.operationConfiguration(configurationVo);
|
||||||
return JsonResult.success();
|
return JsonResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,7 +234,7 @@ public class EbikeRegionController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("getOperationConfiguration")
|
@GetMapping("getOperationConfiguration")
|
||||||
public JsonResult<?> getOperationConfiguration(@RequestParam Long regionId) {
|
public JsonResult<?> getOperationConfiguration(@RequestParam Long regionId) {
|
||||||
EbikeSpecialBillingConfigurationDto configuration = specialBillingConfigurationService.info(regionId);
|
EbikeOperationConfigVo configuration = ebikeRegionService.getOperationConfiguration(regionId);
|
||||||
return JsonResult.success(configuration);
|
return JsonResult.success(configuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.cdzy.operations.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.cdzy.operations.model.entity.EbikeOperationLockConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 映射层。
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
public interface EbikeOperationLockConfigMapper extends BaseMapper<EbikeOperationLockConfig> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.cdzy.operations.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.cdzy.operations.model.entity.EbikeOperationReturnConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 映射层。
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
public interface EbikeOperationReturnConfigMapper extends BaseMapper<EbikeOperationReturnConfig> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.cdzy.operations.mapper;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
|
import com.cdzy.operations.model.entity.EbikeOperationUseConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 映射层。
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
public interface EbikeOperationUseConfigMapper extends BaseMapper<EbikeOperationUseConfig> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
package com.cdzy.operations.model.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类。
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("ebike_operation_lock_config")
|
||||||
|
public class EbikeOperationLockConfig implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营锁车配置ID
|
||||||
|
*/
|
||||||
|
private Long operationLockConfigId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营区ID
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁车类型:1-自动锁车 2-先临时锁车再自动还
|
||||||
|
*/
|
||||||
|
private Integer lockType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动锁车时长
|
||||||
|
*/
|
||||||
|
private Integer automaticLockTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有单无乘客自动锁车时长
|
||||||
|
*/
|
||||||
|
private Integer automaticLockWithoutMan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 超出运营区是否限制锁车
|
||||||
|
*/
|
||||||
|
private Boolean isRestrictionOutAreaLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆断电检测频率
|
||||||
|
*/
|
||||||
|
private Integer powerOutageCheckNum;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package com.cdzy.operations.model.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类。
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("ebike_operation_return_config")
|
||||||
|
public class EbikeOperationReturnConfig implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营配置ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
private Long operationReturnConfigId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否站点还车
|
||||||
|
*/
|
||||||
|
private Boolean isSiteReturn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认换车距离
|
||||||
|
*/
|
||||||
|
private Double defaultReturnDistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否规范停车强制停车
|
||||||
|
*/
|
||||||
|
private Boolean isCompulsoryParking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否九十度还车
|
||||||
|
*/
|
||||||
|
private Boolean isNinetyDegreeParking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规范还车智能跳过
|
||||||
|
*/
|
||||||
|
private Boolean isReturnSkip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 还车判断用户坐标
|
||||||
|
*/
|
||||||
|
private Boolean isDetermineUserCoordinates;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否学习免调度还车
|
||||||
|
*/
|
||||||
|
private Boolean isNoDispatchReturn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启在线客服
|
||||||
|
*/
|
||||||
|
private Boolean isOpenOnlineCustomer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营区ID
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,150 @@
|
|||||||
|
package com.cdzy.operations.model.entity;
|
||||||
|
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类。
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Table("ebike_operation_use_config")
|
||||||
|
public class EbikeOperationUseConfig implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用配置
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
private Long operationUseConfigId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营区ID
|
||||||
|
*/
|
||||||
|
private Long regionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启人脸识别
|
||||||
|
*/
|
||||||
|
private Boolean isOpenFaceRecognition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁止用户租车电量
|
||||||
|
*/
|
||||||
|
private Integer prohibitUseSoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否自动扣款
|
||||||
|
*/
|
||||||
|
private Boolean autoDebit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否允许无坐标租车
|
||||||
|
*/
|
||||||
|
private Boolean noCoordinatesUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 低电量骑行断电电量
|
||||||
|
*/
|
||||||
|
private Integer powerOutageSoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 借车限制距离
|
||||||
|
*/
|
||||||
|
private Integer useRestrictionDistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启低电量警告
|
||||||
|
*/
|
||||||
|
private Boolean lowSocWarning;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启免押卡用车
|
||||||
|
*/
|
||||||
|
private Boolean noDepositCardUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步电量里程
|
||||||
|
*/
|
||||||
|
private Boolean synchronizePowerMileage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域外是否可用车
|
||||||
|
*/
|
||||||
|
private Boolean outRegionUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启智能头盔
|
||||||
|
*/
|
||||||
|
private Boolean smartHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域外是否允许打开头盔
|
||||||
|
*/
|
||||||
|
private Boolean outRegionHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启自动弹出头盔
|
||||||
|
*/
|
||||||
|
private Boolean automaticEjectHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头盔不在位用车限制
|
||||||
|
*/
|
||||||
|
private Boolean allowHelmetOutUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制归还头盔
|
||||||
|
*/
|
||||||
|
private Boolean compulsoryReturnHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否取头盔通电
|
||||||
|
*/
|
||||||
|
private Boolean energizeHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否佩戴头盔通电
|
||||||
|
*/
|
||||||
|
private Boolean wearEnergizeHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 临时锁车是否需要归还头盔
|
||||||
|
*/
|
||||||
|
private Boolean tempLockReturnHelmet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 桩外是否可借车
|
||||||
|
*/
|
||||||
|
private Boolean outPileUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调度中是否禁止骑行
|
||||||
|
*/
|
||||||
|
private Boolean dispatchUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否关闭停车区域限制
|
||||||
|
*/
|
||||||
|
private Boolean closeReturnSiteRestriction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁行区不可用车
|
||||||
|
*/
|
||||||
|
private Boolean noEntryZoneNoUse;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.cdzy.operations.model.vo;
|
||||||
|
|
||||||
|
import com.cdzy.operations.model.entity.EbikeOperationLockConfig;
|
||||||
|
import com.cdzy.operations.model.entity.EbikeOperationReturnConfig;
|
||||||
|
import com.cdzy.operations.model.entity.EbikeOperationUseConfig;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author attiya
|
||||||
|
* @since 2025-10-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EbikeOperationConfigVo{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 锁车配置
|
||||||
|
*/
|
||||||
|
private EbikeOperationLockConfig lockConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 还车配置
|
||||||
|
*/
|
||||||
|
private EbikeOperationReturnConfig returnConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用车配置
|
||||||
|
*/
|
||||||
|
private EbikeOperationUseConfig useConfig;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.cdzy.operations.service;
|
package com.cdzy.operations.service;
|
||||||
|
|
||||||
|
import com.cdzy.operations.model.vo.EbikeOperationConfigVo;
|
||||||
import com.cdzy.operations.model.vo.EbikeRegionVo;
|
import com.cdzy.operations.model.vo.EbikeRegionVo;
|
||||||
import com.mybatisflex.core.service.IService;
|
import com.mybatisflex.core.service.IService;
|
||||||
import com.cdzy.operations.model.entity.EbikeRegion;
|
import com.cdzy.operations.model.entity.EbikeRegion;
|
||||||
@ -23,4 +24,17 @@ public interface EbikeRegionService extends IService<EbikeRegion> {
|
|||||||
* @param ebikeRegion 运营区
|
* @param ebikeRegion 运营区
|
||||||
*/
|
*/
|
||||||
void update(EbikeRegionVo ebikeRegion);
|
void update(EbikeRegionVo ebikeRegion);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存运营配置
|
||||||
|
* @param configurationVo 配置信息
|
||||||
|
*/
|
||||||
|
void operationConfiguration(EbikeOperationConfigVo configurationVo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运营配置
|
||||||
|
* @param regionId 运营区ID
|
||||||
|
* @return 配置信息
|
||||||
|
*/
|
||||||
|
EbikeOperationConfigVo getOperationConfiguration(Long regionId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.cdzy.common.ex.EbikeException;
|
|||||||
import com.cdzy.operations.enums.RegionStatus;
|
import com.cdzy.operations.enums.RegionStatus;
|
||||||
import com.cdzy.operations.mapper.EbikeRegionMapper;
|
import com.cdzy.operations.mapper.EbikeRegionMapper;
|
||||||
import com.cdzy.operations.model.entity.EbikeRegion;
|
import com.cdzy.operations.model.entity.EbikeRegion;
|
||||||
|
import com.cdzy.operations.model.vo.EbikeOperationConfigVo;
|
||||||
import com.cdzy.operations.model.vo.EbikeRegionVo;
|
import com.cdzy.operations.model.vo.EbikeRegionVo;
|
||||||
import com.cdzy.operations.service.EbikeRegionService;
|
import com.cdzy.operations.service.EbikeRegionService;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
@ -49,4 +50,14 @@ public class EbikeRegionServiceImpl extends ServiceImpl<EbikeRegionMapper, Ebike
|
|||||||
region.setRegionSimpleName(ebikeRegion.getRegionSimpleName());
|
region.setRegionSimpleName(ebikeRegion.getRegionSimpleName());
|
||||||
this.mapper.update(region);
|
this.mapper.update(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void operationConfiguration(EbikeOperationConfigVo configurationVo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EbikeOperationConfigVo getOperationConfiguration(Long regionId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class EbikeStaffApplicationTests {
|
|||||||
private static final String mapperPath="D:/ebike_plus/ebike-operations/resources/mapper";
|
private static final String mapperPath="D:/ebike_plus/ebike-operations/resources/mapper";
|
||||||
private static final String packageName ="com.cdzy.operations";
|
private static final String packageName ="com.cdzy.operations";
|
||||||
private static final String[] tables= new String[]{
|
private static final String[] tables= new String[]{
|
||||||
"ebike_operation_return_config"
|
"ebike_operation_return_config","ebike_operation_lock_config","ebike_operation_use_config"
|
||||||
};
|
};
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user