Compare commits
15 Commits
30c51ba271
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ec904f68d | |||
| 044b5dc3f8 | |||
| 21b2884bad | |||
| ed0e61563c | |||
| de5cecd0cd | |||
| ceafeba393 | |||
| 5035f75fd7 | |||
| f716b3fc63 | |||
| a1eea5075b | |||
| 28eb484a68 | |||
| 58726a675e | |||
| d47d6b4b23 | |||
| 2079fa5fb0 | |||
| 78b430bed8 | |||
| 62a110b6de |
@@ -21,9 +21,9 @@ public class FileCertificateBatchRecognitionDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 所有图像 obs key列表
|
||||
* 所有图像完整 URL 列表
|
||||
*/
|
||||
@NotEmpty(message = "图像 obs key列表不能为空")
|
||||
@NotEmpty(message = "图像 URL 列表不能为空")
|
||||
private List<String> objectKeys;
|
||||
/**
|
||||
* 项目简称
|
||||
@@ -37,9 +37,33 @@ public class FileCertificateBatchRecognitionDTO implements Serializable {
|
||||
* 目录名称
|
||||
*/
|
||||
private String dirName;
|
||||
/**
|
||||
* 磅单完整 URL 列表
|
||||
*/
|
||||
private List<String> poundUrls;
|
||||
/**
|
||||
* 车头完整 URL 列表
|
||||
*/
|
||||
private List<String> carFrontUrls;
|
||||
/**
|
||||
* 驾驶证完整 URL 列表
|
||||
*/
|
||||
private List<String> driverLicenseUrls;
|
||||
/**
|
||||
* 行驶证完整 URL 列表
|
||||
*/
|
||||
private List<String> vehicleLicenseUrls;
|
||||
|
||||
public FileCertificateBatchRecognitionDTO(List<String> objectKeys) {
|
||||
this.objectKeys = objectKeys;
|
||||
}
|
||||
|
||||
public FileCertificateBatchRecognitionDTO(
|
||||
List<String> objectKeys, String projectAbbreviation, String code, String dirName) {
|
||||
this.objectKeys = objectKeys;
|
||||
this.projectAbbreviation = projectAbbreviation;
|
||||
this.code = code;
|
||||
this.dirName = dirName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -134,6 +134,30 @@ public class Dept extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "部门编码")
|
||||
private String deptCode;
|
||||
|
||||
/**
|
||||
* 组织简称
|
||||
*/
|
||||
@Schema(description = "组织简称")
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 拼音助记码
|
||||
*/
|
||||
@Schema(description = "拼音助记码")
|
||||
private String pinyinMnemonic;
|
||||
|
||||
/**
|
||||
* 助记码
|
||||
*/
|
||||
@Schema(description = "助记码")
|
||||
private String mnemonicCode;
|
||||
|
||||
/**
|
||||
* 承运商客商档案主键
|
||||
*/
|
||||
@Schema(description = "承运商客商档案主键")
|
||||
private Long carrierCustomerId;
|
||||
/**
|
||||
* 父部门编码
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.transport.pojo.entity.Waybill;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运输计划调度请求。
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "运输计划调度请求")
|
||||
public class TransportPlanDispatchRequest {
|
||||
|
||||
@Schema(description = "运输计划主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "调度方式:draft 或 submit")
|
||||
private String mode;
|
||||
|
||||
@Schema(description = "本次生成的运单")
|
||||
private List<Waybill> waybills;
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -107,9 +109,11 @@ public class ContractManage extends TenantEntity {
|
||||
private Integer legalSealFlag;
|
||||
|
||||
@Schema(description = "一式份数")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer copyCount;
|
||||
|
||||
@Schema(description = "回款账期(天)")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer paymentDays;
|
||||
|
||||
@Schema(description = "合同阶段")
|
||||
|
||||
@@ -34,6 +34,7 @@ import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 评分项目实体类
|
||||
@@ -71,6 +72,11 @@ public class CreditScoreItem extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "评分项目")
|
||||
private String itemName;
|
||||
/**
|
||||
* 分值
|
||||
*/
|
||||
@Schema(description = "分值")
|
||||
private BigDecimal score;
|
||||
/**
|
||||
* 得分说明
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -93,6 +95,7 @@ public class CustomerArchive extends TenantEntity {
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "开票税点")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private BigDecimal invoiceTaxRate;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
@@ -102,9 +105,11 @@ public class CustomerArchive extends TenantEntity {
|
||||
private String businessTermType;
|
||||
|
||||
@Schema(description = "营业期限截止日")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private LocalDate businessEndDate;
|
||||
|
||||
@Schema(description = "注册资金(万元)")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private BigDecimal registeredCapital;
|
||||
|
||||
@Schema(description = "客商负责人")
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* 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_equipment_ledger")
|
||||
@Schema(description = "设备台账")
|
||||
public class EquipmentLedger extends TenantEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String vehicleType;
|
||||
private String vehicleNo;
|
||||
private String equipmentCode;
|
||||
private String equipmentName;
|
||||
private String equipmentBrand;
|
||||
private String equipmentType;
|
||||
private String specificationModel;
|
||||
private LocalDate factoryDate;
|
||||
private String originalEquipmentNo;
|
||||
private String remark;
|
||||
private String attachments;
|
||||
private Integer onlineStatus;
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
*/
|
||||
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_loading_manage")
|
||||
@Schema(description = "配载管理")
|
||||
public class LoadingManage extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "配载单号")
|
||||
private String loadingNo;
|
||||
|
||||
@Schema(description = "配载子单号")
|
||||
private String loadingSubNos;
|
||||
|
||||
@Schema(description = "运单ID集合")
|
||||
private String waybillIdsJson;
|
||||
|
||||
@Schema(description = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "运输类型")
|
||||
private String transportType;
|
||||
|
||||
@Schema(description = "货物类型")
|
||||
private String cargoType;
|
||||
|
||||
@Schema(description = "货物名称")
|
||||
private String cargoName;
|
||||
|
||||
@Schema(description = "车/船/航班/班列")
|
||||
private String vehicleNo;
|
||||
|
||||
@Schema(description = "挂车车牌号")
|
||||
private String trailerVehicleNo;
|
||||
|
||||
@Schema(description = "司机")
|
||||
private String driverName;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String driverPhone;
|
||||
|
||||
@Schema(description = "押运人")
|
||||
private String escortName;
|
||||
|
||||
@Schema(description = "押运人手机号")
|
||||
private String escortPhone;
|
||||
|
||||
@Schema(description = "承运类型")
|
||||
private String carrierType;
|
||||
|
||||
@Schema(description = "承运商")
|
||||
private String carrierName;
|
||||
|
||||
@Schema(description = "发货地址")
|
||||
private String departureAddress;
|
||||
|
||||
@Schema(description = "途经地")
|
||||
private String transitAddress;
|
||||
|
||||
@Schema(description = "到货地")
|
||||
private String arrivalAddress;
|
||||
|
||||
@Schema(description = "原始单号")
|
||||
private String originalNo;
|
||||
|
||||
@Schema(description = "数据来源")
|
||||
private String dataSource;
|
||||
|
||||
@Schema(description = "开始日期")
|
||||
private LocalDate startDate;
|
||||
|
||||
@Schema(description = "结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
@Schema(description = "计划名称")
|
||||
private String planName;
|
||||
|
||||
@Schema(description = "运单批次号")
|
||||
private String batchNo;
|
||||
|
||||
@Schema(description = "当前过程节点")
|
||||
private String currentProcessNode;
|
||||
|
||||
@Schema(description = "里程")
|
||||
private BigDecimal mileage;
|
||||
|
||||
@Schema(description = "预计发货日期")
|
||||
private LocalDate estimatedStartDate;
|
||||
|
||||
@Schema(description = "预计完成日期")
|
||||
private LocalDate estimatedEndDate;
|
||||
|
||||
@Schema(description = "任务备注")
|
||||
private String taskRemark;
|
||||
|
||||
@Schema(description = "货物信息")
|
||||
private String goodsJson;
|
||||
|
||||
@Schema(description = "路线信息")
|
||||
private String routeJson;
|
||||
|
||||
@Schema(description = "任务信息")
|
||||
private String taskInfoJson;
|
||||
|
||||
@Schema(description = "所属组织ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "所属组织")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "业务状态")
|
||||
private String businessStatus;
|
||||
|
||||
}
|
||||
@@ -213,5 +213,11 @@ public class TransportVehicle extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
/** 认证状态:0认证中 1认证通过 2认证驳回 */
|
||||
@Schema(description = "认证状态:0认证中 1认证通过 2认证驳回")
|
||||
private Integer certificationStatus;
|
||||
/** 认证驳回原因 */
|
||||
@Schema(description = "认证驳回原因")
|
||||
private String certificationRejectReason;
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
@@ -72,21 +73,102 @@ public class Waybill extends TenantEntity {
|
||||
@Schema(description = "货物类型")
|
||||
private String cargoType;
|
||||
|
||||
@Schema(description = "规格")
|
||||
private String specification;
|
||||
|
||||
@Schema(description = "型号")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "数量单位")
|
||||
private String quantityUnit;
|
||||
|
||||
@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 taskEntryMode;
|
||||
|
||||
@Schema(description = "承运类型")
|
||||
private String carrierType;
|
||||
|
||||
@Schema(description = "承运商ID")
|
||||
private Long carrierId;
|
||||
|
||||
@Schema(description = "承运商名称")
|
||||
private String carrierName;
|
||||
|
||||
@Schema(description = "司机ID")
|
||||
private Long driverId;
|
||||
|
||||
@Schema(description = "司机姓名")
|
||||
private String driverName;
|
||||
|
||||
@Schema(description = "司机手机号")
|
||||
private String driverPhone;
|
||||
|
||||
@Schema(description = "车/船/航班/班列号")
|
||||
private String vehicleNo;
|
||||
|
||||
@Schema(description = "挂车车牌号")
|
||||
private String trailerVehicleNo;
|
||||
|
||||
@Schema(description = "押运人")
|
||||
private String escortName;
|
||||
|
||||
@Schema(description = "押运人手机号")
|
||||
private String escortPhone;
|
||||
|
||||
@Schema(description = "里程")
|
||||
private BigDecimal mileage;
|
||||
|
||||
@Schema(description = "预计发货日期")
|
||||
private LocalDate estimatedStartTime;
|
||||
|
||||
@Schema(description = "预计完成日期")
|
||||
private LocalDate estimatedEndTime;
|
||||
|
||||
@Schema(description = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Schema(description = "计价单位")
|
||||
private String priceUnit;
|
||||
|
||||
@Schema(description = "其他费用合计")
|
||||
private BigDecimal otherFeeTotal;
|
||||
|
||||
@Schema(description = "任务备注")
|
||||
private String taskRemark;
|
||||
|
||||
@Schema(description = "原始单号")
|
||||
private String originalNo;
|
||||
|
||||
@@ -117,6 +199,9 @@ public class Waybill extends TenantEntity {
|
||||
@Schema(description = "运单批次号")
|
||||
private String batchNo;
|
||||
|
||||
@Schema(description = "导入批次ID")
|
||||
private Long importBatchId;
|
||||
|
||||
@Schema(description = "关联单号")
|
||||
private String relationNo;
|
||||
|
||||
@@ -129,6 +214,9 @@ public class Waybill extends TenantEntity {
|
||||
@Schema(description = "承运信息")
|
||||
private String carrierJson;
|
||||
|
||||
@Schema(description = "任务信息")
|
||||
private String taskInfoJson;
|
||||
|
||||
@Schema(description = "过程节点")
|
||||
private String processJson;
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ public class ContractManageVO extends ContractManage {
|
||||
@Schema(description = "到期快捷筛选")
|
||||
private String expireScope;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "生效类型筛选")
|
||||
private String effectiveType;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@@ -60,6 +60,10 @@ public class CreditScoreQuantificationVO extends CreditScoreQuantification {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "评分分类")
|
||||
private List<CreditScoreCategoryVO> categories = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* 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.EquipmentLedger;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 设备台账视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "设备台账")
|
||||
public class EquipmentLedgerVO extends EquipmentLedger {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableField(exist = false)
|
||||
private String updateUserName;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
*/
|
||||
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.LoadingManage;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 配载管理视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "配载管理")
|
||||
public class LoadingManageVO extends LoadingManage {
|
||||
|
||||
@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;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "运单号")
|
||||
private String waybillNo;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "开始日期起")
|
||||
private LocalDate startDateStart;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "开始日期止")
|
||||
private LocalDate startDateEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "结束日期起")
|
||||
private LocalDate endDateStart;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "结束日期止")
|
||||
private LocalDate endDateEnd;
|
||||
|
||||
}
|
||||
@@ -71,4 +71,8 @@ public class ProjectApplyVO extends ProjectApply {
|
||||
@Schema(description = "变更类型")
|
||||
private String changeType;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "是否仅查询可用于临时额度申请的项目")
|
||||
private Boolean temporaryCreditLimitSelectable;
|
||||
|
||||
}
|
||||
|
||||
@@ -62,5 +62,8 @@ public class WaybillVO extends Waybill {
|
||||
@Schema(description = "业务状态名称")
|
||||
private String businessStatusName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "是否仅查询未配载运单")
|
||||
private Integer onlyUnassignedLoading;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -35,6 +36,7 @@ import org.springblade.system.pojo.context.IPhone;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
@@ -133,6 +135,27 @@ public class User extends TenantEntity implements IPhone {
|
||||
* 是否推送mk
|
||||
*/
|
||||
private Integer isPushMk;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* OA 人员 ID(由用户部门关联表聚合查询返回)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String oaPersonId;
|
||||
/** 人员类别:1-内部员工,2-承运商 */
|
||||
private Integer personCategory;
|
||||
/** 数据权限范围:1-仅所属组织,2-全部组织,3-自定义 */
|
||||
private Integer dataScopeRange;
|
||||
/** 数据层级范围:1-包含下级,2-仅本级 */
|
||||
private Integer dataLevelRange;
|
||||
/** 是否包含新增客商 */
|
||||
private Integer includeNewCustomer;
|
||||
@TableField(exist = false)
|
||||
private List<Long> dataScopeDeptIds;
|
||||
@TableField(exist = false)
|
||||
private List<Long> customerIds;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("blade_user_customer_scope")
|
||||
public class UserCustomerScope {
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private Long customerId;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("blade_user_data_scope")
|
||||
public class UserDataScope {
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private Long deptId;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM docker.io/bladex/alpine-java:openjdk17_cn_slim
|
||||
ARG ACTIVE
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
@@ -8,12 +8,13 @@ ENV TZ=Asia/Shanghai
|
||||
# 设置时区信息
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# 创建 JVM GC 日志、堆转储和应用日志目录
|
||||
RUN mkdir -p /opt/logs
|
||||
|
||||
COPY ./target/blade-file.jar /opt/app.jar
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
EXPOSE 8107
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/opt/logs", "-XX:ErrorFile=/opt/logs/hs_err_pid%p.log", "-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M", "-XX:MaxDirectMemorySize=512m", "-Xms1024m", "-Xmx4096m", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=${ACTIVE}","--logging.path=/opt/logs"]
|
||||
ENTRYPOINT ["/bin/sh", "-c", "exec java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -Djava.security.egd=file:/dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/logs -XX:ErrorFile=/opt/logs/hs_err_pid%p.log '-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M' -XX:MaxDirectMemorySize=512m -Xms1024m -Xmx4096m -jar app.jar --spring.profiles.active=${ACTIVE:-prod} --logging.path=/opt/logs"]
|
||||
|
||||
@@ -8,12 +8,13 @@ ENV TZ=Asia/Shanghai
|
||||
# 设置时区信息
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# 创建 JVM GC 日志、堆转储和应用日志目录
|
||||
RUN mkdir -p /opt/logs
|
||||
|
||||
COPY ./target/blade-file.jar /opt/app.jar
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
EXPOSE 8107
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/opt/logs", "-XX:ErrorFile=/opt/logs/hs_err_pid%p.log", "-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M", "-XX:MaxDirectMemorySize=512m", "-Xms1024m", "-Xmx1024m", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=${ACTIVE}","--logging.path=/opt/logs"]
|
||||
ENTRYPOINT ["/bin/sh", "-c", "exec java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -Djava.security.egd=file:/dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/logs -XX:ErrorFile=/opt/logs/hs_err_pid%p.log '-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M' -XX:MaxDirectMemorySize=512m -Xms1024m -Xmx1024m -jar app.jar --spring.profiles.active=${ACTIVE:-prod} --logging.path=/opt/logs"]
|
||||
|
||||
@@ -29,7 +29,9 @@ import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@@ -145,8 +147,94 @@ public class FileController extends BladeController {
|
||||
@ApiLog("OCR识别-识别车辆运输凭证(不知道类型)")
|
||||
@Operation(summary = "识别车辆运输凭证,不知道类型", description = "参数:objectKeylist")
|
||||
@PostMapping("/recognitionTransportCertificates")
|
||||
public R<TransportCertificateVO> recognitionTransportCertificates(@RequestBody List<String> objectKeys, @RequestParam(value = "projectAbbreviation", required = false) String projectAbbreviation, @RequestParam(value = "code", required = false) String code) {
|
||||
return R.data(ocrConvertService.recognitionTransportCertificate(new FileCertificateBatchRecognitionDTO(objectKeys, projectAbbreviation, code, null)));
|
||||
public R<TransportCertificateVO> recognitionTransportCertificates(
|
||||
@RequestBody List<Object> attachments,
|
||||
@RequestParam(value = "projectAbbreviation", required = false) String projectAbbreviation,
|
||||
@RequestParam(value = "code", required = false) String code) {
|
||||
return R.data(ocrConvertService.recognitionTransportCertificate(
|
||||
buildCertificateBatchRecognitionDTO(attachments, projectAbbreviation, code)
|
||||
));
|
||||
}
|
||||
|
||||
private FileCertificateBatchRecognitionDTO buildCertificateBatchRecognitionDTO(
|
||||
List<Object> attachments, String projectAbbreviation, String code) {
|
||||
List<String> objectKeys = new ArrayList<>();
|
||||
List<String> poundUrls = new ArrayList<>();
|
||||
List<String> carFrontUrls = new ArrayList<>();
|
||||
List<String> driverLicenseUrls = new ArrayList<>();
|
||||
List<String> vehicleLicenseUrls = new ArrayList<>();
|
||||
for (Object attachment : Optional.ofNullable(attachments).orElse(List.of())) {
|
||||
if (attachment instanceof String objectKey) {
|
||||
if (StringUtil.isNotBlank(objectKey)) {
|
||||
objectKeys.add(objectKey);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (attachment instanceof Map<?, ?> attachmentMap) {
|
||||
String objectKey = getAttachmentObjectKey(attachmentMap);
|
||||
if (StringUtil.isBlank(objectKey)) {
|
||||
continue;
|
||||
}
|
||||
objectKeys.add(objectKey);
|
||||
addTypedObjectKeys(attachmentMap, poundUrls, carFrontUrls, driverLicenseUrls, vehicleLicenseUrls);
|
||||
}
|
||||
}
|
||||
FileCertificateBatchRecognitionDTO dto = new FileCertificateBatchRecognitionDTO(
|
||||
objectKeys, projectAbbreviation, code, null
|
||||
);
|
||||
dto.setPoundUrls(poundUrls);
|
||||
dto.setCarFrontUrls(carFrontUrls);
|
||||
dto.setDriverLicenseUrls(driverLicenseUrls);
|
||||
dto.setVehicleLicenseUrls(vehicleLicenseUrls);
|
||||
return dto;
|
||||
}
|
||||
|
||||
private String getAttachmentObjectKey(Map<?, ?> map) {
|
||||
String objectKey = getMapString(map, "objectKey");
|
||||
if (StringUtil.isNotBlank(objectKey)) {
|
||||
return objectKey;
|
||||
}
|
||||
String url = getMapString(map, "url");
|
||||
if (StringUtil.isNotBlank(url)) {
|
||||
return url;
|
||||
}
|
||||
String poundUrl = getMapString(map, "poundUrl");
|
||||
if (StringUtil.isNotBlank(poundUrl)) {
|
||||
return poundUrl;
|
||||
}
|
||||
String carFrontUrl = getMapString(map, "carFrontUrl");
|
||||
if (StringUtil.isNotBlank(carFrontUrl)) {
|
||||
return carFrontUrl;
|
||||
}
|
||||
String driverLicenseUrl = getMapString(map, "driverLicenseUrl");
|
||||
if (StringUtil.isNotBlank(driverLicenseUrl)) {
|
||||
return driverLicenseUrl;
|
||||
}
|
||||
return getMapString(map, "vehicleLicenseUrl");
|
||||
}
|
||||
|
||||
private void addTypedObjectKeys(
|
||||
Map<?, ?> map,
|
||||
List<String> poundUrls,
|
||||
List<String> carFrontUrls,
|
||||
List<String> driverLicenseUrls,
|
||||
List<String> vehicleLicenseUrls) {
|
||||
addMapString(map, "poundUrl", poundUrls);
|
||||
addMapString(map, "carFrontUrl", carFrontUrls);
|
||||
addMapString(map, "driverLicenseUrl", driverLicenseUrls);
|
||||
addMapString(map, "vehicleLicenseUrl", vehicleLicenseUrls);
|
||||
}
|
||||
|
||||
private void addMapString(Map<?, ?> map, String key, List<String> values) {
|
||||
String value = getMapString(map, key);
|
||||
if (StringUtil.isNotBlank(value)) {
|
||||
values.add(value);
|
||||
}
|
||||
}
|
||||
|
||||
private String getMapString(Map<?, ?> map, String key) {
|
||||
Object value = map.get(key);
|
||||
return value == null ? "" : String.valueOf(value);
|
||||
}
|
||||
|
||||
@ApiLog("OCR识别-识别车辆运输凭证(知道类型)")
|
||||
|
||||
@@ -5,18 +5,14 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.tool.utils.CollectionUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springblade.file.convert.OCRConverter;
|
||||
import org.springblade.file.pojo.dto.FileCertificateBatchRecognitionDTO;
|
||||
import org.springblade.file.service.IFileService;
|
||||
import org.springblade.file.service.IOCRConvertService;
|
||||
import org.springblade.thirdparty.ocr.pojo.dto.CertificateBatchRecognitionDTO;
|
||||
import org.springblade.thirdparty.ocr.pojo.vo.TransportCertificateVO;
|
||||
import org.springblade.thirdparty.ocr.service.IOCRService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2025/3/13
|
||||
@@ -26,7 +22,6 @@ import java.util.List;
|
||||
@Service
|
||||
public class OCRConvertServiceImpl implements IOCRConvertService {
|
||||
|
||||
private final IFileService fileService;
|
||||
private final IOCRService ocrService;
|
||||
private final OCRConverter converter;
|
||||
|
||||
@@ -34,24 +29,26 @@ public class OCRConvertServiceImpl implements IOCRConvertService {
|
||||
public TransportCertificateVO recognitionTransportCertificate(FileCertificateBatchRecognitionDTO param) {
|
||||
Func.requireNotNull(param, "参数不能为空");
|
||||
if (CollectionUtil.isEmpty(param.getObjectKeys())) {
|
||||
throw new ServiceException("图像obs key不能为空");
|
||||
throw new ServiceException("图像 URL 列表不能为空");
|
||||
}
|
||||
CertificateBatchRecognitionDTO ocrParam = converter.dto2ocr(param);
|
||||
// 转换文件链接
|
||||
List<String> fileUrls = param.getObjectKeys().stream()
|
||||
.map(this::resolveFileUrl)
|
||||
.toList();
|
||||
ocrParam.setUrls(fileUrls);
|
||||
ocrParam.setPoundUrls(param.getPoundUrls());
|
||||
ocrParam.setCarFrontUrls(param.getCarFrontUrls());
|
||||
ocrParam.setDriverLicenseUrls(param.getDriverLicenseUrls());
|
||||
ocrParam.setVehicleLicenseUrls(param.getVehicleLicenseUrls());
|
||||
if (!hasTypedUrls(param)) {
|
||||
ocrParam.setUrls(param.getObjectKeys());
|
||||
} else {
|
||||
ocrParam.setUrls(null);
|
||||
}
|
||||
return ocrService.recognitionTransportCertificate(ocrParam);
|
||||
}
|
||||
|
||||
private String resolveFileUrl(String objectKey) {
|
||||
if (StringUtil.isBlank(objectKey)) {
|
||||
return objectKey;
|
||||
}
|
||||
if (objectKey.startsWith("http://") || objectKey.startsWith("https://")) {
|
||||
return objectKey;
|
||||
}
|
||||
return fileService.getFileUrl(objectKey, null);
|
||||
private boolean hasTypedUrls(FileCertificateBatchRecognitionDTO param) {
|
||||
return CollectionUtil.isNotEmpty(param.getPoundUrls())
|
||||
|| CollectionUtil.isNotEmpty(param.getCarFrontUrls())
|
||||
|| CollectionUtil.isNotEmpty(param.getDriverLicenseUrls())
|
||||
|| CollectionUtil.isNotEmpty(param.getVehicleLicenseUrls());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.prod.url}
|
||||
username: ${blade.datasource.prod.username}
|
||||
password: ${blade.datasource.prod.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.test.url}
|
||||
username: ${blade.datasource.test.username}
|
||||
password: ${blade.datasource.test.password}
|
||||
@@ -1,61 +1,2 @@
|
||||
server:
|
||||
port: 8107
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
shared-configs:
|
||||
- data-id: third-party-api.yaml
|
||||
refresh: true
|
||||
|
||||
#第三方接口本地默认配置,Nacos third-party-api.yaml 可覆盖
|
||||
thirdParty:
|
||||
ocr:
|
||||
baseUrl: ${OCR_BASE_URL:http://127.0.0.1:8080}
|
||||
baseOtherUrl: ${OCR_BASE_OTHER_URL:http://127.0.0.1:8080}
|
||||
wps:
|
||||
baseUrl: ${WPS_BASE_URL:http://127.0.0.1:8080}
|
||||
oa:
|
||||
baseUrl: ${OA_BASE_URL:http://127.0.0.1:8080}
|
||||
track:
|
||||
baseUrl: ${TRACK_BASE_URL:http://127.0.0.1:8080}
|
||||
mk:
|
||||
baseUrl: ${MK_BASE_URL:http://127.0.0.1:8080}
|
||||
|
||||
#spring:
|
||||
# application:
|
||||
# name: blade-file
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# namespace: ${spring.profiles.active}
|
||||
# # 不注册到nacos
|
||||
# #registerEnabled: false
|
||||
# config:
|
||||
# # 文件后缀名
|
||||
# file-extension: yaml
|
||||
# namespace: ${spring.profiles.active}
|
||||
# shared-configs:
|
||||
# - data-id: blade.yaml
|
||||
# refresh: true
|
||||
# - data-id: blade-${spring.profiles.active}.yaml
|
||||
# refresh: true
|
||||
# - data-id: third-party-api.yaml
|
||||
# refresh: true
|
||||
# sentinel:
|
||||
# datasource:
|
||||
# flow:
|
||||
# nacos:
|
||||
# serverAddr: ${spring.cloud.nacos.server-addr}
|
||||
# username: ${spring.cloud.nacos.username}
|
||||
# password: ${spring.cloud.nacos.password}
|
||||
# dataId: sentinel-${spring.application.name}.json
|
||||
# groupId: DEFAULT_GROUP
|
||||
# namespace: ${spring.profiles.active}
|
||||
# ruleType: flow
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM bladex/alpine-java:openjdk17_cn_slim
|
||||
FROM docker.io/bladex/alpine-java:openjdk17_cn_slim
|
||||
ARG ACTIVE
|
||||
|
||||
LABEL maintainer="bladejava@qq.com"
|
||||
@@ -8,12 +8,13 @@ ENV TZ=Asia/Shanghai
|
||||
# 设置时区信息
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# 创建 JVM GC 日志、堆转储和应用日志目录
|
||||
RUN mkdir -p /opt/logs
|
||||
|
||||
COPY ./target/blade-openapi.jar /opt/app.jar
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
EXPOSE 8108
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/opt/logs", "-XX:ErrorFile=/opt/logs/hs_err_pid%p.log", "-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M", "-XX:MaxDirectMemorySize=512m", "-Xms1024m", "-Xmx4096m", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=${ACTIVE}","--logging.path=/opt/logs"]
|
||||
ENTRYPOINT ["/bin/sh", "-c", "exec java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -Djava.security.egd=file:/dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/logs -XX:ErrorFile=/opt/logs/hs_err_pid%p.log '-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M' -XX:MaxDirectMemorySize=512m -Xms1024m -Xmx4096m -jar app.jar --spring.profiles.active=${ACTIVE:-prod} --logging.path=/opt/logs"]
|
||||
|
||||
@@ -8,12 +8,13 @@ ENV TZ=Asia/Shanghai
|
||||
# 设置时区信息
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# 创建 JVM GC 日志、堆转储和应用日志目录
|
||||
RUN mkdir -p /opt/logs
|
||||
|
||||
COPY ./target/blade-openapi.jar /opt/app.jar
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
EXPOSE 8108
|
||||
|
||||
ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=/opt/logs", "-XX:ErrorFile=/opt/logs/hs_err_pid%p.log", "-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M", "-XX:MaxDirectMemorySize=512m", "-Xms1024m", "-Xmx1024m", "-jar", "app.jar"]
|
||||
|
||||
CMD ["--spring.profiles.active=${ACTIVE}","--logging.path=/opt/logs"]
|
||||
ENTRYPOINT ["/bin/sh", "-c", "exec java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -Djava.security.egd=file:/dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/logs -XX:ErrorFile=/opt/logs/hs_err_pid%p.log '-Xlog:gc*:file=/opt/logs/gc.log:time,uptime,level,tags:filecount=5,filesize=50M' -XX:MaxDirectMemorySize=512m -Xms1024m -Xmx1024m -jar app.jar --spring.profiles.active=${ACTIVE:-prod} --logging.path=/opt/logs"]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.prod.url}
|
||||
username: ${blade.datasource.prod.username}
|
||||
password: ${blade.datasource.prod.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.test.url}
|
||||
username: ${blade.datasource.test.username}
|
||||
password: ${blade.datasource.test.password}
|
||||
@@ -1,54 +1,2 @@
|
||||
server:
|
||||
port: 8108
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
shared-configs:
|
||||
- data-id: third-party-api.yaml
|
||||
refresh: true
|
||||
|
||||
#第三方接口本地默认配置,Nacos third-party-api.yaml 可覆盖
|
||||
thirdParty:
|
||||
ocr:
|
||||
baseUrl: ${OCR_BASE_URL:http://127.0.0.1:8080}
|
||||
baseOtherUrl: ${OCR_BASE_OTHER_URL:http://127.0.0.1:8080}
|
||||
wps:
|
||||
baseUrl: ${WPS_BASE_URL:http://127.0.0.1:8080}
|
||||
oa:
|
||||
baseUrl: ${OA_BASE_URL:http://127.0.0.1:8080}
|
||||
track:
|
||||
baseUrl: ${TRACK_BASE_URL:http://127.0.0.1:8080}
|
||||
mk:
|
||||
baseUrl: ${MK_BASE_URL:http://127.0.0.1:8080}
|
||||
|
||||
#spring:
|
||||
# application:
|
||||
# name: blade-openapi
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# namespace: ${spring.profiles.active}
|
||||
# # 不注册到nacos
|
||||
# #registerEnabled: false
|
||||
# config:
|
||||
# # 文件后缀名
|
||||
# file-extension: yaml
|
||||
# namespace: ${spring.profiles.active}
|
||||
# shared-configs:
|
||||
# - data-id: blade.yaml
|
||||
# refresh: true
|
||||
# - data-id: blade-${spring.profiles.active}.yaml
|
||||
# refresh: true
|
||||
# - data-id: third-party-api.yaml
|
||||
# refresh: true
|
||||
# extension-configs:
|
||||
# - data-id: ${spring.application.name}-dynamictp.yaml
|
||||
# group: DEFAULT_GROUP
|
||||
# refresh: true # 必须配置,负责自动刷新不生效
|
||||
|
||||
@@ -135,6 +135,17 @@ public class UserController {
|
||||
return R.data(UserWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户权限配置客商选项:不应用当前用户的客商数据权限。
|
||||
*/
|
||||
@IsAdmin
|
||||
@GetMapping("/customer-options")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "用户客商权限选项", description = "返回当前租户全部客商")
|
||||
public R<List<Map<String, Object>>> customerOptions() {
|
||||
return R.data(userService.selectCustomerOptions(AuthUtil.getTenantId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或修改
|
||||
*/
|
||||
|
||||
@@ -56,41 +56,41 @@ public class AirportMasterExcel implements Serializable {
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("IATA编码")
|
||||
@ExcelProperty("IATA编码*")
|
||||
private String iataCode;
|
||||
|
||||
@ExcelProperty("ICAO代码")
|
||||
@ExcelProperty("ICAO代码*")
|
||||
private String icaoCode;
|
||||
|
||||
@ExcelProperty("机场标准名称")
|
||||
@ExcelProperty("机场标准名称*")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("机场简称")
|
||||
private String shortName;
|
||||
|
||||
@ExcelProperty("所属省份")
|
||||
@ExcelProperty("所属省份*")
|
||||
private String provinceName;
|
||||
|
||||
@ExcelProperty("所属城市")
|
||||
@ExcelProperty("所属城市*")
|
||||
private String cityName;
|
||||
|
||||
@ExcelProperty("所属区县")
|
||||
@ExcelProperty("所属区县*")
|
||||
private String districtName;
|
||||
|
||||
@ExcelProperty("行政区划")
|
||||
private String regionName;
|
||||
|
||||
@ExcelProperty("详细地址")
|
||||
private String detailAddress;
|
||||
|
||||
@ExcelProperty("经度")
|
||||
@ExcelProperty("经度*")
|
||||
@NumberFormat("0.000000")
|
||||
private BigDecimal longitude;
|
||||
|
||||
@ExcelProperty("纬度")
|
||||
@ExcelProperty("纬度*")
|
||||
@NumberFormat("0.000000")
|
||||
private BigDecimal latitude;
|
||||
|
||||
@ExcelProperty("行政区划编号")
|
||||
private String regionCode;
|
||||
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
|
||||
@@ -48,19 +48,16 @@ public class CargoTypeExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("类型")
|
||||
private String typeLevelName;
|
||||
|
||||
@ExcelProperty("货物类型")
|
||||
@ExcelProperty("*货物类型")
|
||||
private String cargoName;
|
||||
|
||||
@ExcelProperty("货物类型编码")
|
||||
@ExcelProperty("*货物类型编码")
|
||||
private String cargoCode;
|
||||
|
||||
@ExcelProperty("上级货物类型")
|
||||
@ExcelProperty("*上级货物类型")
|
||||
private String parentCargoName;
|
||||
|
||||
@ExcelProperty("上级货物类型编码")
|
||||
@ExcelProperty("*上级货物类型编码")
|
||||
private String parentCargoCode;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
|
||||
@@ -54,30 +54,27 @@ public class RailwayStationExcel implements Serializable {
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("TMIS国标编码")
|
||||
@ExcelProperty("TMIS国标编码*")
|
||||
private String tmisCode;
|
||||
|
||||
@ExcelProperty("电报码")
|
||||
@ExcelProperty("电报码*")
|
||||
private String telegraphCode;
|
||||
|
||||
@ExcelProperty("车站名称")
|
||||
@ExcelProperty("车站名称*")
|
||||
private String name;
|
||||
|
||||
// @ExcelProperty("所属铁路线路")
|
||||
// private String railwayLine;
|
||||
|
||||
@ExcelProperty("所属省份")
|
||||
@ExcelProperty("所属省份*")
|
||||
private String provinceName;
|
||||
|
||||
@ExcelProperty("所属城市")
|
||||
@ExcelProperty("所属城市*")
|
||||
private String cityName;
|
||||
|
||||
@ExcelProperty("所属区县")
|
||||
@ExcelProperty("所属区县*")
|
||||
private String districtName;
|
||||
|
||||
@ExcelProperty("行政区划")
|
||||
private String regionName;
|
||||
|
||||
@ExcelProperty("详细地址")
|
||||
private String detailAddress;
|
||||
|
||||
@@ -87,6 +84,9 @@ public class RailwayStationExcel implements Serializable {
|
||||
@ExcelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
@ExcelProperty("行政区划编号")
|
||||
private String regionCode;
|
||||
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
|
||||
@@ -9,9 +9,16 @@
|
||||
<result column="dept_name" property="deptName"/>
|
||||
<result column="full_name" property="fullName"/>
|
||||
<result column="ancestors" property="ancestors"/>
|
||||
<result column="leader_id" property="leaderId"/>
|
||||
<result column="dept_category" property="deptCategory"/>
|
||||
<result column="dept_code" property="deptCode"/>
|
||||
<result column="short_name" property="shortName"/>
|
||||
<result column="pinyin_mnemonic" property="pinyinMnemonic"/>
|
||||
<result column="mnemonic_code" property="mnemonicCode"/>
|
||||
<result column="carrier_customer_id" property="carrierCustomerId"/>
|
||||
<result column="sort" property="sort"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -21,9 +28,16 @@
|
||||
<result column="dept_name" property="deptName"/>
|
||||
<result column="full_name" property="fullName"/>
|
||||
<result column="ancestors" property="ancestors"/>
|
||||
<result column="leader_id" property="leaderId"/>
|
||||
<result column="dept_category" property="deptCategory"/>
|
||||
<result column="dept_code" property="deptCode"/>
|
||||
<result column="short_name" property="shortName"/>
|
||||
<result column="pinyin_mnemonic" property="pinyinMnemonic"/>
|
||||
<result column="mnemonic_code" property="mnemonicCode"/>
|
||||
<result column="carrier_customer_id" property="carrierCustomerId"/>
|
||||
<result column="sort" property="sort"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="has_children" property="hasChildren"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="create_dept_name" property="createDeptName"/>
|
||||
<result column="update_user_name" property="updateUserName"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
@@ -18,29 +20,33 @@
|
||||
|
||||
<select id="selectFeeItemPage" resultMap="feeItemResultMap">
|
||||
SELECT
|
||||
*
|
||||
bfi.*,
|
||||
bd.dept_name AS create_dept_name,
|
||||
bu.real_name AS update_user_name
|
||||
FROM
|
||||
blade_fee_item
|
||||
blade_fee_item bfi
|
||||
LEFT JOIN blade_dept bd ON bd.id = bfi.create_dept
|
||||
LEFT JOIN blade_user bu ON bu.id = bfi.update_user
|
||||
WHERE
|
||||
is_deleted = 0
|
||||
bfi.is_deleted = 0
|
||||
<if test="feeItem.feeCategory != null and feeItem.feeCategory != ''">
|
||||
AND fee_category = #{feeItem.feeCategory}
|
||||
AND bfi.fee_category = #{feeItem.feeCategory}
|
||||
</if>
|
||||
<if test="feeItem.name != null and feeItem.name != ''">
|
||||
<bind name="nameLike" value="'%' + feeItem.name + '%'"/>
|
||||
AND name LIKE #{nameLike}
|
||||
AND bfi.name LIKE #{nameLike}
|
||||
</if>
|
||||
<if test="feeItem.englishName != null and feeItem.englishName != ''">
|
||||
<bind name="englishNameLike" value="'%' + feeItem.englishName + '%'"/>
|
||||
AND english_name LIKE #{englishNameLike}
|
||||
AND bfi.english_name LIKE #{englishNameLike}
|
||||
</if>
|
||||
<if test="feeItem.status != null">
|
||||
AND status = #{feeItem.status}
|
||||
AND bfi.status = #{feeItem.status}
|
||||
</if>
|
||||
<if test="feeItem.createDept != null">
|
||||
AND create_dept = #{feeItem.createDept}
|
||||
AND bfi.create_dept = #{feeItem.createDept}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
ORDER BY bfi.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
<if test="portTerminal.category != null and portTerminal.category != ''">
|
||||
AND pt.category = #{portTerminal.category}
|
||||
</if>
|
||||
<if test="portTerminal.parentId != null">
|
||||
AND pt.parent_id = #{portTerminal.parentId}
|
||||
</if>
|
||||
<if test="portTerminal.dataSource != null and portTerminal.dataSource != ''">
|
||||
<choose>
|
||||
<when test="portTerminal.dataSource == '初始化导入'">
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
<if test="param2.name!=null and param2.name!=''">
|
||||
and region.name like concat(concat('%', #{param2.name}),'%')
|
||||
</if>
|
||||
<if test="param2.regionLevel!=null">
|
||||
and region.level = #{param2.regionLevel}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY region.sort ASC, region.code ASC
|
||||
</select>
|
||||
@@ -95,6 +98,9 @@
|
||||
<if test="param2.name!=null and param2.name!=''">
|
||||
and region.name like concat(concat('%', #{param2.name}),'%')
|
||||
</if>
|
||||
<if test="param2.regionLevel!=null">
|
||||
and region.level = #{param2.regionLevel}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY region.sort ASC, region.code ASC
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.springblade.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.system.pojo.entity.UserCustomerScope;
|
||||
|
||||
public interface UserCustomerScopeMapper extends BaseMapper<UserCustomerScope> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.springblade.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springblade.system.pojo.entity.UserDataScope;
|
||||
|
||||
public interface UserDataScopeMapper extends BaseMapper<UserDataScope> {
|
||||
}
|
||||
@@ -33,6 +33,7 @@ import org.springblade.system.pojo.entity.User;
|
||||
import org.springblade.system.excel.UserExcel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
@@ -78,4 +79,6 @@ public interface UserMapper extends BaseMapper<User> {
|
||||
*/
|
||||
List<UserExcel> exportUser(@Param("ew") Wrapper<User> queryWrapper);
|
||||
|
||||
List<Map<String, Object>> selectCustomerOptions(@Param("tenantId") String tenantId);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,30 +25,41 @@
|
||||
<result column="role_id" property="roleId"/>
|
||||
<result column="dept_id" property="deptId"/>
|
||||
<result column="post_id" property="postId"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="oa_person_id" property="oaPersonId"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectUserPage" resultMap="userResultMap">
|
||||
select * from blade_user where is_deleted = 0
|
||||
select bu.*, (
|
||||
select max(bud.oa_id)
|
||||
from blade_user_dept bud
|
||||
where bud.user_id = bu.id and bud.is_deleted = 0
|
||||
) as oa_person_id
|
||||
from blade_user bu
|
||||
where bu.is_deleted = 0
|
||||
<if test="tenantId!=null and tenantId != ''">
|
||||
and tenant_id = #{tenantId}
|
||||
and bu.tenant_id = #{tenantId}
|
||||
</if>
|
||||
<if test="user.tenantId!=null and user.tenantId != ''">
|
||||
and tenant_id = #{user.tenantId}
|
||||
and bu.tenant_id = #{user.tenantId}
|
||||
</if>
|
||||
<if test="user.account!=null and user.account != ''">
|
||||
and account = #{user.account}
|
||||
and bu.account = #{user.account}
|
||||
</if>
|
||||
<if test="user.realName!=null and user.realName != ''">
|
||||
and real_name = #{user.realName}
|
||||
and bu.real_name = #{user.realName}
|
||||
</if>
|
||||
<if test="user.phone!=null and user.phone != ''">
|
||||
and bu.phone = #{user.phone}
|
||||
</if>
|
||||
<if test="user.userType!=null and user.userType != ''">
|
||||
and user_type = #{user.userType}
|
||||
and bu.user_type = #{user.userType}
|
||||
</if>
|
||||
<if test="user.status!=null and user.status>=0">
|
||||
and status = #{user.status}
|
||||
and bu.status = #{user.status}
|
||||
</if>
|
||||
<if test="deptIdList!=null and deptIdList.size>0">
|
||||
and id in (
|
||||
and bu.id in (
|
||||
SELECT
|
||||
user_id
|
||||
FROM
|
||||
@@ -60,7 +71,7 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
ORDER BY id
|
||||
ORDER BY bu.id
|
||||
</select>
|
||||
|
||||
<select id="getUser" resultMap="userResultMap">
|
||||
@@ -87,4 +98,13 @@
|
||||
SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectCustomerOptions" resultType="java.util.HashMap">
|
||||
SELECT id, customer_code AS customerCode, full_name AS fullName, short_name AS shortName,
|
||||
customer_type AS customerType, status, approval_status AS approvalStatus
|
||||
FROM blade_customer_archive
|
||||
WHERE tenant_id = #{tenantId}
|
||||
AND is_deleted = 0
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -105,6 +105,9 @@ public interface IUserService extends BaseService<User> {
|
||||
*/
|
||||
IPage<User> selectUserPage(IPage<User> page, User user, Long deptId, String tenantId);
|
||||
|
||||
/** 用户权限配置使用的当前租户全量客商选项。 */
|
||||
List<Map<String, Object>> selectCustomerOptions(String tenantId);
|
||||
|
||||
/**
|
||||
* 自定义用户搜索分页(按姓名 / 部门 / 岗位模糊匹配,限定当前会话租户)
|
||||
*
|
||||
|
||||
@@ -343,7 +343,6 @@ public class CargoTypeServiceImpl extends BaseServiceImpl<CargoTypeMapper, Cargo
|
||||
|
||||
private CargoTypeExportExcel toExportExcel(CargoType cargoType) {
|
||||
CargoTypeExportExcel excel = new CargoTypeExportExcel();
|
||||
excel.setTypeLevelName(Objects.equals(cargoType.getTypeLevel(), TYPE_LEVEL_ONE) ? "一级货物类型" : "二级货物类型");
|
||||
excel.setCargoName(cargoType.getCargoName());
|
||||
excel.setCargoCode(cargoType.getCargoCode());
|
||||
excel.setParentCargoName("/");
|
||||
|
||||
@@ -54,6 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.springblade.core.tenant.TenantGuard.EntityType.DEPT;
|
||||
@@ -189,6 +190,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
List<Long> idList = Func.toLongList(ids);
|
||||
// 租户守卫:批量校验目标部门全部归属当前会话租户
|
||||
TenantGuard.verifyBatch(this, idList, DEPT);
|
||||
boolean containsRootDept = listByIds(idList).stream()
|
||||
.anyMatch(dept -> BladeConstant.TOP_PARENT_ID.equals(dept.getParentId()));
|
||||
if (containsRootDept) {
|
||||
throw new ServiceException("根节点不能删除!");
|
||||
}
|
||||
Long cnt = baseMapper.selectCount(Wrappers.<Dept>query().lambda().in(Dept::getParentId, idList));
|
||||
if (cnt > 0L) {
|
||||
throw new ServiceException("请先删除子节点!");
|
||||
@@ -200,6 +206,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(Dept dept) {
|
||||
Long parentId = dept.getParentId();
|
||||
Dept parent = null;
|
||||
// 顶级语义:parentId 为 null 或 TOP_PARENT_ID (0L) 均视为顶级部门
|
||||
if (parentId == null || parentId.equals(BladeConstant.TOP_PARENT_ID)) {
|
||||
// 顶级部门:租户守卫统一处理新增 / 修改路径的租户绑定
|
||||
@@ -213,7 +220,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
}
|
||||
Dept self = Func.isNotEmpty(dept.getId())
|
||||
? TenantGuard.verify(this, dept.getId(), DEPT) : null;
|
||||
Dept parent = TenantGuard.verify(this, dept.getParentId(), DEPT_PARENT);
|
||||
parent = TenantGuard.verify(this, dept.getParentId(), DEPT_PARENT);
|
||||
if (parent == null) {
|
||||
throw new ServiceException("上级部门不存在!");
|
||||
}
|
||||
@@ -228,9 +235,59 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
if (Func.isEmpty(dept.getTenantId())) {
|
||||
throw new ServiceException("租户ID不能为空");
|
||||
}
|
||||
validateDeptCategory(dept, parent);
|
||||
validateDeptCode(dept, parent);
|
||||
return saveOrUpdate(dept);
|
||||
}
|
||||
|
||||
private void validateDeptCategory(Dept dept, Dept parent) {
|
||||
if (parent == null) {
|
||||
throw new ServiceException("请选择上级组织");
|
||||
}
|
||||
List<Integer> allowedCategories;
|
||||
if (BladeConstant.TOP_PARENT_ID.equals(parent.getParentId())) {
|
||||
allowedCategories = "外部组织".equals(parent.getDeptName()) ? List.of(6) : List.of(1);
|
||||
} else if (Integer.valueOf(1).equals(parent.getDeptCategory())) {
|
||||
allowedCategories = List.of(2, 3);
|
||||
} else if (List.of(2, 3).contains(parent.getDeptCategory())) {
|
||||
allowedCategories = List.of(4, 5, 6);
|
||||
} else {
|
||||
throw new ServiceException("上级组织层级不支持新增下级组织");
|
||||
}
|
||||
if (!allowedCategories.contains(dept.getDeptCategory())) {
|
||||
throw new ServiceException("组织类型不符合上级组织层级规则");
|
||||
}
|
||||
if (Integer.valueOf(6).equals(dept.getDeptCategory()) && Func.isEmpty(dept.getCarrierCustomerId())) {
|
||||
throw new ServiceException("请选择承运商");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateDeptCode(Dept dept, Dept parent) {
|
||||
String deptCode = dept.getDeptCode();
|
||||
if (StringUtil.isBlank(deptCode)) {
|
||||
throw new ServiceException("组织编码不能为空");
|
||||
}
|
||||
deptCode = deptCode.trim();
|
||||
if (deptCode.length() > 30) {
|
||||
throw new ServiceException("组织编码不能超过30个字符");
|
||||
}
|
||||
if (parent == null || StringUtil.isBlank(parent.getDeptCode())) {
|
||||
throw new ServiceException("请选择已配置组织编码的上级组织");
|
||||
}
|
||||
String pattern = Pattern.quote(parent.getDeptCode()) + "-\\d+";
|
||||
if (!deptCode.matches(pattern)) {
|
||||
throw new ServiceException("组织编码格式应为:上级编码-分段数字");
|
||||
}
|
||||
LambdaQueryWrapper<Dept> queryWrapper = Wrappers.<Dept>lambdaQuery().eq(Dept::getDeptCode, deptCode);
|
||||
if (Func.isNotEmpty(dept.getId())) {
|
||||
queryWrapper.ne(Dept::getId, dept.getId());
|
||||
}
|
||||
if (baseMapper.selectCount(queryWrapper) > 0) {
|
||||
throw new ServiceException("组织编码已存在");
|
||||
}
|
||||
dept.setDeptCode(deptCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeptVO> search(String deptName, Long parentId) {
|
||||
String tenantId = AuthUtil.getTenantId();
|
||||
|
||||
@@ -293,14 +293,19 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
|
||||
@Override
|
||||
public boolean submit(Menu menu) {
|
||||
boolean isNewMenu = menu.getId() == null;
|
||||
Menu oldMenu = isNewMenu ? null : getById(menu.getId());
|
||||
|
||||
// 验证code和name唯一性
|
||||
LambdaQueryWrapper<Menu> menuQueryWrapper = Wrappers.<Menu>lambdaQuery()
|
||||
.and(!isNewMenu, w -> w.ne(Menu::getId, menu.getId()))
|
||||
.and(w -> w.eq(Menu::getCode, menu.getCode())
|
||||
.or(o -> o.eq(Menu::getName, menu.getName()).eq(Menu::getCategory, MENU_CATEGORY)));
|
||||
|
||||
if (baseMapper.selectCount(menuQueryWrapper) > 0L) {
|
||||
boolean codeChanged = isNewMenu || oldMenu == null || !Objects.equals(oldMenu.getCode(), menu.getCode());
|
||||
boolean nameChanged = isNewMenu || oldMenu == null || !Objects.equals(oldMenu.getName(), menu.getName()) || !Objects.equals(oldMenu.getCategory(), menu.getCategory());
|
||||
boolean duplicateCode = codeChanged && Func.isNotBlank(menu.getCode()) && baseMapper.selectCount(Wrappers.<Menu>lambdaQuery()
|
||||
.ne(!isNewMenu, Menu::getId, menu.getId())
|
||||
.eq(Menu::getCode, menu.getCode())) > 0L;
|
||||
boolean duplicateName = nameChanged && Objects.equals(menu.getCategory(), MENU_CATEGORY) && Func.isNotBlank(menu.getName()) && baseMapper.selectCount(Wrappers.<Menu>lambdaQuery()
|
||||
.ne(!isNewMenu, Menu::getId, menu.getId())
|
||||
.eq(Menu::getName, menu.getName())
|
||||
.eq(Menu::getCategory, MENU_CATEGORY)) > 0L;
|
||||
if (duplicateCode || duplicateName) {
|
||||
throw new ServiceException("菜单名或编号已存在!");
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,11 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
}
|
||||
role.setIsDeleted(BladeConstant.DB_NOT_DELETED);
|
||||
if (Func.isEmpty(role.getTenantId())) {
|
||||
throw new ServiceException("租户ID不能为空");
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
role.setTenantId(BladeConstant.ADMIN_TENANT_ID);
|
||||
} else {
|
||||
throw new ServiceException("会话租户不可识别,拒绝创建角色");
|
||||
}
|
||||
}
|
||||
return saveOrUpdate(role);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ import org.springblade.system.cache.SysCache;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.excel.UserExcel;
|
||||
import org.springblade.system.mapper.UserMapper;
|
||||
import org.springblade.system.mapper.UserDataScopeMapper;
|
||||
import org.springblade.system.mapper.UserCustomerScopeMapper;
|
||||
import org.springblade.system.pojo.context.IPhone;
|
||||
import org.springblade.system.pojo.entity.*;
|
||||
import org.springblade.system.pojo.enums.DictEnum;
|
||||
@@ -95,6 +97,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
private static final SecureRandom SECURE_RANDOM = new SecureRandom();
|
||||
|
||||
private final IUserDeptService userDeptService;
|
||||
private final UserDataScopeMapper userDataScopeMapper;
|
||||
private final UserCustomerScopeMapper userCustomerScopeMapper;
|
||||
private final IUserOauthService userOauthService;
|
||||
private final IRoleService roleService;
|
||||
private final BladeTenantProperties tenantProperties;
|
||||
@@ -106,7 +110,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
public User getDetail(User user) {
|
||||
QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user);
|
||||
applyTenantScope(queryWrapper);
|
||||
return getOne(queryWrapper);
|
||||
return fillUserScopes(getOne(queryWrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,6 +124,10 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(User user) {
|
||||
bindSessionTenant(user);
|
||||
if (user.getUserType() == null) {
|
||||
user.setUserType(UserType.WEB.getCategory());
|
||||
}
|
||||
applyUserDefaults(user);
|
||||
return saveUser(user);
|
||||
}
|
||||
|
||||
@@ -148,7 +156,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
throw new ServiceException(StringUtil.format("当前手机 [{}] 已存在!", user.getPhone()));
|
||||
}
|
||||
CacheUtil.clear(USER_CACHE);
|
||||
return submitUserInfo(user) && submitUserDept(user);
|
||||
applyUserDefaults(user);
|
||||
return submitUserInfo(user) && submitUserDept(user) && submitUserScopes(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -198,6 +207,11 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
return page.setRecords(baseMapper.selectUserPage(page, user, deptIdList, tenantId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectCustomerOptions(String tenantId) {
|
||||
return baseMapper.selectCustomerOptions(tenantId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<UserVO> selectUserSearch(UserVO user, Query query) {
|
||||
LambdaQueryWrapper<User> queryWrapper = Wrappers.<User>query().lambda();
|
||||
@@ -676,7 +690,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
? Func.toStrWithEmpty(tenantId, AuthUtil.getTenantId())
|
||||
: AuthUtil.getTenantId();
|
||||
LambdaQueryWrapper<User> queryWrapper = Wrappers.<User>query().lambda()
|
||||
.select(User::getId, User::getRealName)
|
||||
.select(User::getId, User::getRealName, User::getPhone)
|
||||
.like(StringUtil.isNoneBlank(realName), User::getRealName, realName)
|
||||
.eq(User::getTenantId, resolvedTenantId)
|
||||
.eq(User::getIsLeader, BladeConstant.DB_STATUS_1)
|
||||
@@ -756,9 +770,10 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
throw new ServiceException("当前租户已到最大账号额度!");
|
||||
}
|
||||
}
|
||||
if (Func.isNotEmpty(user.getPassword())) {
|
||||
user.setPassword(DigestUtil.encrypt(user.getPassword()));
|
||||
if (Func.isEmpty(user.getPassword())) {
|
||||
user.setPassword(ParamCache.getValue(DEFAULT_PARAM_PASSWORD));
|
||||
}
|
||||
user.setPassword(DigestUtil.encrypt(user.getPassword()));
|
||||
Long userCount = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getAccount, user.getAccount()));
|
||||
if (userCount > 0L && Func.isEmpty(user.getId())) {
|
||||
throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount()));
|
||||
@@ -768,7 +783,45 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
throw new ServiceException(StringUtil.format("当前手机 [{}] 已存在!", user.getPhone()));
|
||||
}
|
||||
CacheUtil.clear(USER_CACHE);
|
||||
return save(user) && submitUserDept(user);
|
||||
return save(user) && submitUserDept(user) && submitUserScopes(user);
|
||||
}
|
||||
|
||||
private void applyUserDefaults(User user) {
|
||||
if (user.getPersonCategory() == null) user.setPersonCategory(1);
|
||||
if (user.getDataScopeRange() == null) user.setDataScopeRange(1);
|
||||
if (user.getDataLevelRange() == null) user.setDataLevelRange(1);
|
||||
if (user.getIncludeNewCustomer() == null) user.setIncludeNewCustomer(0);
|
||||
}
|
||||
|
||||
private boolean submitUserScopes(User user) {
|
||||
userDataScopeMapper.delete(Wrappers.<UserDataScope>lambdaQuery().eq(UserDataScope::getUserId, user.getId()));
|
||||
userCustomerScopeMapper.delete(Wrappers.<UserCustomerScope>lambdaQuery().eq(UserCustomerScope::getUserId, user.getId()));
|
||||
if (Objects.equals(user.getDataScopeRange(), 3) && user.getDataScopeDeptIds() != null) {
|
||||
user.getDataScopeDeptIds().forEach(deptId -> {
|
||||
UserDataScope scope = new UserDataScope();
|
||||
scope.setUserId(user.getId());
|
||||
scope.setDeptId(deptId);
|
||||
userDataScopeMapper.insert(scope);
|
||||
});
|
||||
}
|
||||
if (user.getCustomerIds() != null) {
|
||||
user.getCustomerIds().forEach(customerId -> {
|
||||
UserCustomerScope scope = new UserCustomerScope();
|
||||
scope.setUserId(user.getId());
|
||||
scope.setCustomerId(customerId);
|
||||
userCustomerScopeMapper.insert(scope);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private User fillUserScopes(User user) {
|
||||
if (user == null || user.getId() == null) return user;
|
||||
user.setDataScopeDeptIds(userDataScopeMapper.selectList(Wrappers.<UserDataScope>lambdaQuery()
|
||||
.eq(UserDataScope::getUserId, user.getId())).stream().map(UserDataScope::getDeptId).toList());
|
||||
user.setCustomerIds(userCustomerScopeMapper.selectList(Wrappers.<UserCustomerScope>lambdaQuery()
|
||||
.eq(UserCustomerScope::getUserId, user.getId())).stream().map(UserCustomerScope::getCustomerId).toList());
|
||||
return user;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,7 @@ 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.AccidentRecordExcel;
|
||||
import org.springblade.transport.excel.AccidentRecordExportExcel;
|
||||
import org.springblade.transport.excel.AccidentRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.AccidentRecord;
|
||||
import org.springblade.transport.pojo.vo.AccidentRecordVO;
|
||||
@@ -144,8 +145,8 @@ public class AccidentRecordController extends BladeController {
|
||||
public void exportAccidentRecord(AccidentRecordVO accidentRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<AccidentRecordExcel> list = accidentRecordService.exportAccidentRecord(buildExportQuery(accidentRecord, ids));
|
||||
ExcelUtil.export(response, "事故记录" + DateUtil.time(), "事故记录表", list, AccidentRecordExcel.class);
|
||||
List<AccidentRecordExportExcel> list = accidentRecordService.exportAccidentRecord(buildExportQuery(accidentRecord, ids));
|
||||
ExcelUtil.export(response, "事故记录" + DateUtil.time(), "事故记录表", list, AccidentRecordExportExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,7 @@ 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.AnnualInspectionRecordExcel;
|
||||
import org.springblade.transport.excel.AnnualInspectionRecordExportExcel;
|
||||
import org.springblade.transport.excel.AnnualInspectionRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.AnnualInspectionRecord;
|
||||
import org.springblade.transport.pojo.vo.AnnualInspectionRecordVO;
|
||||
@@ -126,8 +127,8 @@ public class AnnualInspectionRecordController extends BladeController {
|
||||
public void exportAnnualInspectionRecord(AnnualInspectionRecordVO annualInspectionRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<AnnualInspectionRecordExcel> list = annualInspectionRecordService.exportAnnualInspectionRecord(buildExportQuery(annualInspectionRecord, ids));
|
||||
ExcelUtil.export(response, "年检记录" + DateUtil.time(), "年检记录表", list, AnnualInspectionRecordExcel.class);
|
||||
List<AnnualInspectionRecordExportExcel> list = annualInspectionRecordService.exportAnnualInspectionRecord(buildExportQuery(annualInspectionRecord, ids));
|
||||
ExcelUtil.export(response, "年检记录" + DateUtil.time(), "年检记录表", list, AnnualInspectionRecordExportExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
|
||||
@@ -37,7 +37,9 @@ 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.CommonRouteExcel;
|
||||
import org.springblade.transport.excel.CommonRouteImportExcel;
|
||||
import org.springblade.transport.pojo.entity.CommonRoute;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.CommonRouteVO;
|
||||
@@ -48,6 +50,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -102,4 +105,31 @@ public class CommonRouteController extends BladeController {
|
||||
ExcelUtil.export(response, "常用线路" + DateUtil.time(), "常用线路", list, CommonRouteExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/import-common-route")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导入常用线路", description = "传入excel")
|
||||
public R importCommonRoute(MultipartFile file, HttpServletResponse response) {
|
||||
List<CommonRouteImportExcel> failureList = commonRouteService.importCommonRoute(
|
||||
ExcelUtil.read(file, CommonRouteImportExcel.class)
|
||||
);
|
||||
if (Func.isNotEmpty(failureList)) {
|
||||
ImportFailureExcelUtil.export(
|
||||
response,
|
||||
"常用线路导入失败明细" + DateUtil.time(),
|
||||
"导入失败明细",
|
||||
failureList,
|
||||
CommonRouteImportExcel.class
|
||||
);
|
||||
return null;
|
||||
}
|
||||
return R.success("导入数据成功");
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导出导入模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.export(response, "常用线路模板", "常用线路导入模板", new ArrayList<CommonRouteImportExcel>(), CommonRouteImportExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -143,29 +143,36 @@ public class ContractManageController extends BladeController {
|
||||
return R.status(contractManageService.terminate(id, reason));
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@PostMapping("/update-attachments")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@Operation(summary = "更新合同附件", description = "传入合同id及附件信息")
|
||||
public R updateAttachments(@RequestBody ContractManage contractManage) {
|
||||
return R.status(contractManageService.updateAttachments(contractManage));
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 13)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 14)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 15)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 16)
|
||||
@Operation(summary = "导出合同管理")
|
||||
public void exportContractManage(ContractManageVO contractManage, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<ContractManageExcel> list = contractManageService.exportContractManage(contractManage, ids);
|
||||
|
||||
@@ -36,6 +36,7 @@ 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.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
@@ -109,11 +110,21 @@ public class CustomerArchiveController extends BladeController {
|
||||
return R.status(customerArchiveService.submitApproval(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*/
|
||||
@PostMapping("/withdraw-approval")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "撤回审批", description = "传入id")
|
||||
public R withdrawApproval(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(customerArchiveService.withdrawApproval(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核通过
|
||||
*/
|
||||
@PostMapping("/approve")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "审核通过", description = "传入id")
|
||||
public R approve(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(customerArchiveService.approve(id));
|
||||
@@ -123,7 +134,7 @@ public class CustomerArchiveController extends BladeController {
|
||||
* 审核不通过
|
||||
*/
|
||||
@PostMapping("/reject")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "审核不通过", description = "传入id")
|
||||
public R reject(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(customerArchiveService.reject(id));
|
||||
@@ -133,7 +144,7 @@ public class CustomerArchiveController extends BladeController {
|
||||
* 启用或停用
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "启用或停用", description = "传入id和status")
|
||||
public R status(@Parameter(description = "主键", required = true) @RequestParam Long id,
|
||||
@Parameter(description = "状态", required = true) @RequestParam Integer status) {
|
||||
@@ -144,7 +155,7 @@ public class CustomerArchiveController extends BladeController {
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(customerArchiveService.removeDraft(ids));
|
||||
@@ -154,7 +165,7 @@ public class CustomerArchiveController extends BladeController {
|
||||
* 评分明细模板
|
||||
*/
|
||||
@GetMapping("/score-template")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "评分明细模板", description = "传入评分量化表ID")
|
||||
public R<CustomerCreditScoreVO> scoreTemplate(@RequestParam(required = false) Long quantificationId) {
|
||||
return R.data(customerArchiveService.buildScoreTemplate(quantificationId));
|
||||
@@ -164,7 +175,7 @@ public class CustomerArchiveController extends BladeController {
|
||||
* 导出客商档案
|
||||
*/
|
||||
@GetMapping("/export-customer-archive")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "导出客商档案")
|
||||
public void exportCustomerArchive(CustomerArchiveVO customerArchive,
|
||||
@RequestParam(required = false) String ids,
|
||||
@@ -177,6 +188,10 @@ public class CustomerArchiveController extends BladeController {
|
||||
LambdaQueryWrapper<CustomerArchive> queryWrapper = Wrappers.<CustomerArchive>lambdaQuery()
|
||||
.eq(CustomerArchive::getIsDeleted, 0)
|
||||
.orderByDesc(CustomerArchive::getCreateTime);
|
||||
Long userId = AuthUtil.getUserId();
|
||||
queryWrapper.and(wrapper -> wrapper
|
||||
.exists("SELECT 1 FROM blade_user_customer_scope bucs WHERE bucs.user_id = " + userId
|
||||
+ " AND bucs.customer_id = blade_customer_archive.id"));
|
||||
if (Func.isNotEmpty(ids)) {
|
||||
queryWrapper.in(CustomerArchive::getId, Func.toLongList(ids));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
package org.springblade.transport.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.core.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.EquipmentLedgerExcel;
|
||||
import org.springblade.transport.pojo.entity.EquipmentLedger;
|
||||
import org.springblade.transport.pojo.vo.EquipmentLedgerVO;
|
||||
import org.springblade.transport.service.IEquipmentLedgerService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备台账控制器
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@PreAuth(menu = "equipment_ledger")
|
||||
@RequestMapping("/equipment-ledger")
|
||||
@Tag(name = "设备台账", description = "设备台账")
|
||||
public class EquipmentLedgerController extends BladeController {
|
||||
|
||||
private static final int DEFAULT_CURRENT = 1;
|
||||
private static final int DEFAULT_SIZE = 10;
|
||||
private static final int MAX_SIZE = 100;
|
||||
|
||||
private final IEquipmentLedgerService equipmentLedgerService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入设备台账ID")
|
||||
public R<EquipmentLedger> detail(@RequestParam Long id) {
|
||||
return R.data(equipmentLedgerService.getById(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页")
|
||||
public R<IPage<EquipmentLedgerVO>> list(EquipmentLedgerVO equipmentLedger, Query query) {
|
||||
return R.data(equipmentLedgerService.selectEquipmentLedgerPage(Condition.getPage(normalizeQuery(query)), equipmentLedger));
|
||||
}
|
||||
|
||||
@GetMapping("/next-equipment-code")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "获取下一个设备编号")
|
||||
public R<String> nextEquipmentCode() {
|
||||
return R.data(equipmentLedgerService.nextEquipmentCode());
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增或修改")
|
||||
public R submit(@Valid @RequestBody EquipmentLedger equipmentLedger) {
|
||||
return R.status(equipmentLedgerService.submit(equipmentLedger));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "逻辑删除")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(equipmentLedgerService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
@PostMapping("/import-equipment-ledger")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导入设备台账")
|
||||
public R importEquipmentLedger(MultipartFile file, HttpServletResponse response) {
|
||||
List<EquipmentLedgerExcel> failureList = equipmentLedgerService.importEquipmentLedger(ExcelUtil.read(file, EquipmentLedgerExcel.class));
|
||||
if (Func.isNotEmpty(failureList)) {
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "设备台账导入失败明细" + DateUtil.time(), "导入失败明细", failureList, EquipmentLedgerExcel.class);
|
||||
return null;
|
||||
}
|
||||
return R.success("操作成功");
|
||||
}
|
||||
|
||||
@GetMapping("/export-equipment-ledger")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导出设备台账")
|
||||
public void exportEquipmentLedger(EquipmentLedgerVO equipmentLedger, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<EquipmentLedgerExcel> list = equipmentLedgerService.exportEquipmentLedger(buildExportQuery(equipmentLedger, ids));
|
||||
ExcelUtil.export(response, "设备台账" + DateUtil.time(), "设备台账表", list, EquipmentLedgerExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "导出模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.export(response, "设备台账模板", "设备台账表", new ArrayList<>(), EquipmentLedgerExcel.class);
|
||||
}
|
||||
|
||||
private Query normalizeQuery(Query query) {
|
||||
if (query == null) query = new Query();
|
||||
if (query.getCurrent() == null || query.getCurrent() < DEFAULT_CURRENT) query.setCurrent(DEFAULT_CURRENT);
|
||||
if (query.getSize() == null || query.getSize() <= 0) query.setSize(DEFAULT_SIZE);
|
||||
if (query.getSize() > MAX_SIZE) query.setSize(MAX_SIZE);
|
||||
return query;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EquipmentLedger> buildExportQuery(EquipmentLedgerVO equipmentLedger, String ids) {
|
||||
LambdaQueryWrapper<EquipmentLedger> queryWrapper = Wrappers.<EquipmentLedger>lambdaQuery()
|
||||
.eq(EquipmentLedger::getIsDeleted, 0)
|
||||
.orderByDesc(EquipmentLedger::getCreateTime);
|
||||
if (Func.isNotEmpty(ids)) queryWrapper.in(EquipmentLedger::getId, Func.toLongList(ids));
|
||||
if (Func.isNotEmpty(equipmentLedger.getVehicleNo())) queryWrapper.like(EquipmentLedger::getVehicleNo, equipmentLedger.getVehicleNo());
|
||||
if (Func.isNotEmpty(equipmentLedger.getVehicleType())) queryWrapper.eq(EquipmentLedger::getVehicleType, equipmentLedger.getVehicleType());
|
||||
if (Func.isNotEmpty(equipmentLedger.getEquipmentCode())) queryWrapper.like(EquipmentLedger::getEquipmentCode, equipmentLedger.getEquipmentCode());
|
||||
if (Func.isNotEmpty(equipmentLedger.getCreateDept())) queryWrapper.eq(EquipmentLedger::getCreateDept, equipmentLedger.getCreateDept());
|
||||
return queryWrapper;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ 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.EtcRecordExcel;
|
||||
import org.springblade.transport.excel.EtcRecordExportExcel;
|
||||
import org.springblade.transport.excel.EtcRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.EtcRecord;
|
||||
import org.springblade.transport.pojo.vo.EtcRecordVO;
|
||||
@@ -107,8 +108,8 @@ public class EtcRecordController extends BladeController {
|
||||
public void exportEtcRecord(EtcRecordVO etcRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<EtcRecordExcel> list = etcRecordService.exportEtcRecord(buildExportQuery(etcRecord, ids));
|
||||
ExcelUtil.export(response, "ETC记录" + DateUtil.time(), "ETC记录表", list, EtcRecordExcel.class);
|
||||
List<EtcRecordExportExcel> list = etcRecordService.exportEtcRecord(buildExportQuery(etcRecord, ids));
|
||||
ExcelUtil.export(response, "ETC记录" + DateUtil.time(), "ETC记录表", list, EtcRecordExportExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
|
||||
@@ -45,6 +45,7 @@ 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.InsuranceRecordExcel;
|
||||
import org.springblade.transport.excel.InsuranceRecordExportExcel;
|
||||
import org.springblade.transport.excel.InsuranceRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.InsuranceRecord;
|
||||
import org.springblade.transport.pojo.vo.InsuranceRecordVO;
|
||||
@@ -145,8 +146,8 @@ public class InsuranceRecordController extends BladeController {
|
||||
public void exportInsuranceRecord(InsuranceRecordVO insuranceRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<InsuranceRecordExcel> list = insuranceRecordService.exportInsuranceRecord(buildExportQuery(insuranceRecord, ids));
|
||||
ExcelUtil.export(response, "保险记录" + DateUtil.time(), "保险记录表", list, InsuranceRecordExcel.class);
|
||||
List<InsuranceRecordExportExcel> list = insuranceRecordService.exportInsuranceRecord(buildExportQuery(insuranceRecord, ids));
|
||||
ExcelUtil.export(response, "保险记录" + DateUtil.time(), "保险记录表", list, InsuranceRecordExportExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
*/
|
||||
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.LoadingManageExcel;
|
||||
import org.springblade.transport.pojo.entity.LoadingManage;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.LoadingManageVO;
|
||||
import org.springblade.transport.service.ILoadingManageService;
|
||||
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 = "loading_manage")
|
||||
@RequestMapping("/loading-manage")
|
||||
@Tag(name = "配载管理", description = "配载管理")
|
||||
public class LoadingManageController extends BladeController {
|
||||
|
||||
private final ILoadingManageService loadingManageService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入id")
|
||||
public R<LoadingManageVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(loadingManageService.detail(id));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入loadingManage")
|
||||
public R<IPage<LoadingManageVO>> list(LoadingManageVO loadingManage, Query query) {
|
||||
return R.data(loadingManageService.selectLoadingManagePage(Condition.getPage(query), loadingManage));
|
||||
}
|
||||
|
||||
@PostMapping("/save-draft")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "保存草稿", description = "传入loadingManage")
|
||||
public R<LoadingManageVO> saveDraft(@RequestBody LoadingManage loadingManage) {
|
||||
loadingManageService.saveDraft(loadingManage);
|
||||
return R.data(loadingManageService.detail(loadingManage.getId()));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增或修改", description = "传入loadingManage")
|
||||
public R submit(@RequestBody LoadingManage loadingManage) {
|
||||
return R.status(loadingManageService.submit(loadingManage));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(loadingManageService.removeLoadingManage(ids));
|
||||
}
|
||||
|
||||
@GetMapping("/export-loading-manage")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导出配载管理")
|
||||
public void exportLoadingManage(LoadingManageVO loadingManage, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<LoadingManageExcel> list = loadingManageService.exportLoadingManage(loadingManage, ids);
|
||||
ExcelUtil.export(response, "配载管理" + DateUtil.time(), "配载管理", list, LoadingManageExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<LoadingManageVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(loadingManageService.copy(id));
|
||||
}
|
||||
|
||||
@PostMapping("/reassign")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "重新派单", description = "传入loadingManage")
|
||||
public R reassign(@RequestBody LoadingManage loadingManage) {
|
||||
return R.status(loadingManageService.reassign(loadingManage));
|
||||
}
|
||||
|
||||
@PostMapping("/cancel")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "取消", description = "传入id")
|
||||
public R cancel(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(loadingManageService.cancel(id));
|
||||
}
|
||||
|
||||
@PostMapping("/complete")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "完成", description = "传入id")
|
||||
public R complete(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(loadingManageService.complete(id));
|
||||
}
|
||||
|
||||
@PostMapping("/batch-complete")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "批量完成", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> batchComplete(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(loadingManageService.batchComplete(ids));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,6 +44,7 @@ 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.MaintenancePlanExcel;
|
||||
import org.springblade.transport.excel.MaintenancePlanExportExcel;
|
||||
import org.springblade.transport.excel.MaintenancePlanImporter;
|
||||
import org.springblade.transport.pojo.entity.MaintenancePlan;
|
||||
import org.springblade.transport.pojo.vo.MaintenancePlanVO;
|
||||
@@ -144,8 +145,8 @@ public class MaintenancePlanController extends BladeController {
|
||||
public void exportMaintenancePlan(MaintenancePlanVO maintenancePlan,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<MaintenancePlanExcel> list = maintenancePlanService.exportMaintenancePlan(buildExportQuery(maintenancePlan, ids));
|
||||
ExcelUtil.export(response, "保养记录" + DateUtil.time(), "保养记录表", list, MaintenancePlanExcel.class);
|
||||
List<MaintenancePlanExportExcel> list = maintenancePlanService.exportMaintenancePlan(buildExportQuery(maintenancePlan, ids));
|
||||
ExcelUtil.export(response, "保养记录" + DateUtil.time(), "保养记录表", list, MaintenancePlanExportExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,7 @@ 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.MaintenanceRecordExcel;
|
||||
import org.springblade.transport.excel.MaintenanceRecordExportExcel;
|
||||
import org.springblade.transport.excel.MaintenanceRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
@@ -144,8 +145,8 @@ public class MaintenanceRecordController extends BladeController {
|
||||
public void exportMaintenanceRecord(MaintenanceRecordVO maintenanceRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<MaintenanceRecordExcel> list = maintenanceRecordService.exportMaintenanceRecord(buildExportQuery(maintenanceRecord, ids));
|
||||
ExcelUtil.export(response, "维修记录" + DateUtil.time(), "维修记录表", list, MaintenanceRecordExcel.class);
|
||||
List<MaintenanceRecordExportExcel> list = maintenanceRecordService.exportMaintenanceRecord(buildExportQuery(maintenanceRecord, ids));
|
||||
ExcelUtil.export(response, "维修记录" + DateUtil.time(), "维修记录表", list, MaintenanceRecordExportExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,7 @@ 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.MileageRecordExcel;
|
||||
import org.springblade.transport.excel.MileageRecordExportExcel;
|
||||
import org.springblade.transport.excel.MileageRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.MileageRecord;
|
||||
import org.springblade.transport.pojo.vo.MileageRecordVO;
|
||||
@@ -126,8 +127,8 @@ public class MileageRecordController extends BladeController {
|
||||
public void exportMileageRecord(MileageRecordVO mileageRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<MileageRecordExcel> list = mileageRecordService.exportMileageRecord(buildExportQuery(mileageRecord, ids));
|
||||
ExcelUtil.export(response, "里程记录" + DateUtil.time(), "里程记录表", list, MileageRecordExcel.class);
|
||||
List<MileageRecordExportExcel> list = mileageRecordService.exportMileageRecord(buildExportQuery(mileageRecord, ids));
|
||||
ExcelUtil.export(response, "里程记录" + DateUtil.time(), "里程记录表", list, MileageRecordExportExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
|
||||
@@ -25,6 +25,7 @@ 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.OilElectricRecordExcel;
|
||||
import org.springblade.transport.excel.OilElectricRecordExportExcel;
|
||||
import org.springblade.transport.excel.OilElectricRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.OilElectricRecord;
|
||||
import org.springblade.transport.pojo.vo.OilElectricRecordVO;
|
||||
@@ -107,8 +108,8 @@ public class OilElectricRecordController extends BladeController {
|
||||
public void exportOilElectricRecord(OilElectricRecordVO oilElectricRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<OilElectricRecordExcel> list = oilElectricRecordService.exportOilElectricRecord(buildExportQuery(oilElectricRecord, ids));
|
||||
ExcelUtil.export(response, "油电记录" + DateUtil.time(), "油电记录表", list, OilElectricRecordExcel.class);
|
||||
List<OilElectricRecordExportExcel> list = oilElectricRecordService.exportOilElectricRecord(buildExportQuery(oilElectricRecord, ids));
|
||||
ExcelUtil.export(response, "油电记录" + DateUtil.time(), "油电记录表", list, OilElectricRecordExportExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
|
||||
@@ -25,6 +25,7 @@ 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.OtherExpenseRecordExcel;
|
||||
import org.springblade.transport.excel.OtherExpenseRecordExportExcel;
|
||||
import org.springblade.transport.excel.OtherExpenseRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.OtherExpenseRecord;
|
||||
import org.springblade.transport.pojo.vo.OtherExpenseRecordVO;
|
||||
@@ -107,8 +108,8 @@ public class OtherExpenseRecordController extends BladeController {
|
||||
public void exportOtherExpenseRecord(OtherExpenseRecordVO otherExpenseRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<OtherExpenseRecordExcel> list = otherExpenseRecordService.exportOtherExpenseRecord(buildExportQuery(otherExpenseRecord, ids));
|
||||
ExcelUtil.export(response, "其他费用记录" + DateUtil.time(), "其他费用记录表", list, OtherExpenseRecordExcel.class);
|
||||
List<OtherExpenseRecordExportExcel> list = otherExpenseRecordService.exportOtherExpenseRecord(buildExportQuery(otherExpenseRecord, ids));
|
||||
ExcelUtil.export(response, "其他费用记录" + DateUtil.time(), "其他费用记录表", list, OtherExpenseRecordExportExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
|
||||
@@ -31,6 +31,7 @@ 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.common.excel.ImportFailureExcelUtil;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
@@ -38,6 +39,7 @@ 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.excel.ShippingTemplateGoodsExcel;
|
||||
import org.springblade.transport.pojo.entity.ShippingTemplate;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.ShippingTemplateVO;
|
||||
@@ -48,6 +50,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -80,22 +83,29 @@ public class ShippingTemplateController extends BladeController {
|
||||
return R.data(shippingTemplateService.selectShippingTemplatePage(Condition.getPage(query), shippingTemplate));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@GetMapping("/next-code")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "下一个模板编号")
|
||||
public R<String> nextCode() {
|
||||
return R.data(shippingTemplateService.nextTemplateCode());
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增或修改", description = "传入shippingTemplate")
|
||||
public R submit(@RequestBody ShippingTemplate shippingTemplate) {
|
||||
return R.status(shippingTemplateService.submit(shippingTemplate));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperationSupport(order = 5)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导出发货模板")
|
||||
public void exportShippingTemplate(ShippingTemplateVO shippingTemplate, @RequestParam(required = false) String ids, HttpServletResponse response) {
|
||||
List<ShippingTemplateExcel> list = shippingTemplateService.exportShippingTemplate(shippingTemplate, ids);
|
||||
@@ -103,10 +113,28 @@ public class ShippingTemplateController extends BladeController {
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<ShippingTemplateVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(shippingTemplateService.copy(id));
|
||||
}
|
||||
|
||||
@PostMapping("/import-goods")
|
||||
@Operation(summary = "导入发货模板货物")
|
||||
public R<List<ShippingTemplateGoodsExcel>> importGoods(MultipartFile file, HttpServletResponse response) {
|
||||
List<ShippingTemplateGoodsExcel> data = ExcelUtil.read(file, ShippingTemplateGoodsExcel.class);
|
||||
List<ShippingTemplateGoodsExcel> failures = shippingTemplateService.importGoods(data);
|
||||
if (Func.isNotEmpty(failures)) {
|
||||
ImportFailureExcelUtil.export(response, "发货模板货物导入失败明细" + DateUtil.time(), "导入失败明细", failures, ShippingTemplateGoodsExcel.class);
|
||||
return null;
|
||||
}
|
||||
return R.data(data);
|
||||
}
|
||||
|
||||
@GetMapping("/export-goods-template")
|
||||
@Operation(summary = "导出发货模板货物导入模板")
|
||||
public void exportGoodsTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.export(response, "发货模板货物导入模板", "货物信息", new ArrayList<ShippingTemplateGoodsExcel>(), ShippingTemplateGoodsExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ 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.TireReplacementRecordExcel;
|
||||
import org.springblade.transport.excel.TireReplacementRecordExportExcel;
|
||||
import org.springblade.transport.excel.TireReplacementRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.TireReplacementRecord;
|
||||
import org.springblade.transport.pojo.vo.TireReplacementRecordVO;
|
||||
@@ -144,8 +145,8 @@ public class TireReplacementRecordController extends BladeController {
|
||||
public void exportTireReplacementRecord(TireReplacementRecordVO tireReplacementRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<TireReplacementRecordExcel> list = tireReplacementRecordService.exportTireReplacementRecord(buildExportQuery(tireReplacementRecord, ids));
|
||||
ExcelUtil.export(response, "换胎记录" + DateUtil.time(), "换胎记录表", list, TireReplacementRecordExcel.class);
|
||||
List<TireReplacementRecordExportExcel> list = tireReplacementRecordService.exportTireReplacementRecord(buildExportQuery(tireReplacementRecord, ids));
|
||||
ExcelUtil.export(response, "换胎记录" + DateUtil.time(), "换胎记录表", list, TireReplacementRecordExportExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,7 @@ 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.TransportChangeRecordExcel;
|
||||
import org.springblade.transport.excel.TransportChangeRecordExportExcel;
|
||||
import org.springblade.transport.excel.TransportChangeRecordImporter;
|
||||
import org.springblade.transport.pojo.entity.TransportChangeRecord;
|
||||
import org.springblade.transport.pojo.vo.TransportChangeRecordVO;
|
||||
@@ -126,8 +127,8 @@ public class TransportChangeRecordController extends BladeController {
|
||||
public void exportTransportChangeRecord(TransportChangeRecordVO transportChangeRecord,
|
||||
@RequestParam(required = false) String ids,
|
||||
HttpServletResponse response) {
|
||||
List<TransportChangeRecordExcel> list = transportChangeRecordService.exportTransportChangeRecord(buildExportQuery(transportChangeRecord, ids));
|
||||
ExcelUtil.export(response, "变更记录" + DateUtil.time(), "变更记录表", list, TransportChangeRecordExcel.class);
|
||||
List<TransportChangeRecordExportExcel> list = transportChangeRecordService.exportTransportChangeRecord(buildExportQuery(transportChangeRecord, ids));
|
||||
ExcelUtil.export(response, "变更记录" + DateUtil.time(), "变更记录表", list, TransportChangeRecordExportExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
|
||||
@@ -37,7 +37,10 @@ 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.TransportPlanExcel;
|
||||
import org.springblade.transport.excel.TransportPlanImportExcel;
|
||||
import org.springblade.transport.pojo.dto.TransportPlanDispatchRequest;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
import org.springblade.transport.pojo.vo.BusinessRemoveResultVO;
|
||||
import org.springblade.transport.pojo.vo.TransportPlanVO;
|
||||
@@ -48,8 +51,10 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -102,22 +107,63 @@ public class TransportPlanController extends BladeController {
|
||||
ExcelUtil.export(response, "运输计划" + DateUtil.time(), "运输计划", list, TransportPlanExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "导出运输计划模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
TransportPlanImportExcel template = new TransportPlanImportExcel();
|
||||
template.setPlanName("示例运输计划");
|
||||
template.setTransportType("公路运输");
|
||||
template.setPlanStartDate(LocalDate.now().toString());
|
||||
template.setPlanEndDate(LocalDate.now().plusDays(1).toString());
|
||||
template.setCargoName("示例货物");
|
||||
template.setCargoType("示例货物类型");
|
||||
template.setQuantity(new BigDecimal("10"));
|
||||
template.setQuantityUnit("吨");
|
||||
template.setPackageType("袋装");
|
||||
template.setDepartureAddress("示例发货地址");
|
||||
template.setArrivalAddress("示例收货地址");
|
||||
ExcelUtil.export(response, "运输计划模板", "运输计划导入模板", List.of(template), TransportPlanImportExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/import-transport-plan")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导入运输计划", description = "传入 Excel、项目和客户合同")
|
||||
public R importTransportPlan(MultipartFile file, @RequestParam Long projectId, @RequestParam String projectName,
|
||||
@RequestParam Long contractId, @RequestParam String contractName, @RequestParam String customerName,
|
||||
HttpServletResponse response) {
|
||||
List<TransportPlanImportExcel> failureList = transportPlanService.importTransportPlan(
|
||||
ExcelUtil.read(file, TransportPlanImportExcel.class), projectId, projectName, contractId, contractName, customerName);
|
||||
if (Func.isNotEmpty(failureList)) {
|
||||
ImportFailureExcelUtil.export(response, "运输计划导入失败明细" + DateUtil.time(), "导入失败明细", failureList, TransportPlanImportExcel.class);
|
||||
return null;
|
||||
}
|
||||
return R.success("导入数据成功");
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R<TransportPlanVO> copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.data(transportPlanService.copy(id));
|
||||
}
|
||||
|
||||
@PostMapping("/dispatch")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "计划调度并生成运单")
|
||||
public R<Integer> dispatch(@RequestBody TransportPlanDispatchRequest request) {
|
||||
return R.data(transportPlanService.dispatch(request));
|
||||
}
|
||||
|
||||
@PostMapping("/cancel")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperationSupport(order = 10)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "完成", description = "传入id")
|
||||
public R complete(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
return R.status(transportPlanService.complete(id));
|
||||
|
||||
@@ -132,6 +132,14 @@ public class TransportVehicleController extends BladeController {
|
||||
return R.status(transportVehicleService.changeStatus(id, status));
|
||||
}
|
||||
|
||||
@PostMapping("/audit-certification")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "审核车辆认证")
|
||||
public R auditCertification(@RequestParam Long id, @RequestParam Integer certificationStatus,
|
||||
@RequestParam(required = false) String rejectReason) {
|
||||
return R.status(transportVehicleService.auditCertification(id, certificationStatus, rejectReason));
|
||||
}
|
||||
|
||||
/**
|
||||
* 证件有效期统计
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ 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.ViolationRecordExcel;
|
||||
import org.springblade.transport.excel.ViolationRecordImporter;
|
||||
import org.springblade.transport.excel.ViolationRecordImportExcel;
|
||||
import org.springblade.transport.pojo.entity.ViolationRecord;
|
||||
import org.springblade.transport.pojo.vo.ViolationRecordVO;
|
||||
import org.springblade.transport.service.IViolationRecordService;
|
||||
@@ -127,9 +127,9 @@ public class ViolationRecordController extends BladeController {
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "导入违章记录", description = "传入excel")
|
||||
public R importViolationRecord(MultipartFile file, HttpServletResponse response) {
|
||||
List<ViolationRecordExcel> failureList = violationRecordService.importViolationRecord(ExcelUtil.read(file, ViolationRecordExcel.class));
|
||||
List<ViolationRecordImportExcel> failureList = violationRecordService.importViolationRecord(ExcelUtil.read(file, ViolationRecordImportExcel.class));
|
||||
if (Func.isNotEmpty(failureList)) {
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "违章记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, ViolationRecordExcel.class);
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.export(response, "违章记录导入失败明细" + DateUtil.time(), "导入失败明细", failureList, ViolationRecordImportExcel.class);
|
||||
return null;
|
||||
}
|
||||
return R.success("操作成功");
|
||||
@@ -155,8 +155,8 @@ public class ViolationRecordController extends BladeController {
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导出模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
List<ViolationRecordExcel> list = new ArrayList<>();
|
||||
ExcelUtil.export(response, "违章记录模板", "违章记录表", list, ViolationRecordExcel.class);
|
||||
List<ViolationRecordImportExcel> list = new ArrayList<>();
|
||||
ExcelUtil.export(response, "违章记录模板", "违章记录表", list, ViolationRecordImportExcel.class);
|
||||
}
|
||||
|
||||
private Query normalizeQuery(Query query) {
|
||||
|
||||
@@ -29,6 +29,7 @@ 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.common.excel.ImportFailureExcelUtil;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
@@ -38,9 +39,18 @@ 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.excel.WaybillImportBatchExcel;
|
||||
import org.springblade.transport.pojo.entity.ContractManage;
|
||||
import org.springblade.transport.pojo.entity.CustomerArchive;
|
||||
import org.springblade.transport.pojo.entity.ProjectApply;
|
||||
import org.springblade.transport.pojo.entity.TransportPlan;
|
||||
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.IContractManageService;
|
||||
import org.springblade.transport.service.ICustomerArchiveService;
|
||||
import org.springblade.transport.service.IProjectApplyService;
|
||||
import org.springblade.transport.service.ITransportPlanService;
|
||||
import org.springblade.transport.service.IWaybillService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -48,9 +58,12 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 运单管理 控制器
|
||||
@@ -65,6 +78,10 @@ import java.util.List;
|
||||
public class WaybillController extends BladeController {
|
||||
|
||||
private final IWaybillService waybillService;
|
||||
private final IProjectApplyService projectApplyService;
|
||||
private final IContractManageService contractManageService;
|
||||
private final ICustomerArchiveService customerArchiveService;
|
||||
private final ITransportPlanService transportPlanService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@@ -80,61 +97,121 @@ public class WaybillController extends BladeController {
|
||||
return R.data(waybillService.selectWaybillPage(Condition.getPage(query), waybill));
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@GetMapping("/import-batch/options")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "运单批量导入选项")
|
||||
public R<Map<String, List<Map<String, Object>>>> importBatchOptions() {
|
||||
Map<String, List<Map<String, Object>>> options = new LinkedHashMap<>();
|
||||
options.put("projects", projectApplyService.list().stream()
|
||||
.filter(project -> "approved".equals(project.getApprovalStatus()))
|
||||
.map(project -> option(project.getId(), "projectName", project.getProjectName(), "customerName", project.getCustomerNames()))
|
||||
.toList());
|
||||
options.put("contracts", contractManageService.list().stream()
|
||||
.filter(contract -> "approved".equals(contract.getApprovalStatus()))
|
||||
.map(contract -> option(contract.getId(), "contractName", contract.getContractName(), "projectId", contract.getProjectId()))
|
||||
.toList());
|
||||
options.put("carriers", customerArchiveService.list().stream()
|
||||
.filter(customer -> "承运商".equals(customer.getCustomerType()) && Integer.valueOf(1).equals(customer.getStatus()))
|
||||
.map(customer -> option(customer.getId(), "name", customer.getFullName(), null, null))
|
||||
.toList());
|
||||
options.put("creators", new ArrayList<>());
|
||||
options.put("plans", transportPlanService.list().stream()
|
||||
.map(plan -> option(plan.getId(), "planName", plan.getPlanName(), "projectId", plan.getProjectId()))
|
||||
.toList());
|
||||
return R.data(options);
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增或修改", description = "传入waybill")
|
||||
public R submit(@RequestBody Waybill waybill) {
|
||||
return R.status(waybillService.submit(waybill));
|
||||
}
|
||||
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperationSupport(order = 5)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 6)
|
||||
@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("/import-waybill-manage")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "导入运单管理", description = "传入excel")
|
||||
public R importWaybill(MultipartFile file, HttpServletResponse response) {
|
||||
List<WaybillExcel> failureList = waybillService.importWaybill(ExcelUtil.read(file, WaybillExcel.class));
|
||||
if (Func.isNotEmpty(failureList)) {
|
||||
ImportFailureExcelUtil.export(response, "运单管理导入失败明细" + DateUtil.time(), "导入失败明细", failureList, WaybillExcel.class);
|
||||
return null;
|
||||
}
|
||||
return R.success("导入数据成功");
|
||||
}
|
||||
|
||||
@GetMapping("/export-template")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "导出模板")
|
||||
public void exportTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.export(response, "运单管理模板", "运单管理导入模板", new ArrayList<WaybillExcel>(), WaybillExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("/import-batch/export-template")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "导出运单批量导入模板")
|
||||
public void exportImportBatchTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.export(response, "运单批量导入模板", "运单批量导入模板", new ArrayList<WaybillImportBatchExcel>(), WaybillImportBatchExcel.class);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperationSupport(order = 10)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 11)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 12)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 13)
|
||||
@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)
|
||||
@ApiOperationSupport(order = 14)
|
||||
@Operation(summary = "批量完成", description = "传入ids")
|
||||
public R<BusinessRemoveResultVO> batchComplete(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.data(waybillService.batchComplete(ids));
|
||||
}
|
||||
|
||||
private Map<String, Object> option(Long id, String nameKey, String name, String extraKey, Object extraValue) {
|
||||
Map<String, Object> option = new LinkedHashMap<>();
|
||||
option.put("id", id);
|
||||
option.put(nameKey, name);
|
||||
if (Func.isNotEmpty(extraKey)) {
|
||||
option.put(extraKey, extraValue);
|
||||
}
|
||||
return option;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class AccidentRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 事故记录导出 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(18)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class AccidentRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车船类型")
|
||||
private String vehicleType;
|
||||
|
||||
@ExcelProperty("车牌号/船号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("事故发生日期")
|
||||
private LocalDate accidentDate;
|
||||
|
||||
@ExcelProperty("事故发生地点")
|
||||
private String accidentLocation;
|
||||
|
||||
@ExcelProperty("事故性质")
|
||||
private String accidentNature;
|
||||
|
||||
@ExcelProperty("事故责任")
|
||||
private String accidentResponsibility;
|
||||
|
||||
@ExcelProperty("直接经济损失")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal directEconomicLoss;
|
||||
|
||||
@ExcelProperty("保险理赔金额")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal insuranceClaimAmount;
|
||||
|
||||
@ExcelProperty("事故原因及损坏情况")
|
||||
private String accidentReasonDamage;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class AnnualInspectionRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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 AnnualInspectionRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车船类型")
|
||||
private String vehicleType;
|
||||
|
||||
@ExcelProperty("车牌号/船号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("检测评定日期")
|
||||
private LocalDate inspectionAssessmentDate;
|
||||
|
||||
@ExcelProperty("有效期截止日")
|
||||
private LocalDate validUntilDate;
|
||||
|
||||
@ExcelProperty("车辆技术等级")
|
||||
private String vehicleTechnicalLevel;
|
||||
|
||||
@ExcelProperty("船舶检验类型")
|
||||
private String shipInspectionType;
|
||||
|
||||
@ExcelProperty("客车类型及等级")
|
||||
private String passengerTypeLevel;
|
||||
|
||||
@ExcelProperty("检测评定单位")
|
||||
private String inspectionUnit;
|
||||
|
||||
@ExcelProperty("费用")
|
||||
private BigDecimal fee;
|
||||
|
||||
@ExcelProperty("评定(复核)单位")
|
||||
private String assessmentUnit;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -49,65 +49,56 @@ 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 firstCargoTypeName;
|
||||
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
@ExcelProperty("二级货物类型")
|
||||
private String secondCargoTypeName;
|
||||
|
||||
@ExcelProperty("包装")
|
||||
private String packageType;
|
||||
@ExcelProperty("二级货物类型编码")
|
||||
private String secondCargoTypeCode;
|
||||
|
||||
@ExcelProperty("包装品牌")
|
||||
private String packageBrand;
|
||||
|
||||
@ExcelProperty("规格")
|
||||
private String specification;
|
||||
|
||||
@ExcelProperty("型号")
|
||||
private String model;
|
||||
|
||||
@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("其他说明1")
|
||||
private String descriptionOne;
|
||||
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("其他说明2")
|
||||
private String descriptionTwo;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("组织")
|
||||
private String deptName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -55,10 +54,6 @@ public class CommonRouteExcel implements Serializable {
|
||||
private String departureName;
|
||||
@ExcelProperty("发货地址")
|
||||
private String departureAddress;
|
||||
@ExcelProperty("发货经度")
|
||||
private BigDecimal departureLongitude;
|
||||
@ExcelProperty("发货纬度")
|
||||
private BigDecimal departureLatitude;
|
||||
@ExcelProperty("发货联系人")
|
||||
private String departureContact;
|
||||
@ExcelProperty("发货联系方式")
|
||||
@@ -67,10 +62,6 @@ public class CommonRouteExcel implements Serializable {
|
||||
private String arrivalName;
|
||||
@ExcelProperty("收货地址")
|
||||
private String arrivalAddress;
|
||||
@ExcelProperty("收货经度")
|
||||
private BigDecimal arrivalLongitude;
|
||||
@ExcelProperty("收货纬度")
|
||||
private BigDecimal arrivalLatitude;
|
||||
@ExcelProperty("收货联系人")
|
||||
private String arrivalContact;
|
||||
@ExcelProperty("收货联系方式")
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 常用线路导入 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(24)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class CommonRouteImportExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("*线路名称")
|
||||
private String routeName;
|
||||
|
||||
@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 remark;
|
||||
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
@@ -54,19 +54,19 @@ public class CustomerArchiveExcel implements Serializable {
|
||||
@ExcelProperty("客商简称")
|
||||
private String shortName;
|
||||
|
||||
@ExcelProperty("客商名称")
|
||||
@ExcelProperty("*客商名称")
|
||||
private String fullName;
|
||||
|
||||
@ExcelProperty("客商类型")
|
||||
@ExcelProperty("*客商类型")
|
||||
private String customerType;
|
||||
|
||||
@ExcelProperty("客商性质")
|
||||
@ExcelProperty("*客商性质")
|
||||
private String customerNature;
|
||||
|
||||
@ExcelProperty("统一信用代码")
|
||||
@ExcelProperty("*统一信用代码")
|
||||
private String unifiedCreditCode;
|
||||
|
||||
@ExcelProperty("所属组织")
|
||||
@ExcelProperty("*所属组织")
|
||||
private String deptName;
|
||||
|
||||
@ExcelProperty("准入类型")
|
||||
@@ -96,10 +96,10 @@ public class CustomerArchiveExcel implements Serializable {
|
||||
@ExcelProperty("申请总资金使用额度(万元)")
|
||||
private BigDecimal applyCreditLimit;
|
||||
|
||||
@ExcelProperty("联系电话")
|
||||
@ExcelProperty("*联系电话")
|
||||
private String contactPhone;
|
||||
|
||||
@ExcelProperty("法人/负责人")
|
||||
@ExcelProperty("*法人/负责人")
|
||||
private String legalPerson;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
|
||||
@@ -53,67 +53,76 @@ public class DriverExcel implements Serializable {
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("司机姓名")
|
||||
@ExcelProperty("司机姓名 *")
|
||||
private String driverName;
|
||||
|
||||
@ExcelProperty("身份证号")
|
||||
@ExcelProperty("身份证号 *")
|
||||
private String idCardNo;
|
||||
|
||||
@ExcelProperty("手机号")
|
||||
private String mobile;
|
||||
@ExcelProperty("出生年月")
|
||||
private LocalDate birthday;
|
||||
|
||||
@ExcelProperty("性别")
|
||||
@ExcelProperty("性别 *")
|
||||
private String gender;
|
||||
|
||||
@ExcelProperty("司机类型")
|
||||
private String driverType;
|
||||
@ExcelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ExcelProperty("岗位")
|
||||
@ExcelProperty("学历")
|
||||
private String education;
|
||||
|
||||
@ExcelProperty("住址")
|
||||
private String address;
|
||||
|
||||
@ExcelProperty("岗位 *")
|
||||
private String posts;
|
||||
|
||||
@ExcelProperty("所属组织")
|
||||
private String organizationName;
|
||||
|
||||
@ExcelProperty("状态")
|
||||
private String statusName;
|
||||
|
||||
@ExcelProperty("准驾车型")
|
||||
@ExcelProperty("准驾车型 *")
|
||||
private String drivingType;
|
||||
|
||||
@ExcelProperty("驾驶证档案编号")
|
||||
@ExcelProperty("档案编号 *")
|
||||
private String drivingLicenseNo;
|
||||
|
||||
@ExcelProperty("驾驶证有效期起")
|
||||
private LocalDate drivingLicenseStartDate;
|
||||
|
||||
@ExcelProperty("驾驶证有效期止")
|
||||
@ExcelProperty("有效期 *")
|
||||
private LocalDate drivingLicenseEndDate;
|
||||
|
||||
@ExcelProperty("驾驶证长期有效")
|
||||
private String drivingLicenseLongTermName;
|
||||
@ExcelProperty("驾驶证主页图片上传")
|
||||
private String drivingLicenseFront;
|
||||
|
||||
@ExcelProperty("从业资格证类型")
|
||||
@ExcelProperty("驾驶证副页图片上传")
|
||||
private String drivingLicenseBack;
|
||||
|
||||
@ExcelProperty("从业资格证类型 *")
|
||||
private String qualificationType;
|
||||
|
||||
@ExcelProperty("资格证号")
|
||||
@ExcelProperty("资格证编号 *")
|
||||
private String qualificationNo;
|
||||
|
||||
@ExcelProperty("从业资格证有效期止")
|
||||
@ExcelProperty("有效期 *")
|
||||
private LocalDate qualificationEndDate;
|
||||
|
||||
@ExcelProperty("从业资格证长期有效")
|
||||
private String qualificationLongTermName;
|
||||
@ExcelProperty("证件首页上传")
|
||||
private String qualificationFront;
|
||||
|
||||
@ExcelProperty("紧急联系人")
|
||||
@ExcelProperty("证件内页上传")
|
||||
private String qualificationBack;
|
||||
|
||||
@ExcelProperty("司机类型 *")
|
||||
private String driverType;
|
||||
|
||||
@ExcelProperty("手机号 *")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("紧急联系人姓名 *")
|
||||
private String emergencyContactName;
|
||||
|
||||
@ExcelProperty("紧急联系人手机号")
|
||||
@ExcelProperty("紧急联系人手机号 *")
|
||||
private String emergencyContactMobile;
|
||||
|
||||
@ExcelProperty("与联系人关系")
|
||||
private String contactRelation;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("所属组织 *")
|
||||
private String organizationName;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* 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.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 设备台账 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class EquipmentLedgerExcel implements Serializable {
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
@ExcelProperty("*车船类型") private String vehicleType;
|
||||
@ExcelProperty("*车牌号/船号") private String vehicleNo;
|
||||
@ExcelProperty("*设备号") private String equipmentCode;
|
||||
@ExcelProperty("*设备名称") private String equipmentName;
|
||||
@ExcelProperty("设备品牌") private String equipmentBrand;
|
||||
@ExcelProperty("设备类型") private String equipmentType;
|
||||
@ExcelProperty("规格型号") private String specificationModel;
|
||||
@ExcelProperty("出厂日期") @DateTimeFormat("yyyy-MM-dd") private LocalDate factoryDate;
|
||||
@ExcelProperty("备注") private String remark;
|
||||
@ExcelIgnore private String errorMessage;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class EtcRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* ETC记录导出 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class EtcRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车牌号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("入口时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime entryTime;
|
||||
|
||||
@ExcelProperty("ETC卡号")
|
||||
private String etcCardNo;
|
||||
|
||||
@ExcelProperty("出口时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime exitTime;
|
||||
|
||||
@ExcelProperty("入口站")
|
||||
private String entryStation;
|
||||
|
||||
@ExcelProperty("交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
@ExcelProperty("出口站")
|
||||
private String exitStation;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class InsuranceRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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(18)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class InsuranceRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车船类型")
|
||||
private String vehicleType;
|
||||
|
||||
@ExcelProperty("车牌号/船号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("保险类型")
|
||||
private String insuranceType;
|
||||
|
||||
@ExcelProperty("保单号")
|
||||
private String policyNo;
|
||||
|
||||
@ExcelProperty("开始日期")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ExcelProperty("结束日期")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ExcelProperty("保额")
|
||||
private BigDecimal insuredAmount;
|
||||
|
||||
@ExcelProperty("保费")
|
||||
private BigDecimal premium;
|
||||
|
||||
@ExcelProperty("发票号")
|
||||
private String invoiceNo;
|
||||
|
||||
@ExcelProperty("开票日期")
|
||||
private LocalDate invoiceDate;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
import cn.idev.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 配载管理 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class LoadingManageExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("配载单号")
|
||||
private String loadingNo;
|
||||
@ExcelProperty("配载子单号")
|
||||
private String loadingSubNos;
|
||||
@ExcelProperty("项目名称")
|
||||
private String projectName;
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerName;
|
||||
@ExcelProperty("运输类型")
|
||||
private String transportType;
|
||||
@ExcelProperty("货物类型")
|
||||
private String cargoType;
|
||||
@ExcelProperty("货物名称")
|
||||
private String cargoName;
|
||||
@ExcelProperty("车/船/航班/班列")
|
||||
private String vehicleNo;
|
||||
@ExcelProperty("司机")
|
||||
private String driverName;
|
||||
@ExcelProperty("联系电话")
|
||||
private String driverPhone;
|
||||
@ExcelProperty("承运类型")
|
||||
private String carrierType;
|
||||
@ExcelProperty("承运商")
|
||||
private String carrierName;
|
||||
@ExcelProperty("发货地址")
|
||||
private String departureAddress;
|
||||
@ExcelProperty("途经地")
|
||||
private String transitAddress;
|
||||
@ExcelProperty("到货地")
|
||||
private String arrivalAddress;
|
||||
@ExcelProperty("原始单号")
|
||||
private String originalNo;
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
@ExcelProperty("开始日期")
|
||||
private LocalDate startDate;
|
||||
@ExcelProperty("结束日期")
|
||||
private LocalDate endDate;
|
||||
@ExcelProperty("计划名称")
|
||||
private String planName;
|
||||
@ExcelProperty("运单批次号")
|
||||
private String batchNo;
|
||||
@ExcelProperty("当前过程节点")
|
||||
private String currentProcessNode;
|
||||
@ExcelProperty("里程")
|
||||
private String mileage;
|
||||
@ExcelProperty("预计发货日期")
|
||||
private LocalDate estimatedStartDate;
|
||||
@ExcelProperty("预计完成日期")
|
||||
private LocalDate estimatedEndDate;
|
||||
@ExcelProperty("任务备注")
|
||||
private String taskRemark;
|
||||
@ExcelProperty("业务状态")
|
||||
private String businessStatus;
|
||||
@ExcelProperty("所属组织")
|
||||
private String deptName;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class MaintenancePlanExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 车辆保养记录导出 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MaintenancePlanExportExcel extends MaintenancePlanExcel {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty(value = "创建时间", index = 12)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty(value = "更新人", index = 13)
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty(value = "更新时间", index = 14)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -27,6 +27,7 @@ package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
import cn.idev.excel.annotation.format.NumberFormat;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
@@ -64,6 +65,7 @@ public class MaintenanceRecordExcel implements Serializable {
|
||||
private String maintainer;
|
||||
|
||||
@ExcelProperty("*维修时间")
|
||||
@DateTimeFormat("yyyy-MM-dd")
|
||||
private LocalDateTime maintenanceTime;
|
||||
|
||||
@ExcelProperty("维修位置")
|
||||
@@ -86,12 +88,24 @@ public class MaintenanceRecordExcel implements Serializable {
|
||||
private String address;
|
||||
|
||||
@ExcelProperty("出厂时间")
|
||||
@DateTimeFormat("yyyy-MM-dd")
|
||||
private LocalDateTime factoryTime;
|
||||
|
||||
@ExcelProperty("里程/航程数")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal mileage;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("里程单位")
|
||||
private String mileageUnit;
|
||||
|
||||
@@ -101,7 +115,7 @@ public class MaintenanceRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 车辆维修记录导出 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MaintenanceRecordExportExcel extends MaintenanceRecordExcel {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty(value = "导出失败原因", index = 17)
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class MileageRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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(22)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class MileageRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车船类型")
|
||||
private String vehicleType;
|
||||
|
||||
@ExcelProperty("车牌号/船号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("上月统计里程数")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal previousMonthMileage;
|
||||
|
||||
@ExcelProperty("本月统计里程数")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal currentMonthMileage;
|
||||
|
||||
@ExcelProperty("本月行驶里程数")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal monthlyMileage;
|
||||
|
||||
@ExcelProperty("累计行驶里程数")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal totalMileage;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class OilElectricRecordExcel implements Serializable {
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("卡号")
|
||||
@ExcelIgnore
|
||||
private String cardNo;
|
||||
|
||||
@ExcelProperty("*交易时间")
|
||||
@@ -79,7 +79,7 @@ public class OilElectricRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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 OilElectricRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("交易时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime transactionTime;
|
||||
|
||||
@ExcelProperty("车船类型")
|
||||
private String vehicleType;
|
||||
|
||||
@ExcelProperty("费用类型")
|
||||
private String feeType;
|
||||
|
||||
@ExcelProperty("油品")
|
||||
private String oilProduct;
|
||||
|
||||
@ExcelProperty("车牌号/船号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("持卡人")
|
||||
private String cardHolder;
|
||||
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ExcelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ExcelProperty("交易金额")
|
||||
private BigDecimal transactionAmount;
|
||||
|
||||
@ExcelProperty("余额")
|
||||
private BigDecimal balance;
|
||||
|
||||
@ExcelProperty("站点")
|
||||
private String station;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class OtherExpenseRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
private String errorMessage;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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 OtherExpenseRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车船类型")
|
||||
private String vehicleType;
|
||||
|
||||
@ExcelProperty("车牌号/船号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("费用日期")
|
||||
private LocalDate expenseDate;
|
||||
|
||||
@ExcelProperty("费用类型")
|
||||
private String expenseType;
|
||||
|
||||
@ExcelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/** 发货模板货物导入 Excel。 */
|
||||
@Data
|
||||
@ColumnWidth(20)
|
||||
public class ShippingTemplateGoodsExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ExcelProperty("*货物名称") private String cargoName;
|
||||
@ExcelProperty("*货物类型") private String cargoType;
|
||||
@ExcelProperty("数量") private String quantity;
|
||||
@ExcelProperty("数量单位") private String quantityUnit;
|
||||
@ExcelProperty("包装") private String packageType;
|
||||
@ExcelProperty("品牌") private String brand;
|
||||
@ExcelProperty("规格") private String specification;
|
||||
@ExcelProperty("型号") private String model;
|
||||
@ExcelProperty("物料编码") private String materialCode;
|
||||
@ExcelProperty("设备编码") private String deviceCode;
|
||||
@ExcelProperty("备注") private String remark;
|
||||
@ExcelIgnore private String errorMessage;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class TireReplacementRecordExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty
|
||||
@ExcelIgnore
|
||||
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>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
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.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 换胎记录导出 Excel
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(18)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class TireReplacementRecordExportExcel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("车牌号")
|
||||
private String vehicleNo;
|
||||
|
||||
@ExcelProperty("处理人")
|
||||
private String handler;
|
||||
|
||||
@ExcelProperty("换胎时间")
|
||||
private LocalDate replacementTime;
|
||||
|
||||
@ExcelProperty("轮胎品牌")
|
||||
private String tireBrand;
|
||||
|
||||
@ExcelProperty("换胎数量")
|
||||
private Integer tireQuantity;
|
||||
|
||||
@ExcelProperty("换胎费用")
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal replacementCost;
|
||||
|
||||
@ExcelProperty("换胎说明")
|
||||
private String replacementDescription;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user