1、新增维修记录
2、新增保养记录 3、新增港口码头主数据 4、新增铁路车站主数据 5、新增空港机场主数据 6、测试版nacos配置 7、测试版Harbor配置 8、其他配置修改
This commit is contained in:
@@ -0,0 +1,339 @@
|
||||
# AGENTS.md
|
||||
本文件用于指导 Codex (Codex.ai/code) 在此代码仓库中工作时的行为规范。
|
||||
|
||||
> 本规范适用于 BladeX 微服务平台的所有开发任务,为强制性条款。除非用户显式豁免,任何条目都不得忽视或删减。
|
||||
>
|
||||
> 作为 AI 助手参与本项目开发时,你必须:
|
||||
> - 每次输出前深度理解 BladeX 微服务架构、Spring Cloud 全栈技术特征和多租户业务模型
|
||||
> - 当回答依赖外部知识时,先查询 Spring Boot 3.x、Spring Cloud 2025、MyBatis-Plus 等官方文档
|
||||
> - 若需求含糊,先复述已知信息并列出关键澄清问题
|
||||
> - 面对复杂需求,先拆分为可管理的子任务
|
||||
>
|
||||
> 所有开发内容必须建立在深度思考过的基础之上,禁止机械生成与错误填充。
|
||||
> 如果你已了解所有规范,请在用户第一次对话时说明:"我已充分了解 BladeX 微服务平台开发规范。"
|
||||
|
||||
---
|
||||
|
||||
## 1. 项目概述
|
||||
|
||||
BladeX 是基于 Spring Cloud 2025 + Spring Boot 3.x 构建的**企业级微服务开发平台**,提供 SaaS 多租户、OAuth2 认证、数据/接口权限、工作流、分布式事务等核心能力。
|
||||
|
||||
---
|
||||
|
||||
## 2. 项目架构
|
||||
|
||||
```
|
||||
BladeX/
|
||||
├── blade-auth/ # OAuth2 认证授权服务
|
||||
├── blade-common/ # 公共模块(常量、工具类、启动配置)
|
||||
├── blade-gateway/ # Spring Cloud Gateway 网关服务
|
||||
├── blade-ops/ # 运维服务模块
|
||||
│ ├── blade-admin/ # Spring Boot Admin 监控
|
||||
│ ├── blade-develop/ # 代码生成服务
|
||||
│ ├── blade-flow/ # Flowable 工作流服务
|
||||
│ ├── blade-job/ # 分布式任务调度
|
||||
│ ├── blade-log/ # 日志服务
|
||||
│ ├── blade-report/ # 报表服务
|
||||
│ └── blade-resource/ # 资源管理服务(OSS、SMS)
|
||||
├── blade-ops-api/ # 运维服务 API 契约
|
||||
├── blade-plugin/ / blade-plugin-api/ # 插件扩展模块(预留)
|
||||
├── blade-service/ # 业务服务模块
|
||||
│ ├── blade-desk/ # 工作台服务(通知、流程)
|
||||
│ └── blade-system/ # 系统管理服务(用户、角色、菜单、租户等)
|
||||
├── blade-service-api/ # 业务服务 API 契约
|
||||
├── doc/ # Nacos 配置 & 多数据库建表脚本
|
||||
├── script/ # Docker / FatJar 部署脚本
|
||||
└── pom.xml # Maven 父工程配置
|
||||
```
|
||||
|
||||
### 2.1 分层架构
|
||||
|
||||
每个业务模块遵循标准分层,**API 与 Service 分离**:
|
||||
|
||||
| 层次 | 包路径 | 所在模块 |
|
||||
| --- | --- | --- |
|
||||
| Controller | `controller/` | Service 模块 |
|
||||
| Service / ServiceImpl | `service/` + `service/impl/` | Service 模块 |
|
||||
| Mapper(接口 + XML 同包) | `mapper/` | Service 模块 |
|
||||
| Wrapper | `wrapper/` | Service 模块(Entity → VO 转换) |
|
||||
| Entity / VO / DTO | `pojo/entity/` `pojo/vo/` `pojo/dto/` | **API 模块** |
|
||||
| Feign Client | `feign/` | **API 模块**(含 Fallback 降级) |
|
||||
| Cache | `cache/` | **API 模块** |
|
||||
|
||||
### 2.2 API 与 Service 分离原则
|
||||
|
||||
- **API 模块**(`blade-*-api`):定义 Entity、VO、DTO、Feign 接口、Cache 工具,供其他服务依赖
|
||||
- **Service 模块**(`blade-service/*`、`blade-ops/*`):实现 Controller、ServiceImpl、Mapper、Wrapper
|
||||
- 跨服务调用通过 Feign Client 完成,禁止直接依赖其他 Service 模块
|
||||
|
||||
> **与 Boot 版的关键区别**:Cloud 采用 API/Service 模块分离,跨服务通过 Feign 调用;Controller 路由无需 `AppConstant` 前缀(网关按服务名路由)。
|
||||
|
||||
---
|
||||
|
||||
## 3. 技术栈
|
||||
|
||||
| 类别 | 技术 |
|
||||
| --- | --- |
|
||||
| 基础框架 | Spring Boot 3.2.x / Spring Cloud 2025 / Maven |
|
||||
| ORM | MyBatis-Plus(禁止 JDBC 直连) |
|
||||
| 微服务 | Nacos(注册/配置)、Sentinel(熔断)、Seata(分布式事务)、OpenFeign |
|
||||
| 网关 | Spring Cloud Gateway(WebFlux) |
|
||||
| 安全 | OAuth2 / JWT(自研 Secure 框架)、数据权限、接口权限 |
|
||||
| 缓存 | Redis(Protostuff 序列化) |
|
||||
| 工作流 / 任务调度 | Flowable / PowerJob |
|
||||
| 数据库连接池 | Druid |
|
||||
| 文档 | Knife4j(OpenAPI 3.0) |
|
||||
| 监控 | Spring Boot Admin / Prometheus / ELK / Zipkin |
|
||||
| 数据库 | MySQL / PostgreSQL / Oracle / SQL Server / 达梦 / 人大金仓 / 崖山 |
|
||||
|
||||
---
|
||||
|
||||
## 4. 开发规范
|
||||
|
||||
### 4.1 编写新功能前
|
||||
|
||||
1. 先阅读目标模块中已有的类,理解其结构、命名和风格
|
||||
2. 标准参考模块:`blade-service/blade-system`(Service)、`blade-service-api/blade-system-api`(API)
|
||||
3. 主动模仿现有代码风格,包括缩进(Java 用 Tab,YAML/JSON 用 2 空格)、注解顺序、Javadoc 格式
|
||||
4. 新建类必须包含 BladeX 商业许可证头部和 Javadoc 类注释(`@author Chill`)
|
||||
|
||||
### 4.2 编写完成后
|
||||
|
||||
1. 使用 `mvn clean compile -DskipTests` 编译验证,编译不通过必须修复
|
||||
2. 引入模块依赖前先检查循环依赖,若存在则采用更优方案
|
||||
3. 编译通过后将测试交由用户执行,**不得自行执行任何测试**
|
||||
4. 除非用户明确要求,不应撰写示例或额外文档
|
||||
|
||||
### 4.3 代码生成
|
||||
|
||||
当需要生成 CRUD 全套代码(Entity、VO、Service、Controller、Wrapper、Mapper、建表语句等)时,优先使用 **`/blade-design`** skill。该 skill 可根据模块名、实体名和字段列表,自动生成符合 BladeX 框架规范的后端代码和多数据库建表语句,确保生成结果与项目风格完全一致。
|
||||
|
||||
---
|
||||
|
||||
## 5. 命名规范
|
||||
|
||||
### 5.1 包名
|
||||
|
||||
统一前缀 `org.springblade`,按模块划分:`system`、`desk`、`auth`、`gateway`、`develop`、`flow`、`common` 等
|
||||
|
||||
### 5.2 类名
|
||||
|
||||
| 类型 | 规则 | 示例 |
|
||||
| --- | --- | --- |
|
||||
| Entity | 直接类名 | `Notice`、`Tenant` |
|
||||
| VO / DTO | `XxxVO` / `XxxDTO` | `NoticeVO`、`DeptDTO` |
|
||||
| Service 接口 | `IXxxService` | `INoticeService` |
|
||||
| Service 实现 | `XxxServiceImpl` | `NoticeServiceImpl` |
|
||||
| Controller | `XxxController` | `NoticeController` |
|
||||
| Mapper | `XxxMapper` | `NoticeMapper` |
|
||||
| Wrapper | `XxxWrapper` | `NoticeWrapper` |
|
||||
| Feign 接口 / 降级 | `IXxxClient` / `IXxxClientFallback` | `INoticeClient` |
|
||||
| 表名 | `blade_` + 下划线 | `blade_notice` |
|
||||
|
||||
### 5.3 变量命名
|
||||
|
||||
- 必须具有明确语义:`Exception exception`(✅)`Exception e`(❌);`List<Notice> noticeList`(✅)`List<Notice> list`(❌)
|
||||
- 冲突时提升语义:`Cache cache; Cache noticeCache`(✅)`Cache cache1; Cache cache2`(❌)
|
||||
|
||||
---
|
||||
|
||||
## 6. 编码规范
|
||||
|
||||
### 6.1 注解顺序
|
||||
|
||||
- **Controller 类**:租户注解(`@TenantDS`/`@NonDS`) → `@RestController` → Lombok(`@AllArgsConstructor`) → 安全注解(`@PreAuth`) → `@RequestMapping` → `@Tag`
|
||||
- **Controller 方法**:HTTP 方法注解 → `@ApiOperationSupport(order=N)` → `@Operation`
|
||||
- **Entity 类**:`@Data` → `@EqualsAndHashCode` → `@TableName` → `@Schema`
|
||||
- **VO 类**:`@Data` → `@EqualsAndHashCode(callSuper = true)` → `@Schema`
|
||||
|
||||
### 6.2 Entity-Service 继承体系(核心)
|
||||
|
||||
Entity 基类的选择**直接决定** Service 和 ServiceImpl 的继承方式,三者必须配套:
|
||||
|
||||
| 场景 | Entity | Service 接口 | ServiceImpl | 示例 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| **多租户业务表** | `extends TenantEntity` | `extends BaseService<T>` | `extends BaseServiceImpl<M, T>` | Notice, Post, Dept |
|
||||
| **非租户业务表** | `extends BaseEntity` | `extends BaseService<T>` | `extends BaseServiceImpl<M, T>` | Tenant |
|
||||
| **轻量级/关系表** | `implements Serializable` | `extends IService<T>` | `extends ServiceImpl<M, T>` | RoleMenu, Dict, Role |
|
||||
|
||||
- `TenantEntity` 继承自 `BaseEntity` 并额外包含 `tenantId`
|
||||
- `BaseEntity` 包含:id, createUser, createDept, createTime, updateUser, updateTime, status, isDeleted
|
||||
- `BaseService`/`BaseServiceImpl` 是 BladeX 增强版,提供 `deleteLogic()` 等方法,**要求 Entity 继承 BaseEntity 或 TenantEntity**
|
||||
- `IService`/`ServiceImpl` 是 MyBatis-Plus 原生版,用于 `implements Serializable` 的轻量实体,删除用 `removeByIds()`
|
||||
|
||||
### 6.3 Controller 约定
|
||||
|
||||
- 继承 `BladeController`,使用 `@AllArgsConstructor` 注入
|
||||
- **路由直接使用资源路径**(如 `@RequestMapping("notice")`),网关按服务名路由,无需 `AppConstant` 前缀(Boot 版需要前缀)
|
||||
- 统一返回 `R<T>` 响应体
|
||||
- Entity → VO 转换通过 `XxxWrapper.build().entityVO()` / `.pageVO()`
|
||||
|
||||
### 6.4 Feign Client(Cloud 特有)
|
||||
|
||||
- 定义在 API 模块的 `feign/` 包中
|
||||
- `@FeignClient(value = AppConstant.APPLICATION_XXX_NAME)`
|
||||
- 路径常量定义在接口内:`String API_PREFIX = "/feign/client/xxx"`
|
||||
- 降级类命名:`IXxxClientFallback`
|
||||
|
||||
### 6.5 依赖注入
|
||||
|
||||
- Controller 使用 `@AllArgsConstructor` + `private final` 字段
|
||||
- Service 需要额外依赖时使用 `@RequiredArgsConstructor` + `private final` 字段
|
||||
|
||||
### 6.6 Lombok
|
||||
|
||||
禁止手写 getter/setter,统一使用 `@Data`、`@EqualsAndHashCode(callSuper = true)`、`@AllArgsConstructor`、`@RequiredArgsConstructor`、`@Slf4j` 等
|
||||
|
||||
### 6.7 Java 17 特性
|
||||
|
||||
- 可使用增强 switch、Text Blocks、Pattern Matching for instanceof、`@Serial`
|
||||
- **禁止** `var` / `val` 类型推断,所有变量显式声明类型
|
||||
- 优先使用 Stream API,Lambda 保持简洁
|
||||
|
||||
### 6.8 MyBatis-Plus
|
||||
|
||||
- 简单查询使用 `LambdaQueryWrapper`,复杂查询写在 Mapper XML 中
|
||||
- Mapper XML 与接口**同包**放置(`src/main/java` 下)
|
||||
- 分页统一使用 `Condition.getPage(query)` + `Condition.getQueryWrapper()`
|
||||
- 禁止 JDBC 直连查询
|
||||
|
||||
### 6.9 日志
|
||||
|
||||
- 使用 `@Slf4j`,占位符传参(禁止字符串拼接)
|
||||
- 包含关键业务标识,异常必须携带堆栈,禁止打印敏感信息
|
||||
|
||||
---
|
||||
|
||||
## 7. 数据库规范
|
||||
|
||||
- **表名前缀**:`blade_`(如 `blade_notice`、`blade_user`)
|
||||
- **业务表必含字段**:`id`(BIGINT)、`tenant_id`(VARCHAR)、`create_user`、`create_dept`、`create_time`、`update_user`、`update_time`、`status`、`is_deleted`
|
||||
- **主键策略**:雪花算法(`IdType.ASSIGN_ID`),Long 字段用 `@JsonSerialize(using = ToStringSerializer.class)` 防精度丢失
|
||||
- **逻辑删除**:`is_deleted` (INT),0 = 未删除,1 = 已删除
|
||||
- **索引命名**:唯一索引 `uk_` 前缀,普通索引 `idx_` 前缀
|
||||
- **多数据库**:支持 7 种数据库,建表脚本位于 `doc/sql/`,修改表结构时需同步所有脚本
|
||||
|
||||
---
|
||||
|
||||
## 8. 多租户与安全
|
||||
|
||||
- **多租户**:默认字段隔离模式(`tenant_id`),MP 内置方法自动注入;自定义 SQL 需手动 `AuthUtil.getTenantId()`
|
||||
- **租户注解**:`@TenantDS`(启用数据源切换)/ `@NonDS`(禁用切换)
|
||||
- **权限注解**:`@PreAuth(menu = "xxx")`(菜单权限)、`@PreAuth(AuthConstant.PERMIT_ALL)`(公开)
|
||||
- **数据权限**:DataScopeHandler 行级过滤
|
||||
- **接口权限**:ApiScopeHandler 端点级控制
|
||||
|
||||
---
|
||||
|
||||
## 9. 缓存规范
|
||||
|
||||
- `CacheUtil` 统一操作,常量在 `CacheConstant`
|
||||
- 数据变更后清除缓存:`CacheUtil.clear(CACHE_NAME, Boolean.FALSE)`
|
||||
- 字典翻译:`DictCache.getValue(DictEnum.XXX, value)`
|
||||
|
||||
---
|
||||
|
||||
## 10. 商业许可头部
|
||||
|
||||
所有新建的 Java 源文件必须在文件顶部包含以下许可头部:
|
||||
```java
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 11. 构建与部署
|
||||
|
||||
```bash
|
||||
mvn clean compile -DskipTests # 编译验证
|
||||
mvn clean package -DskipTests # 打包
|
||||
mvn clean package docker:build -DskipTests # Docker 镜像
|
||||
```
|
||||
|
||||
- Nacos 配置:`doc/nacos/blade-{dev|test|prod}.yaml`
|
||||
- Docker 部署:`script/docker/app/docker-compose.yml`
|
||||
- 开发环境默认:Nacos `localhost:8848`、Sentinel `localhost:8858`、Redis `127.0.0.1:6379`、MySQL `localhost:3306/bladex`
|
||||
|
||||
---
|
||||
|
||||
## 12. Git 提交规范
|
||||
|
||||
当需要提交代码时,优先使用 **`/blade-commit`** skill,它会自动分析变更内容并生成符合项目规范的 Gitmoji 提交信息。
|
||||
|
||||
采用 **Gitmoji** 风格,中文描述。格式:`:<gitmoji>: 简要描述`
|
||||
|
||||
| Gitmoji | 场景 | 示例 |
|
||||
| --- | --- |------------------------|
|
||||
| `:sparkles:` | 新增功能 | `:sparkles: 新增角色授权功能` |
|
||||
| `:zap:` | 优化重构 | `:zap: 优化字典查询排序逻辑` |
|
||||
| `:bug:` | 修复缺陷 | `:bug: 修复用户查询未过滤已删除数据` |
|
||||
| `:tada:` | 版本发布 | `:tada: x.x.x.RELEASE` |
|
||||
| `:recycle:` | 代码重构 | `:recycle: 重构租户删除逻辑` |
|
||||
|
||||
---
|
||||
|
||||
## 13. 框架组件速查
|
||||
|
||||
| 组件 | 用途 |
|
||||
| --- | --- |
|
||||
| `R<T>` | 统一 API 响应 |
|
||||
| `BladeController` | Controller 基类 |
|
||||
| `TenantEntity` / `BaseEntity` | 实体基类(多租户/非租户) |
|
||||
| `BaseService` / `BaseServiceImpl` | BladeX 增强 Service(含 deleteLogic) |
|
||||
| `BaseEntityWrapper` | Entity→VO 转换基类 |
|
||||
| `BladeUser` | 当前登录用户(含租户信息) |
|
||||
| `Condition` / `Query` | 查询条件构建 / 分页参数 |
|
||||
| `CacheUtil` / `DictCache` | 缓存工具 / 字典缓存 |
|
||||
| `AuthUtil` | 获取当前用户/租户信息 |
|
||||
| `Func` / `BeanUtil` / `StringUtil` | 通用工具类 |
|
||||
| `ServiceException` | 业务异常 |
|
||||
| `@PreAuth` / `@TenantDS` / `@NonDS` | 权限 / 租户数据源切换 |
|
||||
| `@BladeView` / `@DataRecord` / `@XssIgnore` | 视图控制 / 数据审计 / XSS 跳过 |
|
||||
|
||||
---
|
||||
|
||||
## 14. 风格一致性
|
||||
|
||||
1. 风格不确定时,优先查阅现有代码并模仿当前模块的实现方式
|
||||
2. 新模块参考 `blade-service/blade-system` 作为标准模板
|
||||
3. 现有模块已满足需求时,禁止自写替代实现
|
||||
4. 与用户交互全程使用**中文**,代码注释和 Javadoc 亦使用中文
|
||||
|
||||
## 15. SQL生成要求
|
||||
|
||||
1.在生成表格的SQL文件时,需要同时生成菜单的插入SQL,以下为示例数据:
|
||||
```mysql
|
||||
id parent_id code name alias path source sort category action is_open component remark is_deleted
|
||||
2075431169720033282 1164733399668962201 airport_master 空港机场主数据 airport_master /base/airport-master iconfont icon-fengche 30 1 0 1 0
|
||||
2075431461312241665 2075431169720033282 airport_master_import 批量导入 airport_master_import 1 2 0 1 0
|
||||
2075431522544885762 2075431169720033282 airport_master_template 下载模板 airport_master_template 1 2 0 1 0
|
||||
2075431592346492929 2075431169720033282 airport_master_export 批量导出 airport_master_export 1 2 0 1 0
|
||||
2075431635078062081 2075431169720033282 airport_master_delete 批量删除 airport_master_delete 1 2 0 1 0
|
||||
2075431710063828994 2075431169720033282 airport_master_edit 编辑 airport_master_edit 1 2 0 1 0
|
||||
2075431753298714626 2075431169720033282 airport_master_status 修改状态 airport_master_status 1 2 0 1 0
|
||||
2075431820189474818 2075431169720033282 airport_master_add 新增 airport_master_add 1 2 0 1 0
|
||||
```
|
||||
@@ -1,6 +1,4 @@
|
||||
# 网络问题无法下载可以改为阿里云镜像
|
||||
# FROM registry.cn-hangzhou.aliyuncs.com/bladex-repo/alpine-java:openjdk17_cn_slim
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -14,4 +12,4 @@ COPY ./target/blade-auth.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface LauncherConstant {
|
||||
/**
|
||||
* nacos 密码
|
||||
*/
|
||||
String NACOS_PASSWORD = "nacos";
|
||||
String NACOS_PASSWORD = "nacosTMS";
|
||||
|
||||
/**
|
||||
* nacos dev 地址
|
||||
@@ -52,7 +52,7 @@ public interface LauncherConstant {
|
||||
/**
|
||||
* nacos prod 地址
|
||||
*/
|
||||
String NACOS_PROD_ADDR = "172.30.0.48:8848";
|
||||
String NACOS_PROD_ADDR = "172.16.203.228:8848";
|
||||
|
||||
/**
|
||||
* nacos test 地址
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-gateway.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-admin.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-flow.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-job.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-log.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-report.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-resource.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 空港机场主数据实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("blade_airport_master")
|
||||
@Schema(description = "空港机场主数据")
|
||||
public class AirportMaster extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Schema(description = "编码")
|
||||
private String code;
|
||||
/**
|
||||
* IATA编码
|
||||
*/
|
||||
@Schema(description = "IATA编码")
|
||||
private String iataCode;
|
||||
/**
|
||||
* ICAO代码
|
||||
*/
|
||||
@Schema(description = "ICAO代码")
|
||||
private String icaoCode;
|
||||
/**
|
||||
* 机场标准名称
|
||||
*/
|
||||
@Schema(description = "机场标准名称")
|
||||
private String name;
|
||||
/**
|
||||
* 机场简称
|
||||
*/
|
||||
@Schema(description = "机场简称")
|
||||
private String shortName;
|
||||
/**
|
||||
* 所属省份编码
|
||||
*/
|
||||
@Schema(description = "所属省份编码")
|
||||
private String provinceCode;
|
||||
/**
|
||||
* 所属省份
|
||||
*/
|
||||
@Schema(description = "所属省份")
|
||||
private String provinceName;
|
||||
/**
|
||||
* 所属城市编码
|
||||
*/
|
||||
@Schema(description = "所属城市编码")
|
||||
private String cityCode;
|
||||
/**
|
||||
* 所属城市
|
||||
*/
|
||||
@Schema(description = "所属城市")
|
||||
private String cityName;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal longitude;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal latitude;
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@Schema(description = "数据来源")
|
||||
private String dataSource;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 港口码头主数据实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("blade_port_terminal")
|
||||
@Schema(description = "港口码头主数据")
|
||||
public class PortTerminal extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Schema(description = "编码")
|
||||
private String code;
|
||||
/**
|
||||
* 港口/码头名称
|
||||
*/
|
||||
@Schema(description = "港口/码头名称")
|
||||
private String name;
|
||||
/**
|
||||
* 类型:港口、码头
|
||||
*/
|
||||
@Schema(description = "类型")
|
||||
private String category;
|
||||
/**
|
||||
* 上级港口ID
|
||||
*/
|
||||
@Schema(description = "上级港口ID")
|
||||
private Long parentId;
|
||||
/**
|
||||
* 上级港口编码
|
||||
*/
|
||||
@Schema(description = "上级港口编码")
|
||||
private String parentCode;
|
||||
/**
|
||||
* 上级港口名称
|
||||
*/
|
||||
@Schema(description = "上级港口名称")
|
||||
private String parentName;
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@Schema(description = "国家")
|
||||
private String country;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Schema(description = "城市")
|
||||
private String city;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal longitude;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal latitude;
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@Schema(description = "数据来源")
|
||||
private String dataSource;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("blade_railway_station")
|
||||
@Schema(description = "铁路车站主数据")
|
||||
public class RailwayStation extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Schema(description = "编码")
|
||||
private String code;
|
||||
/**
|
||||
* TMIS国标编码
|
||||
*/
|
||||
@Schema(description = "TMIS国标编码")
|
||||
private String tmisCode;
|
||||
/**
|
||||
* 电报码
|
||||
*/
|
||||
@Schema(description = "电报码")
|
||||
private String telegraphCode;
|
||||
/**
|
||||
* 车站名称
|
||||
*/
|
||||
@Schema(description = "车站名称")
|
||||
private String name;
|
||||
/**
|
||||
* 所属铁路线路
|
||||
*/
|
||||
@Schema(description = "所属铁路线路")
|
||||
private String railwayLine;
|
||||
/**
|
||||
* 所属省份编码
|
||||
*/
|
||||
@Schema(description = "所属省份编码")
|
||||
private String provinceCode;
|
||||
/**
|
||||
* 所属省份
|
||||
*/
|
||||
@Schema(description = "所属省份")
|
||||
private String provinceName;
|
||||
/**
|
||||
* 所属城市编码
|
||||
*/
|
||||
@Schema(description = "所属城市编码")
|
||||
private String cityCode;
|
||||
/**
|
||||
* 所属城市
|
||||
*/
|
||||
@Schema(description = "所属城市")
|
||||
private String cityName;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal longitude;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal latitude;
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
@Schema(description = "数据来源")
|
||||
private String dataSource;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.AirportMaster;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 空港机场主数据视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "空港机场主数据")
|
||||
public class AirportMasterVO extends AirportMaster {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入错误信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "导入错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.PortTerminal;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 港口码头主数据视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "港口码头主数据")
|
||||
public class PortTerminalVO extends PortTerminal {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入错误信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "导入错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.RailwayStation;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "铁路车站主数据")
|
||||
public class RailwayStationVO extends RailwayStation {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入错误信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "导入错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blade-transport-api</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
</project>
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 车辆保养计划实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("blade_vehicle_maintenance_plan")
|
||||
@Schema(description = "车辆保养计划")
|
||||
public class MaintenancePlan extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 车船类型
|
||||
*/
|
||||
@Schema(description = "车船类型")
|
||||
private String vehicleType;
|
||||
/**
|
||||
* 车牌号/船号
|
||||
*/
|
||||
@Schema(description = "车牌号/船号")
|
||||
private String vehicleNo;
|
||||
/**
|
||||
* 保养人
|
||||
*/
|
||||
@Schema(description = "保养人")
|
||||
private String maintainer;
|
||||
/**
|
||||
* 保养时间
|
||||
*/
|
||||
@Schema(description = "保养时间")
|
||||
private LocalDateTime maintenanceTime;
|
||||
/**
|
||||
* 里程/航程数
|
||||
*/
|
||||
@Schema(description = "里程/航程数")
|
||||
private BigDecimal mileage;
|
||||
/**
|
||||
* 里程单位
|
||||
*/
|
||||
@Schema(description = "里程单位")
|
||||
private String mileageUnit;
|
||||
/**
|
||||
* 保养项目
|
||||
*/
|
||||
@Schema(description = "保养项目")
|
||||
private String maintenanceItem;
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
@Schema(description = "费用")
|
||||
private BigDecimal cost;
|
||||
/**
|
||||
* 店名
|
||||
*/
|
||||
@Schema(description = "店名")
|
||||
private String storeName;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Schema(description = "联系电话")
|
||||
private String contactPhone;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
/**
|
||||
* 下次保养时间
|
||||
*/
|
||||
@Schema(description = "下次保养时间")
|
||||
private LocalDateTime nextMaintenanceTime;
|
||||
/**
|
||||
* 下次保养里程/航程
|
||||
*/
|
||||
@Schema(description = "下次保养里程/航程")
|
||||
private BigDecimal nextMaintenanceMileage;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@Schema(description = "附件")
|
||||
private String attachments;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 车辆维修记录实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("blade_vehicle_maintenance_record")
|
||||
@Schema(description = "车辆维修记录")
|
||||
public class MaintenanceRecord extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 车船类型
|
||||
*/
|
||||
@Schema(description = "车船类型")
|
||||
private String vehicleType;
|
||||
/**
|
||||
* 车牌号/船号
|
||||
*/
|
||||
@Schema(description = "车牌号/船号")
|
||||
private String vehicleNo;
|
||||
/**
|
||||
* 维修人
|
||||
*/
|
||||
@Schema(description = "维修人")
|
||||
private String maintainer;
|
||||
/**
|
||||
* 维修时间
|
||||
*/
|
||||
@Schema(description = "维修时间")
|
||||
private LocalDateTime maintenanceTime;
|
||||
/**
|
||||
* 维修位置
|
||||
*/
|
||||
@Schema(description = "维修位置")
|
||||
private String location;
|
||||
/**
|
||||
* 更换零件
|
||||
*/
|
||||
@Schema(description = "更换零件")
|
||||
private String replacedPart;
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
@Schema(description = "费用")
|
||||
private BigDecimal cost;
|
||||
/**
|
||||
* 维修单位
|
||||
*/
|
||||
@Schema(description = "维修单位")
|
||||
private String company;
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@Schema(description = "联系方式")
|
||||
private String contact;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
/**
|
||||
* 出厂时间
|
||||
*/
|
||||
@Schema(description = "出厂时间")
|
||||
private LocalDateTime factoryTime;
|
||||
/**
|
||||
* 里程/航程数
|
||||
*/
|
||||
@Schema(description = "里程/航程数")
|
||||
private BigDecimal mileage;
|
||||
/**
|
||||
* 里程单位
|
||||
*/
|
||||
@Schema(description = "里程单位")
|
||||
private String mileageUnit;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@Schema(description = "附件")
|
||||
private String attachments;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 车辆保养计划视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "车辆保养计划")
|
||||
public class MaintenancePlanVO extends MaintenancePlan {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建开始时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeStart;
|
||||
/**
|
||||
* 创建结束时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 车辆维修记录视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "车辆维修记录")
|
||||
public class MaintenanceRecordVO extends MaintenanceRecord {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建开始时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeStart;
|
||||
/**
|
||||
* 创建结束时间
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
}
|
||||
@@ -21,6 +21,7 @@
|
||||
<module>blade-ratelimit-api</module>
|
||||
<module>blade-scope-api</module>
|
||||
<module>blade-system-api</module>
|
||||
<module>blade-transport-api</module>
|
||||
<module>blade-user-api</module>
|
||||
<module>blade-record-api</module>
|
||||
</modules>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-desk.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
@@ -12,4 +12,4 @@ COPY ./target/blade-system.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=test"]
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.excel.AirportMasterExcel;
|
||||
import org.springblade.system.excel.AirportMasterImporter;
|
||||
import org.springblade.system.pojo.entity.AirportMaster;
|
||||
import org.springblade.system.pojo.vo.AirportMasterVO;
|
||||
import org.springblade.system.service.IAirportMasterService;
|
||||
import org.springblade.system.wrapper.AirportMasterWrapper;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 空港机场主数据 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@NonDS
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "airport_master")
|
||||
@RequestMapping("/airport-master")
|
||||
@Tag(name = "空港机场主数据", description = "空港机场主数据")
|
||||
public class AirportMasterController extends BladeController {
|
||||
|
||||
private final IAirportMasterService airportMasterService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入airportMaster")
|
||||
public R<AirportMasterVO> detail(AirportMaster airportMaster) {
|
||||
AirportMaster detail = airportMasterService.getOne(Condition.getQueryWrapper(airportMaster));
|
||||
return R.data(AirportMasterWrapper.build().entityVO(detail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入airportMaster")
|
||||
public R<IPage<AirportMasterVO>> list(AirportMasterVO airportMaster, Query query) {
|
||||
IPage<AirportMasterVO> pages = airportMasterService.selectAirportMasterPage(Condition.getPage(query), airportMaster);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入airportMaster")
|
||||
public R submit(@Valid @RequestBody AirportMaster airportMaster) {
|
||||
return R.status(airportMasterService.submit(airportMaster));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(airportMasterService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用或停用
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "启用或停用", description = "传入id和status")
|
||||
public R status(@Parameter(description = "主键", required = true) @RequestParam Long id,
|
||||
@Parameter(description = "状态", required = true) @RequestParam Integer status) {
|
||||
return R.status(airportMasterService.changeStatus(id, status));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入空港机场主数据
|
||||
*/
|
||||
@PostMapping("/import-airport-master")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导入空港机场主数据", description = "传入excel")
|
||||
public R importAirportMaster(MultipartFile file) {
|
||||
AirportMasterImporter airportMasterImporter = new AirportMasterImporter(airportMasterService);
|
||||
ExcelUtil.save(file, airportMasterImporter, AirportMasterExcel.class);
|
||||
return R.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出空港机场主数据
|
||||
*/
|
||||
@GetMapping("/export-airport-master")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导出空港机场主数据")
|
||||
public void exportAirportMaster(@Parameter(hidden = true) @RequestParam Map<String, Object> airportMaster, HttpServletResponse response) {
|
||||
Object ids = airportMaster.remove("ids");
|
||||
QueryWrapper<AirportMaster> queryWrapper = Condition.getQueryWrapper(airportMaster, AirportMaster.class);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.lambda().in(AirportMaster::getId, Func.toLongList(ids.toString()));
|
||||
}
|
||||
List<AirportMasterExcel> list = airportMasterService.exportAirportMaster(queryWrapper);
|
||||
ExcelUtil.export(response, "空港机场主数据" + DateUtil.time(), "空港机场主数据表", list, AirportMasterExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出模板
|
||||
*/
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "导出模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
List<AirportMasterExcel> list = new ArrayList<>();
|
||||
ExcelUtil.export(response, "空港机场主数据模板", "空港机场主数据表", list, AirportMasterExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.excel.PortTerminalExcel;
|
||||
import org.springblade.system.excel.PortTerminalImporter;
|
||||
import org.springblade.system.pojo.entity.PortTerminal;
|
||||
import org.springblade.system.pojo.vo.PortTerminalVO;
|
||||
import org.springblade.system.service.IPortTerminalService;
|
||||
import org.springblade.system.wrapper.PortTerminalWrapper;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 港口码头主数据 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@NonDS
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "port_terminal")
|
||||
@RequestMapping("/port-terminal")
|
||||
@Tag(name = "港口码头主数据", description = "港口码头主数据")
|
||||
public class PortTerminalController extends BladeController {
|
||||
|
||||
private final IPortTerminalService portTerminalService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入portTerminal")
|
||||
public R<PortTerminalVO> detail(PortTerminal portTerminal) {
|
||||
PortTerminal detail = portTerminalService.getOne(Condition.getQueryWrapper(portTerminal));
|
||||
return R.data(PortTerminalWrapper.build().entityVO(detail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入portTerminal")
|
||||
public R<IPage<PortTerminalVO>> list(PortTerminalVO portTerminal, Query query) {
|
||||
IPage<PortTerminalVO> pages = portTerminalService.selectPortTerminalPage(Condition.getPage(query), portTerminal);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入portTerminal")
|
||||
public R submit(@Valid @RequestBody PortTerminal portTerminal) {
|
||||
return R.status(portTerminalService.submit(portTerminal));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(portTerminalService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用或停用
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "启用或停用", description = "传入id和status")
|
||||
public R status(@Parameter(description = "主键", required = true) @RequestParam Long id,
|
||||
@Parameter(description = "状态", required = true) @RequestParam Integer status) {
|
||||
return R.status(portTerminalService.changeStatus(id, status));
|
||||
}
|
||||
|
||||
/**
|
||||
* 上级港口下拉数据源
|
||||
*/
|
||||
@GetMapping("/port-select")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "上级港口下拉数据源")
|
||||
public R<List<PortTerminal>> portSelect() {
|
||||
return R.data(portTerminalService.selectEnabledPorts());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入港口码头主数据
|
||||
*/
|
||||
@PostMapping("/import-port-terminal")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导入港口码头主数据", description = "传入excel")
|
||||
public R importPortTerminal(MultipartFile file) {
|
||||
PortTerminalImporter portTerminalImporter = new PortTerminalImporter(portTerminalService);
|
||||
ExcelUtil.save(file, portTerminalImporter, PortTerminalExcel.class);
|
||||
return R.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出港口码头主数据
|
||||
*/
|
||||
@GetMapping("/export-port-terminal")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "导出港口码头主数据")
|
||||
public void exportPortTerminal(@Parameter(hidden = true) @RequestParam Map<String, Object> portTerminal, HttpServletResponse response) {
|
||||
Object ids = portTerminal.remove("ids");
|
||||
QueryWrapper<PortTerminal> queryWrapper = Condition.getQueryWrapper(portTerminal, PortTerminal.class);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.lambda().in(PortTerminal::getId, Func.toLongList(ids.toString()));
|
||||
}
|
||||
List<PortTerminalExcel> list = portTerminalService.exportPortTerminal(queryWrapper);
|
||||
ExcelUtil.export(response, "港口码头主数据" + DateUtil.time(), "港口码头主数据表", list, PortTerminalExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出模板
|
||||
*/
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "导出模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
List<PortTerminalExcel> list = new ArrayList<>();
|
||||
ExcelUtil.export(response, "港口码头主数据模板", "港口码头主数据表", list, PortTerminalExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.excel.RailwayStationExcel;
|
||||
import org.springblade.system.excel.RailwayStationImporter;
|
||||
import org.springblade.system.pojo.entity.RailwayStation;
|
||||
import org.springblade.system.pojo.vo.RailwayStationVO;
|
||||
import org.springblade.system.service.IRailwayStationService;
|
||||
import org.springblade.system.wrapper.RailwayStationWrapper;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@NonDS
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "railway_station")
|
||||
@RequestMapping("/railway-station")
|
||||
@Tag(name = "铁路车站主数据", description = "铁路车站主数据")
|
||||
public class RailwayStationController extends BladeController {
|
||||
|
||||
private final IRailwayStationService railwayStationService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入railwayStation")
|
||||
public R<RailwayStationVO> detail(RailwayStation railwayStation) {
|
||||
RailwayStation detail = railwayStationService.getOne(Condition.getQueryWrapper(railwayStation));
|
||||
return R.data(RailwayStationWrapper.build().entityVO(detail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入railwayStation")
|
||||
public R<IPage<RailwayStationVO>> list(RailwayStationVO railwayStation, Query query) {
|
||||
IPage<RailwayStationVO> pages = railwayStationService.selectRailwayStationPage(Condition.getPage(query), railwayStation);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入railwayStation")
|
||||
public R submit(@Valid @RequestBody RailwayStation railwayStation) {
|
||||
return R.status(railwayStationService.submit(railwayStation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(railwayStationService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用或停用
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "启用或停用", description = "传入id和status")
|
||||
public R status(@Parameter(description = "主键", required = true) @RequestParam Long id,
|
||||
@Parameter(description = "状态", required = true) @RequestParam Integer status) {
|
||||
return R.status(railwayStationService.changeStatus(id, status));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入铁路车站主数据
|
||||
*/
|
||||
@PostMapping("/import-railway-station")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导入铁路车站主数据", description = "传入excel")
|
||||
public R importRailwayStation(MultipartFile file) {
|
||||
RailwayStationImporter railwayStationImporter = new RailwayStationImporter(railwayStationService);
|
||||
ExcelUtil.save(file, railwayStationImporter, RailwayStationExcel.class);
|
||||
return R.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出铁路车站主数据
|
||||
*/
|
||||
@GetMapping("/export-railway-station")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导出铁路车站主数据")
|
||||
public void exportRailwayStation(@Parameter(hidden = true) @RequestParam Map<String, Object> railwayStation, HttpServletResponse response) {
|
||||
Object ids = railwayStation.remove("ids");
|
||||
QueryWrapper<RailwayStation> queryWrapper = Condition.getQueryWrapper(railwayStation, RailwayStation.class);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.lambda().in(RailwayStation::getId, Func.toLongList(ids.toString()));
|
||||
}
|
||||
List<RailwayStationExcel> list = railwayStationService.exportRailwayStation(queryWrapper);
|
||||
ExcelUtil.export(response, "铁路车站主数据" + DateUtil.time(), "铁路车站主数据表", list, RailwayStationExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出模板
|
||||
*/
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "导出模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
List<RailwayStationExcel> list = new ArrayList<>();
|
||||
ExcelUtil.export(response, "铁路车站主数据模板", "铁路车站主数据表", list, RailwayStationExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 空港机场主数据 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(18)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class AirportMasterExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("IATA编码")
|
||||
private String iataCode;
|
||||
|
||||
@ExcelProperty("ICAO代码")
|
||||
private String icaoCode;
|
||||
|
||||
@ExcelProperty("机场标准名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("机场简称")
|
||||
private String shortName;
|
||||
|
||||
@ExcelProperty("所属省份")
|
||||
private String provinceName;
|
||||
|
||||
@ExcelProperty("所属城市")
|
||||
private String cityName;
|
||||
|
||||
@ExcelProperty("经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
@ExcelProperty("纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
@ExcelProperty("状态")
|
||||
private String statusName;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("报错文案")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.excel;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springblade.core.excel.support.ExcelImporter;
|
||||
import org.springblade.system.service.IAirportMasterService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 空港机场主数据导入类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class AirportMasterImporter implements ExcelImporter<AirportMasterExcel> {
|
||||
|
||||
private final IAirportMasterService service;
|
||||
|
||||
@Override
|
||||
public void save(List<AirportMasterExcel> data) {
|
||||
service.importAirportMaster(data);
|
||||
}
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 港口码头主数据 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(18)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class PortTerminalExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("港口/码头名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("类型")
|
||||
private String category;
|
||||
|
||||
@ExcelProperty("上级港口")
|
||||
private String parentName;
|
||||
|
||||
@ExcelProperty("上级港口编码")
|
||||
private String parentCode;
|
||||
|
||||
@ExcelProperty("国家")
|
||||
private String country;
|
||||
|
||||
@ExcelProperty("城市")
|
||||
private String city;
|
||||
|
||||
@ExcelProperty("经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
@ExcelProperty("纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
@ExcelProperty("状态")
|
||||
private String statusName;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("报错文案")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.excel;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springblade.core.excel.support.ExcelImporter;
|
||||
import org.springblade.system.service.IPortTerminalService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 港口码头主数据导入类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class PortTerminalImporter implements ExcelImporter<PortTerminalExcel> {
|
||||
|
||||
private final IPortTerminalService service;
|
||||
|
||||
@Override
|
||||
public void save(List<PortTerminalExcel> data) {
|
||||
service.importPortTerminal(data);
|
||||
}
|
||||
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(18)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class RailwayStationExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("TMIS国标编码")
|
||||
private String tmisCode;
|
||||
|
||||
@ExcelProperty("电报码")
|
||||
private String telegraphCode;
|
||||
|
||||
@ExcelProperty("车站名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("所属铁路线路")
|
||||
private String railwayLine;
|
||||
|
||||
@ExcelProperty("所属省份")
|
||||
private String provinceName;
|
||||
|
||||
@ExcelProperty("所属城市")
|
||||
private String cityName;
|
||||
|
||||
@ExcelProperty("经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
@ExcelProperty("纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
@ExcelProperty("状态")
|
||||
private String statusName;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("报错文案")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.excel;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springblade.core.excel.support.ExcelImporter;
|
||||
import org.springblade.system.service.IRailwayStationService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据导入类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class RailwayStationImporter implements ExcelImporter<RailwayStationExcel> {
|
||||
|
||||
private final IRailwayStationService service;
|
||||
|
||||
@Override
|
||||
public void save(List<RailwayStationExcel> data) {
|
||||
service.importRailwayStation(data);
|
||||
}
|
||||
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springblade.system.pojo.entity.AirportMaster;
|
||||
import org.springblade.system.pojo.vo.AirportMasterVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 空港机场主数据 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface AirportMasterMapper extends BaseMapper<AirportMaster> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param airportMaster 查询参数
|
||||
* @return 空港机场分页
|
||||
*/
|
||||
List<AirportMasterVO> selectAirportMasterPage(IPage<AirportMasterVO> page, @Param("airportMaster") AirportMasterVO airportMaster);
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.system.mapper.AirportMasterMapper">
|
||||
|
||||
<resultMap id="airportMasterResultMap" type="org.springblade.system.pojo.vo.AirportMasterVO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="code" property="code"/>
|
||||
<result column="iata_code" property="iataCode"/>
|
||||
<result column="icao_code" property="icaoCode"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="short_name" property="shortName"/>
|
||||
<result column="province_code" property="provinceCode"/>
|
||||
<result column="province_name" property="provinceName"/>
|
||||
<result column="city_code" property="cityCode"/>
|
||||
<result column="city_name" property="cityName"/>
|
||||
<result column="longitude" property="longitude"/>
|
||||
<result column="latitude" property="latitude"/>
|
||||
<result column="data_source" property="dataSource"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAirportMasterPage" resultMap="airportMasterResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
blade_airport_master
|
||||
WHERE
|
||||
is_deleted = 0
|
||||
<if test="airportMaster.code != null and airportMaster.code != ''">
|
||||
<bind name="codeLike" value="'%' + airportMaster.code + '%'"/>
|
||||
AND code LIKE #{codeLike}
|
||||
</if>
|
||||
<if test="airportMaster.name != null and airportMaster.name != ''">
|
||||
<bind name="nameLike" value="'%' + airportMaster.name + '%'"/>
|
||||
AND name LIKE #{nameLike}
|
||||
</if>
|
||||
<if test="airportMaster.dataSource != null and airportMaster.dataSource != ''">
|
||||
AND data_source = #{airportMaster.dataSource}
|
||||
</if>
|
||||
<if test="airportMaster.status != null">
|
||||
AND status = #{airportMaster.status}
|
||||
</if>
|
||||
ORDER BY update_time DESC, create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.system.pojo.entity.PortTerminal;
|
||||
import org.springblade.system.pojo.vo.PortTerminalVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 港口码头主数据 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface PortTerminalMapper extends BaseMapper<PortTerminal> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param portTerminal 查询参数
|
||||
* @return 港口码头列表
|
||||
*/
|
||||
List<PortTerminalVO> selectPortTerminalPage(IPage<PortTerminalVO> page, PortTerminalVO portTerminal);
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.system.mapper.PortTerminalMapper">
|
||||
|
||||
<resultMap id="portTerminalResultMap" type="org.springblade.system.pojo.vo.PortTerminalVO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="code" property="code"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="category" property="category"/>
|
||||
<result column="parent_id" property="parentId"/>
|
||||
<result column="parent_code" property="parentCode"/>
|
||||
<result column="parent_name" property="parentName"/>
|
||||
<result column="country" property="country"/>
|
||||
<result column="city" property="city"/>
|
||||
<result column="longitude" property="longitude"/>
|
||||
<result column="latitude" property="latitude"/>
|
||||
<result column="data_source" property="dataSource"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectPortTerminalPage" resultMap="portTerminalResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
blade_port_terminal
|
||||
WHERE
|
||||
is_deleted = 0
|
||||
<if test="portTerminal.code != null and portTerminal.code != ''">
|
||||
<bind name="codeLike" value="'%' + portTerminal.code + '%'"/>
|
||||
AND code LIKE #{codeLike}
|
||||
</if>
|
||||
<if test="portTerminal.name != null and portTerminal.name != ''">
|
||||
<bind name="nameLike" value="'%' + portTerminal.name + '%'"/>
|
||||
AND name LIKE #{nameLike}
|
||||
</if>
|
||||
<if test="portTerminal.category != null and portTerminal.category != ''">
|
||||
AND category = #{portTerminal.category}
|
||||
</if>
|
||||
<if test="portTerminal.dataSource != null and portTerminal.dataSource != ''">
|
||||
AND data_source = #{portTerminal.dataSource}
|
||||
</if>
|
||||
<if test="portTerminal.city != null and portTerminal.city != ''">
|
||||
AND city = #{portTerminal.city}
|
||||
</if>
|
||||
<if test="portTerminal.country != null and portTerminal.country != ''">
|
||||
AND country = #{portTerminal.country}
|
||||
</if>
|
||||
<if test="portTerminal.status != null">
|
||||
AND status = #{portTerminal.status}
|
||||
</if>
|
||||
ORDER BY update_time DESC, create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springblade.system.pojo.entity.RailwayStation;
|
||||
import org.springblade.system.pojo.vo.RailwayStationVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface RailwayStationMapper extends BaseMapper<RailwayStation> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param railwayStation 查询参数
|
||||
* @return 铁路车站分页
|
||||
*/
|
||||
List<RailwayStationVO> selectRailwayStationPage(IPage<RailwayStationVO> page, @Param("railwayStation") RailwayStationVO railwayStation);
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.system.mapper.RailwayStationMapper">
|
||||
|
||||
<resultMap id="railwayStationResultMap" type="org.springblade.system.pojo.vo.RailwayStationVO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="code" property="code"/>
|
||||
<result column="tmis_code" property="tmisCode"/>
|
||||
<result column="telegraph_code" property="telegraphCode"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="railway_line" property="railwayLine"/>
|
||||
<result column="province_code" property="provinceCode"/>
|
||||
<result column="province_name" property="provinceName"/>
|
||||
<result column="city_code" property="cityCode"/>
|
||||
<result column="city_name" property="cityName"/>
|
||||
<result column="longitude" property="longitude"/>
|
||||
<result column="latitude" property="latitude"/>
|
||||
<result column="data_source" property="dataSource"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectRailwayStationPage" resultMap="railwayStationResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
blade_railway_station
|
||||
WHERE
|
||||
is_deleted = 0
|
||||
<if test="railwayStation.code != null and railwayStation.code != ''">
|
||||
<bind name="codeLike" value="'%' + railwayStation.code + '%'"/>
|
||||
AND code LIKE #{codeLike}
|
||||
</if>
|
||||
<if test="railwayStation.name != null and railwayStation.name != ''">
|
||||
<bind name="nameLike" value="'%' + railwayStation.name + '%'"/>
|
||||
AND name LIKE #{nameLike}
|
||||
</if>
|
||||
<if test="railwayStation.dataSource != null and railwayStation.dataSource != ''">
|
||||
AND data_source = #{railwayStation.dataSource}
|
||||
</if>
|
||||
<if test="railwayStation.status != null">
|
||||
AND status = #{railwayStation.status}
|
||||
</if>
|
||||
ORDER BY update_time DESC, create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.system.excel.AirportMasterExcel;
|
||||
import org.springblade.system.pojo.entity.AirportMaster;
|
||||
import org.springblade.system.pojo.vo.AirportMasterVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 空港机场主数据 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IAirportMasterService extends BaseService<AirportMaster> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param airportMaster 查询参数
|
||||
* @return 空港机场分页
|
||||
*/
|
||||
IPage<AirportMasterVO> selectAirportMasterPage(IPage<AirportMasterVO> page, AirportMasterVO airportMaster);
|
||||
|
||||
/**
|
||||
* 新增或修改空港机场
|
||||
*
|
||||
* @param airportMaster 空港机场
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean submit(AirportMaster airportMaster);
|
||||
|
||||
/**
|
||||
* 启用或停用
|
||||
*
|
||||
* @param id 主键
|
||||
* @param status 状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean changeStatus(Long id, Integer status);
|
||||
|
||||
/**
|
||||
* 导入空港机场
|
||||
*
|
||||
* @param data 导入数据
|
||||
*/
|
||||
void importAirportMaster(List<AirportMasterExcel> data);
|
||||
|
||||
/**
|
||||
* 导出空港机场
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 导出数据
|
||||
*/
|
||||
List<AirportMasterExcel> exportAirportMaster(Wrapper<AirportMaster> queryWrapper);
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.system.excel.PortTerminalExcel;
|
||||
import org.springblade.system.pojo.entity.PortTerminal;
|
||||
import org.springblade.system.pojo.vo.PortTerminalVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 港口码头主数据 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IPortTerminalService extends BaseService<PortTerminal> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param portTerminal 查询参数
|
||||
* @return 港口码头分页
|
||||
*/
|
||||
IPage<PortTerminalVO> selectPortTerminalPage(IPage<PortTerminalVO> page, PortTerminalVO portTerminal);
|
||||
|
||||
/**
|
||||
* 新增或修改港口码头
|
||||
*
|
||||
* @param portTerminal 港口码头
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean submit(PortTerminal portTerminal);
|
||||
|
||||
/**
|
||||
* 启用或停用
|
||||
*
|
||||
* @param id 主键
|
||||
* @param status 状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean changeStatus(Long id, Integer status);
|
||||
|
||||
/**
|
||||
* 启用港口下拉数据源
|
||||
*
|
||||
* @return 港口列表
|
||||
*/
|
||||
List<PortTerminal> selectEnabledPorts();
|
||||
|
||||
/**
|
||||
* 导入港口码头
|
||||
*
|
||||
* @param data 导入数据
|
||||
*/
|
||||
void importPortTerminal(List<PortTerminalExcel> data);
|
||||
|
||||
/**
|
||||
* 导出港口码头
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 导出数据
|
||||
*/
|
||||
List<PortTerminalExcel> exportPortTerminal(Wrapper<PortTerminal> queryWrapper);
|
||||
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.system.excel.RailwayStationExcel;
|
||||
import org.springblade.system.pojo.entity.RailwayStation;
|
||||
import org.springblade.system.pojo.vo.RailwayStationVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IRailwayStationService extends BaseService<RailwayStation> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param railwayStation 查询参数
|
||||
* @return 铁路车站分页
|
||||
*/
|
||||
IPage<RailwayStationVO> selectRailwayStationPage(IPage<RailwayStationVO> page, RailwayStationVO railwayStation);
|
||||
|
||||
/**
|
||||
* 新增或修改铁路车站
|
||||
*
|
||||
* @param railwayStation 铁路车站
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean submit(RailwayStation railwayStation);
|
||||
|
||||
/**
|
||||
* 启用或停用
|
||||
*
|
||||
* @param id 主键
|
||||
* @param status 状态
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean changeStatus(Long id, Integer status);
|
||||
|
||||
/**
|
||||
* 导入铁路车站
|
||||
*
|
||||
* @param data 导入数据
|
||||
*/
|
||||
void importRailwayStation(List<RailwayStationExcel> data);
|
||||
|
||||
/**
|
||||
* 导出铁路车站
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 导出数据
|
||||
*/
|
||||
List<RailwayStationExcel> exportRailwayStation(Wrapper<RailwayStation> queryWrapper);
|
||||
|
||||
}
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.excel.AirportMasterExcel;
|
||||
import org.springblade.system.mapper.AirportMasterMapper;
|
||||
import org.springblade.system.pojo.entity.AirportMaster;
|
||||
import org.springblade.system.pojo.entity.Region;
|
||||
import org.springblade.system.pojo.vo.AirportMasterVO;
|
||||
import org.springblade.system.service.IAirportMasterService;
|
||||
import org.springblade.system.service.IRegionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 空港机场主数据 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMapper, AirportMaster> implements IAirportMasterService {
|
||||
|
||||
private static final String CODE_PREFIX = "JC-";
|
||||
private static final String SOURCE_BATCH = "批量导入";
|
||||
private static final String SOURCE_MANUAL = "手工导入";
|
||||
private static final int STATUS_ENABLED = 1;
|
||||
private static final int STATUS_DISABLED = 2;
|
||||
private static final int REMARK_MAX_LENGTH = 200;
|
||||
private static final Pattern IATA_CODE_PATTERN = Pattern.compile("^[A-Z]{3}$");
|
||||
private static final Pattern ICAO_CODE_PATTERN = Pattern.compile("^[A-Z]{4}$");
|
||||
private static final BigDecimal MIN_LONGITUDE = BigDecimal.valueOf(-180);
|
||||
private static final BigDecimal MAX_LONGITUDE = BigDecimal.valueOf(180);
|
||||
private static final BigDecimal MIN_LATITUDE = BigDecimal.valueOf(-90);
|
||||
private static final BigDecimal MAX_LATITUDE = BigDecimal.valueOf(90);
|
||||
|
||||
private final IRegionService regionService;
|
||||
|
||||
@Override
|
||||
public IPage<AirportMasterVO> selectAirportMasterPage(IPage<AirportMasterVO> page, AirportMasterVO airportMaster) {
|
||||
return page.setRecords(baseMapper.selectAirportMasterPage(page, airportMaster));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(AirportMaster airportMaster) {
|
||||
prepare(airportMaster, SOURCE_MANUAL);
|
||||
validate(airportMaster);
|
||||
return saveOrUpdate(airportMaster);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean changeStatus(Long id, Integer status) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
AirportMaster airportMaster = getById(id);
|
||||
if (Func.isEmpty(airportMaster)) {
|
||||
throw new ServiceException("空港机场不存在");
|
||||
}
|
||||
if (!Objects.equals(status, STATUS_ENABLED) && !Objects.equals(status, STATUS_DISABLED)) {
|
||||
throw new ServiceException("启停状态不正确");
|
||||
}
|
||||
AirportMaster update = new AirportMaster();
|
||||
update.setId(id);
|
||||
update.setStatus(status);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importAirportMaster(List<AirportMasterExcel> data) {
|
||||
List<String> errorList = new ArrayList<>();
|
||||
for (int index = 0; index < data.size(); index++) {
|
||||
AirportMasterExcel excel = data.get(index);
|
||||
try {
|
||||
AirportMaster airportMaster = Objects.requireNonNull(BeanUtil.copyProperties(excel, AirportMaster.class));
|
||||
airportMaster.setDataSource(SOURCE_BATCH);
|
||||
airportMaster.setStatus(STATUS_ENABLED);
|
||||
prepare(airportMaster, SOURCE_BATCH);
|
||||
validate(airportMaster);
|
||||
save(airportMaster);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
errorList.add("第" + (index + 2) + "行:" + message);
|
||||
}
|
||||
}
|
||||
if (Func.isNotEmpty(errorList)) {
|
||||
throw new ServiceException(String.join(";", errorList));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AirportMasterExcel> exportAirportMaster(Wrapper<AirportMaster> queryWrapper) {
|
||||
List<AirportMaster> airportMasterList = list(queryWrapper);
|
||||
return airportMasterList.stream().map(airportMaster -> {
|
||||
AirportMasterExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterExcel.class));
|
||||
excel.setStatusName(Objects.equals(airportMaster.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private void prepare(AirportMaster airportMaster, String defaultDataSource) {
|
||||
airportMaster.setIataCode(trimToEmpty(airportMaster.getIataCode()).toUpperCase(Locale.ROOT));
|
||||
airportMaster.setCode(CODE_PREFIX + airportMaster.getIataCode());
|
||||
airportMaster.setIcaoCode(trimToEmpty(airportMaster.getIcaoCode()).toUpperCase(Locale.ROOT));
|
||||
airportMaster.setName(trimToEmpty(airportMaster.getName()));
|
||||
airportMaster.setShortName(trimToNull(airportMaster.getShortName()));
|
||||
airportMaster.setProvinceCode(trimToNull(airportMaster.getProvinceCode()));
|
||||
airportMaster.setProvinceName(trimToNull(airportMaster.getProvinceName()));
|
||||
airportMaster.setCityCode(trimToNull(airportMaster.getCityCode()));
|
||||
airportMaster.setCityName(trimToNull(airportMaster.getCityName()));
|
||||
airportMaster.setRemark(trimToNull(airportMaster.getRemark()));
|
||||
airportMaster.setDataSource(Func.toStrWithEmpty(airportMaster.getDataSource(), defaultDataSource));
|
||||
if (Func.isEmpty(airportMaster.getStatus())) {
|
||||
airportMaster.setStatus(STATUS_ENABLED);
|
||||
}
|
||||
fillRegion(airportMaster);
|
||||
}
|
||||
|
||||
private void validate(AirportMaster airportMaster) {
|
||||
if (Func.isEmpty(airportMaster.getIataCode())) {
|
||||
throw new ServiceException("IATA编码不能为空");
|
||||
}
|
||||
if (!IATA_CODE_PATTERN.matcher(airportMaster.getIataCode()).matches()) {
|
||||
throw new ServiceException("IATA编码为3位大写字母");
|
||||
}
|
||||
if (Func.isEmpty(airportMaster.getIcaoCode())) {
|
||||
throw new ServiceException("ICAO代码不能为空");
|
||||
}
|
||||
if (!ICAO_CODE_PATTERN.matcher(airportMaster.getIcaoCode()).matches()) {
|
||||
throw new ServiceException("ICAO代码为4位大写字母");
|
||||
}
|
||||
if (Func.isEmpty(airportMaster.getName())) {
|
||||
throw new ServiceException("机场标准名称不能为空");
|
||||
}
|
||||
if (Func.isEmpty(airportMaster.getProvinceCode()) || Func.isEmpty(airportMaster.getCityCode())) {
|
||||
throw new ServiceException("请选择省份和城市");
|
||||
}
|
||||
validateCoordinate(airportMaster.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度");
|
||||
validateCoordinate(airportMaster.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度");
|
||||
if (Func.isNotEmpty(airportMaster.getRemark()) && airportMaster.getRemark().length() > REMARK_MAX_LENGTH) {
|
||||
throw new ServiceException("备注不能超过200字");
|
||||
}
|
||||
validateUnique(airportMaster, AirportMaster::getIataCode, airportMaster.getIataCode(), "该IATA编码已存在");
|
||||
validateUnique(airportMaster, AirportMaster::getIcaoCode, airportMaster.getIcaoCode(), "该ICAO代码已存在");
|
||||
validateUnique(airportMaster, AirportMaster::getCode, airportMaster.getCode(), "该编码已存在");
|
||||
}
|
||||
|
||||
private void fillRegion(AirportMaster airportMaster) {
|
||||
Region province = null;
|
||||
if (Func.isNotEmpty(airportMaster.getProvinceCode())) {
|
||||
province = regionService.getById(airportMaster.getProvinceCode());
|
||||
}
|
||||
if (Func.isEmpty(province) && Func.isNotEmpty(airportMaster.getProvinceName())) {
|
||||
province = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
||||
.eq(Region::getParentCode, "00")
|
||||
.eq(Region::getName, airportMaster.getProvinceName()), false);
|
||||
}
|
||||
if (Func.isEmpty(province)) {
|
||||
throw new ServiceException("请选择省份");
|
||||
}
|
||||
|
||||
Region city = null;
|
||||
if (Func.isNotEmpty(airportMaster.getCityCode())) {
|
||||
city = regionService.getById(airportMaster.getCityCode());
|
||||
}
|
||||
if (Func.isEmpty(city) && Func.isNotEmpty(airportMaster.getCityName())) {
|
||||
city = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
||||
.eq(Region::getParentCode, province.getCode())
|
||||
.eq(Region::getName, airportMaster.getCityName()), false);
|
||||
}
|
||||
if (Func.isEmpty(city)) {
|
||||
throw new ServiceException("请选择城市");
|
||||
}
|
||||
if (!Objects.equals(city.getParentCode(), province.getCode())) {
|
||||
throw new ServiceException("所属城市与所属省份不匹配");
|
||||
}
|
||||
airportMaster.setProvinceCode(province.getCode());
|
||||
airportMaster.setProvinceName(province.getName());
|
||||
airportMaster.setCityCode(city.getCode());
|
||||
airportMaster.setCityName(city.getName());
|
||||
}
|
||||
|
||||
private void validateCoordinate(BigDecimal value, BigDecimal min, BigDecimal max, String name) {
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
if (value.compareTo(min) < 0 || value.compareTo(max) > 0) {
|
||||
throw new ServiceException(name + "范围不正确");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateUnique(AirportMaster airportMaster, com.baomidou.mybatisplus.core.toolkit.support.SFunction<AirportMaster, ?> column, String value, String message) {
|
||||
LambdaQueryWrapper<AirportMaster> queryWrapper = Wrappers.<AirportMaster>lambdaQuery()
|
||||
.eq(column, value)
|
||||
.eq(AirportMaster::getIsDeleted, 0);
|
||||
if (Func.isNotEmpty(airportMaster.getId())) {
|
||||
queryWrapper.ne(AirportMaster::getId, airportMaster.getId());
|
||||
}
|
||||
if (count(queryWrapper) > 0L) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
private String trimToEmpty(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
|
||||
private String trimToNull(String value) {
|
||||
String trimValue = trimToEmpty(value);
|
||||
return trimValue.isEmpty() ? null : trimValue;
|
||||
}
|
||||
|
||||
}
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.excel.PortTerminalExcel;
|
||||
import org.springblade.system.mapper.PortTerminalMapper;
|
||||
import org.springblade.system.pojo.entity.PortTerminal;
|
||||
import org.springblade.system.pojo.vo.PortTerminalVO;
|
||||
import org.springblade.system.service.IPortTerminalService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 港口码头主数据 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper, PortTerminal> implements IPortTerminalService {
|
||||
|
||||
private static final String CATEGORY_PORT = "港口";
|
||||
private static final String CATEGORY_TERMINAL = "码头";
|
||||
private static final String SOURCE_INITIAL = "初始导入";
|
||||
private static final String SOURCE_BATCH = "批量导入";
|
||||
private static final String SOURCE_MANUAL = "手工导入";
|
||||
private static final int STATUS_ENABLED = 1;
|
||||
private static final int STATUS_DISABLED = 2;
|
||||
private static final Pattern PORT_CODE_PATTERN = Pattern.compile("^[A-Z]{5}$");
|
||||
private static final Pattern TERMINAL_CODE_PATTERN = Pattern.compile("^[A-Z]{5}-[A-Z0-9]+$");
|
||||
|
||||
@Override
|
||||
public IPage<PortTerminalVO> selectPortTerminalPage(IPage<PortTerminalVO> page, PortTerminalVO portTerminal) {
|
||||
return page.setRecords(baseMapper.selectPortTerminalPage(page, portTerminal));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(PortTerminal portTerminal) {
|
||||
prepare(portTerminal, SOURCE_MANUAL);
|
||||
validate(portTerminal);
|
||||
return saveOrUpdate(portTerminal);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean changeStatus(Long id, Integer status) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
PortTerminal portTerminal = getById(id);
|
||||
if (Func.isEmpty(portTerminal)) {
|
||||
throw new ServiceException("港口码头不存在");
|
||||
}
|
||||
if (!Objects.equals(status, STATUS_ENABLED) && !Objects.equals(status, STATUS_DISABLED)) {
|
||||
throw new ServiceException("启停状态不正确");
|
||||
}
|
||||
if (Objects.equals(status, STATUS_DISABLED) && CATEGORY_PORT.equals(portTerminal.getCategory())) {
|
||||
validateEnabledTerminal(portTerminal.getId());
|
||||
}
|
||||
PortTerminal update = new PortTerminal();
|
||||
update.setId(id);
|
||||
update.setStatus(status);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PortTerminal> selectEnabledPorts() {
|
||||
return list(Wrappers.<PortTerminal>lambdaQuery()
|
||||
.eq(PortTerminal::getCategory, CATEGORY_PORT)
|
||||
.eq(PortTerminal::getStatus, STATUS_ENABLED)
|
||||
.orderByAsc(PortTerminal::getCode));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importPortTerminal(List<PortTerminalExcel> data) {
|
||||
List<String> errorList = new ArrayList<>();
|
||||
for (int index = 0; index < data.size(); index++) {
|
||||
PortTerminalExcel excel = data.get(index);
|
||||
try {
|
||||
PortTerminal portTerminal = Objects.requireNonNull(BeanUtil.copyProperties(excel, PortTerminal.class));
|
||||
portTerminal.setDataSource(SOURCE_BATCH);
|
||||
portTerminal.setStatus(STATUS_ENABLED);
|
||||
prepare(portTerminal, SOURCE_BATCH);
|
||||
validate(portTerminal);
|
||||
save(portTerminal);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
errorList.add("第" + (index + 2) + "行:" + message);
|
||||
}
|
||||
}
|
||||
if (Func.isNotEmpty(errorList)) {
|
||||
throw new ServiceException(String.join(";", errorList));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PortTerminalExcel> exportPortTerminal(Wrapper<PortTerminal> queryWrapper) {
|
||||
List<PortTerminal> portTerminalList = list(queryWrapper);
|
||||
return portTerminalList.stream().map(portTerminal -> {
|
||||
PortTerminalExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalExcel.class));
|
||||
excel.setStatusName(Objects.equals(portTerminal.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private void prepare(PortTerminal portTerminal, String defaultDataSource) {
|
||||
portTerminal.setCode(trimToEmpty(portTerminal.getCode()).toUpperCase(Locale.ROOT));
|
||||
portTerminal.setCategory(trimToEmpty(portTerminal.getCategory()));
|
||||
portTerminal.setName(trimToEmpty(portTerminal.getName()));
|
||||
portTerminal.setDataSource(Func.toStrWithEmpty(portTerminal.getDataSource(), defaultDataSource));
|
||||
if (Func.isEmpty(portTerminal.getStatus())) {
|
||||
portTerminal.setStatus(STATUS_ENABLED);
|
||||
}
|
||||
if (CATEGORY_PORT.equals(portTerminal.getCategory())) {
|
||||
portTerminal.setParentId(null);
|
||||
portTerminal.setParentCode(null);
|
||||
portTerminal.setParentName(null);
|
||||
return;
|
||||
}
|
||||
fillParentPort(portTerminal);
|
||||
}
|
||||
|
||||
private void fillParentPort(PortTerminal portTerminal) {
|
||||
PortTerminal parent = null;
|
||||
if (Func.isNotEmpty(portTerminal.getParentId())) {
|
||||
parent = getById(portTerminal.getParentId());
|
||||
}
|
||||
if (Func.isEmpty(parent) && Func.isNotEmpty(portTerminal.getParentCode())) {
|
||||
parent = getOne(Wrappers.<PortTerminal>lambdaQuery()
|
||||
.eq(PortTerminal::getCode, trimToEmpty(portTerminal.getParentCode()).toUpperCase(Locale.ROOT))
|
||||
.eq(PortTerminal::getCategory, CATEGORY_PORT)
|
||||
.eq(PortTerminal::getIsDeleted, 0));
|
||||
}
|
||||
if (Func.isEmpty(parent)) {
|
||||
throw new ServiceException("码头必须选择上级港口");
|
||||
}
|
||||
if (!CATEGORY_PORT.equals(parent.getCategory())) {
|
||||
throw new ServiceException("上级港口类型不正确");
|
||||
}
|
||||
portTerminal.setParentId(parent.getId());
|
||||
portTerminal.setParentCode(parent.getCode());
|
||||
portTerminal.setParentName(parent.getName());
|
||||
portTerminal.setCountry(parent.getCountry());
|
||||
portTerminal.setCity(parent.getCity());
|
||||
}
|
||||
|
||||
private void validate(PortTerminal portTerminal) {
|
||||
if (!CATEGORY_PORT.equals(portTerminal.getCategory()) && !CATEGORY_TERMINAL.equals(portTerminal.getCategory())) {
|
||||
throw new ServiceException("类型只能为港口或码头");
|
||||
}
|
||||
if (Func.isEmpty(portTerminal.getCode())) {
|
||||
throw new ServiceException("编码不能为空");
|
||||
}
|
||||
if (CATEGORY_PORT.equals(portTerminal.getCategory()) && !PORT_CODE_PATTERN.matcher(portTerminal.getCode()).matches()) {
|
||||
throw new ServiceException("港口编码为5位大写字母");
|
||||
}
|
||||
if (CATEGORY_TERMINAL.equals(portTerminal.getCategory()) && !TERMINAL_CODE_PATTERN.matcher(portTerminal.getCode()).matches()) {
|
||||
throw new ServiceException("码头编码格式为港口编码-码头标识");
|
||||
}
|
||||
if (CATEGORY_TERMINAL.equals(portTerminal.getCategory()) && !portTerminal.getCode().startsWith(portTerminal.getParentCode() + "-")) {
|
||||
throw new ServiceException("码头编码必须以所属港口编码开头");
|
||||
}
|
||||
validateUniqueCode(portTerminal);
|
||||
if (Objects.equals(portTerminal.getStatus(), STATUS_DISABLED) && CATEGORY_PORT.equals(portTerminal.getCategory())) {
|
||||
validateEnabledTerminal(portTerminal.getId());
|
||||
}
|
||||
}
|
||||
|
||||
private void validateUniqueCode(PortTerminal portTerminal) {
|
||||
LambdaQueryWrapper<PortTerminal> queryWrapper = Wrappers.<PortTerminal>lambdaQuery()
|
||||
.eq(PortTerminal::getCode, portTerminal.getCode())
|
||||
.eq(PortTerminal::getIsDeleted, 0);
|
||||
if (Func.isNotEmpty(portTerminal.getId())) {
|
||||
queryWrapper.ne(PortTerminal::getId, portTerminal.getId());
|
||||
}
|
||||
if (count(queryWrapper) > 0L) {
|
||||
throw new ServiceException("该编码已存在");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateEnabledTerminal(Long parentId) {
|
||||
if (Func.isEmpty(parentId)) {
|
||||
return;
|
||||
}
|
||||
long count = count(Wrappers.<PortTerminal>lambdaQuery()
|
||||
.eq(PortTerminal::getParentId, parentId)
|
||||
.eq(PortTerminal::getCategory, CATEGORY_TERMINAL)
|
||||
.eq(PortTerminal::getStatus, STATUS_ENABLED)
|
||||
.eq(PortTerminal::getIsDeleted, 0));
|
||||
if (count > 0L) {
|
||||
throw new ServiceException("该港口下存在已启用码头,请先停用码头");
|
||||
}
|
||||
}
|
||||
|
||||
private String trimToEmpty(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
|
||||
}
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.excel.RailwayStationExcel;
|
||||
import org.springblade.system.mapper.RailwayStationMapper;
|
||||
import org.springblade.system.pojo.entity.RailwayStation;
|
||||
import org.springblade.system.pojo.entity.Region;
|
||||
import org.springblade.system.pojo.vo.RailwayStationVO;
|
||||
import org.springblade.system.service.IRailwayStationService;
|
||||
import org.springblade.system.service.IRegionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMapper, RailwayStation> implements IRailwayStationService {
|
||||
|
||||
private static final String CODE_PREFIX = "TL";
|
||||
private static final String SOURCE_BATCH = "批量导入";
|
||||
private static final String SOURCE_MANUAL = "手工导入";
|
||||
private static final int STATUS_ENABLED = 1;
|
||||
private static final int STATUS_DISABLED = 2;
|
||||
private static final int REMARK_MAX_LENGTH = 200;
|
||||
private static final Pattern TMIS_CODE_PATTERN = Pattern.compile("^\\d{5}$");
|
||||
private static final Pattern TELEGRAPH_CODE_PATTERN = Pattern.compile("^[A-Z]{3}$");
|
||||
private static final BigDecimal MIN_LONGITUDE = BigDecimal.valueOf(-180);
|
||||
private static final BigDecimal MAX_LONGITUDE = BigDecimal.valueOf(180);
|
||||
private static final BigDecimal MIN_LATITUDE = BigDecimal.valueOf(-90);
|
||||
private static final BigDecimal MAX_LATITUDE = BigDecimal.valueOf(90);
|
||||
|
||||
private final IRegionService regionService;
|
||||
|
||||
@Override
|
||||
public IPage<RailwayStationVO> selectRailwayStationPage(IPage<RailwayStationVO> page, RailwayStationVO railwayStation) {
|
||||
return page.setRecords(baseMapper.selectRailwayStationPage(page, railwayStation));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(RailwayStation railwayStation) {
|
||||
prepare(railwayStation, SOURCE_MANUAL);
|
||||
validate(railwayStation);
|
||||
return saveOrUpdate(railwayStation);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean changeStatus(Long id, Integer status) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
RailwayStation railwayStation = getById(id);
|
||||
if (Func.isEmpty(railwayStation)) {
|
||||
throw new ServiceException("铁路车站不存在");
|
||||
}
|
||||
if (!Objects.equals(status, STATUS_ENABLED) && !Objects.equals(status, STATUS_DISABLED)) {
|
||||
throw new ServiceException("启停状态不正确");
|
||||
}
|
||||
RailwayStation update = new RailwayStation();
|
||||
update.setId(id);
|
||||
update.setStatus(status);
|
||||
return updateById(update);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importRailwayStation(List<RailwayStationExcel> data) {
|
||||
List<String> errorList = new ArrayList<>();
|
||||
for (int index = 0; index < data.size(); index++) {
|
||||
RailwayStationExcel excel = data.get(index);
|
||||
try {
|
||||
RailwayStation railwayStation = Objects.requireNonNull(BeanUtil.copyProperties(excel, RailwayStation.class));
|
||||
railwayStation.setDataSource(SOURCE_BATCH);
|
||||
railwayStation.setStatus(STATUS_ENABLED);
|
||||
prepare(railwayStation, SOURCE_BATCH);
|
||||
validate(railwayStation);
|
||||
save(railwayStation);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
errorList.add("第" + (index + 2) + "行:" + message);
|
||||
}
|
||||
}
|
||||
if (Func.isNotEmpty(errorList)) {
|
||||
throw new ServiceException(String.join(";", errorList));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RailwayStationExcel> exportRailwayStation(Wrapper<RailwayStation> queryWrapper) {
|
||||
List<RailwayStation> railwayStationList = list(queryWrapper);
|
||||
return railwayStationList.stream().map(railwayStation -> {
|
||||
RailwayStationExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationExcel.class));
|
||||
excel.setStatusName(Objects.equals(railwayStation.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private void prepare(RailwayStation railwayStation, String defaultDataSource) {
|
||||
railwayStation.setTmisCode(trimToEmpty(railwayStation.getTmisCode()));
|
||||
railwayStation.setCode(CODE_PREFIX + railwayStation.getTmisCode());
|
||||
railwayStation.setTelegraphCode(trimToEmpty(railwayStation.getTelegraphCode()).toUpperCase(Locale.ROOT));
|
||||
railwayStation.setName(trimToEmpty(railwayStation.getName()));
|
||||
railwayStation.setRailwayLine(trimToNull(railwayStation.getRailwayLine()));
|
||||
railwayStation.setProvinceCode(trimToNull(railwayStation.getProvinceCode()));
|
||||
railwayStation.setProvinceName(trimToNull(railwayStation.getProvinceName()));
|
||||
railwayStation.setCityCode(trimToNull(railwayStation.getCityCode()));
|
||||
railwayStation.setCityName(trimToNull(railwayStation.getCityName()));
|
||||
railwayStation.setRemark(trimToNull(railwayStation.getRemark()));
|
||||
railwayStation.setDataSource(Func.toStrWithEmpty(railwayStation.getDataSource(), defaultDataSource));
|
||||
if (Func.isEmpty(railwayStation.getStatus())) {
|
||||
railwayStation.setStatus(STATUS_ENABLED);
|
||||
}
|
||||
fillRegion(railwayStation);
|
||||
}
|
||||
|
||||
private void validate(RailwayStation railwayStation) {
|
||||
if (Func.isEmpty(railwayStation.getTmisCode())) {
|
||||
throw new ServiceException("TMIS国标编码不能为空");
|
||||
}
|
||||
if (!TMIS_CODE_PATTERN.matcher(railwayStation.getTmisCode()).matches()) {
|
||||
throw new ServiceException("TMIS国标编码为5位数字");
|
||||
}
|
||||
if (Func.isEmpty(railwayStation.getTelegraphCode())) {
|
||||
throw new ServiceException("电报码不能为空");
|
||||
}
|
||||
if (!TELEGRAPH_CODE_PATTERN.matcher(railwayStation.getTelegraphCode()).matches()) {
|
||||
throw new ServiceException("电报码为3位大写字母");
|
||||
}
|
||||
if (Func.isEmpty(railwayStation.getName())) {
|
||||
throw new ServiceException("车站名称不能为空");
|
||||
}
|
||||
if (Func.isEmpty(railwayStation.getProvinceCode()) || Func.isEmpty(railwayStation.getCityCode())) {
|
||||
throw new ServiceException("请选择省份和城市");
|
||||
}
|
||||
validateCoordinate(railwayStation.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度");
|
||||
validateCoordinate(railwayStation.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度");
|
||||
if (Func.isNotEmpty(railwayStation.getRemark()) && railwayStation.getRemark().length() > REMARK_MAX_LENGTH) {
|
||||
throw new ServiceException("备注不能超过200字");
|
||||
}
|
||||
validateUnique(railwayStation, RailwayStation::getTmisCode, railwayStation.getTmisCode(), "该TMIS编码已存在");
|
||||
validateUnique(railwayStation, RailwayStation::getTelegraphCode, railwayStation.getTelegraphCode(), "该电报码已存在");
|
||||
validateUnique(railwayStation, RailwayStation::getCode, railwayStation.getCode(), "该编码已存在");
|
||||
}
|
||||
|
||||
private void fillRegion(RailwayStation railwayStation) {
|
||||
Region province = null;
|
||||
if (Func.isNotEmpty(railwayStation.getProvinceCode())) {
|
||||
province = regionService.getById(railwayStation.getProvinceCode());
|
||||
}
|
||||
if (Func.isEmpty(province) && Func.isNotEmpty(railwayStation.getProvinceName())) {
|
||||
province = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
||||
.eq(Region::getParentCode, "00")
|
||||
.eq(Region::getName, railwayStation.getProvinceName()), false);
|
||||
}
|
||||
if (Func.isEmpty(province)) {
|
||||
throw new ServiceException("请选择省份");
|
||||
}
|
||||
|
||||
Region city = null;
|
||||
if (Func.isNotEmpty(railwayStation.getCityCode())) {
|
||||
city = regionService.getById(railwayStation.getCityCode());
|
||||
}
|
||||
if (Func.isEmpty(city) && Func.isNotEmpty(railwayStation.getCityName())) {
|
||||
city = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
||||
.eq(Region::getParentCode, province.getCode())
|
||||
.eq(Region::getName, railwayStation.getCityName()), false);
|
||||
}
|
||||
if (Func.isEmpty(city)) {
|
||||
throw new ServiceException("请选择城市");
|
||||
}
|
||||
if (!Objects.equals(city.getParentCode(), province.getCode())) {
|
||||
throw new ServiceException("所属城市与所属省份不匹配");
|
||||
}
|
||||
railwayStation.setProvinceCode(province.getCode());
|
||||
railwayStation.setProvinceName(province.getName());
|
||||
railwayStation.setCityCode(city.getCode());
|
||||
railwayStation.setCityName(city.getName());
|
||||
}
|
||||
|
||||
private void validateCoordinate(BigDecimal value, BigDecimal min, BigDecimal max, String name) {
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
if (value.compareTo(min) < 0 || value.compareTo(max) > 0) {
|
||||
throw new ServiceException(name + "范围不正确");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateUnique(RailwayStation railwayStation, com.baomidou.mybatisplus.core.toolkit.support.SFunction<RailwayStation, ?> column, String value, String message) {
|
||||
LambdaQueryWrapper<RailwayStation> queryWrapper = Wrappers.<RailwayStation>lambdaQuery()
|
||||
.eq(column, value)
|
||||
.eq(RailwayStation::getIsDeleted, 0);
|
||||
if (Func.isNotEmpty(railwayStation.getId())) {
|
||||
queryWrapper.ne(RailwayStation::getId, railwayStation.getId());
|
||||
}
|
||||
if (count(queryWrapper) > 0L) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
private String trimToEmpty(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
|
||||
private String trimToNull(String value) {
|
||||
String trimValue = trimToEmpty(value);
|
||||
return trimValue.isEmpty() ? null : trimValue;
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.pojo.entity.AirportMaster;
|
||||
import org.springblade.system.pojo.vo.AirportMasterVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 空港机场主数据包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class AirportMasterWrapper extends BaseEntityWrapper<AirportMaster, AirportMasterVO> {
|
||||
|
||||
public static AirportMasterWrapper build() {
|
||||
return new AirportMasterWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AirportMasterVO entityVO(AirportMaster airportMaster) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.pojo.entity.PortTerminal;
|
||||
import org.springblade.system.pojo.vo.PortTerminalVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 港口码头主数据包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class PortTerminalWrapper extends BaseEntityWrapper<PortTerminal, PortTerminalVO> {
|
||||
|
||||
public static PortTerminalWrapper build() {
|
||||
return new PortTerminalWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PortTerminalVO entityVO(PortTerminal portTerminal) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.pojo.entity.RailwayStation;
|
||||
import org.springblade.system.pojo.vo.RailwayStationVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 铁路车站主数据包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class RailwayStationWrapper extends BaseEntityWrapper<RailwayStation, RailwayStationVO> {
|
||||
|
||||
public static RailwayStationWrapper build() {
|
||||
return new RailwayStationWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RailwayStationVO entityVO(RailwayStation railwayStation) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
FROM ${docker.base.image}
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
|
||||
RUN mkdir -p /blade/transport
|
||||
|
||||
WORKDIR /blade/transport
|
||||
|
||||
EXPOSE 8110
|
||||
|
||||
COPY ./target/blade-transport.jar ./app.jar
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=prod"]
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>blade-transport</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-core-boot</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-starter-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-transport-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>${docker.fabric.skip}</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport;
|
||||
|
||||
import org.springblade.core.cloud.client.BladeCloudApplication;
|
||||
import org.springblade.core.launch.BladeApplication;
|
||||
|
||||
/**
|
||||
* 运输服务启动器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@BladeCloudApplication
|
||||
public class TransportApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
BladeApplication.run("blade-transport", TransportApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springblade.transport.pojo.vo.MaintenancePlanVO;
|
||||
import org.springblade.transport.service.IMaintenancePlanService;
|
||||
import org.springblade.transport.wrapper.MaintenancePlanWrapper;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 车辆保养计划 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "maintenance_plan")
|
||||
@RequestMapping("/maintenance-plan")
|
||||
@Tag(name = "车辆保养计划", description = "车辆保养计划")
|
||||
public class MaintenancePlanController extends BladeController {
|
||||
|
||||
private final IMaintenancePlanService maintenancePlanService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入maintenancePlan")
|
||||
public R<MaintenancePlanVO> detail(MaintenancePlan maintenancePlan) {
|
||||
MaintenancePlan detail = maintenancePlanService.getOne(Condition.getQueryWrapper(maintenancePlan));
|
||||
return R.data(MaintenancePlanWrapper.build().entityVO(detail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入maintenancePlan")
|
||||
public R<IPage<MaintenancePlanVO>> list(MaintenancePlanVO maintenancePlan, Query query) {
|
||||
IPage<MaintenancePlanVO> pages = maintenancePlanService.selectMaintenancePlanPage(Condition.getPage(query), maintenancePlan);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入maintenancePlan")
|
||||
public R submit(@Valid @RequestBody MaintenancePlan maintenancePlan) {
|
||||
if (Func.isEmpty(maintenancePlan.getMileageUnit())) {
|
||||
maintenancePlan.setMileageUnit("船舶".equals(maintenancePlan.getVehicleType()) ? "海里" : "公里");
|
||||
}
|
||||
return R.status(maintenancePlanService.saveOrUpdate(maintenancePlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(maintenancePlanService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
import org.springblade.transport.service.IMaintenanceRecordService;
|
||||
import org.springblade.transport.wrapper.MaintenanceRecordWrapper;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 车辆维修记录 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "maintenance_record")
|
||||
@RequestMapping("/maintenance-record")
|
||||
@Tag(name = "车辆维修记录", description = "车辆维修记录")
|
||||
public class MaintenanceRecordController extends BladeController {
|
||||
|
||||
private final IMaintenanceRecordService maintenanceRecordService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入maintenanceRecord")
|
||||
public R<MaintenanceRecordVO> detail(MaintenanceRecord maintenanceRecord) {
|
||||
MaintenanceRecord detail = maintenanceRecordService.getOne(Condition.getQueryWrapper(maintenanceRecord));
|
||||
return R.data(MaintenanceRecordWrapper.build().entityVO(detail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入maintenanceRecord")
|
||||
public R<IPage<MaintenanceRecordVO>> list(MaintenanceRecordVO maintenanceRecord, Query query) {
|
||||
IPage<MaintenanceRecordVO> pages = maintenanceRecordService.selectMaintenanceRecordPage(Condition.getPage(query), maintenanceRecord);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入maintenanceRecord")
|
||||
public R submit(@Valid @RequestBody MaintenanceRecord maintenanceRecord) {
|
||||
if (Func.isEmpty(maintenanceRecord.getMileageUnit())) {
|
||||
maintenanceRecord.setMileageUnit("船舶".equals(maintenanceRecord.getVehicleType()) ? "海里" : "公里");
|
||||
}
|
||||
return R.status(maintenanceRecordService.saveOrUpdate(maintenanceRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(maintenanceRecordService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springblade.transport.pojo.vo.MaintenancePlanVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆保养计划 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface MaintenancePlanMapper extends BaseMapper<MaintenancePlan> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param maintenancePlan 查询参数
|
||||
* @return 保养计划列表
|
||||
*/
|
||||
List<MaintenancePlanVO> selectMaintenancePlanPage(IPage<MaintenancePlanVO> page, MaintenancePlanVO maintenancePlan);
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.transport.mapper.MaintenancePlanMapper">
|
||||
|
||||
<resultMap id="maintenancePlanResultMap" type="org.springblade.transport.pojo.vo.MaintenancePlanVO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="vehicle_type" property="vehicleType"/>
|
||||
<result column="vehicle_no" property="vehicleNo"/>
|
||||
<result column="maintainer" property="maintainer"/>
|
||||
<result column="maintenance_time" property="maintenanceTime"/>
|
||||
<result column="mileage" property="mileage"/>
|
||||
<result column="mileage_unit" property="mileageUnit"/>
|
||||
<result column="maintenance_item" property="maintenanceItem"/>
|
||||
<result column="cost" property="cost"/>
|
||||
<result column="store_name" property="storeName"/>
|
||||
<result column="contact_phone" property="contactPhone"/>
|
||||
<result column="address" property="address"/>
|
||||
<result column="next_maintenance_time" property="nextMaintenanceTime"/>
|
||||
<result column="next_maintenance_mileage" property="nextMaintenanceMileage"/>
|
||||
<result column="attachments" property="attachments"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMaintenancePlanPage" resultMap="maintenancePlanResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
blade_vehicle_maintenance_plan
|
||||
WHERE
|
||||
is_deleted = 0
|
||||
<if test="maintenancePlan.vehicleType != null and maintenancePlan.vehicleType != ''">
|
||||
AND vehicle_type = #{maintenancePlan.vehicleType}
|
||||
</if>
|
||||
<if test="maintenancePlan.vehicleNo != null and maintenancePlan.vehicleNo != ''">
|
||||
<bind name="vehicleNoLike" value="'%' + maintenancePlan.vehicleNo + '%'"/>
|
||||
AND vehicle_no LIKE #{vehicleNoLike}
|
||||
</if>
|
||||
<if test="maintenancePlan.createTimeStart != null and maintenancePlan.createTimeStart != ''">
|
||||
AND create_time >= #{maintenancePlan.createTimeStart}
|
||||
</if>
|
||||
<if test="maintenancePlan.createTimeEnd != null and maintenancePlan.createTimeEnd != ''">
|
||||
AND create_time <= #{maintenancePlan.createTimeEnd}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆维修记录 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface MaintenanceRecordMapper extends BaseMapper<MaintenanceRecord> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param maintenanceRecord 查询参数
|
||||
* @return 维修记录列表
|
||||
*/
|
||||
List<MaintenanceRecordVO> selectMaintenanceRecordPage(IPage<MaintenanceRecordVO> page, MaintenanceRecordVO maintenanceRecord);
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.transport.mapper.MaintenanceRecordMapper">
|
||||
|
||||
<resultMap id="maintenanceRecordResultMap" type="org.springblade.transport.pojo.vo.MaintenanceRecordVO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="vehicle_type" property="vehicleType"/>
|
||||
<result column="vehicle_no" property="vehicleNo"/>
|
||||
<result column="maintainer" property="maintainer"/>
|
||||
<result column="maintenance_time" property="maintenanceTime"/>
|
||||
<result column="location" property="location"/>
|
||||
<result column="replaced_part" property="replacedPart"/>
|
||||
<result column="cost" property="cost"/>
|
||||
<result column="company" property="company"/>
|
||||
<result column="contact" property="contact"/>
|
||||
<result column="address" property="address"/>
|
||||
<result column="factory_time" property="factoryTime"/>
|
||||
<result column="mileage" property="mileage"/>
|
||||
<result column="mileage_unit" property="mileageUnit"/>
|
||||
<result column="attachments" property="attachments"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMaintenanceRecordPage" resultMap="maintenanceRecordResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
blade_vehicle_maintenance_record
|
||||
WHERE
|
||||
is_deleted = 0
|
||||
<if test="maintenanceRecord.vehicleType != null and maintenanceRecord.vehicleType != ''">
|
||||
AND vehicle_type = #{maintenanceRecord.vehicleType}
|
||||
</if>
|
||||
<if test="maintenanceRecord.vehicleNo != null and maintenanceRecord.vehicleNo != ''">
|
||||
<bind name="vehicleNoLike" value="'%' + maintenanceRecord.vehicleNo + '%'"/>
|
||||
AND vehicle_no LIKE #{vehicleNoLike}
|
||||
</if>
|
||||
<if test="maintenanceRecord.createTimeStart != null and maintenanceRecord.createTimeStart != ''">
|
||||
AND create_time >= #{maintenanceRecord.createTimeStart}
|
||||
</if>
|
||||
<if test="maintenanceRecord.createTimeEnd != null and maintenanceRecord.createTimeEnd != ''">
|
||||
AND create_time <= #{maintenanceRecord.createTimeEnd}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springblade.transport.pojo.vo.MaintenancePlanVO;
|
||||
|
||||
/**
|
||||
* 车辆保养计划 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IMaintenancePlanService extends BaseService<MaintenancePlan> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param maintenancePlan 查询参数
|
||||
* @return 保养计划分页
|
||||
*/
|
||||
IPage<MaintenancePlanVO> selectMaintenancePlanPage(IPage<MaintenancePlanVO> page, MaintenancePlanVO maintenancePlan);
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
|
||||
/**
|
||||
* 车辆维修记录 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IMaintenanceRecordService extends BaseService<MaintenanceRecord> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param maintenanceRecord 查询参数
|
||||
* @return 维修记录分页
|
||||
*/
|
||||
IPage<MaintenanceRecordVO> selectMaintenanceRecordPage(IPage<MaintenanceRecordVO> page, MaintenanceRecordVO maintenanceRecord);
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.transport.mapper.MaintenancePlanMapper;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springblade.transport.pojo.vo.MaintenancePlanVO;
|
||||
import org.springblade.transport.service.IMaintenancePlanService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 车辆保养计划 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class MaintenancePlanServiceImpl extends BaseServiceImpl<MaintenancePlanMapper, MaintenancePlan> implements IMaintenancePlanService {
|
||||
|
||||
@Override
|
||||
public IPage<MaintenancePlanVO> selectMaintenancePlanPage(IPage<MaintenancePlanVO> page, MaintenancePlanVO maintenancePlan) {
|
||||
return page.setRecords(baseMapper.selectMaintenancePlanPage(page, maintenancePlan));
|
||||
}
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.transport.mapper.MaintenanceRecordMapper;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
import org.springblade.transport.service.IMaintenanceRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 车辆维修记录 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRecordMapper, MaintenanceRecord> implements IMaintenanceRecordService {
|
||||
|
||||
@Override
|
||||
public IPage<MaintenanceRecordVO> selectMaintenanceRecordPage(IPage<MaintenanceRecordVO> page, MaintenanceRecordVO maintenanceRecord) {
|
||||
return page.setRecords(baseMapper.selectMaintenanceRecordPage(page, maintenanceRecord));
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springblade.transport.pojo.vo.MaintenancePlanVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 车辆保养计划包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class MaintenancePlanWrapper extends BaseEntityWrapper<MaintenancePlan, MaintenancePlanVO> {
|
||||
|
||||
public static MaintenancePlanWrapper build() {
|
||||
return new MaintenancePlanWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaintenancePlanVO entityVO(MaintenancePlan maintenancePlan) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(maintenancePlan, MaintenancePlanVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 车辆维修记录包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class MaintenanceRecordWrapper extends BaseEntityWrapper<MaintenanceRecord, MaintenanceRecordVO> {
|
||||
|
||||
public static MaintenanceRecordWrapper build() {
|
||||
return new MaintenanceRecordWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaintenanceRecordVO entityVO(MaintenanceRecord maintenanceRecord) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(maintenanceRecord, MaintenanceRecordVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#服务器端口
|
||||
server:
|
||||
port: 8110
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
@@ -0,0 +1,10 @@
|
||||
#服务器端口
|
||||
server:
|
||||
port: 8110
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.prod.url}
|
||||
username: ${blade.datasource.prod.username}
|
||||
password: ${blade.datasource.prod.password}
|
||||
@@ -0,0 +1,10 @@
|
||||
#服务器端口
|
||||
server:
|
||||
port: 8110
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.test.url}
|
||||
username: ${blade.datasource.test.username}
|
||||
password: ${blade.datasource.test.password}
|
||||
@@ -19,6 +19,7 @@
|
||||
<modules>
|
||||
<module>blade-desk</module>
|
||||
<module>blade-system</module>
|
||||
<module>blade-transport</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -46,7 +46,7 @@ blade:
|
||||
datasource:
|
||||
dev:
|
||||
# MySql
|
||||
url: jdbc:mysql://localhost:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||
url: jdbc:mysql://localhost:3306/transport?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
# PostgreSQL
|
||||
|
||||
@@ -5,9 +5,9 @@ spring:
|
||||
##redis 单机环境配置
|
||||
##将docker脚本部署的redis服务映射为宿主机ip
|
||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||
host: 192.168.0.188
|
||||
port: 3379
|
||||
password:
|
||||
host: 172.16.203.228
|
||||
port: 6379
|
||||
password: redis_G3BmPA
|
||||
database: 0
|
||||
ssl:
|
||||
enabled: false
|
||||
@@ -38,10 +38,10 @@ blade:
|
||||
enabled: false
|
||||
##将docker脚本部署的redis服务映射为宿主机ip
|
||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||
address: redis://192.168.0.188:3379
|
||||
address: redis://172.16.203.228:6379
|
||||
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
|
||||
datasource:
|
||||
prod:
|
||||
url: jdbc:mysql://192.168.0.188:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://172.16.203.228:3306/transport?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||
username: transport
|
||||
password: ab3acJYSC8A4ySpk
|
||||
|
||||
@@ -119,7 +119,7 @@ blade:
|
||||
#oauth2配置
|
||||
oauth2:
|
||||
#启用 oauth2
|
||||
enabled: true
|
||||
enabled: false
|
||||
#使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2验签,需和前端保持一致
|
||||
public-key: ${BLADE_OAUTH2_PUBLIC_KEY}
|
||||
#使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2解密,前端无需配置
|
||||
@@ -133,9 +133,9 @@ blade:
|
||||
#单用户登录范围
|
||||
single-level: all
|
||||
#token签名 使用blade-auth服务 @org.springblade.test.SignKeyGenerator 获取
|
||||
sign-key: ${BLADE_TOKEN_SIGN_KEY}
|
||||
sign-key: 9Jc5LMDJ28CHggO9X030ZnL85BlbzC0n
|
||||
#token加密 使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取
|
||||
crypto-key: ${BLADE_TOKEN_CRYPTO_KEY}
|
||||
crypto-key: NWmP0cuIWAfL6GPeLJlbY8898b5iPk1y
|
||||
#超级密钥配置
|
||||
key:
|
||||
#启用超级密钥
|
||||
@@ -147,11 +147,11 @@ blade:
|
||||
#报文加密配置
|
||||
crypto:
|
||||
#启用报文加密配置
|
||||
enabled: false
|
||||
enabled: true
|
||||
#使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
|
||||
aes-key: ${BLADE_API_CRYPTO_AES_KEY}
|
||||
aes-key: gLJvoZfX9pOp3nkIdQ9U2DzxlzsrTvJC
|
||||
#使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
|
||||
des-key: ${BLADE_API_CRYPTO_DES_KEY}
|
||||
des-key: hdlxNCD2KZI91Taq
|
||||
#jackson配置
|
||||
jackson:
|
||||
#null自动转空值
|
||||
|
||||
@@ -13,6 +13,20 @@
|
||||
"filters": [],
|
||||
"uri": "lb://blade-desk-me"
|
||||
},
|
||||
{
|
||||
"id": "transport-route",
|
||||
"order": 0,
|
||||
"predicates": [
|
||||
{
|
||||
"name": "Path",
|
||||
"args": {
|
||||
"pattern": "/blade-transport/**"
|
||||
}
|
||||
}
|
||||
],
|
||||
"filters": [],
|
||||
"uri": "lb://blade-transport"
|
||||
},
|
||||
{
|
||||
"id": "example-route",
|
||||
"order": 0,
|
||||
|
||||
@@ -6304,3 +6304,166 @@ INSERT INTO "BLADEX"."BLADE_USER_DEPT"("ID","USER_ID","DEPT_ID","STATUS","IS_DEL
|
||||
INSERT INTO "BLADEX"."BLADE_USER_DEPT"("ID","USER_ID","DEPT_ID","STATUS","IS_DELETED") VALUES(1203503653323923458,1123598821738675202,1123598813738675202,1,0);
|
||||
INSERT INTO "BLADEX"."BLADE_USER_DEPT"("ID","USER_ID","DEPT_ID","STATUS","IS_DELETED") VALUES(1203503663402835969,1123598821738675203,1123598813738675202,1,0);
|
||||
INSERT INTO "BLADEX"."BLADE_USER_DEPT"("ID","USER_ID","DEPT_ID","STATUS","IS_DELETED") VALUES(1203503672911323137,1123598821738675204,1123598813738675202,1,0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_VEHICLE_MAINTENANCE_PLAN
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADEX"."BLADE_VEHICLE_MAINTENANCE_PLAN" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"TENANT_ID" NVARCHAR2(12) DEFAULT '000000',
|
||||
"VEHICLE_TYPE" NVARCHAR2(20) NOT NULL,
|
||||
"VEHICLE_NO" NVARCHAR2(30) NOT NULL,
|
||||
"MAINTAINER" NVARCHAR2(20),
|
||||
"MAINTENANCE_TIME" DATE NOT NULL,
|
||||
"MILEAGE" NUMBER(18,2),
|
||||
"MILEAGE_UNIT" NVARCHAR2(10) DEFAULT '公里',
|
||||
"MAINTENANCE_ITEM" NVARCHAR2(100),
|
||||
"COST" NUMBER(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"STORE_NAME" NVARCHAR2(50),
|
||||
"CONTACT_PHONE" NVARCHAR2(20),
|
||||
"ADDRESS" NVARCHAR2(100),
|
||||
"NEXT_MAINTENANCE_TIME" DATE,
|
||||
"NEXT_MAINTENANCE_MILEAGE" NUMBER(18,2),
|
||||
"ATTACHMENTS" CLOB,
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_VEHICLE_MAINTENANCE_PLAN" PRIMARY KEY ("ID")
|
||||
);
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_PLAN_NO" ON "BLADEX"."BLADE_VEHICLE_MAINTENANCE_PLAN" ("VEHICLE_NO");
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_PLAN_TIME" ON "BLADEX"."BLADE_VEHICLE_MAINTENANCE_PLAN" ("MAINTENANCE_TIME");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_VEHICLE_MAINTENANCE_RECORD
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADEX"."BLADE_VEHICLE_MAINTENANCE_RECORD" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"TENANT_ID" NVARCHAR2(12) DEFAULT '000000',
|
||||
"VEHICLE_TYPE" NVARCHAR2(20) NOT NULL,
|
||||
"VEHICLE_NO" NVARCHAR2(30) NOT NULL,
|
||||
"MAINTAINER" NVARCHAR2(20),
|
||||
"MAINTENANCE_TIME" DATE NOT NULL,
|
||||
"LOCATION" NVARCHAR2(100),
|
||||
"REPLACED_PART" NVARCHAR2(200),
|
||||
"COST" NUMBER(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"COMPANY" NVARCHAR2(50),
|
||||
"CONTACT" NVARCHAR2(20),
|
||||
"ADDRESS" NVARCHAR2(100),
|
||||
"FACTORY_TIME" DATE,
|
||||
"MILEAGE" NUMBER(18,2),
|
||||
"MILEAGE_UNIT" NVARCHAR2(10) DEFAULT '公里',
|
||||
"ATTACHMENTS" CLOB,
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_VEHICLE_MAINTENANCE_RECORD" PRIMARY KEY ("ID")
|
||||
);
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_RECORD_NO" ON "BLADEX"."BLADE_VEHICLE_MAINTENANCE_RECORD" ("VEHICLE_NO");
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_RECORD_TIME" ON "BLADEX"."BLADE_VEHICLE_MAINTENANCE_RECORD" ("MAINTENANCE_TIME");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_PORT_TERMINAL
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADEX"."BLADE_PORT_TERMINAL" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(30) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"CATEGORY" NVARCHAR2(20) NOT NULL,
|
||||
"PARENT_ID" NUMBER(20,0),
|
||||
"PARENT_CODE" NVARCHAR2(30),
|
||||
"PARENT_NAME" NVARCHAR2(100),
|
||||
"COUNTRY" NVARCHAR2(50),
|
||||
"CITY" NVARCHAR2(50),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_PORT_TERMINAL" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_PORT_TERMINAL_CODE" UNIQUE ("CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_PARENT" ON "BLADEX"."BLADE_PORT_TERMINAL" ("PARENT_ID");
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_CATEGORY" ON "BLADEX"."BLADE_PORT_TERMINAL" ("CATEGORY");
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_REGION" ON "BLADEX"."BLADE_PORT_TERMINAL" ("COUNTRY", "CITY");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_RAILWAY_STATION
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADEX"."BLADE_RAILWAY_STATION" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(20) NOT NULL,
|
||||
"TMIS_CODE" NVARCHAR2(5) NOT NULL,
|
||||
"TELEGRAPH_CODE" NVARCHAR2(3) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"RAILWAY_LINE" NVARCHAR2(100),
|
||||
"PROVINCE_CODE" NVARCHAR2(12),
|
||||
"PROVINCE_NAME" NVARCHAR2(128),
|
||||
"CITY_CODE" NVARCHAR2(12),
|
||||
"CITY_NAME" NVARCHAR2(128),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(200),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_RAILWAY_STATION" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_CODE" UNIQUE ("CODE"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_TMIS" UNIQUE ("TMIS_CODE"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_TELEGRAPH" UNIQUE ("TELEGRAPH_CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_RAILWAY_STATION_REGION" ON "BLADEX"."BLADE_RAILWAY_STATION" ("PROVINCE_CODE", "CITY_CODE");
|
||||
CREATE INDEX "IDX_RAILWAY_STATION_STATUS" ON "BLADEX"."BLADE_RAILWAY_STATION" ("STATUS");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_AIRPORT_MASTER
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADEX"."BLADE_AIRPORT_MASTER" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(20) NOT NULL,
|
||||
"IATA_CODE" NVARCHAR2(3) NOT NULL,
|
||||
"ICAO_CODE" NVARCHAR2(4) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"SHORT_NAME" NVARCHAR2(100),
|
||||
"PROVINCE_CODE" NVARCHAR2(12),
|
||||
"PROVINCE_NAME" NVARCHAR2(128),
|
||||
"CITY_CODE" NVARCHAR2(12),
|
||||
"CITY_NAME" NVARCHAR2(128),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(200),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_AIRPORT_MASTER" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_CODE" UNIQUE ("CODE"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_IATA" UNIQUE ("IATA_CODE"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_ICAO" UNIQUE ("ICAO_CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_AIRPORT_MASTER_REGION" ON "BLADEX"."BLADE_AIRPORT_MASTER" ("PROVINCE_CODE", "CITY_CODE");
|
||||
CREATE INDEX "IDX_AIRPORT_MASTER_STATUS" ON "BLADEX"."BLADE_AIRPORT_MASTER" ("STATUS");
|
||||
|
||||
@@ -2330,3 +2330,171 @@ ALTER TABLE "blade_user_other" ADD CONSTRAINT "blade_user_other_pkey" PRIMARY KE
|
||||
-- Primary Key structure for table blade_user_web
|
||||
-- ----------------------------
|
||||
ALTER TABLE "blade_user_web" ADD CONSTRAINT "blade_user_web_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_plan
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_vehicle_maintenance_plan";
|
||||
CREATE TABLE "blade_vehicle_maintenance_plan" (
|
||||
"id" int8 NOT NULL,
|
||||
"tenant_id" varchar(12) DEFAULT '000000',
|
||||
"vehicle_type" varchar(20) NOT NULL,
|
||||
"vehicle_no" varchar(30) NOT NULL,
|
||||
"maintainer" varchar(20),
|
||||
"maintenance_time" timestamp(6) NOT NULL,
|
||||
"mileage" numeric(18,2),
|
||||
"mileage_unit" varchar(10) DEFAULT '公里',
|
||||
"maintenance_item" varchar(100),
|
||||
"cost" numeric(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"store_name" varchar(50),
|
||||
"contact_phone" varchar(20),
|
||||
"address" varchar(100),
|
||||
"next_maintenance_time" timestamp(6),
|
||||
"next_maintenance_mileage" numeric(18,2),
|
||||
"attachments" text,
|
||||
"remark" varchar(500),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_vehicle_maintenance_plan_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
CREATE INDEX "idx_vehicle_maintenance_plan_no" ON "blade_vehicle_maintenance_plan" ("vehicle_no");
|
||||
CREATE INDEX "idx_vehicle_maintenance_plan_time" ON "blade_vehicle_maintenance_plan" ("maintenance_time");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_vehicle_maintenance_record";
|
||||
CREATE TABLE "blade_vehicle_maintenance_record" (
|
||||
"id" int8 NOT NULL,
|
||||
"tenant_id" varchar(12) DEFAULT '000000',
|
||||
"vehicle_type" varchar(20) NOT NULL,
|
||||
"vehicle_no" varchar(30) NOT NULL,
|
||||
"maintainer" varchar(20),
|
||||
"maintenance_time" timestamp(6) NOT NULL,
|
||||
"location" varchar(100),
|
||||
"replaced_part" varchar(200),
|
||||
"cost" numeric(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"company" varchar(50),
|
||||
"contact" varchar(20),
|
||||
"address" varchar(100),
|
||||
"factory_time" timestamp(6),
|
||||
"mileage" numeric(18,2),
|
||||
"mileage_unit" varchar(10) DEFAULT '公里',
|
||||
"attachments" text,
|
||||
"remark" varchar(500),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_vehicle_maintenance_record_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
CREATE INDEX "idx_vehicle_maintenance_record_no" ON "blade_vehicle_maintenance_record" ("vehicle_no");
|
||||
CREATE INDEX "idx_vehicle_maintenance_record_time" ON "blade_vehicle_maintenance_record" ("maintenance_time");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_port_terminal
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_port_terminal";
|
||||
CREATE TABLE "blade_port_terminal" (
|
||||
"id" int8 NOT NULL,
|
||||
"code" varchar(30) NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"category" varchar(20) NOT NULL,
|
||||
"parent_id" int8,
|
||||
"parent_code" varchar(30),
|
||||
"parent_name" varchar(100),
|
||||
"country" varchar(50),
|
||||
"city" varchar(50),
|
||||
"longitude" numeric(12,6),
|
||||
"latitude" numeric(12,6),
|
||||
"data_source" varchar(20) DEFAULT '手工导入',
|
||||
"remark" varchar(500),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_port_terminal_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "uk_port_terminal_code" UNIQUE ("code")
|
||||
);
|
||||
CREATE INDEX "idx_port_terminal_parent" ON "blade_port_terminal" ("parent_id");
|
||||
CREATE INDEX "idx_port_terminal_category" ON "blade_port_terminal" ("category");
|
||||
CREATE INDEX "idx_port_terminal_region" ON "blade_port_terminal" ("country", "city");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_railway_station
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_railway_station";
|
||||
CREATE TABLE "blade_railway_station" (
|
||||
"id" int8 NOT NULL,
|
||||
"code" varchar(20) NOT NULL,
|
||||
"tmis_code" varchar(5) NOT NULL,
|
||||
"telegraph_code" varchar(3) NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"railway_line" varchar(100),
|
||||
"province_code" varchar(12),
|
||||
"province_name" varchar(128),
|
||||
"city_code" varchar(12),
|
||||
"city_name" varchar(128),
|
||||
"longitude" numeric(12,6),
|
||||
"latitude" numeric(12,6),
|
||||
"data_source" varchar(20) DEFAULT '手工导入',
|
||||
"remark" varchar(200),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_railway_station_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "uk_railway_station_code" UNIQUE ("code"),
|
||||
CONSTRAINT "uk_railway_station_tmis" UNIQUE ("tmis_code"),
|
||||
CONSTRAINT "uk_railway_station_telegraph" UNIQUE ("telegraph_code")
|
||||
);
|
||||
CREATE INDEX "idx_railway_station_region" ON "blade_railway_station" ("province_code", "city_code");
|
||||
CREATE INDEX "idx_railway_station_status" ON "blade_railway_station" ("status");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_airport_master
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_airport_master";
|
||||
CREATE TABLE "blade_airport_master" (
|
||||
"id" int8 NOT NULL,
|
||||
"code" varchar(20) NOT NULL,
|
||||
"iata_code" varchar(3) NOT NULL,
|
||||
"icao_code" varchar(4) NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"short_name" varchar(100),
|
||||
"province_code" varchar(12),
|
||||
"province_name" varchar(128),
|
||||
"city_code" varchar(12),
|
||||
"city_name" varchar(128),
|
||||
"longitude" numeric(12,6),
|
||||
"latitude" numeric(12,6),
|
||||
"data_source" varchar(20) DEFAULT '手工导入',
|
||||
"remark" varchar(200),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_airport_master_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "uk_airport_master_code" UNIQUE ("code"),
|
||||
CONSTRAINT "uk_airport_master_iata" UNIQUE ("iata_code"),
|
||||
CONSTRAINT "uk_airport_master_icao" UNIQUE ("icao_code")
|
||||
);
|
||||
CREATE INDEX "idx_airport_master_region" ON "blade_airport_master" ("province_code", "city_code");
|
||||
CREATE INDEX "idx_airport_master_status" ON "blade_airport_master" ("status");
|
||||
|
||||
@@ -1376,4 +1376,230 @@ CREATE TABLE `blade_user_web` (
|
||||
BEGIN;
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_plan
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_vehicle_maintenance_plan`;
|
||||
CREATE TABLE `blade_vehicle_maintenance_plan` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`vehicle_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车船类型',
|
||||
`vehicle_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车牌号/船号',
|
||||
`maintainer` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '保养人',
|
||||
`maintenance_time` datetime NOT NULL COMMENT '保养时间',
|
||||
`mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`maintenance_item` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '保养项目',
|
||||
`cost` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '费用',
|
||||
`store_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '店名',
|
||||
`contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
|
||||
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
|
||||
`next_maintenance_time` datetime NULL DEFAULT NULL COMMENT '下次保养时间',
|
||||
`next_maintenance_mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '下次保养里程/航程',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_plan_no`(`vehicle_no`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_plan_time`(`maintenance_time`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆保养计划';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_vehicle_maintenance_record`;
|
||||
CREATE TABLE `blade_vehicle_maintenance_record` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`vehicle_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车船类型',
|
||||
`vehicle_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车牌号/船号',
|
||||
`maintainer` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修人',
|
||||
`maintenance_time` datetime NOT NULL COMMENT '维修时间',
|
||||
`location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修位置',
|
||||
`replaced_part` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更换零件',
|
||||
`cost` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '费用',
|
||||
`company` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修单位',
|
||||
`contact` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式',
|
||||
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
|
||||
`factory_time` datetime NULL DEFAULT NULL COMMENT '出厂时间',
|
||||
`mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_record_no`(`vehicle_no`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_record_time`(`maintenance_time`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆维修记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of blade_menu for vehicle maintenance
|
||||
-- ----------------------------
|
||||
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
|
||||
(1980000000000000001, 0, 'vehicle', '车辆管理', 'menu', '/vehicle', 'iconfont icon-qiche', 20, 1, 0, 1, '', NULL, 0),
|
||||
(1980000000000000002, 1980000000000000001, 'maintenance_plan', '保养计划', 'menu', '/vehicle/maintenance-plan', 'iconfont icon-baoyang', 1, 1, 0, 1, '', NULL, 0),
|
||||
(1980000000000000003, 1980000000000000002, 'maintenance_plan_add', '新增', 'add', '/vehicle/maintenance-plan/add', 'plus', 1, 2, 1, 1, '', NULL, 0),
|
||||
(1980000000000000004, 1980000000000000002, 'maintenance_plan_edit', '修改', 'edit', '/vehicle/maintenance-plan/edit', 'form', 2, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000005, 1980000000000000002, 'maintenance_plan_delete', '删除', 'delete', '/api/blade-transport/maintenance-plan/remove', 'delete', 3, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000006, 1980000000000000002, 'maintenance_plan_view', '查看', 'view', '/vehicle/maintenance-plan/view', 'file-text', 4, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000010, 1980000000000000001, 'maintenance_record', '维修记录', 'menu', '/vehicle/maintenance-record', 'iconfont icon-weixiu', 2, 1, 0, 1, '', NULL, 0),
|
||||
(1980000000000000011, 1980000000000000010, 'maintenance_record_add', '新增', 'add', '/vehicle/maintenance-record/add', 'plus', 1, 2, 1, 1, '', NULL, 0),
|
||||
(1980000000000000012, 1980000000000000010, 'maintenance_record_edit', '修改', 'edit', '/vehicle/maintenance-record/edit', 'form', 2, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000013, 1980000000000000010, 'maintenance_record_delete', '删除', 'delete', '/api/blade-transport/maintenance-record/remove', 'delete', 3, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000014, 1980000000000000010, 'maintenance_record_view', '查看', 'view', '/vehicle/maintenance-record/view', 'file-text', 4, 2, 2, 1, '', NULL, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_port_terminal
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_port_terminal`;
|
||||
CREATE TABLE `blade_port_terminal` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '港口/码头名称',
|
||||
`category` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
|
||||
`parent_id` bigint NULL DEFAULT NULL COMMENT '上级港口ID',
|
||||
`parent_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级港口编码',
|
||||
`parent_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级港口名称',
|
||||
`country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国家',
|
||||
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '城市',
|
||||
`longitude` decimal(12,6) NULL DEFAULT NULL COMMENT '经度',
|
||||
`latitude` decimal(12,6) NULL DEFAULT NULL COMMENT '纬度',
|
||||
`data_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '手工导入' COMMENT '数据来源',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_port_terminal_code`(`code`) USING BTREE,
|
||||
INDEX `idx_port_terminal_parent`(`parent_id`) USING BTREE,
|
||||
INDEX `idx_port_terminal_category`(`category`) USING BTREE,
|
||||
INDEX `idx_port_terminal_region`(`country`, `city`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '港口码头主数据';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of blade_menu for port terminal
|
||||
-- ----------------------------
|
||||
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
|
||||
(1980000000000000020, 1164733399668962201, 'port_terminal', '港口码头', 'menu', '/base/port-terminal', 'iconfont icon-fuwudiqiu', 2, 1, 0, 1, '', NULL, 0),
|
||||
(1980000000000000021, 1980000000000000020, 'port_terminal_add', '新增', 'add', '/base/port-terminal/add', 'plus', 1, 2, 1, 1, '', NULL, 0),
|
||||
(1980000000000000022, 1980000000000000020, 'port_terminal_edit', '修改', 'edit', '/base/port-terminal/edit', 'form', 2, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000023, 1980000000000000020, 'port_terminal_delete', '删除', 'delete', '/api/blade-system/port-terminal/remove', 'delete', 3, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000024, 1980000000000000020, 'port_terminal_view', '查看', 'view', '/base/port-terminal/view', 'file-text', 4, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000025, 1980000000000000020, 'port_terminal_import', '导入', 'import', '/api/blade-system/port-terminal/import-port-terminal', 'upload', 5, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000026, 1980000000000000020, 'port_terminal_template', '模板下载', 'template', '/api/blade-system/port-terminal/export-template', 'download', 6, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000027, 1980000000000000020, 'port_terminal_export', '导出', 'export', '/api/blade-system/port-terminal/export-port-terminal', 'download', 7, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000028, 1980000000000000020, 'port_terminal_status', '启停', 'status', '/api/blade-system/port-terminal/status', 'key', 8, 2, 2, 1, '', NULL, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_railway_station
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_railway_station`;
|
||||
CREATE TABLE `blade_railway_station` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
|
||||
`tmis_code` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'TMIS国标编码',
|
||||
`telegraph_code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '电报码',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车站名称',
|
||||
`railway_line` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属铁路线路',
|
||||
`province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份编码',
|
||||
`province_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份',
|
||||
`city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市编码',
|
||||
`city_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市',
|
||||
`longitude` decimal(12,6) NULL DEFAULT NULL COMMENT '经度',
|
||||
`latitude` decimal(12,6) NULL DEFAULT NULL COMMENT '纬度',
|
||||
`data_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '手工导入' COMMENT '数据来源',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_railway_station_code`(`code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_railway_station_tmis`(`tmis_code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_railway_station_telegraph`(`telegraph_code`) USING BTREE,
|
||||
INDEX `idx_railway_station_region`(`province_code`, `city_code`) USING BTREE,
|
||||
INDEX `idx_railway_station_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '铁路车站主数据';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of blade_menu for railway station
|
||||
-- ----------------------------
|
||||
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
|
||||
(1980000000000000030, 1164733399668962201, 'railway_station', '铁路车站', 'menu', '/base/railway-station', 'iconfont icon-fuwudiqiu', 3, 1, 0, 1, '', NULL, 0),
|
||||
(1980000000000000031, 1980000000000000030, 'railway_station_add', '新增', 'add', '/base/railway-station/add', 'plus', 1, 2, 1, 1, '', NULL, 0),
|
||||
(1980000000000000032, 1980000000000000030, 'railway_station_edit', '修改', 'edit', '/base/railway-station/edit', 'form', 2, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000033, 1980000000000000030, 'railway_station_delete', '删除', 'delete', '/api/blade-system/railway-station/remove', 'delete', 3, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000034, 1980000000000000030, 'railway_station_view', '查看', 'view', '/base/railway-station/view', 'file-text', 4, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000035, 1980000000000000030, 'railway_station_import', '导入', 'import', '/api/blade-system/railway-station/import-railway-station', 'upload', 5, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000036, 1980000000000000030, 'railway_station_template', '模板下载', 'template', '/api/blade-system/railway-station/export-template', 'download', 6, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000037, 1980000000000000030, 'railway_station_export', '导出', 'export', '/api/blade-system/railway-station/export-railway-station', 'download', 7, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000038, 1980000000000000030, 'railway_station_status', '启停', 'status', '/api/blade-system/railway-station/status', 'key', 8, 2, 2, 1, '', NULL, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_airport_master
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_airport_master`;
|
||||
CREATE TABLE `blade_airport_master` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
|
||||
`iata_code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IATA编码',
|
||||
`icao_code` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ICAO代码',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '机场标准名称',
|
||||
`short_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机场简称',
|
||||
`province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份编码',
|
||||
`province_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份',
|
||||
`city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市编码',
|
||||
`city_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市',
|
||||
`longitude` decimal(12,6) NULL DEFAULT NULL COMMENT '经度',
|
||||
`latitude` decimal(12,6) NULL DEFAULT NULL COMMENT '纬度',
|
||||
`data_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '手工导入' COMMENT '数据来源',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_airport_master_code`(`code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_airport_master_iata`(`iata_code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_airport_master_icao`(`icao_code`) USING BTREE,
|
||||
INDEX `idx_airport_master_region`(`province_code`, `city_code`) USING BTREE,
|
||||
INDEX `idx_airport_master_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '空港机场主数据';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of blade_menu for airport master
|
||||
-- ----------------------------
|
||||
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
|
||||
(1980000000000000040, 1164733399668962201, 'airport_master', '空港机场', 'menu', '/base/airport-master', 'iconfont icon-fuwudiqiu', 4, 1, 0, 1, '', NULL, 0),
|
||||
(1980000000000000041, 1980000000000000040, 'airport_master_add', '新增', 'add', '/base/airport-master/add', 'plus', 1, 2, 1, 1, '', NULL, 0),
|
||||
(1980000000000000042, 1980000000000000040, 'airport_master_edit', '修改', 'edit', '/base/airport-master/edit', 'form', 2, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000043, 1980000000000000040, 'airport_master_delete', '删除', 'delete', '/api/blade-system/airport-master/remove', 'delete', 3, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000044, 1980000000000000040, 'airport_master_view', '查看', 'view', '/base/airport-master/view', 'file-text', 4, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000045, 1980000000000000040, 'airport_master_import', '导入', 'import', '/api/blade-system/airport-master/import-airport-master', 'upload', 5, 2, 3, 1, '', NULL, 0),
|
||||
(1980000000000000046, 1980000000000000040, 'airport_master_template', '模板下载', 'template', '/api/blade-system/airport-master/export-template', 'download', 6, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000047, 1980000000000000040, 'airport_master_export', '导出', 'export', '/api/blade-system/airport-master/export-airport-master', 'download', 7, 2, 2, 1, '', NULL, 0),
|
||||
(1980000000000000048, 1980000000000000040, 'airport_master_status', '启停', 'status', '/api/blade-system/airport-master/status', 'key', 8, 2, 2, 1, '', NULL, 0);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -6538,3 +6538,166 @@ ALTER TABLE "BLADE_AUTH_LOG" ADD PRIMARY KEY("ID") ;
|
||||
ALTER TABLE "BLADE_API_KEY_LOG" ADD PRIMARY KEY("ID") ;
|
||||
|
||||
ALTER TABLE "BLADE_API_KEY" ADD PRIMARY KEY("ID") ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_VEHICLE_MAINTENANCE_PLAN
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_VEHICLE_MAINTENANCE_PLAN" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"TENANT_ID" NVARCHAR2(12) DEFAULT '000000',
|
||||
"VEHICLE_TYPE" NVARCHAR2(20) NOT NULL,
|
||||
"VEHICLE_NO" NVARCHAR2(30) NOT NULL,
|
||||
"MAINTAINER" NVARCHAR2(20),
|
||||
"MAINTENANCE_TIME" DATE NOT NULL,
|
||||
"MILEAGE" NUMBER(18,2),
|
||||
"MILEAGE_UNIT" NVARCHAR2(10) DEFAULT '公里',
|
||||
"MAINTENANCE_ITEM" NVARCHAR2(100),
|
||||
"COST" NUMBER(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"STORE_NAME" NVARCHAR2(50),
|
||||
"CONTACT_PHONE" NVARCHAR2(20),
|
||||
"ADDRESS" NVARCHAR2(100),
|
||||
"NEXT_MAINTENANCE_TIME" DATE,
|
||||
"NEXT_MAINTENANCE_MILEAGE" NUMBER(18,2),
|
||||
"ATTACHMENTS" CLOB,
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_VEHICLE_MAINTENANCE_PLAN" PRIMARY KEY ("ID")
|
||||
);
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_PLAN_NO" ON "BLADE_VEHICLE_MAINTENANCE_PLAN" ("VEHICLE_NO");
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_PLAN_TIME" ON "BLADE_VEHICLE_MAINTENANCE_PLAN" ("MAINTENANCE_TIME");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_VEHICLE_MAINTENANCE_RECORD
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_VEHICLE_MAINTENANCE_RECORD" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"TENANT_ID" NVARCHAR2(12) DEFAULT '000000',
|
||||
"VEHICLE_TYPE" NVARCHAR2(20) NOT NULL,
|
||||
"VEHICLE_NO" NVARCHAR2(30) NOT NULL,
|
||||
"MAINTAINER" NVARCHAR2(20),
|
||||
"MAINTENANCE_TIME" DATE NOT NULL,
|
||||
"LOCATION" NVARCHAR2(100),
|
||||
"REPLACED_PART" NVARCHAR2(200),
|
||||
"COST" NUMBER(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"COMPANY" NVARCHAR2(50),
|
||||
"CONTACT" NVARCHAR2(20),
|
||||
"ADDRESS" NVARCHAR2(100),
|
||||
"FACTORY_TIME" DATE,
|
||||
"MILEAGE" NUMBER(18,2),
|
||||
"MILEAGE_UNIT" NVARCHAR2(10) DEFAULT '公里',
|
||||
"ATTACHMENTS" CLOB,
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_VEHICLE_MAINTENANCE_RECORD" PRIMARY KEY ("ID")
|
||||
);
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_RECORD_NO" ON "BLADE_VEHICLE_MAINTENANCE_RECORD" ("VEHICLE_NO");
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_RECORD_TIME" ON "BLADE_VEHICLE_MAINTENANCE_RECORD" ("MAINTENANCE_TIME");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_PORT_TERMINAL
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_PORT_TERMINAL" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(30) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"CATEGORY" NVARCHAR2(20) NOT NULL,
|
||||
"PARENT_ID" NUMBER(20,0),
|
||||
"PARENT_CODE" NVARCHAR2(30),
|
||||
"PARENT_NAME" NVARCHAR2(100),
|
||||
"COUNTRY" NVARCHAR2(50),
|
||||
"CITY" NVARCHAR2(50),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_PORT_TERMINAL" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_PORT_TERMINAL_CODE" UNIQUE ("CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_PARENT" ON "BLADE_PORT_TERMINAL" ("PARENT_ID");
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_CATEGORY" ON "BLADE_PORT_TERMINAL" ("CATEGORY");
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_REGION" ON "BLADE_PORT_TERMINAL" ("COUNTRY", "CITY");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_RAILWAY_STATION
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_RAILWAY_STATION" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(20) NOT NULL,
|
||||
"TMIS_CODE" NVARCHAR2(5) NOT NULL,
|
||||
"TELEGRAPH_CODE" NVARCHAR2(3) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"RAILWAY_LINE" NVARCHAR2(100),
|
||||
"PROVINCE_CODE" NVARCHAR2(12),
|
||||
"PROVINCE_NAME" NVARCHAR2(128),
|
||||
"CITY_CODE" NVARCHAR2(12),
|
||||
"CITY_NAME" NVARCHAR2(128),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(200),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_RAILWAY_STATION" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_CODE" UNIQUE ("CODE"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_TMIS" UNIQUE ("TMIS_CODE"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_TELEGRAPH" UNIQUE ("TELEGRAPH_CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_RAILWAY_STATION_REGION" ON "BLADE_RAILWAY_STATION" ("PROVINCE_CODE", "CITY_CODE");
|
||||
CREATE INDEX "IDX_RAILWAY_STATION_STATUS" ON "BLADE_RAILWAY_STATION" ("STATUS");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_AIRPORT_MASTER
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_AIRPORT_MASTER" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(20) NOT NULL,
|
||||
"IATA_CODE" NVARCHAR2(3) NOT NULL,
|
||||
"ICAO_CODE" NVARCHAR2(4) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"SHORT_NAME" NVARCHAR2(100),
|
||||
"PROVINCE_CODE" NVARCHAR2(12),
|
||||
"PROVINCE_NAME" NVARCHAR2(128),
|
||||
"CITY_CODE" NVARCHAR2(12),
|
||||
"CITY_NAME" NVARCHAR2(128),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(200),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_AIRPORT_MASTER" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_CODE" UNIQUE ("CODE"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_IATA" UNIQUE ("IATA_CODE"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_ICAO" UNIQUE ("ICAO_CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_AIRPORT_MASTER_REGION" ON "BLADE_AIRPORT_MASTER" ("PROVINCE_CODE", "CITY_CODE");
|
||||
CREATE INDEX "IDX_AIRPORT_MASTER_STATUS" ON "BLADE_AIRPORT_MASTER" ("STATUS");
|
||||
|
||||
@@ -2330,3 +2330,171 @@ ALTER TABLE "blade_user_other" ADD CONSTRAINT "blade_user_other_pkey" PRIMARY KE
|
||||
-- Primary Key structure for table blade_user_web
|
||||
-- ----------------------------
|
||||
ALTER TABLE "blade_user_web" ADD CONSTRAINT "blade_user_web_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_plan
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_vehicle_maintenance_plan";
|
||||
CREATE TABLE "blade_vehicle_maintenance_plan" (
|
||||
"id" int8 NOT NULL,
|
||||
"tenant_id" varchar(12) DEFAULT '000000',
|
||||
"vehicle_type" varchar(20) NOT NULL,
|
||||
"vehicle_no" varchar(30) NOT NULL,
|
||||
"maintainer" varchar(20),
|
||||
"maintenance_time" timestamp(6) NOT NULL,
|
||||
"mileage" numeric(18,2),
|
||||
"mileage_unit" varchar(10) DEFAULT '公里',
|
||||
"maintenance_item" varchar(100),
|
||||
"cost" numeric(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"store_name" varchar(50),
|
||||
"contact_phone" varchar(20),
|
||||
"address" varchar(100),
|
||||
"next_maintenance_time" timestamp(6),
|
||||
"next_maintenance_mileage" numeric(18,2),
|
||||
"attachments" text,
|
||||
"remark" varchar(500),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_vehicle_maintenance_plan_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
CREATE INDEX "idx_vehicle_maintenance_plan_no" ON "blade_vehicle_maintenance_plan" ("vehicle_no");
|
||||
CREATE INDEX "idx_vehicle_maintenance_plan_time" ON "blade_vehicle_maintenance_plan" ("maintenance_time");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_vehicle_maintenance_record";
|
||||
CREATE TABLE "blade_vehicle_maintenance_record" (
|
||||
"id" int8 NOT NULL,
|
||||
"tenant_id" varchar(12) DEFAULT '000000',
|
||||
"vehicle_type" varchar(20) NOT NULL,
|
||||
"vehicle_no" varchar(30) NOT NULL,
|
||||
"maintainer" varchar(20),
|
||||
"maintenance_time" timestamp(6) NOT NULL,
|
||||
"location" varchar(100),
|
||||
"replaced_part" varchar(200),
|
||||
"cost" numeric(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"company" varchar(50),
|
||||
"contact" varchar(20),
|
||||
"address" varchar(100),
|
||||
"factory_time" timestamp(6),
|
||||
"mileage" numeric(18,2),
|
||||
"mileage_unit" varchar(10) DEFAULT '公里',
|
||||
"attachments" text,
|
||||
"remark" varchar(500),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_vehicle_maintenance_record_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
CREATE INDEX "idx_vehicle_maintenance_record_no" ON "blade_vehicle_maintenance_record" ("vehicle_no");
|
||||
CREATE INDEX "idx_vehicle_maintenance_record_time" ON "blade_vehicle_maintenance_record" ("maintenance_time");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_port_terminal
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_port_terminal";
|
||||
CREATE TABLE "blade_port_terminal" (
|
||||
"id" int8 NOT NULL,
|
||||
"code" varchar(30) NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"category" varchar(20) NOT NULL,
|
||||
"parent_id" int8,
|
||||
"parent_code" varchar(30),
|
||||
"parent_name" varchar(100),
|
||||
"country" varchar(50),
|
||||
"city" varchar(50),
|
||||
"longitude" numeric(12,6),
|
||||
"latitude" numeric(12,6),
|
||||
"data_source" varchar(20) DEFAULT '手工导入',
|
||||
"remark" varchar(500),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_port_terminal_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "uk_port_terminal_code" UNIQUE ("code")
|
||||
);
|
||||
CREATE INDEX "idx_port_terminal_parent" ON "blade_port_terminal" ("parent_id");
|
||||
CREATE INDEX "idx_port_terminal_category" ON "blade_port_terminal" ("category");
|
||||
CREATE INDEX "idx_port_terminal_region" ON "blade_port_terminal" ("country", "city");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_railway_station
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_railway_station";
|
||||
CREATE TABLE "blade_railway_station" (
|
||||
"id" int8 NOT NULL,
|
||||
"code" varchar(20) NOT NULL,
|
||||
"tmis_code" varchar(5) NOT NULL,
|
||||
"telegraph_code" varchar(3) NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"railway_line" varchar(100),
|
||||
"province_code" varchar(12),
|
||||
"province_name" varchar(128),
|
||||
"city_code" varchar(12),
|
||||
"city_name" varchar(128),
|
||||
"longitude" numeric(12,6),
|
||||
"latitude" numeric(12,6),
|
||||
"data_source" varchar(20) DEFAULT '手工导入',
|
||||
"remark" varchar(200),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_railway_station_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "uk_railway_station_code" UNIQUE ("code"),
|
||||
CONSTRAINT "uk_railway_station_tmis" UNIQUE ("tmis_code"),
|
||||
CONSTRAINT "uk_railway_station_telegraph" UNIQUE ("telegraph_code")
|
||||
);
|
||||
CREATE INDEX "idx_railway_station_region" ON "blade_railway_station" ("province_code", "city_code");
|
||||
CREATE INDEX "idx_railway_station_status" ON "blade_railway_station" ("status");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_airport_master
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "blade_airport_master";
|
||||
CREATE TABLE "blade_airport_master" (
|
||||
"id" int8 NOT NULL,
|
||||
"code" varchar(20) NOT NULL,
|
||||
"iata_code" varchar(3) NOT NULL,
|
||||
"icao_code" varchar(4) NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"short_name" varchar(100),
|
||||
"province_code" varchar(12),
|
||||
"province_name" varchar(128),
|
||||
"city_code" varchar(12),
|
||||
"city_name" varchar(128),
|
||||
"longitude" numeric(12,6),
|
||||
"latitude" numeric(12,6),
|
||||
"data_source" varchar(20) DEFAULT '手工导入',
|
||||
"remark" varchar(200),
|
||||
"create_user" int8,
|
||||
"create_dept" int8,
|
||||
"create_time" timestamp(6),
|
||||
"update_user" int8,
|
||||
"update_time" timestamp(6),
|
||||
"status" int4 DEFAULT 1,
|
||||
"is_deleted" int4 DEFAULT 0,
|
||||
CONSTRAINT "blade_airport_master_pkey" PRIMARY KEY ("id"),
|
||||
CONSTRAINT "uk_airport_master_code" UNIQUE ("code"),
|
||||
CONSTRAINT "uk_airport_master_iata" UNIQUE ("iata_code"),
|
||||
CONSTRAINT "uk_airport_master_icao" UNIQUE ("icao_code")
|
||||
);
|
||||
CREATE INDEX "idx_airport_master_region" ON "blade_airport_master" ("province_code", "city_code");
|
||||
CREATE INDEX "idx_airport_master_status" ON "blade_airport_master" ("status");
|
||||
|
||||
@@ -7466,3 +7466,192 @@ ALTER TABLE [dbo].[blade_user_web] ADD CONSTRAINT [PK__blade_us__3213E83F681373A
|
||||
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
ON [PRIMARY]
|
||||
GO
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_plan
|
||||
-- ----------------------------
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_vehicle_maintenance_plan]') AND type IN ('U')) DROP TABLE [dbo].[blade_vehicle_maintenance_plan]
|
||||
GO
|
||||
CREATE TABLE [dbo].[blade_vehicle_maintenance_plan] (
|
||||
[id] bigint NOT NULL,
|
||||
[tenant_id] nvarchar(12) DEFAULT '000000' NULL,
|
||||
[vehicle_type] nvarchar(20) NOT NULL,
|
||||
[vehicle_no] nvarchar(30) NOT NULL,
|
||||
[maintainer] nvarchar(20) NULL,
|
||||
[maintenance_time] datetime2(0) NOT NULL,
|
||||
[mileage] decimal(18,2) NULL,
|
||||
[mileage_unit] nvarchar(10) DEFAULT '公里' NULL,
|
||||
[maintenance_item] nvarchar(100) NULL,
|
||||
[cost] decimal(18,2) DEFAULT 0.00 NOT NULL,
|
||||
[store_name] nvarchar(50) NULL,
|
||||
[contact_phone] nvarchar(20) NULL,
|
||||
[address] nvarchar(100) NULL,
|
||||
[next_maintenance_time] datetime2(0) NULL,
|
||||
[next_maintenance_mileage] decimal(18,2) NULL,
|
||||
[attachments] nvarchar(max) NULL,
|
||||
[remark] nvarchar(500) NULL,
|
||||
[create_user] bigint NULL,
|
||||
[create_dept] bigint NULL,
|
||||
[create_time] datetime2(0) NULL,
|
||||
[update_user] bigint NULL,
|
||||
[update_time] datetime2(0) NULL,
|
||||
[status] int DEFAULT 1 NULL,
|
||||
[is_deleted] int DEFAULT 0 NULL,
|
||||
CONSTRAINT [PK_blade_vehicle_maintenance_plan] PRIMARY KEY CLUSTERED ([id])
|
||||
)
|
||||
GO
|
||||
CREATE INDEX [idx_vehicle_maintenance_plan_no] ON [dbo].[blade_vehicle_maintenance_plan] ([vehicle_no])
|
||||
GO
|
||||
CREATE INDEX [idx_vehicle_maintenance_plan_time] ON [dbo].[blade_vehicle_maintenance_plan] ([maintenance_time])
|
||||
GO
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_record
|
||||
-- ----------------------------
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_vehicle_maintenance_record]') AND type IN ('U')) DROP TABLE [dbo].[blade_vehicle_maintenance_record]
|
||||
GO
|
||||
CREATE TABLE [dbo].[blade_vehicle_maintenance_record] (
|
||||
[id] bigint NOT NULL,
|
||||
[tenant_id] nvarchar(12) DEFAULT '000000' NULL,
|
||||
[vehicle_type] nvarchar(20) NOT NULL,
|
||||
[vehicle_no] nvarchar(30) NOT NULL,
|
||||
[maintainer] nvarchar(20) NULL,
|
||||
[maintenance_time] datetime2(0) NOT NULL,
|
||||
[location] nvarchar(100) NULL,
|
||||
[replaced_part] nvarchar(200) NULL,
|
||||
[cost] decimal(18,2) DEFAULT 0.00 NOT NULL,
|
||||
[company] nvarchar(50) NULL,
|
||||
[contact] nvarchar(20) NULL,
|
||||
[address] nvarchar(100) NULL,
|
||||
[factory_time] datetime2(0) NULL,
|
||||
[mileage] decimal(18,2) NULL,
|
||||
[mileage_unit] nvarchar(10) DEFAULT '公里' NULL,
|
||||
[attachments] nvarchar(max) NULL,
|
||||
[remark] nvarchar(500) NULL,
|
||||
[create_user] bigint NULL,
|
||||
[create_dept] bigint NULL,
|
||||
[create_time] datetime2(0) NULL,
|
||||
[update_user] bigint NULL,
|
||||
[update_time] datetime2(0) NULL,
|
||||
[status] int DEFAULT 1 NULL,
|
||||
[is_deleted] int DEFAULT 0 NULL,
|
||||
CONSTRAINT [PK_blade_vehicle_maintenance_record] PRIMARY KEY CLUSTERED ([id])
|
||||
)
|
||||
GO
|
||||
CREATE INDEX [idx_vehicle_maintenance_record_no] ON [dbo].[blade_vehicle_maintenance_record] ([vehicle_no])
|
||||
GO
|
||||
CREATE INDEX [idx_vehicle_maintenance_record_time] ON [dbo].[blade_vehicle_maintenance_record] ([maintenance_time])
|
||||
GO
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_port_terminal
|
||||
-- ----------------------------
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_port_terminal]') AND type IN ('U')) DROP TABLE [dbo].[blade_port_terminal]
|
||||
GO
|
||||
CREATE TABLE [dbo].[blade_port_terminal] (
|
||||
[id] bigint NOT NULL,
|
||||
[code] nvarchar(30) NOT NULL,
|
||||
[name] nvarchar(100) NOT NULL,
|
||||
[category] nvarchar(20) NOT NULL,
|
||||
[parent_id] bigint NULL,
|
||||
[parent_code] nvarchar(30) NULL,
|
||||
[parent_name] nvarchar(100) NULL,
|
||||
[country] nvarchar(50) NULL,
|
||||
[city] nvarchar(50) NULL,
|
||||
[longitude] decimal(12,6) NULL,
|
||||
[latitude] decimal(12,6) NULL,
|
||||
[data_source] nvarchar(20) DEFAULT '手工导入' NULL,
|
||||
[remark] nvarchar(500) NULL,
|
||||
[create_user] bigint NULL,
|
||||
[create_dept] bigint NULL,
|
||||
[create_time] datetime2(0) NULL,
|
||||
[update_user] bigint NULL,
|
||||
[update_time] datetime2(0) NULL,
|
||||
[status] int DEFAULT 1 NULL,
|
||||
[is_deleted] int DEFAULT 0 NULL,
|
||||
CONSTRAINT [PK_blade_port_terminal] PRIMARY KEY CLUSTERED ([id]),
|
||||
CONSTRAINT [uk_port_terminal_code] UNIQUE ([code])
|
||||
)
|
||||
GO
|
||||
CREATE INDEX [idx_port_terminal_parent] ON [dbo].[blade_port_terminal] ([parent_id])
|
||||
GO
|
||||
CREATE INDEX [idx_port_terminal_category] ON [dbo].[blade_port_terminal] ([category])
|
||||
GO
|
||||
CREATE INDEX [idx_port_terminal_region] ON [dbo].[blade_port_terminal] ([country], [city])
|
||||
GO
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_railway_station
|
||||
-- ----------------------------
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_railway_station]') AND type IN ('U')) DROP TABLE [dbo].[blade_railway_station]
|
||||
GO
|
||||
CREATE TABLE [dbo].[blade_railway_station] (
|
||||
[id] bigint NOT NULL,
|
||||
[code] nvarchar(20) NOT NULL,
|
||||
[tmis_code] nvarchar(5) NOT NULL,
|
||||
[telegraph_code] nvarchar(3) NOT NULL,
|
||||
[name] nvarchar(100) NOT NULL,
|
||||
[railway_line] nvarchar(100) NULL,
|
||||
[province_code] nvarchar(12) NULL,
|
||||
[province_name] nvarchar(128) NULL,
|
||||
[city_code] nvarchar(12) NULL,
|
||||
[city_name] nvarchar(128) NULL,
|
||||
[longitude] decimal(12,6) NULL,
|
||||
[latitude] decimal(12,6) NULL,
|
||||
[data_source] nvarchar(20) DEFAULT '手工导入' NULL,
|
||||
[remark] nvarchar(200) NULL,
|
||||
[create_user] bigint NULL,
|
||||
[create_dept] bigint NULL,
|
||||
[create_time] datetime2(0) NULL,
|
||||
[update_user] bigint NULL,
|
||||
[update_time] datetime2(0) NULL,
|
||||
[status] int DEFAULT 1 NULL,
|
||||
[is_deleted] int DEFAULT 0 NULL,
|
||||
CONSTRAINT [PK_blade_railway_station] PRIMARY KEY CLUSTERED ([id]),
|
||||
CONSTRAINT [uk_railway_station_code] UNIQUE ([code]),
|
||||
CONSTRAINT [uk_railway_station_tmis] UNIQUE ([tmis_code]),
|
||||
CONSTRAINT [uk_railway_station_telegraph] UNIQUE ([telegraph_code])
|
||||
)
|
||||
GO
|
||||
CREATE INDEX [idx_railway_station_region] ON [dbo].[blade_railway_station] ([province_code], [city_code])
|
||||
GO
|
||||
CREATE INDEX [idx_railway_station_status] ON [dbo].[blade_railway_station] ([status])
|
||||
GO
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_airport_master
|
||||
-- ----------------------------
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_airport_master]') AND type IN ('U')) DROP TABLE [dbo].[blade_airport_master]
|
||||
GO
|
||||
CREATE TABLE [dbo].[blade_airport_master] (
|
||||
[id] bigint NOT NULL,
|
||||
[code] nvarchar(20) NOT NULL,
|
||||
[iata_code] nvarchar(3) NOT NULL,
|
||||
[icao_code] nvarchar(4) NOT NULL,
|
||||
[name] nvarchar(100) NOT NULL,
|
||||
[short_name] nvarchar(100) NULL,
|
||||
[province_code] nvarchar(12) NULL,
|
||||
[province_name] nvarchar(128) NULL,
|
||||
[city_code] nvarchar(12) NULL,
|
||||
[city_name] nvarchar(128) NULL,
|
||||
[longitude] decimal(12,6) NULL,
|
||||
[latitude] decimal(12,6) NULL,
|
||||
[data_source] nvarchar(20) DEFAULT '手工导入' NULL,
|
||||
[remark] nvarchar(200) NULL,
|
||||
[create_user] bigint NULL,
|
||||
[create_dept] bigint NULL,
|
||||
[create_time] datetime2(0) NULL,
|
||||
[update_user] bigint NULL,
|
||||
[update_time] datetime2(0) NULL,
|
||||
[status] int DEFAULT 1 NULL,
|
||||
[is_deleted] int DEFAULT 0 NULL,
|
||||
CONSTRAINT [PK_blade_airport_master] PRIMARY KEY CLUSTERED ([id]),
|
||||
CONSTRAINT [uk_airport_master_code] UNIQUE ([code]),
|
||||
CONSTRAINT [uk_airport_master_iata] UNIQUE ([iata_code]),
|
||||
CONSTRAINT [uk_airport_master_icao] UNIQUE ([icao_code])
|
||||
)
|
||||
GO
|
||||
CREATE INDEX [idx_airport_master_region] ON [dbo].[blade_airport_master] ([province_code], [city_code])
|
||||
GO
|
||||
CREATE INDEX [idx_airport_master_status] ON [dbo].[blade_airport_master] ([status])
|
||||
GO
|
||||
|
||||
@@ -28428,3 +28428,166 @@ ALTER TABLE "BLADE_AUTH_LOCK" ADD PRIMARY KEY("ID") ;
|
||||
ALTER TABLE "BLADE_AUTH_LOG" ADD PRIMARY KEY("ID") ;
|
||||
|
||||
ALTER TABLE "BLADE_ATTACH" ADD PRIMARY KEY("ID") ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_VEHICLE_MAINTENANCE_PLAN
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_VEHICLE_MAINTENANCE_PLAN" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"TENANT_ID" NVARCHAR2(12) DEFAULT '000000',
|
||||
"VEHICLE_TYPE" NVARCHAR2(20) NOT NULL,
|
||||
"VEHICLE_NO" NVARCHAR2(30) NOT NULL,
|
||||
"MAINTAINER" NVARCHAR2(20),
|
||||
"MAINTENANCE_TIME" DATE NOT NULL,
|
||||
"MILEAGE" NUMBER(18,2),
|
||||
"MILEAGE_UNIT" NVARCHAR2(10) DEFAULT '公里',
|
||||
"MAINTENANCE_ITEM" NVARCHAR2(100),
|
||||
"COST" NUMBER(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"STORE_NAME" NVARCHAR2(50),
|
||||
"CONTACT_PHONE" NVARCHAR2(20),
|
||||
"ADDRESS" NVARCHAR2(100),
|
||||
"NEXT_MAINTENANCE_TIME" DATE,
|
||||
"NEXT_MAINTENANCE_MILEAGE" NUMBER(18,2),
|
||||
"ATTACHMENTS" CLOB,
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_VEHICLE_MAINTENANCE_PLAN" PRIMARY KEY ("ID")
|
||||
);
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_PLAN_NO" ON "BLADE_VEHICLE_MAINTENANCE_PLAN" ("VEHICLE_NO");
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_PLAN_TIME" ON "BLADE_VEHICLE_MAINTENANCE_PLAN" ("MAINTENANCE_TIME");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_VEHICLE_MAINTENANCE_RECORD
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_VEHICLE_MAINTENANCE_RECORD" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"TENANT_ID" NVARCHAR2(12) DEFAULT '000000',
|
||||
"VEHICLE_TYPE" NVARCHAR2(20) NOT NULL,
|
||||
"VEHICLE_NO" NVARCHAR2(30) NOT NULL,
|
||||
"MAINTAINER" NVARCHAR2(20),
|
||||
"MAINTENANCE_TIME" DATE NOT NULL,
|
||||
"LOCATION" NVARCHAR2(100),
|
||||
"REPLACED_PART" NVARCHAR2(200),
|
||||
"COST" NUMBER(18,2) DEFAULT 0.00 NOT NULL,
|
||||
"COMPANY" NVARCHAR2(50),
|
||||
"CONTACT" NVARCHAR2(20),
|
||||
"ADDRESS" NVARCHAR2(100),
|
||||
"FACTORY_TIME" DATE,
|
||||
"MILEAGE" NUMBER(18,2),
|
||||
"MILEAGE_UNIT" NVARCHAR2(10) DEFAULT '公里',
|
||||
"ATTACHMENTS" CLOB,
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_VEHICLE_MAINTENANCE_RECORD" PRIMARY KEY ("ID")
|
||||
);
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_RECORD_NO" ON "BLADE_VEHICLE_MAINTENANCE_RECORD" ("VEHICLE_NO");
|
||||
CREATE INDEX "IDX_VEHICLE_MAINT_RECORD_TIME" ON "BLADE_VEHICLE_MAINTENANCE_RECORD" ("MAINTENANCE_TIME");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_PORT_TERMINAL
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_PORT_TERMINAL" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(30) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"CATEGORY" NVARCHAR2(20) NOT NULL,
|
||||
"PARENT_ID" NUMBER(20,0),
|
||||
"PARENT_CODE" NVARCHAR2(30),
|
||||
"PARENT_NAME" NVARCHAR2(100),
|
||||
"COUNTRY" NVARCHAR2(50),
|
||||
"CITY" NVARCHAR2(50),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(500),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_PORT_TERMINAL" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_PORT_TERMINAL_CODE" UNIQUE ("CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_PARENT" ON "BLADE_PORT_TERMINAL" ("PARENT_ID");
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_CATEGORY" ON "BLADE_PORT_TERMINAL" ("CATEGORY");
|
||||
CREATE INDEX "IDX_PORT_TERMINAL_REGION" ON "BLADE_PORT_TERMINAL" ("COUNTRY", "CITY");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_RAILWAY_STATION
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_RAILWAY_STATION" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(20) NOT NULL,
|
||||
"TMIS_CODE" NVARCHAR2(5) NOT NULL,
|
||||
"TELEGRAPH_CODE" NVARCHAR2(3) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"RAILWAY_LINE" NVARCHAR2(100),
|
||||
"PROVINCE_CODE" NVARCHAR2(12),
|
||||
"PROVINCE_NAME" NVARCHAR2(128),
|
||||
"CITY_CODE" NVARCHAR2(12),
|
||||
"CITY_NAME" NVARCHAR2(128),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(200),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_RAILWAY_STATION" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_CODE" UNIQUE ("CODE"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_TMIS" UNIQUE ("TMIS_CODE"),
|
||||
CONSTRAINT "UK_RAILWAY_STATION_TELEGRAPH" UNIQUE ("TELEGRAPH_CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_RAILWAY_STATION_REGION" ON "BLADE_RAILWAY_STATION" ("PROVINCE_CODE", "CITY_CODE");
|
||||
CREATE INDEX "IDX_RAILWAY_STATION_STATUS" ON "BLADE_RAILWAY_STATION" ("STATUS");
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for BLADE_AIRPORT_MASTER
|
||||
-- ----------------------------
|
||||
CREATE TABLE "BLADE_AIRPORT_MASTER" (
|
||||
"ID" NUMBER(20,0) NOT NULL,
|
||||
"CODE" NVARCHAR2(20) NOT NULL,
|
||||
"IATA_CODE" NVARCHAR2(3) NOT NULL,
|
||||
"ICAO_CODE" NVARCHAR2(4) NOT NULL,
|
||||
"NAME" NVARCHAR2(100) NOT NULL,
|
||||
"SHORT_NAME" NVARCHAR2(100),
|
||||
"PROVINCE_CODE" NVARCHAR2(12),
|
||||
"PROVINCE_NAME" NVARCHAR2(128),
|
||||
"CITY_CODE" NVARCHAR2(12),
|
||||
"CITY_NAME" NVARCHAR2(128),
|
||||
"LONGITUDE" NUMBER(12,6),
|
||||
"LATITUDE" NUMBER(12,6),
|
||||
"DATA_SOURCE" NVARCHAR2(20) DEFAULT '手工导入',
|
||||
"REMARK" NVARCHAR2(200),
|
||||
"CREATE_USER" NUMBER(20,0),
|
||||
"CREATE_DEPT" NUMBER(20,0),
|
||||
"CREATE_TIME" DATE,
|
||||
"UPDATE_USER" NUMBER(20,0),
|
||||
"UPDATE_TIME" DATE,
|
||||
"STATUS" NUMBER(11,0) DEFAULT 1,
|
||||
"IS_DELETED" NUMBER(11,0) DEFAULT 0,
|
||||
CONSTRAINT "PK_AIRPORT_MASTER" PRIMARY KEY ("ID"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_CODE" UNIQUE ("CODE"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_IATA" UNIQUE ("IATA_CODE"),
|
||||
CONSTRAINT "UK_AIRPORT_MASTER_ICAO" UNIQUE ("ICAO_CODE")
|
||||
);
|
||||
CREATE INDEX "IDX_AIRPORT_MASTER_REGION" ON "BLADE_AIRPORT_MASTER" ("PROVINCE_CODE", "CITY_CODE");
|
||||
CREATE INDEX "IDX_AIRPORT_MASTER_STATUS" ON "BLADE_AIRPORT_MASTER" ("STATUS");
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_airport_master
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_airport_master`;
|
||||
CREATE TABLE `blade_airport_master` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
|
||||
`iata_code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IATA编码',
|
||||
`icao_code` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ICAO代码',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '机场标准名称',
|
||||
`short_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机场简称',
|
||||
`province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份编码',
|
||||
`province_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份',
|
||||
`city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市编码',
|
||||
`city_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市',
|
||||
`longitude` decimal(12,6) NULL DEFAULT NULL COMMENT '经度',
|
||||
`latitude` decimal(12,6) NULL DEFAULT NULL COMMENT '纬度',
|
||||
`data_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '手工导入' COMMENT '数据来源',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_airport_master_code`(`code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_airport_master_iata`(`iata_code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_airport_master_icao`(`icao_code`) USING BTREE,
|
||||
INDEX `idx_airport_master_region`(`province_code`, `city_code`) USING BTREE,
|
||||
INDEX `idx_airport_master_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '空港机场主数据';
|
||||
@@ -0,0 +1,31 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_port_terminal
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_port_terminal`;
|
||||
CREATE TABLE `blade_port_terminal` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '港口/码头名称',
|
||||
`category` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
|
||||
`parent_id` bigint NULL DEFAULT NULL COMMENT '上级港口ID',
|
||||
`parent_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级港口编码',
|
||||
`parent_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级港口名称',
|
||||
`country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国家',
|
||||
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '城市',
|
||||
`longitude` decimal(12,6) NULL DEFAULT NULL COMMENT '经度',
|
||||
`latitude` decimal(12,6) NULL DEFAULT NULL COMMENT '纬度',
|
||||
`data_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '手工导入' COMMENT '数据来源',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_port_terminal_code`(`code`) USING BTREE,
|
||||
INDEX `idx_port_terminal_parent`(`parent_id`) USING BTREE,
|
||||
INDEX `idx_port_terminal_category`(`category`) USING BTREE,
|
||||
INDEX `idx_port_terminal_region`(`country`, `city`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '港口码头主数据';
|
||||
@@ -0,0 +1,33 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_railway_station
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_railway_station`;
|
||||
CREATE TABLE `blade_railway_station` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编码',
|
||||
`tmis_code` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'TMIS国标编码',
|
||||
`telegraph_code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '电报码',
|
||||
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车站名称',
|
||||
`railway_line` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属铁路线路',
|
||||
`province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份编码',
|
||||
`province_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份',
|
||||
`city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市编码',
|
||||
`city_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市',
|
||||
`longitude` decimal(12,6) NULL DEFAULT NULL COMMENT '经度',
|
||||
`latitude` decimal(12,6) NULL DEFAULT NULL COMMENT '纬度',
|
||||
`data_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '手工导入' COMMENT '数据来源',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_railway_station_code`(`code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_railway_station_tmis`(`tmis_code`) USING BTREE,
|
||||
UNIQUE INDEX `uk_railway_station_telegraph`(`telegraph_code`) USING BTREE,
|
||||
INDEX `idx_railway_station_region`(`province_code`, `city_code`) USING BTREE,
|
||||
INDEX `idx_railway_station_status`(`status`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '铁路车站主数据';
|
||||
@@ -0,0 +1,33 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_plan
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_vehicle_maintenance_plan`;
|
||||
CREATE TABLE `blade_vehicle_maintenance_plan` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`vehicle_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车船类型',
|
||||
`vehicle_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车牌号/船号',
|
||||
`maintainer` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '保养人',
|
||||
`maintenance_time` datetime NOT NULL COMMENT '保养时间',
|
||||
`mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`maintenance_item` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '保养项目',
|
||||
`cost` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '费用',
|
||||
`store_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '店名',
|
||||
`contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
|
||||
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
|
||||
`next_maintenance_time` datetime NULL DEFAULT NULL COMMENT '下次保养时间',
|
||||
`next_maintenance_mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '下次保养里程/航程',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_plan_no`(`vehicle_no`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_plan_time`(`maintenance_time`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆保养计划';
|
||||
@@ -0,0 +1,33 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_vehicle_maintenance_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_vehicle_maintenance_record`;
|
||||
CREATE TABLE `blade_vehicle_maintenance_record` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`vehicle_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车船类型',
|
||||
`vehicle_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车牌号/船号',
|
||||
`maintainer` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修人',
|
||||
`maintenance_time` datetime NOT NULL COMMENT '维修时间',
|
||||
`location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修位置',
|
||||
`replaced_part` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更换零件',
|
||||
`cost` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '费用',
|
||||
`company` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '维修单位',
|
||||
`contact` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式',
|
||||
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
|
||||
`factory_time` datetime NULL DEFAULT NULL COMMENT '出厂时间',
|
||||
`mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint NULL DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int NULL DEFAULT 1 COMMENT '状态',
|
||||
`is_deleted` int NULL DEFAULT 0 COMMENT '是否已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_record_no`(`vehicle_no`) USING BTREE,
|
||||
INDEX `idx_vehicle_maintenance_record_time`(`maintenance_time`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '车辆维修记录';
|
||||
File diff suppressed because one or more lines are too long
@@ -19,10 +19,11 @@
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<!-- Docker仓库服务配置 -->
|
||||
<docker.registry.url>192.168.0.188</docker.registry.url>
|
||||
<docker.registry.url>172.16.203.228:8081</docker.registry.url>
|
||||
<docker.username>admin</docker.username>
|
||||
<docker.password>admin12345</docker.password>
|
||||
<docker.password>Harbor12345TMS</docker.password>
|
||||
<docker.namespace>blade</docker.namespace>
|
||||
<docker.base.image>${docker.registry.url}/${docker.namespace}/alpine-java:openjdk17_cn_slim</docker.base.image>
|
||||
<docker.fabric.skip>false</docker.fabric.skip>
|
||||
<docker.fabric.version>0.42.0</docker.fabric.version>
|
||||
</properties>
|
||||
@@ -109,6 +110,11 @@
|
||||
<artifactId>blade-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-transport-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user