Compare commits
2 Commits
454ca91760
...
dev1
| Author | SHA1 | Date | |
|---|---|---|---|
| 9722a4ccf0 | |||
| 03a4fab114 |
23
AGENTS.md
23
AGENTS.md
@@ -195,7 +195,6 @@ Entity 基类的选择**直接决定** Service 和 ServiceImpl 的继承方式
|
|||||||
- 简单查询使用 `LambdaQueryWrapper`,复杂查询写在 Mapper XML 中
|
- 简单查询使用 `LambdaQueryWrapper`,复杂查询写在 Mapper XML 中
|
||||||
- Mapper XML 与接口**同包**放置(`src/main/java` 下)
|
- Mapper XML 与接口**同包**放置(`src/main/java` 下)
|
||||||
- 分页统一使用 `Condition.getPage(query)` + `Condition.getQueryWrapper()`
|
- 分页统一使用 `Condition.getPage(query)` + `Condition.getQueryWrapper()`
|
||||||
- 表格的排序默认按照创建时间降序;后端分页 SQL 或 QueryWrapper 应默认使用 `create_time DESC` / `orderByDesc(Xxx::getCreateTime)`,除非用户明确要求业务字段优先排序。
|
|
||||||
- 禁止 JDBC 直连查询
|
- 禁止 JDBC 直连查询
|
||||||
|
|
||||||
### 6.9 审计字段展示
|
### 6.9 审计字段展示
|
||||||
@@ -205,26 +204,7 @@ Entity 基类的选择**直接决定** Service 和 ServiceImpl 的继承方式
|
|||||||
- Entity → VO 转换统一在 `XxxWrapper` 中完成;审计人姓名通过 `UserCache.getUserRealName(userId)` 获取,优先返回用户真实姓名,缓存未命中时兜底返回用户 ID。
|
- Entity → VO 转换统一在 `XxxWrapper` 中完成;审计人姓名通过 `UserCache.getUserRealName(userId)` 获取,优先返回用户真实姓名,缓存未命中时兜底返回用户 ID。
|
||||||
- Controller 不应在列表、详情方法中重复编写审计人翻译逻辑,避免各模块显示规则不一致。
|
- Controller 不应在列表、详情方法中重复编写审计人翻译逻辑,避免各模块显示规则不一致。
|
||||||
|
|
||||||
### 6.10 导出数据格式
|
### 6.10 日志
|
||||||
|
|
||||||
- 导出 Excel、CSV 等文件时,金额类字段必须保留 2 位小数;即使原始数据为整数,也应导出为 `0.00` 形式。
|
|
||||||
- 导出经度、纬度字段时必须保留 6 位小数;导出前仍需遵守经度 `-180 ~ 180`、纬度 `-90 ~ 90` 的有效范围约束。
|
|
||||||
- 精度格式化应在导出 DTO/Excel 模型、导出组装逻辑或专用格式化工具中完成,禁止只依赖前端展示格式。
|
|
||||||
|
|
||||||
### 6.11 导入失败明细导出
|
|
||||||
|
|
||||||
- 所有 Excel 批量导入功能如果存在部分数据无法导入、校验失败或处理异常,后端必须将导入失败的数据导出为 Excel 文件返回给前端下载。
|
|
||||||
- 导入失败 Excel 的字段顺序必须与原导入模板保持一致,并在最后一列追加“导入失败原因”;失败原因应包含明确行号和可读错误信息。
|
|
||||||
- 导入失败 Excel 中仅出错字段/列对应的单元格使用红色文字展示,最后一列“导入失败原因”的错误信息也必须使用红色文字展示;不得将整行失败数据全部标红,表头可保持默认样式。
|
|
||||||
- 失败原因应尽量包含原导入模板中的列名,便于通用导出工具准确定位并标红对应错误单元格;无法定位具体字段的业务错误,仅标红“导入失败原因”列。
|
|
||||||
- 导入失败 Excel 的表头列宽必须按表头和内容自适应,表头文字不得换行。
|
|
||||||
- 后端导入校验必须与前端新增、编辑表单校验保持一致,包括必填、长度、格式、枚举范围、父子级联关系和金额/日期等业务规则;前端校验调整时,必须同步更新对应导入校验。
|
|
||||||
- 导入模板本身不得包含失败原因列;如复用导入模型,应使用 `@ExcelIgnore` 忽略内部错误字段,或单独定义 `XxxImportFailureExcel` 模型。
|
|
||||||
- 导入逻辑应逐行处理:可成功导入的数据正常保存,失败行收集到失败明细;除非业务明确要求全量事务回滚,不得因部分失败回滚已成功行。
|
|
||||||
- Controller 在失败明细非空时应直接通过导入失败明细通用导出工具写入 `HttpServletResponse`,文件名统一包含业务名称、`导入失败明细` 和时间戳;全部成功时返回标准 `R.success`。
|
|
||||||
- Service 层应返回失败明细列表或等效结构,禁止只抛出拼接后的错误字符串导致前端无法下载失败数据。
|
|
||||||
|
|
||||||
### 6.12 日志
|
|
||||||
|
|
||||||
- 使用 `@Slf4j`,占位符传参(禁止字符串拼接)
|
- 使用 `@Slf4j`,占位符传参(禁止字符串拼接)
|
||||||
- 包含关键业务标识,异常必须携带堆栈,禁止打印敏感信息
|
- 包含关键业务标识,异常必须携带堆栈,禁止打印敏感信息
|
||||||
@@ -364,4 +344,3 @@ id parent_id code name alias path source sort category action is_open component
|
|||||||
2075431753298714626 2075431169720033282 airport_master_status 修改状态 airport_master_status 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
|
2075431820189474818 2075431169720033282 airport_master_add 新增 airport_master_add 1 2 0 1 0
|
||||||
```
|
```
|
||||||
2.生成的表、字段的排序规则要使用utf8mb4_general_ci
|
|
||||||
|
|||||||
@@ -22,10 +22,6 @@
|
|||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-starter-loadbalancer</artifactId>
|
<artifactId>blade-starter-loadbalancer</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>cn.idev.excel</groupId>
|
|
||||||
<artifactId>fastexcel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-core-auto</artifactId>
|
<artifactId>blade-core-auto</artifactId>
|
||||||
|
|||||||
@@ -1,282 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.common.excel;
|
|
||||||
|
|
||||||
import cn.idev.excel.FastExcel;
|
|
||||||
import cn.idev.excel.annotation.ExcelIgnore;
|
|
||||||
import cn.idev.excel.annotation.ExcelProperty;
|
|
||||||
import cn.idev.excel.metadata.data.WriteCellData;
|
|
||||||
import cn.idev.excel.write.handler.CellWriteHandler;
|
|
||||||
import cn.idev.excel.write.metadata.holder.WriteSheetHolder;
|
|
||||||
import cn.idev.excel.write.metadata.holder.WriteTableHolder;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
|
||||||
import org.apache.poi.ss.usermodel.CellStyle;
|
|
||||||
import org.apache.poi.ss.usermodel.Font;
|
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入失败明细 Excel 导出工具类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public class ImportFailureExcelUtil {
|
|
||||||
|
|
||||||
private static final String FAILURE_REASON = "导入失败原因";
|
|
||||||
private static final String ERROR_MESSAGE_FIELD = "errorMessage";
|
|
||||||
private static final String FAILURE_REASON_FIELD = "failureReason";
|
|
||||||
|
|
||||||
private ImportFailureExcelUtil() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出导入失败明细
|
|
||||||
*
|
|
||||||
* @param response 响应
|
|
||||||
* @param fileName 文件名
|
|
||||||
* @param sheetName 工作表名
|
|
||||||
* @param data 失败数据
|
|
||||||
* @param excelClass 原导入 Excel 类型
|
|
||||||
*/
|
|
||||||
public static void export(HttpServletResponse response, String fileName, String sheetName, List<?> data, Class<?> excelClass) {
|
|
||||||
response.setContentType("application/vnd.ms-excel");
|
|
||||||
response.setCharacterEncoding(StandardCharsets.UTF_8.name());
|
|
||||||
String encodeFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
|
|
||||||
response.setHeader("Content-disposition", "attachment;filename=" + encodeFileName + ".xlsx");
|
|
||||||
List<Field> excelFields = excelFields(excelClass);
|
|
||||||
List<List<String>> head = buildHead(excelFields);
|
|
||||||
List<List<Object>> rows = buildRows(data, excelFields);
|
|
||||||
try {
|
|
||||||
FastExcel.write(response.getOutputStream())
|
|
||||||
.registerWriteHandler(new ImportFailureCellStyleHandler(excelFields, rows))
|
|
||||||
.head(head)
|
|
||||||
.sheet(sheetName)
|
|
||||||
.doWrite(rows);
|
|
||||||
} catch (IOException exception) {
|
|
||||||
throw new IllegalStateException("导出导入失败明细失败", exception);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<Field> excelFields(Class<?> excelClass) {
|
|
||||||
return Arrays.stream(excelClass.getDeclaredFields())
|
|
||||||
.filter(field -> field.getAnnotation(ExcelProperty.class) != null)
|
|
||||||
.filter(field -> field.getAnnotation(ExcelIgnore.class) == null)
|
|
||||||
.filter(field -> !Objects.equals(field.getName(), ERROR_MESSAGE_FIELD))
|
|
||||||
.filter(field -> !Objects.equals(field.getName(), FAILURE_REASON_FIELD))
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<List<String>> buildHead(List<Field> excelFields) {
|
|
||||||
List<List<String>> head = new ArrayList<>();
|
|
||||||
for (Field field : excelFields) {
|
|
||||||
ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class);
|
|
||||||
String[] value = excelProperty.value();
|
|
||||||
head.add(List.of(value.length == 0 ? field.getName() : value[0]));
|
|
||||||
}
|
|
||||||
head.add(List.of(FAILURE_REASON));
|
|
||||||
return head;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<List<Object>> buildRows(List<?> data, List<Field> excelFields) {
|
|
||||||
List<List<Object>> rows = new ArrayList<>();
|
|
||||||
for (Object item : data) {
|
|
||||||
List<Object> row = new ArrayList<>();
|
|
||||||
for (Field field : excelFields) {
|
|
||||||
row.add(fieldValue(item, field));
|
|
||||||
}
|
|
||||||
row.add(errorMessage(item));
|
|
||||||
rows.add(row);
|
|
||||||
}
|
|
||||||
return rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Object fieldValue(Object item, Field field) {
|
|
||||||
try {
|
|
||||||
Field targetField = targetField(item.getClass(), field.getName());
|
|
||||||
targetField.setAccessible(true);
|
|
||||||
return targetField.get(item);
|
|
||||||
} catch (NoSuchFieldException | IllegalAccessException exception) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Object errorMessage(Object item) {
|
|
||||||
try {
|
|
||||||
Field field = targetField(item.getClass(), ERROR_MESSAGE_FIELD, FAILURE_REASON_FIELD);
|
|
||||||
field.setAccessible(true);
|
|
||||||
Object value = field.get(item);
|
|
||||||
return value == null ? "" : String.valueOf(value);
|
|
||||||
} catch (NoSuchFieldException | IllegalAccessException exception) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Field targetField(Class<?> itemClass, String... fieldNames) throws NoSuchFieldException {
|
|
||||||
Class<?> currentClass = itemClass;
|
|
||||||
while (currentClass != null) {
|
|
||||||
for (String fieldName : fieldNames) {
|
|
||||||
try {
|
|
||||||
return currentClass.getDeclaredField(fieldName);
|
|
||||||
} catch (NoSuchFieldException ignored) {
|
|
||||||
// 继续查找其他字段名或父类字段。
|
|
||||||
}
|
|
||||||
}
|
|
||||||
currentClass = currentClass.getSuperclass();
|
|
||||||
}
|
|
||||||
throw new NoSuchFieldException(String.join(",", fieldNames));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String columnName(Field field) {
|
|
||||||
ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class);
|
|
||||||
String[] value = excelProperty.value();
|
|
||||||
return value.length == 0 ? field.getName() : value[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String normalize(String value) {
|
|
||||||
return value == null ? "" : value.replaceAll("[\\s*_::,,。;;()()\\[\\]【】<>《》-]", "").toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<String> columnKeywords(Field field) {
|
|
||||||
String columnName = columnName(field);
|
|
||||||
List<String> keywords = new ArrayList<>();
|
|
||||||
keywords.add(columnName);
|
|
||||||
keywords.add(field.getName());
|
|
||||||
keywords.addAll(Arrays.asList(columnName.replace("*", "").split("[//、()()\\s]+")));
|
|
||||||
return keywords.stream()
|
|
||||||
.map(ImportFailureExcelUtil::normalize)
|
|
||||||
.filter(keyword -> keyword.length() >= 2)
|
|
||||||
.distinct()
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ImportFailureCellStyleHandler implements CellWriteHandler {
|
|
||||||
|
|
||||||
private final List<List<String>> columnKeywords;
|
|
||||||
private final List<List<Object>> rows;
|
|
||||||
private final int failureReasonColumnIndex;
|
|
||||||
private final Map<Short, CellStyle> redStyleCache = new HashMap<>();
|
|
||||||
private final Map<Short, CellStyle> noWrapStyleCache = new HashMap<>();
|
|
||||||
private final Map<Integer, Integer> columnWidthCache = new HashMap<>();
|
|
||||||
|
|
||||||
private ImportFailureCellStyleHandler(List<Field> excelFields, List<List<Object>> rows) {
|
|
||||||
this.columnKeywords = excelFields.stream()
|
|
||||||
.map(ImportFailureExcelUtil::columnKeywords)
|
|
||||||
.toList();
|
|
||||||
this.rows = rows;
|
|
||||||
this.failureReasonColumnIndex = excelFields.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterCellDispose(
|
|
||||||
WriteSheetHolder writeSheetHolder,
|
|
||||||
WriteTableHolder writeTableHolder,
|
|
||||||
List<WriteCellData<?>> cellDataList,
|
|
||||||
Cell cell,
|
|
||||||
cn.idev.excel.metadata.Head head,
|
|
||||||
Integer relativeRowIndex,
|
|
||||||
Boolean isHead) {
|
|
||||||
if (Boolean.TRUE.equals(isHead)) {
|
|
||||||
adjustColumnWidth(cell);
|
|
||||||
markNoWrap(cell);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
adjustColumnWidth(cell);
|
|
||||||
if (relativeRowIndex == null || relativeRowIndex < 0 || relativeRowIndex >= rows.size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (shouldMarkRed(relativeRowIndex, cell.getColumnIndex())) {
|
|
||||||
markRed(cell);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean shouldMarkRed(int rowIndex, int columnIndex) {
|
|
||||||
if (columnIndex == failureReasonColumnIndex) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (columnIndex < 0 || columnIndex >= columnKeywords.size()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
String failureReason = normalize(String.valueOf(rows.get(rowIndex).get(failureReasonColumnIndex)));
|
|
||||||
return columnKeywords.get(columnIndex).stream().anyMatch(failureReason::contains);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void markRed(Cell cell) {
|
|
||||||
CellStyle currentStyle = cell.getCellStyle();
|
|
||||||
CellStyle redStyle = redStyleCache.computeIfAbsent(currentStyle.getIndex(), styleIndex -> {
|
|
||||||
Workbook workbook = cell.getSheet().getWorkbook();
|
|
||||||
CellStyle newStyle = workbook.createCellStyle();
|
|
||||||
newStyle.cloneStyleFrom(currentStyle);
|
|
||||||
Font font = workbook.createFont();
|
|
||||||
font.setColor(IndexedColors.RED.getIndex());
|
|
||||||
newStyle.setFont(font);
|
|
||||||
return newStyle;
|
|
||||||
});
|
|
||||||
cell.setCellStyle(redStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void markNoWrap(Cell cell) {
|
|
||||||
CellStyle currentStyle = cell.getCellStyle();
|
|
||||||
CellStyle noWrapStyle = noWrapStyleCache.computeIfAbsent(currentStyle.getIndex(), styleIndex -> {
|
|
||||||
CellStyle newStyle = cell.getSheet().getWorkbook().createCellStyle();
|
|
||||||
newStyle.cloneStyleFrom(currentStyle);
|
|
||||||
newStyle.setWrapText(false);
|
|
||||||
return newStyle;
|
|
||||||
});
|
|
||||||
cell.setCellStyle(noWrapStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void adjustColumnWidth(Cell cell) {
|
|
||||||
int columnIndex = cell.getColumnIndex();
|
|
||||||
int columnWidth = Math.min(Math.max(displayWidth(cell.toString()) + 4, 12), 80) * 256;
|
|
||||||
Integer currentWidth = columnWidthCache.get(columnIndex);
|
|
||||||
if (currentWidth == null || columnWidth > currentWidth) {
|
|
||||||
columnWidthCache.put(columnIndex, columnWidth);
|
|
||||||
cell.getSheet().setColumnWidth(columnIndex, columnWidth);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int displayWidth(String value) {
|
|
||||||
int width = 0;
|
|
||||||
for (int index = 0; index < value.length(); index++) {
|
|
||||||
width += value.charAt(index) > 255 ? 2 : 1;
|
|
||||||
}
|
|
||||||
return width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -39,10 +39,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
|||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class RegionCache {
|
public class RegionCache {
|
||||||
public static final String ROOT_PARENT_CODE = "0";
|
public static final String MAIN_CODE = "00";
|
||||||
public static final String MAIN_CODE = "+86";
|
|
||||||
public static final String LEGACY_MAIN_CODE = "00";
|
|
||||||
public static final int COUNTRY_LEVEL = 0;
|
|
||||||
public static final int PROVINCE_LEVEL = 1;
|
public static final int PROVINCE_LEVEL = 1;
|
||||||
public static final int CITY_LEVEL = 2;
|
public static final int CITY_LEVEL = 2;
|
||||||
public static final int DISTRICT_LEVEL = 3;
|
public static final int DISTRICT_LEVEL = 3;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.springblade.system.pojo.entity;
|
package org.springblade.system.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -94,32 +93,6 @@ public class AirportMaster extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "所属城市")
|
@Schema(description = "所属城市")
|
||||||
private String cityName;
|
private String cityName;
|
||||||
/**
|
|
||||||
* 所属区县编码
|
|
||||||
*/
|
|
||||||
@Schema(description = "所属区县编码")
|
|
||||||
private String districtCode;
|
|
||||||
/**
|
|
||||||
* 所属区县
|
|
||||||
*/
|
|
||||||
@Schema(description = "所属区县")
|
|
||||||
private String districtName;
|
|
||||||
/**
|
|
||||||
* 行政区划编码
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "行政区划编码")
|
|
||||||
private String regionCode;
|
|
||||||
/**
|
|
||||||
* 行政区划
|
|
||||||
*/
|
|
||||||
@Schema(description = "行政区划")
|
|
||||||
private String regionName;
|
|
||||||
/**
|
|
||||||
* 详细地址
|
|
||||||
*/
|
|
||||||
@Schema(description = "详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
/**
|
/**
|
||||||
* 经度
|
* 经度
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.FieldStrategy;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_cargo_type")
|
|
||||||
@Schema(description = "货物类型")
|
|
||||||
public class CargoType extends BaseEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类型级别:1一级货物类型,2二级货物类型
|
|
||||||
*/
|
|
||||||
@Schema(description = "类型级别")
|
|
||||||
private Integer typeLevel;
|
|
||||||
/**
|
|
||||||
* 上级货物类型ID
|
|
||||||
*/
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
|
||||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
|
||||||
@Schema(description = "上级货物类型ID")
|
|
||||||
private Long parentId;
|
|
||||||
/**
|
|
||||||
* 上级货物类型编码
|
|
||||||
*/
|
|
||||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
|
||||||
@Schema(description = "上级货物类型编码")
|
|
||||||
private String parentCargoCode;
|
|
||||||
/**
|
|
||||||
* 货物类型
|
|
||||||
*/
|
|
||||||
@Schema(description = "货物类型")
|
|
||||||
private String cargoName;
|
|
||||||
/**
|
|
||||||
* 货物类型编码
|
|
||||||
*/
|
|
||||||
@Schema(description = "货物类型编码")
|
|
||||||
private String cargoCode;
|
|
||||||
/**
|
|
||||||
* 数据来源
|
|
||||||
*/
|
|
||||||
@Schema(description = "数据来源")
|
|
||||||
private String dataSource;
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -95,7 +95,6 @@ public class Currency extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 是否本位币
|
* 是否本位币
|
||||||
*/
|
*/
|
||||||
@TableField("is_base_currency")
|
|
||||||
@Schema(description = "是否本位币")
|
@Schema(description = "是否本位币")
|
||||||
private Integer baseCurrency;
|
private Integer baseCurrency;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,19 +48,14 @@ public class FeeItem extends BaseEntity {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用类型
|
* 中文名称
|
||||||
*/
|
*/
|
||||||
@Schema(description = "费用类型")
|
@Schema(description = "中文名称")
|
||||||
private String feeCategory;
|
|
||||||
/**
|
|
||||||
* 费用项
|
|
||||||
*/
|
|
||||||
@Schema(description = "费用项")
|
|
||||||
private String name;
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 费用项代码
|
* 英文名称
|
||||||
*/
|
*/
|
||||||
@Schema(description = "费用项代码")
|
@Schema(description = "英文名称")
|
||||||
private String englishName;
|
private String englishName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.springblade.system.pojo.entity;
|
package org.springblade.system.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -89,27 +88,6 @@ public class PortTerminal extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "城市")
|
@Schema(description = "城市")
|
||||||
private String city;
|
private String city;
|
||||||
/**
|
|
||||||
* 区县编码
|
|
||||||
*/
|
|
||||||
@Schema(description = "区县编码")
|
|
||||||
private String districtCode;
|
|
||||||
/**
|
|
||||||
* 区县
|
|
||||||
*/
|
|
||||||
@Schema(description = "区县")
|
|
||||||
private String districtName;
|
|
||||||
/**
|
|
||||||
* 行政区划编码
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "行政区划编码")
|
|
||||||
private String regionCode;
|
|
||||||
/**
|
|
||||||
* 详细地址
|
|
||||||
*/
|
|
||||||
@Schema(description = "详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
/**
|
/**
|
||||||
* 经度
|
* 经度
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.springblade.system.pojo.entity;
|
package org.springblade.system.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -94,32 +93,6 @@ public class RailwayStation extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "所属城市")
|
@Schema(description = "所属城市")
|
||||||
private String cityName;
|
private String cityName;
|
||||||
/**
|
|
||||||
* 所属区县编码
|
|
||||||
*/
|
|
||||||
@Schema(description = "所属区县编码")
|
|
||||||
private String districtCode;
|
|
||||||
/**
|
|
||||||
* 所属区县
|
|
||||||
*/
|
|
||||||
@Schema(description = "所属区县")
|
|
||||||
private String districtName;
|
|
||||||
/**
|
|
||||||
* 行政区划编码
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "行政区划编码")
|
|
||||||
private String regionCode;
|
|
||||||
/**
|
|
||||||
* 行政区划
|
|
||||||
*/
|
|
||||||
@Schema(description = "行政区划")
|
|
||||||
private String regionName;
|
|
||||||
/**
|
|
||||||
* 详细地址
|
|
||||||
*/
|
|
||||||
@Schema(description = "详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
/**
|
/**
|
||||||
* 经度
|
* 经度
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ package org.springblade.system.pojo.entity;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -135,12 +134,5 @@ public class Region implements Serializable {
|
|||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
|
||||||
* 原区划编号
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "原区划编号")
|
|
||||||
private String originalCode;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.CargoType;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "货物类型")
|
|
||||||
public class CargoTypeVO extends CargoType {
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "类型名称")
|
|
||||||
private String typeLevelName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "上级货物类型")
|
|
||||||
private String parentCargoName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "导入错误信息")
|
|
||||||
private String errorMessage;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -60,10 +60,6 @@ public class CurrencyVO extends Currency {
|
|||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate businessDate;
|
private LocalDate businessDate;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Schema(description = "生效日期开始")
|
@Schema(description = "生效日期开始")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 常用货物实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_common_cargo")
|
|
||||||
@Schema(description = "常用货物")
|
|
||||||
public class CommonCargo extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "一级货物类型ID")
|
|
||||||
private Long firstCargoTypeId;
|
|
||||||
|
|
||||||
@Schema(description = "一级货物类型")
|
|
||||||
private String firstCargoTypeName;
|
|
||||||
|
|
||||||
@Schema(description = "一级货物类型编码")
|
|
||||||
private String firstCargoTypeCode;
|
|
||||||
|
|
||||||
@Schema(description = "二级货物类型ID")
|
|
||||||
private Long secondCargoTypeId;
|
|
||||||
|
|
||||||
@Schema(description = "二级货物类型")
|
|
||||||
private String secondCargoTypeName;
|
|
||||||
|
|
||||||
@Schema(description = "二级货物类型编码")
|
|
||||||
private String secondCargoTypeCode;
|
|
||||||
|
|
||||||
@Schema(description = "货物名称")
|
|
||||||
private String cargoName;
|
|
||||||
|
|
||||||
@Schema(description = "货物编号")
|
|
||||||
private String cargoCode;
|
|
||||||
|
|
||||||
@Schema(description = "品牌")
|
|
||||||
private String brand;
|
|
||||||
|
|
||||||
@Schema(description = "包装")
|
|
||||||
private String packageType;
|
|
||||||
|
|
||||||
@Schema(description = "货值")
|
|
||||||
private BigDecimal cargoValue;
|
|
||||||
|
|
||||||
@Schema(description = "规格")
|
|
||||||
private String specification;
|
|
||||||
|
|
||||||
@Schema(description = "计价单位")
|
|
||||||
private String priceUnit;
|
|
||||||
|
|
||||||
@Schema(description = "型号")
|
|
||||||
private String model;
|
|
||||||
|
|
||||||
@Schema(description = "说明1")
|
|
||||||
private String descriptionOne;
|
|
||||||
|
|
||||||
@Schema(description = "尺寸")
|
|
||||||
private String sizeText;
|
|
||||||
|
|
||||||
@Schema(description = "说明2")
|
|
||||||
private String descriptionTwo;
|
|
||||||
|
|
||||||
@Schema(description = "数据来源")
|
|
||||||
private String dataSource;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 常用线路实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_common_route")
|
|
||||||
@Schema(description = "常用线路")
|
|
||||||
public class CommonRoute extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "线路编号")
|
|
||||||
private String routeCode;
|
|
||||||
|
|
||||||
@Schema(description = "线路名称")
|
|
||||||
private String routeName;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址ID")
|
|
||||||
private Long departureAddressId;
|
|
||||||
|
|
||||||
@Schema(description = "发货地")
|
|
||||||
private String departureName;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址")
|
|
||||||
private String departureAddress;
|
|
||||||
|
|
||||||
@Schema(description = "发货经度")
|
|
||||||
private BigDecimal departureLongitude;
|
|
||||||
|
|
||||||
@Schema(description = "发货纬度")
|
|
||||||
private BigDecimal departureLatitude;
|
|
||||||
|
|
||||||
@Schema(description = "发货联系人")
|
|
||||||
private String departureContact;
|
|
||||||
|
|
||||||
@Schema(description = "发货联系方式")
|
|
||||||
private String departurePhone;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址ID")
|
|
||||||
private Long arrivalAddressId;
|
|
||||||
|
|
||||||
@Schema(description = "收货地")
|
|
||||||
private String arrivalName;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址")
|
|
||||||
private String arrivalAddress;
|
|
||||||
|
|
||||||
@Schema(description = "收货经度")
|
|
||||||
private BigDecimal arrivalLongitude;
|
|
||||||
|
|
||||||
@Schema(description = "收货纬度")
|
|
||||||
private BigDecimal arrivalLatitude;
|
|
||||||
|
|
||||||
@Schema(description = "收货联系人")
|
|
||||||
private String arrivalContact;
|
|
||||||
|
|
||||||
@Schema(description = "收货联系方式")
|
|
||||||
private String arrivalPhone;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,163 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同管理实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_contract_manage")
|
|
||||||
@Schema(description = "合同管理")
|
|
||||||
public class ContractManage extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "合同编号")
|
|
||||||
private String contractNo;
|
|
||||||
|
|
||||||
@Schema(description = "合同名称")
|
|
||||||
private String contractName;
|
|
||||||
|
|
||||||
@Schema(description = "所属项目ID")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "所属项目")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long organizationId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String organizationName;
|
|
||||||
|
|
||||||
@Schema(description = "合同类别")
|
|
||||||
private String contractCategory;
|
|
||||||
|
|
||||||
@Schema(description = "签约类型")
|
|
||||||
private String signType;
|
|
||||||
|
|
||||||
@Schema(description = "甲方")
|
|
||||||
private String partyA;
|
|
||||||
|
|
||||||
@Schema(description = "乙方")
|
|
||||||
private String partyB;
|
|
||||||
|
|
||||||
@Schema(description = "开始日期")
|
|
||||||
private LocalDate startDate;
|
|
||||||
|
|
||||||
@Schema(description = "结束日期")
|
|
||||||
private LocalDate endDate;
|
|
||||||
|
|
||||||
@Schema(description = "临时效力起")
|
|
||||||
private LocalDate temporaryStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "临时效力止")
|
|
||||||
private LocalDate temporaryEndDate;
|
|
||||||
|
|
||||||
@Schema(description = "经办人ID")
|
|
||||||
private Long handlerUserId;
|
|
||||||
|
|
||||||
@Schema(description = "经办人")
|
|
||||||
private String handlerUserName;
|
|
||||||
|
|
||||||
@Schema(description = "签订日期")
|
|
||||||
private LocalDate signDate;
|
|
||||||
|
|
||||||
@Schema(description = "结算方式")
|
|
||||||
private String settlementMode;
|
|
||||||
|
|
||||||
@Schema(description = "合同格式")
|
|
||||||
private String contractFormat;
|
|
||||||
|
|
||||||
@Schema(description = "是否需要加盖法人章")
|
|
||||||
private Integer legalSealFlag;
|
|
||||||
|
|
||||||
@Schema(description = "一式份数")
|
|
||||||
private Integer copyCount;
|
|
||||||
|
|
||||||
@Schema(description = "回款账期(天)")
|
|
||||||
private Integer paymentDays;
|
|
||||||
|
|
||||||
@Schema(description = "合同阶段")
|
|
||||||
private String contractStage;
|
|
||||||
|
|
||||||
@Schema(description = "审核状态")
|
|
||||||
private String approvalStatus;
|
|
||||||
|
|
||||||
@Schema(description = "当前节点")
|
|
||||||
private String currentNode;
|
|
||||||
|
|
||||||
@Schema(description = "当前处理人")
|
|
||||||
private String currentProcessor;
|
|
||||||
|
|
||||||
@Schema(description = "审核通过时间")
|
|
||||||
private LocalDateTime approvedTime;
|
|
||||||
|
|
||||||
@Schema(description = "计费信息开关")
|
|
||||||
private Integer billingEnabled;
|
|
||||||
|
|
||||||
@Schema(description = "合同主文件JSON")
|
|
||||||
private String contractFileJson;
|
|
||||||
|
|
||||||
@Schema(description = "其它附件JSON")
|
|
||||||
private String attachmentsJson;
|
|
||||||
|
|
||||||
@Schema(description = "计费方案JSON")
|
|
||||||
private String billingPlanJson;
|
|
||||||
|
|
||||||
@Schema(description = "结算生成规则JSON")
|
|
||||||
private String settlementRuleJson;
|
|
||||||
|
|
||||||
@Schema(description = "对账配置JSON")
|
|
||||||
private String reconciliationJson;
|
|
||||||
|
|
||||||
@Schema(description = "变更记录JSON")
|
|
||||||
private String changeRecordJson;
|
|
||||||
|
|
||||||
@Schema(description = "变更内容")
|
|
||||||
private String changeContent;
|
|
||||||
|
|
||||||
@Schema(description = "变更原因")
|
|
||||||
private String changeReason;
|
|
||||||
|
|
||||||
@Schema(description = "终止原因")
|
|
||||||
private String terminateReason;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -71,12 +71,6 @@ public class CustomerArchive extends TenantEntity {
|
|||||||
@Schema(description = "注册/实际经营地址")
|
@Schema(description = "注册/实际经营地址")
|
||||||
private String registeredAddress;
|
private String registeredAddress;
|
||||||
|
|
||||||
@Schema(description = "注册地址行政区划")
|
|
||||||
private String registeredRegionName;
|
|
||||||
|
|
||||||
@Schema(description = "注册地址详细地址")
|
|
||||||
private String registeredDetailAddress;
|
|
||||||
|
|
||||||
@Schema(description = "法人/负责人")
|
@Schema(description = "法人/负责人")
|
||||||
private String legalPerson;
|
private String legalPerson;
|
||||||
|
|
||||||
@@ -86,9 +80,6 @@ public class CustomerArchive extends TenantEntity {
|
|||||||
@Schema(description = "所属组织ID")
|
@Schema(description = "所属组织ID")
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
@Schema(description = "所属组织ID集合")
|
|
||||||
private String deptIds;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
@Schema(description = "所属组织")
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
@@ -125,7 +116,7 @@ public class CustomerArchive extends TenantEntity {
|
|||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@Schema(description = "客商材料JSON")
|
@Schema(description = "资质附件JSON")
|
||||||
private String qualificationAttachments;
|
private String qualificationAttachments;
|
||||||
|
|
||||||
@Schema(description = "准入类型:temporary/formal")
|
@Schema(description = "准入类型:temporary/formal")
|
||||||
|
|||||||
@@ -59,18 +59,6 @@ public class CustomerContact extends TenantEntity {
|
|||||||
@Schema(description = "邮箱")
|
@Schema(description = "邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@Schema(description = "行政区划")
|
|
||||||
private String regionName;
|
|
||||||
|
|
||||||
@Schema(description = "详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
|
|
||||||
@Schema(description = "联系地址")
|
|
||||||
private String contactAddress;
|
|
||||||
|
|
||||||
@Schema(description = "所属分公司/事业部")
|
|
||||||
private String branchName;
|
|
||||||
|
|
||||||
@Schema(description = "职务")
|
@Schema(description = "职务")
|
||||||
private String positionName;
|
private String positionName;
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,6 @@ public class CustomerCreditScore extends TenantEntity {
|
|||||||
@Schema(description = "最终得分")
|
@Schema(description = "最终得分")
|
||||||
private BigDecimal finalScore;
|
private BigDecimal finalScore;
|
||||||
|
|
||||||
@Schema(description = "得分率")
|
|
||||||
private BigDecimal scoreRate;
|
|
||||||
|
|
||||||
@Schema(description = "信用等级")
|
@Schema(description = "信用等级")
|
||||||
private String creditLevel;
|
private String creditLevel;
|
||||||
|
|
||||||
@@ -80,15 +77,6 @@ public class CustomerCreditScore extends TenantEntity {
|
|||||||
@Schema(description = "拟申请总资金使用额度(万元)")
|
@Schema(description = "拟申请总资金使用额度(万元)")
|
||||||
private BigDecimal applyCreditLimit;
|
private BigDecimal applyCreditLimit;
|
||||||
|
|
||||||
@Schema(description = "临时申请额度(万元)")
|
|
||||||
private BigDecimal tempApplyCreditLimit;
|
|
||||||
|
|
||||||
@Schema(description = "临时额度开始日期")
|
|
||||||
private LocalDate tempCreditStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "临时额度结束日期")
|
|
||||||
private LocalDate tempCreditEndDate;
|
|
||||||
|
|
||||||
@Schema(description = "自评状态")
|
@Schema(description = "自评状态")
|
||||||
private String selfStatus;
|
private String selfStatus;
|
||||||
|
|
||||||
|
|||||||
@@ -80,9 +80,6 @@ public class CustomerCreditScoreDetail extends TenantEntity {
|
|||||||
@Schema(description = "得分说明")
|
@Schema(description = "得分说明")
|
||||||
private String scoreDescription;
|
private String scoreDescription;
|
||||||
|
|
||||||
@Schema(description = "评分项目配置最高得分")
|
|
||||||
private BigDecimal score;
|
|
||||||
|
|
||||||
@Schema(description = "自评得分")
|
@Schema(description = "自评得分")
|
||||||
private BigDecimal selfScore;
|
private BigDecimal selfScore;
|
||||||
|
|
||||||
|
|||||||
@@ -68,12 +68,6 @@ public class CustomerInvoiceInfo extends TenantEntity {
|
|||||||
@Schema(description = "注册地址")
|
@Schema(description = "注册地址")
|
||||||
private String registeredAddress;
|
private String registeredAddress;
|
||||||
|
|
||||||
@Schema(description = "注册地址行政区划")
|
|
||||||
private String registeredRegionName;
|
|
||||||
|
|
||||||
@Schema(description = "注册地址详细地址")
|
|
||||||
private String registeredDetailAddress;
|
|
||||||
|
|
||||||
@Schema(description = "邮箱")
|
@Schema(description = "邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@@ -86,12 +80,6 @@ public class CustomerInvoiceInfo extends TenantEntity {
|
|||||||
@Schema(description = "收件人地址")
|
@Schema(description = "收件人地址")
|
||||||
private String receiverAddress;
|
private String receiverAddress;
|
||||||
|
|
||||||
@Schema(description = "收件人地址行政区划")
|
|
||||||
private String receiverRegionName;
|
|
||||||
|
|
||||||
@Schema(description = "收件人详细地址")
|
|
||||||
private String receiverDetailAddress;
|
|
||||||
|
|
||||||
@Schema(description = "是否默认")
|
@Schema(description = "是否默认")
|
||||||
private Integer isDefault;
|
private Integer isDefault;
|
||||||
|
|
||||||
|
|||||||
@@ -53,9 +53,6 @@ public class CustomerReceiptAccount extends TenantEntity {
|
|||||||
@Schema(description = "收款方名称")
|
@Schema(description = "收款方名称")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@Schema(description = "开户人姓名")
|
|
||||||
private String accountHolderName;
|
|
||||||
|
|
||||||
@Schema(description = "开户行名称")
|
@Schema(description = "开户行名称")
|
||||||
private String bankName;
|
private String bankName;
|
||||||
|
|
||||||
@@ -74,7 +71,4 @@ public class CustomerReceiptAccount extends TenantEntity {
|
|||||||
@Schema(description = "是否默认")
|
@Schema(description = "是否默认")
|
||||||
private Integer isDefault;
|
private Integer isDefault;
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,7 @@ public class MileageRecord extends TenantEntity {
|
|||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "车船类型")
|
@Schema(description = "车牌号")
|
||||||
private String vehicleType;
|
|
||||||
|
|
||||||
@Schema(description = "车牌号/船号")
|
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@Schema(description = "上月统计里程")
|
@Schema(description = "上月统计里程")
|
||||||
@@ -66,9 +63,6 @@ public class MileageRecord extends TenantEntity {
|
|||||||
@Schema(description = "累计行驶里程")
|
@Schema(description = "累计行驶里程")
|
||||||
private BigDecimal totalMileage;
|
private BigDecimal totalMileage;
|
||||||
|
|
||||||
@Schema(description = "里程单位")
|
|
||||||
private String mileageUnit;
|
|
||||||
|
|
||||||
@Schema(description = "附件")
|
@Schema(description = "附件")
|
||||||
private String attachments;
|
private String attachments;
|
||||||
|
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 过程配置实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_process_config")
|
|
||||||
@Schema(description = "过程配置")
|
|
||||||
public class ProcessConfig extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "配置编号")
|
|
||||||
private String configCode;
|
|
||||||
|
|
||||||
@Schema(description = "配置名称")
|
|
||||||
private String configName;
|
|
||||||
|
|
||||||
@Schema(description = "项目ID集合")
|
|
||||||
private String projectIds;
|
|
||||||
|
|
||||||
@Schema(description = "项目")
|
|
||||||
private String projectNames;
|
|
||||||
|
|
||||||
@Schema(description = "包含过程节点")
|
|
||||||
private String includedNodes;
|
|
||||||
|
|
||||||
@Schema(description = "默认后台完成运输天数")
|
|
||||||
private Integer defaultFinishDays;
|
|
||||||
|
|
||||||
@Schema(description = "过程节点配置")
|
|
||||||
private String nodeConfigJson;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目立项实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_project_apply")
|
|
||||||
@Schema(description = "项目立项")
|
|
||||||
public class ProjectApply extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "立项申请单号")
|
|
||||||
private String applyNo;
|
|
||||||
|
|
||||||
@Schema(description = "项目编号")
|
|
||||||
private String projectCode;
|
|
||||||
|
|
||||||
@Schema(description = "项目名称")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@Schema(description = "项目简称")
|
|
||||||
private String projectShortName;
|
|
||||||
|
|
||||||
@Schema(description = "项目类型")
|
|
||||||
private String projectType;
|
|
||||||
|
|
||||||
@Schema(description = "业务部门ID")
|
|
||||||
private Long businessDeptId;
|
|
||||||
|
|
||||||
@Schema(description = "业务部门")
|
|
||||||
private String businessDeptName;
|
|
||||||
|
|
||||||
@Schema(description = "承办部门ID")
|
|
||||||
private Long undertakeDeptId;
|
|
||||||
|
|
||||||
@Schema(description = "承办部门")
|
|
||||||
private String undertakeDeptName;
|
|
||||||
|
|
||||||
@Schema(description = "项目由来")
|
|
||||||
private String projectSource;
|
|
||||||
|
|
||||||
@Schema(description = "项目由来说明")
|
|
||||||
private String sourceRemark;
|
|
||||||
|
|
||||||
@Schema(description = "项目资金使用额度(万元)")
|
|
||||||
private BigDecimal fundLimit;
|
|
||||||
|
|
||||||
@Schema(description = "项目应收账款额度(万元)")
|
|
||||||
private BigDecimal receivableLimit;
|
|
||||||
|
|
||||||
@Schema(description = "应收账款回款期限(天)")
|
|
||||||
private Integer receivableDays;
|
|
||||||
|
|
||||||
@Schema(description = "回款账期(天)")
|
|
||||||
private Integer paymentDays;
|
|
||||||
|
|
||||||
@Schema(description = "货物类型")
|
|
||||||
private String cargoType;
|
|
||||||
|
|
||||||
@Schema(description = "预估货物数量")
|
|
||||||
private String cargoQuantity;
|
|
||||||
|
|
||||||
@Schema(description = "业务周期开始日期")
|
|
||||||
private LocalDate businessStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "业务周期结束日期")
|
|
||||||
private LocalDate businessEndDate;
|
|
||||||
|
|
||||||
@Schema(description = "运输线路")
|
|
||||||
private String transportRoute;
|
|
||||||
|
|
||||||
@Schema(description = "运输类型")
|
|
||||||
private String transportType;
|
|
||||||
|
|
||||||
@Schema(description = "业务类型")
|
|
||||||
private String businessType;
|
|
||||||
|
|
||||||
@Schema(description = "项目规模(万元)")
|
|
||||||
private BigDecimal projectScale;
|
|
||||||
|
|
||||||
@Schema(description = "预计利润(万元)")
|
|
||||||
private BigDecimal estimatedProfit;
|
|
||||||
|
|
||||||
@Schema(description = "资金需求(万元)")
|
|
||||||
private BigDecimal fundDemand;
|
|
||||||
|
|
||||||
@Schema(description = "结算方式")
|
|
||||||
private String settlementMode;
|
|
||||||
|
|
||||||
@Schema(description = "项目经办人ID")
|
|
||||||
private Long handlerUserId;
|
|
||||||
|
|
||||||
@Schema(description = "项目经办人")
|
|
||||||
private String handlerUserName;
|
|
||||||
|
|
||||||
@Schema(description = "项目负责人ID")
|
|
||||||
private Long principalUserId;
|
|
||||||
|
|
||||||
@Schema(description = "项目负责人")
|
|
||||||
private String principalUserName;
|
|
||||||
|
|
||||||
@Schema(description = "客户名称")
|
|
||||||
private String customerNames;
|
|
||||||
|
|
||||||
@Schema(description = "下游承运商")
|
|
||||||
private String carrierNames;
|
|
||||||
|
|
||||||
@Schema(description = "客户信息JSON")
|
|
||||||
private String customerJson;
|
|
||||||
|
|
||||||
@Schema(description = "承运商信息JSON")
|
|
||||||
private String carrierJson;
|
|
||||||
|
|
||||||
@Schema(description = "项目情况说明")
|
|
||||||
private String situationRemark;
|
|
||||||
|
|
||||||
@Schema(description = "项目附件JSON")
|
|
||||||
private String attachmentsJson;
|
|
||||||
|
|
||||||
@Schema(description = "审批状态")
|
|
||||||
private String approvalStatus;
|
|
||||||
|
|
||||||
@Schema(description = "当前节点")
|
|
||||||
private String currentNode;
|
|
||||||
|
|
||||||
@Schema(description = "当前处理人")
|
|
||||||
private String currentProcessor;
|
|
||||||
|
|
||||||
@Schema(description = "生效类型")
|
|
||||||
private String effectiveType;
|
|
||||||
|
|
||||||
@Schema(description = "审核通过时间")
|
|
||||||
private LocalDateTime approvedTime;
|
|
||||||
|
|
||||||
@Schema(description = "变更内容")
|
|
||||||
private String changeContent;
|
|
||||||
|
|
||||||
@Schema(description = "变更原因")
|
|
||||||
private String changeReason;
|
|
||||||
|
|
||||||
@Schema(description = "作废原因")
|
|
||||||
private String voidReason;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发货模板实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_shipping_template")
|
|
||||||
@Schema(description = "发货模板")
|
|
||||||
public class ShippingTemplate extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "模板编号")
|
|
||||||
private String templateCode;
|
|
||||||
|
|
||||||
@Schema(description = "模板名称")
|
|
||||||
private String templateName;
|
|
||||||
|
|
||||||
@Schema(description = "模板类型")
|
|
||||||
private String templateType;
|
|
||||||
|
|
||||||
@Schema(description = "项目ID")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "项目")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@Schema(description = "客户合同ID")
|
|
||||||
private Long contractId;
|
|
||||||
|
|
||||||
@Schema(description = "客户合同")
|
|
||||||
private String contractName;
|
|
||||||
|
|
||||||
@Schema(description = "运输类型")
|
|
||||||
private String transportType;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址ID")
|
|
||||||
private Long departureAddressId;
|
|
||||||
|
|
||||||
@Schema(description = "发货地")
|
|
||||||
private String departureName;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址")
|
|
||||||
private String departureAddress;
|
|
||||||
|
|
||||||
@Schema(description = "发货联系人")
|
|
||||||
private String departureContact;
|
|
||||||
|
|
||||||
@Schema(description = "发货联系方式")
|
|
||||||
private String departurePhone;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址ID")
|
|
||||||
private Long arrivalAddressId;
|
|
||||||
|
|
||||||
@Schema(description = "收货地")
|
|
||||||
private String arrivalName;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址")
|
|
||||||
private String arrivalAddress;
|
|
||||||
|
|
||||||
@Schema(description = "收货联系人")
|
|
||||||
private String arrivalContact;
|
|
||||||
|
|
||||||
@Schema(description = "收货联系方式")
|
|
||||||
private String arrivalPhone;
|
|
||||||
|
|
||||||
@Schema(description = "货物信息")
|
|
||||||
private String goodsJson;
|
|
||||||
|
|
||||||
@Schema(description = "运费信息")
|
|
||||||
private String freightJson;
|
|
||||||
|
|
||||||
@Schema(description = "附件")
|
|
||||||
private String attachmentsJson;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 临时额度申请实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_temporary_credit_limit")
|
|
||||||
@Schema(description = "临时额度申请")
|
|
||||||
public class TemporaryCreditLimit extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "申请单号")
|
|
||||||
private String applicationNo;
|
|
||||||
|
|
||||||
@Schema(description = "项目ID")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "项目编号")
|
|
||||||
private String projectCode;
|
|
||||||
|
|
||||||
@Schema(description = "项目名称")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@Schema(description = "承办部门ID")
|
|
||||||
private Long undertakeDeptId;
|
|
||||||
|
|
||||||
@Schema(description = "承办部门")
|
|
||||||
private String undertakeDeptName;
|
|
||||||
|
|
||||||
@Schema(description = "项目资金使用额度(万元)")
|
|
||||||
private BigDecimal projectFundLimit;
|
|
||||||
|
|
||||||
@Schema(description = "已使用项目资金额度(万元)")
|
|
||||||
private BigDecimal usedFundLimit;
|
|
||||||
|
|
||||||
@Schema(description = "剩余项目资金使用额度(万元)")
|
|
||||||
private BigDecimal remainingFundLimit;
|
|
||||||
|
|
||||||
@Schema(description = "申请临时额度(万元)")
|
|
||||||
private BigDecimal applyLimit;
|
|
||||||
|
|
||||||
@Schema(description = "申请有效期至")
|
|
||||||
private LocalDate validUntil;
|
|
||||||
|
|
||||||
@Schema(description = "申请部门ID")
|
|
||||||
private Long applyDeptId;
|
|
||||||
|
|
||||||
@Schema(description = "申请部门")
|
|
||||||
private String applyDeptName;
|
|
||||||
|
|
||||||
@Schema(description = "申请人ID")
|
|
||||||
private Long applicantId;
|
|
||||||
|
|
||||||
@Schema(description = "申请人")
|
|
||||||
private String applicantName;
|
|
||||||
|
|
||||||
@Schema(description = "审批状态")
|
|
||||||
private String approvalStatus;
|
|
||||||
|
|
||||||
@Schema(description = "当前节点")
|
|
||||||
private String currentNode;
|
|
||||||
|
|
||||||
@Schema(description = "当前处理人")
|
|
||||||
private String currentProcessor;
|
|
||||||
|
|
||||||
@Schema(description = "审核通过时间")
|
|
||||||
private LocalDateTime approvedTime;
|
|
||||||
|
|
||||||
@Schema(description = "附件JSON")
|
|
||||||
private String attachmentsJson;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运输计划实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_transport_plan")
|
|
||||||
@Schema(description = "运输计划")
|
|
||||||
public class TransportPlan extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "计划单号")
|
|
||||||
private String planNo;
|
|
||||||
|
|
||||||
@Schema(description = "计划名称")
|
|
||||||
private String planName;
|
|
||||||
|
|
||||||
@Schema(description = "项目ID")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "项目")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@Schema(description = "客户合同ID")
|
|
||||||
private Long contractId;
|
|
||||||
|
|
||||||
@Schema(description = "客户合同")
|
|
||||||
private String contractName;
|
|
||||||
|
|
||||||
@Schema(description = "客户名称")
|
|
||||||
private String customerName;
|
|
||||||
|
|
||||||
@Schema(description = "运输类型")
|
|
||||||
private String transportType;
|
|
||||||
|
|
||||||
@Schema(description = "计划开始日期")
|
|
||||||
private LocalDate planStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "计划结束日期")
|
|
||||||
private LocalDate planEndDate;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址ID")
|
|
||||||
private Long departureAddressId;
|
|
||||||
|
|
||||||
@Schema(description = "发货地")
|
|
||||||
private String departureName;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址")
|
|
||||||
private String departureAddress;
|
|
||||||
|
|
||||||
@Schema(description = "发货联系人")
|
|
||||||
private String departureContact;
|
|
||||||
|
|
||||||
@Schema(description = "发货联系方式")
|
|
||||||
private String departurePhone;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址ID")
|
|
||||||
private Long arrivalAddressId;
|
|
||||||
|
|
||||||
@Schema(description = "收货地")
|
|
||||||
private String arrivalName;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址")
|
|
||||||
private String arrivalAddress;
|
|
||||||
|
|
||||||
@Schema(description = "收货联系人")
|
|
||||||
private String arrivalContact;
|
|
||||||
|
|
||||||
@Schema(description = "收货联系方式")
|
|
||||||
private String arrivalPhone;
|
|
||||||
|
|
||||||
@Schema(description = "货物信息")
|
|
||||||
private String goodsJson;
|
|
||||||
|
|
||||||
@Schema(description = "附件")
|
|
||||||
private String attachmentsJson;
|
|
||||||
|
|
||||||
@Schema(description = "数据来源")
|
|
||||||
private String dataSource;
|
|
||||||
|
|
||||||
@Schema(description = "业务状态")
|
|
||||||
private String businessStatus;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -32,7 +32,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
import org.springblade.core.tenant.mp.TenantEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,66 +57,12 @@ public class TransportShip extends TenantEntity {
|
|||||||
@Schema(description = "所属组织")
|
@Schema(description = "所属组织")
|
||||||
private String organizationName;
|
private String organizationName;
|
||||||
|
|
||||||
@Schema(description = "安放龙骨日期")
|
|
||||||
private LocalDate keelLayingDate;
|
|
||||||
|
|
||||||
@Schema(description = "建造完工日期")
|
|
||||||
private LocalDate buildCompletionDate;
|
|
||||||
|
|
||||||
@Schema(description = "总长")
|
|
||||||
private BigDecimal totalLength;
|
|
||||||
|
|
||||||
@Schema(description = "船宽")
|
|
||||||
private BigDecimal shipWidth;
|
|
||||||
|
|
||||||
@Schema(description = "型深")
|
|
||||||
private BigDecimal moldedDepth;
|
|
||||||
|
|
||||||
@Schema(description = "最大船高")
|
|
||||||
private BigDecimal maxShipHeight;
|
|
||||||
|
|
||||||
@Schema(description = "空载吃水")
|
|
||||||
private BigDecimal lightDraft;
|
|
||||||
|
|
||||||
@Schema(description = "满载吃水")
|
|
||||||
private BigDecimal fullLoadDraft;
|
|
||||||
|
|
||||||
@Schema(description = "航区")
|
|
||||||
private String navigationArea;
|
|
||||||
|
|
||||||
@Schema(description = "所有权登记号码")
|
|
||||||
private String ownershipRegistrationNo;
|
|
||||||
|
|
||||||
@Schema(description = "初次登记号码")
|
|
||||||
private String initialRegistrationNo;
|
|
||||||
|
|
||||||
@Schema(description = "船舶所有人")
|
|
||||||
private String shipOwner;
|
|
||||||
|
|
||||||
@Schema(description = "取得所有权日期")
|
|
||||||
private LocalDate ownershipAcquisitionDate;
|
|
||||||
|
|
||||||
@Schema(description = "船检登记号")
|
@Schema(description = "船检登记号")
|
||||||
private String shipInspectionNo;
|
private String shipInspectionNo;
|
||||||
|
|
||||||
@Schema(description = "船舶类型")
|
@Schema(description = "船舶类型")
|
||||||
private String shipType;
|
private String shipType;
|
||||||
|
|
||||||
@Schema(description = "总吨")
|
|
||||||
private BigDecimal grossTonnage;
|
|
||||||
|
|
||||||
@Schema(description = "净吨")
|
|
||||||
private BigDecimal netTonnage;
|
|
||||||
|
|
||||||
@Schema(description = "船舶所有权证书图片")
|
|
||||||
private String ownershipCertImage;
|
|
||||||
|
|
||||||
@Schema(description = "内河船舶安全与环保证书图片")
|
|
||||||
private String safetyCertImage;
|
|
||||||
|
|
||||||
@Schema(description = "国籍证有效期自")
|
|
||||||
private LocalDate nationalityCertStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "国籍证有效期至")
|
@Schema(description = "国籍证有效期至")
|
||||||
private LocalDate nationalityCertEndDate;
|
private LocalDate nationalityCertEndDate;
|
||||||
|
|
||||||
@@ -127,9 +72,6 @@ public class TransportShip extends TenantEntity {
|
|||||||
@Schema(description = "国籍证图片")
|
@Schema(description = "国籍证图片")
|
||||||
private String nationalityCertImage;
|
private String nationalityCertImage;
|
||||||
|
|
||||||
@Schema(description = "最低安全配员证书有效期自")
|
|
||||||
private LocalDate safeManningCertStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "最低安全配员证书有效期至")
|
@Schema(description = "最低安全配员证书有效期至")
|
||||||
private LocalDate safeManningCertEndDate;
|
private LocalDate safeManningCertEndDate;
|
||||||
|
|
||||||
@@ -139,12 +81,6 @@ public class TransportShip extends TenantEntity {
|
|||||||
@Schema(description = "最低安全配员证书图片")
|
@Schema(description = "最低安全配员证书图片")
|
||||||
private String safeManningCertImage;
|
private String safeManningCertImage;
|
||||||
|
|
||||||
@Schema(description = "营业运输证编号")
|
|
||||||
private String businessTransportCertNo;
|
|
||||||
|
|
||||||
@Schema(description = "营业运输证发证日期")
|
|
||||||
private LocalDate businessTransportCertIssueDate;
|
|
||||||
|
|
||||||
@Schema(description = "营业运输证有效期至")
|
@Schema(description = "营业运输证有效期至")
|
||||||
private LocalDate businessTransportCertEndDate;
|
private LocalDate businessTransportCertEndDate;
|
||||||
|
|
||||||
@@ -154,9 +90,6 @@ public class TransportShip extends TenantEntity {
|
|||||||
@Schema(description = "营业运输证图片")
|
@Schema(description = "营业运输证图片")
|
||||||
private String businessTransportCertImage;
|
private String businessTransportCertImage;
|
||||||
|
|
||||||
@Schema(description = "起租日期")
|
|
||||||
private LocalDate leaseStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "承租有效期至")
|
@Schema(description = "承租有效期至")
|
||||||
private LocalDate leaseEndDate;
|
private LocalDate leaseEndDate;
|
||||||
|
|
||||||
@@ -166,12 +99,6 @@ public class TransportShip extends TenantEntity {
|
|||||||
@Schema(description = "承租合同图片")
|
@Schema(description = "承租合同图片")
|
||||||
private String leaseContractImage;
|
private String leaseContractImage;
|
||||||
|
|
||||||
@Schema(description = "船舶承租人")
|
|
||||||
private String shipLessee;
|
|
||||||
|
|
||||||
@Schema(description = "船舶经营人")
|
|
||||||
private String shipOperator;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|||||||
@@ -58,11 +58,6 @@ public class TransportVehicle extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "车牌号")
|
@Schema(description = "车牌号")
|
||||||
private String plateNo;
|
private String plateNo;
|
||||||
/**
|
|
||||||
* 车牌颜色
|
|
||||||
*/
|
|
||||||
@Schema(description = "车牌颜色")
|
|
||||||
private String plateColor;
|
|
||||||
/**
|
/**
|
||||||
* 车辆类型
|
* 车辆类型
|
||||||
*/
|
*/
|
||||||
@@ -139,25 +134,10 @@ public class TransportVehicle extends TenantEntity {
|
|||||||
@Schema(description = "行驶证长期有效")
|
@Schema(description = "行驶证长期有效")
|
||||||
private Integer drivingLicenseLongTerm;
|
private Integer drivingLicenseLongTerm;
|
||||||
/**
|
/**
|
||||||
* 行驶证主页正面
|
* 行驶证图片
|
||||||
*/
|
*/
|
||||||
@Schema(description = "行驶证主页正面")
|
@Schema(description = "行驶证图片")
|
||||||
private String drivingLicenseImage;
|
private String drivingLicenseImage;
|
||||||
/**
|
|
||||||
* 行驶证主页反面
|
|
||||||
*/
|
|
||||||
@Schema(description = "行驶证主页反面")
|
|
||||||
private String drivingLicenseMainBack;
|
|
||||||
/**
|
|
||||||
* 行驶证副页正面
|
|
||||||
*/
|
|
||||||
@Schema(description = "行驶证副页正面")
|
|
||||||
private String drivingLicenseViceFront;
|
|
||||||
/**
|
|
||||||
* 行驶证副页反面
|
|
||||||
*/
|
|
||||||
@Schema(description = "行驶证副页反面")
|
|
||||||
private String drivingLicenseViceBack;
|
|
||||||
/**
|
/**
|
||||||
* 道路运输证号
|
* 道路运输证号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,150 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单管理实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@TableName("blade_waybill")
|
|
||||||
@Schema(description = "运单管理")
|
|
||||||
public class Waybill extends TenantEntity {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "运单号")
|
|
||||||
private String waybillNo;
|
|
||||||
|
|
||||||
@Schema(description = "项目ID")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "项目")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@Schema(description = "客户合同ID")
|
|
||||||
private Long contractId;
|
|
||||||
|
|
||||||
@Schema(description = "客户合同")
|
|
||||||
private String contractName;
|
|
||||||
|
|
||||||
@Schema(description = "客户名称")
|
|
||||||
private String customerName;
|
|
||||||
|
|
||||||
@Schema(description = "运输类型")
|
|
||||||
private String transportType;
|
|
||||||
|
|
||||||
@Schema(description = "货物名称")
|
|
||||||
private String cargoName;
|
|
||||||
|
|
||||||
@Schema(description = "货物类型")
|
|
||||||
private String cargoType;
|
|
||||||
|
|
||||||
@Schema(description = "发货地址")
|
|
||||||
private String departureAddress;
|
|
||||||
|
|
||||||
@Schema(description = "收货地址")
|
|
||||||
private String arrivalAddress;
|
|
||||||
|
|
||||||
@Schema(description = "承运商名称")
|
|
||||||
private String carrierName;
|
|
||||||
|
|
||||||
@Schema(description = "司机姓名")
|
|
||||||
private String driverName;
|
|
||||||
|
|
||||||
@Schema(description = "车/船/航班/班列号")
|
|
||||||
private String vehicleNo;
|
|
||||||
|
|
||||||
@Schema(description = "原始单号")
|
|
||||||
private String originalNo;
|
|
||||||
|
|
||||||
@Schema(description = "业务状态")
|
|
||||||
private String businessStatus;
|
|
||||||
|
|
||||||
@Schema(description = "数据来源")
|
|
||||||
private String dataSource;
|
|
||||||
|
|
||||||
@Schema(description = "开始日期")
|
|
||||||
private LocalDate startDate;
|
|
||||||
|
|
||||||
@Schema(description = "结束日期")
|
|
||||||
private LocalDate endDate;
|
|
||||||
|
|
||||||
@Schema(description = "运输计划ID")
|
|
||||||
private Long planId;
|
|
||||||
|
|
||||||
@Schema(description = "计划名称")
|
|
||||||
private String planName;
|
|
||||||
|
|
||||||
@Schema(description = "多联总单")
|
|
||||||
private String masterNo;
|
|
||||||
|
|
||||||
@Schema(description = "配载单号")
|
|
||||||
private String loadingNo;
|
|
||||||
|
|
||||||
@Schema(description = "运单批次号")
|
|
||||||
private String batchNo;
|
|
||||||
|
|
||||||
@Schema(description = "关联单号")
|
|
||||||
private String relationNo;
|
|
||||||
|
|
||||||
@Schema(description = "当前过程节点")
|
|
||||||
private String currentProcessNode;
|
|
||||||
|
|
||||||
@Schema(description = "货物信息")
|
|
||||||
private String goodsJson;
|
|
||||||
|
|
||||||
@Schema(description = "承运信息")
|
|
||||||
private String carrierJson;
|
|
||||||
|
|
||||||
@Schema(description = "过程节点")
|
|
||||||
private String processJson;
|
|
||||||
|
|
||||||
@Schema(description = "费用信息")
|
|
||||||
private String freightJson;
|
|
||||||
|
|
||||||
@Schema(description = "附件")
|
|
||||||
private String attachmentsJson;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织ID")
|
|
||||||
private Long deptId;
|
|
||||||
|
|
||||||
@Schema(description = "所属组织")
|
|
||||||
private String deptName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* Author: Chill Zhuang (bladejava@qq.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.springblade.transport.pojo.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 业务批量删除结果
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Schema(description = "业务批量删除结果")
|
|
||||||
public class BusinessRemoveResultVO implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "删除成功数量")
|
|
||||||
private Integer successCount = 0;
|
|
||||||
|
|
||||||
@Schema(description = "跳过数量")
|
|
||||||
private Integer skippedCount = 0;
|
|
||||||
|
|
||||||
@Schema(description = "跳过编号")
|
|
||||||
private List<String> skippedCodes = new ArrayList<>();
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.CommonCargo;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 常用货物视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "常用货物")
|
|
||||||
public class CommonCargoVO extends CommonCargo {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.CommonRoute;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 常用线路视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "常用线路")
|
|
||||||
public class CommonRouteVO extends CommonRoute {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.ContractManage;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同管理视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "合同管理")
|
|
||||||
public class ContractManageVO extends ContractManage {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "到期快捷筛选")
|
|
||||||
private String expireScope;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "合同阶段名称")
|
|
||||||
private String contractStageName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "审核状态名称")
|
|
||||||
private String approvalStatusName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -49,12 +49,4 @@ public class CustomerCreditScoreVO extends CustomerCreditScore {
|
|||||||
@Schema(description = "评分明细")
|
@Schema(description = "评分明细")
|
||||||
private List<CustomerCreditScoreDetailVO> details = new ArrayList<>();
|
private List<CustomerCreditScoreDetailVO> details = new ArrayList<>();
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "证明材料")
|
|
||||||
private Object attachments;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "评估标准")
|
|
||||||
private List<CreditRatingStandardVO> standards = new ArrayList<>();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.ProcessConfig;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 过程配置视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "过程配置")
|
|
||||||
public class ProcessConfigVO extends ProcessConfig {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "状态名称")
|
|
||||||
private String statusName;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.ProjectApply;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目立项视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "项目立项")
|
|
||||||
public class ProjectApplyVO extends ProjectApply {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "审批状态名称")
|
|
||||||
private String approvalStatusName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "生效类型名称")
|
|
||||||
private String effectiveTypeName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.ShippingTemplate;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发货模板视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "发货模板")
|
|
||||||
public class ShippingTemplateVO extends ShippingTemplate {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.TemporaryCreditLimit;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 临时额度申请视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "临时额度申请")
|
|
||||||
public class TemporaryCreditLimitVO extends TemporaryCreditLimit {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "审批状态名称")
|
|
||||||
private String approvalStatusName;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.TransportPlan;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运输计划视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "运输计划")
|
|
||||||
public class TransportPlanVO extends TransportPlan {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "业务状态名称")
|
|
||||||
private String businessStatusName;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.Waybill;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运单管理视图实体类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Schema(description = "运单管理")
|
|
||||||
public class WaybillVO extends Waybill {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否查看全部组织")
|
|
||||||
private Integer allDept;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "是否只读")
|
|
||||||
private Boolean readonly;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "创建人姓名")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "更新人姓名")
|
|
||||||
private String updateUserName;
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Schema(description = "业务状态名称")
|
|
||||||
private String businessStatusName;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -148,7 +148,7 @@ public class AirportMasterController extends BladeController {
|
|||||||
@PostMapping("/import-airport-master")
|
@PostMapping("/import-airport-master")
|
||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
@Operation(summary = "导入空港机场主数据", description = "传入excel")
|
@Operation(summary = "导入空港机场主数据", description = "传入excel")
|
||||||
public R importAirportMaster(MultipartFile file, HttpServletResponse response) {
|
public R importAirportMaster(MultipartFile file) {
|
||||||
if (file == null || file.isEmpty()) {
|
if (file == null || file.isEmpty()) {
|
||||||
return R.fail("上传文件不能为空");
|
return R.fail("上传文件不能为空");
|
||||||
}
|
}
|
||||||
@@ -156,11 +156,8 @@ public class AirportMasterController extends BladeController {
|
|||||||
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")) {
|
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")) {
|
||||||
return R.fail("请上传 .xls,.xlsx 标准格式文件");
|
return R.fail("请上传 .xls,.xlsx 标准格式文件");
|
||||||
}
|
}
|
||||||
List<AirportMasterExcel> failureList = airportMasterService.importAirportMaster(ExcelUtil.read(file, AirportMasterExcel.class));
|
AirportMasterImporter airportMasterImporter = new AirportMasterImporter(airportMasterService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, airportMasterImporter, AirportMasterExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "空港机场主数据导入失败明细" + DateUtil.time(), "导入失败明细", failureList, AirportMasterExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +172,6 @@ public class AirportMasterController extends BladeController {
|
|||||||
airportMaster.remove("Blade-Auth");
|
airportMaster.remove("Blade-Auth");
|
||||||
airportMaster.remove("Authorization");
|
airportMaster.remove("Authorization");
|
||||||
airportMaster.remove("access_token");
|
airportMaster.remove("access_token");
|
||||||
normalizeRegionCodeCondition(airportMaster);
|
|
||||||
QueryWrapper<AirportMaster> queryWrapper = Condition.getQueryWrapper(airportMaster, AirportMaster.class);
|
QueryWrapper<AirportMaster> queryWrapper = Condition.getQueryWrapper(airportMaster, AirportMaster.class);
|
||||||
if (Func.isNotEmpty(ids)) {
|
if (Func.isNotEmpty(ids)) {
|
||||||
queryWrapper.lambda().in(AirportMaster::getId, Func.toLongList(ids.toString()));
|
queryWrapper.lambda().in(AirportMaster::getId, Func.toLongList(ids.toString()));
|
||||||
@@ -211,11 +207,4 @@ public class AirportMasterController extends BladeController {
|
|||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void normalizeRegionCodeCondition(Map<String, Object> params) {
|
|
||||||
Object regionCode = params.remove("regionCode");
|
|
||||||
if (Func.isNotEmpty(regionCode) && Func.isEmpty(params.get("districtCode"))) {
|
|
||||||
params.put("districtCode", regionCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,225 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
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.log.exception.ServiceException;
|
|
||||||
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.common.excel.ImportFailureExcelUtil;
|
|
||||||
import org.springblade.system.excel.CargoTypeExcel;
|
|
||||||
import org.springblade.system.excel.CargoTypeExportExcel;
|
|
||||||
import org.springblade.system.excel.CargoTypeImportFailureExcel;
|
|
||||||
import org.springblade.system.pojo.entity.CargoType;
|
|
||||||
import org.springblade.system.pojo.vo.CargoTypeVO;
|
|
||||||
import org.springblade.system.service.ICargoTypeService;
|
|
||||||
import org.springblade.system.wrapper.CargoTypeWrapper;
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型 控制器
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@NonDS
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
@PreAuth(menu = "cargo_type")
|
|
||||||
@RequestMapping("/cargo-type")
|
|
||||||
@Tag(name = "货物类型", description = "货物类型")
|
|
||||||
public class CargoTypeController extends BladeController {
|
|
||||||
|
|
||||||
private final ICargoTypeService cargoTypeService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@Operation(summary = "详情", description = "传入cargoType")
|
|
||||||
public R<CargoTypeVO> detail(CargoType cargoType) {
|
|
||||||
CargoType detail = cargoTypeService.getOne(Condition.getQueryWrapper(cargoType));
|
|
||||||
if (detail == null) {
|
|
||||||
throw new ServiceException("数据不存在");
|
|
||||||
}
|
|
||||||
CargoTypeVO cargoTypeVO = CargoTypeWrapper.build().entityVO(detail);
|
|
||||||
if (Func.isNotEmpty(detail.getParentId())) {
|
|
||||||
CargoType parent = cargoTypeService.getById(detail.getParentId());
|
|
||||||
cargoTypeVO.setParentCargoName(parent == null ? "" : parent.getCargoName());
|
|
||||||
}
|
|
||||||
return R.data(cargoTypeVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页
|
|
||||||
*/
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@Operation(summary = "分页", description = "传入cargoType")
|
|
||||||
public R<IPage<CargoTypeVO>> list(CargoTypeVO cargoType, Query query) {
|
|
||||||
IPage<CargoTypeVO> pages = cargoTypeService.selectCargoTypePage(Condition.getPage(query), cargoType);
|
|
||||||
return R.data(pages);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 一级货物类型选项
|
|
||||||
*/
|
|
||||||
@GetMapping("/parent-options")
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@Operation(summary = "一级货物类型选项", description = "传入keyword")
|
|
||||||
public R<List<CargoTypeVO>> parentOptions(@RequestParam(required = false) String keyword) {
|
|
||||||
return R.data(cargoTypeService.parentOptions(keyword));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 二级货物类型建议编码
|
|
||||||
*/
|
|
||||||
@GetMapping("/next-code")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@Operation(summary = "二级货物类型建议编码", description = "传入parentCargoCode")
|
|
||||||
public R<String> nextCode(@Parameter(description = "上级货物类型编码", required = true) @RequestParam String parentCargoCode) {
|
|
||||||
return R.data(cargoTypeService.nextChildCode(parentCargoCode));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或修改
|
|
||||||
*/
|
|
||||||
@PostMapping("/submit")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@Operation(summary = "新增或修改", description = "传入cargoType")
|
|
||||||
public R submit(@Valid @RequestBody CargoType cargoType) {
|
|
||||||
return R.status(cargoTypeService.submit(cargoType));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
|
||||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
|
||||||
return R.status(cargoTypeService.deleteCargoTypes(Func.toLongList(ids)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入货物类型
|
|
||||||
*/
|
|
||||||
@PostMapping("/import-cargo-type")
|
|
||||||
@ApiOperationSupport(order = 7)
|
|
||||||
@Operation(summary = "导入货物类型", description = "传入excel")
|
|
||||||
public R importCargoType(MultipartFile file, HttpServletResponse response) {
|
|
||||||
List<CargoTypeExcel> data = ExcelUtil.read(file, CargoTypeExcel.class);
|
|
||||||
List<CargoTypeImportFailureExcel> failureList = cargoTypeService.importCargoType(data);
|
|
||||||
if (Func.isNotEmpty(failureList)) {
|
|
||||||
ImportFailureExcelUtil.export(response, "货物类型导入失败明细" + DateUtil.time(), "导入失败明细", failureList, CargoTypeExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("导入数据成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出货物类型
|
|
||||||
*/
|
|
||||||
@GetMapping("/export-cargo-type")
|
|
||||||
@ApiOperationSupport(order = 8)
|
|
||||||
@Operation(summary = "导出货物类型")
|
|
||||||
public void exportCargoType(CargoTypeVO cargoType,
|
|
||||||
@RequestParam(required = false) String ids,
|
|
||||||
HttpServletResponse response) {
|
|
||||||
List<CargoTypeExportExcel> list = cargoTypeService.exportCargoType(buildExportQuery(cargoType, ids));
|
|
||||||
ExcelUtil.export(response, "货物类型" + DateUtil.time(), "货物类型表", list, CargoTypeExportExcel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出模板
|
|
||||||
*/
|
|
||||||
@GetMapping("/export-template")
|
|
||||||
@ApiOperationSupport(order = 9)
|
|
||||||
@Operation(summary = "导出模板")
|
|
||||||
public void exportTemplate(HttpServletResponse response) {
|
|
||||||
List<CargoTypeExcel> list = new ArrayList<>();
|
|
||||||
ExcelUtil.export(response, "货物类型模板", "货物类型导入模板", list, CargoTypeExcel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambdaQueryWrapper<CargoType> buildExportQuery(CargoTypeVO cargoType, String ids) {
|
|
||||||
LambdaQueryWrapper<CargoType> queryWrapper = Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getIsDeleted, 0)
|
|
||||||
.orderByDesc(CargoType::getCreateTime);
|
|
||||||
if (Func.isNotEmpty(ids)) {
|
|
||||||
queryWrapper.in(CargoType::getId, Func.toLongList(ids));
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getTypeLevel())) {
|
|
||||||
queryWrapper.eq(CargoType::getTypeLevel, cargoType.getTypeLevel());
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getCargoName())) {
|
|
||||||
queryWrapper.like(CargoType::getCargoName, cargoType.getCargoName());
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getCargoCode())) {
|
|
||||||
queryWrapper.like(CargoType::getCargoCode, cargoType.getCargoCode());
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getParentCargoCode())) {
|
|
||||||
queryWrapper.like(CargoType::getParentCargoCode, cargoType.getParentCargoCode());
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getParentCargoName())) {
|
|
||||||
List<String> parentCodes = cargoTypeService.parentOptions(cargoType.getParentCargoName())
|
|
||||||
.stream()
|
|
||||||
.map(CargoTypeVO::getCargoCode)
|
|
||||||
.toList();
|
|
||||||
if (Func.isEmpty(parentCodes)) {
|
|
||||||
queryWrapper.eq(CargoType::getParentCargoCode, "__none__");
|
|
||||||
} else {
|
|
||||||
queryWrapper.in(CargoType::getParentCargoCode, parentCodes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -148,12 +148,9 @@ public class CurrencyController extends BladeController {
|
|||||||
@PostMapping("/import-currency")
|
@PostMapping("/import-currency")
|
||||||
@ApiOperationSupport(order = 7)
|
@ApiOperationSupport(order = 7)
|
||||||
@Operation(summary = "导入币种汇率", description = "传入excel")
|
@Operation(summary = "导入币种汇率", description = "传入excel")
|
||||||
public R importCurrency(MultipartFile file, HttpServletResponse response) {
|
public R importCurrency(MultipartFile file) {
|
||||||
List<CurrencyExcel> failureList = currencyService.importCurrency(ExcelUtil.read(file, CurrencyExcel.class));
|
CurrencyImporter currencyImporter = new CurrencyImporter(currencyService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, currencyImporter, CurrencyExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "币种汇率导入失败明细" + DateUtil.time(), "导入失败明细", failureList, CurrencyExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class PortTerminalController extends BladeController {
|
|||||||
@PostMapping("/import-port-terminal")
|
@PostMapping("/import-port-terminal")
|
||||||
@ApiOperationSupport(order = 7)
|
@ApiOperationSupport(order = 7)
|
||||||
@Operation(summary = "导入港口码头主数据", description = "传入excel")
|
@Operation(summary = "导入港口码头主数据", description = "传入excel")
|
||||||
public R importPortTerminal(MultipartFile file, HttpServletResponse response) {
|
public R importPortTerminal(MultipartFile file) {
|
||||||
if (file == null || file.isEmpty()) {
|
if (file == null || file.isEmpty()) {
|
||||||
return R.fail("上传文件不能为空");
|
return R.fail("上传文件不能为空");
|
||||||
}
|
}
|
||||||
@@ -167,11 +167,8 @@ public class PortTerminalController extends BladeController {
|
|||||||
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")) {
|
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")) {
|
||||||
return R.fail("请上传 .xls,.xlsx 标准格式文件");
|
return R.fail("请上传 .xls,.xlsx 标准格式文件");
|
||||||
}
|
}
|
||||||
List<PortTerminalExcel> failureList = portTerminalService.importPortTerminal(ExcelUtil.read(file, PortTerminalExcel.class));
|
PortTerminalImporter portTerminalImporter = new PortTerminalImporter(portTerminalService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, portTerminalImporter, PortTerminalExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "港口码头主数据导入失败明细" + DateUtil.time(), "导入失败明细", failureList, PortTerminalExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +184,6 @@ public class PortTerminalController extends BladeController {
|
|||||||
portTerminal.remove("Blade-Auth");
|
portTerminal.remove("Blade-Auth");
|
||||||
portTerminal.remove("Authorization");
|
portTerminal.remove("Authorization");
|
||||||
portTerminal.remove("access_token");
|
portTerminal.remove("access_token");
|
||||||
normalizeRegionCodeCondition(portTerminal);
|
|
||||||
QueryWrapper<PortTerminal> queryWrapper = Condition.getQueryWrapper(portTerminal, PortTerminal.class);
|
QueryWrapper<PortTerminal> queryWrapper = Condition.getQueryWrapper(portTerminal, PortTerminal.class);
|
||||||
applyDataSourceCondition(queryWrapper, dataSource);
|
applyDataSourceCondition(queryWrapper, dataSource);
|
||||||
if (Func.isNotEmpty(ids)) {
|
if (Func.isNotEmpty(ids)) {
|
||||||
@@ -224,13 +220,6 @@ public class PortTerminalController extends BladeController {
|
|||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void normalizeRegionCodeCondition(Map<String, Object> params) {
|
|
||||||
Object regionCode = params.remove("regionCode");
|
|
||||||
if (Func.isNotEmpty(regionCode) && Func.isEmpty(params.get("districtCode"))) {
|
|
||||||
params.put("districtCode", regionCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void applyDataSourceCondition(QueryWrapper<PortTerminal> queryWrapper, Object dataSource) {
|
private void applyDataSourceCondition(QueryWrapper<PortTerminal> queryWrapper, Object dataSource) {
|
||||||
String value = Func.toStrWithEmpty(dataSource, "");
|
String value = Func.toStrWithEmpty(dataSource, "");
|
||||||
if (Func.isEmpty(value)) {
|
if (Func.isEmpty(value)) {
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class RailwayStationController extends BladeController {
|
|||||||
@PostMapping("/import-railway-station")
|
@PostMapping("/import-railway-station")
|
||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
@Operation(summary = "导入铁路车站主数据", description = "传入excel")
|
@Operation(summary = "导入铁路车站主数据", description = "传入excel")
|
||||||
public R importRailwayStation(MultipartFile file, HttpServletResponse response) {
|
public R importRailwayStation(MultipartFile file) {
|
||||||
if (file == null || file.isEmpty()) {
|
if (file == null || file.isEmpty()) {
|
||||||
return R.fail("上传文件不能为空");
|
return R.fail("上传文件不能为空");
|
||||||
}
|
}
|
||||||
@@ -159,11 +159,8 @@ public class RailwayStationController extends BladeController {
|
|||||||
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")) {
|
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")) {
|
||||||
return R.fail("请上传 .xls,.xlsx 标准格式文件");
|
return R.fail("请上传 .xls,.xlsx 标准格式文件");
|
||||||
}
|
}
|
||||||
List<RailwayStationExcel> failureList = railwayStationService.importRailwayStation(ExcelUtil.read(file, RailwayStationExcel.class));
|
RailwayStationImporter railwayStationImporter = new RailwayStationImporter(railwayStationService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, railwayStationImporter, RailwayStationExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "铁路车站主数据导入失败明细" + DateUtil.time(), "导入失败明细", failureList, RailwayStationExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +176,6 @@ public class RailwayStationController extends BladeController {
|
|||||||
railwayStation.remove("Blade-Auth");
|
railwayStation.remove("Blade-Auth");
|
||||||
railwayStation.remove("Authorization");
|
railwayStation.remove("Authorization");
|
||||||
railwayStation.remove("access_token");
|
railwayStation.remove("access_token");
|
||||||
normalizeRegionCodeCondition(railwayStation);
|
|
||||||
QueryWrapper<RailwayStation> queryWrapper = Condition.getQueryWrapper(railwayStation, RailwayStation.class);
|
QueryWrapper<RailwayStation> queryWrapper = Condition.getQueryWrapper(railwayStation, RailwayStation.class);
|
||||||
applyDataSourceCondition(queryWrapper, dataSource);
|
applyDataSourceCondition(queryWrapper, dataSource);
|
||||||
if (Func.isNotEmpty(ids)) {
|
if (Func.isNotEmpty(ids)) {
|
||||||
@@ -216,13 +212,6 @@ public class RailwayStationController extends BladeController {
|
|||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void normalizeRegionCodeCondition(Map<String, Object> params) {
|
|
||||||
Object regionCode = params.remove("regionCode");
|
|
||||||
if (Func.isNotEmpty(regionCode) && Func.isEmpty(params.get("districtCode"))) {
|
|
||||||
params.put("districtCode", regionCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void applyDataSourceCondition(QueryWrapper<RailwayStation> queryWrapper, Object dataSource) {
|
private void applyDataSourceCondition(QueryWrapper<RailwayStation> queryWrapper, Object dataSource) {
|
||||||
String value = Func.toStrWithEmpty(dataSource, "");
|
String value = Func.toStrWithEmpty(dataSource, "");
|
||||||
if (Func.isEmpty(value)) {
|
if (Func.isEmpty(value)) {
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行政区划表 控制器
|
* 行政区划表 控制器
|
||||||
@@ -122,9 +121,9 @@ public class RegionController extends BladeController {
|
|||||||
})
|
})
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
@Operation(summary = "懒加载列表", description = "传入menu")
|
@Operation(summary = "懒加载列表", description = "传入menu")
|
||||||
public R<List<Map<String, Object>>> lazyTree(String parentCode, @Parameter(hidden = true) @RequestParam Map<String, Object> menu) {
|
public R<List<RegionVO>> lazyTree(String parentCode, @Parameter(hidden = true) @RequestParam Map<String, Object> menu) {
|
||||||
List<Map<String, Object>> list = regionService.lazyTree(parentCode, menu);
|
List<RegionVO> list = regionService.lazyTree(parentCode, menu);
|
||||||
return R.data(list);
|
return R.data(RegionWrapper.build().listNodeLazyVO(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,7 +133,7 @@ public class RegionController extends BladeController {
|
|||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "新增", description = "传入region")
|
@Operation(summary = "新增", description = "传入region")
|
||||||
public R save(@Valid @RequestBody Region region) {
|
public R save(@Valid @RequestBody Region region) {
|
||||||
return R.status(regionService.submit(region));
|
return R.status(regionService.save(region));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -144,8 +143,7 @@ public class RegionController extends BladeController {
|
|||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
@Operation(summary = "修改", description = "传入region")
|
@Operation(summary = "修改", description = "传入region")
|
||||||
public R update(@Valid @RequestBody Region region) {
|
public R update(@Valid @RequestBody Region region) {
|
||||||
region.setOriginalCode(region.getCode());
|
return R.status(regionService.updateById(region));
|
||||||
return R.status(regionService.submit(region));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -175,11 +173,8 @@ public class RegionController extends BladeController {
|
|||||||
@GetMapping("/select")
|
@GetMapping("/select")
|
||||||
@ApiOperationSupport(order = 9)
|
@ApiOperationSupport(order = 9)
|
||||||
@Operation(summary = "下拉数据源", description = "传入tenant")
|
@Operation(summary = "下拉数据源", description = "传入tenant")
|
||||||
public R<List<Region>> select(@RequestParam(required = false, defaultValue = "+86") String code) {
|
public R<List<Region>> select(@RequestParam(required = false, defaultValue = "00") String code) {
|
||||||
List<Region> list = regionService.list(Wrappers.<Region>lambdaQuery()
|
List<Region> list = regionService.list(Wrappers.<Region>query().lambda().eq(Region::getParentCode, code));
|
||||||
.eq(Region::getParentCode, code)
|
|
||||||
.orderByAsc(Region::getSort)
|
|
||||||
.orderByAsc(Region::getCode));
|
|
||||||
return R.data(list);
|
return R.data(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,12 +184,9 @@ public class RegionController extends BladeController {
|
|||||||
@PostMapping("import-region")
|
@PostMapping("import-region")
|
||||||
@ApiOperationSupport(order = 10)
|
@ApiOperationSupport(order = 10)
|
||||||
@Operation(summary = "导入行政区划", description = "传入excel")
|
@Operation(summary = "导入行政区划", description = "传入excel")
|
||||||
public R importRegion(MultipartFile file, Integer isCovered, HttpServletResponse response) {
|
public R importRegion(MultipartFile file, Integer isCovered) {
|
||||||
List<RegionExcel> failureList = regionService.importRegion(ExcelUtil.read(file, RegionExcel.class), Objects.equals(isCovered, 1));
|
RegionImporter regionImporter = new RegionImporter(regionService, isCovered == 1);
|
||||||
if (!failureList.isEmpty()) {
|
ExcelUtil.save(file, regionImporter, RegionExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "行政区划导入失败明细" + DateUtil.time(), "导入失败明细", failureList, RegionExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ package org.springblade.system.excel;
|
|||||||
|
|
||||||
import cn.idev.excel.annotation.ExcelIgnore;
|
import cn.idev.excel.annotation.ExcelIgnore;
|
||||||
import cn.idev.excel.annotation.ExcelProperty;
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
import cn.idev.excel.annotation.format.NumberFormat;
|
|
||||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||||
@@ -74,21 +73,10 @@ public class AirportMasterExcel implements Serializable {
|
|||||||
@ExcelProperty("所属城市")
|
@ExcelProperty("所属城市")
|
||||||
private String cityName;
|
private String cityName;
|
||||||
|
|
||||||
@ExcelProperty("所属区县")
|
|
||||||
private String districtName;
|
|
||||||
|
|
||||||
@ExcelProperty("行政区划")
|
|
||||||
private String regionName;
|
|
||||||
|
|
||||||
@ExcelProperty("详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
|
|
||||||
@ExcelProperty("经度")
|
@ExcelProperty("经度")
|
||||||
@NumberFormat("0.000000")
|
|
||||||
private BigDecimal longitude;
|
private BigDecimal longitude;
|
||||||
|
|
||||||
@ExcelProperty("纬度")
|
@ExcelProperty("纬度")
|
||||||
@NumberFormat("0.000000")
|
|
||||||
private BigDecimal latitude;
|
private BigDecimal latitude;
|
||||||
|
|
||||||
@ExcelProperty("数据来源")
|
@ExcelProperty("数据来源")
|
||||||
@@ -100,7 +88,7 @@ public class AirportMasterExcel implements Serializable {
|
|||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ExcelProperty
|
@ExcelProperty("报错文案")
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型导入 Excel
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ColumnWidth(24)
|
|
||||||
@HeadRowHeight(20)
|
|
||||||
@ContentRowHeight(18)
|
|
||||||
public class CargoTypeExcel implements Serializable {
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ExcelProperty("*类型")
|
|
||||||
private String typeLevelName;
|
|
||||||
|
|
||||||
@ExcelProperty("上级货物类型(如为一级则不需填写)")
|
|
||||||
private String parentCargoName;
|
|
||||||
|
|
||||||
@ExcelProperty("上级货物类型编码(如为一级则不需填写)")
|
|
||||||
private String parentCargoCode;
|
|
||||||
|
|
||||||
@ExcelProperty("*货物类型")
|
|
||||||
private String cargoName;
|
|
||||||
|
|
||||||
@ExcelProperty("*货物类型编码")
|
|
||||||
private String cargoCode;
|
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@ExcelIgnore
|
|
||||||
private String errorMessage;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.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.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型导出 Excel
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ColumnWidth(22)
|
|
||||||
@HeadRowHeight(20)
|
|
||||||
@ContentRowHeight(18)
|
|
||||||
public class CargoTypeExportExcel implements Serializable {
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ExcelProperty("类型")
|
|
||||||
private String typeLevelName;
|
|
||||||
|
|
||||||
@ExcelProperty("货物类型")
|
|
||||||
private String cargoName;
|
|
||||||
|
|
||||||
@ExcelProperty("货物类型编码")
|
|
||||||
private String cargoCode;
|
|
||||||
|
|
||||||
@ExcelProperty("上级货物类型")
|
|
||||||
private String parentCargoName;
|
|
||||||
|
|
||||||
@ExcelProperty("上级货物类型编码")
|
|
||||||
private String parentCargoCode;
|
|
||||||
|
|
||||||
@ExcelProperty("创建人")
|
|
||||||
private String createUserName;
|
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@ExcelProperty("更新时间")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
@ExcelProperty("创建时间")
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型导入失败 Excel
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ColumnWidth(24)
|
|
||||||
@HeadRowHeight(20)
|
|
||||||
@ContentRowHeight(18)
|
|
||||||
public class CargoTypeImportFailureExcel implements Serializable {
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ExcelProperty("*类型")
|
|
||||||
private String typeLevelName;
|
|
||||||
|
|
||||||
@ExcelProperty("上级货物类型(如为一级则不需填写)")
|
|
||||||
private String parentCargoName;
|
|
||||||
|
|
||||||
@ExcelProperty("上级货物类型编码(如为一级则不需填写)")
|
|
||||||
private String parentCargoCode;
|
|
||||||
|
|
||||||
@ExcelProperty("*货物类型")
|
|
||||||
private String cargoName;
|
|
||||||
|
|
||||||
@ExcelProperty("*货物类型编码")
|
|
||||||
private String cargoCode;
|
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
@ExcelProperty("导入失败原因")
|
|
||||||
private String failureReason;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.ICargoTypeService;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型导入类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class CargoTypeImporter implements ExcelImporter<CargoTypeExcel> {
|
|
||||||
|
|
||||||
private final ICargoTypeService service;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void save(List<CargoTypeExcel> data) {
|
|
||||||
service.importCargoType(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -77,7 +77,7 @@ public class CurrencyExcel implements Serializable {
|
|||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ExcelProperty
|
@ExcelProperty("报错文案")
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ package org.springblade.system.excel;
|
|||||||
|
|
||||||
import cn.idev.excel.annotation.ExcelIgnore;
|
import cn.idev.excel.annotation.ExcelIgnore;
|
||||||
import cn.idev.excel.annotation.ExcelProperty;
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
import cn.idev.excel.annotation.format.NumberFormat;
|
|
||||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||||
@@ -74,21 +73,10 @@ public class PortTerminalExcel implements Serializable {
|
|||||||
@ExcelProperty("城市")
|
@ExcelProperty("城市")
|
||||||
private String city;
|
private String city;
|
||||||
|
|
||||||
@ExcelProperty("区县")
|
|
||||||
private String districtName;
|
|
||||||
|
|
||||||
@ExcelProperty("行政区划编码")
|
|
||||||
private String regionCode;
|
|
||||||
|
|
||||||
@ExcelProperty("详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
|
|
||||||
@ExcelProperty("经度")
|
@ExcelProperty("经度")
|
||||||
@NumberFormat("0.000000")
|
|
||||||
private BigDecimal longitude;
|
private BigDecimal longitude;
|
||||||
|
|
||||||
@ExcelProperty("纬度")
|
@ExcelProperty("纬度")
|
||||||
@NumberFormat("0.000000")
|
|
||||||
private BigDecimal latitude;
|
private BigDecimal latitude;
|
||||||
|
|
||||||
@ExcelProperty("数据来源")
|
@ExcelProperty("数据来源")
|
||||||
@@ -100,7 +88,7 @@ public class PortTerminalExcel implements Serializable {
|
|||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ExcelProperty
|
@ExcelProperty("报错文案")
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 铁路车站主数据 Excel
|
* 铁路车站主数据 Excel
|
||||||
@@ -63,8 +64,8 @@ public class RailwayStationExcel implements Serializable {
|
|||||||
@ExcelProperty("车站名称")
|
@ExcelProperty("车站名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
// @ExcelProperty("所属铁路线路")
|
@ExcelProperty("所属铁路线路")
|
||||||
// private String railwayLine;
|
private String railwayLine;
|
||||||
|
|
||||||
@ExcelProperty("所属省份")
|
@ExcelProperty("所属省份")
|
||||||
private String provinceName;
|
private String provinceName;
|
||||||
@@ -72,20 +73,11 @@ public class RailwayStationExcel implements Serializable {
|
|||||||
@ExcelProperty("所属城市")
|
@ExcelProperty("所属城市")
|
||||||
private String cityName;
|
private String cityName;
|
||||||
|
|
||||||
@ExcelProperty("所属区县")
|
|
||||||
private String districtName;
|
|
||||||
|
|
||||||
@ExcelProperty("行政区划")
|
|
||||||
private String regionName;
|
|
||||||
|
|
||||||
@ExcelProperty("详细地址")
|
|
||||||
private String detailAddress;
|
|
||||||
|
|
||||||
@ExcelProperty("经度")
|
@ExcelProperty("经度")
|
||||||
private String longitude;
|
private BigDecimal longitude;
|
||||||
|
|
||||||
@ExcelProperty("纬度")
|
@ExcelProperty("纬度")
|
||||||
private String latitude;
|
private BigDecimal latitude;
|
||||||
|
|
||||||
@ExcelProperty("数据来源")
|
@ExcelProperty("数据来源")
|
||||||
private String dataSource;
|
private String dataSource;
|
||||||
@@ -96,7 +88,7 @@ public class RailwayStationExcel implements Serializable {
|
|||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ExcelProperty
|
@ExcelProperty("报错文案")
|
||||||
private String errorMessage;
|
private String errorMessage;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.springblade.system.excel;
|
package org.springblade.system.excel;
|
||||||
|
|
||||||
import cn.idev.excel.annotation.ExcelIgnore;
|
|
||||||
import cn.idev.excel.annotation.ExcelProperty;
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||||
@@ -99,7 +98,4 @@ public class RegionExcel implements Serializable {
|
|||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ExcelIgnore
|
|
||||||
private String errorMessage;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<result column="create_dept" property="createDept"/>
|
<result column="create_dept" property="createDept"/>
|
||||||
<result column="create_time" property="createTime"/>
|
<result column="create_time" property="createTime"/>
|
||||||
<result column="update_user" property="updateUser"/>
|
<result column="update_user" property="updateUser"/>
|
||||||
<result column="update_user_name" property="updateUserName"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="status" property="status"/>
|
<result column="status" property="status"/>
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
@@ -21,11 +20,6 @@
|
|||||||
<result column="province_name" property="provinceName"/>
|
<result column="province_name" property="provinceName"/>
|
||||||
<result column="city_code" property="cityCode"/>
|
<result column="city_code" property="cityCode"/>
|
||||||
<result column="city_name" property="cityName"/>
|
<result column="city_name" property="cityName"/>
|
||||||
<result column="district_code" property="districtCode"/>
|
|
||||||
<result column="district_name" property="districtName"/>
|
|
||||||
<result column="district_code" property="regionCode"/>
|
|
||||||
<result column="region_name" property="regionName"/>
|
|
||||||
<result column="detail_address" property="detailAddress"/>
|
|
||||||
<result column="longitude" property="longitude"/>
|
<result column="longitude" property="longitude"/>
|
||||||
<result column="latitude" property="latitude"/>
|
<result column="latitude" property="latitude"/>
|
||||||
<result column="data_source" property="dataSource"/>
|
<result column="data_source" property="dataSource"/>
|
||||||
@@ -34,83 +28,59 @@
|
|||||||
|
|
||||||
<select id="selectAirportMasterPage" resultMap="airportMasterResultMap">
|
<select id="selectAirportMasterPage" resultMap="airportMasterResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
am.id,
|
id,
|
||||||
am.create_user,
|
create_user,
|
||||||
am.create_dept,
|
create_dept,
|
||||||
am.create_time,
|
create_time,
|
||||||
am.update_user,
|
update_user,
|
||||||
bu.real_name AS update_user_name,
|
update_time,
|
||||||
am.update_time,
|
status,
|
||||||
am.status,
|
is_deleted,
|
||||||
am.is_deleted,
|
code,
|
||||||
am.code,
|
iata_code,
|
||||||
am.iata_code,
|
icao_code,
|
||||||
am.icao_code,
|
name,
|
||||||
am.name,
|
short_name,
|
||||||
am.short_name,
|
province_code,
|
||||||
am.province_code,
|
province_name,
|
||||||
am.province_name,
|
city_code,
|
||||||
am.city_code,
|
city_name,
|
||||||
am.city_name,
|
longitude,
|
||||||
am.district_code,
|
latitude,
|
||||||
am.district_name,
|
CASE WHEN data_source = '手工导入' THEN '手动录入' ELSE data_source END AS data_source,
|
||||||
am.region_name,
|
remark
|
||||||
am.detail_address,
|
|
||||||
am.longitude,
|
|
||||||
am.latitude,
|
|
||||||
CASE WHEN am.data_source = '手工导入' THEN '手动录入' ELSE am.data_source END AS data_source,
|
|
||||||
am.remark
|
|
||||||
FROM
|
FROM
|
||||||
blade_airport_master am
|
blade_airport_master
|
||||||
LEFT JOIN blade_user bu ON bu.id = am.update_user
|
|
||||||
WHERE
|
WHERE
|
||||||
am.is_deleted = 0
|
is_deleted = 0
|
||||||
<if test="airportMaster.code != null and airportMaster.code != ''">
|
<if test="airportMaster.code != null and airportMaster.code != ''">
|
||||||
<bind name="codeLike" value="'%' + airportMaster.code + '%'"/>
|
<bind name="codeLike" value="'%' + airportMaster.code + '%'"/>
|
||||||
AND am.code LIKE #{codeLike}
|
AND code LIKE #{codeLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="airportMaster.name != null and airportMaster.name != ''">
|
<if test="airportMaster.name != null and airportMaster.name != ''">
|
||||||
<bind name="nameLike" value="'%' + airportMaster.name + '%'"/>
|
<bind name="nameLike" value="'%' + airportMaster.name + '%'"/>
|
||||||
AND am.name LIKE #{nameLike}
|
AND name LIKE #{nameLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="airportMaster.iataCode != null and airportMaster.iataCode != ''">
|
<if test="airportMaster.iataCode != null and airportMaster.iataCode != ''">
|
||||||
AND am.iata_code = #{airportMaster.iataCode}
|
AND iata_code = #{airportMaster.iataCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="airportMaster.icaoCode != null and airportMaster.icaoCode != ''">
|
<if test="airportMaster.icaoCode != null and airportMaster.icaoCode != ''">
|
||||||
AND am.icao_code = #{airportMaster.icaoCode}
|
AND icao_code = #{airportMaster.icaoCode}
|
||||||
</if>
|
|
||||||
<if test="airportMaster.regionCode != null and airportMaster.regionCode != ''">
|
|
||||||
AND am.district_code = #{airportMaster.regionCode}
|
|
||||||
</if>
|
|
||||||
<if test="airportMaster.districtCode != null and airportMaster.districtCode != ''">
|
|
||||||
AND am.district_code = #{airportMaster.districtCode}
|
|
||||||
</if>
|
|
||||||
<if test="airportMaster.districtName != null and airportMaster.districtName != ''">
|
|
||||||
<bind name="districtNameLike" value="'%' + airportMaster.districtName + '%'"/>
|
|
||||||
AND am.district_name LIKE #{districtNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="airportMaster.regionName != null and airportMaster.regionName != ''">
|
|
||||||
<bind name="regionNameLike" value="'%' + airportMaster.regionName + '%'"/>
|
|
||||||
AND am.region_name LIKE #{regionNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="airportMaster.detailAddress != null and airportMaster.detailAddress != ''">
|
|
||||||
<bind name="detailAddressLike" value="'%' + airportMaster.detailAddress + '%'"/>
|
|
||||||
AND am.detail_address LIKE #{detailAddressLike}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="airportMaster.dataSource != null and airportMaster.dataSource != ''">
|
<if test="airportMaster.dataSource != null and airportMaster.dataSource != ''">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="airportMaster.dataSource == '手动录入'">
|
<when test="airportMaster.dataSource == '手动录入'">
|
||||||
AND am.data_source IN ('手动录入', '手工导入')
|
AND data_source IN ('手动录入', '手工导入')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
AND am.data_source = #{airportMaster.dataSource}
|
AND data_source = #{airportMaster.dataSource}
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="airportMaster.status != null">
|
<if test="airportMaster.status != null">
|
||||||
AND am.status = #{airportMaster.status}
|
AND status = #{airportMaster.status}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY am.create_time DESC
|
ORDER BY update_time DESC, create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.CargoType;
|
|
||||||
import org.springblade.system.pojo.vo.CargoTypeVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型 Mapper 接口
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public interface CargoTypeMapper extends BaseMapper<CargoType> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义分页
|
|
||||||
*
|
|
||||||
* @param page 分页参数
|
|
||||||
* @param cargoType 查询参数
|
|
||||||
* @return 货物类型分页
|
|
||||||
*/
|
|
||||||
List<CargoTypeVO> selectCargoTypePage(IPage<CargoTypeVO> page, @Param("cargoType") CargoTypeVO cargoType);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
<?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.CargoTypeMapper">
|
|
||||||
|
|
||||||
<resultMap id="cargoTypeResultMap" type="org.springblade.system.pojo.vo.CargoTypeVO">
|
|
||||||
<result column="id" property="id"/>
|
|
||||||
<result column="create_user" property="createUser"/>
|
|
||||||
<result column="create_user_name" property="createUserName"/>
|
|
||||||
<result column="create_dept" property="createDept"/>
|
|
||||||
<result column="create_time" property="createTime"/>
|
|
||||||
<result column="update_user" property="updateUser"/>
|
|
||||||
<result column="update_user_name" property="updateUserName"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
|
||||||
<result column="status" property="status"/>
|
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
|
||||||
<result column="type_level" property="typeLevel"/>
|
|
||||||
<result column="type_level_name" property="typeLevelName"/>
|
|
||||||
<result column="parent_id" property="parentId"/>
|
|
||||||
<result column="parent_cargo_name" property="parentCargoName"/>
|
|
||||||
<result column="parent_cargo_code" property="parentCargoCode"/>
|
|
||||||
<result column="cargo_name" property="cargoName"/>
|
|
||||||
<result column="cargo_code" property="cargoCode"/>
|
|
||||||
<result column="data_source" property="dataSource"/>
|
|
||||||
<result column="remark" property="remark"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<select id="selectCargoTypePage" resultMap="cargoTypeResultMap">
|
|
||||||
SELECT
|
|
||||||
ct.id,
|
|
||||||
ct.create_user,
|
|
||||||
cu.real_name AS create_user_name,
|
|
||||||
ct.create_dept,
|
|
||||||
ct.create_time,
|
|
||||||
ct.update_user,
|
|
||||||
uu.real_name AS update_user_name,
|
|
||||||
ct.update_time,
|
|
||||||
ct.status,
|
|
||||||
ct.is_deleted,
|
|
||||||
ct.type_level,
|
|
||||||
CASE ct.type_level WHEN 1 THEN '一级货物类型' WHEN 2 THEN '二级货物类型' ELSE '' END AS type_level_name,
|
|
||||||
ct.parent_id,
|
|
||||||
pct.cargo_name AS parent_cargo_name,
|
|
||||||
ct.parent_cargo_code,
|
|
||||||
ct.cargo_name,
|
|
||||||
ct.cargo_code,
|
|
||||||
ct.data_source,
|
|
||||||
ct.remark
|
|
||||||
FROM
|
|
||||||
blade_cargo_type ct
|
|
||||||
LEFT JOIN blade_cargo_type pct ON pct.id = ct.parent_id AND pct.is_deleted = 0
|
|
||||||
LEFT JOIN blade_user cu ON cu.id = ct.create_user
|
|
||||||
LEFT JOIN blade_user uu ON uu.id = ct.update_user
|
|
||||||
WHERE
|
|
||||||
ct.is_deleted = 0
|
|
||||||
<if test="cargoType.typeLevel != null">
|
|
||||||
AND ct.type_level = #{cargoType.typeLevel}
|
|
||||||
</if>
|
|
||||||
<if test="cargoType.cargoName != null and cargoType.cargoName != ''">
|
|
||||||
<bind name="cargoNameLike" value="'%' + cargoType.cargoName + '%'"/>
|
|
||||||
AND ct.cargo_name LIKE #{cargoNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="cargoType.cargoCode != null and cargoType.cargoCode != ''">
|
|
||||||
<bind name="cargoCodeLike" value="'%' + cargoType.cargoCode + '%'"/>
|
|
||||||
AND ct.cargo_code LIKE #{cargoCodeLike}
|
|
||||||
</if>
|
|
||||||
<if test="cargoType.parentCargoName != null and cargoType.parentCargoName != ''">
|
|
||||||
<bind name="parentCargoNameLike" value="'%' + cargoType.parentCargoName + '%'"/>
|
|
||||||
AND pct.cargo_name LIKE #{parentCargoNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="cargoType.parentCargoCode != null and cargoType.parentCargoCode != ''">
|
|
||||||
<bind name="parentCargoCodeLike" value="'%' + cargoType.parentCargoCode + '%'"/>
|
|
||||||
AND ct.parent_cargo_code LIKE #{parentCargoCodeLike}
|
|
||||||
</if>
|
|
||||||
ORDER BY ct.create_time DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
<result column="create_dept" property="createDept"/>
|
<result column="create_dept" property="createDept"/>
|
||||||
<result column="create_time" property="createTime"/>
|
<result column="create_time" property="createTime"/>
|
||||||
<result column="update_user" property="updateUser"/>
|
<result column="update_user" property="updateUser"/>
|
||||||
<result column="update_user_name" property="updateUserName"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="status" property="status"/>
|
<result column="status" property="status"/>
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
@@ -27,71 +26,51 @@
|
|||||||
|
|
||||||
<select id="selectCurrencyPage" resultMap="currencyResultMap">
|
<select id="selectCurrencyPage" resultMap="currencyResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
bc.id,
|
*
|
||||||
bc.create_user,
|
|
||||||
bc.create_dept,
|
|
||||||
bc.create_time,
|
|
||||||
bc.update_user,
|
|
||||||
bu.real_name AS update_user_name,
|
|
||||||
bc.update_time,
|
|
||||||
bc.status,
|
|
||||||
bc.is_deleted,
|
|
||||||
bc.code,
|
|
||||||
bc.name,
|
|
||||||
bc.english_name,
|
|
||||||
bc.symbol,
|
|
||||||
bc.decimal_places,
|
|
||||||
bc.exchange_rate,
|
|
||||||
bc.effective_date,
|
|
||||||
bc.expiry_date,
|
|
||||||
bc.is_base_currency,
|
|
||||||
bc.data_source,
|
|
||||||
bc.remark
|
|
||||||
FROM
|
FROM
|
||||||
blade_currency bc
|
blade_currency
|
||||||
LEFT JOIN blade_user bu ON bu.id = bc.update_user
|
|
||||||
WHERE
|
WHERE
|
||||||
bc.is_deleted = 0
|
is_deleted = 0
|
||||||
<if test="currency.code != null and currency.code != ''">
|
<if test="currency.code != null and currency.code != ''">
|
||||||
<bind name="codeLike" value="'%' + currency.code + '%'"/>
|
<bind name="codeLike" value="'%' + currency.code + '%'"/>
|
||||||
AND bc.code LIKE #{codeLike}
|
AND code LIKE #{codeLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.name != null and currency.name != ''">
|
<if test="currency.name != null and currency.name != ''">
|
||||||
<bind name="nameLike" value="'%' + currency.name + '%'"/>
|
<bind name="nameLike" value="'%' + currency.name + '%'"/>
|
||||||
AND bc.name LIKE #{nameLike}
|
AND name LIKE #{nameLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.englishName != null and currency.englishName != ''">
|
<if test="currency.englishName != null and currency.englishName != ''">
|
||||||
<bind name="englishNameLike" value="'%' + currency.englishName + '%'"/>
|
<bind name="englishNameLike" value="'%' + currency.englishName + '%'"/>
|
||||||
AND bc.english_name LIKE #{englishNameLike}
|
AND english_name LIKE #{englishNameLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.status != null">
|
<if test="currency.status != null">
|
||||||
AND bc.status = #{currency.status}
|
AND status = #{currency.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.exchangeRate != null">
|
<if test="currency.exchangeRate != null">
|
||||||
AND bc.exchange_rate = #{currency.exchangeRate}
|
AND exchange_rate = #{currency.exchangeRate}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.dataSource != null and currency.dataSource != ''">
|
<if test="currency.dataSource != null and currency.dataSource != ''">
|
||||||
AND bc.data_source = #{currency.dataSource}
|
AND data_source = #{currency.dataSource}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.effectiveDateStart != null">
|
<if test="currency.effectiveDateStart != null">
|
||||||
AND bc.effective_date >= #{currency.effectiveDateStart}
|
AND effective_date >= #{currency.effectiveDateStart}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.effectiveDateEnd != null">
|
<if test="currency.effectiveDateEnd != null">
|
||||||
AND bc.effective_date <= #{currency.effectiveDateEnd}
|
AND effective_date <= #{currency.effectiveDateEnd}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.expiryDateStart != null">
|
<if test="currency.expiryDateStart != null">
|
||||||
AND bc.expiry_date >= #{currency.expiryDateStart}
|
AND expiry_date >= #{currency.expiryDateStart}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.expiryDateEnd != null">
|
<if test="currency.expiryDateEnd != null">
|
||||||
AND bc.expiry_date <= #{currency.expiryDateEnd}
|
AND expiry_date <= #{currency.expiryDateEnd}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.updateTimeStart != null">
|
<if test="currency.updateTimeStart != null">
|
||||||
AND bc.update_time >= #{currency.updateTimeStart}
|
AND update_time >= #{currency.updateTimeStart}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency.updateTimeEnd != null">
|
<if test="currency.updateTimeEnd != null">
|
||||||
AND bc.update_time <= #{currency.updateTimeEnd}
|
AND update_time <= #{currency.updateTimeEnd}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY bc.create_time DESC
|
ORDER BY code ASC, effective_date DESC, create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<if test="customerType.status != null">
|
<if test="customerType.status != null">
|
||||||
AND status = #{customerType.status}
|
AND status = #{customerType.status}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY create_time DESC
|
ORDER BY update_time DESC, create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="status" property="status"/>
|
<result column="status" property="status"/>
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
<result column="fee_category" property="feeCategory"/>
|
|
||||||
<result column="name" property="name"/>
|
<result column="name" property="name"/>
|
||||||
<result column="english_name" property="englishName"/>
|
<result column="english_name" property="englishName"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@@ -23,9 +22,6 @@
|
|||||||
blade_fee_item
|
blade_fee_item
|
||||||
WHERE
|
WHERE
|
||||||
is_deleted = 0
|
is_deleted = 0
|
||||||
<if test="feeItem.feeCategory != null and feeItem.feeCategory != ''">
|
|
||||||
AND fee_category = #{feeItem.feeCategory}
|
|
||||||
</if>
|
|
||||||
<if test="feeItem.name != null and feeItem.name != ''">
|
<if test="feeItem.name != null and feeItem.name != ''">
|
||||||
<bind name="nameLike" value="'%' + feeItem.name + '%'"/>
|
<bind name="nameLike" value="'%' + feeItem.name + '%'"/>
|
||||||
AND name LIKE #{nameLike}
|
AND name LIKE #{nameLike}
|
||||||
@@ -37,7 +33,7 @@
|
|||||||
<if test="feeItem.status != null">
|
<if test="feeItem.status != null">
|
||||||
AND status = #{feeItem.status}
|
AND status = #{feeItem.status}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY create_time DESC
|
ORDER BY update_time DESC, create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<result column="create_dept" property="createDept"/>
|
<result column="create_dept" property="createDept"/>
|
||||||
<result column="create_time" property="createTime"/>
|
<result column="create_time" property="createTime"/>
|
||||||
<result column="update_user" property="updateUser"/>
|
<result column="update_user" property="updateUser"/>
|
||||||
<result column="update_user_name" property="updateUserName"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="status" property="status"/>
|
<result column="status" property="status"/>
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
@@ -20,10 +19,6 @@
|
|||||||
<result column="parent_name" property="parentName"/>
|
<result column="parent_name" property="parentName"/>
|
||||||
<result column="country" property="country"/>
|
<result column="country" property="country"/>
|
||||||
<result column="city" property="city"/>
|
<result column="city" property="city"/>
|
||||||
<result column="district_code" property="districtCode"/>
|
|
||||||
<result column="district_name" property="districtName"/>
|
|
||||||
<result column="district_code" property="regionCode"/>
|
|
||||||
<result column="detail_address" property="detailAddress"/>
|
|
||||||
<result column="longitude" property="longitude"/>
|
<result column="longitude" property="longitude"/>
|
||||||
<result column="latitude" property="latitude"/>
|
<result column="latitude" property="latitude"/>
|
||||||
<result column="data_source" property="dataSource"/>
|
<result column="data_source" property="dataSource"/>
|
||||||
@@ -32,80 +27,61 @@
|
|||||||
|
|
||||||
<select id="selectPortTerminalPage" resultMap="portTerminalResultMap">
|
<select id="selectPortTerminalPage" resultMap="portTerminalResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
pt.id,
|
id,
|
||||||
pt.create_user,
|
create_user,
|
||||||
pt.create_dept,
|
create_dept,
|
||||||
pt.create_time,
|
create_time,
|
||||||
pt.update_user,
|
update_user,
|
||||||
bu.real_name AS update_user_name,
|
update_time,
|
||||||
pt.update_time,
|
status,
|
||||||
pt.status,
|
is_deleted,
|
||||||
pt.is_deleted,
|
code,
|
||||||
pt.code,
|
name,
|
||||||
pt.name,
|
category,
|
||||||
pt.category,
|
parent_id,
|
||||||
pt.parent_id,
|
parent_code,
|
||||||
pt.parent_code,
|
parent_name,
|
||||||
pt.parent_name,
|
country,
|
||||||
pt.country,
|
city,
|
||||||
pt.city,
|
CASE WHEN longitude BETWEEN -180 AND 180 THEN longitude ELSE NULL END AS longitude,
|
||||||
pt.district_code,
|
CASE WHEN latitude BETWEEN -90 AND 90 THEN latitude ELSE NULL END AS latitude,
|
||||||
pt.district_name,
|
CASE WHEN data_source = '初始导入' THEN '初始化导入' ELSE data_source END AS data_source,
|
||||||
pt.detail_address,
|
remark
|
||||||
CASE WHEN pt.longitude BETWEEN -180 AND 180 THEN pt.longitude ELSE NULL END AS longitude,
|
|
||||||
CASE WHEN pt.latitude BETWEEN -90 AND 90 THEN pt.latitude ELSE NULL END AS latitude,
|
|
||||||
CASE WHEN pt.data_source = '初始导入' THEN '初始化导入' ELSE pt.data_source END AS data_source,
|
|
||||||
pt.remark
|
|
||||||
FROM
|
FROM
|
||||||
blade_port_terminal pt
|
blade_port_terminal
|
||||||
LEFT JOIN blade_user bu ON bu.id = pt.update_user
|
|
||||||
WHERE
|
WHERE
|
||||||
pt.is_deleted = 0
|
is_deleted = 0
|
||||||
<if test="portTerminal.code != null and portTerminal.code != ''">
|
<if test="portTerminal.code != null and portTerminal.code != ''">
|
||||||
<bind name="codeLike" value="'%' + portTerminal.code + '%'"/>
|
<bind name="codeLike" value="'%' + portTerminal.code + '%'"/>
|
||||||
AND pt.code LIKE #{codeLike}
|
AND code LIKE #{codeLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="portTerminal.name != null and portTerminal.name != ''">
|
<if test="portTerminal.name != null and portTerminal.name != ''">
|
||||||
<bind name="nameLike" value="'%' + portTerminal.name + '%'"/>
|
<bind name="nameLike" value="'%' + portTerminal.name + '%'"/>
|
||||||
AND pt.name LIKE #{nameLike}
|
AND name LIKE #{nameLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="portTerminal.category != null and portTerminal.category != ''">
|
<if test="portTerminal.category != null and portTerminal.category != ''">
|
||||||
AND pt.category = #{portTerminal.category}
|
AND category = #{portTerminal.category}
|
||||||
</if>
|
</if>
|
||||||
<if test="portTerminal.dataSource != null and portTerminal.dataSource != ''">
|
<if test="portTerminal.dataSource != null and portTerminal.dataSource != ''">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="portTerminal.dataSource == '初始化导入'">
|
<when test="portTerminal.dataSource == '初始化导入'">
|
||||||
AND pt.data_source IN ('初始化导入', '初始导入')
|
AND data_source IN ('初始化导入', '初始导入')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
AND pt.data_source = #{portTerminal.dataSource}
|
AND data_source = #{portTerminal.dataSource}
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="portTerminal.city != null and portTerminal.city != ''">
|
<if test="portTerminal.city != null and portTerminal.city != ''">
|
||||||
AND pt.city = #{portTerminal.city}
|
AND city = #{portTerminal.city}
|
||||||
</if>
|
|
||||||
<if test="portTerminal.districtCode != null and portTerminal.districtCode != ''">
|
|
||||||
AND pt.district_code = #{portTerminal.districtCode}
|
|
||||||
</if>
|
|
||||||
<if test="portTerminal.districtName != null and portTerminal.districtName != ''">
|
|
||||||
<bind name="districtNameLike" value="'%' + portTerminal.districtName + '%'"/>
|
|
||||||
AND pt.district_name LIKE #{districtNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="portTerminal.regionCode != null and portTerminal.regionCode != ''">
|
|
||||||
AND pt.district_code = #{portTerminal.regionCode}
|
|
||||||
</if>
|
|
||||||
<if test="portTerminal.detailAddress != null and portTerminal.detailAddress != ''">
|
|
||||||
<bind name="detailAddressLike" value="'%' + portTerminal.detailAddress + '%'"/>
|
|
||||||
AND pt.detail_address LIKE #{detailAddressLike}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="portTerminal.country != null and portTerminal.country != ''">
|
<if test="portTerminal.country != null and portTerminal.country != ''">
|
||||||
AND pt.country = #{portTerminal.country}
|
AND country = #{portTerminal.country}
|
||||||
</if>
|
</if>
|
||||||
<if test="portTerminal.status != null">
|
<if test="portTerminal.status != null">
|
||||||
AND pt.status = #{portTerminal.status}
|
AND status = #{portTerminal.status}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY pt.create_time DESC
|
ORDER BY update_time DESC, create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<result column="create_dept" property="createDept"/>
|
<result column="create_dept" property="createDept"/>
|
||||||
<result column="create_time" property="createTime"/>
|
<result column="create_time" property="createTime"/>
|
||||||
<result column="update_user" property="updateUser"/>
|
<result column="update_user" property="updateUser"/>
|
||||||
<result column="update_user_name" property="updateUserName"/>
|
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
<result column="status" property="status"/>
|
<result column="status" property="status"/>
|
||||||
<result column="is_deleted" property="isDeleted"/>
|
<result column="is_deleted" property="isDeleted"/>
|
||||||
@@ -21,11 +20,6 @@
|
|||||||
<result column="province_name" property="provinceName"/>
|
<result column="province_name" property="provinceName"/>
|
||||||
<result column="city_code" property="cityCode"/>
|
<result column="city_code" property="cityCode"/>
|
||||||
<result column="city_name" property="cityName"/>
|
<result column="city_name" property="cityName"/>
|
||||||
<result column="district_code" property="districtCode"/>
|
|
||||||
<result column="district_name" property="districtName"/>
|
|
||||||
<result column="district_code" property="regionCode"/>
|
|
||||||
<result column="region_name" property="regionName"/>
|
|
||||||
<result column="detail_address" property="detailAddress"/>
|
|
||||||
<result column="longitude" property="longitude"/>
|
<result column="longitude" property="longitude"/>
|
||||||
<result column="latitude" property="latitude"/>
|
<result column="latitude" property="latitude"/>
|
||||||
<result column="data_source" property="dataSource"/>
|
<result column="data_source" property="dataSource"/>
|
||||||
@@ -34,94 +28,70 @@
|
|||||||
|
|
||||||
<select id="selectRailwayStationPage" resultMap="railwayStationResultMap">
|
<select id="selectRailwayStationPage" resultMap="railwayStationResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
rs.id,
|
id,
|
||||||
rs.create_user,
|
create_user,
|
||||||
rs.create_dept,
|
create_dept,
|
||||||
rs.create_time,
|
create_time,
|
||||||
rs.update_user,
|
update_user,
|
||||||
bu.real_name AS update_user_name,
|
update_time,
|
||||||
rs.update_time,
|
status,
|
||||||
rs.status,
|
is_deleted,
|
||||||
rs.is_deleted,
|
code,
|
||||||
rs.code,
|
tmis_code,
|
||||||
rs.tmis_code,
|
telegraph_code,
|
||||||
rs.telegraph_code,
|
name,
|
||||||
rs.name,
|
railway_line,
|
||||||
rs.railway_line,
|
province_code,
|
||||||
rs.province_code,
|
province_name,
|
||||||
rs.province_name,
|
city_code,
|
||||||
rs.city_code,
|
city_name,
|
||||||
rs.city_name,
|
longitude,
|
||||||
rs.district_code,
|
latitude,
|
||||||
rs.district_name,
|
|
||||||
rs.region_name,
|
|
||||||
rs.detail_address,
|
|
||||||
rs.longitude,
|
|
||||||
rs.latitude,
|
|
||||||
CASE
|
CASE
|
||||||
WHEN rs.data_source = '初始导入' THEN '初始化导入'
|
WHEN data_source = '初始导入' THEN '初始化导入'
|
||||||
WHEN rs.data_source = '批量导入' THEN '批量'
|
WHEN data_source = '批量导入' THEN '批量'
|
||||||
WHEN rs.data_source IN ('手工导入', '手动录入') THEN '手动'
|
WHEN data_source IN ('手工导入', '手动录入') THEN '手动'
|
||||||
ELSE rs.data_source
|
ELSE data_source
|
||||||
END AS data_source,
|
END AS data_source,
|
||||||
rs.remark
|
remark
|
||||||
FROM
|
FROM
|
||||||
blade_railway_station rs
|
blade_railway_station
|
||||||
LEFT JOIN blade_user bu ON bu.id = rs.update_user
|
|
||||||
WHERE
|
WHERE
|
||||||
rs.is_deleted = 0
|
is_deleted = 0
|
||||||
<if test="railwayStation.code != null and railwayStation.code != ''">
|
<if test="railwayStation.code != null and railwayStation.code != ''">
|
||||||
<bind name="codeLike" value="'%' + railwayStation.code + '%'"/>
|
<bind name="codeLike" value="'%' + railwayStation.code + '%'"/>
|
||||||
AND rs.code LIKE #{codeLike}
|
AND code LIKE #{codeLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="railwayStation.name != null and railwayStation.name != ''">
|
<if test="railwayStation.name != null and railwayStation.name != ''">
|
||||||
<bind name="nameLike" value="'%' + railwayStation.name + '%'"/>
|
<bind name="nameLike" value="'%' + railwayStation.name + '%'"/>
|
||||||
AND rs.name LIKE #{nameLike}
|
AND name LIKE #{nameLike}
|
||||||
</if>
|
</if>
|
||||||
<if test="railwayStation.tmisCode != null and railwayStation.tmisCode != ''">
|
<if test="railwayStation.tmisCode != null and railwayStation.tmisCode != ''">
|
||||||
AND rs.tmis_code = #{railwayStation.tmisCode}
|
AND tmis_code = #{railwayStation.tmisCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="railwayStation.telegraphCode != null and railwayStation.telegraphCode != ''">
|
<if test="railwayStation.telegraphCode != null and railwayStation.telegraphCode != ''">
|
||||||
AND rs.telegraph_code = #{railwayStation.telegraphCode}
|
AND telegraph_code = #{railwayStation.telegraphCode}
|
||||||
</if>
|
|
||||||
<if test="railwayStation.regionCode != null and railwayStation.regionCode != ''">
|
|
||||||
AND rs.district_code = #{railwayStation.regionCode}
|
|
||||||
</if>
|
|
||||||
<if test="railwayStation.districtCode != null and railwayStation.districtCode != ''">
|
|
||||||
AND rs.district_code = #{railwayStation.districtCode}
|
|
||||||
</if>
|
|
||||||
<if test="railwayStation.districtName != null and railwayStation.districtName != ''">
|
|
||||||
<bind name="districtNameLike" value="'%' + railwayStation.districtName + '%'"/>
|
|
||||||
AND rs.district_name LIKE #{districtNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="railwayStation.regionName != null and railwayStation.regionName != ''">
|
|
||||||
<bind name="regionNameLike" value="'%' + railwayStation.regionName + '%'"/>
|
|
||||||
AND rs.region_name LIKE #{regionNameLike}
|
|
||||||
</if>
|
|
||||||
<if test="railwayStation.detailAddress != null and railwayStation.detailAddress != ''">
|
|
||||||
<bind name="detailAddressLike" value="'%' + railwayStation.detailAddress + '%'"/>
|
|
||||||
AND rs.detail_address LIKE #{detailAddressLike}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="railwayStation.dataSource != null and railwayStation.dataSource != ''">
|
<if test="railwayStation.dataSource != null and railwayStation.dataSource != ''">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="railwayStation.dataSource == '初始化导入'">
|
<when test="railwayStation.dataSource == '初始化导入'">
|
||||||
AND rs.data_source IN ('初始化导入', '初始导入')
|
AND data_source IN ('初始化导入', '初始导入')
|
||||||
</when>
|
</when>
|
||||||
<when test="railwayStation.dataSource == '批量'">
|
<when test="railwayStation.dataSource == '批量'">
|
||||||
AND rs.data_source IN ('批量', '批量导入')
|
AND data_source IN ('批量', '批量导入')
|
||||||
</when>
|
</when>
|
||||||
<when test="railwayStation.dataSource == '手动'">
|
<when test="railwayStation.dataSource == '手动'">
|
||||||
AND rs.data_source IN ('手动', '手动录入', '手工导入')
|
AND data_source IN ('手动', '手动录入', '手工导入')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
AND rs.data_source = #{railwayStation.dataSource}
|
AND data_source = #{railwayStation.dataSource}
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="railwayStation.status != null">
|
<if test="railwayStation.status != null">
|
||||||
AND rs.status = #{railwayStation.status}
|
AND status = #{railwayStation.status}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY rs.create_time DESC
|
ORDER BY update_time DESC, create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public interface RegionMapper extends BaseMapper<Region> {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> lazyTree(String parentCode, Map<String, Object> param);
|
List<RegionVO> lazyTree(String parentCode, Map<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出区划数据
|
* 导出区划数据
|
||||||
|
|||||||
@@ -72,17 +72,16 @@
|
|||||||
and region.name like concat(concat('%', #{param2.name}),'%')
|
and region.name like concat(concat('%', #{param2.name}),'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY region.sort ASC, region.code ASC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="lazyTree" resultType="java.util.HashMap">
|
<select id="lazyTree" resultMap="treeNodeResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
region.code AS id,
|
region.code AS "id",
|
||||||
region.parent_code AS parentId,
|
region.parent_code AS "parent_id",
|
||||||
region.name AS title,
|
region.name AS "title",
|
||||||
region.code AS value,
|
region.code AS "value",
|
||||||
region.code AS `key`,
|
region.code AS "key",
|
||||||
( SELECT CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END FROM blade_region WHERE parent_code = region.code ) AS hasChildren
|
( SELECT CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END FROM blade_region WHERE parent_code = region.code ) AS "has_children"
|
||||||
FROM
|
FROM
|
||||||
blade_region region
|
blade_region region
|
||||||
<where>
|
<where>
|
||||||
@@ -96,7 +95,7 @@
|
|||||||
and region.name like concat(concat('%', #{param2.name}),'%')
|
and region.name like concat(concat('%', #{param2.name}),'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY region.sort ASC, region.code ASC
|
ORDER BY region.code
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="exportRegion" resultType="org.springblade.system.excel.RegionExcel">
|
<select id="exportRegion" resultType="org.springblade.system.excel.RegionExcel">
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public interface IAirportMasterService extends BaseService<AirportMaster> {
|
|||||||
*
|
*
|
||||||
* @param data 导入数据
|
* @param data 导入数据
|
||||||
*/
|
*/
|
||||||
List<AirportMasterExcel> importAirportMaster(List<AirportMasterExcel> data);
|
void importAirportMaster(List<AirportMasterExcel> data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出空港机场
|
* 导出空港机场
|
||||||
|
|||||||
@@ -1,103 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.CargoTypeExcel;
|
|
||||||
import org.springblade.system.excel.CargoTypeExportExcel;
|
|
||||||
import org.springblade.system.excel.CargoTypeImportFailureExcel;
|
|
||||||
import org.springblade.system.pojo.entity.CargoType;
|
|
||||||
import org.springblade.system.pojo.vo.CargoTypeVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型 服务类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public interface ICargoTypeService extends BaseService<CargoType> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义分页
|
|
||||||
*
|
|
||||||
* @param page 分页参数
|
|
||||||
* @param cargoType 查询参数
|
|
||||||
* @return 货物类型分页
|
|
||||||
*/
|
|
||||||
IPage<CargoTypeVO> selectCargoTypePage(IPage<CargoTypeVO> page, CargoTypeVO cargoType);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或修改货物类型
|
|
||||||
*
|
|
||||||
* @param cargoType 货物类型
|
|
||||||
* @return 是否成功
|
|
||||||
*/
|
|
||||||
boolean submit(CargoType cargoType);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除货物类型
|
|
||||||
*
|
|
||||||
* @param ids 主键集合
|
|
||||||
* @return 是否成功
|
|
||||||
*/
|
|
||||||
boolean deleteCargoTypes(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 一级货物类型选项
|
|
||||||
*
|
|
||||||
* @param keyword 关键字
|
|
||||||
* @return 一级货物类型列表
|
|
||||||
*/
|
|
||||||
List<CargoTypeVO> parentOptions(String keyword);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取二级货物类型建议编码
|
|
||||||
*
|
|
||||||
* @param parentCargoCode 上级货物类型编码
|
|
||||||
* @return 建议编码
|
|
||||||
*/
|
|
||||||
String nextChildCode(String parentCargoCode);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入货物类型
|
|
||||||
*
|
|
||||||
* @param data 导入数据
|
|
||||||
* @return 导入失败数据
|
|
||||||
*/
|
|
||||||
List<CargoTypeImportFailureExcel> importCargoType(List<CargoTypeExcel> data);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出货物类型
|
|
||||||
*
|
|
||||||
* @param queryWrapper 查询条件
|
|
||||||
* @return 导出数据
|
|
||||||
*/
|
|
||||||
List<CargoTypeExportExcel> exportCargoType(Wrapper<CargoType> queryWrapper);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -73,7 +73,7 @@ public interface ICurrencyService extends BaseService<Currency> {
|
|||||||
*
|
*
|
||||||
* @param data 导入数据
|
* @param data 导入数据
|
||||||
*/
|
*/
|
||||||
List<CurrencyExcel> importCurrency(List<CurrencyExcel> data);
|
void importCurrency(List<CurrencyExcel> data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出币种汇率
|
* 导出币种汇率
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public interface IPortTerminalService extends BaseService<PortTerminal> {
|
|||||||
*
|
*
|
||||||
* @param data 导入数据
|
* @param data 导入数据
|
||||||
*/
|
*/
|
||||||
List<PortTerminalExcel> importPortTerminal(List<PortTerminalExcel> data);
|
void importPortTerminal(List<PortTerminalExcel> data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出港口码头
|
* 导出港口码头
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public interface IRailwayStationService extends BaseService<RailwayStation> {
|
|||||||
*
|
*
|
||||||
* @param data 导入数据
|
* @param data 导入数据
|
||||||
*/
|
*/
|
||||||
List<RailwayStationExcel> importRailwayStation(List<RailwayStationExcel> data);
|
void importRailwayStation(List<RailwayStationExcel> data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出铁路车站
|
* 导出铁路车站
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public interface IRegionService extends IService<Region> {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> lazyTree(String parentCode, Map<String, Object> param);
|
List<RegionVO> lazyTree(String parentCode, Map<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入区划数据
|
* 导入区划数据
|
||||||
@@ -82,7 +82,7 @@ public interface IRegionService extends IService<Region> {
|
|||||||
* @param isCovered
|
* @param isCovered
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RegionExcel> importRegion(List<RegionExcel> data, Boolean isCovered);
|
void importRegion(List<RegionExcel> data, Boolean isCovered);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出区划数据
|
* 导出区划数据
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -66,15 +65,12 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
private static final String SOURCE_BATCH = "批量导入";
|
private static final String SOURCE_BATCH = "批量导入";
|
||||||
private static final String SOURCE_MANUAL = "手动录入";
|
private static final String SOURCE_MANUAL = "手动录入";
|
||||||
private static final String SOURCE_MANUAL_OLD = "手工导入";
|
private static final String SOURCE_MANUAL_OLD = "手工导入";
|
||||||
private static final String DEFAULT_COUNTRY_CODE = "+86";
|
|
||||||
private static final int STATUS_ENABLED = 1;
|
private static final int STATUS_ENABLED = 1;
|
||||||
private static final int STATUS_DISABLED = 2;
|
private static final int STATUS_DISABLED = 2;
|
||||||
private static final int CODE_MAX_LENGTH = 20;
|
private static final int CODE_MAX_LENGTH = 20;
|
||||||
private static final int NAME_MAX_LENGTH = 100;
|
private static final int NAME_MAX_LENGTH = 100;
|
||||||
private static final int SHORT_NAME_MAX_LENGTH = 100;
|
private static final int SHORT_NAME_MAX_LENGTH = 100;
|
||||||
private static final int REGION_NAME_MAX_LENGTH = 128;
|
private static final int REGION_NAME_MAX_LENGTH = 128;
|
||||||
private static final int REGION_CODE_MAX_LENGTH = 32;
|
|
||||||
private static final int DETAIL_ADDRESS_MAX_LENGTH = 255;
|
|
||||||
private static final int REMARK_MAX_LENGTH = 200;
|
private static final int REMARK_MAX_LENGTH = 200;
|
||||||
private static final Pattern IATA_CODE_PATTERN = Pattern.compile("^[A-Z]{3}$");
|
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 Pattern ICAO_CODE_PATTERN = Pattern.compile("^[A-Z]{4}$");
|
||||||
@@ -119,11 +115,11 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public List<AirportMasterExcel> importAirportMaster(List<AirportMasterExcel> data) {
|
public void importAirportMaster(List<AirportMasterExcel> data) {
|
||||||
if (Func.isEmpty(data)) {
|
if (Func.isEmpty(data)) {
|
||||||
throw new ServiceException("导入数据不能为空");
|
throw new ServiceException("导入数据不能为空");
|
||||||
}
|
}
|
||||||
List<AirportMasterExcel> errorList = new ArrayList<>();
|
List<String> errorList = new ArrayList<>();
|
||||||
for (int index = 0; index < data.size(); index++) {
|
for (int index = 0; index < data.size(); index++) {
|
||||||
AirportMasterExcel excel = data.get(index);
|
AirportMasterExcel excel = data.get(index);
|
||||||
try {
|
try {
|
||||||
@@ -135,11 +131,12 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
save(airportMaster);
|
save(airportMaster);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + message);
|
errorList.add("第" + (index + 2) + "行:" + message);
|
||||||
errorList.add(excel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errorList;
|
if (Func.isNotEmpty(errorList)) {
|
||||||
|
throw new ServiceException(String.join(";", errorList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -147,21 +144,12 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
List<AirportMaster> airportMasterList = list(queryWrapper);
|
List<AirportMaster> airportMasterList = list(queryWrapper);
|
||||||
return airportMasterList.stream().map(airportMaster -> {
|
return airportMasterList.stream().map(airportMaster -> {
|
||||||
AirportMasterExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterExcel.class));
|
AirportMasterExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterExcel.class));
|
||||||
excel.setLongitude(scaleCoordinate(airportMaster.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE));
|
|
||||||
excel.setLatitude(scaleCoordinate(airportMaster.getLatitude(), MIN_LATITUDE, MAX_LATITUDE));
|
|
||||||
excel.setDataSource(normalizeDataSource(airportMaster.getDataSource()));
|
excel.setDataSource(normalizeDataSource(airportMaster.getDataSource()));
|
||||||
excel.setStatusName(Objects.equals(airportMaster.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
excel.setStatusName(Objects.equals(airportMaster.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||||
return excel;
|
return excel;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private BigDecimal scaleCoordinate(BigDecimal value, BigDecimal min, BigDecimal max) {
|
|
||||||
if (Func.isEmpty(value)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return validRange(value, min, max) ? value.setScale(6, RoundingMode.HALF_UP) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void prepare(AirportMaster airportMaster, String defaultDataSource) {
|
private void prepare(AirportMaster airportMaster, String defaultDataSource) {
|
||||||
airportMaster.setIataCode(trimToEmpty(airportMaster.getIataCode()).toUpperCase(Locale.ROOT));
|
airportMaster.setIataCode(trimToEmpty(airportMaster.getIataCode()).toUpperCase(Locale.ROOT));
|
||||||
airportMaster.setCode(CODE_PREFIX + airportMaster.getIataCode());
|
airportMaster.setCode(CODE_PREFIX + airportMaster.getIataCode());
|
||||||
@@ -172,17 +160,6 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
airportMaster.setProvinceName(trimToNull(airportMaster.getProvinceName()));
|
airportMaster.setProvinceName(trimToNull(airportMaster.getProvinceName()));
|
||||||
airportMaster.setCityCode(trimToNull(airportMaster.getCityCode()));
|
airportMaster.setCityCode(trimToNull(airportMaster.getCityCode()));
|
||||||
airportMaster.setCityName(trimToNull(airportMaster.getCityName()));
|
airportMaster.setCityName(trimToNull(airportMaster.getCityName()));
|
||||||
airportMaster.setDistrictCode(trimToNull(airportMaster.getDistrictCode()));
|
|
||||||
airportMaster.setDistrictName(trimToNull(airportMaster.getDistrictName()));
|
|
||||||
airportMaster.setRegionCode(trimToNull(airportMaster.getRegionCode()));
|
|
||||||
airportMaster.setRegionName(trimToNull(airportMaster.getRegionName()));
|
|
||||||
if (Func.isEmpty(airportMaster.getDistrictCode()) && Func.isNotEmpty(airportMaster.getRegionCode())) {
|
|
||||||
airportMaster.setDistrictCode(airportMaster.getRegionCode());
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(airportMaster.getDistrictName()) && Func.isNotEmpty(airportMaster.getRegionName())) {
|
|
||||||
airportMaster.setDistrictName(airportMaster.getRegionName());
|
|
||||||
}
|
|
||||||
airportMaster.setDetailAddress(trimToNull(airportMaster.getDetailAddress()));
|
|
||||||
airportMaster.setRemark(trimToNull(airportMaster.getRemark()));
|
airportMaster.setRemark(trimToNull(airportMaster.getRemark()));
|
||||||
airportMaster.setDataSource(normalizeDataSource(Func.toStrWithEmpty(airportMaster.getDataSource(), defaultDataSource)));
|
airportMaster.setDataSource(normalizeDataSource(Func.toStrWithEmpty(airportMaster.getDataSource(), defaultDataSource)));
|
||||||
if (Func.isEmpty(airportMaster.getStatus())) {
|
if (Func.isEmpty(airportMaster.getStatus())) {
|
||||||
@@ -212,13 +189,9 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
validateLength(airportMaster.getShortName(), SHORT_NAME_MAX_LENGTH, "机场简称不能超过100字");
|
validateLength(airportMaster.getShortName(), SHORT_NAME_MAX_LENGTH, "机场简称不能超过100字");
|
||||||
validateLength(airportMaster.getProvinceName(), REGION_NAME_MAX_LENGTH, "所属省份不能超过128字");
|
validateLength(airportMaster.getProvinceName(), REGION_NAME_MAX_LENGTH, "所属省份不能超过128字");
|
||||||
validateLength(airportMaster.getCityName(), REGION_NAME_MAX_LENGTH, "所属城市不能超过128字");
|
validateLength(airportMaster.getCityName(), REGION_NAME_MAX_LENGTH, "所属城市不能超过128字");
|
||||||
validateLength(airportMaster.getDistrictName(), REGION_NAME_MAX_LENGTH, "所属区县不能超过128字");
|
|
||||||
validateLength(airportMaster.getRegionCode(), REGION_CODE_MAX_LENGTH, "行政区划编码不能超过32字");
|
|
||||||
validateLength(airportMaster.getRegionName(), REGION_NAME_MAX_LENGTH, "行政区划不能超过128字");
|
|
||||||
validateLength(airportMaster.getDetailAddress(), DETAIL_ADDRESS_MAX_LENGTH, "详细地址不能超过255字");
|
|
||||||
validateLength(airportMaster.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200字");
|
validateLength(airportMaster.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200字");
|
||||||
if (Func.isEmpty(airportMaster.getProvinceCode()) || Func.isEmpty(airportMaster.getCityCode()) || Func.isEmpty(airportMaster.getDistrictCode())) {
|
if (Func.isEmpty(airportMaster.getProvinceCode()) || Func.isEmpty(airportMaster.getCityCode())) {
|
||||||
throw new ServiceException("请选择省份、城市和区县");
|
throw new ServiceException("请选择省份和城市");
|
||||||
}
|
}
|
||||||
validateCoordinate(airportMaster.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度");
|
validateCoordinate(airportMaster.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度");
|
||||||
validateCoordinate(airportMaster.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度");
|
validateCoordinate(airportMaster.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度");
|
||||||
@@ -236,7 +209,7 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
}
|
}
|
||||||
if (Func.isEmpty(province) && Func.isNotEmpty(airportMaster.getProvinceName())) {
|
if (Func.isEmpty(province) && Func.isNotEmpty(airportMaster.getProvinceName())) {
|
||||||
province = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
province = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
||||||
.eq(Region::getParentCode, DEFAULT_COUNTRY_CODE)
|
.eq(Region::getParentCode, "00")
|
||||||
.eq(Region::getName, airportMaster.getProvinceName()), false);
|
.eq(Region::getName, airportMaster.getProvinceName()), false);
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(province)) {
|
if (Func.isEmpty(province)) {
|
||||||
@@ -262,26 +235,6 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
airportMaster.setProvinceName(province.getName());
|
airportMaster.setProvinceName(province.getName());
|
||||||
airportMaster.setCityCode(city.getCode());
|
airportMaster.setCityCode(city.getCode());
|
||||||
airportMaster.setCityName(city.getName());
|
airportMaster.setCityName(city.getName());
|
||||||
|
|
||||||
Region district = null;
|
|
||||||
if (Func.isNotEmpty(airportMaster.getDistrictCode())) {
|
|
||||||
district = regionService.getById(airportMaster.getDistrictCode());
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district) && Func.isNotEmpty(airportMaster.getDistrictName())) {
|
|
||||||
district = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
|
||||||
.eq(Region::getParentCode, city.getCode())
|
|
||||||
.eq(Region::getName, airportMaster.getDistrictName()), false);
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district)) {
|
|
||||||
throw new ServiceException("请选择区县");
|
|
||||||
}
|
|
||||||
if (!Objects.equals(district.getParentCode(), city.getCode())) {
|
|
||||||
throw new ServiceException("所属区县与所属城市不匹配");
|
|
||||||
}
|
|
||||||
airportMaster.setDistrictCode(district.getCode());
|
|
||||||
airportMaster.setDistrictName(district.getName());
|
|
||||||
airportMaster.setRegionCode(district.getCode());
|
|
||||||
airportMaster.setRegionName(district.getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateCoordinate(BigDecimal value, BigDecimal min, BigDecimal max, String name) {
|
private void validateCoordinate(BigDecimal value, BigDecimal min, BigDecimal max, String name) {
|
||||||
@@ -293,10 +246,6 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validRange(BigDecimal value, BigDecimal min, BigDecimal max) {
|
|
||||||
return Func.isEmpty(value) || (value.compareTo(min) >= 0 && value.compareTo(max) <= 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateDataSource(String dataSource) {
|
private void validateDataSource(String dataSource) {
|
||||||
if (!SOURCE_INITIAL.equals(dataSource) && !SOURCE_BATCH.equals(dataSource) && !SOURCE_MANUAL.equals(dataSource)) {
|
if (!SOURCE_INITIAL.equals(dataSource) && !SOURCE_BATCH.equals(dataSource) && !SOURCE_MANUAL.equals(dataSource)) {
|
||||||
throw new ServiceException("数据来源不正确");
|
throw new ServiceException("数据来源不正确");
|
||||||
|
|||||||
@@ -1,384 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.Func;
|
|
||||||
import org.springblade.system.cache.UserCache;
|
|
||||||
import org.springblade.system.excel.CargoTypeExcel;
|
|
||||||
import org.springblade.system.excel.CargoTypeExportExcel;
|
|
||||||
import org.springblade.system.excel.CargoTypeImportFailureExcel;
|
|
||||||
import org.springblade.system.mapper.CargoTypeMapper;
|
|
||||||
import org.springblade.system.pojo.entity.CargoType;
|
|
||||||
import org.springblade.system.pojo.vo.CargoTypeVO;
|
|
||||||
import org.springblade.system.service.ICargoTypeService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型 服务实现类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class CargoTypeServiceImpl extends BaseServiceImpl<CargoTypeMapper, CargoType> implements ICargoTypeService {
|
|
||||||
|
|
||||||
private static final int TYPE_LEVEL_ONE = 1;
|
|
||||||
private static final int TYPE_LEVEL_TWO = 2;
|
|
||||||
private static final int STATUS_ENABLED = 1;
|
|
||||||
private static final int CARGO_NAME_MAX_LENGTH = 50;
|
|
||||||
private static final int REMARK_MAX_LENGTH = 200;
|
|
||||||
private static final String SOURCE_BATCH = "批量导入";
|
|
||||||
private static final String SOURCE_MANUAL = "手工录入";
|
|
||||||
private static final Pattern PARENT_CODE_PATTERN = Pattern.compile("^\\d{2}$");
|
|
||||||
private static final Pattern CHILD_CODE_PATTERN = Pattern.compile("^\\d{4}$");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IPage<CargoTypeVO> selectCargoTypePage(IPage<CargoTypeVO> page, CargoTypeVO cargoType) {
|
|
||||||
return page.setRecords(baseMapper.selectCargoTypePage(page, cargoType));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean submit(CargoType cargoType) {
|
|
||||||
prepare(cargoType, SOURCE_MANUAL);
|
|
||||||
validate(cargoType);
|
|
||||||
return saveOrUpdate(cargoType);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean deleteCargoTypes(List<Long> ids) {
|
|
||||||
if (Func.isEmpty(ids)) {
|
|
||||||
throw new ServiceException("请选择至少一条数据");
|
|
||||||
}
|
|
||||||
long childCount = count(Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.in(CargoType::getParentId, ids)
|
|
||||||
.eq(CargoType::getIsDeleted, 0));
|
|
||||||
if (childCount > 0L) {
|
|
||||||
throw new ServiceException("存在下级货物类型,不能删除");
|
|
||||||
}
|
|
||||||
return deleteLogic(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<CargoTypeVO> parentOptions(String keyword) {
|
|
||||||
String trimKeyword = trimToEmpty(keyword);
|
|
||||||
LambdaQueryWrapper<CargoType> queryWrapper = Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getTypeLevel, TYPE_LEVEL_ONE)
|
|
||||||
.eq(CargoType::getIsDeleted, 0)
|
|
||||||
.orderByAsc(CargoType::getCargoCode);
|
|
||||||
if (Func.isNotEmpty(trimKeyword)) {
|
|
||||||
queryWrapper.and(wrapper -> wrapper.like(CargoType::getCargoName, trimKeyword)
|
|
||||||
.or()
|
|
||||||
.like(CargoType::getCargoCode, trimKeyword));
|
|
||||||
}
|
|
||||||
return list(queryWrapper).stream().map(this::toParentOption).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String nextChildCode(String parentCargoCode) {
|
|
||||||
CargoType parent = findParentByCode(trimToEmpty(parentCargoCode));
|
|
||||||
if (parent == null) {
|
|
||||||
throw new ServiceException("请选择上级货物类型");
|
|
||||||
}
|
|
||||||
String parentCode = parent.getCargoCode();
|
|
||||||
String maxCode = list(Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getTypeLevel, TYPE_LEVEL_TWO)
|
|
||||||
.eq(CargoType::getParentCargoCode, parentCode)
|
|
||||||
.eq(CargoType::getIsDeleted, 0)
|
|
||||||
.orderByDesc(CargoType::getCargoCode))
|
|
||||||
.stream()
|
|
||||||
.map(CargoType::getCargoCode)
|
|
||||||
.filter(code -> code != null && CHILD_CODE_PATTERN.matcher(code).matches())
|
|
||||||
.findFirst()
|
|
||||||
.orElse(null);
|
|
||||||
int nextSerial = maxCode == null ? 1 : Integer.parseInt(maxCode.substring(2)) + 1;
|
|
||||||
if (nextSerial > 99) {
|
|
||||||
throw new ServiceException("二级编码序号已超过99");
|
|
||||||
}
|
|
||||||
return parentCode + String.format("%02d", nextSerial);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<CargoTypeImportFailureExcel> importCargoType(List<CargoTypeExcel> data) {
|
|
||||||
if (Func.isEmpty(data)) {
|
|
||||||
throw new ServiceException("导入数据不能为空");
|
|
||||||
}
|
|
||||||
List<CargoTypeImportFailureExcel> failureList = new ArrayList<>();
|
|
||||||
for (int index = 0; index < data.size(); index++) {
|
|
||||||
CargoTypeExcel excel = data.get(index);
|
|
||||||
try {
|
|
||||||
CargoType cargoType = buildImportCargoType(excel);
|
|
||||||
prepare(cargoType, SOURCE_BATCH);
|
|
||||||
validate(cargoType);
|
|
||||||
save(cargoType);
|
|
||||||
} catch (Exception exception) {
|
|
||||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
|
||||||
excel.setErrorMessage(message);
|
|
||||||
failureList.add(toImportFailureExcel(excel, "第" + (index + 2) + "行:" + message));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return failureList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<CargoTypeExportExcel> exportCargoType(Wrapper<CargoType> queryWrapper) {
|
|
||||||
return list(queryWrapper).stream().map(this::toExportExcel).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoType buildImportCargoType(CargoTypeExcel excel) {
|
|
||||||
CargoType cargoType = new CargoType();
|
|
||||||
cargoType.setTypeLevel(parseTypeLevel(excel.getTypeLevelName()));
|
|
||||||
cargoType.setParentCargoCode(trimToNull(excel.getParentCargoCode()));
|
|
||||||
cargoType.setCargoName(trimToEmpty(excel.getCargoName()));
|
|
||||||
cargoType.setCargoCode(trimToEmpty(excel.getCargoCode()));
|
|
||||||
cargoType.setRemark(trimToNull(excel.getRemark()));
|
|
||||||
if (Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_TWO)) {
|
|
||||||
CargoType parent = resolveImportParent(excel);
|
|
||||||
cargoType.setParentId(parent.getId());
|
|
||||||
cargoType.setParentCargoCode(parent.getCargoCode());
|
|
||||||
}
|
|
||||||
return cargoType;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Integer parseTypeLevel(String typeLevelName) {
|
|
||||||
String value = trimToEmpty(typeLevelName);
|
|
||||||
if ("一级货物类型".equals(value)) {
|
|
||||||
return TYPE_LEVEL_ONE;
|
|
||||||
}
|
|
||||||
if ("二级货物类型".equals(value)) {
|
|
||||||
return TYPE_LEVEL_TWO;
|
|
||||||
}
|
|
||||||
throw new ServiceException("请选择货物类型级别");
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoType resolveImportParent(CargoTypeExcel excel) {
|
|
||||||
String parentCode = trimToEmpty(excel.getParentCargoCode());
|
|
||||||
String parentName = trimToEmpty(excel.getParentCargoName());
|
|
||||||
if (Func.isEmpty(parentCode) && Func.isEmpty(parentName)) {
|
|
||||||
throw new ServiceException("请选择上级货物类型");
|
|
||||||
}
|
|
||||||
CargoType parent = Func.isNotEmpty(parentCode) ? findParentByCode(parentCode) : findParentByName(parentName);
|
|
||||||
if (parent == null) {
|
|
||||||
throw new ServiceException("请选择上级货物类型");
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(parentName) && !Objects.equals(parent.getCargoName(), parentName)) {
|
|
||||||
throw new ServiceException("请选择上级货物类型");
|
|
||||||
}
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void prepare(CargoType cargoType, String defaultDataSource) {
|
|
||||||
cargoType.setCargoName(trimToEmpty(cargoType.getCargoName()));
|
|
||||||
cargoType.setCargoCode(trimToEmpty(cargoType.getCargoCode()));
|
|
||||||
cargoType.setParentCargoCode(trimToNull(cargoType.getParentCargoCode()));
|
|
||||||
cargoType.setDataSource(Func.toStrWithEmpty(cargoType.getDataSource(), defaultDataSource));
|
|
||||||
cargoType.setRemark(trimToNull(cargoType.getRemark()));
|
|
||||||
if (Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_ONE)) {
|
|
||||||
cargoType.setParentId(null);
|
|
||||||
cargoType.setParentCargoCode(null);
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(cargoType.getStatus())) {
|
|
||||||
cargoType.setStatus(STATUS_ENABLED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validate(CargoType cargoType) {
|
|
||||||
if (!Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_ONE) && !Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_TWO)) {
|
|
||||||
throw new ServiceException("请选择货物类型级别");
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(cargoType.getCargoName())) {
|
|
||||||
throw new ServiceException("请输入货物类型名称");
|
|
||||||
}
|
|
||||||
if (cargoType.getCargoName().length() > CARGO_NAME_MAX_LENGTH) {
|
|
||||||
throw new ServiceException("货物类型名称不能超过50字符");
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(cargoType.getCargoCode())) {
|
|
||||||
throw new ServiceException("货物类型编码格式不正确");
|
|
||||||
}
|
|
||||||
if (Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_ONE)) {
|
|
||||||
validateParentCargoType(cargoType);
|
|
||||||
} else {
|
|
||||||
validateChildCargoType(cargoType);
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getRemark()) && cargoType.getRemark().length() > REMARK_MAX_LENGTH) {
|
|
||||||
throw new ServiceException("备注不能超过200字");
|
|
||||||
}
|
|
||||||
validateUniqueCode(cargoType);
|
|
||||||
validateUniqueName(cargoType);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateParentCargoType(CargoType cargoType) {
|
|
||||||
if (!PARENT_CODE_PATTERN.matcher(cargoType.getCargoCode()).matches()) {
|
|
||||||
throw new ServiceException("货物类型编码格式不正确");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateChildCargoType(CargoType cargoType) {
|
|
||||||
CargoType parent = resolveParent(cargoType);
|
|
||||||
if (parent == null) {
|
|
||||||
throw new ServiceException("请选择上级货物类型");
|
|
||||||
}
|
|
||||||
if (!CHILD_CODE_PATTERN.matcher(cargoType.getCargoCode()).matches()) {
|
|
||||||
throw new ServiceException("货物类型编码格式不正确");
|
|
||||||
}
|
|
||||||
if (!cargoType.getCargoCode().startsWith(parent.getCargoCode())) {
|
|
||||||
throw new ServiceException("货物类型编码前2位必须与上级货物类型编码一致");
|
|
||||||
}
|
|
||||||
if (Objects.equals(cargoType.getId(), parent.getId())) {
|
|
||||||
throw new ServiceException("请选择上级货物类型");
|
|
||||||
}
|
|
||||||
cargoType.setParentId(parent.getId());
|
|
||||||
cargoType.setParentCargoCode(parent.getCargoCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoType resolveParent(CargoType cargoType) {
|
|
||||||
if (Func.isNotEmpty(cargoType.getParentId())) {
|
|
||||||
CargoType parent = getById(cargoType.getParentId());
|
|
||||||
if (parent != null && Objects.equals(parent.getTypeLevel(), TYPE_LEVEL_ONE) && Objects.equals(parent.getIsDeleted(), 0)) {
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getParentCargoCode())) {
|
|
||||||
return findParentByCode(cargoType.getParentCargoCode());
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoType findParentByCode(String cargoCode) {
|
|
||||||
String code = trimToEmpty(cargoCode);
|
|
||||||
if (Func.isEmpty(code)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return getOne(Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getTypeLevel, TYPE_LEVEL_ONE)
|
|
||||||
.eq(CargoType::getCargoCode, code)
|
|
||||||
.eq(CargoType::getIsDeleted, 0)
|
|
||||||
.last("limit 1"));
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoType findParentByName(String cargoName) {
|
|
||||||
String name = trimToEmpty(cargoName);
|
|
||||||
if (Func.isEmpty(name)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return getOne(Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getTypeLevel, TYPE_LEVEL_ONE)
|
|
||||||
.eq(CargoType::getCargoName, name)
|
|
||||||
.eq(CargoType::getIsDeleted, 0)
|
|
||||||
.last("limit 1"));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateUniqueCode(CargoType cargoType) {
|
|
||||||
LambdaQueryWrapper<CargoType> queryWrapper = Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getCargoCode, cargoType.getCargoCode())
|
|
||||||
.eq(CargoType::getIsDeleted, 0);
|
|
||||||
if (Func.isNotEmpty(cargoType.getId())) {
|
|
||||||
queryWrapper.ne(CargoType::getId, cargoType.getId());
|
|
||||||
}
|
|
||||||
if (count(queryWrapper) > 0L) {
|
|
||||||
throw new ServiceException("该货物类型编码已存在");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateUniqueName(CargoType cargoType) {
|
|
||||||
LambdaQueryWrapper<CargoType> queryWrapper = Wrappers.<CargoType>lambdaQuery()
|
|
||||||
.eq(CargoType::getCargoName, cargoType.getCargoName())
|
|
||||||
.eq(CargoType::getTypeLevel, cargoType.getTypeLevel())
|
|
||||||
.eq(CargoType::getIsDeleted, 0);
|
|
||||||
if (Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_TWO)) {
|
|
||||||
queryWrapper.eq(CargoType::getParentCargoCode, cargoType.getParentCargoCode());
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(cargoType.getId())) {
|
|
||||||
queryWrapper.ne(CargoType::getId, cargoType.getId());
|
|
||||||
}
|
|
||||||
if (count(queryWrapper) > 0L) {
|
|
||||||
throw new ServiceException("该上级下已存在同名货物类型");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoTypeVO toParentOption(CargoType cargoType) {
|
|
||||||
CargoTypeVO cargoTypeVO = new CargoTypeVO();
|
|
||||||
cargoTypeVO.setId(cargoType.getId());
|
|
||||||
cargoTypeVO.setCargoName(cargoType.getCargoName());
|
|
||||||
cargoTypeVO.setCargoCode(cargoType.getCargoCode());
|
|
||||||
cargoTypeVO.setTypeLevel(cargoType.getTypeLevel());
|
|
||||||
cargoTypeVO.setTypeLevelName("一级货物类型");
|
|
||||||
return cargoTypeVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoTypeExportExcel toExportExcel(CargoType cargoType) {
|
|
||||||
CargoTypeExportExcel excel = new CargoTypeExportExcel();
|
|
||||||
excel.setTypeLevelName(Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_ONE) ? "一级货物类型" : "二级货物类型");
|
|
||||||
excel.setCargoName(cargoType.getCargoName());
|
|
||||||
excel.setCargoCode(cargoType.getCargoCode());
|
|
||||||
excel.setParentCargoName("/");
|
|
||||||
excel.setParentCargoCode("/");
|
|
||||||
if (Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_TWO)) {
|
|
||||||
CargoType parent = resolveParent(cargoType);
|
|
||||||
excel.setParentCargoName(parent == null ? "" : parent.getCargoName());
|
|
||||||
excel.setParentCargoCode(cargoType.getParentCargoCode());
|
|
||||||
}
|
|
||||||
excel.setCreateUserName(Func.isEmpty(cargoType.getCreateUser()) ? "" : UserCache.getUserRealName(cargoType.getCreateUser()));
|
|
||||||
excel.setRemark(cargoType.getRemark());
|
|
||||||
excel.setUpdateTime(cargoType.getUpdateTime());
|
|
||||||
excel.setCreateTime(cargoType.getCreateTime());
|
|
||||||
return excel;
|
|
||||||
}
|
|
||||||
|
|
||||||
private CargoTypeImportFailureExcel toImportFailureExcel(CargoTypeExcel excel, String failureReason) {
|
|
||||||
CargoTypeImportFailureExcel failureExcel = new CargoTypeImportFailureExcel();
|
|
||||||
failureExcel.setTypeLevelName(excel.getTypeLevelName());
|
|
||||||
failureExcel.setParentCargoName(excel.getParentCargoName());
|
|
||||||
failureExcel.setParentCargoCode(excel.getParentCargoCode());
|
|
||||||
failureExcel.setCargoName(excel.getCargoName());
|
|
||||||
failureExcel.setCargoCode(excel.getCargoCode());
|
|
||||||
failureExcel.setRemark(excel.getRemark());
|
|
||||||
failureExcel.setFailureReason(failureReason);
|
|
||||||
return failureExcel;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String trimToEmpty(String value) {
|
|
||||||
return value == null ? "" : value.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String trimToNull(String value) {
|
|
||||||
String trimValue = trimToEmpty(value);
|
|
||||||
return trimValue.isEmpty() ? null : trimValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -81,11 +81,6 @@ public class CurrencyServiceImpl extends BaseServiceImpl<CurrencyMapper, Currenc
|
|||||||
prepare(currency, SOURCE_MANUAL);
|
prepare(currency, SOURCE_MANUAL);
|
||||||
validate(currency);
|
validate(currency);
|
||||||
boolean result = saveOrUpdate(currency);
|
boolean result = saveOrUpdate(currency);
|
||||||
if (Func.isNotEmpty(currency.getId()) && Func.isEmpty(currency.getExchangeRate())) {
|
|
||||||
update(Wrappers.<Currency>lambdaUpdate()
|
|
||||||
.set(Currency::getExchangeRate, null)
|
|
||||||
.eq(Currency::getId, currency.getId()));
|
|
||||||
}
|
|
||||||
rebuildEnabledValidity(currency.getCode());
|
rebuildEnabledValidity(currency.getCode());
|
||||||
if (oldCurrency != null && !Objects.equals(oldCurrency.getCode(), currency.getCode())) {
|
if (oldCurrency != null && !Objects.equals(oldCurrency.getCode(), currency.getCode())) {
|
||||||
rebuildEnabledValidity(oldCurrency.getCode());
|
rebuildEnabledValidity(oldCurrency.getCode());
|
||||||
@@ -115,11 +110,11 @@ public class CurrencyServiceImpl extends BaseServiceImpl<CurrencyMapper, Currenc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CurrencyExcel> importCurrency(List<CurrencyExcel> data) {
|
public void importCurrency(List<CurrencyExcel> data) {
|
||||||
if (Func.isEmpty(data)) {
|
if (Func.isEmpty(data)) {
|
||||||
throw new ServiceException("导入数据不能为空");
|
throw new ServiceException("导入数据不能为空");
|
||||||
}
|
}
|
||||||
List<CurrencyExcel> errorList = new ArrayList<>();
|
List<String> errorList = new ArrayList<>();
|
||||||
int successCount = 0;
|
int successCount = 0;
|
||||||
for (int index = 0; index < data.size(); index++) {
|
for (int index = 0; index < data.size(); index++) {
|
||||||
CurrencyExcel excel = data.get(index);
|
CurrencyExcel excel = data.get(index);
|
||||||
@@ -134,11 +129,12 @@ public class CurrencyServiceImpl extends BaseServiceImpl<CurrencyMapper, Currenc
|
|||||||
successCount++;
|
successCount++;
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + message);
|
errorList.add("第" + (index + 2) + "行:" + message);
|
||||||
errorList.add(excel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errorList;
|
if (Func.isNotEmpty(errorList)) {
|
||||||
|
throw new ServiceException("导入成功" + successCount + "条,失败" + errorList.size() + "条:" + String.join(";", errorList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -209,14 +205,15 @@ public class CurrencyServiceImpl extends BaseServiceImpl<CurrencyMapper, Currenc
|
|||||||
if (currency.getDecimalPlaces() < MIN_DECIMAL_PLACES || currency.getDecimalPlaces() > MAX_DECIMAL_PLACES) {
|
if (currency.getDecimalPlaces() < MIN_DECIMAL_PLACES || currency.getDecimalPlaces() > MAX_DECIMAL_PLACES) {
|
||||||
throw new ServiceException("小数位数范围为0到8");
|
throw new ServiceException("小数位数范围为0到8");
|
||||||
}
|
}
|
||||||
if (Func.isNotEmpty(currency.getExchangeRate())) {
|
if (Func.isEmpty(currency.getExchangeRate())) {
|
||||||
|
throw new ServiceException("汇率不能为空");
|
||||||
|
}
|
||||||
if (currency.getExchangeRate().compareTo(BigDecimal.ZERO) <= 0) {
|
if (currency.getExchangeRate().compareTo(BigDecimal.ZERO) <= 0) {
|
||||||
throw new ServiceException("汇率必须大于0");
|
throw new ServiceException("汇率必须大于0");
|
||||||
}
|
}
|
||||||
if (currency.getExchangeRate().stripTrailingZeros().scale() > EXCHANGE_RATE_SCALE) {
|
if (currency.getExchangeRate().stripTrailingZeros().scale() > EXCHANGE_RATE_SCALE) {
|
||||||
throw new ServiceException("汇率最多保留6位小数");
|
throw new ServiceException("汇率最多保留6位小数");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (Func.isEmpty(currency.getEffectiveDate())) {
|
if (Func.isEmpty(currency.getEffectiveDate())) {
|
||||||
throw new ServiceException("生效日期不能为空");
|
throw new ServiceException("生效日期不能为空");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public class FeeItemServiceImpl extends BaseServiceImpl<FeeItemMapper, FeeItem>
|
|||||||
|
|
||||||
private static final int STATUS_ENABLED = 1;
|
private static final int STATUS_ENABLED = 1;
|
||||||
private static final int STATUS_DISABLED = 2;
|
private static final int STATUS_DISABLED = 2;
|
||||||
private static final int FEE_CATEGORY_MAX_LENGTH = 50;
|
|
||||||
private static final int NAME_MAX_LENGTH = 50;
|
private static final int NAME_MAX_LENGTH = 50;
|
||||||
private static final int ENGLISH_NAME_MAX_LENGTH = 100;
|
private static final int ENGLISH_NAME_MAX_LENGTH = 100;
|
||||||
|
|
||||||
@@ -87,7 +86,6 @@ public class FeeItemServiceImpl extends BaseServiceImpl<FeeItemMapper, FeeItem>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void prepare(FeeItem feeItem) {
|
private void prepare(FeeItem feeItem) {
|
||||||
feeItem.setFeeCategory(trimToEmpty(feeItem.getFeeCategory()));
|
|
||||||
feeItem.setName(trimToEmpty(feeItem.getName()));
|
feeItem.setName(trimToEmpty(feeItem.getName()));
|
||||||
feeItem.setEnglishName(trimToNull(feeItem.getEnglishName()));
|
feeItem.setEnglishName(trimToNull(feeItem.getEnglishName()));
|
||||||
if (Func.isEmpty(feeItem.getStatus())) {
|
if (Func.isEmpty(feeItem.getStatus())) {
|
||||||
@@ -96,20 +94,14 @@ public class FeeItemServiceImpl extends BaseServiceImpl<FeeItemMapper, FeeItem>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void validate(FeeItem feeItem) {
|
private void validate(FeeItem feeItem) {
|
||||||
if (Func.isEmpty(feeItem.getFeeCategory())) {
|
|
||||||
throw new ServiceException("费用类型不能为空");
|
|
||||||
}
|
|
||||||
if (feeItem.getFeeCategory().length() > FEE_CATEGORY_MAX_LENGTH) {
|
|
||||||
throw new ServiceException("费用类型不能超过50字");
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(feeItem.getName())) {
|
if (Func.isEmpty(feeItem.getName())) {
|
||||||
throw new ServiceException("费用项不能为空");
|
throw new ServiceException("中文名称不能为空");
|
||||||
}
|
}
|
||||||
if (feeItem.getName().length() > NAME_MAX_LENGTH) {
|
if (feeItem.getName().length() > NAME_MAX_LENGTH) {
|
||||||
throw new ServiceException("费用项不能超过50字");
|
throw new ServiceException("中文名称不能超过50字");
|
||||||
}
|
}
|
||||||
if (Func.isNotEmpty(feeItem.getEnglishName()) && feeItem.getEnglishName().length() > ENGLISH_NAME_MAX_LENGTH) {
|
if (Func.isNotEmpty(feeItem.getEnglishName()) && feeItem.getEnglishName().length() > ENGLISH_NAME_MAX_LENGTH) {
|
||||||
throw new ServiceException("费用项代码不能超过100字");
|
throw new ServiceException("英文名称不能超过100字");
|
||||||
}
|
}
|
||||||
validateUniqueName(feeItem);
|
validateUniqueName(feeItem);
|
||||||
}
|
}
|
||||||
@@ -122,7 +114,7 @@ public class FeeItemServiceImpl extends BaseServiceImpl<FeeItemMapper, FeeItem>
|
|||||||
queryWrapper.ne(FeeItem::getId, feeItem.getId());
|
queryWrapper.ne(FeeItem::getId, feeItem.getId());
|
||||||
}
|
}
|
||||||
if (count(queryWrapper) > 0L) {
|
if (count(queryWrapper) > 0L) {
|
||||||
throw new ServiceException("该费用项已存在");
|
throw new ServiceException("该中文名称已存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.log.exception.ServiceException;
|
||||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
@@ -37,15 +36,12 @@ import org.springblade.core.tool.utils.Func;
|
|||||||
import org.springblade.system.excel.PortTerminalExcel;
|
import org.springblade.system.excel.PortTerminalExcel;
|
||||||
import org.springblade.system.mapper.PortTerminalMapper;
|
import org.springblade.system.mapper.PortTerminalMapper;
|
||||||
import org.springblade.system.pojo.entity.PortTerminal;
|
import org.springblade.system.pojo.entity.PortTerminal;
|
||||||
import org.springblade.system.pojo.entity.Region;
|
|
||||||
import org.springblade.system.pojo.vo.PortTerminalVO;
|
import org.springblade.system.pojo.vo.PortTerminalVO;
|
||||||
import org.springblade.system.service.IPortTerminalService;
|
import org.springblade.system.service.IPortTerminalService;
|
||||||
import org.springblade.system.service.IRegionService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -58,7 +54,6 @@ import java.util.regex.Pattern;
|
|||||||
* @author Chill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
|
||||||
public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper, PortTerminal> implements IPortTerminalService {
|
public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper, PortTerminal> implements IPortTerminalService {
|
||||||
|
|
||||||
private static final String CATEGORY_PORT = "港口";
|
private static final String CATEGORY_PORT = "港口";
|
||||||
@@ -72,8 +67,6 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
private static final int CODE_MAX_LENGTH = 30;
|
private static final int CODE_MAX_LENGTH = 30;
|
||||||
private static final int NAME_MAX_LENGTH = 100;
|
private static final int NAME_MAX_LENGTH = 100;
|
||||||
private static final int REGION_MAX_LENGTH = 50;
|
private static final int REGION_MAX_LENGTH = 50;
|
||||||
private static final int REGION_CODE_MAX_LENGTH = 32;
|
|
||||||
private static final int DETAIL_ADDRESS_MAX_LENGTH = 255;
|
|
||||||
private static final int REMARK_MAX_LENGTH = 200;
|
private static final int REMARK_MAX_LENGTH = 200;
|
||||||
private static final BigDecimal MIN_LONGITUDE = new BigDecimal("-180");
|
private static final BigDecimal MIN_LONGITUDE = new BigDecimal("-180");
|
||||||
private static final BigDecimal MAX_LONGITUDE = new BigDecimal("180");
|
private static final BigDecimal MAX_LONGITUDE = new BigDecimal("180");
|
||||||
@@ -82,8 +75,6 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
private static final Pattern PORT_CODE_PATTERN = Pattern.compile("^[A-Z]{5}$");
|
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]+$");
|
private static final Pattern TERMINAL_CODE_PATTERN = Pattern.compile("^[A-Z]{5}-[A-Z0-9]+$");
|
||||||
|
|
||||||
private final IRegionService regionService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<PortTerminalVO> selectPortTerminalPage(IPage<PortTerminalVO> page, PortTerminalVO portTerminal) {
|
public IPage<PortTerminalVO> selectPortTerminalPage(IPage<PortTerminalVO> page, PortTerminalVO portTerminal) {
|
||||||
return page.setRecords(baseMapper.selectPortTerminalPage(page, portTerminal));
|
return page.setRecords(baseMapper.selectPortTerminalPage(page, portTerminal));
|
||||||
@@ -129,11 +120,11 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public List<PortTerminalExcel> importPortTerminal(List<PortTerminalExcel> data) {
|
public void importPortTerminal(List<PortTerminalExcel> data) {
|
||||||
if (Func.isEmpty(data)) {
|
if (Func.isEmpty(data)) {
|
||||||
throw new ServiceException("导入数据不能为空");
|
throw new ServiceException("导入数据不能为空");
|
||||||
}
|
}
|
||||||
List<PortTerminalExcel> errorList = new ArrayList<>();
|
List<String> errorList = new ArrayList<>();
|
||||||
for (int index = 0; index < data.size(); index++) {
|
for (int index = 0; index < data.size(); index++) {
|
||||||
PortTerminalExcel excel = data.get(index);
|
PortTerminalExcel excel = data.get(index);
|
||||||
try {
|
try {
|
||||||
@@ -145,11 +136,12 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
save(portTerminal);
|
save(portTerminal);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + message);
|
errorList.add("第" + (index + 2) + "行:" + message);
|
||||||
errorList.add(excel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errorList;
|
if (Func.isNotEmpty(errorList)) {
|
||||||
|
throw new ServiceException(String.join(";", errorList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -157,42 +149,26 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
List<PortTerminal> portTerminalList = list(queryWrapper);
|
List<PortTerminal> portTerminalList = list(queryWrapper);
|
||||||
return portTerminalList.stream().map(portTerminal -> {
|
return portTerminalList.stream().map(portTerminal -> {
|
||||||
PortTerminalExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalExcel.class));
|
PortTerminalExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalExcel.class));
|
||||||
excel.setRegionCode(portTerminal.getDistrictCode());
|
excel.setLongitude(validRange(portTerminal.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE) ? portTerminal.getLongitude() : null);
|
||||||
excel.setLongitude(scaleCoordinate(portTerminal.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE));
|
excel.setLatitude(validRange(portTerminal.getLatitude(), MIN_LATITUDE, MAX_LATITUDE) ? portTerminal.getLatitude() : null);
|
||||||
excel.setLatitude(scaleCoordinate(portTerminal.getLatitude(), MIN_LATITUDE, MAX_LATITUDE));
|
|
||||||
excel.setDataSource(normalizeDataSource(portTerminal.getDataSource()));
|
excel.setDataSource(normalizeDataSource(portTerminal.getDataSource()));
|
||||||
excel.setStatusName(Objects.equals(portTerminal.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
excel.setStatusName(Objects.equals(portTerminal.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||||
return excel;
|
return excel;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private BigDecimal scaleCoordinate(BigDecimal value, BigDecimal min, BigDecimal max) {
|
|
||||||
if (Func.isEmpty(value)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return validRange(value, min, max) ? value.setScale(6, RoundingMode.HALF_UP) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void prepare(PortTerminal portTerminal, String defaultDataSource) {
|
private void prepare(PortTerminal portTerminal, String defaultDataSource) {
|
||||||
portTerminal.setCode(trimToEmpty(portTerminal.getCode()).toUpperCase(Locale.ROOT));
|
portTerminal.setCode(trimToEmpty(portTerminal.getCode()).toUpperCase(Locale.ROOT));
|
||||||
portTerminal.setCategory(trimToEmpty(portTerminal.getCategory()));
|
portTerminal.setCategory(trimToEmpty(portTerminal.getCategory()));
|
||||||
portTerminal.setName(trimToEmpty(portTerminal.getName()));
|
portTerminal.setName(trimToEmpty(portTerminal.getName()));
|
||||||
portTerminal.setCountry(trimToEmpty(portTerminal.getCountry()));
|
portTerminal.setCountry(trimToEmpty(portTerminal.getCountry()));
|
||||||
portTerminal.setCity(trimToEmpty(portTerminal.getCity()));
|
portTerminal.setCity(trimToEmpty(portTerminal.getCity()));
|
||||||
portTerminal.setDistrictCode(trimToNull(portTerminal.getDistrictCode()));
|
|
||||||
portTerminal.setDistrictName(trimToNull(portTerminal.getDistrictName()));
|
|
||||||
portTerminal.setRegionCode(trimToNull(portTerminal.getRegionCode()));
|
|
||||||
if (Func.isEmpty(portTerminal.getDistrictCode()) && Func.isNotEmpty(portTerminal.getRegionCode())) {
|
|
||||||
portTerminal.setDistrictCode(portTerminal.getRegionCode());
|
|
||||||
}
|
|
||||||
portTerminal.setDetailAddress(trimToNull(portTerminal.getDetailAddress()));
|
|
||||||
portTerminal.setRemark(trimToNull(portTerminal.getRemark()));
|
portTerminal.setRemark(trimToNull(portTerminal.getRemark()));
|
||||||
portTerminal.setDataSource(normalizeDataSource(Func.toStrWithEmpty(portTerminal.getDataSource(), defaultDataSource)));
|
portTerminal.setDataSource(normalizeDataSource(Func.toStrWithEmpty(portTerminal.getDataSource(), defaultDataSource)));
|
||||||
if (Func.isEmpty(portTerminal.getStatus())) {
|
if (Func.isEmpty(portTerminal.getStatus())) {
|
||||||
portTerminal.setStatus(STATUS_ENABLED);
|
portTerminal.setStatus(STATUS_ENABLED);
|
||||||
}
|
}
|
||||||
if (CATEGORY_PORT.equals(portTerminal.getCategory())) {
|
if (CATEGORY_PORT.equals(portTerminal.getCategory())) {
|
||||||
fillRegion(portTerminal);
|
|
||||||
portTerminal.setParentId(null);
|
portTerminal.setParentId(null);
|
||||||
portTerminal.setParentCode(null);
|
portTerminal.setParentCode(null);
|
||||||
portTerminal.setParentName(null);
|
portTerminal.setParentName(null);
|
||||||
@@ -223,50 +199,6 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
portTerminal.setParentName(parent.getName());
|
portTerminal.setParentName(parent.getName());
|
||||||
portTerminal.setCountry(parent.getCountry());
|
portTerminal.setCountry(parent.getCountry());
|
||||||
portTerminal.setCity(parent.getCity());
|
portTerminal.setCity(parent.getCity());
|
||||||
portTerminal.setDistrictCode(parent.getDistrictCode());
|
|
||||||
portTerminal.setDistrictName(parent.getDistrictName());
|
|
||||||
portTerminal.setRegionCode(parent.getDistrictCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillRegion(PortTerminal portTerminal) {
|
|
||||||
Region district = null;
|
|
||||||
if (Func.isNotEmpty(portTerminal.getDistrictCode())) {
|
|
||||||
district = regionService.getById(portTerminal.getDistrictCode());
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district) && Func.isNotEmpty(portTerminal.getDistrictName())) {
|
|
||||||
if (Func.isNotEmpty(portTerminal.getCity())) {
|
|
||||||
List<Region> cityList = regionService.list(Wrappers.<Region>lambdaQuery()
|
|
||||||
.eq(Region::getName, portTerminal.getCity())
|
|
||||||
.eq(Region::getRegionLevel, 2));
|
|
||||||
for (Region city : cityList) {
|
|
||||||
district = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
|
||||||
.eq(Region::getParentCode, city.getCode())
|
|
||||||
.eq(Region::getName, portTerminal.getDistrictName()), false);
|
|
||||||
if (Func.isNotEmpty(district)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district)) {
|
|
||||||
district = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
|
||||||
.eq(Region::getName, portTerminal.getDistrictName())
|
|
||||||
.eq(Region::getRegionLevel, 3), false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district)) {
|
|
||||||
throw new ServiceException("请选择区县");
|
|
||||||
}
|
|
||||||
Region city = regionService.getById(district.getParentCode());
|
|
||||||
if (Func.isEmpty(city)) {
|
|
||||||
throw new ServiceException("区县所属城市不存在");
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(portTerminal.getCity()) && !Objects.equals(portTerminal.getCity(), city.getName())) {
|
|
||||||
throw new ServiceException("区县与城市不匹配");
|
|
||||||
}
|
|
||||||
portTerminal.setCity(city.getName());
|
|
||||||
portTerminal.setDistrictCode(district.getCode());
|
|
||||||
portTerminal.setDistrictName(district.getName());
|
|
||||||
portTerminal.setRegionCode(district.getCode());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validate(PortTerminal portTerminal) {
|
private void validate(PortTerminal portTerminal) {
|
||||||
@@ -283,9 +215,6 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
validateLength(portTerminal.getName(), NAME_MAX_LENGTH, "港口/码头名称不能超过100字");
|
validateLength(portTerminal.getName(), NAME_MAX_LENGTH, "港口/码头名称不能超过100字");
|
||||||
validateLength(portTerminal.getCountry(), REGION_MAX_LENGTH, "国家不能超过50字");
|
validateLength(portTerminal.getCountry(), REGION_MAX_LENGTH, "国家不能超过50字");
|
||||||
validateLength(portTerminal.getCity(), REGION_MAX_LENGTH, "城市不能超过50字");
|
validateLength(portTerminal.getCity(), REGION_MAX_LENGTH, "城市不能超过50字");
|
||||||
validateLength(portTerminal.getDistrictName(), REGION_MAX_LENGTH, "区县不能超过50字");
|
|
||||||
validateLength(portTerminal.getRegionCode(), REGION_CODE_MAX_LENGTH, "行政区划编码不能超过32字");
|
|
||||||
validateLength(portTerminal.getDetailAddress(), DETAIL_ADDRESS_MAX_LENGTH, "详细地址不能超过255字");
|
|
||||||
validateLength(portTerminal.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200个字");
|
validateLength(portTerminal.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200个字");
|
||||||
if (CATEGORY_PORT.equals(portTerminal.getCategory()) && !PORT_CODE_PATTERN.matcher(portTerminal.getCode()).matches()) {
|
if (CATEGORY_PORT.equals(portTerminal.getCategory()) && !PORT_CODE_PATTERN.matcher(portTerminal.getCode()).matches()) {
|
||||||
throw new ServiceException("港口编码为5位大写字母");
|
throw new ServiceException("港口编码为5位大写字母");
|
||||||
@@ -302,9 +231,6 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
|||||||
if (Func.isEmpty(portTerminal.getCity())) {
|
if (Func.isEmpty(portTerminal.getCity())) {
|
||||||
throw new ServiceException("城市不能为空");
|
throw new ServiceException("城市不能为空");
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(portTerminal.getDistrictCode())) {
|
|
||||||
throw new ServiceException("区县不能为空");
|
|
||||||
}
|
|
||||||
validateDataSource(portTerminal.getDataSource());
|
validateDataSource(portTerminal.getDataSource());
|
||||||
validateStatus(portTerminal.getStatus());
|
validateStatus(portTerminal.getStatus());
|
||||||
validateRange(portTerminal.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度范围为 -180 到 180");
|
validateRange(portTerminal.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度范围为 -180 到 180");
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -69,15 +68,12 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
private static final String SOURCE_MANUAL = "手动";
|
private static final String SOURCE_MANUAL = "手动";
|
||||||
private static final String SOURCE_MANUAL_RECORD = "手动录入";
|
private static final String SOURCE_MANUAL_RECORD = "手动录入";
|
||||||
private static final String SOURCE_MANUAL_OLD = "手工导入";
|
private static final String SOURCE_MANUAL_OLD = "手工导入";
|
||||||
private static final String DEFAULT_COUNTRY_CODE = "+86";
|
|
||||||
private static final int STATUS_ENABLED = 1;
|
private static final int STATUS_ENABLED = 1;
|
||||||
private static final int STATUS_DISABLED = 2;
|
private static final int STATUS_DISABLED = 2;
|
||||||
private static final int CODE_MAX_LENGTH = 20;
|
private static final int CODE_MAX_LENGTH = 20;
|
||||||
private static final int NAME_MAX_LENGTH = 50;
|
private static final int NAME_MAX_LENGTH = 100;
|
||||||
private static final int RAILWAY_LINE_MAX_LENGTH = 100;
|
private static final int RAILWAY_LINE_MAX_LENGTH = 100;
|
||||||
private static final int REGION_NAME_MAX_LENGTH = 128;
|
private static final int REGION_NAME_MAX_LENGTH = 128;
|
||||||
private static final int REGION_CODE_MAX_LENGTH = 32;
|
|
||||||
private static final int DETAIL_ADDRESS_MAX_LENGTH = 255;
|
|
||||||
private static final int REMARK_MAX_LENGTH = 200;
|
private static final int REMARK_MAX_LENGTH = 200;
|
||||||
private static final Pattern TMIS_CODE_PATTERN = Pattern.compile("^\\d{5}$");
|
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 Pattern TELEGRAPH_CODE_PATTERN = Pattern.compile("^[A-Z]{3}$");
|
||||||
@@ -122,17 +118,15 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public List<RailwayStationExcel> importRailwayStation(List<RailwayStationExcel> data) {
|
public void importRailwayStation(List<RailwayStationExcel> data) {
|
||||||
if (Func.isEmpty(data)) {
|
if (Func.isEmpty(data)) {
|
||||||
throw new ServiceException("导入数据不能为空");
|
throw new ServiceException("导入数据不能为空");
|
||||||
}
|
}
|
||||||
List<RailwayStationExcel> errorList = new ArrayList<>();
|
List<String> errorList = new ArrayList<>();
|
||||||
for (int index = 0; index < data.size(); index++) {
|
for (int index = 0; index < data.size(); index++) {
|
||||||
RailwayStationExcel excel = data.get(index);
|
RailwayStationExcel excel = data.get(index);
|
||||||
try {
|
try {
|
||||||
RailwayStation railwayStation = Objects.requireNonNull(BeanUtil.copyProperties(excel, RailwayStation.class));
|
RailwayStation railwayStation = Objects.requireNonNull(BeanUtil.copyProperties(excel, RailwayStation.class));
|
||||||
railwayStation.setLongitude(parseCoordinate(excel.getLongitude(), "经度"));
|
|
||||||
railwayStation.setLatitude(parseCoordinate(excel.getLatitude(), "纬度"));
|
|
||||||
railwayStation.setDataSource(SOURCE_BATCH);
|
railwayStation.setDataSource(SOURCE_BATCH);
|
||||||
railwayStation.setStatus(STATUS_ENABLED);
|
railwayStation.setStatus(STATUS_ENABLED);
|
||||||
prepare(railwayStation, SOURCE_BATCH);
|
prepare(railwayStation, SOURCE_BATCH);
|
||||||
@@ -140,11 +134,12 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
save(railwayStation);
|
save(railwayStation);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + message);
|
errorList.add("第" + (index + 2) + "行:" + message);
|
||||||
errorList.add(excel);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errorList;
|
if (Func.isNotEmpty(errorList)) {
|
||||||
|
throw new ServiceException(String.join(";", errorList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -152,33 +147,12 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
List<RailwayStation> railwayStationList = list(queryWrapper);
|
List<RailwayStation> railwayStationList = list(queryWrapper);
|
||||||
return railwayStationList.stream().map(railwayStation -> {
|
return railwayStationList.stream().map(railwayStation -> {
|
||||||
RailwayStationExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationExcel.class));
|
RailwayStationExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationExcel.class));
|
||||||
excel.setLongitude(formatCoordinate(railwayStation.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE));
|
|
||||||
excel.setLatitude(formatCoordinate(railwayStation.getLatitude(), MIN_LATITUDE, MAX_LATITUDE));
|
|
||||||
excel.setDataSource(normalizeDataSource(railwayStation.getDataSource()));
|
excel.setDataSource(normalizeDataSource(railwayStation.getDataSource()));
|
||||||
excel.setStatusName(Objects.equals(railwayStation.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
excel.setStatusName(Objects.equals(railwayStation.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||||
return excel;
|
return excel;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatCoordinate(BigDecimal value, BigDecimal min, BigDecimal max) {
|
|
||||||
if (Func.isEmpty(value)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return validRange(value, min, max) ? value.setScale(6, RoundingMode.HALF_UP).toPlainString() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private BigDecimal parseCoordinate(String value, String name) {
|
|
||||||
String trimValue = trimToEmpty(value);
|
|
||||||
if (trimValue.isEmpty()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
return new BigDecimal(trimValue);
|
|
||||||
} catch (NumberFormatException exception) {
|
|
||||||
throw new ServiceException(name + "范围不正确");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void prepare(RailwayStation railwayStation, String defaultDataSource) {
|
private void prepare(RailwayStation railwayStation, String defaultDataSource) {
|
||||||
railwayStation.setTmisCode(trimToEmpty(railwayStation.getTmisCode()));
|
railwayStation.setTmisCode(trimToEmpty(railwayStation.getTmisCode()));
|
||||||
railwayStation.setCode(CODE_PREFIX + railwayStation.getTmisCode());
|
railwayStation.setCode(CODE_PREFIX + railwayStation.getTmisCode());
|
||||||
@@ -189,17 +163,6 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
railwayStation.setProvinceName(trimToNull(railwayStation.getProvinceName()));
|
railwayStation.setProvinceName(trimToNull(railwayStation.getProvinceName()));
|
||||||
railwayStation.setCityCode(trimToNull(railwayStation.getCityCode()));
|
railwayStation.setCityCode(trimToNull(railwayStation.getCityCode()));
|
||||||
railwayStation.setCityName(trimToNull(railwayStation.getCityName()));
|
railwayStation.setCityName(trimToNull(railwayStation.getCityName()));
|
||||||
railwayStation.setDistrictCode(trimToNull(railwayStation.getDistrictCode()));
|
|
||||||
railwayStation.setDistrictName(trimToNull(railwayStation.getDistrictName()));
|
|
||||||
railwayStation.setRegionCode(trimToNull(railwayStation.getRegionCode()));
|
|
||||||
railwayStation.setRegionName(trimToNull(railwayStation.getRegionName()));
|
|
||||||
if (Func.isEmpty(railwayStation.getDistrictCode()) && Func.isNotEmpty(railwayStation.getRegionCode())) {
|
|
||||||
railwayStation.setDistrictCode(railwayStation.getRegionCode());
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(railwayStation.getDistrictName()) && Func.isNotEmpty(railwayStation.getRegionName())) {
|
|
||||||
railwayStation.setDistrictName(railwayStation.getRegionName());
|
|
||||||
}
|
|
||||||
railwayStation.setDetailAddress(trimToNull(railwayStation.getDetailAddress()));
|
|
||||||
railwayStation.setRemark(trimToNull(railwayStation.getRemark()));
|
railwayStation.setRemark(trimToNull(railwayStation.getRemark()));
|
||||||
railwayStation.setDataSource(normalizeDataSource(Func.toStrWithEmpty(railwayStation.getDataSource(), defaultDataSource)));
|
railwayStation.setDataSource(normalizeDataSource(Func.toStrWithEmpty(railwayStation.getDataSource(), defaultDataSource)));
|
||||||
if (Func.isEmpty(railwayStation.getStatus())) {
|
if (Func.isEmpty(railwayStation.getStatus())) {
|
||||||
@@ -216,39 +179,29 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
throw new ServiceException("TMIS国标编码为5位数字");
|
throw new ServiceException("TMIS国标编码为5位数字");
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(railwayStation.getTelegraphCode())) {
|
if (Func.isEmpty(railwayStation.getTelegraphCode())) {
|
||||||
throw new ServiceException("电报码格式不正确或已存在");
|
throw new ServiceException("电报码不能为空");
|
||||||
}
|
}
|
||||||
if (!TELEGRAPH_CODE_PATTERN.matcher(railwayStation.getTelegraphCode()).matches()) {
|
if (!TELEGRAPH_CODE_PATTERN.matcher(railwayStation.getTelegraphCode()).matches()) {
|
||||||
throw new ServiceException("电报码格式不正确或已存在");
|
throw new ServiceException("电报码为3位大写字母");
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(railwayStation.getName())) {
|
if (Func.isEmpty(railwayStation.getName())) {
|
||||||
throw new ServiceException("请输入车站名称");
|
throw new ServiceException("车站名称不能为空");
|
||||||
}
|
}
|
||||||
validateLength(railwayStation.getCode(), CODE_MAX_LENGTH, "编码不能超过20字");
|
validateLength(railwayStation.getCode(), CODE_MAX_LENGTH, "编码不能超过20字");
|
||||||
validateLength(railwayStation.getName(), NAME_MAX_LENGTH, "请输入车站名称");
|
validateLength(railwayStation.getName(), NAME_MAX_LENGTH, "车站名称不能超过100字");
|
||||||
// validateLength(railwayStation.getRailwayLine(), RAILWAY_LINE_MAX_LENGTH, "所属铁路线路不能超过100字");
|
validateLength(railwayStation.getRailwayLine(), RAILWAY_LINE_MAX_LENGTH, "所属铁路线路不能超过100字");
|
||||||
validateLength(railwayStation.getProvinceName(), REGION_NAME_MAX_LENGTH, "所属省份不能超过128字");
|
validateLength(railwayStation.getProvinceName(), REGION_NAME_MAX_LENGTH, "所属省份不能超过128字");
|
||||||
validateLength(railwayStation.getCityName(), REGION_NAME_MAX_LENGTH, "所属城市不能超过128字");
|
validateLength(railwayStation.getCityName(), REGION_NAME_MAX_LENGTH, "所属城市不能超过128字");
|
||||||
validateLength(railwayStation.getDistrictName(), REGION_NAME_MAX_LENGTH, "所属区县不能超过128字");
|
|
||||||
validateLength(railwayStation.getRegionCode(), REGION_CODE_MAX_LENGTH, "行政区划编码不能超过32字");
|
|
||||||
validateLength(railwayStation.getRegionName(), REGION_NAME_MAX_LENGTH, "行政区划不能超过128字");
|
|
||||||
validateLength(railwayStation.getDetailAddress(), DETAIL_ADDRESS_MAX_LENGTH, "详细地址不能超过255字");
|
|
||||||
validateLength(railwayStation.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200字");
|
validateLength(railwayStation.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200字");
|
||||||
if (Func.isEmpty(railwayStation.getProvinceCode())) {
|
if (Func.isEmpty(railwayStation.getProvinceCode()) || Func.isEmpty(railwayStation.getCityCode())) {
|
||||||
throw new ServiceException("请选择所属省份");
|
throw new ServiceException("请选择省份和城市");
|
||||||
}
|
|
||||||
if (Func.isEmpty(railwayStation.getCityCode())) {
|
|
||||||
throw new ServiceException("请选择所属城市");
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(railwayStation.getDistrictCode())) {
|
|
||||||
throw new ServiceException("请选择所属区县");
|
|
||||||
}
|
}
|
||||||
validateCoordinate(railwayStation.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度");
|
validateCoordinate(railwayStation.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度");
|
||||||
validateCoordinate(railwayStation.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度");
|
validateCoordinate(railwayStation.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度");
|
||||||
validateDataSource(railwayStation.getDataSource());
|
validateDataSource(railwayStation.getDataSource());
|
||||||
validateStatus(railwayStation.getStatus());
|
validateStatus(railwayStation.getStatus());
|
||||||
validateUnique(railwayStation, RailwayStation::getTmisCode, railwayStation.getTmisCode(), "该TMIS编码已存在");
|
validateUnique(railwayStation, RailwayStation::getTmisCode, railwayStation.getTmisCode(), "该TMIS编码已存在");
|
||||||
validateUnique(railwayStation, RailwayStation::getTelegraphCode, railwayStation.getTelegraphCode(), "电报码格式不正确或已存在");
|
validateUnique(railwayStation, RailwayStation::getTelegraphCode, railwayStation.getTelegraphCode(), "该电报码已存在");
|
||||||
validateUnique(railwayStation, RailwayStation::getCode, railwayStation.getCode(), "该编码已存在");
|
validateUnique(railwayStation, RailwayStation::getCode, railwayStation.getCode(), "该编码已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,11 +212,11 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
}
|
}
|
||||||
if (Func.isEmpty(province) && Func.isNotEmpty(railwayStation.getProvinceName())) {
|
if (Func.isEmpty(province) && Func.isNotEmpty(railwayStation.getProvinceName())) {
|
||||||
province = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
province = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
||||||
.eq(Region::getParentCode, DEFAULT_COUNTRY_CODE)
|
.eq(Region::getParentCode, "00")
|
||||||
.eq(Region::getName, railwayStation.getProvinceName()), false);
|
.eq(Region::getName, railwayStation.getProvinceName()), false);
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(province)) {
|
if (Func.isEmpty(province)) {
|
||||||
throw new ServiceException("请选择所属省份");
|
throw new ServiceException("请选择省份");
|
||||||
}
|
}
|
||||||
|
|
||||||
Region city = null;
|
Region city = null;
|
||||||
@@ -276,7 +229,7 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
.eq(Region::getName, railwayStation.getCityName()), false);
|
.eq(Region::getName, railwayStation.getCityName()), false);
|
||||||
}
|
}
|
||||||
if (Func.isEmpty(city)) {
|
if (Func.isEmpty(city)) {
|
||||||
throw new ServiceException("请选择所属城市");
|
throw new ServiceException("请选择城市");
|
||||||
}
|
}
|
||||||
if (!Objects.equals(city.getParentCode(), province.getCode())) {
|
if (!Objects.equals(city.getParentCode(), province.getCode())) {
|
||||||
throw new ServiceException("所属城市与所属省份不匹配");
|
throw new ServiceException("所属城市与所属省份不匹配");
|
||||||
@@ -285,26 +238,6 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
railwayStation.setProvinceName(province.getName());
|
railwayStation.setProvinceName(province.getName());
|
||||||
railwayStation.setCityCode(city.getCode());
|
railwayStation.setCityCode(city.getCode());
|
||||||
railwayStation.setCityName(city.getName());
|
railwayStation.setCityName(city.getName());
|
||||||
|
|
||||||
Region district = null;
|
|
||||||
if (Func.isNotEmpty(railwayStation.getDistrictCode())) {
|
|
||||||
district = regionService.getById(railwayStation.getDistrictCode());
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district) && Func.isNotEmpty(railwayStation.getDistrictName())) {
|
|
||||||
district = regionService.getOne(Wrappers.<Region>lambdaQuery()
|
|
||||||
.eq(Region::getParentCode, city.getCode())
|
|
||||||
.eq(Region::getName, railwayStation.getDistrictName()), false);
|
|
||||||
}
|
|
||||||
if (Func.isEmpty(district)) {
|
|
||||||
throw new ServiceException("请选择所属区县");
|
|
||||||
}
|
|
||||||
if (!Objects.equals(district.getParentCode(), city.getCode())) {
|
|
||||||
throw new ServiceException("所属区县与所属城市不匹配");
|
|
||||||
}
|
|
||||||
railwayStation.setDistrictCode(district.getCode());
|
|
||||||
railwayStation.setDistrictName(district.getName());
|
|
||||||
railwayStation.setRegionCode(district.getCode());
|
|
||||||
railwayStation.setRegionName(district.getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateCoordinate(BigDecimal value, BigDecimal min, BigDecimal max, String name) {
|
private void validateCoordinate(BigDecimal value, BigDecimal min, BigDecimal max, String name) {
|
||||||
@@ -312,14 +245,10 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (value.compareTo(min) < 0 || value.compareTo(max) > 0) {
|
if (value.compareTo(min) < 0 || value.compareTo(max) > 0) {
|
||||||
throw new ServiceException(name + "范围不正确");
|
throw new ServiceException(name + ("经度".equals(name) ? "范围为 -180 到 180" : "范围为 -90 到 90"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validRange(BigDecimal value, BigDecimal min, BigDecimal max) {
|
|
||||||
return Func.isEmpty(value) || (value.compareTo(min) >= 0 && value.compareTo(max) <= 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateDataSource(String dataSource) {
|
private void validateDataSource(String dataSource) {
|
||||||
if (!SOURCE_INITIAL.equals(dataSource) && !SOURCE_BATCH.equals(dataSource) && !SOURCE_MANUAL.equals(dataSource)) {
|
if (!SOURCE_INITIAL.equals(dataSource) && !SOURCE_BATCH.equals(dataSource) && !SOURCE_MANUAL.equals(dataSource)) {
|
||||||
throw new ServiceException("数据来源不正确");
|
throw new ServiceException("数据来源不正确");
|
||||||
|
|||||||
@@ -57,37 +57,28 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean submit(Region region) {
|
public boolean submit(Region region) {
|
||||||
|
// 设置市级编号格式
|
||||||
String regionCode = region.getCode();
|
String regionCode = region.getCode();
|
||||||
String regionParentCode = region.getParentCode();
|
String regionParentCode = region.getParentCode();
|
||||||
Integer level = region.getRegionLevel();
|
if (regionCode.startsWith(MAIN_CODE)) {
|
||||||
if (level != null && level == COUNTRY_LEVEL) {
|
region.setCode(StringUtil.removePrefix(regionCode, MAIN_CODE));
|
||||||
region.setParentCode(ROOT_PARENT_CODE);
|
|
||||||
region.setAncestors(ROOT_PARENT_CODE);
|
|
||||||
} else {
|
|
||||||
if (LEGACY_MAIN_CODE.equals(regionParentCode)) {
|
|
||||||
region.setParentCode(MAIN_CODE);
|
|
||||||
}
|
}
|
||||||
if (StringUtil.isNotBlank(regionCode) && regionCode.startsWith(LEGACY_MAIN_CODE)) {
|
if (regionParentCode.startsWith(MAIN_CODE)) {
|
||||||
region.setCode(StringUtil.removePrefix(regionCode, LEGACY_MAIN_CODE));
|
region.setParentCode(StringUtil.removePrefix(regionParentCode, MAIN_CODE));
|
||||||
}
|
}
|
||||||
if (MAIN_CODE.equals(region.getParentCode())
|
// 查询是否已存在
|
||||||
&& StringUtil.isNotBlank(region.getCode())
|
Long cnt = baseMapper.selectCount(Wrappers.<Region>query().lambda().eq(Region::getCode, region.getCode()));
|
||||||
&& region.getCode().startsWith(MAIN_CODE)) {
|
if (cnt > 0L) {
|
||||||
region.setCode(StringUtil.removePrefix(region.getCode(), MAIN_CODE));
|
return this.updateById(region);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
validateUniqueCode(region);
|
|
||||||
// 设置祖区划编号
|
// 设置祖区划编号
|
||||||
Region parent = getByCode(region.getParentCode());
|
Region parent = getByCode(region.getParentCode());
|
||||||
if (Func.isNotEmpty(parent) && Func.isNotEmpty(parent.getCode())) {
|
if (Func.isNotEmpty(parent) && Func.isNotEmpty(parent.getCode())) {
|
||||||
String ancestors = parent.getRegionLevel() != null && parent.getRegionLevel() == COUNTRY_LEVEL
|
String ancestors = parent.getAncestors() + StringPool.COMMA + parent.getCode();
|
||||||
? parent.getCode()
|
|
||||||
: parent.getAncestors() + StringPool.COMMA + parent.getCode();
|
|
||||||
region.setAncestors(ancestors);
|
region.setAncestors(ancestors);
|
||||||
} else if (MAIN_CODE.equals(region.getParentCode())) {
|
|
||||||
region.setAncestors(MAIN_CODE);
|
|
||||||
}
|
}
|
||||||
// 设置省、市、区、镇、村
|
// 设置省、市、区、镇、村
|
||||||
|
Integer level = region.getRegionLevel();
|
||||||
String code = region.getCode();
|
String code = region.getCode();
|
||||||
String name = region.getName();
|
String name = region.getName();
|
||||||
if (level == PROVINCE_LEVEL) {
|
if (level == PROVINCE_LEVEL) {
|
||||||
@@ -106,22 +97,7 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
|||||||
region.setVillageCode(code);
|
region.setVillageCode(code);
|
||||||
region.setVillageName(name);
|
region.setVillageName(name);
|
||||||
}
|
}
|
||||||
return StringUtil.isNotBlank(region.getOriginalCode()) ? this.updateById(region) : this.save(region);
|
return this.save(region);
|
||||||
}
|
|
||||||
|
|
||||||
private void validateUniqueCode(Region region) {
|
|
||||||
String originalCode = region.getOriginalCode();
|
|
||||||
String code = region.getCode();
|
|
||||||
Region existRegion = this.getById(code);
|
|
||||||
if (Func.isEmpty(existRegion)) {
|
|
||||||
if (StringUtil.isNotBlank(originalCode) && !StringUtil.equals(code, originalCode)) {
|
|
||||||
throw new ServiceException("区划编号不允许修改");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (StringUtil.isBlank(originalCode) || !StringUtil.equals(code, originalCode)) {
|
|
||||||
throw new ServiceException("该区划编号已存在");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -139,31 +115,22 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> lazyTree(String parentCode, Map<String, Object> param) {
|
public List<RegionVO> lazyTree(String parentCode, Map<String, Object> param) {
|
||||||
return baseMapper.lazyTree(parentCode, param);
|
return baseMapper.lazyTree(parentCode, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RegionExcel> importRegion(List<RegionExcel> data, Boolean isCovered) {
|
public void importRegion(List<RegionExcel> data, Boolean isCovered) {
|
||||||
if (Func.isEmpty(data)) {
|
List<Region> list = new ArrayList<>();
|
||||||
throw new ServiceException("导入数据不能为空");
|
data.forEach(regionExcel -> {
|
||||||
}
|
Region region = BeanUtil.copyProperties(regionExcel, Region.class);
|
||||||
List<RegionExcel> errorList = new ArrayList<>();
|
list.add(region);
|
||||||
for (int index = 0; index < data.size(); index++) {
|
});
|
||||||
RegionExcel excel = data.get(index);
|
if (isCovered) {
|
||||||
try {
|
this.saveOrUpdateBatch(list);
|
||||||
Region region = BeanUtil.copyProperties(excel, Region.class);
|
|
||||||
if (Boolean.TRUE.equals(isCovered)) {
|
|
||||||
this.saveOrUpdate(region);
|
|
||||||
} else {
|
} else {
|
||||||
this.save(region);
|
this.saveBatch(list);
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + exception.getMessage());
|
|
||||||
errorList.add(excel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return errorList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public class AirportMasterWrapper extends BaseEntityWrapper<AirportMaster, Airpo
|
|||||||
@Override
|
@Override
|
||||||
public AirportMasterVO entityVO(AirportMaster airportMaster) {
|
public AirportMasterVO entityVO(AirportMaster airportMaster) {
|
||||||
AirportMasterVO airportMasterVO = Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterVO.class));
|
AirportMasterVO airportMasterVO = Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterVO.class));
|
||||||
airportMasterVO.setRegionCode(airportMaster.getDistrictCode());
|
|
||||||
airportMasterVO.setUpdateUserName(UserCache.getUserRealName(airportMaster.getUpdateUser()));
|
airportMasterVO.setUpdateUserName(UserCache.getUserRealName(airportMaster.getUpdateUser()));
|
||||||
return airportMasterVO;
|
return airportMasterVO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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.core.tool.utils.Func;
|
|
||||||
import org.springblade.system.cache.UserCache;
|
|
||||||
import org.springblade.system.pojo.entity.CargoType;
|
|
||||||
import org.springblade.system.pojo.vo.CargoTypeVO;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 货物类型包装类
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
public class CargoTypeWrapper extends BaseEntityWrapper<CargoType, CargoTypeVO> {
|
|
||||||
|
|
||||||
public static CargoTypeWrapper build() {
|
|
||||||
return new CargoTypeWrapper();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CargoTypeVO entityVO(CargoType cargoType) {
|
|
||||||
CargoTypeVO cargoTypeVO = Objects.requireNonNull(BeanUtil.copyProperties(cargoType, CargoTypeVO.class));
|
|
||||||
cargoTypeVO.setTypeLevelName(Objects.equals(cargoType.getTypeLevel(), 1) ? "一级货物类型" : "二级货物类型");
|
|
||||||
cargoTypeVO.setCreateUserName(Func.isEmpty(cargoType.getCreateUser()) ? "" : UserCache.getUserRealName(cargoType.getCreateUser()));
|
|
||||||
cargoTypeVO.setUpdateUserName(Func.isEmpty(cargoType.getUpdateUser()) ? "" : UserCache.getUserRealName(cargoType.getUpdateUser()));
|
|
||||||
return cargoTypeVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -27,7 +27,6 @@ package org.springblade.system.wrapper;
|
|||||||
|
|
||||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||||
import org.springblade.core.tool.utils.BeanUtil;
|
import org.springblade.core.tool.utils.BeanUtil;
|
||||||
import org.springblade.system.cache.UserCache;
|
|
||||||
import org.springblade.system.pojo.entity.Currency;
|
import org.springblade.system.pojo.entity.Currency;
|
||||||
import org.springblade.system.pojo.vo.CurrencyVO;
|
import org.springblade.system.pojo.vo.CurrencyVO;
|
||||||
|
|
||||||
@@ -46,9 +45,7 @@ public class CurrencyWrapper extends BaseEntityWrapper<Currency, CurrencyVO> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CurrencyVO entityVO(Currency currency) {
|
public CurrencyVO entityVO(Currency currency) {
|
||||||
CurrencyVO currencyVO = Objects.requireNonNull(BeanUtil.copyProperties(currency, CurrencyVO.class));
|
return Objects.requireNonNull(BeanUtil.copyProperties(currency, CurrencyVO.class));
|
||||||
currencyVO.setUpdateUserName(UserCache.getUserRealName(currency.getUpdateUser()));
|
|
||||||
return currencyVO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public class PortTerminalWrapper extends BaseEntityWrapper<PortTerminal, PortTer
|
|||||||
@Override
|
@Override
|
||||||
public PortTerminalVO entityVO(PortTerminal portTerminal) {
|
public PortTerminalVO entityVO(PortTerminal portTerminal) {
|
||||||
PortTerminalVO portTerminalVO = Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalVO.class));
|
PortTerminalVO portTerminalVO = Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalVO.class));
|
||||||
portTerminalVO.setRegionCode(portTerminal.getDistrictCode());
|
|
||||||
portTerminalVO.setUpdateUserName(UserCache.getUserRealName(portTerminal.getUpdateUser()));
|
portTerminalVO.setUpdateUserName(UserCache.getUserRealName(portTerminal.getUpdateUser()));
|
||||||
return portTerminalVO;
|
return portTerminalVO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public class RailwayStationWrapper extends BaseEntityWrapper<RailwayStation, Rai
|
|||||||
@Override
|
@Override
|
||||||
public RailwayStationVO entityVO(RailwayStation railwayStation) {
|
public RailwayStationVO entityVO(RailwayStation railwayStation) {
|
||||||
RailwayStationVO railwayStationVO = Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationVO.class));
|
RailwayStationVO railwayStationVO = Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationVO.class));
|
||||||
railwayStationVO.setRegionCode(railwayStation.getDistrictCode());
|
|
||||||
railwayStationVO.setUpdateUserName(UserCache.getUserRealName(railwayStation.getUpdateUser()));
|
railwayStationVO.setUpdateUserName(UserCache.getUserRealName(railwayStation.getUpdateUser()));
|
||||||
return railwayStationVO;
|
return railwayStationVO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ import org.springblade.system.pojo.vo.RegionVO;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.springblade.system.cache.RegionCache.ROOT_PARENT_CODE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 包装类,返回视图层所需的字段
|
* 包装类,返回视图层所需的字段
|
||||||
*
|
*
|
||||||
@@ -52,11 +50,7 @@ public class RegionWrapper extends BaseEntityWrapper<Region, RegionVO> {
|
|||||||
public RegionVO entityVO(Region region) {
|
public RegionVO entityVO(Region region) {
|
||||||
RegionVO regionVO = Objects.requireNonNull(BeanUtil.copyProperties(region, RegionVO.class));
|
RegionVO regionVO = Objects.requireNonNull(BeanUtil.copyProperties(region, RegionVO.class));
|
||||||
Region parentRegion = RegionCache.getByCode(region.getParentCode());
|
Region parentRegion = RegionCache.getByCode(region.getParentCode());
|
||||||
if (Objects.nonNull(parentRegion)) {
|
|
||||||
regionVO.setParentName(parentRegion.getName());
|
regionVO.setParentName(parentRegion.getName());
|
||||||
} else if (ROOT_PARENT_CODE.equals(region.getParentCode())) {
|
|
||||||
regionVO.setParentName("根节点");
|
|
||||||
}
|
|
||||||
return regionVO;
|
return regionVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,12 +126,9 @@ public class AccidentRecordController extends BladeController {
|
|||||||
@PostMapping("/import-accident-record")
|
@PostMapping("/import-accident-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入事故记录", description = "传入excel")
|
@Operation(summary = "导入事故记录", description = "传入excel")
|
||||||
public R importAccidentRecord(MultipartFile file, HttpServletResponse response) {
|
public R importAccidentRecord(MultipartFile file) {
|
||||||
List<AccidentRecordExcel> failureList = accidentRecordService.importAccidentRecord(ExcelUtil.read(file, AccidentRecordExcel.class));
|
AccidentRecordImporter accidentRecordImporter = new AccidentRecordImporter(accidentRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, accidentRecordImporter, AccidentRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "事故记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, AccidentRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,12 +111,9 @@ public class AnnualInspectionRecordController extends BladeController {
|
|||||||
@PostMapping("/import-annual-inspection-record")
|
@PostMapping("/import-annual-inspection-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入年检记录", description = "传入excel")
|
@Operation(summary = "导入年检记录", description = "传入excel")
|
||||||
public R importAnnualInspectionRecord(MultipartFile file, HttpServletResponse response) {
|
public R importAnnualInspectionRecord(MultipartFile file) {
|
||||||
List<AnnualInspectionRecordExcel> failureList = annualInspectionRecordService.importAnnualInspectionRecord(ExcelUtil.read(file, AnnualInspectionRecordExcel.class));
|
AnnualInspectionRecordImporter annualInspectionRecordImporter = new AnnualInspectionRecordImporter(annualInspectionRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, annualInspectionRecordImporter, AnnualInspectionRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "年检记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, AnnualInspectionRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.servlet.http.HttpServletResponse;
|
|
||||||
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.tool.api.R;
|
|
||||||
import org.springblade.core.tool.utils.DateUtil;
|
|
||||||
import org.springblade.core.tool.utils.Func;
|
|
||||||
import org.springblade.common.excel.ImportFailureExcelUtil;
|
|
||||||
import org.springblade.transport.excel.CommonCargoExcel;
|
|
||||||
import org.springblade.transport.excel.CommonCargoExportExcel;
|
|
||||||
import org.springblade.transport.excel.CommonCargoImportFailureExcel;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import org.springblade.transport.pojo.entity.CommonCargo;
|
|
||||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
|
||||||
import org.springblade.transport.pojo.vo.CommonCargoVO;
|
|
||||||
import org.springblade.transport.service.ICommonCargoService;
|
|
||||||
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 java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 常用货物 控制器
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
@PreAuth(menu = "common_cargo")
|
|
||||||
@RequestMapping("/common-cargo")
|
|
||||||
@Tag(name = "常用货物", description = "常用货物")
|
|
||||||
public class CommonCargoController extends BladeController {
|
|
||||||
|
|
||||||
private final ICommonCargoService commonCargoService;
|
|
||||||
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@Operation(summary = "详情", description = "传入id")
|
|
||||||
public R<CommonCargoVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.data(commonCargoService.detail(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@Operation(summary = "分页", description = "传入commonCargo")
|
|
||||||
public R<IPage<CommonCargoVO>> list(CommonCargoVO commonCargo, Query query) {
|
|
||||||
return R.data(commonCargoService.selectCommonCargoPage(Condition.getPage(query), commonCargo));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/submit")
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@Operation(summary = "新增或修改", description = "传入commonCargo")
|
|
||||||
public R submit(@RequestBody CommonCargo commonCargo) {
|
|
||||||
return R.status(commonCargoService.submit(commonCargo));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
|
||||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
|
||||||
return R.data(commonCargoService.removeCommonCargo(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-common-cargo")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@Operation(summary = "导出常用货物")
|
|
||||||
public void exportCommonCargo(CommonCargoVO commonCargo, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
|
||||||
List<CommonCargoExportExcel> list = commonCargoService.exportCommonCargo(commonCargo, ids);
|
|
||||||
ExcelUtil.export(response, "常用货物" + DateUtil.time(), "常用货物", list, CommonCargoExportExcel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/import-common-cargo")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@Operation(summary = "导入常用货物", description = "传入excel")
|
|
||||||
public R importCommonCargo(MultipartFile file, HttpServletResponse response) {
|
|
||||||
List<CommonCargoImportFailureExcel> failureList = commonCargoService.importCommonCargo(ExcelUtil.read(file, CommonCargoExcel.class));
|
|
||||||
if (Func.isNotEmpty(failureList)) {
|
|
||||||
ImportFailureExcelUtil.export(response, "常用货物导入失败明细" + DateUtil.time(), "导入失败明细", failureList, CommonCargoExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("导入数据成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-template")
|
|
||||||
@ApiOperationSupport(order = 7)
|
|
||||||
@Operation(summary = "导出模板")
|
|
||||||
public void exportTemplate(HttpServletResponse response) {
|
|
||||||
ExcelUtil.export(response, "常用货物模板", "常用货物导入模板", new ArrayList<CommonCargoExcel>(), CommonCargoExcel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.servlet.http.HttpServletResponse;
|
|
||||||
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.tool.api.R;
|
|
||||||
import org.springblade.core.tool.utils.DateUtil;
|
|
||||||
import org.springblade.core.tool.utils.Func;
|
|
||||||
import org.springblade.transport.excel.CommonRouteExcel;
|
|
||||||
import org.springblade.transport.pojo.entity.CommonRoute;
|
|
||||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
|
||||||
import org.springblade.transport.pojo.vo.CommonRouteVO;
|
|
||||||
import org.springblade.transport.service.ICommonRouteService;
|
|
||||||
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 java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 常用线路 控制器
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
@PreAuth(menu = "common_route")
|
|
||||||
@RequestMapping("/common-route")
|
|
||||||
@Tag(name = "常用线路", description = "常用线路")
|
|
||||||
public class CommonRouteController extends BladeController {
|
|
||||||
|
|
||||||
private final ICommonRouteService commonRouteService;
|
|
||||||
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@Operation(summary = "详情", description = "传入id")
|
|
||||||
public R<CommonRouteVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.data(commonRouteService.detail(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@Operation(summary = "分页", description = "传入commonRoute")
|
|
||||||
public R<IPage<CommonRouteVO>> list(CommonRouteVO commonRoute, Query query) {
|
|
||||||
return R.data(commonRouteService.selectCommonRoutePage(Condition.getPage(query), commonRoute));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/submit")
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@Operation(summary = "新增或修改", description = "传入commonRoute")
|
|
||||||
public R submit(@RequestBody CommonRoute commonRoute) {
|
|
||||||
return R.status(commonRouteService.submit(commonRoute));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
|
||||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
|
||||||
return R.data(commonRouteService.removeCommonRoute(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-common-route")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@Operation(summary = "导出常用线路")
|
|
||||||
public void exportCommonRoute(CommonRouteVO commonRoute, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
|
||||||
List<CommonRouteExcel> list = commonRouteService.exportCommonRoute(commonRoute, ids);
|
|
||||||
ExcelUtil.export(response, "常用线路" + DateUtil.time(), "常用线路", list, CommonRouteExcel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,175 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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>
|
|
||||||
* 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.servlet.http.HttpServletResponse;
|
|
||||||
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.tool.api.R;
|
|
||||||
import org.springblade.core.tool.utils.DateUtil;
|
|
||||||
import org.springblade.transport.excel.ContractManageExcel;
|
|
||||||
import org.springblade.transport.pojo.entity.ContractManage;
|
|
||||||
import org.springblade.transport.pojo.vo.ContractManageVO;
|
|
||||||
import org.springblade.transport.service.IContractManageService;
|
|
||||||
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 java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 合同管理 控制器
|
|
||||||
*
|
|
||||||
* @author Chill
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@AllArgsConstructor
|
|
||||||
@PreAuth(menu = "contract_manage")
|
|
||||||
@RequestMapping("/contract-manage")
|
|
||||||
@Tag(name = "合同管理", description = "合同管理")
|
|
||||||
public class ContractManageController extends BladeController {
|
|
||||||
|
|
||||||
private final IContractManageService contractManageService;
|
|
||||||
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@Operation(summary = "详情", description = "传入id")
|
|
||||||
public R<ContractManageVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.data(contractManageService.detail(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@Operation(summary = "分页", description = "传入contractManage")
|
|
||||||
public R<IPage<ContractManageVO>> list(ContractManageVO contractManage, Query query) {
|
|
||||||
return R.data(contractManageService.selectContractManagePage(Condition.getPage(query), contractManage));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/save-draft")
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@Operation(summary = "保存草稿", description = "传入contractManage")
|
|
||||||
public R saveDraft(@RequestBody ContractManage contractManage) {
|
|
||||||
return R.status(contractManageService.saveDraft(contractManage));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/submit")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@Operation(summary = "新增或修改", description = "传入contractManage")
|
|
||||||
public R submit(@RequestBody ContractManage contractManage) {
|
|
||||||
return R.status(contractManageService.submit(contractManage));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/to-temporary")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@Operation(summary = "转临时合同", description = "传入id")
|
|
||||||
public R toTemporary(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.status(contractManageService.toTemporary(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/submit-formal")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@Operation(summary = "提交正式合同", description = "传入id")
|
|
||||||
public R submitFormal(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.status(contractManageService.submitFormal(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/approve")
|
|
||||||
@ApiOperationSupport(order = 7)
|
|
||||||
@Operation(summary = "审批通过", description = "传入id")
|
|
||||||
public R approve(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.status(contractManageService.approve(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/reject")
|
|
||||||
@ApiOperationSupport(order = 8)
|
|
||||||
@Operation(summary = "审批驳回", description = "传入id")
|
|
||||||
public R reject(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.status(contractManageService.reject(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/withdraw")
|
|
||||||
@ApiOperationSupport(order = 9)
|
|
||||||
@Operation(summary = "撤回审批", description = "传入id")
|
|
||||||
public R withdraw(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.status(contractManageService.withdraw(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/start-change")
|
|
||||||
@ApiOperationSupport(order = 10)
|
|
||||||
@Operation(summary = "发起变更", description = "传入id、changeContent和changeReason")
|
|
||||||
public R startChange(@Parameter(description = "主键", required = true) @RequestParam Long id,
|
|
||||||
@RequestParam String changeContent,
|
|
||||||
@RequestParam String changeReason) {
|
|
||||||
return R.status(contractManageService.startChange(id, changeContent, changeReason));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/terminate")
|
|
||||||
@ApiOperationSupport(order = 11)
|
|
||||||
@Operation(summary = "终止合同", description = "传入id和reason")
|
|
||||||
public R terminate(@Parameter(description = "主键", required = true) @RequestParam Long id, @RequestParam(required = false) String reason) {
|
|
||||||
return R.status(contractManageService.terminate(id, reason));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/copy")
|
|
||||||
@ApiOperationSupport(order = 12)
|
|
||||||
@Operation(summary = "复制合同", description = "传入id")
|
|
||||||
public R<ContractManageVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
|
||||||
return R.data(contractManageService.copy(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 13)
|
|
||||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
|
||||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
|
||||||
return R.status(contractManageService.removeDraft(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/expire-stats")
|
|
||||||
@ApiOperationSupport(order = 14)
|
|
||||||
@Operation(summary = "到期统计", description = "传入contractManage")
|
|
||||||
public R<Map<String, Long>> expireStats(ContractManageVO contractManage) {
|
|
||||||
return R.data(contractManageService.expireStats(contractManage));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-contract-manage")
|
|
||||||
@ApiOperationSupport(order = 15)
|
|
||||||
@Operation(summary = "导出合同管理")
|
|
||||||
public void exportContractManage(ContractManageVO contractManage, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
|
||||||
List<ContractManageExcel> list = contractManageService.exportContractManage(contractManage, ids);
|
|
||||||
ExcelUtil.export(response, "合同管理" + DateUtil.time(), "合同管理", list, ContractManageExcel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -137,12 +137,9 @@ public class CreditScoreQuantificationController extends BladeController {
|
|||||||
@PostMapping("/import-credit-score-quantification")
|
@PostMapping("/import-credit-score-quantification")
|
||||||
@ApiOperationSupport(order = 7)
|
@ApiOperationSupport(order = 7)
|
||||||
@Operation(summary = "导入评分量化表", description = "传入excel")
|
@Operation(summary = "导入评分量化表", description = "传入excel")
|
||||||
public R importCreditScoreQuantification(MultipartFile file, HttpServletResponse response) {
|
public R importCreditScoreQuantification(MultipartFile file) {
|
||||||
List<CreditScoreQuantificationExcel> failureList = creditScoreQuantificationService.importCreditScoreQuantification(ExcelUtil.read(file, CreditScoreQuantificationExcel.class));
|
CreditScoreQuantificationImporter importer = new CreditScoreQuantificationImporter(creditScoreQuantificationService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, importer, CreditScoreQuantificationExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "评分量化表导入失败明细" + DateUtil.time(), "导入失败明细", failureList, CreditScoreQuantificationExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,8 +95,7 @@ public class CustomerArchiveController extends BladeController {
|
|||||||
@ApiOperationSupport(order = 3)
|
@ApiOperationSupport(order = 3)
|
||||||
@Operation(summary = "新增或修改", description = "传入customerArchive")
|
@Operation(summary = "新增或修改", description = "传入customerArchive")
|
||||||
public R submit(@RequestBody CustomerArchiveVO customerArchive) {
|
public R submit(@RequestBody CustomerArchiveVO customerArchive) {
|
||||||
boolean result = customerArchiveService.submit(customerArchive);
|
return R.status(customerArchiveService.submit(customerArchive));
|
||||||
return result ? R.data(customerArchive.getId()) : R.status(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,24 +75,6 @@ public class DriverController extends BladeController {
|
|||||||
private static final int DEFAULT_CURRENT = 1;
|
private static final int DEFAULT_CURRENT = 1;
|
||||||
private static final int DEFAULT_SIZE = 10;
|
private static final int DEFAULT_SIZE = 10;
|
||||||
private static final int MAX_SIZE = 100;
|
private static final int MAX_SIZE = 100;
|
||||||
private static final String EXPIRY_EXPIRED_SQL = """
|
|
||||||
(
|
|
||||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date < {0})
|
|
||||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date < {0})
|
|
||||||
)
|
|
||||||
""";
|
|
||||||
private static final String EXPIRY_WITHIN_30_SQL = """
|
|
||||||
(
|
|
||||||
NOT (
|
|
||||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date < {0})
|
|
||||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date < {0})
|
|
||||||
)
|
|
||||||
AND (
|
|
||||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date BETWEEN {0} AND {1})
|
|
||||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date BETWEEN {0} AND {1})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
""";
|
|
||||||
|
|
||||||
private final IDriverService driverService;
|
private final IDriverService driverService;
|
||||||
|
|
||||||
@@ -240,10 +222,18 @@ public class DriverController extends BladeController {
|
|||||||
queryWrapper.eq(Driver::getStatus, driver.getStatus());
|
queryWrapper.eq(Driver::getStatus, driver.getStatus());
|
||||||
}
|
}
|
||||||
if ("within30".equals(driver.getExpireStatus())) {
|
if ("within30".equals(driver.getExpireStatus())) {
|
||||||
queryWrapper.apply(EXPIRY_WITHIN_30_SQL, driver.getToday(), driver.getWarningDate());
|
queryWrapper.and(wrapper -> wrapper
|
||||||
|
.and(item -> item.ne(Driver::getDrivingLicenseLongTerm, 1)
|
||||||
|
.between(Driver::getDrivingLicenseEndDate, driver.getToday(), driver.getWarningDate()))
|
||||||
|
.or(item -> item.ne(Driver::getQualificationLongTerm, 1)
|
||||||
|
.between(Driver::getQualificationEndDate, driver.getToday(), driver.getWarningDate())));
|
||||||
}
|
}
|
||||||
if ("expired".equals(driver.getExpireStatus())) {
|
if ("expired".equals(driver.getExpireStatus())) {
|
||||||
queryWrapper.apply(EXPIRY_EXPIRED_SQL, driver.getToday());
|
queryWrapper.and(wrapper -> wrapper
|
||||||
|
.and(item -> item.ne(Driver::getDrivingLicenseLongTerm, 1)
|
||||||
|
.lt(Driver::getDrivingLicenseEndDate, driver.getToday()))
|
||||||
|
.or(item -> item.ne(Driver::getQualificationLongTerm, 1)
|
||||||
|
.lt(Driver::getQualificationEndDate, driver.getToday())));
|
||||||
}
|
}
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,12 +92,9 @@ public class EtcRecordController extends BladeController {
|
|||||||
@PostMapping("/import-etc-record")
|
@PostMapping("/import-etc-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入ETC记录", description = "传入excel")
|
@Operation(summary = "导入ETC记录", description = "传入excel")
|
||||||
public R importEtcRecord(MultipartFile file, HttpServletResponse response) {
|
public R importEtcRecord(MultipartFile file) {
|
||||||
List<EtcRecordExcel> failureList = etcRecordService.importEtcRecord(ExcelUtil.read(file, EtcRecordExcel.class));
|
EtcRecordImporter etcRecordImporter = new EtcRecordImporter(etcRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, etcRecordImporter, EtcRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "ETC记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, EtcRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,12 +127,9 @@ public class InsuranceRecordController extends BladeController {
|
|||||||
@PostMapping("/import-insurance-record")
|
@PostMapping("/import-insurance-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入保险记录", description = "传入excel")
|
@Operation(summary = "导入保险记录", description = "传入excel")
|
||||||
public R importInsuranceRecord(MultipartFile file, HttpServletResponse response) {
|
public R importInsuranceRecord(MultipartFile file) {
|
||||||
List<InsuranceRecordExcel> failureList = insuranceRecordService.importInsuranceRecord(ExcelUtil.read(file, InsuranceRecordExcel.class));
|
InsuranceRecordImporter insuranceRecordImporter = new InsuranceRecordImporter(insuranceRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, insuranceRecordImporter, InsuranceRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "保险记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, InsuranceRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,12 +126,9 @@ public class MaintenancePlanController extends BladeController {
|
|||||||
@PostMapping("/import-maintenance-plan")
|
@PostMapping("/import-maintenance-plan")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入保养记录", description = "传入excel")
|
@Operation(summary = "导入保养记录", description = "传入excel")
|
||||||
public R importMaintenancePlan(MultipartFile file, HttpServletResponse response) {
|
public R importMaintenancePlan(MultipartFile file) {
|
||||||
List<MaintenancePlanExcel> failureList = maintenancePlanService.importMaintenancePlan(ExcelUtil.read(file, MaintenancePlanExcel.class));
|
MaintenancePlanImporter maintenancePlanImporter = new MaintenancePlanImporter(maintenancePlanService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, maintenancePlanImporter, MaintenancePlanExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "保养记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, MaintenancePlanExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,12 +126,9 @@ public class MaintenanceRecordController extends BladeController {
|
|||||||
@PostMapping("/import-maintenance-record")
|
@PostMapping("/import-maintenance-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入维修记录", description = "传入excel")
|
@Operation(summary = "导入维修记录", description = "传入excel")
|
||||||
public R importMaintenanceRecord(MultipartFile file, HttpServletResponse response) {
|
public R importMaintenanceRecord(MultipartFile file) {
|
||||||
List<MaintenanceRecordExcel> failureList = maintenanceRecordService.importMaintenanceRecord(ExcelUtil.read(file, MaintenanceRecordExcel.class));
|
MaintenanceRecordImporter maintenanceRecordImporter = new MaintenanceRecordImporter(maintenanceRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, maintenanceRecordImporter, MaintenanceRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "维修记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, MaintenanceRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,12 +111,9 @@ public class MileageRecordController extends BladeController {
|
|||||||
@PostMapping("/import-mileage-record")
|
@PostMapping("/import-mileage-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入里程记录", description = "传入excel")
|
@Operation(summary = "导入里程记录", description = "传入excel")
|
||||||
public R importMileageRecord(MultipartFile file, HttpServletResponse response) {
|
public R importMileageRecord(MultipartFile file) {
|
||||||
List<MileageRecordExcel> failureList = mileageRecordService.importMileageRecord(ExcelUtil.read(file, MileageRecordExcel.class));
|
MileageRecordImporter mileageRecordImporter = new MileageRecordImporter(mileageRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, mileageRecordImporter, MileageRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "里程记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, MileageRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,9 +161,6 @@ public class MileageRecordController extends BladeController {
|
|||||||
if (Func.isNotEmpty(mileageRecord.getCreateDept())) {
|
if (Func.isNotEmpty(mileageRecord.getCreateDept())) {
|
||||||
queryWrapper.eq(MileageRecord::getCreateDept, mileageRecord.getCreateDept());
|
queryWrapper.eq(MileageRecord::getCreateDept, mileageRecord.getCreateDept());
|
||||||
}
|
}
|
||||||
if (Func.isNotEmpty(mileageRecord.getVehicleType())) {
|
|
||||||
queryWrapper.eq(MileageRecord::getVehicleType, mileageRecord.getVehicleType());
|
|
||||||
}
|
|
||||||
if (Func.isNotEmpty(mileageRecord.getVehicleNo())) {
|
if (Func.isNotEmpty(mileageRecord.getVehicleNo())) {
|
||||||
queryWrapper.like(MileageRecord::getVehicleNo, mileageRecord.getVehicleNo());
|
queryWrapper.like(MileageRecord::getVehicleNo, mileageRecord.getVehicleNo());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,12 +92,9 @@ public class OilElectricRecordController extends BladeController {
|
|||||||
@PostMapping("/import-oil-electric-record")
|
@PostMapping("/import-oil-electric-record")
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@Operation(summary = "导入油电记录", description = "传入excel")
|
@Operation(summary = "导入油电记录", description = "传入excel")
|
||||||
public R importOilElectricRecord(MultipartFile file, HttpServletResponse response) {
|
public R importOilElectricRecord(MultipartFile file) {
|
||||||
List<OilElectricRecordExcel> failureList = oilElectricRecordService.importOilElectricRecord(ExcelUtil.read(file, OilElectricRecordExcel.class));
|
OilElectricRecordImporter oilElectricRecordImporter = new OilElectricRecordImporter(oilElectricRecordService);
|
||||||
if (Func.isNotEmpty(failureList)) {
|
ExcelUtil.save(file, oilElectricRecordImporter, OilElectricRecordExcel.class);
|
||||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "油电记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, OilElectricRecordExcel.class);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return R.success("操作成功");
|
return R.success("操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user