1、新增常用货物
2、新增运输计划 3、新增项目管理 4、新增运单管理 5、新增常用线路 6、新增发货模板 7、新增合同管理 8、新增过程配置 9、新增临时额度管理
This commit is contained in:
@@ -217,6 +217,8 @@ Entity 基类的选择**直接决定** Service 和 ServiceImpl 的继承方式
|
||||
- 导入失败 Excel 的字段顺序必须与原导入模板保持一致,并在最后一列追加“导入失败原因”;失败原因应包含明确行号和可读错误信息。
|
||||
- 导入失败 Excel 中仅出错字段/列对应的单元格使用红色文字展示,最后一列“导入失败原因”的错误信息也必须使用红色文字展示;不得将整行失败数据全部标红,表头可保持默认样式。
|
||||
- 失败原因应尽量包含原导入模板中的列名,便于通用导出工具准确定位并标红对应错误单元格;无法定位具体字段的业务错误,仅标红“导入失败原因”列。
|
||||
- 导入失败 Excel 的表头列宽必须按表头和内容自适应,表头文字不得换行。
|
||||
- 后端导入校验必须与前端新增、编辑表单校验保持一致,包括必填、长度、格式、枚举范围、父子级联关系和金额/日期等业务规则;前端校验调整时,必须同步更新对应导入校验。
|
||||
- 导入模板本身不得包含失败原因列;如复用导入模型,应使用 `@ExcelIgnore` 忽略内部错误字段,或单独定义 `XxxImportFailureExcel` 模型。
|
||||
- 导入逻辑应逐行处理:可成功导入的数据正常保存,失败行收集到失败明细;除非业务明确要求全量事务回滚,不得因部分失败回滚已成功行。
|
||||
- Controller 在失败明细非空时应直接通过导入失败明细通用导出工具写入 `HttpServletResponse`,文件名统一包含业务名称、`导入失败明细` 和时间戳;全部成功时返回标准 `R.success`。
|
||||
|
||||
@@ -30,7 +30,6 @@ 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.handler.context.CellWriteHandlerContext;
|
||||
import cn.idev.excel.write.metadata.holder.WriteSheetHolder;
|
||||
import cn.idev.excel.write.metadata.holder.WriteTableHolder;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
@@ -191,6 +190,8 @@ public class ImportFailureExcelUtil {
|
||||
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()
|
||||
@@ -209,7 +210,13 @@ public class ImportFailureExcelUtil {
|
||||
cn.idev.excel.metadata.Head head,
|
||||
Integer relativeRowIndex,
|
||||
Boolean isHead) {
|
||||
if (Boolean.TRUE.equals(isHead) || relativeRowIndex == null || relativeRowIndex < 0 || relativeRowIndex >= rows.size()) {
|
||||
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())) {
|
||||
@@ -241,6 +248,35 @@ public class ImportFailureExcelUtil {
|
||||
});
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* 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<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
|
||||
}
|
||||
@@ -257,7 +257,7 @@ public class CargoTypeServiceImpl extends BaseServiceImpl<CargoTypeMapper, Cargo
|
||||
throw new ServiceException("货物类型编码格式不正确");
|
||||
}
|
||||
if (!cargoType.getCargoCode().startsWith(parent.getCargoCode())) {
|
||||
throw new ServiceException("二级编码前2位必须与上级货物类型编码一致");
|
||||
throw new ServiceException("货物类型编码前2位必须与上级货物类型编码一致");
|
||||
}
|
||||
if (Objects.equals(cargoType.getId(), parent.getId())) {
|
||||
throw new ServiceException("请选择上级货物类型");
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* 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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* 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.ProcessConfigExcel;
|
||||
import org.springblade.transport.pojo.entity.ProcessConfig;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ProcessConfigVO;
|
||||
import org.springblade.transport.service.IProcessConfigService;
|
||||
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 = "process_config")
|
||||
@RequestMapping("/process-config")
|
||||
@Tag(name = "过程配置", description = "过程配置")
|
||||
public class ProcessConfigController extends BladeController {
|
||||
|
||||
private final IProcessConfigService processConfigService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<ProcessConfigVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(processConfigService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入processConfig")
|
||||
public R<IPage<ProcessConfigVO>> list(ProcessConfigVO processConfig, Query query) {
|
||||
return R.data(processConfigService.selectProcessConfigPage(Condition.getPage(query), processConfig));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入processConfig")
|
||||
public R submit(@RequestBody ProcessConfig processConfig) {
|
||||
return R.status(processConfigService.submit(processConfig));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(processConfigService.removeProcessConfig(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-process-config")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "导出过程配置")
|
||||
public void exportProcessConfig(ProcessConfigVO processConfig, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<ProcessConfigExcel> list = processConfigService.exportProcessConfig(processConfig, ids);
|
||||
ExcelUtil.export(response, "过程配置" + DateUtil.time(), "过程配置", list, ProcessConfigExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<ProcessConfigVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(processConfigService.copy(id));
|
||||
}
|
||||
|
||||
@PostMapping("/enable")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "启用", description = "传入id")
|
||||
public R enable(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(processConfigService.enable(id));
|
||||
}
|
||||
|
||||
@PostMapping("/disable")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "停用", description = "传入id")
|
||||
public R disable(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(processConfigService.disable(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
/**
|
||||
* 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.ProjectApplyExcel;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
import org.springblade.transport.pojo.vo.ProjectApplyVO;
|
||||
import org.springblade.transport.service.IProjectApplyService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 项目立项 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "project_apply")
|
||||
@RequestMapping("/project-apply")
|
||||
@Tag(name = "项目立项", description = "项目立项")
|
||||
public class ProjectApplyController extends BladeController {
|
||||
|
||||
private final IProjectApplyService projectApplyService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<ProjectApplyVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(projectApplyService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入projectApply")
|
||||
public R<IPage<ProjectApplyVO>> list(ProjectApplyVO projectApply, Query query) {
|
||||
return R.data(projectApplyService.selectProjectApplyPage(Condition.getPage(query), projectApply));
|
||||
}
|
||||
|
||||
@PostMapping("/save-draft")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "保存草稿", description = "传入projectApply")
|
||||
public R saveDraft(@RequestBody ProjectApply projectApply) {
|
||||
return R.status(projectApplyService.saveDraft(projectApply));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增或修改", description = "传入projectApply")
|
||||
public R submit(@RequestBody ProjectApply projectApply) {
|
||||
return R.status(projectApplyService.submit(projectApply));
|
||||
}
|
||||
|
||||
@PostMapping("/submit-approval")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "提交审批", description = "传入id")
|
||||
public R submitApproval(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(projectApplyService.submitApproval(id));
|
||||
}
|
||||
|
||||
@PostMapping("/approve")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "审批通过", description = "传入id")
|
||||
public R approve(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(projectApplyService.approve(id));
|
||||
}
|
||||
|
||||
@PostMapping("/reject")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "审批驳回", description = "传入id")
|
||||
public R reject(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(projectApplyService.reject(id));
|
||||
}
|
||||
|
||||
@PostMapping("/withdraw")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "撤回审批", description = "传入id")
|
||||
public R withdraw(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(projectApplyService.withdraw(id));
|
||||
}
|
||||
|
||||
@PostMapping("/void")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "作废", description = "传入id和reason")
|
||||
public R voidProject(@Parameter(description = "主键", required = true) @RequestParam Long id, @RequestParam(required = false) String reason) {
|
||||
return R.status(projectApplyService.voidProject(id, reason));
|
||||
}
|
||||
|
||||
@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(projectApplyService.startChange(id, changeContent, changeReason));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(projectApplyService.removeDraft(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-project-apply")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@Operation(summary = "导出项目立项")
|
||||
public void exportProjectApply(ProjectApplyVO projectApply, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<ProjectApplyExcel> list = projectApplyService.exportProjectApply(projectApply, ids);
|
||||
ExcelUtil.export(response, "项目立项" + DateUtil.time(), "项目立项", list, ProjectApplyExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* 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.ShippingTemplateExcel;
|
||||
import org.springblade.transport.pojo.entity.ShippingTemplate;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ShippingTemplateVO;
|
||||
import org.springblade.transport.service.IShippingTemplateService;
|
||||
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 = "shipping_template")
|
||||
@RequestMapping("/shipping-template")
|
||||
@Tag(name = "发货模板", description = "发货模板")
|
||||
public class ShippingTemplateController extends BladeController {
|
||||
|
||||
private final IShippingTemplateService shippingTemplateService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<ShippingTemplateVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(shippingTemplateService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入shippingTemplate")
|
||||
public R<IPage<ShippingTemplateVO>> list(ShippingTemplateVO shippingTemplate, Query query) {
|
||||
return R.data(shippingTemplateService.selectShippingTemplatePage(Condition.getPage(query), shippingTemplate));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入shippingTemplate")
|
||||
public R submit(@RequestBody ShippingTemplate shippingTemplate) {
|
||||
return R.status(shippingTemplateService.submit(shippingTemplate));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(shippingTemplateService.removeShippingTemplate(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-shipping-template")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "导出发货模板")
|
||||
public void exportShippingTemplate(ShippingTemplateVO shippingTemplate, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<ShippingTemplateExcel> list = shippingTemplateService.exportShippingTemplate(shippingTemplate, ids);
|
||||
ExcelUtil.export(response, "发货模板" + DateUtil.time(), "发货模板", list, ShippingTemplateExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<ShippingTemplateVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(shippingTemplateService.copy(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* 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.TemporaryCreditLimitExcel;
|
||||
import org.springblade.transport.pojo.entity.TemporaryCreditLimit;
|
||||
import org.springblade.transport.pojo.vo.TemporaryCreditLimitVO;
|
||||
import org.springblade.transport.service.ITemporaryCreditLimitService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 临时额度申请 控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "temporary_credit_limit")
|
||||
@RequestMapping("/temporary-credit-limit")
|
||||
@Tag(name = "临时额度申请", description = "临时额度申请")
|
||||
public class TemporaryCreditLimitController extends BladeController {
|
||||
|
||||
private final ITemporaryCreditLimitService temporaryCreditLimitService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<TemporaryCreditLimitVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(temporaryCreditLimitService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入temporaryCreditLimit")
|
||||
public R<IPage<TemporaryCreditLimitVO>> list(TemporaryCreditLimitVO temporaryCreditLimit, Query query) {
|
||||
return R.data(temporaryCreditLimitService.selectTemporaryCreditLimitPage(Condition.getPage(query), temporaryCreditLimit));
|
||||
}
|
||||
|
||||
@PostMapping("/save-draft")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "保存草稿", description = "传入temporaryCreditLimit")
|
||||
public R saveDraft(@RequestBody TemporaryCreditLimit temporaryCreditLimit) {
|
||||
return R.status(temporaryCreditLimitService.saveDraft(temporaryCreditLimit));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增或修改", description = "传入temporaryCreditLimit")
|
||||
public R submit(@RequestBody TemporaryCreditLimit temporaryCreditLimit) {
|
||||
return R.status(temporaryCreditLimitService.submit(temporaryCreditLimit));
|
||||
}
|
||||
|
||||
@PostMapping("/submit-approval")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "提交审批", description = "传入id")
|
||||
public R submitApproval(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(temporaryCreditLimitService.submitApproval(id));
|
||||
}
|
||||
|
||||
@PostMapping("/approve")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "审批通过", description = "传入id")
|
||||
public R approve(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(temporaryCreditLimitService.approve(id));
|
||||
}
|
||||
|
||||
@PostMapping("/reject")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "审批驳回", description = "传入id")
|
||||
public R reject(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(temporaryCreditLimitService.reject(id));
|
||||
}
|
||||
|
||||
@PostMapping("/withdraw")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "撤回审批", description = "传入id")
|
||||
public R withdraw(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(temporaryCreditLimitService.withdraw(id));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(temporaryCreditLimitService.removeDraft(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-temporary-credit-limit")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "导出临时额度申请")
|
||||
public void exportTemporaryCreditLimit(TemporaryCreditLimitVO temporaryCreditLimit, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<TemporaryCreditLimitExcel> list = temporaryCreditLimitService.exportTemporaryCreditLimit(temporaryCreditLimit, ids);
|
||||
ExcelUtil.export(response, "临时额度申请" + DateUtil.time(), "临时额度申请", list, TemporaryCreditLimitExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* 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.TransportPlanExcel;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.TransportPlanVO;
|
||||
import org.springblade.transport.service.ITransportPlanService;
|
||||
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 = "transport_plan")
|
||||
@RequestMapping("/transport-plan")
|
||||
@Tag(name = "运输计划", description = "运输计划")
|
||||
public class TransportPlanController extends BladeController {
|
||||
|
||||
private final ITransportPlanService transportPlanService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<TransportPlanVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(transportPlanService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入transportPlan")
|
||||
public R<IPage<TransportPlanVO>> list(TransportPlanVO transportPlan, Query query) {
|
||||
return R.data(transportPlanService.selectTransportPlanPage(Condition.getPage(query), transportPlan));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入transportPlan")
|
||||
public R submit(@RequestBody TransportPlan transportPlan) {
|
||||
return R.status(transportPlanService.submit(transportPlan));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(transportPlanService.removeTransportPlan(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-transport-plan")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "导出运输计划")
|
||||
public void exportTransportPlan(TransportPlanVO transportPlan, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<TransportPlanExcel> list = transportPlanService.exportTransportPlan(transportPlan, ids);
|
||||
ExcelUtil.export(response, "运输计划" + DateUtil.time(), "运输计划", list, TransportPlanExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<TransportPlanVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(transportPlanService.copy(id));
|
||||
}
|
||||
|
||||
@PostMapping("/cancel")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "取消", description = "传入id")
|
||||
public R cancel(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(transportPlanService.cancel(id));
|
||||
}
|
||||
|
||||
@PostMapping("/complete")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "完成", description = "传入id")
|
||||
public R complete(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(transportPlanService.complete(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* 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.WaybillExcel;
|
||||
import org.springblade.transport.pojo.entity.Waybill;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.WaybillVO;
|
||||
import org.springblade.transport.service.IWaybillService;
|
||||
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 = "waybill_manage")
|
||||
@RequestMapping("/waybill-manage")
|
||||
@Tag(name = "运单管理", description = "运单管理")
|
||||
public class WaybillController extends BladeController {
|
||||
|
||||
private final IWaybillService waybillService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<WaybillVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(waybillService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入waybill")
|
||||
public R<IPage<WaybillVO>> list(WaybillVO waybill, Query query) {
|
||||
return R.data(waybillService.selectWaybillPage(Condition.getPage(query), waybill));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "新增或修改", description = "传入waybill")
|
||||
public R submit(@RequestBody Waybill waybill) {
|
||||
return R.status(waybillService.submit(waybill));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(waybillService.removeWaybill(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-waybill-manage")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "导出运单管理")
|
||||
public void exportWaybill(WaybillVO waybill, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<WaybillExcel> list = waybillService.exportWaybill(waybill, ids);
|
||||
ExcelUtil.export(response, "运单管理" + DateUtil.time(), "运单管理", list, WaybillExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<WaybillVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(waybillService.copy(id));
|
||||
}
|
||||
|
||||
@PostMapping("/cancel")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "取消", description = "传入id")
|
||||
public R cancel(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(waybillService.cancel(id));
|
||||
}
|
||||
|
||||
@PostMapping("/reassign")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "重新派单", description = "传入id")
|
||||
public R reassign(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(waybillService.reassign(id));
|
||||
}
|
||||
|
||||
@PostMapping("/complete")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "完成", description = "传入id")
|
||||
public R complete(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(waybillService.complete(id));
|
||||
}
|
||||
|
||||
@PostMapping("/batch-complete")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "批量完成", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> batchComplete(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(waybillService.batchComplete(ids));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* 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.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
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.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 常用货物导入 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(24)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class CommonCargoExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("*一级货物类型")
|
||||
private String firstCargoTypeName;
|
||||
|
||||
@ExcelProperty("*二级货物类型编码")
|
||||
private String secondCargoTypeCode;
|
||||
|
||||
@ExcelProperty("*货物名称")
|
||||
private String cargoName;
|
||||
|
||||
@ExcelProperty("*货物编号后缀")
|
||||
private String cargoCodeSuffix;
|
||||
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@ExcelProperty("包装")
|
||||
private String packageType;
|
||||
|
||||
@ExcelProperty("单价")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal cargoValue;
|
||||
|
||||
@ExcelProperty("规格")
|
||||
private String specification;
|
||||
|
||||
@ExcelProperty("计价单位")
|
||||
private String priceUnit;
|
||||
|
||||
@ExcelProperty("型号")
|
||||
private String model;
|
||||
|
||||
@ExcelProperty("说明1")
|
||||
private String descriptionOne;
|
||||
|
||||
@ExcelProperty("尺寸")
|
||||
private String sizeText;
|
||||
|
||||
@ExcelProperty("说明2")
|
||||
private String descriptionTwo;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
* 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.excel;
|
||||
|
||||
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.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 常用货物导出 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(24)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class CommonCargoExportExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("一级货物类型")
|
||||
private String firstCargoTypeName;
|
||||
|
||||
@ExcelProperty("二级货物类型编码")
|
||||
private String secondCargoTypeCode;
|
||||
|
||||
@ExcelProperty("货物名称")
|
||||
private String cargoName;
|
||||
|
||||
@ExcelProperty("货物编号")
|
||||
private String cargoCode;
|
||||
|
||||
@ExcelProperty("货物编号后缀")
|
||||
private String cargoCodeSuffix;
|
||||
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@ExcelProperty("包装")
|
||||
private String packageType;
|
||||
|
||||
@ExcelProperty("单价")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal cargoValue;
|
||||
|
||||
@ExcelProperty("规格")
|
||||
private String specification;
|
||||
|
||||
@ExcelProperty("计价单位")
|
||||
private String priceUnit;
|
||||
|
||||
@ExcelProperty("型号")
|
||||
private String model;
|
||||
|
||||
@ExcelProperty("说明1")
|
||||
private String descriptionOne;
|
||||
|
||||
@ExcelProperty("尺寸")
|
||||
private String sizeText;
|
||||
|
||||
@ExcelProperty("说明2")
|
||||
private String descriptionTwo;
|
||||
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* 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.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
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.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 常用货物导入失败 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(24)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class CommonCargoImportFailureExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("*一级货物类型")
|
||||
private String firstCargoTypeName;
|
||||
|
||||
@ExcelProperty("*二级货物类型编码")
|
||||
private String secondCargoTypeCode;
|
||||
|
||||
@ExcelProperty("*货物名称")
|
||||
private String cargoName;
|
||||
|
||||
@ExcelProperty("*货物编号后缀")
|
||||
private String cargoCodeSuffix;
|
||||
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@ExcelProperty("包装")
|
||||
private String packageType;
|
||||
|
||||
@ExcelProperty("单价")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal cargoValue;
|
||||
|
||||
@ExcelProperty("规格")
|
||||
private String specification;
|
||||
|
||||
@ExcelProperty("计价单位")
|
||||
private String priceUnit;
|
||||
|
||||
@ExcelProperty("型号")
|
||||
private String model;
|
||||
|
||||
@ExcelProperty("说明1")
|
||||
private String descriptionOne;
|
||||
|
||||
@ExcelProperty("尺寸")
|
||||
private String sizeText;
|
||||
|
||||
@ExcelProperty("说明2")
|
||||
private String descriptionTwo;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("导入失败原因")
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 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.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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 常用线路 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class CommonRouteExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("线路编号")
|
||||
private String routeCode;
|
||||
@ExcelProperty("线路名称")
|
||||
private String routeName;
|
||||
@ExcelProperty("发货地")
|
||||
private String departureName;
|
||||
@ExcelProperty("发货地址")
|
||||
private String departureAddress;
|
||||
@ExcelProperty("发货经度")
|
||||
private BigDecimal departureLongitude;
|
||||
@ExcelProperty("发货纬度")
|
||||
private BigDecimal departureLatitude;
|
||||
@ExcelProperty("发货联系人")
|
||||
private String departureContact;
|
||||
@ExcelProperty("发货联系方式")
|
||||
private String departurePhone;
|
||||
@ExcelProperty("收货地")
|
||||
private String arrivalName;
|
||||
@ExcelProperty("收货地址")
|
||||
private String arrivalAddress;
|
||||
@ExcelProperty("收货经度")
|
||||
private BigDecimal arrivalLongitude;
|
||||
@ExcelProperty("收货纬度")
|
||||
private BigDecimal arrivalLatitude;
|
||||
@ExcelProperty("收货联系人")
|
||||
private String arrivalContact;
|
||||
@ExcelProperty("收货联系方式")
|
||||
private String arrivalPhone;
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* 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.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.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 合同管理 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class ContractManageExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("合同编号")
|
||||
private String contractNo;
|
||||
@ExcelProperty("合同名称")
|
||||
private String contractName;
|
||||
@ExcelProperty("所属项目")
|
||||
private String projectName;
|
||||
@ExcelProperty("所属组织")
|
||||
private String organizationName;
|
||||
@ExcelProperty("合同类别")
|
||||
private String contractCategory;
|
||||
@ExcelProperty("签约类型")
|
||||
private String signType;
|
||||
@ExcelProperty("甲方")
|
||||
private String partyA;
|
||||
@ExcelProperty("乙方")
|
||||
private String partyB;
|
||||
@ExcelProperty("开始日期")
|
||||
private LocalDate startDate;
|
||||
@ExcelProperty("结束日期")
|
||||
private LocalDate endDate;
|
||||
@ExcelProperty("临时效力起")
|
||||
private LocalDate temporaryStartDate;
|
||||
@ExcelProperty("临时效力止")
|
||||
private LocalDate temporaryEndDate;
|
||||
@ExcelProperty("经办人")
|
||||
private String handlerUserName;
|
||||
@ExcelProperty("合同阶段")
|
||||
private String contractStage;
|
||||
@ExcelProperty("审核状态")
|
||||
private String approvalStatus;
|
||||
@ExcelProperty("当前节点")
|
||||
private String currentNode;
|
||||
@ExcelProperty("当前处理人")
|
||||
private String currentProcessor;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* 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.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.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 过程配置 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class ProcessConfigExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("配置编号")
|
||||
private String configCode;
|
||||
@ExcelProperty("配置名称")
|
||||
private String configName;
|
||||
@ExcelProperty("项目ID集合")
|
||||
private String projectIds;
|
||||
@ExcelProperty("项目")
|
||||
private String projectNames;
|
||||
@ExcelProperty("包含过程节点")
|
||||
private String includedNodes;
|
||||
@ExcelProperty("默认后台完成运输天数")
|
||||
private Integer defaultFinishDays;
|
||||
@ExcelProperty("状态")
|
||||
private Integer status;
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* 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.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.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 项目立项 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class ProjectApplyExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("立项申请单号")
|
||||
private String applyNo;
|
||||
@ExcelProperty("项目编号")
|
||||
private String projectCode;
|
||||
@ExcelProperty("项目名称")
|
||||
private String projectName;
|
||||
@ExcelProperty("项目简称")
|
||||
private String projectShortName;
|
||||
@ExcelProperty("项目类型")
|
||||
private String projectType;
|
||||
@ExcelProperty("业务部门")
|
||||
private String businessDeptName;
|
||||
@ExcelProperty("承办部门")
|
||||
private String undertakeDeptName;
|
||||
@ExcelProperty("项目由来")
|
||||
private String projectSource;
|
||||
@ExcelProperty("项目资金使用额度(万元)")
|
||||
private BigDecimal fundLimit;
|
||||
@ExcelProperty("项目应收账款额度(万元)")
|
||||
private BigDecimal receivableLimit;
|
||||
@ExcelProperty("应收账款回款期限(天)")
|
||||
private Integer receivableDays;
|
||||
@ExcelProperty("回款账期(天)")
|
||||
private Integer paymentDays;
|
||||
@ExcelProperty("货物类型")
|
||||
private String cargoType;
|
||||
@ExcelProperty("预估货物数量")
|
||||
private String cargoQuantity;
|
||||
@ExcelProperty("业务周期开始日期")
|
||||
private LocalDate businessStartDate;
|
||||
@ExcelProperty("业务周期结束日期")
|
||||
private LocalDate businessEndDate;
|
||||
@ExcelProperty("运输线路")
|
||||
private String transportRoute;
|
||||
@ExcelProperty("运输类型")
|
||||
private String transportType;
|
||||
@ExcelProperty("业务类型")
|
||||
private String businessType;
|
||||
@ExcelProperty("项目规模(万元)")
|
||||
private BigDecimal projectScale;
|
||||
@ExcelProperty("预计利润(万元)")
|
||||
private BigDecimal estimatedProfit;
|
||||
@ExcelProperty("资金需求(万元)")
|
||||
private BigDecimal fundDemand;
|
||||
@ExcelProperty("结算方式")
|
||||
private String settlementMode;
|
||||
@ExcelProperty("项目经办人")
|
||||
private String handlerUserName;
|
||||
@ExcelProperty("项目负责人")
|
||||
private String principalUserName;
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerNames;
|
||||
@ExcelProperty("下游承运商")
|
||||
private String carrierNames;
|
||||
@ExcelProperty("审批状态")
|
||||
private String approvalStatus;
|
||||
@ExcelProperty("当前节点")
|
||||
private String currentNode;
|
||||
@ExcelProperty("当前处理人")
|
||||
private String currentProcessor;
|
||||
@ExcelProperty("生效类型")
|
||||
private String effectiveType;
|
||||
@ExcelProperty("审核通过时间")
|
||||
private LocalDateTime approvedTime;
|
||||
@ExcelProperty("备注")
|
||||
private String situationRemark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* 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.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.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 发货模板 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class ShippingTemplateExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("模板编号")
|
||||
private String templateCode;
|
||||
@ExcelProperty("模板名称")
|
||||
private String templateName;
|
||||
@ExcelProperty("模板类型")
|
||||
private String templateType;
|
||||
@ExcelProperty("项目")
|
||||
private String projectName;
|
||||
@ExcelProperty("客户合同")
|
||||
private String contractName;
|
||||
@ExcelProperty("运输类型")
|
||||
private String transportType;
|
||||
@ExcelProperty("发货地")
|
||||
private String departureName;
|
||||
@ExcelProperty("发货地址")
|
||||
private String departureAddress;
|
||||
@ExcelProperty("发货联系人")
|
||||
private String departureContact;
|
||||
@ExcelProperty("发货联系方式")
|
||||
private String departurePhone;
|
||||
@ExcelProperty("收货地")
|
||||
private String arrivalName;
|
||||
@ExcelProperty("收货地址")
|
||||
private String arrivalAddress;
|
||||
@ExcelProperty("收货联系人")
|
||||
private String arrivalContact;
|
||||
@ExcelProperty("收货联系方式")
|
||||
private String arrivalPhone;
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* 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.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.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 临时额度申请 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class TemporaryCreditLimitExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("申请单号")
|
||||
private String applicationNo;
|
||||
@ExcelProperty("项目编号")
|
||||
private String projectCode;
|
||||
@ExcelProperty("项目名称")
|
||||
private String projectName;
|
||||
@ExcelProperty("申请部门")
|
||||
private String applyDeptName;
|
||||
@ExcelProperty("申请人")
|
||||
private String applicantName;
|
||||
@ExcelProperty("项目资金使用额度(万元)")
|
||||
private BigDecimal projectFundLimit;
|
||||
@ExcelProperty("已使用项目资金额度(万元)")
|
||||
private BigDecimal usedFundLimit;
|
||||
@ExcelProperty("剩余项目资金使用额度(万元)")
|
||||
private BigDecimal remainingFundLimit;
|
||||
@ExcelProperty("申请临时额度(万元)")
|
||||
private BigDecimal applyLimit;
|
||||
@ExcelProperty("申请有效期至")
|
||||
private LocalDate validUntil;
|
||||
@ExcelProperty("审批状态")
|
||||
private String approvalStatus;
|
||||
@ExcelProperty("当前节点")
|
||||
private String currentNode;
|
||||
@ExcelProperty("当前处理人")
|
||||
private String currentProcessor;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* 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.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.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 运输计划 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class TransportPlanExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("计划单号")
|
||||
private String planNo;
|
||||
@ExcelProperty("计划名称")
|
||||
private String planName;
|
||||
@ExcelProperty("项目")
|
||||
private String projectName;
|
||||
@ExcelProperty("客户合同")
|
||||
private String contractName;
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerName;
|
||||
@ExcelProperty("运输类型")
|
||||
private String transportType;
|
||||
@ExcelProperty("计划开始日期")
|
||||
private LocalDate planStartDate;
|
||||
@ExcelProperty("计划结束日期")
|
||||
private LocalDate planEndDate;
|
||||
@ExcelProperty("发货地")
|
||||
private String departureName;
|
||||
@ExcelProperty("发货地址")
|
||||
private String departureAddress;
|
||||
@ExcelProperty("发货联系人")
|
||||
private String departureContact;
|
||||
@ExcelProperty("发货联系方式")
|
||||
private String departurePhone;
|
||||
@ExcelProperty("收货地")
|
||||
private String arrivalName;
|
||||
@ExcelProperty("收货地址")
|
||||
private String arrivalAddress;
|
||||
@ExcelProperty("收货联系人")
|
||||
private String arrivalContact;
|
||||
@ExcelProperty("收货联系方式")
|
||||
private String arrivalPhone;
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
@ExcelProperty("业务状态")
|
||||
private String businessStatus;
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* 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.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.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 运单管理 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class WaybillExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("运单号")
|
||||
private String waybillNo;
|
||||
@ExcelProperty("项目")
|
||||
private String projectName;
|
||||
@ExcelProperty("客户合同")
|
||||
private String contractName;
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerName;
|
||||
@ExcelProperty("运输类型")
|
||||
private String transportType;
|
||||
@ExcelProperty("货物名称")
|
||||
private String cargoName;
|
||||
@ExcelProperty("货物类型")
|
||||
private String cargoType;
|
||||
@ExcelProperty("发货地址")
|
||||
private String departureAddress;
|
||||
@ExcelProperty("收货地址")
|
||||
private String arrivalAddress;
|
||||
@ExcelProperty("承运商名称")
|
||||
private String carrierName;
|
||||
@ExcelProperty("司机姓名")
|
||||
private String driverName;
|
||||
@ExcelProperty("车/船/航班/班列号")
|
||||
private String vehicleNo;
|
||||
@ExcelProperty("原始单号")
|
||||
private String originalNo;
|
||||
@ExcelProperty("业务状态")
|
||||
private String businessStatus;
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
@ExcelProperty("开始日期")
|
||||
private LocalDate startDate;
|
||||
@ExcelProperty("结束日期")
|
||||
private LocalDate endDate;
|
||||
@ExcelProperty("计划名称")
|
||||
private String planName;
|
||||
@ExcelProperty("多联总单")
|
||||
private String masterNo;
|
||||
@ExcelProperty("配载单号")
|
||||
private String loadingNo;
|
||||
@ExcelProperty("运单批次号")
|
||||
private String batchNo;
|
||||
@ExcelProperty("关联单号")
|
||||
private String relationNo;
|
||||
@ExcelProperty("当前过程节点")
|
||||
private String currentProcessNode;
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springblade.transport.pojo.entity.CommonCargo;
|
||||
|
||||
/**
|
||||
* 常用货物 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface CommonCargoMapper extends BaseMapper<CommonCargo> {
|
||||
|
||||
@Select("SELECT cargo_name FROM blade_cargo_type WHERE cargo_code = #{cargoCode} AND type_level = #{typeLevel} AND is_deleted = 0 LIMIT 1")
|
||||
String selectCargoTypeName(@Param("cargoCode") String cargoCode, @Param("typeLevel") Integer typeLevel);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.CommonRoute;
|
||||
|
||||
/**
|
||||
* 常用线路 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface CommonRouteMapper extends BaseMapper<CommonRoute> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.ContractManage;
|
||||
|
||||
/**
|
||||
* 合同管理 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ContractManageMapper extends BaseMapper<ContractManage> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.ProcessConfig;
|
||||
|
||||
/**
|
||||
* 过程配置 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ProcessConfigMapper extends BaseMapper<ProcessConfig> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
|
||||
/**
|
||||
* 项目立项 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ProjectApplyMapper extends BaseMapper<ProjectApply> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.ShippingTemplate;
|
||||
|
||||
/**
|
||||
* 发货模板 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ShippingTemplateMapper extends BaseMapper<ShippingTemplate> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.TemporaryCreditLimit;
|
||||
|
||||
/**
|
||||
* 临时额度申请 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface TemporaryCreditLimitMapper extends BaseMapper<TemporaryCreditLimit> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
|
||||
/**
|
||||
* 运输计划 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface TransportPlanMapper extends BaseMapper<TransportPlan> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.transport.pojo.entity.Waybill;
|
||||
|
||||
/**
|
||||
* 运单管理 Mapper 接口
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface WaybillMapper extends BaseMapper<Waybill> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.CommonCargoExcel;
|
||||
import org.springblade.transport.excel.CommonCargoExportExcel;
|
||||
import org.springblade.transport.excel.CommonCargoImportFailureExcel;
|
||||
import org.springblade.transport.pojo.entity.CommonCargo;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.CommonCargoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用货物 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ICommonCargoService extends BaseService<CommonCargo> {
|
||||
|
||||
IPage<CommonCargoVO> selectCommonCargoPage(IPage<CommonCargo> page, CommonCargoVO commonCargo);
|
||||
CommonCargoVO detail(Long id);
|
||||
boolean submit(CommonCargo commonCargo);
|
||||
BusinessRemoveResultVO removeCommonCargo(String ids);
|
||||
List<CommonCargoExportExcel> exportCommonCargo(CommonCargoVO commonCargo, String ids);
|
||||
List<CommonCargoImportFailureExcel> importCommonCargo(List<CommonCargoExcel> data);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* 常用线路 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ICommonRouteService extends BaseService<CommonRoute> {
|
||||
|
||||
IPage<CommonRouteVO> selectCommonRoutePage(IPage<CommonRoute> page, CommonRouteVO commonRoute);
|
||||
CommonRouteVO detail(Long id);
|
||||
boolean submit(CommonRoute commonRoute);
|
||||
BusinessRemoveResultVO removeCommonRoute(String ids);
|
||||
List<CommonRouteExcel> exportCommonRoute(CommonRouteVO commonRoute, String ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.ContractManageExcel;
|
||||
import org.springblade.transport.pojo.entity.ContractManage;
|
||||
import org.springblade.transport.pojo.vo.ContractManageVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 合同管理 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IContractManageService extends BaseService<ContractManage> {
|
||||
|
||||
IPage<ContractManageVO> selectContractManagePage(IPage<ContractManage> page, ContractManageVO contractManage);
|
||||
ContractManageVO detail(Long id);
|
||||
boolean saveDraft(ContractManage contractManage);
|
||||
boolean submit(ContractManage contractManage);
|
||||
boolean toTemporary(Long id);
|
||||
boolean submitFormal(Long id);
|
||||
boolean approve(Long id);
|
||||
boolean reject(Long id);
|
||||
boolean withdraw(Long id);
|
||||
boolean startChange(Long id, String changeContent, String changeReason);
|
||||
boolean terminate(Long id, String reason);
|
||||
boolean removeDraft(String ids);
|
||||
ContractManageVO copy(Long id);
|
||||
Map<String, Long> expireStats(ContractManageVO contractManage);
|
||||
List<ContractManageExcel> exportContractManage(ContractManageVO contractManage, String ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.ProcessConfigExcel;
|
||||
import org.springblade.transport.pojo.entity.ProcessConfig;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ProcessConfigVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 过程配置 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IProcessConfigService extends BaseService<ProcessConfig> {
|
||||
|
||||
IPage<ProcessConfigVO> selectProcessConfigPage(IPage<ProcessConfig> page, ProcessConfigVO processConfig);
|
||||
ProcessConfigVO detail(Long id);
|
||||
boolean submit(ProcessConfig processConfig);
|
||||
BusinessRemoveResultVO removeProcessConfig(String ids);
|
||||
List<ProcessConfigExcel> exportProcessConfig(ProcessConfigVO processConfig, String ids);
|
||||
ProcessConfigVO copy(Long id);
|
||||
boolean enable(Long id);
|
||||
boolean disable(Long id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.ProjectApplyExcel;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
import org.springblade.transport.pojo.vo.ProjectApplyVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目立项 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IProjectApplyService extends BaseService<ProjectApply> {
|
||||
|
||||
IPage<ProjectApplyVO> selectProjectApplyPage(IPage<ProjectApply> page, ProjectApplyVO projectApply);
|
||||
ProjectApplyVO detail(Long id);
|
||||
boolean saveDraft(ProjectApply projectApply);
|
||||
boolean submit(ProjectApply projectApply);
|
||||
boolean submitApproval(Long id);
|
||||
boolean approve(Long id);
|
||||
boolean reject(Long id);
|
||||
boolean withdraw(Long id);
|
||||
boolean voidProject(Long id, String reason);
|
||||
boolean startChange(Long id, String changeContent, String changeReason);
|
||||
boolean removeDraft(String ids);
|
||||
List<ProjectApplyExcel> exportProjectApply(ProjectApplyVO projectApply, String ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.ShippingTemplateExcel;
|
||||
import org.springblade.transport.pojo.entity.ShippingTemplate;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ShippingTemplateVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发货模板 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IShippingTemplateService extends BaseService<ShippingTemplate> {
|
||||
|
||||
IPage<ShippingTemplateVO> selectShippingTemplatePage(IPage<ShippingTemplate> page, ShippingTemplateVO shippingTemplate);
|
||||
ShippingTemplateVO detail(Long id);
|
||||
boolean submit(ShippingTemplate shippingTemplate);
|
||||
BusinessRemoveResultVO removeShippingTemplate(String ids);
|
||||
List<ShippingTemplateExcel> exportShippingTemplate(ShippingTemplateVO shippingTemplate, String ids);
|
||||
ShippingTemplateVO copy(Long id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.TemporaryCreditLimitExcel;
|
||||
import org.springblade.transport.pojo.entity.TemporaryCreditLimit;
|
||||
import org.springblade.transport.pojo.vo.TemporaryCreditLimitVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 临时额度申请 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ITemporaryCreditLimitService extends BaseService<TemporaryCreditLimit> {
|
||||
|
||||
IPage<TemporaryCreditLimitVO> selectTemporaryCreditLimitPage(IPage<TemporaryCreditLimit> page, TemporaryCreditLimitVO temporaryCreditLimit);
|
||||
TemporaryCreditLimitVO detail(Long id);
|
||||
boolean saveDraft(TemporaryCreditLimit temporaryCreditLimit);
|
||||
boolean submit(TemporaryCreditLimit temporaryCreditLimit);
|
||||
boolean submitApproval(Long id);
|
||||
boolean approve(Long id);
|
||||
boolean reject(Long id);
|
||||
boolean withdraw(Long id);
|
||||
boolean removeDraft(String ids);
|
||||
List<TemporaryCreditLimitExcel> exportTemporaryCreditLimit(TemporaryCreditLimitVO temporaryCreditLimit, String ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 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.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.TransportPlanExcel;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.TransportPlanVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运输计划 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface ITransportPlanService extends BaseService<TransportPlan> {
|
||||
|
||||
IPage<TransportPlanVO> selectTransportPlanPage(IPage<TransportPlan> page, TransportPlanVO transportPlan);
|
||||
TransportPlanVO detail(Long id);
|
||||
boolean submit(TransportPlan transportPlan);
|
||||
BusinessRemoveResultVO removeTransportPlan(String ids);
|
||||
List<TransportPlanExcel> exportTransportPlan(TransportPlanVO transportPlan, String ids);
|
||||
TransportPlanVO copy(Long id);
|
||||
boolean cancel(Long id);
|
||||
boolean complete(Long id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
import org.springblade.transport.excel.WaybillExcel;
|
||||
import org.springblade.transport.pojo.entity.Waybill;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.WaybillVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运单管理 服务类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public interface IWaybillService extends BaseService<Waybill> {
|
||||
|
||||
IPage<WaybillVO> selectWaybillPage(IPage<Waybill> page, WaybillVO waybill);
|
||||
WaybillVO detail(Long id);
|
||||
boolean submit(Waybill waybill);
|
||||
BusinessRemoveResultVO removeWaybill(String ids);
|
||||
List<WaybillExcel> exportWaybill(WaybillVO waybill, String ids);
|
||||
WaybillVO copy(Long id);
|
||||
boolean cancel(Long id);
|
||||
boolean reassign(Long id);
|
||||
boolean complete(Long id);
|
||||
BusinessRemoveResultVO batchComplete(String ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.CommonCargoExcel;
|
||||
import org.springblade.transport.excel.CommonCargoExportExcel;
|
||||
import org.springblade.transport.excel.CommonCargoImportFailureExcel;
|
||||
import org.springblade.transport.mapper.CommonCargoMapper;
|
||||
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.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.CommonCargoWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 常用货物 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class CommonCargoServiceImpl extends BaseServiceImpl<CommonCargoMapper, CommonCargo> implements ICommonCargoService {
|
||||
|
||||
@Override
|
||||
public IPage<CommonCargoVO> selectCommonCargoPage(IPage<CommonCargo> page, CommonCargoVO commonCargo) {
|
||||
IPage<CommonCargo> entityPage = page(page, buildQuery(commonCargo));
|
||||
return CommonCargoWrapper.build().pageVO(entityPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonCargoVO detail(Long id) {
|
||||
return CommonCargoWrapper.build().entityVO(loadEditable(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(CommonCargo commonCargo) {
|
||||
boolean created = Func.isEmpty(commonCargo.getId());
|
||||
if (!created) {
|
||||
CommonCargo oldRecord = loadEditable(commonCargo.getId(), true);
|
||||
commonCargo.setCargoCode(oldRecord.getCargoCode());
|
||||
commonCargo.setDeptId(oldRecord.getDeptId());
|
||||
commonCargo.setDeptName(oldRecord.getDeptName());
|
||||
}
|
||||
prepare(commonCargo);
|
||||
validate(commonCargo);
|
||||
return saveOrUpdate(commonCargo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO removeCommonCargo(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
List<Long> deleteIdList = new ArrayList<>();
|
||||
for (CommonCargo commonCargo : listByIds(idList)) {
|
||||
TransportBusinessSupport.assertCurrentDept(commonCargo.getDeptId(), "常用货物");
|
||||
if (shouldSkipDelete(commonCargo)) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(commonCargo.getCargoCode());
|
||||
continue;
|
||||
}
|
||||
deleteIdList.add(commonCargo.getId());
|
||||
}
|
||||
if (Func.isNotEmpty(deleteIdList)) {
|
||||
deleteLogic(deleteIdList);
|
||||
}
|
||||
result.setSuccessCount(deleteIdList.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonCargoExportExcel> exportCommonCargo(CommonCargoVO commonCargo, String ids) {
|
||||
LambdaQueryWrapper<CommonCargo> queryWrapper = buildQuery(commonCargo);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(CommonCargo::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
CommonCargoExportExcel excel = new CommonCargoExportExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<CommonCargoImportFailureExcel> importCommonCargo(List<CommonCargoExcel> data) {
|
||||
if (Func.isEmpty(data)) {
|
||||
throw new ServiceException("导入数据不能为空");
|
||||
}
|
||||
List<CommonCargoImportFailureExcel> failureList = new ArrayList<>();
|
||||
for (int index = 0; index < data.size(); index++) {
|
||||
CommonCargoExcel excel = data.get(index);
|
||||
try {
|
||||
CommonCargo commonCargo = new CommonCargo();
|
||||
commonCargo.setFirstCargoTypeName(TransportBusinessSupport.trimToNull(excel.getFirstCargoTypeName()));
|
||||
commonCargo.setSecondCargoTypeCode(TransportBusinessSupport.trimToNull(excel.getSecondCargoTypeCode()));
|
||||
String suffix = TransportBusinessSupport.trimToEmpty(excel.getCargoCodeSuffix());
|
||||
if (!suffix.matches("^\\d{2}$")) {
|
||||
throw new ServiceException("请输入2位数字");
|
||||
}
|
||||
if (Func.isEmpty(commonCargo.getSecondCargoTypeCode()) || commonCargo.getSecondCargoTypeCode().length() < 4) {
|
||||
throw new ServiceException("二级货物类型编码不存在");
|
||||
}
|
||||
commonCargo.setCargoCode(commonCargo.getSecondCargoTypeCode().substring(0, 4) + suffix);
|
||||
commonCargo.setCargoName(TransportBusinessSupport.trimToNull(excel.getCargoName()));
|
||||
commonCargo.setBrand(TransportBusinessSupport.trimToNull(excel.getBrand()));
|
||||
commonCargo.setPackageType(TransportBusinessSupport.trimToNull(excel.getPackageType()));
|
||||
commonCargo.setCargoValue(excel.getCargoValue());
|
||||
commonCargo.setSpecification(TransportBusinessSupport.trimToNull(excel.getSpecification()));
|
||||
commonCargo.setPriceUnit(TransportBusinessSupport.trimToNull(excel.getPriceUnit()));
|
||||
commonCargo.setModel(TransportBusinessSupport.trimToNull(excel.getModel()));
|
||||
commonCargo.setDescriptionOne(TransportBusinessSupport.trimToNull(excel.getDescriptionOne()));
|
||||
commonCargo.setSizeText(TransportBusinessSupport.trimToNull(excel.getSizeText()));
|
||||
commonCargo.setDescriptionTwo(TransportBusinessSupport.trimToNull(excel.getDescriptionTwo()));
|
||||
commonCargo.setRemark(TransportBusinessSupport.trimToNull(excel.getRemark()));
|
||||
commonCargo.setDataSource("批量导入");
|
||||
submit(commonCargo);
|
||||
} catch (Exception exception) {
|
||||
CommonCargoImportFailureExcel failureExcel = new CommonCargoImportFailureExcel();
|
||||
BeanUtil.copyProperties(excel, failureExcel);
|
||||
failureExcel.setErrorMessage("第" + (index + 2) + "行:" + exception.getMessage());
|
||||
failureList.add(failureExcel);
|
||||
}
|
||||
}
|
||||
return failureList;
|
||||
}
|
||||
|
||||
private void validateCommonCargo(CommonCargo commonCargo) {
|
||||
if (Func.isEmpty(commonCargo.getSecondCargoTypeCode()) || commonCargo.getSecondCargoTypeCode().length() < 4) {
|
||||
throw new ServiceException("二级货物类型编码不存在");
|
||||
}
|
||||
String firstCode = commonCargo.getSecondCargoTypeCode().substring(0, 2);
|
||||
String firstName = baseMapper.selectCargoTypeName(firstCode, 1);
|
||||
String secondName = baseMapper.selectCargoTypeName(commonCargo.getSecondCargoTypeCode(), 2);
|
||||
if (Func.isEmpty(firstName)) {
|
||||
throw new ServiceException("请选择一级货物类型");
|
||||
}
|
||||
if (Func.isEmpty(secondName)) {
|
||||
throw new ServiceException("请选择二级货物类型");
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getFirstCargoTypeName()) && !Objects.equals(firstName, commonCargo.getFirstCargoTypeName())) {
|
||||
throw new ServiceException("二级货物类型编码不属于填写的一级货物类型");
|
||||
}
|
||||
commonCargo.setFirstCargoTypeCode(firstCode);
|
||||
commonCargo.setFirstCargoTypeName(firstName);
|
||||
commonCargo.setSecondCargoTypeName(secondName);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CommonCargo> buildQuery(CommonCargoVO commonCargo) {
|
||||
TransportBusinessSupport.validateAllDept(commonCargo.getAllDept(), "常用货物");
|
||||
LambdaQueryWrapper<CommonCargo> queryWrapper = Wrappers.<CommonCargo>lambdaQuery().eq(CommonCargo::getIsDeleted, 0);
|
||||
if (!Objects.equals(commonCargo.getAllDept(), 1)) {
|
||||
queryWrapper.eq(CommonCargo::getDeptId, TransportBusinessSupport.currentDeptId("常用货物"));
|
||||
} else if (Func.isNotEmpty(commonCargo.getDeptId())) {
|
||||
queryWrapper.eq(CommonCargo::getDeptId, commonCargo.getDeptId());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getFirstCargoTypeId())) {
|
||||
queryWrapper.eq(CommonCargo::getFirstCargoTypeId, commonCargo.getFirstCargoTypeId());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getFirstCargoTypeName())) {
|
||||
queryWrapper.like(CommonCargo::getFirstCargoTypeName, commonCargo.getFirstCargoTypeName());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getFirstCargoTypeCode())) {
|
||||
queryWrapper.like(CommonCargo::getFirstCargoTypeCode, commonCargo.getFirstCargoTypeCode());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getSecondCargoTypeId())) {
|
||||
queryWrapper.eq(CommonCargo::getSecondCargoTypeId, commonCargo.getSecondCargoTypeId());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getSecondCargoTypeName())) {
|
||||
queryWrapper.like(CommonCargo::getSecondCargoTypeName, commonCargo.getSecondCargoTypeName());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getSecondCargoTypeCode())) {
|
||||
queryWrapper.like(CommonCargo::getSecondCargoTypeCode, commonCargo.getSecondCargoTypeCode());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getCargoName())) {
|
||||
queryWrapper.like(CommonCargo::getCargoName, commonCargo.getCargoName());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getCargoCode())) {
|
||||
queryWrapper.eq(CommonCargo::getCargoCode, commonCargo.getCargoCode());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getBrand())) {
|
||||
queryWrapper.like(CommonCargo::getBrand, commonCargo.getBrand());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getPackageType())) {
|
||||
queryWrapper.like(CommonCargo::getPackageType, commonCargo.getPackageType());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getSpecification())) {
|
||||
queryWrapper.like(CommonCargo::getSpecification, commonCargo.getSpecification());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getPriceUnit())) {
|
||||
queryWrapper.like(CommonCargo::getPriceUnit, commonCargo.getPriceUnit());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getModel())) {
|
||||
queryWrapper.like(CommonCargo::getModel, commonCargo.getModel());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getDescriptionOne())) {
|
||||
queryWrapper.like(CommonCargo::getDescriptionOne, commonCargo.getDescriptionOne());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getSizeText())) {
|
||||
queryWrapper.like(CommonCargo::getSizeText, commonCargo.getSizeText());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getDescriptionTwo())) {
|
||||
queryWrapper.like(CommonCargo::getDescriptionTwo, commonCargo.getDescriptionTwo());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getDataSource())) {
|
||||
queryWrapper.eq(CommonCargo::getDataSource, commonCargo.getDataSource());
|
||||
}
|
||||
if (Func.isNotEmpty(commonCargo.getRemark())) {
|
||||
queryWrapper.like(CommonCargo::getRemark, commonCargo.getRemark());
|
||||
}
|
||||
queryWrapper.orderByDesc(CommonCargo::getUpdateTime).orderByDesc(CommonCargo::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepare(CommonCargo commonCargo) {
|
||||
commonCargo.setFirstCargoTypeName(TransportBusinessSupport.trimToNull(commonCargo.getFirstCargoTypeName()));
|
||||
commonCargo.setFirstCargoTypeCode(TransportBusinessSupport.trimToNull(commonCargo.getFirstCargoTypeCode()));
|
||||
commonCargo.setSecondCargoTypeName(TransportBusinessSupport.trimToNull(commonCargo.getSecondCargoTypeName()));
|
||||
commonCargo.setSecondCargoTypeCode(TransportBusinessSupport.trimToNull(commonCargo.getSecondCargoTypeCode()));
|
||||
commonCargo.setCargoName(TransportBusinessSupport.trimToNull(commonCargo.getCargoName()));
|
||||
commonCargo.setCargoCode(TransportBusinessSupport.trimToNull(commonCargo.getCargoCode()));
|
||||
commonCargo.setBrand(TransportBusinessSupport.trimToNull(commonCargo.getBrand()));
|
||||
commonCargo.setPackageType(TransportBusinessSupport.trimToNull(commonCargo.getPackageType()));
|
||||
commonCargo.setSpecification(TransportBusinessSupport.trimToNull(commonCargo.getSpecification()));
|
||||
commonCargo.setPriceUnit(TransportBusinessSupport.trimToNull(commonCargo.getPriceUnit()));
|
||||
commonCargo.setModel(TransportBusinessSupport.trimToNull(commonCargo.getModel()));
|
||||
commonCargo.setDescriptionOne(TransportBusinessSupport.trimToNull(commonCargo.getDescriptionOne()));
|
||||
commonCargo.setSizeText(TransportBusinessSupport.trimToNull(commonCargo.getSizeText()));
|
||||
commonCargo.setDescriptionTwo(TransportBusinessSupport.trimToNull(commonCargo.getDescriptionTwo()));
|
||||
commonCargo.setDataSource(TransportBusinessSupport.trimToNull(commonCargo.getDataSource()));
|
||||
commonCargo.setDeptName(TransportBusinessSupport.trimToNull(commonCargo.getDeptName()));
|
||||
commonCargo.setRemark(TransportBusinessSupport.trimToNull(commonCargo.getRemark()));
|
||||
if (Func.isEmpty(commonCargo.getDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("常用货物");
|
||||
commonCargo.setDeptId(dept.getId());
|
||||
commonCargo.setDeptName(dept.getDeptName());
|
||||
}
|
||||
if (commonCargo.getStatus() == null) { commonCargo.setStatus(1); }
|
||||
}
|
||||
|
||||
private void validate(CommonCargo commonCargo) {
|
||||
TransportBusinessSupport.validateRequired(commonCargo.getFirstCargoTypeName(), "请选择一级货物类型");
|
||||
TransportBusinessSupport.validateRequired(commonCargo.getSecondCargoTypeCode(), "请选择二级货物类型");
|
||||
TransportBusinessSupport.validateRequired(commonCargo.getCargoName(), "请输入货物名称");
|
||||
TransportBusinessSupport.validateRequired(commonCargo.getCargoCode(), "请输入货物编号");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getFirstCargoTypeName(), 255, "一级货物类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getFirstCargoTypeCode(), 255, "一级货物类型编码不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getSecondCargoTypeName(), 255, "二级货物类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getSecondCargoTypeCode(), 255, "二级货物类型编码不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getCargoName(), 255, "货物名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getCargoCode(), 255, "货物编号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getBrand(), 255, "品牌不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getPackageType(), 255, "包装不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getSpecification(), 255, "规格不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getPriceUnit(), 255, "计价单位不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getModel(), 255, "型号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getDescriptionOne(), 255, "说明1不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getSizeText(), 255, "尺寸不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getDescriptionTwo(), 255, "说明2不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getDataSource(), 255, "数据来源不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getDeptName(), 255, "所属组织不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonCargo.getRemark(), 500, "备注不能超过500字");
|
||||
validateCommonCargo(commonCargo);
|
||||
TransportBusinessSupport.validateNonNegative(commonCargo.getCargoValue(), "货值");
|
||||
if (count(Wrappers.<CommonCargo>lambdaQuery().eq(CommonCargo::getCargoCode, commonCargo.getCargoCode()).ne(Func.isNotEmpty(commonCargo.getId()), CommonCargo::getId, commonCargo.getId()).eq(CommonCargo::getIsDeleted, 0)) > 0) { throw new ServiceException("该货物编号已存在"); }
|
||||
}
|
||||
|
||||
private CommonCargo loadEditable(Long id, boolean checkDept) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
CommonCargo commonCargo = getById(id);
|
||||
if (Func.isEmpty(commonCargo) || Objects.equals(commonCargo.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("常用货物不存在");
|
||||
}
|
||||
if (checkDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(commonCargo.getDeptId(), "常用货物");
|
||||
}
|
||||
return commonCargo;
|
||||
}
|
||||
|
||||
private boolean shouldSkipDelete(CommonCargo commonCargo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.CommonRouteExcel;
|
||||
import org.springblade.transport.mapper.CommonRouteMapper;
|
||||
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.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.CommonRouteWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 常用线路 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class CommonRouteServiceImpl extends BaseServiceImpl<CommonRouteMapper, CommonRoute> implements ICommonRouteService {
|
||||
|
||||
@Override
|
||||
public IPage<CommonRouteVO> selectCommonRoutePage(IPage<CommonRoute> page, CommonRouteVO commonRoute) {
|
||||
IPage<CommonRoute> entityPage = page(page, buildQuery(commonRoute));
|
||||
return CommonRouteWrapper.build().pageVO(entityPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonRouteVO detail(Long id) {
|
||||
return CommonRouteWrapper.build().entityVO(loadEditable(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(CommonRoute commonRoute) {
|
||||
boolean created = Func.isEmpty(commonRoute.getId());
|
||||
if (!created) {
|
||||
CommonRoute oldRecord = loadEditable(commonRoute.getId(), true);
|
||||
commonRoute.setRouteCode(oldRecord.getRouteCode());
|
||||
commonRoute.setDeptId(oldRecord.getDeptId());
|
||||
commonRoute.setDeptName(oldRecord.getDeptName());
|
||||
}
|
||||
prepare(commonRoute);
|
||||
if (created && Func.isEmpty(commonRoute.getRouteCode())) {
|
||||
commonRoute.setRouteCode(nextCode());
|
||||
}
|
||||
validate(commonRoute);
|
||||
return saveOrUpdate(commonRoute);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO removeCommonRoute(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
List<Long> deleteIdList = new ArrayList<>();
|
||||
for (CommonRoute commonRoute : listByIds(idList)) {
|
||||
TransportBusinessSupport.assertCurrentDept(commonRoute.getDeptId(), "常用线路");
|
||||
if (shouldSkipDelete(commonRoute)) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(commonRoute.getRouteCode());
|
||||
continue;
|
||||
}
|
||||
deleteIdList.add(commonRoute.getId());
|
||||
}
|
||||
if (Func.isNotEmpty(deleteIdList)) {
|
||||
deleteLogic(deleteIdList);
|
||||
}
|
||||
result.setSuccessCount(deleteIdList.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonRouteExcel> exportCommonRoute(CommonRouteVO commonRoute, String ids) {
|
||||
LambdaQueryWrapper<CommonRoute> queryWrapper = buildQuery(commonRoute);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(CommonRoute::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
CommonRouteExcel excel = new CommonRouteExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CommonRoute> buildQuery(CommonRouteVO commonRoute) {
|
||||
TransportBusinessSupport.validateAllDept(commonRoute.getAllDept(), "常用线路");
|
||||
LambdaQueryWrapper<CommonRoute> queryWrapper = Wrappers.<CommonRoute>lambdaQuery().eq(CommonRoute::getIsDeleted, 0);
|
||||
if (!Objects.equals(commonRoute.getAllDept(), 1)) {
|
||||
queryWrapper.eq(CommonRoute::getDeptId, TransportBusinessSupport.currentDeptId("常用线路"));
|
||||
} else if (Func.isNotEmpty(commonRoute.getDeptId())) {
|
||||
queryWrapper.eq(CommonRoute::getDeptId, commonRoute.getDeptId());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getRouteCode())) {
|
||||
queryWrapper.eq(CommonRoute::getRouteCode, commonRoute.getRouteCode());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getRouteName())) {
|
||||
queryWrapper.like(CommonRoute::getRouteName, commonRoute.getRouteName());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getDepartureName())) {
|
||||
queryWrapper.like(CommonRoute::getDepartureName, commonRoute.getDepartureName());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getDepartureAddress())) {
|
||||
queryWrapper.like(CommonRoute::getDepartureAddress, commonRoute.getDepartureAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getDepartureContact())) {
|
||||
queryWrapper.like(CommonRoute::getDepartureContact, commonRoute.getDepartureContact());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getDeparturePhone())) {
|
||||
queryWrapper.like(CommonRoute::getDeparturePhone, commonRoute.getDeparturePhone());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getArrivalName())) {
|
||||
queryWrapper.like(CommonRoute::getArrivalName, commonRoute.getArrivalName());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getArrivalAddress())) {
|
||||
queryWrapper.like(CommonRoute::getArrivalAddress, commonRoute.getArrivalAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getArrivalContact())) {
|
||||
queryWrapper.like(CommonRoute::getArrivalContact, commonRoute.getArrivalContact());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getArrivalPhone())) {
|
||||
queryWrapper.like(CommonRoute::getArrivalPhone, commonRoute.getArrivalPhone());
|
||||
}
|
||||
if (Func.isNotEmpty(commonRoute.getRemark())) {
|
||||
queryWrapper.like(CommonRoute::getRemark, commonRoute.getRemark());
|
||||
}
|
||||
queryWrapper.orderByDesc(CommonRoute::getUpdateTime).orderByDesc(CommonRoute::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepare(CommonRoute commonRoute) {
|
||||
commonRoute.setRouteCode(TransportBusinessSupport.trimToNull(commonRoute.getRouteCode()));
|
||||
commonRoute.setRouteName(TransportBusinessSupport.trimToNull(commonRoute.getRouteName()));
|
||||
commonRoute.setDepartureName(TransportBusinessSupport.trimToNull(commonRoute.getDepartureName()));
|
||||
commonRoute.setDepartureAddress(TransportBusinessSupport.trimToNull(commonRoute.getDepartureAddress()));
|
||||
commonRoute.setDepartureContact(TransportBusinessSupport.trimToNull(commonRoute.getDepartureContact()));
|
||||
commonRoute.setDeparturePhone(TransportBusinessSupport.trimToNull(commonRoute.getDeparturePhone()));
|
||||
commonRoute.setArrivalName(TransportBusinessSupport.trimToNull(commonRoute.getArrivalName()));
|
||||
commonRoute.setArrivalAddress(TransportBusinessSupport.trimToNull(commonRoute.getArrivalAddress()));
|
||||
commonRoute.setArrivalContact(TransportBusinessSupport.trimToNull(commonRoute.getArrivalContact()));
|
||||
commonRoute.setArrivalPhone(TransportBusinessSupport.trimToNull(commonRoute.getArrivalPhone()));
|
||||
commonRoute.setDeptName(TransportBusinessSupport.trimToNull(commonRoute.getDeptName()));
|
||||
commonRoute.setRemark(TransportBusinessSupport.trimToNull(commonRoute.getRemark()));
|
||||
if (Func.isEmpty(commonRoute.getDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("常用线路");
|
||||
commonRoute.setDeptId(dept.getId());
|
||||
commonRoute.setDeptName(dept.getDeptName());
|
||||
}
|
||||
if (commonRoute.getStatus() == null) { commonRoute.setStatus(1); }
|
||||
}
|
||||
|
||||
private void validate(CommonRoute commonRoute) {
|
||||
TransportBusinessSupport.validateRequired(commonRoute.getRouteName(), "线路名称不能为空");
|
||||
TransportBusinessSupport.validateRequired(commonRoute.getDepartureName(), "发货地不能为空");
|
||||
TransportBusinessSupport.validateRequired(commonRoute.getDepartureAddress(), "发货地址不能为空");
|
||||
TransportBusinessSupport.validateRequired(commonRoute.getArrivalName(), "收货地不能为空");
|
||||
TransportBusinessSupport.validateRequired(commonRoute.getArrivalAddress(), "收货地址不能为空");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getRouteCode(), 255, "线路编号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getRouteName(), 255, "线路名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getDepartureName(), 255, "发货地不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getDepartureAddress(), 255, "发货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getDepartureContact(), 255, "发货联系人不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getDeparturePhone(), 255, "发货联系方式不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getArrivalName(), 255, "收货地不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getArrivalAddress(), 255, "收货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getArrivalContact(), 255, "收货联系人不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getArrivalPhone(), 255, "收货联系方式不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getDeptName(), 255, "所属组织不能超过255字");
|
||||
TransportBusinessSupport.validateLength(commonRoute.getRemark(), 500, "备注不能超过500字");
|
||||
TransportBusinessSupport.validatePhone(commonRoute.getDeparturePhone(), "发货联系方式格式不正确");
|
||||
TransportBusinessSupport.validatePhone(commonRoute.getArrivalPhone(), "收货联系方式格式不正确");
|
||||
TransportBusinessSupport.validateCoordinate(commonRoute.getDepartureLongitude(), true);
|
||||
TransportBusinessSupport.validateCoordinate(commonRoute.getDepartureLatitude(), false);
|
||||
TransportBusinessSupport.validateCoordinate(commonRoute.getArrivalLongitude(), true);
|
||||
TransportBusinessSupport.validateCoordinate(commonRoute.getArrivalLatitude(), false);
|
||||
}
|
||||
|
||||
private CommonRoute loadEditable(Long id, boolean checkDept) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
CommonRoute commonRoute = getById(id);
|
||||
if (Func.isEmpty(commonRoute) || Objects.equals(commonRoute.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("常用线路不存在");
|
||||
}
|
||||
if (checkDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(commonRoute.getDeptId(), "常用线路");
|
||||
}
|
||||
return commonRoute;
|
||||
}
|
||||
|
||||
private boolean shouldSkipDelete(CommonRoute commonRoute) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private synchronized String nextCode() {
|
||||
String prefix = "XL";
|
||||
List<CommonRoute> latestList = list(Wrappers.<CommonRoute>lambdaQuery()
|
||||
.select(CommonRoute::getRouteCode)
|
||||
.likeRight(CommonRoute::getRouteCode, prefix)
|
||||
.orderByDesc(CommonRoute::getRouteCode)
|
||||
.last("LIMIT 1"));
|
||||
int next = 1;
|
||||
if (Func.isNotEmpty(latestList) && Func.isNotEmpty(latestList.get(0).getRouteCode())) {
|
||||
String serial = latestList.get(0).getRouteCode().substring(prefix.length());
|
||||
if (serial.chars().allMatch(Character::isDigit)) {
|
||||
next = Integer.parseInt(serial) + 1;
|
||||
}
|
||||
}
|
||||
return prefix + String.format("%05d", next);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,392 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
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.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.excel.ContractManageExcel;
|
||||
import org.springblade.transport.mapper.ContractManageMapper;
|
||||
import org.springblade.transport.pojo.entity.ContractManage;
|
||||
import org.springblade.transport.pojo.vo.ContractManageVO;
|
||||
import org.springblade.transport.service.IContractManageService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.ContractManageWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 合同管理 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class ContractManageServiceImpl extends BaseServiceImpl<ContractManageMapper, ContractManage> implements IContractManageService {
|
||||
|
||||
private static final String STAGE_DRAFT = "draft";
|
||||
private static final String STAGE_TEMPORARY = "temporary";
|
||||
private static final String STAGE_FORMAL = "formal";
|
||||
private static final String STAGE_TERMINATED = "terminated";
|
||||
private static final String STATUS_DRAFT = "draft";
|
||||
private static final String STATUS_REVIEWING = "reviewing";
|
||||
private static final String STATUS_REJECTED = "rejected";
|
||||
private static final String STATUS_APPROVED = "approved";
|
||||
private static final String STATUS_CHANGE_REVIEWING = "change_reviewing";
|
||||
|
||||
@Override
|
||||
public IPage<ContractManageVO> selectContractManagePage(IPage<ContractManage> page, ContractManageVO contractManage) {
|
||||
IPage<ContractManage> entityPage = page(page, buildQuery(contractManage));
|
||||
IPage<ContractManageVO> voPage = ContractManageWrapper.build().pageVO(entityPage);
|
||||
voPage.getRecords().forEach(this::fillReadonly);
|
||||
return voPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractManageVO detail(Long id) {
|
||||
ContractManageVO contractManageVO = ContractManageWrapper.build().entityVO(loadExists(id));
|
||||
fillReadonly(contractManageVO);
|
||||
return contractManageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean saveDraft(ContractManage contractManage) {
|
||||
prepare(contractManage);
|
||||
validateDraft(contractManage);
|
||||
if (Func.isNotEmpty(contractManage.getId())) {
|
||||
loadEditable(contractManage.getId());
|
||||
}
|
||||
prepareCreateOrUpdate(contractManage);
|
||||
if (Func.isEmpty(contractManage.getApprovalStatus())) {
|
||||
contractManage.setApprovalStatus(STATUS_DRAFT);
|
||||
}
|
||||
if (Func.isEmpty(contractManage.getContractStage())) {
|
||||
contractManage.setContractStage(STAGE_DRAFT);
|
||||
}
|
||||
return saveOrUpdate(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(ContractManage contractManage) {
|
||||
prepare(contractManage);
|
||||
validateDraft(contractManage);
|
||||
validateTemporary(contractManage);
|
||||
if (Func.isNotEmpty(contractManage.getId())) {
|
||||
loadEditable(contractManage.getId());
|
||||
}
|
||||
prepareCreateOrUpdate(contractManage);
|
||||
contractManage.setContractStage(STAGE_TEMPORARY);
|
||||
contractManage.setApprovalStatus(STATUS_REVIEWING);
|
||||
return saveOrUpdate(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean toTemporary(Long id) {
|
||||
ContractManage contractManage = loadEditable(id);
|
||||
if (!Objects.equals(contractManage.getContractStage(), STAGE_DRAFT) || !Objects.equals(contractManage.getApprovalStatus(), STATUS_DRAFT)) {
|
||||
throw new ServiceException("仅草稿合同允许转临时合同");
|
||||
}
|
||||
contractManage.setContractStage(STAGE_TEMPORARY);
|
||||
contractManage.setApprovalStatus(STATUS_REVIEWING);
|
||||
contractManage.setCurrentNode("临时合同审批");
|
||||
contractManage.setCurrentProcessor("待处理");
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submitFormal(Long id) {
|
||||
ContractManage contractManage = loadExists(id);
|
||||
if (!Objects.equals(contractManage.getContractStage(), STAGE_TEMPORARY) || !List.of(STATUS_REJECTED, STATUS_APPROVED, STATUS_DRAFT).contains(contractManage.getApprovalStatus())) {
|
||||
throw new ServiceException("仅临时合同允许转正式合同");
|
||||
}
|
||||
validateFormal(contractManage);
|
||||
contractManage.setContractStage(STAGE_FORMAL);
|
||||
contractManage.setApprovalStatus(STATUS_REVIEWING);
|
||||
contractManage.setCurrentNode("正式合同审批");
|
||||
contractManage.setCurrentProcessor("待处理");
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean approve(Long id) {
|
||||
ContractManage contractManage = loadReviewing(id);
|
||||
contractManage.setApprovalStatus(STATUS_APPROVED);
|
||||
contractManage.setCurrentNode("审批通过");
|
||||
contractManage.setCurrentProcessor(AuthUtil.getUserName());
|
||||
contractManage.setApprovedTime(LocalDateTime.now());
|
||||
if (Objects.equals(contractManage.getContractStage(), STAGE_TEMPORARY) && contractManage.getTemporaryStartDate() == null) {
|
||||
contractManage.setTemporaryStartDate(LocalDate.now());
|
||||
}
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean reject(Long id) {
|
||||
ContractManage contractManage = loadReviewing(id);
|
||||
contractManage.setApprovalStatus(STATUS_REJECTED);
|
||||
contractManage.setCurrentNode("已驳回");
|
||||
contractManage.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean withdraw(Long id) {
|
||||
ContractManage contractManage = loadReviewing(id);
|
||||
contractManage.setApprovalStatus(STATUS_DRAFT);
|
||||
contractManage.setCurrentNode("已撤回");
|
||||
contractManage.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean startChange(Long id, String changeContent, String changeReason) {
|
||||
ContractManage contractManage = loadExists(id);
|
||||
if (!Objects.equals(contractManage.getApprovalStatus(), STATUS_APPROVED) || !Objects.equals(contractManage.getContractStage(), STAGE_FORMAL)) {
|
||||
throw new ServiceException("仅正式合同允许发起变更");
|
||||
}
|
||||
contractManage.setApprovalStatus(STATUS_CHANGE_REVIEWING);
|
||||
contractManage.setChangeContent(TransportBusinessSupport.trimToNull(changeContent));
|
||||
contractManage.setChangeReason(TransportBusinessSupport.trimToNull(changeReason));
|
||||
contractManage.setCurrentNode("合同变更审批");
|
||||
contractManage.setCurrentProcessor("待处理");
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean terminate(Long id, String reason) {
|
||||
ContractManage contractManage = loadExists(id);
|
||||
if (!Objects.equals(contractManage.getApprovalStatus(), STATUS_APPROVED) || !Objects.equals(contractManage.getContractStage(), STAGE_FORMAL)) {
|
||||
throw new ServiceException("仅正式合同允许终止");
|
||||
}
|
||||
contractManage.setContractStage(STAGE_TERMINATED);
|
||||
contractManage.setTerminateReason(TransportBusinessSupport.trimToNull(reason));
|
||||
contractManage.setCurrentNode("已终止");
|
||||
contractManage.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(contractManage);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean removeDraft(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
for (ContractManage contractManage : listByIds(idList)) {
|
||||
if (!Objects.equals(contractManage.getContractStage(), STAGE_DRAFT) || !Objects.equals(contractManage.getApprovalStatus(), STATUS_DRAFT)) {
|
||||
throw new ServiceException("仅草稿合同允许删除");
|
||||
}
|
||||
}
|
||||
return deleteLogic(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractManageVO copy(Long id) {
|
||||
ContractManage source = loadExists(id);
|
||||
ContractManage target = new ContractManage();
|
||||
BeanUtil.copyProperties(source, target);
|
||||
target.setId(null);
|
||||
target.setContractNo(null);
|
||||
target.setContractName(source.getContractName() + " - 副本");
|
||||
target.setContractStage(STAGE_DRAFT);
|
||||
target.setApprovalStatus(STATUS_DRAFT);
|
||||
target.setCurrentNode(null);
|
||||
target.setCurrentProcessor(null);
|
||||
target.setApprovedTime(null);
|
||||
target.setChangeContent(null);
|
||||
target.setChangeReason(null);
|
||||
target.setTerminateReason(null);
|
||||
saveDraft(target);
|
||||
return detail(target.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> expireStats(ContractManageVO contractManage) {
|
||||
List<ContractManage> contracts = list(buildQuery(contractManage));
|
||||
return contracts.stream()
|
||||
.filter(item -> item.getEndDate() != null)
|
||||
.collect(Collectors.groupingBy(item -> expireScope(item.getEndDate()), Collectors.counting()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContractManageExcel> exportContractManage(ContractManageVO contractManage, String ids) {
|
||||
LambdaQueryWrapper<ContractManage> queryWrapper = buildQuery(contractManage);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(ContractManage::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
ContractManageExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(record, ContractManageExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ContractManage> buildQuery(ContractManageVO contractManage) {
|
||||
TransportBusinessSupport.validateAllDept(contractManage.getAllDept(), "合同管理");
|
||||
LambdaQueryWrapper<ContractManage> queryWrapper = Wrappers.<ContractManage>lambdaQuery().eq(ContractManage::getIsDeleted, 0);
|
||||
if (!Objects.equals(contractManage.getAllDept(), 1)) {
|
||||
queryWrapper.eq(ContractManage::getOrganizationId, TransportBusinessSupport.currentDeptId("合同管理"));
|
||||
} else if (Func.isNotEmpty(contractManage.getOrganizationId())) {
|
||||
queryWrapper.eq(ContractManage::getOrganizationId, contractManage.getOrganizationId());
|
||||
}
|
||||
queryWrapper.like(Func.isNotEmpty(contractManage.getContractNo()), ContractManage::getContractNo, contractManage.getContractNo())
|
||||
.like(Func.isNotEmpty(contractManage.getContractName()), ContractManage::getContractName, contractManage.getContractName())
|
||||
.like(Func.isNotEmpty(contractManage.getProjectName()), ContractManage::getProjectName, contractManage.getProjectName())
|
||||
.like(Func.isNotEmpty(contractManage.getOrganizationName()), ContractManage::getOrganizationName, contractManage.getOrganizationName())
|
||||
.eq(Func.isNotEmpty(contractManage.getContractCategory()), ContractManage::getContractCategory, contractManage.getContractCategory())
|
||||
.eq(Func.isNotEmpty(contractManage.getSignType()), ContractManage::getSignType, contractManage.getSignType())
|
||||
.eq(Func.isNotEmpty(contractManage.getApprovalStatus()), ContractManage::getApprovalStatus, contractManage.getApprovalStatus())
|
||||
.eq(Func.isNotEmpty(contractManage.getContractStage()), ContractManage::getContractStage, contractManage.getContractStage())
|
||||
.orderByDesc(ContractManage::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepareCreateOrUpdate(ContractManage contractManage) {
|
||||
if (Func.isEmpty(contractManage.getId())) {
|
||||
if (Func.isEmpty(contractManage.getContractNo())) {
|
||||
contractManage.setContractNo("HT" + LocalDate.now().toString().replace("-", "") + String.format("%06d", count() + 1));
|
||||
}
|
||||
if (Func.isEmpty(contractManage.getOrganizationId())) {
|
||||
contractManage.setOrganizationId(TransportBusinessSupport.currentDeptId("合同管理"));
|
||||
contractManage.setOrganizationName(TransportBusinessSupport.currentDept("合同管理").getDeptName());
|
||||
}
|
||||
if (Func.isEmpty(contractManage.getHandlerUserId())) {
|
||||
contractManage.setHandlerUserId(AuthUtil.getUserId());
|
||||
contractManage.setHandlerUserName(AuthUtil.getUserName());
|
||||
}
|
||||
} else {
|
||||
ContractManage oldRecord = loadExists(contractManage.getId());
|
||||
contractManage.setContractNo(oldRecord.getContractNo());
|
||||
contractManage.setOrganizationId(oldRecord.getOrganizationId());
|
||||
contractManage.setOrganizationName(oldRecord.getOrganizationName());
|
||||
contractManage.setHandlerUserId(oldRecord.getHandlerUserId());
|
||||
contractManage.setHandlerUserName(oldRecord.getHandlerUserName());
|
||||
}
|
||||
if (Func.isEmpty(contractManage.getContractStage())) {
|
||||
contractManage.setContractStage(STAGE_DRAFT);
|
||||
}
|
||||
}
|
||||
|
||||
private void prepare(ContractManage contractManage) {
|
||||
contractManage.setContractName(TransportBusinessSupport.trimToNull(contractManage.getContractName()));
|
||||
contractManage.setProjectName(TransportBusinessSupport.trimToNull(contractManage.getProjectName()));
|
||||
contractManage.setOrganizationName(TransportBusinessSupport.trimToNull(contractManage.getOrganizationName()));
|
||||
contractManage.setContractCategory(TransportBusinessSupport.trimToNull(contractManage.getContractCategory()));
|
||||
contractManage.setSignType(TransportBusinessSupport.trimToNull(contractManage.getSignType()));
|
||||
contractManage.setPartyA(TransportBusinessSupport.trimToNull(contractManage.getPartyA()));
|
||||
contractManage.setPartyB(TransportBusinessSupport.trimToNull(contractManage.getPartyB()));
|
||||
contractManage.setSettlementMode(TransportBusinessSupport.trimToNull(contractManage.getSettlementMode()));
|
||||
contractManage.setContractFormat(TransportBusinessSupport.trimToNull(contractManage.getContractFormat()));
|
||||
contractManage.setRemark(TransportBusinessSupport.trimToNull(contractManage.getRemark()));
|
||||
contractManage.setContractFileJson(TransportBusinessSupport.trimToNull(contractManage.getContractFileJson()));
|
||||
contractManage.setAttachmentsJson(TransportBusinessSupport.trimToNull(contractManage.getAttachmentsJson()));
|
||||
contractManage.setBillingPlanJson(TransportBusinessSupport.trimToNull(contractManage.getBillingPlanJson()));
|
||||
contractManage.setSettlementRuleJson(TransportBusinessSupport.trimToNull(contractManage.getSettlementRuleJson()));
|
||||
contractManage.setReconciliationJson(TransportBusinessSupport.trimToNull(contractManage.getReconciliationJson()));
|
||||
}
|
||||
|
||||
private void validateDraft(ContractManage contractManage) {
|
||||
TransportBusinessSupport.validateRequired(contractManage.getContractName(), "请输入合同名称");
|
||||
TransportBusinessSupport.validateRequired(contractManage.getContractCategory(), "请选择合同类别");
|
||||
TransportBusinessSupport.validateLength(contractManage.getRemark(), 2000, "备注不能超过2000字");
|
||||
}
|
||||
|
||||
private void validateTemporary(ContractManage contractManage) {
|
||||
TransportBusinessSupport.validateRequired(contractManage.getSignType(), "请选择签约类型");
|
||||
}
|
||||
|
||||
private void validateFormal(ContractManage contractManage) {
|
||||
TransportBusinessSupport.validateRequired(contractManage.getPartyA(), "请输入甲方");
|
||||
TransportBusinessSupport.validateRequired(contractManage.getPartyB(), "请输入乙方");
|
||||
TransportBusinessSupport.validateRequired(contractManage.getStartDate() == null ? null : contractManage.getStartDate().toString(), "请选择合同期限");
|
||||
TransportBusinessSupport.validateRequired(contractManage.getSignDate() == null ? null : contractManage.getSignDate().toString(), "请选择签订日期");
|
||||
TransportBusinessSupport.validateDateRange(contractManage.getStartDate(), contractManage.getEndDate(), "合同期限开始日期不能晚于结束日期");
|
||||
TransportBusinessSupport.validateLength(contractManage.getRemark(), 2000, "备注不能超过2000字");
|
||||
}
|
||||
|
||||
private ContractManage loadExists(Long id) {
|
||||
ContractManage contractManage = getById(id);
|
||||
if (Func.isEmpty(contractManage) || Objects.equals(contractManage.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("合同不存在");
|
||||
}
|
||||
return contractManage;
|
||||
}
|
||||
|
||||
private ContractManage loadEditable(Long id) {
|
||||
ContractManage contractManage = loadExists(id);
|
||||
if (!Objects.equals(contractManage.getApprovalStatus(), STATUS_DRAFT)) {
|
||||
throw new ServiceException("当前状态不允许编辑");
|
||||
}
|
||||
TransportBusinessSupport.assertCurrentDept(contractManage.getOrganizationId(), "合同管理");
|
||||
return contractManage;
|
||||
}
|
||||
|
||||
private ContractManage loadReviewing(Long id) {
|
||||
ContractManage contractManage = loadExists(id);
|
||||
if (!Objects.equals(contractManage.getApprovalStatus(), STATUS_REVIEWING)) {
|
||||
throw new ServiceException("当前状态不允许操作");
|
||||
}
|
||||
return contractManage;
|
||||
}
|
||||
|
||||
private String expireScope(LocalDate endDate) {
|
||||
long days = java.time.temporal.ChronoUnit.DAYS.between(LocalDate.now(), endDate);
|
||||
if (days < 0) {
|
||||
return "已到期";
|
||||
}
|
||||
if (days <= 30) {
|
||||
return "30天内到期";
|
||||
}
|
||||
if (days <= 90) {
|
||||
return "90天内到期";
|
||||
}
|
||||
return "90天以上";
|
||||
}
|
||||
|
||||
private void fillReadonly(ContractManageVO contractManageVO) {
|
||||
contractManageVO.setReadonly(!Objects.equals(contractManageVO.getOrganizationId(), TransportBusinessSupport.currentDeptId("合同管理")));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,279 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.ProcessConfigExcel;
|
||||
import org.springblade.transport.mapper.ProcessConfigMapper;
|
||||
import org.springblade.transport.pojo.entity.ProcessConfig;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ProcessConfigVO;
|
||||
import org.springblade.transport.service.IProcessConfigService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.ProcessConfigWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 过程配置 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class ProcessConfigServiceImpl extends BaseServiceImpl<ProcessConfigMapper, ProcessConfig> implements IProcessConfigService {
|
||||
|
||||
@Override
|
||||
public IPage<ProcessConfigVO> selectProcessConfigPage(IPage<ProcessConfig> page, ProcessConfigVO processConfig) {
|
||||
IPage<ProcessConfig> entityPage = page(page, buildQuery(processConfig));
|
||||
return ProcessConfigWrapper.build().pageVO(entityPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessConfigVO detail(Long id) {
|
||||
return ProcessConfigWrapper.build().entityVO(loadEditable(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(ProcessConfig processConfig) {
|
||||
boolean created = Func.isEmpty(processConfig.getId());
|
||||
if (!created) {
|
||||
ProcessConfig oldRecord = loadEditable(processConfig.getId(), true);
|
||||
processConfig.setConfigCode(oldRecord.getConfigCode());
|
||||
processConfig.setDeptId(oldRecord.getDeptId());
|
||||
processConfig.setDeptName(oldRecord.getDeptName());
|
||||
}
|
||||
prepare(processConfig);
|
||||
if (created && Func.isEmpty(processConfig.getConfigCode())) {
|
||||
processConfig.setConfigCode(nextCode());
|
||||
}
|
||||
validate(processConfig);
|
||||
return saveOrUpdate(processConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO removeProcessConfig(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
List<Long> deleteIdList = new ArrayList<>();
|
||||
for (ProcessConfig processConfig : listByIds(idList)) {
|
||||
TransportBusinessSupport.assertCurrentDept(processConfig.getDeptId(), "过程配置");
|
||||
if (shouldSkipDelete(processConfig)) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(processConfig.getConfigCode());
|
||||
continue;
|
||||
}
|
||||
deleteIdList.add(processConfig.getId());
|
||||
}
|
||||
if (Func.isNotEmpty(deleteIdList)) {
|
||||
deleteLogic(deleteIdList);
|
||||
}
|
||||
result.setSuccessCount(deleteIdList.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProcessConfigExcel> exportProcessConfig(ProcessConfigVO processConfig, String ids) {
|
||||
LambdaQueryWrapper<ProcessConfig> queryWrapper = buildQuery(processConfig);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(ProcessConfig::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
ProcessConfigExcel excel = new ProcessConfigExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ProcessConfigVO copy(Long id) {
|
||||
ProcessConfig source = loadEditable(id, true);
|
||||
ProcessConfig target = new ProcessConfig();
|
||||
target.setConfigName(source.getConfigName());
|
||||
target.setProjectIds(source.getProjectIds());
|
||||
target.setProjectNames(source.getProjectNames());
|
||||
target.setIncludedNodes(source.getIncludedNodes());
|
||||
target.setDefaultFinishDays(source.getDefaultFinishDays());
|
||||
target.setNodeConfigJson(source.getNodeConfigJson());
|
||||
target.setRemark(source.getRemark());
|
||||
target.setConfigName(source.getConfigName() + " - 副本");
|
||||
target.setStatus(0);
|
||||
target.setConfigCode(nextCode());
|
||||
prepare(target);
|
||||
validate(target);
|
||||
save(target);
|
||||
return detail(target.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean enable(Long id) {
|
||||
ProcessConfig processConfig = loadEditable(id, true);
|
||||
validateEnableUnique(processConfig);
|
||||
processConfig.setStatus(1);
|
||||
return updateById(processConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean disable(Long id) {
|
||||
ProcessConfig processConfig = loadEditable(id, true);
|
||||
processConfig.setStatus(2);
|
||||
return updateById(processConfig);
|
||||
}
|
||||
|
||||
private void validateEnableUnique(ProcessConfig processConfig) {
|
||||
if (Func.isEmpty(processConfig.getProjectIds())) {
|
||||
return;
|
||||
}
|
||||
for (String projectId : processConfig.getProjectIds().split(",")) {
|
||||
String trimProjectId = projectId == null ? "" : projectId.trim();
|
||||
if (Func.isEmpty(trimProjectId)) {
|
||||
continue;
|
||||
}
|
||||
if (count(Wrappers.<ProcessConfig>lambdaQuery().eq(ProcessConfig::getStatus, 1).ne(ProcessConfig::getId, processConfig.getId()).eq(ProcessConfig::getIsDeleted, 0).like(ProcessConfig::getProjectIds, trimProjectId)) > 0) {
|
||||
throw new ServiceException("该项目已有关联的启用配置,请先停用原配置");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ProcessConfig> buildQuery(ProcessConfigVO processConfig) {
|
||||
TransportBusinessSupport.validateAllDept(processConfig.getAllDept(), "过程配置");
|
||||
LambdaQueryWrapper<ProcessConfig> queryWrapper = Wrappers.<ProcessConfig>lambdaQuery().eq(ProcessConfig::getIsDeleted, 0);
|
||||
if (!Objects.equals(processConfig.getAllDept(), 1)) {
|
||||
queryWrapper.eq(ProcessConfig::getDeptId, TransportBusinessSupport.currentDeptId("过程配置"));
|
||||
} else if (Func.isNotEmpty(processConfig.getDeptId())) {
|
||||
queryWrapper.eq(ProcessConfig::getDeptId, processConfig.getDeptId());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getConfigCode())) {
|
||||
queryWrapper.eq(ProcessConfig::getConfigCode, processConfig.getConfigCode());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getConfigName())) {
|
||||
queryWrapper.like(ProcessConfig::getConfigName, processConfig.getConfigName());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getProjectIds())) {
|
||||
queryWrapper.like(ProcessConfig::getProjectIds, processConfig.getProjectIds());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getProjectNames())) {
|
||||
queryWrapper.like(ProcessConfig::getProjectNames, processConfig.getProjectNames());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getIncludedNodes())) {
|
||||
queryWrapper.like(ProcessConfig::getIncludedNodes, processConfig.getIncludedNodes());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getRemark())) {
|
||||
queryWrapper.like(ProcessConfig::getRemark, processConfig.getRemark());
|
||||
}
|
||||
if (Func.isNotEmpty(processConfig.getStatus())) {
|
||||
queryWrapper.eq(ProcessConfig::getStatus, processConfig.getStatus());
|
||||
}
|
||||
queryWrapper.orderByDesc(ProcessConfig::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepare(ProcessConfig processConfig) {
|
||||
processConfig.setConfigCode(TransportBusinessSupport.trimToNull(processConfig.getConfigCode()));
|
||||
processConfig.setConfigName(TransportBusinessSupport.trimToNull(processConfig.getConfigName()));
|
||||
processConfig.setProjectIds(TransportBusinessSupport.trimToNull(processConfig.getProjectIds()));
|
||||
processConfig.setProjectNames(TransportBusinessSupport.trimToNull(processConfig.getProjectNames()));
|
||||
processConfig.setIncludedNodes(TransportBusinessSupport.trimToNull(processConfig.getIncludedNodes()));
|
||||
processConfig.setNodeConfigJson(TransportBusinessSupport.trimToNull(processConfig.getNodeConfigJson()));
|
||||
processConfig.setDeptName(TransportBusinessSupport.trimToNull(processConfig.getDeptName()));
|
||||
processConfig.setRemark(TransportBusinessSupport.trimToNull(processConfig.getRemark()));
|
||||
if (Func.isEmpty(processConfig.getDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("过程配置");
|
||||
processConfig.setDeptId(dept.getId());
|
||||
processConfig.setDeptName(dept.getDeptName());
|
||||
}
|
||||
if (processConfig.getStatus() == null) { processConfig.setStatus(0); }
|
||||
}
|
||||
|
||||
private void validate(ProcessConfig processConfig) {
|
||||
TransportBusinessSupport.validateRequired(processConfig.getConfigName(), "配置名称不能为空");
|
||||
TransportBusinessSupport.validateRequired(processConfig.getProjectNames(), "项目不能为空");
|
||||
TransportBusinessSupport.validateLength(processConfig.getConfigCode(), 255, "配置编号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getConfigName(), 255, "配置名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getProjectIds(), 255, "项目ID集合不能超过255字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getProjectNames(), 255, "项目不能超过255字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getIncludedNodes(), 255, "包含过程节点不能超过255字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getNodeConfigJson(), 8000, "过程节点配置不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getDeptName(), 255, "所属组织不能超过255字");
|
||||
TransportBusinessSupport.validateLength(processConfig.getRemark(), 500, "备注不能超过500字");
|
||||
if (processConfig.getDefaultFinishDays() != null && (processConfig.getDefaultFinishDays() <= 0 || processConfig.getDefaultFinishDays() > 999)) { throw new ServiceException("请输入正整数"); }
|
||||
if (count(Wrappers.<ProcessConfig>lambdaQuery().eq(ProcessConfig::getDeptId, processConfig.getDeptId()).eq(ProcessConfig::getConfigName, processConfig.getConfigName()).ne(Func.isNotEmpty(processConfig.getId()), ProcessConfig::getId, processConfig.getId()).eq(ProcessConfig::getIsDeleted, 0)) > 0) { throw new ServiceException("配置名称已存在"); }
|
||||
}
|
||||
|
||||
private ProcessConfig loadEditable(Long id, boolean checkDept) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
ProcessConfig processConfig = getById(id);
|
||||
if (Func.isEmpty(processConfig) || Objects.equals(processConfig.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("过程配置不存在");
|
||||
}
|
||||
if (checkDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(processConfig.getDeptId(), "过程配置");
|
||||
}
|
||||
return processConfig;
|
||||
}
|
||||
|
||||
private boolean shouldSkipDelete(ProcessConfig processConfig) {
|
||||
return Objects.equals(processConfig.getStatus(), 1);
|
||||
}
|
||||
|
||||
private synchronized String nextCode() {
|
||||
String prefix = "GC";
|
||||
List<ProcessConfig> latestList = list(Wrappers.<ProcessConfig>lambdaQuery()
|
||||
.select(ProcessConfig::getConfigCode)
|
||||
.likeRight(ProcessConfig::getConfigCode, prefix)
|
||||
.orderByDesc(ProcessConfig::getConfigCode)
|
||||
.last("LIMIT 1"));
|
||||
int next = 1;
|
||||
if (Func.isNotEmpty(latestList) && Func.isNotEmpty(latestList.get(0).getConfigCode())) {
|
||||
String serial = latestList.get(0).getConfigCode().substring(prefix.length());
|
||||
if (serial.chars().allMatch(Character::isDigit)) {
|
||||
next = Integer.parseInt(serial) + 1;
|
||||
}
|
||||
}
|
||||
return prefix + String.format("%05d", next);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,434 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
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.secure.utils.AuthUtil;
|
||||
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.Dept;
|
||||
import org.springblade.transport.excel.ProjectApplyExcel;
|
||||
import org.springblade.transport.mapper.ProjectApplyMapper;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
import org.springblade.transport.pojo.vo.ProjectApplyVO;
|
||||
import org.springblade.transport.service.IProjectApplyService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.ProjectApplyWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 项目立项 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper, ProjectApply> implements IProjectApplyService {
|
||||
|
||||
private static final String STATUS_DRAFT = "draft";
|
||||
private static final String STATUS_REVIEWING = "reviewing";
|
||||
private static final String STATUS_WITHDRAWN = "withdrawn";
|
||||
private static final String STATUS_APPROVED = "approved";
|
||||
private static final String STATUS_REJECTED = "rejected";
|
||||
private static final String STATUS_CHANGE_REVIEWING = "change_reviewing";
|
||||
private static final String STATUS_VOIDED = "voided";
|
||||
private static final String EFFECTIVE_TEMPORARY = "temporary";
|
||||
private static final String EFFECTIVE_FORMAL = "formal";
|
||||
private static final DateTimeFormatter CODE_DATE = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
private static final DateTimeFormatter PROJECT_YEAR = DateTimeFormatter.ofPattern("yyyy");
|
||||
|
||||
@Override
|
||||
public IPage<ProjectApplyVO> selectProjectApplyPage(IPage<ProjectApply> page, ProjectApplyVO projectApply) {
|
||||
IPage<ProjectApply> entityPage = page(page, buildQuery(projectApply));
|
||||
IPage<ProjectApplyVO> voPage = ProjectApplyWrapper.build().pageVO(entityPage);
|
||||
voPage.getRecords().forEach(this::fillReadonly);
|
||||
return voPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectApplyVO detail(Long id) {
|
||||
ProjectApplyVO projectApplyVO = ProjectApplyWrapper.build().entityVO(loadExists(id));
|
||||
fillReadonly(projectApplyVO);
|
||||
return projectApplyVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean saveDraft(ProjectApply projectApply) {
|
||||
prepare(projectApply);
|
||||
validateDraft(projectApply);
|
||||
if (Func.isNotEmpty(projectApply.getId())) {
|
||||
loadEditable(projectApply.getId(), true);
|
||||
}
|
||||
prepareCreateOrUpdate(projectApply);
|
||||
projectApply.setApprovalStatus(resolveEditableStatus(projectApply));
|
||||
return saveOrUpdate(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(ProjectApply projectApply) {
|
||||
prepare(projectApply);
|
||||
validateSubmit(projectApply);
|
||||
if (Func.isNotEmpty(projectApply.getId())) {
|
||||
loadEditable(projectApply.getId(), true);
|
||||
}
|
||||
prepareCreateOrUpdate(projectApply);
|
||||
if (Func.isEmpty(projectApply.getApprovalStatus())) {
|
||||
projectApply.setApprovalStatus(STATUS_DRAFT);
|
||||
}
|
||||
return saveOrUpdate(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submitApproval(Long id) {
|
||||
ProjectApply projectApply = loadEditable(id, true);
|
||||
validateSubmit(projectApply);
|
||||
projectApply.setApprovalStatus(STATUS_REVIEWING);
|
||||
projectApply.setCurrentNode(resolveApprovalNode(projectApply));
|
||||
projectApply.setCurrentProcessor("待处理");
|
||||
return updateById(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean approve(Long id) {
|
||||
ProjectApply projectApply = loadExists(id);
|
||||
if (!List.of(STATUS_REVIEWING, STATUS_CHANGE_REVIEWING).contains(projectApply.getApprovalStatus())) {
|
||||
throw new ServiceException("当前状态不允许审批通过");
|
||||
}
|
||||
projectApply.setApprovalStatus(STATUS_CHANGE_REVIEWING.equals(projectApply.getApprovalStatus()) ? "change_approved" : STATUS_APPROVED);
|
||||
projectApply.setEffectiveType(EFFECTIVE_FORMAL);
|
||||
projectApply.setCurrentNode("审批通过");
|
||||
projectApply.setCurrentProcessor(AuthUtil.getUserName());
|
||||
projectApply.setApprovedTime(LocalDateTime.now());
|
||||
return updateById(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean reject(Long id) {
|
||||
ProjectApply projectApply = loadExists(id);
|
||||
if (!List.of(STATUS_REVIEWING, STATUS_CHANGE_REVIEWING).contains(projectApply.getApprovalStatus())) {
|
||||
throw new ServiceException("当前状态不允许驳回");
|
||||
}
|
||||
projectApply.setApprovalStatus(STATUS_CHANGE_REVIEWING.equals(projectApply.getApprovalStatus()) ? "change_rejected" : STATUS_REJECTED);
|
||||
projectApply.setCurrentNode("已驳回");
|
||||
projectApply.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean withdraw(Long id) {
|
||||
ProjectApply projectApply = loadExists(id);
|
||||
if (!Objects.equals(projectApply.getApprovalStatus(), STATUS_REVIEWING)) {
|
||||
throw new ServiceException("仅审批中项目允许撤回");
|
||||
}
|
||||
projectApply.setApprovalStatus(STATUS_WITHDRAWN);
|
||||
projectApply.setCurrentNode("已撤回");
|
||||
projectApply.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean voidProject(Long id, String reason) {
|
||||
ProjectApply projectApply = loadExists(id);
|
||||
if (!Objects.equals(projectApply.getApprovalStatus(), STATUS_APPROVED)) {
|
||||
throw new ServiceException("仅审批通过项目允许作废");
|
||||
}
|
||||
projectApply.setApprovalStatus(STATUS_VOIDED);
|
||||
projectApply.setVoidReason(TransportBusinessSupport.trimToNull(reason));
|
||||
projectApply.setCurrentNode("已作废");
|
||||
projectApply.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean startChange(Long id, String changeContent, String changeReason) {
|
||||
ProjectApply projectApply = loadExists(id);
|
||||
if (!Objects.equals(projectApply.getApprovalStatus(), STATUS_APPROVED) || !Objects.equals(projectApply.getEffectiveType(), EFFECTIVE_FORMAL)) {
|
||||
throw new ServiceException("仅正式生效且审批通过的项目允许发起变更");
|
||||
}
|
||||
TransportBusinessSupport.validateRequired(changeContent, "请输入变更内容");
|
||||
TransportBusinessSupport.validateRequired(changeReason, "请输入变更原因");
|
||||
projectApply.setApprovalStatus(STATUS_CHANGE_REVIEWING);
|
||||
projectApply.setChangeContent(TransportBusinessSupport.trimToNull(changeContent));
|
||||
projectApply.setChangeReason(TransportBusinessSupport.trimToNull(changeReason));
|
||||
projectApply.setCurrentNode("项目变更审批");
|
||||
projectApply.setCurrentProcessor("待处理");
|
||||
return updateById(projectApply);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean removeDraft(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
for (ProjectApply projectApply : listByIds(idList)) {
|
||||
if (!List.of(STATUS_DRAFT, STATUS_WITHDRAWN, STATUS_REJECTED).contains(projectApply.getApprovalStatus())) {
|
||||
throw new ServiceException("仅草稿、已撤回、已驳回项目允许删除");
|
||||
}
|
||||
}
|
||||
return deleteLogic(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectApplyExcel> exportProjectApply(ProjectApplyVO projectApply, String ids) {
|
||||
LambdaQueryWrapper<ProjectApply> queryWrapper = buildQuery(projectApply);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(ProjectApply::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
ProjectApplyExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(record, ProjectApplyExcel.class));
|
||||
excel.setFundLimit(scale(record.getFundLimit()));
|
||||
excel.setReceivableLimit(scale(record.getReceivableLimit()));
|
||||
excel.setProjectScale(scale(record.getProjectScale()));
|
||||
excel.setEstimatedProfit(scale(record.getEstimatedProfit()));
|
||||
excel.setFundDemand(scale(record.getFundDemand()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ProjectApply> buildQuery(ProjectApplyVO projectApply) {
|
||||
TransportBusinessSupport.validateAllDept(projectApply.getAllDept(), "项目立项");
|
||||
LambdaQueryWrapper<ProjectApply> queryWrapper = Wrappers.<ProjectApply>lambdaQuery().eq(ProjectApply::getIsDeleted, 0);
|
||||
if (!Objects.equals(projectApply.getAllDept(), 1)) {
|
||||
queryWrapper.eq(ProjectApply::getUndertakeDeptId, TransportBusinessSupport.currentDeptId("项目立项"));
|
||||
} else if (Func.isNotEmpty(projectApply.getUndertakeDeptId())) {
|
||||
queryWrapper.eq(ProjectApply::getUndertakeDeptId, projectApply.getUndertakeDeptId());
|
||||
}
|
||||
queryWrapper.like(Func.isNotEmpty(projectApply.getApplyNo()), ProjectApply::getApplyNo, projectApply.getApplyNo())
|
||||
.like(Func.isNotEmpty(projectApply.getProjectName()), ProjectApply::getProjectName, projectApply.getProjectName())
|
||||
.like(Func.isNotEmpty(projectApply.getUndertakeDeptName()), ProjectApply::getUndertakeDeptName, projectApply.getUndertakeDeptName())
|
||||
.like(Func.isNotEmpty(projectApply.getPrincipalUserName()), ProjectApply::getPrincipalUserName, projectApply.getPrincipalUserName())
|
||||
.eq(Func.isNotEmpty(projectApply.getProjectType()), ProjectApply::getProjectType, projectApply.getProjectType())
|
||||
.eq(Func.isNotEmpty(projectApply.getApprovalStatus()), ProjectApply::getApprovalStatus, projectApply.getApprovalStatus())
|
||||
.eq(Func.isNotEmpty(projectApply.getEffectiveType()), ProjectApply::getEffectiveType, projectApply.getEffectiveType())
|
||||
.orderByDesc(ProjectApply::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepareCreateOrUpdate(ProjectApply projectApply) {
|
||||
if (Func.isEmpty(projectApply.getId())) {
|
||||
if (Func.isEmpty(projectApply.getApplyNo())) {
|
||||
projectApply.setApplyNo(nextApplyNo());
|
||||
}
|
||||
if (Func.isEmpty(projectApply.getProjectCode())) {
|
||||
projectApply.setProjectCode(nextProjectCode());
|
||||
}
|
||||
if (Func.isEmpty(projectApply.getUndertakeDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("项目立项");
|
||||
projectApply.setUndertakeDeptId(dept.getId());
|
||||
projectApply.setUndertakeDeptName(dept.getDeptName());
|
||||
}
|
||||
if (Func.isEmpty(projectApply.getBusinessDeptId())) {
|
||||
projectApply.setBusinessDeptId(projectApply.getUndertakeDeptId());
|
||||
projectApply.setBusinessDeptName(projectApply.getUndertakeDeptName());
|
||||
}
|
||||
if (Func.isEmpty(projectApply.getHandlerUserId())) {
|
||||
projectApply.setHandlerUserId(AuthUtil.getUserId());
|
||||
projectApply.setHandlerUserName(AuthUtil.getUserName());
|
||||
}
|
||||
if (Func.isEmpty(projectApply.getPrincipalUserId())) {
|
||||
projectApply.setPrincipalUserId(AuthUtil.getUserId());
|
||||
projectApply.setPrincipalUserName(AuthUtil.getUserName());
|
||||
}
|
||||
} else {
|
||||
ProjectApply oldRecord = loadEditable(projectApply.getId(), true);
|
||||
projectApply.setApplyNo(oldRecord.getApplyNo());
|
||||
projectApply.setProjectCode(oldRecord.getProjectCode());
|
||||
projectApply.setUndertakeDeptId(oldRecord.getUndertakeDeptId());
|
||||
projectApply.setUndertakeDeptName(oldRecord.getUndertakeDeptName());
|
||||
}
|
||||
if (Func.isEmpty(projectApply.getEffectiveType())) {
|
||||
projectApply.setEffectiveType(EFFECTIVE_TEMPORARY);
|
||||
}
|
||||
}
|
||||
|
||||
private void prepare(ProjectApply projectApply) {
|
||||
projectApply.setProjectType(TransportBusinessSupport.trimToNull(projectApply.getProjectType()));
|
||||
projectApply.setProjectName(TransportBusinessSupport.trimToNull(projectApply.getProjectName()));
|
||||
projectApply.setProjectShortName(TransportBusinessSupport.trimToNull(projectApply.getProjectShortName()));
|
||||
projectApply.setBusinessDeptName(TransportBusinessSupport.trimToNull(projectApply.getBusinessDeptName()));
|
||||
projectApply.setUndertakeDeptName(TransportBusinessSupport.trimToNull(projectApply.getUndertakeDeptName()));
|
||||
projectApply.setProjectSource(TransportBusinessSupport.trimToNull(projectApply.getProjectSource()));
|
||||
projectApply.setSourceRemark(TransportBusinessSupport.trimToNull(projectApply.getSourceRemark()));
|
||||
projectApply.setCargoType(TransportBusinessSupport.trimToNull(projectApply.getCargoType()));
|
||||
projectApply.setCargoQuantity(TransportBusinessSupport.trimToNull(projectApply.getCargoQuantity()));
|
||||
projectApply.setTransportRoute(TransportBusinessSupport.trimToNull(projectApply.getTransportRoute()));
|
||||
projectApply.setTransportType(TransportBusinessSupport.trimToNull(projectApply.getTransportType()));
|
||||
projectApply.setBusinessType(TransportBusinessSupport.trimToNull(projectApply.getBusinessType()));
|
||||
projectApply.setSettlementMode(TransportBusinessSupport.trimToNull(projectApply.getSettlementMode()));
|
||||
projectApply.setHandlerUserName(TransportBusinessSupport.trimToNull(projectApply.getHandlerUserName()));
|
||||
projectApply.setPrincipalUserName(TransportBusinessSupport.trimToNull(projectApply.getPrincipalUserName()));
|
||||
projectApply.setCustomerNames(TransportBusinessSupport.trimToNull(projectApply.getCustomerNames()));
|
||||
projectApply.setCarrierNames(TransportBusinessSupport.trimToNull(projectApply.getCarrierNames()));
|
||||
projectApply.setSituationRemark(TransportBusinessSupport.trimToNull(projectApply.getSituationRemark()));
|
||||
}
|
||||
|
||||
private void validateDraft(ProjectApply projectApply) {
|
||||
TransportBusinessSupport.validateRequired(projectApply.getProjectType(), "请选择项目类型");
|
||||
TransportBusinessSupport.validateRequired(projectApply.getProjectName(), "请输入项目名称");
|
||||
validateUniqueName(projectApply);
|
||||
validateLength(projectApply);
|
||||
}
|
||||
|
||||
private void validateSubmit(ProjectApply projectApply) {
|
||||
validateDraft(projectApply);
|
||||
TransportBusinessSupport.validateRequired(projectApply.getProjectShortName(), "请输入项目简称");
|
||||
TransportBusinessSupport.validateRequired(projectApply.getBusinessDeptName(), "请选择业务部门");
|
||||
TransportBusinessSupport.validateRequired(projectApply.getUndertakeDeptName(), "请选择承办部门");
|
||||
TransportBusinessSupport.validateRequired(projectApply.getCustomerNames(), "请选择客户");
|
||||
TransportBusinessSupport.validateRequired(projectApply.getCarrierNames(), "请选择下游承运商");
|
||||
validateAmount(projectApply.getFundLimit(), "项目资金使用额度", false);
|
||||
validateAmount(projectApply.getReceivableLimit(), "项目应收账款额度", false);
|
||||
if (projectApply.getReceivableLimit() != null && projectApply.getFundLimit() != null && projectApply.getReceivableLimit().compareTo(projectApply.getFundLimit()) > 0) {
|
||||
throw new ServiceException("项目应收账款额度不能超过项目资金使用额度");
|
||||
}
|
||||
validateDays(projectApply.getReceivableDays(), "应收账款回款期限");
|
||||
validateDays(projectApply.getPaymentDays(), "回款账期");
|
||||
validateAmount(projectApply.getProjectScale(), "项目规模", true);
|
||||
validateAmount(projectApply.getEstimatedProfit(), "预计利润", true);
|
||||
validateAmount(projectApply.getFundDemand(), "资金需求", true);
|
||||
TransportBusinessSupport.validateDateRange(projectApply.getBusinessStartDate(), projectApply.getBusinessEndDate(), "业务周期开始日期不能晚于结束日期");
|
||||
if (Func.isEmpty(projectApply.getHandlerUserId()) || Func.isEmpty(projectApply.getPrincipalUserId())) {
|
||||
throw new ServiceException("项目经办人和项目负责人不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateUniqueName(ProjectApply projectApply) {
|
||||
Long count = count(Wrappers.<ProjectApply>lambdaQuery()
|
||||
.eq(ProjectApply::getIsDeleted, 0)
|
||||
.eq(ProjectApply::getProjectName, projectApply.getProjectName())
|
||||
.ne(Func.isNotEmpty(projectApply.getId()), ProjectApply::getId, projectApply.getId()));
|
||||
if (count > 0) {
|
||||
throw new ServiceException("项目名称已存在");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateLength(ProjectApply projectApply) {
|
||||
TransportBusinessSupport.validateLength(projectApply.getProjectName(), 50, "项目名称不能超过50个字");
|
||||
TransportBusinessSupport.validateLength(projectApply.getProjectShortName(), 20, "项目简称不能超过20个字");
|
||||
TransportBusinessSupport.validateLength(projectApply.getSourceRemark(), 300, "项目由来说明不能超过300个字");
|
||||
TransportBusinessSupport.validateLength(projectApply.getCargoQuantity(), 100, "预估货物数量不能超过100个字");
|
||||
TransportBusinessSupport.validateLength(projectApply.getTransportRoute(), 100, "运输线路不能超过100个字");
|
||||
}
|
||||
|
||||
private void validateAmount(BigDecimal value, String label, boolean nullable) {
|
||||
if (!nullable && value == null) {
|
||||
throw new ServiceException(label + "不能为空");
|
||||
}
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
if (value.compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException(label + "不能小于0");
|
||||
}
|
||||
if (value.scale() > 2) {
|
||||
throw new ServiceException(label + "最多保留2位小数");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateDays(Integer value, String label) {
|
||||
if (value == null) {
|
||||
throw new ServiceException(label + "不能为空");
|
||||
}
|
||||
if (value < 0 || value > 999) {
|
||||
throw new ServiceException(label + "范围为0到999天");
|
||||
}
|
||||
}
|
||||
|
||||
private ProjectApply loadExists(Long id) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
ProjectApply projectApply = getById(id);
|
||||
if (Func.isEmpty(projectApply) || Objects.equals(projectApply.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("项目立项不存在");
|
||||
}
|
||||
return projectApply;
|
||||
}
|
||||
|
||||
private ProjectApply loadEditable(Long id, boolean assertDept) {
|
||||
ProjectApply projectApply = loadExists(id);
|
||||
if (assertDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(projectApply.getUndertakeDeptId(), "项目立项");
|
||||
}
|
||||
if (!List.of(STATUS_DRAFT, STATUS_WITHDRAWN, STATUS_REJECTED, "change_rejected").contains(projectApply.getApprovalStatus())) {
|
||||
throw new ServiceException("当前状态不允许编辑");
|
||||
}
|
||||
return projectApply;
|
||||
}
|
||||
|
||||
private String resolveEditableStatus(ProjectApply projectApply) {
|
||||
if (Func.isEmpty(projectApply.getApprovalStatus())) {
|
||||
return STATUS_DRAFT;
|
||||
}
|
||||
return List.of(STATUS_WITHDRAWN, STATUS_REJECTED, "change_rejected").contains(projectApply.getApprovalStatus()) ? projectApply.getApprovalStatus() : STATUS_DRAFT;
|
||||
}
|
||||
|
||||
private String resolveApprovalNode(ProjectApply projectApply) {
|
||||
if ("重大项目".equals(projectApply.getProjectType()) && projectApply.getFundLimit() != null && projectApply.getFundLimit().compareTo(new BigDecimal("8000")) > 0) {
|
||||
return "物流领导审批";
|
||||
}
|
||||
return "项目立项审批";
|
||||
}
|
||||
|
||||
private String nextApplyNo() {
|
||||
return "LXAP" + LocalDate.now().format(CODE_DATE) + String.format("%06d", count() + 1);
|
||||
}
|
||||
|
||||
private String nextProjectCode() {
|
||||
return "LX-" + LocalDate.now().format(PROJECT_YEAR) + "-" + String.format("%06d", count() + 1);
|
||||
}
|
||||
|
||||
private BigDecimal scale(BigDecimal value) {
|
||||
return value == null ? null : value.setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
private void fillReadonly(ProjectApplyVO projectApplyVO) {
|
||||
projectApplyVO.setReadonly(!Objects.equals(projectApplyVO.getUndertakeDeptId(), TransportBusinessSupport.currentDeptId("项目立项")));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.ShippingTemplateExcel;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import org.springblade.transport.mapper.ShippingTemplateMapper;
|
||||
import org.springblade.transport.pojo.entity.ShippingTemplate;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ShippingTemplateVO;
|
||||
import org.springblade.transport.service.IShippingTemplateService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.ShippingTemplateWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发货模板 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class ShippingTemplateServiceImpl extends BaseServiceImpl<ShippingTemplateMapper, ShippingTemplate> implements IShippingTemplateService {
|
||||
|
||||
@Override
|
||||
public IPage<ShippingTemplateVO> selectShippingTemplatePage(IPage<ShippingTemplate> page, ShippingTemplateVO shippingTemplate) {
|
||||
IPage<ShippingTemplate> entityPage = page(page, buildQuery(shippingTemplate));
|
||||
return ShippingTemplateWrapper.build().pageVO(entityPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShippingTemplateVO detail(Long id) {
|
||||
return ShippingTemplateWrapper.build().entityVO(loadEditable(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(ShippingTemplate shippingTemplate) {
|
||||
boolean created = Func.isEmpty(shippingTemplate.getId());
|
||||
if (!created) {
|
||||
ShippingTemplate oldRecord = loadEditable(shippingTemplate.getId(), true);
|
||||
shippingTemplate.setTemplateCode(oldRecord.getTemplateCode());
|
||||
shippingTemplate.setDeptId(oldRecord.getDeptId());
|
||||
shippingTemplate.setDeptName(oldRecord.getDeptName());
|
||||
}
|
||||
prepare(shippingTemplate);
|
||||
if (created && Func.isEmpty(shippingTemplate.getTemplateCode())) {
|
||||
shippingTemplate.setTemplateCode(nextCode());
|
||||
}
|
||||
validate(shippingTemplate);
|
||||
return saveOrUpdate(shippingTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO removeShippingTemplate(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
List<Long> deleteIdList = new ArrayList<>();
|
||||
for (ShippingTemplate shippingTemplate : listByIds(idList)) {
|
||||
TransportBusinessSupport.assertCurrentDept(shippingTemplate.getDeptId(), "发货模板");
|
||||
if (shouldSkipDelete(shippingTemplate)) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(shippingTemplate.getTemplateCode());
|
||||
continue;
|
||||
}
|
||||
deleteIdList.add(shippingTemplate.getId());
|
||||
}
|
||||
if (Func.isNotEmpty(deleteIdList)) {
|
||||
deleteLogic(deleteIdList);
|
||||
}
|
||||
result.setSuccessCount(deleteIdList.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShippingTemplateExcel> exportShippingTemplate(ShippingTemplateVO shippingTemplate, String ids) {
|
||||
LambdaQueryWrapper<ShippingTemplate> queryWrapper = buildQuery(shippingTemplate);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(ShippingTemplate::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
ShippingTemplateExcel excel = new ShippingTemplateExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ShippingTemplateVO copy(Long id) {
|
||||
ShippingTemplate source = loadEditable(id, true);
|
||||
ShippingTemplate target = new ShippingTemplate();
|
||||
target.setTemplateName(source.getTemplateName());
|
||||
target.setTemplateType(source.getTemplateType());
|
||||
target.setProjectId(source.getProjectId());
|
||||
target.setProjectName(source.getProjectName());
|
||||
target.setContractId(source.getContractId());
|
||||
target.setContractName(source.getContractName());
|
||||
target.setTransportType(source.getTransportType());
|
||||
target.setDepartureAddressId(source.getDepartureAddressId());
|
||||
target.setDepartureName(source.getDepartureName());
|
||||
target.setDepartureAddress(source.getDepartureAddress());
|
||||
target.setDepartureContact(source.getDepartureContact());
|
||||
target.setDeparturePhone(source.getDeparturePhone());
|
||||
target.setArrivalAddressId(source.getArrivalAddressId());
|
||||
target.setArrivalName(source.getArrivalName());
|
||||
target.setArrivalAddress(source.getArrivalAddress());
|
||||
target.setArrivalContact(source.getArrivalContact());
|
||||
target.setArrivalPhone(source.getArrivalPhone());
|
||||
target.setGoodsJson(source.getGoodsJson());
|
||||
target.setFreightJson(source.getFreightJson());
|
||||
target.setAttachmentsJson(source.getAttachmentsJson());
|
||||
target.setRemark(source.getRemark());
|
||||
target.setTemplateName(source.getTemplateName() + " - 副本");
|
||||
target.setTemplateCode(nextCode());
|
||||
prepare(target);
|
||||
validate(target);
|
||||
save(target);
|
||||
return detail(target.getId());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ShippingTemplate> buildQuery(ShippingTemplateVO shippingTemplate) {
|
||||
TransportBusinessSupport.validateAllDept(shippingTemplate.getAllDept(), "发货模板");
|
||||
LambdaQueryWrapper<ShippingTemplate> queryWrapper = Wrappers.<ShippingTemplate>lambdaQuery().eq(ShippingTemplate::getIsDeleted, 0);
|
||||
if (!Objects.equals(shippingTemplate.getAllDept(), 1)) {
|
||||
queryWrapper.eq(ShippingTemplate::getDeptId, TransportBusinessSupport.currentDeptId("发货模板"));
|
||||
} else if (Func.isNotEmpty(shippingTemplate.getDeptId())) {
|
||||
queryWrapper.eq(ShippingTemplate::getDeptId, shippingTemplate.getDeptId());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getTemplateCode())) {
|
||||
queryWrapper.eq(ShippingTemplate::getTemplateCode, shippingTemplate.getTemplateCode());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getTemplateName())) {
|
||||
queryWrapper.like(ShippingTemplate::getTemplateName, shippingTemplate.getTemplateName());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getTemplateType())) {
|
||||
queryWrapper.eq(ShippingTemplate::getTemplateType, shippingTemplate.getTemplateType());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getProjectName())) {
|
||||
queryWrapper.like(ShippingTemplate::getProjectName, shippingTemplate.getProjectName());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getContractName())) {
|
||||
queryWrapper.like(ShippingTemplate::getContractName, shippingTemplate.getContractName());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getTransportType())) {
|
||||
queryWrapper.eq(ShippingTemplate::getTransportType, shippingTemplate.getTransportType());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getDepartureName())) {
|
||||
queryWrapper.like(ShippingTemplate::getDepartureName, shippingTemplate.getDepartureName());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getDepartureAddress())) {
|
||||
queryWrapper.like(ShippingTemplate::getDepartureAddress, shippingTemplate.getDepartureAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getDepartureContact())) {
|
||||
queryWrapper.like(ShippingTemplate::getDepartureContact, shippingTemplate.getDepartureContact());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getDeparturePhone())) {
|
||||
queryWrapper.like(ShippingTemplate::getDeparturePhone, shippingTemplate.getDeparturePhone());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getArrivalName())) {
|
||||
queryWrapper.like(ShippingTemplate::getArrivalName, shippingTemplate.getArrivalName());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getArrivalAddress())) {
|
||||
queryWrapper.like(ShippingTemplate::getArrivalAddress, shippingTemplate.getArrivalAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getArrivalContact())) {
|
||||
queryWrapper.like(ShippingTemplate::getArrivalContact, shippingTemplate.getArrivalContact());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getArrivalPhone())) {
|
||||
queryWrapper.like(ShippingTemplate::getArrivalPhone, shippingTemplate.getArrivalPhone());
|
||||
}
|
||||
if (Func.isNotEmpty(shippingTemplate.getRemark())) {
|
||||
queryWrapper.like(ShippingTemplate::getRemark, shippingTemplate.getRemark());
|
||||
}
|
||||
queryWrapper.orderByDesc(ShippingTemplate::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepare(ShippingTemplate shippingTemplate) {
|
||||
shippingTemplate.setTemplateCode(TransportBusinessSupport.trimToNull(shippingTemplate.getTemplateCode()));
|
||||
shippingTemplate.setTemplateName(TransportBusinessSupport.trimToNull(shippingTemplate.getTemplateName()));
|
||||
shippingTemplate.setTemplateType(TransportBusinessSupport.trimToNull(shippingTemplate.getTemplateType()));
|
||||
shippingTemplate.setProjectName(TransportBusinessSupport.trimToNull(shippingTemplate.getProjectName()));
|
||||
shippingTemplate.setContractName(TransportBusinessSupport.trimToNull(shippingTemplate.getContractName()));
|
||||
shippingTemplate.setTransportType(TransportBusinessSupport.trimToNull(shippingTemplate.getTransportType()));
|
||||
shippingTemplate.setDepartureName(TransportBusinessSupport.trimToNull(shippingTemplate.getDepartureName()));
|
||||
shippingTemplate.setDepartureAddress(TransportBusinessSupport.trimToNull(shippingTemplate.getDepartureAddress()));
|
||||
shippingTemplate.setDepartureContact(TransportBusinessSupport.trimToNull(shippingTemplate.getDepartureContact()));
|
||||
shippingTemplate.setDeparturePhone(TransportBusinessSupport.trimToNull(shippingTemplate.getDeparturePhone()));
|
||||
shippingTemplate.setArrivalName(TransportBusinessSupport.trimToNull(shippingTemplate.getArrivalName()));
|
||||
shippingTemplate.setArrivalAddress(TransportBusinessSupport.trimToNull(shippingTemplate.getArrivalAddress()));
|
||||
shippingTemplate.setArrivalContact(TransportBusinessSupport.trimToNull(shippingTemplate.getArrivalContact()));
|
||||
shippingTemplate.setArrivalPhone(TransportBusinessSupport.trimToNull(shippingTemplate.getArrivalPhone()));
|
||||
shippingTemplate.setGoodsJson(TransportBusinessSupport.trimToNull(shippingTemplate.getGoodsJson()));
|
||||
shippingTemplate.setFreightJson(TransportBusinessSupport.trimToNull(shippingTemplate.getFreightJson()));
|
||||
shippingTemplate.setAttachmentsJson(TransportBusinessSupport.trimToNull(shippingTemplate.getAttachmentsJson()));
|
||||
shippingTemplate.setDeptName(TransportBusinessSupport.trimToNull(shippingTemplate.getDeptName()));
|
||||
shippingTemplate.setRemark(TransportBusinessSupport.trimToNull(shippingTemplate.getRemark()));
|
||||
if (Func.isEmpty(shippingTemplate.getDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("发货模板");
|
||||
shippingTemplate.setDeptId(dept.getId());
|
||||
shippingTemplate.setDeptName(dept.getDeptName());
|
||||
}
|
||||
if (shippingTemplate.getStatus() == null) { shippingTemplate.setStatus(1); }
|
||||
}
|
||||
|
||||
private void validate(ShippingTemplate shippingTemplate) {
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getTemplateName(), "模板名称不能为空");
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getTemplateType(), "模板类型不能为空");
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getProjectName(), "项目不能为空");
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getContractName(), "客户合同不能为空");
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getTransportType(), "运输类型不能为空");
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getDepartureAddress(), "发货地址不能为空");
|
||||
TransportBusinessSupport.validateRequired(shippingTemplate.getArrivalAddress(), "收货地址不能为空");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getTemplateCode(), 255, "模板编号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getTemplateName(), 255, "模板名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getTemplateType(), 255, "模板类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getProjectName(), 255, "项目不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getContractName(), 255, "客户合同不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getTransportType(), 255, "运输类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getDepartureName(), 255, "发货地不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getDepartureAddress(), 255, "发货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getDepartureContact(), 255, "发货联系人不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getDeparturePhone(), 255, "发货联系方式不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getArrivalName(), 255, "收货地不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getArrivalAddress(), 255, "收货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getArrivalContact(), 255, "收货联系人不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getArrivalPhone(), 255, "收货联系方式不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getGoodsJson(), 8000, "货物信息不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getFreightJson(), 8000, "运费信息不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getAttachmentsJson(), 8000, "附件不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getDeptName(), 255, "所属组织不能超过255字");
|
||||
TransportBusinessSupport.validateLength(shippingTemplate.getRemark(), 500, "备注不能超过500字");
|
||||
}
|
||||
|
||||
private ShippingTemplate loadEditable(Long id, boolean checkDept) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
ShippingTemplate shippingTemplate = getById(id);
|
||||
if (Func.isEmpty(shippingTemplate) || Objects.equals(shippingTemplate.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("发货模板不存在");
|
||||
}
|
||||
if (checkDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(shippingTemplate.getDeptId(), "发货模板");
|
||||
}
|
||||
return shippingTemplate;
|
||||
}
|
||||
|
||||
private boolean shouldSkipDelete(ShippingTemplate shippingTemplate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private synchronized String nextCode() {
|
||||
String prefix = "MBJH" + LocalDate.now().format(DateTimeFormatter.BASIC_ISO_DATE);
|
||||
List<ShippingTemplate> latestList = list(Wrappers.<ShippingTemplate>lambdaQuery()
|
||||
.select(ShippingTemplate::getTemplateCode)
|
||||
.likeRight(ShippingTemplate::getTemplateCode, prefix)
|
||||
.orderByDesc(ShippingTemplate::getTemplateCode)
|
||||
.last("LIMIT 1"));
|
||||
int next = 1;
|
||||
if (Func.isNotEmpty(latestList) && Func.isNotEmpty(latestList.get(0).getTemplateCode())) {
|
||||
String serial = latestList.get(0).getTemplateCode().substring(prefix.length());
|
||||
if (serial.chars().allMatch(Character::isDigit)) {
|
||||
next = Integer.parseInt(serial) + 1;
|
||||
}
|
||||
}
|
||||
return prefix + String.format("%03d", next);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
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.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.excel.TemporaryCreditLimitExcel;
|
||||
import org.springblade.transport.mapper.TemporaryCreditLimitMapper;
|
||||
import org.springblade.transport.pojo.entity.TemporaryCreditLimit;
|
||||
import org.springblade.transport.pojo.vo.TemporaryCreditLimitVO;
|
||||
import org.springblade.transport.service.ITemporaryCreditLimitService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.TemporaryCreditLimitWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 临时额度申请 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class TemporaryCreditLimitServiceImpl extends BaseServiceImpl<TemporaryCreditLimitMapper, TemporaryCreditLimit> implements ITemporaryCreditLimitService {
|
||||
|
||||
private static final String STATUS_DRAFT = "draft";
|
||||
private static final String STATUS_REVIEWING = "reviewing";
|
||||
private static final String STATUS_WITHDRAWN = "withdrawn";
|
||||
private static final String STATUS_APPROVED = "approved";
|
||||
private static final String STATUS_REJECTED = "rejected";
|
||||
|
||||
@Override
|
||||
public IPage<TemporaryCreditLimitVO> selectTemporaryCreditLimitPage(IPage<TemporaryCreditLimit> page, TemporaryCreditLimitVO temporaryCreditLimit) {
|
||||
IPage<TemporaryCreditLimit> entityPage = page(page, buildQuery(temporaryCreditLimit));
|
||||
IPage<TemporaryCreditLimitVO> voPage = TemporaryCreditLimitWrapper.build().pageVO(entityPage);
|
||||
voPage.getRecords().forEach(this::fillReadonly);
|
||||
return voPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemporaryCreditLimitVO detail(Long id) {
|
||||
TemporaryCreditLimitVO temporaryCreditLimitVO = TemporaryCreditLimitWrapper.build().entityVO(loadExists(id));
|
||||
fillReadonly(temporaryCreditLimitVO);
|
||||
return temporaryCreditLimitVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean saveDraft(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
prepare(temporaryCreditLimit);
|
||||
validateDraft(temporaryCreditLimit);
|
||||
if (Func.isNotEmpty(temporaryCreditLimit.getId())) {
|
||||
loadEditable(temporaryCreditLimit.getId());
|
||||
}
|
||||
prepareCreateOrUpdate(temporaryCreditLimit);
|
||||
if (Func.isEmpty(temporaryCreditLimit.getApprovalStatus())) {
|
||||
temporaryCreditLimit.setApprovalStatus(STATUS_DRAFT);
|
||||
}
|
||||
return saveOrUpdate(temporaryCreditLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
prepare(temporaryCreditLimit);
|
||||
validateSubmit(temporaryCreditLimit);
|
||||
if (Func.isNotEmpty(temporaryCreditLimit.getId())) {
|
||||
loadEditable(temporaryCreditLimit.getId());
|
||||
}
|
||||
prepareCreateOrUpdate(temporaryCreditLimit);
|
||||
return saveOrUpdate(temporaryCreditLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submitApproval(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = loadEditable(id);
|
||||
validateSubmit(temporaryCreditLimit);
|
||||
temporaryCreditLimit.setApprovalStatus(STATUS_REVIEWING);
|
||||
temporaryCreditLimit.setCurrentNode("临时额度审批");
|
||||
temporaryCreditLimit.setCurrentProcessor("待处理");
|
||||
return updateById(temporaryCreditLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean approve(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = loadReviewing(id);
|
||||
temporaryCreditLimit.setApprovalStatus(STATUS_APPROVED);
|
||||
temporaryCreditLimit.setCurrentNode("审批通过");
|
||||
temporaryCreditLimit.setCurrentProcessor(AuthUtil.getUserName());
|
||||
temporaryCreditLimit.setApprovedTime(LocalDateTime.now());
|
||||
return updateById(temporaryCreditLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean reject(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = loadReviewing(id);
|
||||
temporaryCreditLimit.setApprovalStatus(STATUS_REJECTED);
|
||||
temporaryCreditLimit.setCurrentNode("审核不通过");
|
||||
temporaryCreditLimit.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(temporaryCreditLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean withdraw(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = loadReviewing(id);
|
||||
temporaryCreditLimit.setApprovalStatus(STATUS_WITHDRAWN);
|
||||
temporaryCreditLimit.setCurrentNode("已撤回");
|
||||
temporaryCreditLimit.setCurrentProcessor(AuthUtil.getUserName());
|
||||
return updateById(temporaryCreditLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean removeDraft(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
for (TemporaryCreditLimit temporaryCreditLimit : listByIds(idList)) {
|
||||
if (!List.of(STATUS_DRAFT, STATUS_WITHDRAWN, STATUS_REJECTED).contains(temporaryCreditLimit.getApprovalStatus())) {
|
||||
throw new ServiceException("仅草稿、已撤回、已驳回单据允许删除");
|
||||
}
|
||||
}
|
||||
return deleteLogic(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TemporaryCreditLimitExcel> exportTemporaryCreditLimit(TemporaryCreditLimitVO temporaryCreditLimit, String ids) {
|
||||
LambdaQueryWrapper<TemporaryCreditLimit> queryWrapper = buildQuery(temporaryCreditLimit);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(TemporaryCreditLimit::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
TemporaryCreditLimitExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(record, TemporaryCreditLimitExcel.class));
|
||||
excel.setProjectFundLimit(scale(record.getProjectFundLimit()));
|
||||
excel.setUsedFundLimit(scale(record.getUsedFundLimit()));
|
||||
excel.setRemainingFundLimit(scale(record.getRemainingFundLimit()));
|
||||
excel.setApplyLimit(scale(record.getApplyLimit()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TemporaryCreditLimit> buildQuery(TemporaryCreditLimitVO temporaryCreditLimit) {
|
||||
TransportBusinessSupport.validateAllDept(temporaryCreditLimit.getAllDept(), "临时额度管理");
|
||||
LambdaQueryWrapper<TemporaryCreditLimit> queryWrapper = Wrappers.<TemporaryCreditLimit>lambdaQuery().eq(TemporaryCreditLimit::getIsDeleted, 0);
|
||||
if (!Objects.equals(temporaryCreditLimit.getAllDept(), 1)) {
|
||||
queryWrapper.eq(TemporaryCreditLimit::getApplyDeptId, TransportBusinessSupport.currentDeptId("临时额度管理"));
|
||||
} else if (Func.isNotEmpty(temporaryCreditLimit.getApplyDeptId())) {
|
||||
queryWrapper.eq(TemporaryCreditLimit::getApplyDeptId, temporaryCreditLimit.getApplyDeptId());
|
||||
}
|
||||
queryWrapper.like(Func.isNotEmpty(temporaryCreditLimit.getApplicationNo()), TemporaryCreditLimit::getApplicationNo, temporaryCreditLimit.getApplicationNo())
|
||||
.like(Func.isNotEmpty(temporaryCreditLimit.getProjectName()), TemporaryCreditLimit::getProjectName, temporaryCreditLimit.getProjectName())
|
||||
.like(Func.isNotEmpty(temporaryCreditLimit.getApplicantName()), TemporaryCreditLimit::getApplicantName, temporaryCreditLimit.getApplicantName())
|
||||
.like(Func.isNotEmpty(temporaryCreditLimit.getApplyDeptName()), TemporaryCreditLimit::getApplyDeptName, temporaryCreditLimit.getApplyDeptName())
|
||||
.eq(Func.isNotEmpty(temporaryCreditLimit.getApprovalStatus()), TemporaryCreditLimit::getApprovalStatus, temporaryCreditLimit.getApprovalStatus())
|
||||
.orderByDesc(TemporaryCreditLimit::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepareCreateOrUpdate(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
if (Func.isEmpty(temporaryCreditLimit.getId())) {
|
||||
if (Func.isEmpty(temporaryCreditLimit.getApplicationNo())) {
|
||||
temporaryCreditLimit.setApplicationNo("TQ" + LocalDate.now().toString().replace("-", "") + String.format("%06d", count() + 1));
|
||||
}
|
||||
if (Func.isEmpty(temporaryCreditLimit.getApplyDeptId())) {
|
||||
temporaryCreditLimit.setApplyDeptId(TransportBusinessSupport.currentDeptId("临时额度管理"));
|
||||
temporaryCreditLimit.setApplyDeptName(TransportBusinessSupport.currentDept("临时额度管理").getDeptName());
|
||||
}
|
||||
if (Func.isEmpty(temporaryCreditLimit.getApplicantId())) {
|
||||
temporaryCreditLimit.setApplicantId(AuthUtil.getUserId());
|
||||
temporaryCreditLimit.setApplicantName(AuthUtil.getUserName());
|
||||
}
|
||||
} else {
|
||||
TemporaryCreditLimit oldRecord = loadExists(temporaryCreditLimit.getId());
|
||||
temporaryCreditLimit.setApplicationNo(oldRecord.getApplicationNo());
|
||||
temporaryCreditLimit.setApplyDeptId(oldRecord.getApplyDeptId());
|
||||
temporaryCreditLimit.setApplyDeptName(oldRecord.getApplyDeptName());
|
||||
temporaryCreditLimit.setApplicantId(oldRecord.getApplicantId());
|
||||
temporaryCreditLimit.setApplicantName(oldRecord.getApplicantName());
|
||||
}
|
||||
}
|
||||
|
||||
private void prepare(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
temporaryCreditLimit.setProjectCode(TransportBusinessSupport.trimToNull(temporaryCreditLimit.getProjectCode()));
|
||||
temporaryCreditLimit.setProjectName(TransportBusinessSupport.trimToNull(temporaryCreditLimit.getProjectName()));
|
||||
temporaryCreditLimit.setApplyDeptName(TransportBusinessSupport.trimToNull(temporaryCreditLimit.getApplyDeptName()));
|
||||
temporaryCreditLimit.setApplicantName(TransportBusinessSupport.trimToNull(temporaryCreditLimit.getApplicantName()));
|
||||
temporaryCreditLimit.setRemark(TransportBusinessSupport.trimToNull(temporaryCreditLimit.getRemark()));
|
||||
temporaryCreditLimit.setAttachmentsJson(TransportBusinessSupport.trimToNull(temporaryCreditLimit.getAttachmentsJson()));
|
||||
}
|
||||
|
||||
private void validateDraft(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
TransportBusinessSupport.validateRequired(temporaryCreditLimit.getProjectName(), "请选择项目");
|
||||
validateApplyLimit(temporaryCreditLimit.getApplyLimit());
|
||||
validateRemark(temporaryCreditLimit.getRemark());
|
||||
}
|
||||
|
||||
private void validateSubmit(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
validateDraft(temporaryCreditLimit);
|
||||
TransportBusinessSupport.validateRequired(temporaryCreditLimit.getProjectCode(), "项目编号不能为空");
|
||||
TransportBusinessSupport.validateRequired(temporaryCreditLimit.getUndertakeDeptName(), "承办部门不能为空");
|
||||
TransportBusinessSupport.validateRequired(temporaryCreditLimit.getValidUntil() == null ? null : temporaryCreditLimit.getValidUntil().toString(), "请选择申请有效期至");
|
||||
if (temporaryCreditLimit.getValidUntil() != null && !temporaryCreditLimit.getValidUntil().isAfter(LocalDate.now())) {
|
||||
throw new ServiceException("申请有效期至必须晚于当前日期");
|
||||
}
|
||||
if (temporaryCreditLimit.getProjectFundLimit() == null || temporaryCreditLimit.getUsedFundLimit() == null || temporaryCreditLimit.getRemainingFundLimit() == null) {
|
||||
throw new ServiceException("项目额度数据异常,请重新选择项目");
|
||||
}
|
||||
if (temporaryCreditLimit.getRemainingFundLimit().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException("项目剩余额度不能小于0");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateApplyLimit(BigDecimal applyLimit) {
|
||||
if (applyLimit == null || applyLimit.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
throw new ServiceException("申请临时额度必须大于0");
|
||||
}
|
||||
if (applyLimit.scale() > 2) {
|
||||
throw new ServiceException("申请临时额度最多保留2位小数");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateRemark(String remark) {
|
||||
TransportBusinessSupport.validateLength(remark, 500, "备注不能超过500字");
|
||||
}
|
||||
|
||||
private TemporaryCreditLimit loadExists(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = getById(id);
|
||||
if (Func.isEmpty(temporaryCreditLimit) || Objects.equals(temporaryCreditLimit.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("临时额度申请不存在");
|
||||
}
|
||||
return temporaryCreditLimit;
|
||||
}
|
||||
|
||||
private TemporaryCreditLimit loadEditable(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = loadExists(id);
|
||||
if (!List.of(STATUS_DRAFT, STATUS_REJECTED, STATUS_WITHDRAWN).contains(temporaryCreditLimit.getApprovalStatus())) {
|
||||
throw new ServiceException("当前状态不允许编辑");
|
||||
}
|
||||
TransportBusinessSupport.assertCurrentDept(temporaryCreditLimit.getApplyDeptId(), "临时额度管理");
|
||||
return temporaryCreditLimit;
|
||||
}
|
||||
|
||||
private TemporaryCreditLimit loadReviewing(Long id) {
|
||||
TemporaryCreditLimit temporaryCreditLimit = loadExists(id);
|
||||
if (!Objects.equals(temporaryCreditLimit.getApprovalStatus(), STATUS_REVIEWING)) {
|
||||
throw new ServiceException("当前状态不允许操作");
|
||||
}
|
||||
return temporaryCreditLimit;
|
||||
}
|
||||
|
||||
private BigDecimal scale(BigDecimal value) {
|
||||
return value == null ? null : value.setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
private void fillReadonly(TemporaryCreditLimitVO temporaryCreditLimitVO) {
|
||||
temporaryCreditLimitVO.setReadonly(!Objects.equals(temporaryCreditLimitVO.getApplyDeptId(), TransportBusinessSupport.currentDeptId("临时额度管理")));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.TransportPlanExcel;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import org.springblade.transport.mapper.TransportPlanMapper;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.TransportPlanVO;
|
||||
import org.springblade.transport.service.ITransportPlanService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.TransportPlanWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 运输计划 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class TransportPlanServiceImpl extends BaseServiceImpl<TransportPlanMapper, TransportPlan> implements ITransportPlanService {
|
||||
|
||||
@Override
|
||||
public IPage<TransportPlanVO> selectTransportPlanPage(IPage<TransportPlan> page, TransportPlanVO transportPlan) {
|
||||
IPage<TransportPlan> entityPage = page(page, buildQuery(transportPlan));
|
||||
return TransportPlanWrapper.build().pageVO(entityPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransportPlanVO detail(Long id) {
|
||||
return TransportPlanWrapper.build().entityVO(loadEditable(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(TransportPlan transportPlan) {
|
||||
boolean created = Func.isEmpty(transportPlan.getId());
|
||||
if (!created) {
|
||||
TransportPlan oldRecord = loadEditable(transportPlan.getId(), true);
|
||||
transportPlan.setPlanNo(oldRecord.getPlanNo());
|
||||
transportPlan.setDeptId(oldRecord.getDeptId());
|
||||
transportPlan.setDeptName(oldRecord.getDeptName());
|
||||
}
|
||||
prepare(transportPlan);
|
||||
if (created && Func.isEmpty(transportPlan.getPlanNo())) {
|
||||
transportPlan.setPlanNo(nextCode());
|
||||
}
|
||||
validate(transportPlan);
|
||||
return saveOrUpdate(transportPlan);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO removeTransportPlan(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
List<Long> deleteIdList = new ArrayList<>();
|
||||
for (TransportPlan transportPlan : listByIds(idList)) {
|
||||
TransportBusinessSupport.assertCurrentDept(transportPlan.getDeptId(), "运输计划");
|
||||
if (shouldSkipDelete(transportPlan)) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(transportPlan.getPlanNo());
|
||||
continue;
|
||||
}
|
||||
deleteIdList.add(transportPlan.getId());
|
||||
}
|
||||
if (Func.isNotEmpty(deleteIdList)) {
|
||||
deleteLogic(deleteIdList);
|
||||
}
|
||||
result.setSuccessCount(deleteIdList.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TransportPlanExcel> exportTransportPlan(TransportPlanVO transportPlan, String ids) {
|
||||
LambdaQueryWrapper<TransportPlan> queryWrapper = buildQuery(transportPlan);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(TransportPlan::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
TransportPlanExcel excel = new TransportPlanExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public TransportPlanVO copy(Long id) {
|
||||
TransportPlan source = loadEditable(id, true);
|
||||
TransportPlan target = new TransportPlan();
|
||||
target.setPlanName(source.getPlanName());
|
||||
target.setProjectId(source.getProjectId());
|
||||
target.setProjectName(source.getProjectName());
|
||||
target.setContractId(source.getContractId());
|
||||
target.setContractName(source.getContractName());
|
||||
target.setCustomerName(source.getCustomerName());
|
||||
target.setTransportType(source.getTransportType());
|
||||
target.setPlanStartDate(source.getPlanStartDate());
|
||||
target.setPlanEndDate(source.getPlanEndDate());
|
||||
target.setDepartureAddressId(source.getDepartureAddressId());
|
||||
target.setDepartureName(source.getDepartureName());
|
||||
target.setDepartureAddress(source.getDepartureAddress());
|
||||
target.setDepartureContact(source.getDepartureContact());
|
||||
target.setDeparturePhone(source.getDeparturePhone());
|
||||
target.setArrivalAddressId(source.getArrivalAddressId());
|
||||
target.setArrivalName(source.getArrivalName());
|
||||
target.setArrivalAddress(source.getArrivalAddress());
|
||||
target.setArrivalContact(source.getArrivalContact());
|
||||
target.setArrivalPhone(source.getArrivalPhone());
|
||||
target.setGoodsJson(source.getGoodsJson());
|
||||
target.setAttachmentsJson(source.getAttachmentsJson());
|
||||
target.setDataSource(source.getDataSource());
|
||||
target.setBusinessStatus(source.getBusinessStatus());
|
||||
target.setRemark(source.getRemark());
|
||||
target.setPlanName(source.getPlanName() + " - 副本");
|
||||
target.setBusinessStatus("draft");
|
||||
target.setPlanNo(nextCode());
|
||||
prepare(target);
|
||||
validate(target);
|
||||
save(target);
|
||||
return detail(target.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean cancel(Long id) {
|
||||
TransportPlan transportPlan = loadEditable(id, true);
|
||||
if ("completed".equals(transportPlan.getBusinessStatus()) || "cancelled".equals(transportPlan.getBusinessStatus())) {
|
||||
throw new ServiceException("当前状态不允许取消");
|
||||
}
|
||||
transportPlan.setBusinessStatus("cancelled");
|
||||
return updateById(transportPlan);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean complete(Long id) {
|
||||
TransportPlan transportPlan = loadEditable(id, true);
|
||||
if ("completed".equals(transportPlan.getBusinessStatus()) || "cancelled".equals(transportPlan.getBusinessStatus())) {
|
||||
throw new ServiceException("当前状态不允许完成");
|
||||
}
|
||||
transportPlan.setBusinessStatus("completed");
|
||||
return updateById(transportPlan);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TransportPlan> buildQuery(TransportPlanVO transportPlan) {
|
||||
TransportBusinessSupport.validateAllDept(transportPlan.getAllDept(), "运输计划");
|
||||
LambdaQueryWrapper<TransportPlan> queryWrapper = Wrappers.<TransportPlan>lambdaQuery().eq(TransportPlan::getIsDeleted, 0);
|
||||
if (!Objects.equals(transportPlan.getAllDept(), 1)) {
|
||||
queryWrapper.eq(TransportPlan::getDeptId, TransportBusinessSupport.currentDeptId("运输计划"));
|
||||
} else if (Func.isNotEmpty(transportPlan.getDeptId())) {
|
||||
queryWrapper.eq(TransportPlan::getDeptId, transportPlan.getDeptId());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getPlanNo())) {
|
||||
queryWrapper.eq(TransportPlan::getPlanNo, transportPlan.getPlanNo());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getPlanName())) {
|
||||
queryWrapper.like(TransportPlan::getPlanName, transportPlan.getPlanName());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getProjectName())) {
|
||||
queryWrapper.like(TransportPlan::getProjectName, transportPlan.getProjectName());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getContractName())) {
|
||||
queryWrapper.like(TransportPlan::getContractName, transportPlan.getContractName());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getCustomerName())) {
|
||||
queryWrapper.like(TransportPlan::getCustomerName, transportPlan.getCustomerName());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getTransportType())) {
|
||||
queryWrapper.eq(TransportPlan::getTransportType, transportPlan.getTransportType());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getDepartureName())) {
|
||||
queryWrapper.like(TransportPlan::getDepartureName, transportPlan.getDepartureName());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getDepartureAddress())) {
|
||||
queryWrapper.like(TransportPlan::getDepartureAddress, transportPlan.getDepartureAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getDepartureContact())) {
|
||||
queryWrapper.like(TransportPlan::getDepartureContact, transportPlan.getDepartureContact());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getDeparturePhone())) {
|
||||
queryWrapper.like(TransportPlan::getDeparturePhone, transportPlan.getDeparturePhone());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getArrivalName())) {
|
||||
queryWrapper.like(TransportPlan::getArrivalName, transportPlan.getArrivalName());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getArrivalAddress())) {
|
||||
queryWrapper.like(TransportPlan::getArrivalAddress, transportPlan.getArrivalAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getArrivalContact())) {
|
||||
queryWrapper.like(TransportPlan::getArrivalContact, transportPlan.getArrivalContact());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getArrivalPhone())) {
|
||||
queryWrapper.like(TransportPlan::getArrivalPhone, transportPlan.getArrivalPhone());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getDataSource())) {
|
||||
queryWrapper.eq(TransportPlan::getDataSource, transportPlan.getDataSource());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getBusinessStatus())) {
|
||||
queryWrapper.eq(TransportPlan::getBusinessStatus, transportPlan.getBusinessStatus());
|
||||
}
|
||||
if (Func.isNotEmpty(transportPlan.getRemark())) {
|
||||
queryWrapper.like(TransportPlan::getRemark, transportPlan.getRemark());
|
||||
}
|
||||
queryWrapper.orderByDesc(TransportPlan::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepare(TransportPlan transportPlan) {
|
||||
transportPlan.setPlanNo(TransportBusinessSupport.trimToNull(transportPlan.getPlanNo()));
|
||||
transportPlan.setPlanName(TransportBusinessSupport.trimToNull(transportPlan.getPlanName()));
|
||||
transportPlan.setProjectName(TransportBusinessSupport.trimToNull(transportPlan.getProjectName()));
|
||||
transportPlan.setContractName(TransportBusinessSupport.trimToNull(transportPlan.getContractName()));
|
||||
transportPlan.setCustomerName(TransportBusinessSupport.trimToNull(transportPlan.getCustomerName()));
|
||||
transportPlan.setTransportType(TransportBusinessSupport.trimToNull(transportPlan.getTransportType()));
|
||||
transportPlan.setDepartureName(TransportBusinessSupport.trimToNull(transportPlan.getDepartureName()));
|
||||
transportPlan.setDepartureAddress(TransportBusinessSupport.trimToNull(transportPlan.getDepartureAddress()));
|
||||
transportPlan.setDepartureContact(TransportBusinessSupport.trimToNull(transportPlan.getDepartureContact()));
|
||||
transportPlan.setDeparturePhone(TransportBusinessSupport.trimToNull(transportPlan.getDeparturePhone()));
|
||||
transportPlan.setArrivalName(TransportBusinessSupport.trimToNull(transportPlan.getArrivalName()));
|
||||
transportPlan.setArrivalAddress(TransportBusinessSupport.trimToNull(transportPlan.getArrivalAddress()));
|
||||
transportPlan.setArrivalContact(TransportBusinessSupport.trimToNull(transportPlan.getArrivalContact()));
|
||||
transportPlan.setArrivalPhone(TransportBusinessSupport.trimToNull(transportPlan.getArrivalPhone()));
|
||||
transportPlan.setGoodsJson(TransportBusinessSupport.trimToNull(transportPlan.getGoodsJson()));
|
||||
transportPlan.setAttachmentsJson(TransportBusinessSupport.trimToNull(transportPlan.getAttachmentsJson()));
|
||||
transportPlan.setDataSource(TransportBusinessSupport.trimToNull(transportPlan.getDataSource()));
|
||||
transportPlan.setBusinessStatus(TransportBusinessSupport.trimToNull(transportPlan.getBusinessStatus()));
|
||||
transportPlan.setDeptName(TransportBusinessSupport.trimToNull(transportPlan.getDeptName()));
|
||||
transportPlan.setRemark(TransportBusinessSupport.trimToNull(transportPlan.getRemark()));
|
||||
if (Func.isEmpty(transportPlan.getDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("运输计划");
|
||||
transportPlan.setDeptId(dept.getId());
|
||||
transportPlan.setDeptName(dept.getDeptName());
|
||||
}
|
||||
if (transportPlan.getStatus() == null) { transportPlan.setStatus(1); }
|
||||
if (Func.isEmpty(transportPlan.getBusinessStatus())) { transportPlan.setBusinessStatus("waiting_dispatch"); }
|
||||
}
|
||||
|
||||
private void validate(TransportPlan transportPlan) {
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getPlanName(), "计划名称不能为空");
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getProjectName(), "项目不能为空");
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getContractName(), "客户合同不能为空");
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getTransportType(), "运输类型不能为空");
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getDepartureAddress(), "发货地址不能为空");
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getArrivalAddress(), "收货地址不能为空");
|
||||
TransportBusinessSupport.validateRequired(transportPlan.getGoodsJson(), "货物信息不能为空");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getPlanNo(), 255, "计划单号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getPlanName(), 255, "计划名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getProjectName(), 255, "项目不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getContractName(), 255, "客户合同不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getCustomerName(), 255, "客户名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getTransportType(), 255, "运输类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getDepartureName(), 255, "发货地不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getDepartureAddress(), 255, "发货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getDepartureContact(), 255, "发货联系人不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getDeparturePhone(), 255, "发货联系方式不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getArrivalName(), 255, "收货地不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getArrivalAddress(), 255, "收货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getArrivalContact(), 255, "收货联系人不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getArrivalPhone(), 255, "收货联系方式不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getGoodsJson(), 8000, "货物信息不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getAttachmentsJson(), 8000, "附件不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getDataSource(), 255, "数据来源不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getBusinessStatus(), 255, "业务状态不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getDeptName(), 255, "所属组织不能超过255字");
|
||||
TransportBusinessSupport.validateLength(transportPlan.getRemark(), 500, "备注不能超过500字");
|
||||
TransportBusinessSupport.validateDateRange(transportPlan.getPlanStartDate(), transportPlan.getPlanEndDate(), "计划开始日期不能晚于计划结束日期");
|
||||
}
|
||||
|
||||
private TransportPlan loadEditable(Long id, boolean checkDept) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
TransportPlan transportPlan = getById(id);
|
||||
if (Func.isEmpty(transportPlan) || Objects.equals(transportPlan.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("运输计划不存在");
|
||||
}
|
||||
if (checkDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(transportPlan.getDeptId(), "运输计划");
|
||||
}
|
||||
return transportPlan;
|
||||
}
|
||||
|
||||
private boolean shouldSkipDelete(TransportPlan transportPlan) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private synchronized String nextCode() {
|
||||
String prefix = "JH" + LocalDate.now().format(DateTimeFormatter.BASIC_ISO_DATE);
|
||||
List<TransportPlan> latestList = list(Wrappers.<TransportPlan>lambdaQuery()
|
||||
.select(TransportPlan::getPlanNo)
|
||||
.likeRight(TransportPlan::getPlanNo, prefix)
|
||||
.orderByDesc(TransportPlan::getPlanNo)
|
||||
.last("LIMIT 1"));
|
||||
int next = 1;
|
||||
if (Func.isNotEmpty(latestList) && Func.isNotEmpty(latestList.get(0).getPlanNo())) {
|
||||
String serial = latestList.get(0).getPlanNo().substring(prefix.length());
|
||||
if (serial.chars().allMatch(Character::isDigit)) {
|
||||
next = Integer.parseInt(serial) + 1;
|
||||
}
|
||||
}
|
||||
return prefix + String.format("%03d", next);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
/**
|
||||
* 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.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.WaybillExcel;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import org.springblade.transport.mapper.WaybillMapper;
|
||||
import org.springblade.transport.pojo.entity.Waybill;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.WaybillVO;
|
||||
import org.springblade.transport.service.IWaybillService;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.transport.wrapper.WaybillWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 运单管理 服务实现类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Service
|
||||
public class WaybillServiceImpl extends BaseServiceImpl<WaybillMapper, Waybill> implements IWaybillService {
|
||||
|
||||
@Override
|
||||
public IPage<WaybillVO> selectWaybillPage(IPage<Waybill> page, WaybillVO waybill) {
|
||||
IPage<Waybill> entityPage = page(page, buildQuery(waybill));
|
||||
return WaybillWrapper.build().pageVO(entityPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaybillVO detail(Long id) {
|
||||
return WaybillWrapper.build().entityVO(loadEditable(id, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(Waybill waybill) {
|
||||
boolean created = Func.isEmpty(waybill.getId());
|
||||
if (!created) {
|
||||
Waybill oldRecord = loadEditable(waybill.getId(), true);
|
||||
waybill.setWaybillNo(oldRecord.getWaybillNo());
|
||||
waybill.setDeptId(oldRecord.getDeptId());
|
||||
waybill.setDeptName(oldRecord.getDeptName());
|
||||
}
|
||||
prepare(waybill);
|
||||
if (created && Func.isEmpty(waybill.getWaybillNo())) {
|
||||
waybill.setWaybillNo(nextCode());
|
||||
}
|
||||
validate(waybill);
|
||||
return saveOrUpdate(waybill);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO removeWaybill(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要删除的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
List<Long> deleteIdList = new ArrayList<>();
|
||||
for (Waybill waybill : listByIds(idList)) {
|
||||
TransportBusinessSupport.assertCurrentDept(waybill.getDeptId(), "运单管理");
|
||||
if (shouldSkipDelete(waybill)) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(waybill.getWaybillNo());
|
||||
continue;
|
||||
}
|
||||
deleteIdList.add(waybill.getId());
|
||||
}
|
||||
if (Func.isNotEmpty(deleteIdList)) {
|
||||
deleteLogic(deleteIdList);
|
||||
}
|
||||
result.setSuccessCount(deleteIdList.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WaybillExcel> exportWaybill(WaybillVO waybill, String ids) {
|
||||
LambdaQueryWrapper<Waybill> queryWrapper = buildQuery(waybill);
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(Waybill::getId, Func.toLongList(ids));
|
||||
}
|
||||
return list(queryWrapper).stream().map(record -> {
|
||||
WaybillExcel excel = new WaybillExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public WaybillVO copy(Long id) {
|
||||
Waybill source = loadEditable(id, true);
|
||||
Waybill target = new Waybill();
|
||||
target.setProjectId(source.getProjectId());
|
||||
target.setProjectName(source.getProjectName());
|
||||
target.setContractId(source.getContractId());
|
||||
target.setContractName(source.getContractName());
|
||||
target.setCustomerName(source.getCustomerName());
|
||||
target.setTransportType(source.getTransportType());
|
||||
target.setCargoName(source.getCargoName());
|
||||
target.setCargoType(source.getCargoType());
|
||||
target.setDepartureAddress(source.getDepartureAddress());
|
||||
target.setArrivalAddress(source.getArrivalAddress());
|
||||
target.setCarrierName(source.getCarrierName());
|
||||
target.setDriverName(source.getDriverName());
|
||||
target.setVehicleNo(source.getVehicleNo());
|
||||
target.setOriginalNo(source.getOriginalNo());
|
||||
target.setBusinessStatus(source.getBusinessStatus());
|
||||
target.setDataSource(source.getDataSource());
|
||||
target.setStartDate(source.getStartDate());
|
||||
target.setEndDate(source.getEndDate());
|
||||
target.setPlanId(source.getPlanId());
|
||||
target.setPlanName(source.getPlanName());
|
||||
target.setMasterNo(source.getMasterNo());
|
||||
target.setLoadingNo(source.getLoadingNo());
|
||||
target.setBatchNo(source.getBatchNo());
|
||||
target.setRelationNo(source.getRelationNo());
|
||||
target.setCurrentProcessNode(source.getCurrentProcessNode());
|
||||
target.setGoodsJson(source.getGoodsJson());
|
||||
target.setCarrierJson(source.getCarrierJson());
|
||||
target.setProcessJson(source.getProcessJson());
|
||||
target.setFreightJson(source.getFreightJson());
|
||||
target.setAttachmentsJson(source.getAttachmentsJson());
|
||||
target.setRemark(source.getRemark());
|
||||
target.setBusinessStatus("pending");
|
||||
target.setWaybillNo(nextCode());
|
||||
prepare(target);
|
||||
validate(target);
|
||||
save(target);
|
||||
return detail(target.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean cancel(Long id) {
|
||||
Waybill waybill = loadEditable(id, true);
|
||||
if ("completed".equals(waybill.getBusinessStatus()) || "cancelled".equals(waybill.getBusinessStatus())) {
|
||||
throw new ServiceException("当前状态不允许取消");
|
||||
}
|
||||
waybill.setBusinessStatus("cancelled");
|
||||
return updateById(waybill);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean reassign(Long id) {
|
||||
Waybill waybill = loadEditable(id, true);
|
||||
if (!"pending".equals(waybill.getBusinessStatus())) {
|
||||
throw new ServiceException("仅待执行运单允许重新派单");
|
||||
}
|
||||
waybill.setBusinessStatus("pending");
|
||||
return updateById(waybill);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean complete(Long id) {
|
||||
Waybill waybill = loadEditable(id, true);
|
||||
if ("completed".equals(waybill.getBusinessStatus()) || "cancelled".equals(waybill.getBusinessStatus())) {
|
||||
throw new ServiceException("当前状态不允许完成");
|
||||
}
|
||||
waybill.setBusinessStatus("completed");
|
||||
return updateById(waybill);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BusinessRemoveResultVO batchComplete(String ids) {
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
if (Func.isEmpty(idList)) {
|
||||
throw new ServiceException("请选择需要完成的数据");
|
||||
}
|
||||
BusinessRemoveResultVO result = new BusinessRemoveResultVO();
|
||||
for (Waybill waybill : listByIds(idList)) {
|
||||
try {
|
||||
complete(waybill.getId());
|
||||
result.setSuccessCount(result.getSuccessCount() + 1);
|
||||
} catch (Exception exception) {
|
||||
result.setSkippedCount(result.getSkippedCount() + 1);
|
||||
result.getSkippedCodes().add(waybill.getWaybillNo());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<Waybill> buildQuery(WaybillVO waybill) {
|
||||
TransportBusinessSupport.validateAllDept(waybill.getAllDept(), "运单管理");
|
||||
LambdaQueryWrapper<Waybill> queryWrapper = Wrappers.<Waybill>lambdaQuery().eq(Waybill::getIsDeleted, 0);
|
||||
if (!Objects.equals(waybill.getAllDept(), 1)) {
|
||||
queryWrapper.eq(Waybill::getDeptId, TransportBusinessSupport.currentDeptId("运单管理"));
|
||||
} else if (Func.isNotEmpty(waybill.getDeptId())) {
|
||||
queryWrapper.eq(Waybill::getDeptId, waybill.getDeptId());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getWaybillNo())) {
|
||||
queryWrapper.eq(Waybill::getWaybillNo, waybill.getWaybillNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getProjectName())) {
|
||||
queryWrapper.like(Waybill::getProjectName, waybill.getProjectName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getContractName())) {
|
||||
queryWrapper.like(Waybill::getContractName, waybill.getContractName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getCustomerName())) {
|
||||
queryWrapper.like(Waybill::getCustomerName, waybill.getCustomerName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getTransportType())) {
|
||||
queryWrapper.eq(Waybill::getTransportType, waybill.getTransportType());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getCargoName())) {
|
||||
queryWrapper.like(Waybill::getCargoName, waybill.getCargoName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getCargoType())) {
|
||||
queryWrapper.eq(Waybill::getCargoType, waybill.getCargoType());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getDepartureAddress())) {
|
||||
queryWrapper.like(Waybill::getDepartureAddress, waybill.getDepartureAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getArrivalAddress())) {
|
||||
queryWrapper.like(Waybill::getArrivalAddress, waybill.getArrivalAddress());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getCarrierName())) {
|
||||
queryWrapper.like(Waybill::getCarrierName, waybill.getCarrierName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getDriverName())) {
|
||||
queryWrapper.like(Waybill::getDriverName, waybill.getDriverName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getVehicleNo())) {
|
||||
queryWrapper.like(Waybill::getVehicleNo, waybill.getVehicleNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getOriginalNo())) {
|
||||
queryWrapper.like(Waybill::getOriginalNo, waybill.getOriginalNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getBusinessStatus())) {
|
||||
queryWrapper.eq(Waybill::getBusinessStatus, waybill.getBusinessStatus());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getDataSource())) {
|
||||
queryWrapper.eq(Waybill::getDataSource, waybill.getDataSource());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getPlanName())) {
|
||||
queryWrapper.like(Waybill::getPlanName, waybill.getPlanName());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getMasterNo())) {
|
||||
queryWrapper.like(Waybill::getMasterNo, waybill.getMasterNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getLoadingNo())) {
|
||||
queryWrapper.like(Waybill::getLoadingNo, waybill.getLoadingNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getBatchNo())) {
|
||||
queryWrapper.like(Waybill::getBatchNo, waybill.getBatchNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getRelationNo())) {
|
||||
queryWrapper.like(Waybill::getRelationNo, waybill.getRelationNo());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getCurrentProcessNode())) {
|
||||
queryWrapper.like(Waybill::getCurrentProcessNode, waybill.getCurrentProcessNode());
|
||||
}
|
||||
if (Func.isNotEmpty(waybill.getRemark())) {
|
||||
queryWrapper.like(Waybill::getRemark, waybill.getRemark());
|
||||
}
|
||||
queryWrapper.orderByDesc(Waybill::getCreateTime);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private void prepare(Waybill waybill) {
|
||||
waybill.setWaybillNo(TransportBusinessSupport.trimToNull(waybill.getWaybillNo()));
|
||||
waybill.setProjectName(TransportBusinessSupport.trimToNull(waybill.getProjectName()));
|
||||
waybill.setContractName(TransportBusinessSupport.trimToNull(waybill.getContractName()));
|
||||
waybill.setCustomerName(TransportBusinessSupport.trimToNull(waybill.getCustomerName()));
|
||||
waybill.setTransportType(TransportBusinessSupport.trimToNull(waybill.getTransportType()));
|
||||
waybill.setCargoName(TransportBusinessSupport.trimToNull(waybill.getCargoName()));
|
||||
waybill.setCargoType(TransportBusinessSupport.trimToNull(waybill.getCargoType()));
|
||||
waybill.setDepartureAddress(TransportBusinessSupport.trimToNull(waybill.getDepartureAddress()));
|
||||
waybill.setArrivalAddress(TransportBusinessSupport.trimToNull(waybill.getArrivalAddress()));
|
||||
waybill.setCarrierName(TransportBusinessSupport.trimToNull(waybill.getCarrierName()));
|
||||
waybill.setDriverName(TransportBusinessSupport.trimToNull(waybill.getDriverName()));
|
||||
waybill.setVehicleNo(TransportBusinessSupport.trimToNull(waybill.getVehicleNo()));
|
||||
waybill.setOriginalNo(TransportBusinessSupport.trimToNull(waybill.getOriginalNo()));
|
||||
waybill.setBusinessStatus(TransportBusinessSupport.trimToNull(waybill.getBusinessStatus()));
|
||||
waybill.setDataSource(TransportBusinessSupport.trimToNull(waybill.getDataSource()));
|
||||
waybill.setPlanName(TransportBusinessSupport.trimToNull(waybill.getPlanName()));
|
||||
waybill.setMasterNo(TransportBusinessSupport.trimToNull(waybill.getMasterNo()));
|
||||
waybill.setLoadingNo(TransportBusinessSupport.trimToNull(waybill.getLoadingNo()));
|
||||
waybill.setBatchNo(TransportBusinessSupport.trimToNull(waybill.getBatchNo()));
|
||||
waybill.setRelationNo(TransportBusinessSupport.trimToNull(waybill.getRelationNo()));
|
||||
waybill.setCurrentProcessNode(TransportBusinessSupport.trimToNull(waybill.getCurrentProcessNode()));
|
||||
waybill.setGoodsJson(TransportBusinessSupport.trimToNull(waybill.getGoodsJson()));
|
||||
waybill.setCarrierJson(TransportBusinessSupport.trimToNull(waybill.getCarrierJson()));
|
||||
waybill.setProcessJson(TransportBusinessSupport.trimToNull(waybill.getProcessJson()));
|
||||
waybill.setFreightJson(TransportBusinessSupport.trimToNull(waybill.getFreightJson()));
|
||||
waybill.setAttachmentsJson(TransportBusinessSupport.trimToNull(waybill.getAttachmentsJson()));
|
||||
waybill.setDeptName(TransportBusinessSupport.trimToNull(waybill.getDeptName()));
|
||||
waybill.setRemark(TransportBusinessSupport.trimToNull(waybill.getRemark()));
|
||||
if (Func.isEmpty(waybill.getDeptId())) {
|
||||
Dept dept = TransportBusinessSupport.currentDept("运单管理");
|
||||
waybill.setDeptId(dept.getId());
|
||||
waybill.setDeptName(dept.getDeptName());
|
||||
}
|
||||
if (waybill.getStatus() == null) { waybill.setStatus(1); }
|
||||
if (Func.isEmpty(waybill.getBusinessStatus())) { waybill.setBusinessStatus("pending"); }
|
||||
}
|
||||
|
||||
private void validate(Waybill waybill) {
|
||||
TransportBusinessSupport.validateRequired(waybill.getProjectName(), "项目不能为空");
|
||||
TransportBusinessSupport.validateRequired(waybill.getContractName(), "客户合同不能为空");
|
||||
TransportBusinessSupport.validateRequired(waybill.getTransportType(), "运输类型不能为空");
|
||||
TransportBusinessSupport.validateRequired(waybill.getCargoName(), "请输入货物名称");
|
||||
TransportBusinessSupport.validateRequired(waybill.getCargoType(), "货物类型不能为空");
|
||||
TransportBusinessSupport.validateRequired(waybill.getCarrierJson(), "承运信息不能为空");
|
||||
TransportBusinessSupport.validateLength(waybill.getWaybillNo(), 255, "运单号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getProjectName(), 255, "项目不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getContractName(), 255, "客户合同不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getCustomerName(), 255, "客户名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getTransportType(), 255, "运输类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getCargoName(), 255, "货物名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getCargoType(), 255, "货物类型不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getDepartureAddress(), 255, "发货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getArrivalAddress(), 255, "收货地址不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getCarrierName(), 255, "承运商名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getDriverName(), 255, "司机姓名不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getVehicleNo(), 255, "车/船/航班/班列号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getOriginalNo(), 255, "原始单号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getBusinessStatus(), 255, "业务状态不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getDataSource(), 255, "数据来源不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getPlanName(), 255, "计划名称不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getMasterNo(), 255, "多联总单不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getLoadingNo(), 255, "配载单号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getBatchNo(), 255, "运单批次号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getRelationNo(), 255, "关联单号不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getCurrentProcessNode(), 255, "当前过程节点不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getGoodsJson(), 8000, "货物信息不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(waybill.getCarrierJson(), 8000, "承运信息不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(waybill.getProcessJson(), 8000, "过程节点不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(waybill.getFreightJson(), 8000, "费用信息不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(waybill.getAttachmentsJson(), 8000, "附件不能超过8000字");
|
||||
TransportBusinessSupport.validateLength(waybill.getDeptName(), 255, "所属组织不能超过255字");
|
||||
TransportBusinessSupport.validateLength(waybill.getRemark(), 500, "备注不能超过500字");
|
||||
TransportBusinessSupport.validateDateRange(waybill.getStartDate(), waybill.getEndDate(), "开始日期不能晚于结束日期");
|
||||
}
|
||||
|
||||
private Waybill loadEditable(Long id, boolean checkDept) {
|
||||
if (Func.isEmpty(id)) {
|
||||
throw new ServiceException("主键不能为空");
|
||||
}
|
||||
Waybill waybill = getById(id);
|
||||
if (Func.isEmpty(waybill) || Objects.equals(waybill.getIsDeleted(), 1)) {
|
||||
throw new ServiceException("运单管理不存在");
|
||||
}
|
||||
if (checkDept) {
|
||||
TransportBusinessSupport.assertCurrentDept(waybill.getDeptId(), "运单管理");
|
||||
}
|
||||
return waybill;
|
||||
}
|
||||
|
||||
private boolean shouldSkipDelete(Waybill waybill) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private synchronized String nextCode() {
|
||||
String prefix = "YD" + LocalDate.now().format(DateTimeFormatter.BASIC_ISO_DATE);
|
||||
List<Waybill> latestList = list(Wrappers.<Waybill>lambdaQuery()
|
||||
.select(Waybill::getWaybillNo)
|
||||
.likeRight(Waybill::getWaybillNo, prefix)
|
||||
.orderByDesc(Waybill::getWaybillNo)
|
||||
.last("LIMIT 1"));
|
||||
int next = 1;
|
||||
if (Func.isNotEmpty(latestList) && Func.isNotEmpty(latestList.get(0).getWaybillNo())) {
|
||||
String serial = latestList.get(0).getWaybillNo().substring(prefix.length());
|
||||
if (serial.chars().allMatch(Character::isDigit)) {
|
||||
next = Integer.parseInt(serial) + 1;
|
||||
}
|
||||
}
|
||||
return prefix + String.format("%04d", next);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* 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.support;
|
||||
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.SysCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 运输业务公共校验支持
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public final class TransportBusinessSupport {
|
||||
|
||||
private static final Pattern PHONE_PATTERN = Pattern.compile("^(1\\d{10}|0\\d{2,3}-?\\d{7,8})$");
|
||||
private static final BigDecimal MIN_LONGITUDE = new BigDecimal("-180");
|
||||
private static final BigDecimal MAX_LONGITUDE = new BigDecimal("180");
|
||||
private static final BigDecimal MIN_LATITUDE = new BigDecimal("-90");
|
||||
private static final BigDecimal MAX_LATITUDE = new BigDecimal("90");
|
||||
|
||||
private TransportBusinessSupport() {
|
||||
}
|
||||
|
||||
public static Long currentDeptId(String moduleName) {
|
||||
Long deptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
if (Func.isEmpty(deptId) || deptId <= 0) {
|
||||
throw new ServiceException("当前用户所属组织为空,无法操作" + moduleName);
|
||||
}
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public static Dept currentDept(String moduleName) {
|
||||
Dept dept = SysCache.getDept(currentDeptId(moduleName));
|
||||
if (Func.isEmpty(dept)) {
|
||||
throw new ServiceException("当前用户所属组织异常,请重新登录后再试");
|
||||
}
|
||||
return dept;
|
||||
}
|
||||
|
||||
public static void assertCurrentDept(Long deptId, String moduleName) {
|
||||
if (!Objects.equals(deptId, currentDeptId(moduleName))) {
|
||||
throw new ServiceException("无权操作其他组织" + moduleName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateAllDept(Integer allDept, String moduleName) {
|
||||
if (Objects.equals(allDept, 1) && !AuthUtil.isAdministrator()) {
|
||||
throw new ServiceException("无权查看全部组织" + moduleName);
|
||||
}
|
||||
}
|
||||
|
||||
public static String trimToEmpty(String value) {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
|
||||
public static String trimToNull(String value) {
|
||||
String trimValue = trimToEmpty(value);
|
||||
return trimValue.isEmpty() ? null : trimValue;
|
||||
}
|
||||
|
||||
public static void validateRequired(String value, String message) {
|
||||
if (Func.isEmpty(trimToNull(value))) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateLength(String value, int maxLength, String message) {
|
||||
if (Func.isNotEmpty(value) && value.length() > maxLength) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validatePhone(String value, String message) {
|
||||
if (Func.isNotEmpty(value) && !PHONE_PATTERN.matcher(value).matches()) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateCoordinate(BigDecimal value, boolean longitude) {
|
||||
if (Func.isEmpty(value)) {
|
||||
return;
|
||||
}
|
||||
BigDecimal min = longitude ? MIN_LONGITUDE : MIN_LATITUDE;
|
||||
BigDecimal max = longitude ? MAX_LONGITUDE : MAX_LATITUDE;
|
||||
if (value.compareTo(min) < 0 || value.compareTo(max) > 0) {
|
||||
throw new ServiceException(longitude ? "经度范围为 -180 到 180" : "纬度范围为 -90 到 90");
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateNonNegative(BigDecimal value, String fieldName) {
|
||||
if (Func.isNotEmpty(value) && value.compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new ServiceException(fieldName + "不能小于0");
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateDateRange(LocalDate startDate, LocalDate endDate, String message) {
|
||||
if (startDate != null && endDate != null && startDate.isAfter(endDate)) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.CommonCargo;
|
||||
import org.springblade.transport.pojo.vo.CommonCargoVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 常用货物包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class CommonCargoWrapper extends BaseEntityWrapper<CommonCargo, CommonCargoVO> {
|
||||
|
||||
public static CommonCargoWrapper build() {
|
||||
return new CommonCargoWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonCargoVO entityVO(CommonCargo commonCargo) {
|
||||
CommonCargoVO commonCargoVO = Objects.requireNonNull(BeanUtil.copyProperties(commonCargo, CommonCargoVO.class));
|
||||
commonCargoVO.setCreateUserName(UserCache.getUserRealName(commonCargo.getCreateUser()));
|
||||
commonCargoVO.setUpdateUserName(UserCache.getUserRealName(commonCargo.getUpdateUser()));
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
commonCargoVO.setReadonly(currentDeptId != null && !Objects.equals(commonCargo.getDeptId(), currentDeptId));
|
||||
return commonCargoVO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.CommonRoute;
|
||||
import org.springblade.transport.pojo.vo.CommonRouteVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 常用线路包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class CommonRouteWrapper extends BaseEntityWrapper<CommonRoute, CommonRouteVO> {
|
||||
|
||||
public static CommonRouteWrapper build() {
|
||||
return new CommonRouteWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonRouteVO entityVO(CommonRoute commonRoute) {
|
||||
CommonRouteVO commonRouteVO = Objects.requireNonNull(BeanUtil.copyProperties(commonRoute, CommonRouteVO.class));
|
||||
commonRouteVO.setCreateUserName(UserCache.getUserRealName(commonRoute.getCreateUser()));
|
||||
commonRouteVO.setUpdateUserName(UserCache.getUserRealName(commonRoute.getUpdateUser()));
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
commonRouteVO.setReadonly(currentDeptId != null && !Objects.equals(commonRoute.getDeptId(), currentDeptId));
|
||||
return commonRouteVO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.transport.pojo.entity.ContractManage;
|
||||
import org.springblade.transport.pojo.vo.ContractManageVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 合同管理包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class ContractManageWrapper extends BaseEntityWrapper<ContractManage, ContractManageVO> {
|
||||
|
||||
public static ContractManageWrapper build() {
|
||||
return new ContractManageWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractManageVO entityVO(ContractManage contractManage) {
|
||||
ContractManageVO contractManageVO = Objects.requireNonNull(BeanUtil.copyProperties(contractManage, ContractManageVO.class));
|
||||
contractManageVO.setCreateUserName(org.springblade.system.cache.UserCache.getUserRealName(contractManage.getCreateUser()));
|
||||
contractManageVO.setUpdateUserName(org.springblade.system.cache.UserCache.getUserRealName(contractManage.getUpdateUser()));
|
||||
contractManageVO.setContractStageName(stageName(contractManage.getContractStage()));
|
||||
contractManageVO.setApprovalStatusName(statusName(contractManage.getApprovalStatus()));
|
||||
return contractManageVO;
|
||||
}
|
||||
|
||||
private String stageName(String stage) {
|
||||
if (stage == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (stage) {
|
||||
case "draft" -> "草稿";
|
||||
case "temporary" -> "临时合同";
|
||||
case "formal" -> "正式合同";
|
||||
case "terminated" -> "已终止";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
private String statusName(String status) {
|
||||
if (status == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (status) {
|
||||
case "draft" -> "草稿";
|
||||
case "reviewing" -> "审批中";
|
||||
case "rejected" -> "已驳回";
|
||||
case "approved" -> "审批通过";
|
||||
case "change_reviewing" -> "变更审批中";
|
||||
case "change_rejected" -> "变更驳回";
|
||||
case "change_approved" -> "变更审批通过";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.ProcessConfig;
|
||||
import org.springblade.transport.pojo.vo.ProcessConfigVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 过程配置包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class ProcessConfigWrapper extends BaseEntityWrapper<ProcessConfig, ProcessConfigVO> {
|
||||
|
||||
public static ProcessConfigWrapper build() {
|
||||
return new ProcessConfigWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessConfigVO entityVO(ProcessConfig processConfig) {
|
||||
ProcessConfigVO processConfigVO = Objects.requireNonNull(BeanUtil.copyProperties(processConfig, ProcessConfigVO.class));
|
||||
processConfigVO.setCreateUserName(UserCache.getUserRealName(processConfig.getCreateUser()));
|
||||
processConfigVO.setUpdateUserName(UserCache.getUserRealName(processConfig.getUpdateUser()));
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
processConfigVO.setReadonly(currentDeptId != null && !Objects.equals(processConfig.getDeptId(), currentDeptId));
|
||||
processConfigVO.setStatusName(statusName(processConfig.getStatus()));
|
||||
return processConfigVO;
|
||||
}
|
||||
|
||||
private String statusName(Integer status) {
|
||||
if (status == null || status == 0) {
|
||||
return "草稿";
|
||||
}
|
||||
if (status == 1) {
|
||||
return "启用";
|
||||
}
|
||||
if (status == 2) {
|
||||
return "停用";
|
||||
}
|
||||
return "未知";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
import org.springblade.transport.pojo.vo.ProjectApplyVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 项目立项包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class ProjectApplyWrapper extends BaseEntityWrapper<ProjectApply, ProjectApplyVO> {
|
||||
|
||||
public static ProjectApplyWrapper build() {
|
||||
return new ProjectApplyWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectApplyVO entityVO(ProjectApply projectApply) {
|
||||
ProjectApplyVO projectApplyVO = Objects.requireNonNull(BeanUtil.copyProperties(projectApply, ProjectApplyVO.class));
|
||||
projectApplyVO.setCreateUserName(getUserName(projectApply.getCreateUser()));
|
||||
projectApplyVO.setUpdateUserName(getUserName(projectApply.getUpdateUser()));
|
||||
projectApplyVO.setApprovalStatusName(statusName(projectApply.getApprovalStatus()));
|
||||
projectApplyVO.setEffectiveTypeName(effectiveTypeName(projectApply.getEffectiveType()));
|
||||
return projectApplyVO;
|
||||
}
|
||||
|
||||
private String getUserName(Long userId) {
|
||||
return org.springblade.system.cache.UserCache.getUserRealName(userId);
|
||||
}
|
||||
|
||||
private String statusName(String status) {
|
||||
if (status == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (status) {
|
||||
case "draft" -> "草稿";
|
||||
case "reviewing" -> "审批中";
|
||||
case "withdrawn" -> "已撤回";
|
||||
case "approved" -> "审批通过";
|
||||
case "rejected" -> "已驳回";
|
||||
case "change_reviewing" -> "变更审批中";
|
||||
case "change_rejected" -> "变更驳回";
|
||||
case "change_approved" -> "变更审批通过";
|
||||
case "voided" -> "已作废";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
private String effectiveTypeName(String effectiveType) {
|
||||
if (effectiveType == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (effectiveType) {
|
||||
case "temporary" -> "临时";
|
||||
case "formal" -> "正式";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.ShippingTemplate;
|
||||
import org.springblade.transport.pojo.vo.ShippingTemplateVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发货模板包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class ShippingTemplateWrapper extends BaseEntityWrapper<ShippingTemplate, ShippingTemplateVO> {
|
||||
|
||||
public static ShippingTemplateWrapper build() {
|
||||
return new ShippingTemplateWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShippingTemplateVO entityVO(ShippingTemplate shippingTemplate) {
|
||||
ShippingTemplateVO shippingTemplateVO = Objects.requireNonNull(BeanUtil.copyProperties(shippingTemplate, ShippingTemplateVO.class));
|
||||
shippingTemplateVO.setCreateUserName(UserCache.getUserRealName(shippingTemplate.getCreateUser()));
|
||||
shippingTemplateVO.setUpdateUserName(UserCache.getUserRealName(shippingTemplate.getUpdateUser()));
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
shippingTemplateVO.setReadonly(currentDeptId != null && !Objects.equals(shippingTemplate.getDeptId(), currentDeptId));
|
||||
return shippingTemplateVO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.transport.pojo.entity.TemporaryCreditLimit;
|
||||
import org.springblade.transport.pojo.vo.TemporaryCreditLimitVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 临时额度申请包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class TemporaryCreditLimitWrapper extends BaseEntityWrapper<TemporaryCreditLimit, TemporaryCreditLimitVO> {
|
||||
|
||||
public static TemporaryCreditLimitWrapper build() {
|
||||
return new TemporaryCreditLimitWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemporaryCreditLimitVO entityVO(TemporaryCreditLimit temporaryCreditLimit) {
|
||||
TemporaryCreditLimitVO temporaryCreditLimitVO = Objects.requireNonNull(BeanUtil.copyProperties(temporaryCreditLimit, TemporaryCreditLimitVO.class));
|
||||
temporaryCreditLimitVO.setCreateUserName(org.springblade.system.cache.UserCache.getUserRealName(temporaryCreditLimit.getCreateUser()));
|
||||
temporaryCreditLimitVO.setUpdateUserName(org.springblade.system.cache.UserCache.getUserRealName(temporaryCreditLimit.getUpdateUser()));
|
||||
temporaryCreditLimitVO.setApprovalStatusName(statusName(temporaryCreditLimit.getApprovalStatus()));
|
||||
return temporaryCreditLimitVO;
|
||||
}
|
||||
|
||||
private String statusName(String status) {
|
||||
if (status == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (status) {
|
||||
case "draft" -> "草稿";
|
||||
case "reviewing" -> "审批中";
|
||||
case "withdrawn" -> "已撤回";
|
||||
case "approved" -> "审批通过";
|
||||
case "rejected" -> "已驳回";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
import org.springblade.transport.pojo.vo.TransportPlanVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 运输计划包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class TransportPlanWrapper extends BaseEntityWrapper<TransportPlan, TransportPlanVO> {
|
||||
|
||||
public static TransportPlanWrapper build() {
|
||||
return new TransportPlanWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransportPlanVO entityVO(TransportPlan transportPlan) {
|
||||
TransportPlanVO transportPlanVO = Objects.requireNonNull(BeanUtil.copyProperties(transportPlan, TransportPlanVO.class));
|
||||
transportPlanVO.setCreateUserName(UserCache.getUserRealName(transportPlan.getCreateUser()));
|
||||
transportPlanVO.setUpdateUserName(UserCache.getUserRealName(transportPlan.getUpdateUser()));
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
transportPlanVO.setReadonly(currentDeptId != null && !Objects.equals(transportPlan.getDeptId(), currentDeptId));
|
||||
transportPlanVO.setBusinessStatusName(businessStatusName(transportPlan.getBusinessStatus()));
|
||||
return transportPlanVO;
|
||||
}
|
||||
|
||||
private String businessStatusName(String status) {
|
||||
if (status == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (status) {
|
||||
case "draft" -> "草稿";
|
||||
case "pending" -> "待执行";
|
||||
case "waiting_dispatch" -> "待调度";
|
||||
case "dispatching" -> "调度中";
|
||||
case "running" -> "进行中";
|
||||
case "completed" -> "已完成";
|
||||
case "cancelled" -> "已取消";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 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.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.Waybill;
|
||||
import org.springblade.transport.pojo.vo.WaybillVO;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 运单管理包装类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class WaybillWrapper extends BaseEntityWrapper<Waybill, WaybillVO> {
|
||||
|
||||
public static WaybillWrapper build() {
|
||||
return new WaybillWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaybillVO entityVO(Waybill waybill) {
|
||||
WaybillVO waybillVO = Objects.requireNonNull(BeanUtil.copyProperties(waybill, WaybillVO.class));
|
||||
waybillVO.setCreateUserName(UserCache.getUserRealName(waybill.getCreateUser()));
|
||||
waybillVO.setUpdateUserName(UserCache.getUserRealName(waybill.getUpdateUser()));
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
waybillVO.setReadonly(currentDeptId != null && !Objects.equals(waybill.getDeptId(), currentDeptId));
|
||||
waybillVO.setBusinessStatusName(businessStatusName(waybill.getBusinessStatus()));
|
||||
return waybillVO;
|
||||
}
|
||||
|
||||
private String businessStatusName(String status) {
|
||||
if (status == null) {
|
||||
return "未知";
|
||||
}
|
||||
return switch (status) {
|
||||
case "draft" -> "草稿";
|
||||
case "pending" -> "待执行";
|
||||
case "waiting_dispatch" -> "待调度";
|
||||
case "dispatching" -> "调度中";
|
||||
case "running" -> "进行中";
|
||||
case "completed" -> "已完成";
|
||||
case "cancelled" -> "已取消";
|
||||
default -> "未知";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
199
doc/sql/transport/blade_project_contract_management.sql
Normal file
199
doc/sql/transport/blade_project_contract_management.sql
Normal file
@@ -0,0 +1,199 @@
|
||||
-- 项目管理、临时额度管理、合同管理模块
|
||||
|
||||
DROP TABLE IF EXISTS `blade_project_apply`;
|
||||
CREATE TABLE `blade_project_apply` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`apply_no` varchar(100) DEFAULT NULL COMMENT '立项申请单号',
|
||||
`project_code` varchar(100) DEFAULT NULL COMMENT '项目编号',
|
||||
`project_name` varchar(100) DEFAULT NULL COMMENT '项目名称',
|
||||
`project_short_name` varchar(50) DEFAULT NULL COMMENT '项目简称',
|
||||
`project_type` varchar(50) DEFAULT NULL COMMENT '项目类型',
|
||||
`business_dept_id` bigint(20) DEFAULT NULL COMMENT '业务部门ID',
|
||||
`business_dept_name` varchar(100) DEFAULT NULL COMMENT '业务部门',
|
||||
`undertake_dept_id` bigint(20) DEFAULT NULL COMMENT '承办部门ID',
|
||||
`undertake_dept_name` varchar(100) DEFAULT NULL COMMENT '承办部门',
|
||||
`project_source` varchar(50) DEFAULT NULL COMMENT '项目由来',
|
||||
`source_remark` varchar(500) DEFAULT NULL COMMENT '项目由来说明',
|
||||
`fund_limit` decimal(18,2) DEFAULT NULL COMMENT '项目资金使用额度(万元)',
|
||||
`receivable_limit` decimal(18,2) DEFAULT NULL COMMENT '项目应收账款额度(万元)',
|
||||
`receivable_days` int(11) DEFAULT NULL COMMENT '应收账款回款期限(天)',
|
||||
`payment_days` int(11) DEFAULT NULL COMMENT '回款账期(天)',
|
||||
`cargo_type` varchar(100) DEFAULT NULL COMMENT '货物类型',
|
||||
`cargo_quantity` varchar(100) DEFAULT NULL COMMENT '预估货物数量',
|
||||
`business_start_date` date DEFAULT NULL COMMENT '业务周期开始日期',
|
||||
`business_end_date` date DEFAULT NULL COMMENT '业务周期结束日期',
|
||||
`transport_route` varchar(200) DEFAULT NULL COMMENT '运输线路',
|
||||
`transport_type` varchar(100) DEFAULT NULL COMMENT '运输类型',
|
||||
`business_type` varchar(100) DEFAULT NULL COMMENT '业务类型',
|
||||
`project_scale` decimal(18,2) DEFAULT NULL COMMENT '项目规模(万元)',
|
||||
`estimated_profit` decimal(18,2) DEFAULT NULL COMMENT '预计利润(万元)',
|
||||
`fund_demand` decimal(18,2) DEFAULT NULL COMMENT '资金需求(万元)',
|
||||
`settlement_mode` varchar(100) DEFAULT NULL COMMENT '结算方式',
|
||||
`handler_user_id` bigint(20) DEFAULT NULL COMMENT '项目经办人ID',
|
||||
`handler_user_name` varchar(100) DEFAULT NULL COMMENT '项目经办人',
|
||||
`principal_user_id` bigint(20) DEFAULT NULL COMMENT '项目负责人ID',
|
||||
`principal_user_name` varchar(100) DEFAULT NULL COMMENT '项目负责人',
|
||||
`customer_names` varchar(500) DEFAULT NULL COMMENT '客户名称',
|
||||
`carrier_names` varchar(500) DEFAULT NULL COMMENT '下游承运商',
|
||||
`customer_json` text DEFAULT NULL COMMENT '客户信息JSON',
|
||||
`carrier_json` text DEFAULT NULL COMMENT '承运商信息JSON',
|
||||
`situation_remark` text DEFAULT NULL COMMENT '项目情况说明',
|
||||
`attachments_json` text DEFAULT NULL COMMENT '项目附件JSON',
|
||||
`approval_status` varchar(50) DEFAULT NULL COMMENT '审批状态',
|
||||
`current_node` varchar(100) DEFAULT NULL COMMENT '当前节点',
|
||||
`current_processor` varchar(100) DEFAULT NULL COMMENT '当前处理人',
|
||||
`effective_type` varchar(50) DEFAULT NULL COMMENT '生效类型',
|
||||
`approved_time` datetime DEFAULT NULL COMMENT '审核通过时间',
|
||||
`change_content` text DEFAULT NULL COMMENT '变更内容',
|
||||
`change_reason` varchar(500) DEFAULT NULL COMMENT '变更原因',
|
||||
`void_reason` varchar(500) DEFAULT NULL COMMENT '作废原因',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_project_apply_name` (`project_name`, `is_deleted`) USING BTREE,
|
||||
KEY `idx_project_apply_dept` (`undertake_dept_id`) USING BTREE,
|
||||
KEY `idx_project_apply_status` (`approval_status`) USING BTREE,
|
||||
KEY `idx_project_apply_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目立项';
|
||||
|
||||
DROP TABLE IF EXISTS `blade_temporary_credit_limit`;
|
||||
CREATE TABLE `blade_temporary_credit_limit` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`application_no` varchar(100) DEFAULT NULL COMMENT '申请单号',
|
||||
`project_id` bigint(20) DEFAULT NULL COMMENT '项目ID',
|
||||
`project_code` varchar(100) DEFAULT NULL COMMENT '项目编号',
|
||||
`project_name` varchar(100) DEFAULT NULL COMMENT '项目名称',
|
||||
`undertake_dept_id` bigint(20) DEFAULT NULL COMMENT '承办部门ID',
|
||||
`undertake_dept_name` varchar(100) DEFAULT NULL COMMENT '承办部门',
|
||||
`project_fund_limit` decimal(18,2) DEFAULT NULL COMMENT '项目资金使用额度(万元)',
|
||||
`used_fund_limit` decimal(18,2) DEFAULT NULL COMMENT '已使用项目资金额度(万元)',
|
||||
`remaining_fund_limit` decimal(18,2) DEFAULT NULL COMMENT '剩余项目资金使用额度(万元)',
|
||||
`apply_limit` decimal(18,2) DEFAULT NULL COMMENT '申请临时额度(万元)',
|
||||
`valid_until` date DEFAULT NULL COMMENT '申请有效期至',
|
||||
`apply_dept_id` bigint(20) DEFAULT NULL COMMENT '申请部门ID',
|
||||
`apply_dept_name` varchar(100) DEFAULT NULL COMMENT '申请部门',
|
||||
`applicant_id` bigint(20) DEFAULT NULL COMMENT '申请人ID',
|
||||
`applicant_name` varchar(100) DEFAULT NULL COMMENT '申请人',
|
||||
`approval_status` varchar(50) DEFAULT NULL COMMENT '审批状态',
|
||||
`current_node` varchar(100) DEFAULT NULL COMMENT '当前节点',
|
||||
`current_processor` varchar(100) DEFAULT NULL COMMENT '当前处理人',
|
||||
`approved_time` datetime DEFAULT NULL COMMENT '审核通过时间',
|
||||
`attachments_json` text DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_temp_credit_project` (`project_id`) USING BTREE,
|
||||
KEY `idx_temp_credit_dept` (`apply_dept_id`) USING BTREE,
|
||||
KEY `idx_temp_credit_status` (`approval_status`) USING BTREE,
|
||||
KEY `idx_temp_credit_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='临时额度申请';
|
||||
|
||||
DROP TABLE IF EXISTS `blade_contract_manage`;
|
||||
CREATE TABLE `blade_contract_manage` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`contract_no` varchar(100) DEFAULT NULL COMMENT '合同编号',
|
||||
`contract_name` varchar(100) DEFAULT NULL COMMENT '合同名称',
|
||||
`project_id` bigint(20) DEFAULT NULL COMMENT '所属项目ID',
|
||||
`project_name` varchar(100) DEFAULT NULL COMMENT '所属项目',
|
||||
`organization_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`organization_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`contract_category` varchar(50) DEFAULT NULL COMMENT '合同类别',
|
||||
`sign_type` varchar(50) DEFAULT NULL COMMENT '签约类型',
|
||||
`party_a` varchar(200) DEFAULT NULL COMMENT '甲方',
|
||||
`party_b` varchar(200) DEFAULT NULL COMMENT '乙方',
|
||||
`start_date` date DEFAULT NULL COMMENT '开始日期',
|
||||
`end_date` date DEFAULT NULL COMMENT '结束日期',
|
||||
`temporary_start_date` date DEFAULT NULL COMMENT '临时效力起',
|
||||
`temporary_end_date` date DEFAULT NULL COMMENT '临时效力止',
|
||||
`handler_user_id` bigint(20) DEFAULT NULL COMMENT '经办人ID',
|
||||
`handler_user_name` varchar(100) DEFAULT NULL COMMENT '经办人',
|
||||
`sign_date` date DEFAULT NULL COMMENT '签订日期',
|
||||
`settlement_mode` varchar(100) DEFAULT NULL COMMENT '结算方式',
|
||||
`contract_format` varchar(50) DEFAULT NULL COMMENT '合同格式',
|
||||
`legal_seal_flag` int(11) DEFAULT '0' COMMENT '是否需要加盖法人章',
|
||||
`copy_count` int(11) DEFAULT NULL COMMENT '一式份数',
|
||||
`payment_days` int(11) DEFAULT NULL COMMENT '回款账期(天)',
|
||||
`contract_stage` varchar(50) DEFAULT NULL COMMENT '合同阶段',
|
||||
`approval_status` varchar(50) DEFAULT NULL COMMENT '审核状态',
|
||||
`current_node` varchar(100) DEFAULT NULL COMMENT '当前节点',
|
||||
`current_processor` varchar(100) DEFAULT NULL COMMENT '当前处理人',
|
||||
`approved_time` datetime DEFAULT NULL COMMENT '审核通过时间',
|
||||
`billing_enabled` int(11) DEFAULT '0' COMMENT '计费信息开关',
|
||||
`contract_file_json` text DEFAULT NULL COMMENT '合同主文件JSON',
|
||||
`attachments_json` text DEFAULT NULL COMMENT '其它附件JSON',
|
||||
`billing_plan_json` text DEFAULT NULL COMMENT '计费方案JSON',
|
||||
`settlement_rule_json` text DEFAULT NULL COMMENT '结算生成规则JSON',
|
||||
`reconciliation_json` text DEFAULT NULL COMMENT '对账配置JSON',
|
||||
`change_record_json` text DEFAULT NULL COMMENT '变更记录JSON',
|
||||
`change_content` text DEFAULT NULL COMMENT '变更内容',
|
||||
`change_reason` varchar(500) DEFAULT NULL COMMENT '变更原因',
|
||||
`terminate_reason` varchar(500) DEFAULT NULL COMMENT '终止原因',
|
||||
`remark` varchar(2000) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_contract_project` (`project_id`) USING BTREE,
|
||||
KEY `idx_contract_org` (`organization_id`) USING BTREE,
|
||||
KEY `idx_contract_stage_status` (`contract_stage`, `approval_status`) USING BTREE,
|
||||
KEY `idx_contract_end_date` (`end_date`) USING BTREE,
|
||||
KEY `idx_contract_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='合同管理';
|
||||
|
||||
INSERT IGNORE INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
|
||||
(2100000000000000000, 0, 'project_manage', '项目管理', 'project_manage', '/project', 'iconfont icon-caidan', 41, 1, 0, 1, NULL, '', 0),
|
||||
(2100000000000000100, 2100000000000000000, 'project_apply', '项目管理', 'project_apply', '/business/project-apply', 'iconfont icon-caidanguanli', 10, 1, 0, 1, NULL, '', 0),
|
||||
(2100000000000000101, 2100000000000000100, 'project_apply_view', '查看', 'project_apply_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000102, 2100000000000000100, 'project_apply_add', '新增', 'project_apply_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000103, 2100000000000000100, 'project_apply_edit', '编辑', 'project_apply_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000104, 2100000000000000100, 'project_apply_delete', '删除', 'project_apply_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000105, 2100000000000000100, 'project_apply_export', '批量导出', 'project_apply_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000106, 2100000000000000100, 'project_apply_submit', '提交审批', 'project_apply_submit', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000107, 2100000000000000100, 'project_apply_withdraw', '撤回', 'project_apply_withdraw', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000108, 2100000000000000100, 'project_apply_approve', '审批通过', 'project_apply_approve', '', '', 8, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000109, 2100000000000000100, 'project_apply_reject', '审批驳回', 'project_apply_reject', '', '', 9, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000110, 2100000000000000100, 'project_apply_change', '发起变更', 'project_apply_change', '', '', 10, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000111, 2100000000000000100, 'project_apply_void', '作废', 'project_apply_void', '', '', 11, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000200, 2100000000000000000, 'temporary_credit_limit', '临时额度管理', 'temporary_credit_limit', '/business/temporary-credit-limit', 'iconfont icon-caidanguanli', 20, 1, 0, 1, NULL, '', 0),
|
||||
(2100000000000000201, 2100000000000000200, 'temporary_credit_limit_view', '查看', 'temporary_credit_limit_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000202, 2100000000000000200, 'temporary_credit_limit_add', '新增', 'temporary_credit_limit_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000203, 2100000000000000200, 'temporary_credit_limit_edit', '编辑', 'temporary_credit_limit_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000204, 2100000000000000200, 'temporary_credit_limit_delete', '删除', 'temporary_credit_limit_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000205, 2100000000000000200, 'temporary_credit_limit_export', '批量导出', 'temporary_credit_limit_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000206, 2100000000000000200, 'temporary_credit_limit_submit', '提交审批', 'temporary_credit_limit_submit', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000207, 2100000000000000200, 'temporary_credit_limit_withdraw', '撤回', 'temporary_credit_limit_withdraw', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000208, 2100000000000000200, 'temporary_credit_limit_approve', '审批通过', 'temporary_credit_limit_approve', '', '', 8, 2, 0, 1, NULL, '', 0),
|
||||
(2100000000000000209, 2100000000000000200, 'temporary_credit_limit_reject', '审批驳回', 'temporary_credit_limit_reject', '', '', 9, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000000, 0, 'contract_manage_root', '合同管理', 'contract_manage_root', '/contract', 'iconfont icon-caidan', 42, 1, 0, 1, NULL, '', 0),
|
||||
(2110000000000000100, 2110000000000000000, 'contract_manage', '合同管理', 'contract_manage', '/business/contract-manage', 'iconfont icon-caidanguanli', 10, 1, 0, 1, NULL, '', 0),
|
||||
(2110000000000000101, 2110000000000000100, 'contract_manage_view', '查看', 'contract_manage_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000102, 2110000000000000100, 'contract_manage_add', '新增', 'contract_manage_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000103, 2110000000000000100, 'contract_manage_edit', '编辑', 'contract_manage_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000104, 2110000000000000100, 'contract_manage_delete', '删除', 'contract_manage_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000105, 2110000000000000100, 'contract_manage_export', '批量导出', 'contract_manage_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000106, 2110000000000000100, 'contract_manage_copy', '复制', 'contract_manage_copy', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000107, 2110000000000000100, 'contract_manage_temp', '转临时合同', 'contract_manage_temp', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000108, 2110000000000000100, 'contract_manage_formal', '转正式合同', 'contract_manage_formal', '', '', 8, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000109, 2110000000000000100, 'contract_manage_withdraw', '撤回', 'contract_manage_withdraw', '', '', 9, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000110, 2110000000000000100, 'contract_manage_approve', '审批通过', 'contract_manage_approve', '', '', 10, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000111, 2110000000000000100, 'contract_manage_reject', '审批驳回', 'contract_manage_reject', '', '', 11, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000112, 2110000000000000100, 'contract_manage_change', '发起变更', 'contract_manage_change', '', '', 12, 2, 0, 1, NULL, '', 0),
|
||||
(2110000000000000113, 2110000000000000100, 'contract_manage_terminate', '终止合同', 'contract_manage_terminate', '', '', 13, 2, 0, 1, NULL, '', 0);
|
||||
306
doc/sql/transport/blade_tms_business.sql
Normal file
306
doc/sql/transport/blade_tms_business.sql
Normal file
@@ -0,0 +1,306 @@
|
||||
-- TMS 业务管理模块
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_common_route
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_common_route`;
|
||||
CREATE TABLE `blade_common_route` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`route_code` varchar(100) DEFAULT NULL COMMENT '线路编号',
|
||||
`route_name` varchar(100) DEFAULT NULL COMMENT '线路名称',
|
||||
`departure_address_id` bigint(20) DEFAULT NULL COMMENT '发货地址ID',
|
||||
`departure_name` varchar(100) DEFAULT NULL COMMENT '发货地',
|
||||
`departure_address` varchar(255) DEFAULT NULL COMMENT '发货地址',
|
||||
`departure_longitude` decimal(18,6) DEFAULT NULL COMMENT '发货经度',
|
||||
`departure_latitude` decimal(18,6) DEFAULT NULL COMMENT '发货纬度',
|
||||
`departure_contact` varchar(100) DEFAULT NULL COMMENT '发货联系人',
|
||||
`departure_phone` varchar(100) DEFAULT NULL COMMENT '发货联系方式',
|
||||
`arrival_address_id` bigint(20) DEFAULT NULL COMMENT '收货地址ID',
|
||||
`arrival_name` varchar(100) DEFAULT NULL COMMENT '收货地',
|
||||
`arrival_address` varchar(255) DEFAULT NULL COMMENT '收货地址',
|
||||
`arrival_longitude` decimal(18,6) DEFAULT NULL COMMENT '收货经度',
|
||||
`arrival_latitude` decimal(18,6) DEFAULT NULL COMMENT '收货纬度',
|
||||
`arrival_contact` varchar(100) DEFAULT NULL COMMENT '收货联系人',
|
||||
`arrival_phone` varchar(100) DEFAULT NULL COMMENT '收货联系方式',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`dept_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_common_route_dept` (`dept_id`) USING BTREE,
|
||||
KEY `idx_common_route_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='常用线路';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_common_cargo
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_common_cargo`;
|
||||
CREATE TABLE `blade_common_cargo` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`first_cargo_type_id` bigint(20) DEFAULT NULL COMMENT '一级货物类型ID',
|
||||
`first_cargo_type_name` varchar(100) DEFAULT NULL COMMENT '一级货物类型',
|
||||
`first_cargo_type_code` varchar(100) DEFAULT NULL COMMENT '一级货物类型编码',
|
||||
`second_cargo_type_id` bigint(20) DEFAULT NULL COMMENT '二级货物类型ID',
|
||||
`second_cargo_type_name` varchar(100) DEFAULT NULL COMMENT '二级货物类型',
|
||||
`second_cargo_type_code` varchar(100) DEFAULT NULL COMMENT '二级货物类型编码',
|
||||
`cargo_name` varchar(100) DEFAULT NULL COMMENT '货物名称',
|
||||
`cargo_code` varchar(100) DEFAULT NULL COMMENT '货物编号',
|
||||
`brand` varchar(100) DEFAULT NULL COMMENT '品牌',
|
||||
`package_type` varchar(100) DEFAULT NULL COMMENT '包装',
|
||||
`cargo_value` decimal(18,6) DEFAULT NULL COMMENT '货值',
|
||||
`specification` varchar(100) DEFAULT NULL COMMENT '规格',
|
||||
`price_unit` varchar(100) DEFAULT NULL COMMENT '计价单位',
|
||||
`model` varchar(100) DEFAULT NULL COMMENT '型号',
|
||||
`description_one` varchar(100) DEFAULT NULL COMMENT '说明1',
|
||||
`size_text` varchar(100) DEFAULT NULL COMMENT '尺寸',
|
||||
`description_two` varchar(100) DEFAULT NULL COMMENT '说明2',
|
||||
`data_source` varchar(100) DEFAULT NULL COMMENT '数据来源',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`dept_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_common_cargo_dept` (`dept_id`) USING BTREE,
|
||||
KEY `idx_common_cargo_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='常用货物';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_process_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_process_config`;
|
||||
CREATE TABLE `blade_process_config` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`config_code` varchar(100) DEFAULT NULL COMMENT '配置编号',
|
||||
`config_name` varchar(100) DEFAULT NULL COMMENT '配置名称',
|
||||
`project_ids` varchar(100) DEFAULT NULL COMMENT '项目ID集合',
|
||||
`project_names` varchar(100) DEFAULT NULL COMMENT '项目',
|
||||
`included_nodes` varchar(100) DEFAULT NULL COMMENT '包含过程节点',
|
||||
`default_finish_days` int(11) DEFAULT NULL COMMENT '默认后台完成运输天数',
|
||||
`node_config_json` text DEFAULT NULL COMMENT '过程节点配置',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`dept_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_process_config_dept` (`dept_id`) USING BTREE,
|
||||
KEY `idx_process_config_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='过程配置';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_shipping_template
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_shipping_template`;
|
||||
CREATE TABLE `blade_shipping_template` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`template_code` varchar(100) DEFAULT NULL COMMENT '模板编号',
|
||||
`template_name` varchar(100) DEFAULT NULL COMMENT '模板名称',
|
||||
`template_type` varchar(100) DEFAULT NULL COMMENT '模板类型',
|
||||
`project_id` bigint(20) DEFAULT NULL COMMENT '项目ID',
|
||||
`project_name` varchar(100) DEFAULT NULL COMMENT '项目',
|
||||
`contract_id` bigint(20) DEFAULT NULL COMMENT '客户合同ID',
|
||||
`contract_name` varchar(100) DEFAULT NULL COMMENT '客户合同',
|
||||
`transport_type` varchar(100) DEFAULT NULL COMMENT '运输类型',
|
||||
`departure_address_id` bigint(20) DEFAULT NULL COMMENT '发货地址ID',
|
||||
`departure_name` varchar(100) DEFAULT NULL COMMENT '发货地',
|
||||
`departure_address` varchar(255) DEFAULT NULL COMMENT '发货地址',
|
||||
`departure_contact` varchar(100) DEFAULT NULL COMMENT '发货联系人',
|
||||
`departure_phone` varchar(100) DEFAULT NULL COMMENT '发货联系方式',
|
||||
`arrival_address_id` bigint(20) DEFAULT NULL COMMENT '收货地址ID',
|
||||
`arrival_name` varchar(100) DEFAULT NULL COMMENT '收货地',
|
||||
`arrival_address` varchar(255) DEFAULT NULL COMMENT '收货地址',
|
||||
`arrival_contact` varchar(100) DEFAULT NULL COMMENT '收货联系人',
|
||||
`arrival_phone` varchar(100) DEFAULT NULL COMMENT '收货联系方式',
|
||||
`goods_json` text DEFAULT NULL COMMENT '货物信息',
|
||||
`freight_json` text DEFAULT NULL COMMENT '运费信息',
|
||||
`attachments_json` text DEFAULT NULL COMMENT '附件',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`dept_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_shipping_template_dept` (`dept_id`) USING BTREE,
|
||||
KEY `idx_shipping_template_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发货模板';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_transport_plan
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_transport_plan`;
|
||||
CREATE TABLE `blade_transport_plan` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`plan_no` varchar(100) DEFAULT NULL COMMENT '计划单号',
|
||||
`plan_name` varchar(100) DEFAULT NULL COMMENT '计划名称',
|
||||
`project_id` bigint(20) DEFAULT NULL COMMENT '项目ID',
|
||||
`project_name` varchar(100) DEFAULT NULL COMMENT '项目',
|
||||
`contract_id` bigint(20) DEFAULT NULL COMMENT '客户合同ID',
|
||||
`contract_name` varchar(100) DEFAULT NULL COMMENT '客户合同',
|
||||
`customer_name` varchar(100) DEFAULT NULL COMMENT '客户名称',
|
||||
`transport_type` varchar(100) DEFAULT NULL COMMENT '运输类型',
|
||||
`plan_start_date` date DEFAULT NULL COMMENT '计划开始日期',
|
||||
`plan_end_date` date DEFAULT NULL COMMENT '计划结束日期',
|
||||
`departure_address_id` bigint(20) DEFAULT NULL COMMENT '发货地址ID',
|
||||
`departure_name` varchar(100) DEFAULT NULL COMMENT '发货地',
|
||||
`departure_address` varchar(255) DEFAULT NULL COMMENT '发货地址',
|
||||
`departure_contact` varchar(100) DEFAULT NULL COMMENT '发货联系人',
|
||||
`departure_phone` varchar(100) DEFAULT NULL COMMENT '发货联系方式',
|
||||
`arrival_address_id` bigint(20) DEFAULT NULL COMMENT '收货地址ID',
|
||||
`arrival_name` varchar(100) DEFAULT NULL COMMENT '收货地',
|
||||
`arrival_address` varchar(255) DEFAULT NULL COMMENT '收货地址',
|
||||
`arrival_contact` varchar(100) DEFAULT NULL COMMENT '收货联系人',
|
||||
`arrival_phone` varchar(100) DEFAULT NULL COMMENT '收货联系方式',
|
||||
`goods_json` text DEFAULT NULL COMMENT '货物信息',
|
||||
`attachments_json` text DEFAULT NULL COMMENT '附件',
|
||||
`data_source` varchar(100) DEFAULT NULL COMMENT '数据来源',
|
||||
`business_status` varchar(100) DEFAULT NULL COMMENT '业务状态',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`dept_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_transport_plan_dept` (`dept_id`) USING BTREE,
|
||||
KEY `idx_transport_plan_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运输计划';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for blade_waybill
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `blade_waybill`;
|
||||
CREATE TABLE `blade_waybill` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
`status` int(11) DEFAULT '1' COMMENT '状态',
|
||||
`is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
|
||||
`waybill_no` varchar(100) DEFAULT NULL COMMENT '运单号',
|
||||
`project_id` bigint(20) DEFAULT NULL COMMENT '项目ID',
|
||||
`project_name` varchar(100) DEFAULT NULL COMMENT '项目',
|
||||
`contract_id` bigint(20) DEFAULT NULL COMMENT '客户合同ID',
|
||||
`contract_name` varchar(100) DEFAULT NULL COMMENT '客户合同',
|
||||
`customer_name` varchar(100) DEFAULT NULL COMMENT '客户名称',
|
||||
`transport_type` varchar(100) DEFAULT NULL COMMENT '运输类型',
|
||||
`cargo_name` varchar(100) DEFAULT NULL COMMENT '货物名称',
|
||||
`cargo_type` varchar(100) DEFAULT NULL COMMENT '货物类型',
|
||||
`departure_address` varchar(255) DEFAULT NULL COMMENT '发货地址',
|
||||
`arrival_address` varchar(255) DEFAULT NULL COMMENT '收货地址',
|
||||
`carrier_name` varchar(100) DEFAULT NULL COMMENT '承运商名称',
|
||||
`driver_name` varchar(100) DEFAULT NULL COMMENT '司机姓名',
|
||||
`vehicle_no` varchar(100) DEFAULT NULL COMMENT '车/船/航班/班列号',
|
||||
`original_no` varchar(100) DEFAULT NULL COMMENT '原始单号',
|
||||
`business_status` varchar(100) DEFAULT NULL COMMENT '业务状态',
|
||||
`data_source` varchar(100) DEFAULT NULL COMMENT '数据来源',
|
||||
`start_date` date DEFAULT NULL COMMENT '开始日期',
|
||||
`end_date` date DEFAULT NULL COMMENT '结束日期',
|
||||
`plan_id` bigint(20) DEFAULT NULL COMMENT '运输计划ID',
|
||||
`plan_name` varchar(100) DEFAULT NULL COMMENT '计划名称',
|
||||
`master_no` varchar(100) DEFAULT NULL COMMENT '多联总单',
|
||||
`loading_no` varchar(100) DEFAULT NULL COMMENT '配载单号',
|
||||
`batch_no` varchar(100) DEFAULT NULL COMMENT '运单批次号',
|
||||
`relation_no` varchar(100) DEFAULT NULL COMMENT '关联单号',
|
||||
`current_process_node` varchar(100) DEFAULT NULL COMMENT '当前过程节点',
|
||||
`goods_json` text DEFAULT NULL COMMENT '货物信息',
|
||||
`carrier_json` text DEFAULT NULL COMMENT '承运信息',
|
||||
`process_json` text DEFAULT NULL COMMENT '过程节点',
|
||||
`freight_json` text DEFAULT NULL COMMENT '费用信息',
|
||||
`attachments_json` text DEFAULT NULL COMMENT '附件',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '所属组织ID',
|
||||
`dept_name` varchar(100) DEFAULT NULL COMMENT '所属组织',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_waybill_dept` (`dept_id`) USING BTREE,
|
||||
KEY `idx_waybill_create_time` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运单管理';
|
||||
|
||||
-- ----------------------------
|
||||
-- Menu data for business management
|
||||
-- ----------------------------
|
||||
INSERT IGNORE INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
|
||||
(2090000000000000000, 0, 'business_manage', '业务管理', 'business_manage', '/business', 'iconfont icon-caidan', 40, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000100, 2090000000000000000, 'common_route', '常用线路', 'common_route', '/business/common-route', 'iconfont icon-caidanguanli', 10, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000101, 2090000000000000100, 'common_route_view', '查看', 'common_route_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000102, 2090000000000000100, 'common_route_add', '新增', 'common_route_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000103, 2090000000000000100, 'common_route_edit', '编辑', 'common_route_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000104, 2090000000000000100, 'common_route_delete', '删除', 'common_route_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000105, 2090000000000000100, 'common_route_export', '批量导出', 'common_route_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000200, 2090000000000000000, 'common_cargo', '常用货物', 'common_cargo', '/business/common-cargo', 'iconfont icon-caidanguanli', 20, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000201, 2090000000000000200, 'common_cargo_view', '查看', 'common_cargo_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000202, 2090000000000000200, 'common_cargo_add', '新增', 'common_cargo_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000203, 2090000000000000200, 'common_cargo_edit', '编辑', 'common_cargo_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000204, 2090000000000000200, 'common_cargo_delete', '删除', 'common_cargo_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000205, 2090000000000000200, 'common_cargo_export', '批量导出', 'common_cargo_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000206, 2090000000000000200, 'common_cargo_import', '批量导入', 'common_cargo_import', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000207, 2090000000000000200, 'common_cargo_template', '下载模板', 'common_cargo_template', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000300, 2090000000000000000, 'process_config', '过程配置', 'process_config', '/business/process-config', 'iconfont icon-caidanguanli', 30, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000301, 2090000000000000300, 'process_config_view', '查看', 'process_config_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000302, 2090000000000000300, 'process_config_add', '新增', 'process_config_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000303, 2090000000000000300, 'process_config_edit', '编辑', 'process_config_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000304, 2090000000000000300, 'process_config_delete', '删除', 'process_config_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000305, 2090000000000000300, 'process_config_export', '批量导出', 'process_config_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000306, 2090000000000000300, 'process_config_copy', '复制', 'process_config_copy', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000307, 2090000000000000300, 'process_config_enable', '启用', 'process_config_enable', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000308, 2090000000000000300, 'process_config_disable', '停用', 'process_config_disable', '', '', 8, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000400, 2090000000000000000, 'shipping_template', '发货模板', 'shipping_template', '/business/shipping-template', 'iconfont icon-caidanguanli', 40, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000401, 2090000000000000400, 'shipping_template_view', '查看', 'shipping_template_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000402, 2090000000000000400, 'shipping_template_add', '新增', 'shipping_template_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000403, 2090000000000000400, 'shipping_template_edit', '编辑', 'shipping_template_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000404, 2090000000000000400, 'shipping_template_delete', '删除', 'shipping_template_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000405, 2090000000000000400, 'shipping_template_export', '批量导出', 'shipping_template_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000406, 2090000000000000400, 'shipping_template_copy', '复制', 'shipping_template_copy', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000500, 2090000000000000000, 'transport_plan', '运输计划', 'transport_plan', '/business/transport-plan', 'iconfont icon-caidanguanli', 50, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000501, 2090000000000000500, 'transport_plan_view', '查看', 'transport_plan_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000502, 2090000000000000500, 'transport_plan_add', '新增', 'transport_plan_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000503, 2090000000000000500, 'transport_plan_edit', '编辑', 'transport_plan_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000504, 2090000000000000500, 'transport_plan_delete', '删除', 'transport_plan_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000505, 2090000000000000500, 'transport_plan_export', '批量导出', 'transport_plan_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000506, 2090000000000000500, 'transport_plan_copy', '复制', 'transport_plan_copy', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000507, 2090000000000000500, 'transport_plan_cancel', '取消', 'transport_plan_cancel', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000508, 2090000000000000500, 'transport_plan_complete', '完成', 'transport_plan_complete', '', '', 8, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000600, 2090000000000000000, 'waybill_manage', '运单管理', 'waybill_manage', '/business/waybill-manage', 'iconfont icon-caidanguanli', 60, 1, 0, 1, NULL, '', 0),
|
||||
(2090000000000000601, 2090000000000000600, 'waybill_manage_view', '查看', 'waybill_manage_view', '', '', 1, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000602, 2090000000000000600, 'waybill_manage_add', '新增', 'waybill_manage_add', '', '', 2, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000603, 2090000000000000600, 'waybill_manage_edit', '编辑', 'waybill_manage_edit', '', '', 3, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000604, 2090000000000000600, 'waybill_manage_delete', '删除', 'waybill_manage_delete', '', '', 4, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000605, 2090000000000000600, 'waybill_manage_export', '批量导出', 'waybill_manage_export', '', '', 5, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000606, 2090000000000000600, 'waybill_manage_copy', '复制', 'waybill_manage_copy', '', '', 6, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000607, 2090000000000000600, 'waybill_manage_cancel', '取消', 'waybill_manage_cancel', '', '', 7, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000608, 2090000000000000600, 'waybill_manage_reassign', '重新派单', 'waybill_manage_reassign', '', '', 8, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000609, 2090000000000000600, 'waybill_manage_complete', '完成', 'waybill_manage_complete', '', '', 9, 2, 0, 1, NULL, '', 0),
|
||||
(2090000000000000610, 2090000000000000600, 'waybill_manage_batch_complete', '批量完成', 'waybill_manage_batch_complete', '', '', 10, 2, 0, 1, NULL, '', 0);
|
||||
Reference in New Issue
Block a user