导出模板新增必填标识
This commit is contained in:
@@ -54,22 +54,22 @@ public class AccidentRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("事故发生日期")
|
@ExcelProperty("*事故发生日期")
|
||||||
private LocalDate accidentDate;
|
private LocalDate accidentDate;
|
||||||
|
|
||||||
@ExcelProperty("事故发生地点")
|
@ExcelProperty("事故发生地点")
|
||||||
private String accidentLocation;
|
private String accidentLocation;
|
||||||
|
|
||||||
@ExcelProperty("事故性质")
|
@ExcelProperty("*事故性质")
|
||||||
private String accidentNature;
|
private String accidentNature;
|
||||||
|
|
||||||
@ExcelProperty("事故责任")
|
@ExcelProperty("*事故责任")
|
||||||
private String accidentResponsibility;
|
private String accidentResponsibility;
|
||||||
|
|
||||||
@ExcelProperty("直接经济损失")
|
@ExcelProperty("直接经济损失")
|
||||||
|
|||||||
@@ -53,28 +53,31 @@ public class AnnualInspectionRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("检测评定日期")
|
@ExcelProperty("*检测评定日期")
|
||||||
private LocalDate inspectionAssessmentDate;
|
private LocalDate inspectionAssessmentDate;
|
||||||
|
|
||||||
@ExcelProperty("车辆技术等级/船舶检验类型")
|
@ExcelProperty("*有效期截止日")
|
||||||
private String inspectionContent;
|
|
||||||
|
|
||||||
@ExcelProperty("有效期截止日")
|
|
||||||
private LocalDate validUntilDate;
|
private LocalDate validUntilDate;
|
||||||
|
|
||||||
|
@ExcelProperty("*车辆技术等级")
|
||||||
|
private String vehicleTechnicalLevel;
|
||||||
|
|
||||||
|
@ExcelProperty("*船舶检验类型")
|
||||||
|
private String shipInspectionType;
|
||||||
|
|
||||||
@ExcelProperty("客车类型及等级")
|
@ExcelProperty("客车类型及等级")
|
||||||
private String passengerTypeLevel;
|
private String passengerTypeLevel;
|
||||||
|
|
||||||
@ExcelProperty("检测评定单位")
|
@ExcelProperty("检测评定单位")
|
||||||
private String inspectionUnit;
|
private String inspectionUnit;
|
||||||
|
|
||||||
@ExcelProperty("费用")
|
@ExcelProperty("*费用")
|
||||||
private BigDecimal fee;
|
private BigDecimal fee;
|
||||||
|
|
||||||
@ExcelProperty("评定(复核)单位")
|
@ExcelProperty("评定(复核)单位")
|
||||||
|
|||||||
@@ -34,27 +34,27 @@ public class EtcRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车牌号")
|
@ExcelProperty("*车牌号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("ETC卡号")
|
|
||||||
private String etcCardNo;
|
|
||||||
|
|
||||||
@ExcelProperty("入口时间")
|
@ExcelProperty("入口时间")
|
||||||
private LocalDateTime entryTime;
|
private LocalDateTime entryTime;
|
||||||
|
|
||||||
@ExcelProperty("出口时间")
|
@ExcelProperty("*ETC卡号")
|
||||||
|
private String etcCardNo;
|
||||||
|
|
||||||
|
@ExcelProperty("*出口时间")
|
||||||
private LocalDateTime exitTime;
|
private LocalDateTime exitTime;
|
||||||
|
|
||||||
@ExcelProperty("入口站")
|
@ExcelProperty("入口站")
|
||||||
private String entryStation;
|
private String entryStation;
|
||||||
|
|
||||||
|
@ExcelProperty("*交易金额")
|
||||||
|
private BigDecimal transactionAmount;
|
||||||
|
|
||||||
@ExcelProperty("出口站")
|
@ExcelProperty("出口站")
|
||||||
private String exitStation;
|
private String exitStation;
|
||||||
|
|
||||||
@ExcelProperty("交易金额")
|
|
||||||
private BigDecimal transactionAmount;
|
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|||||||
@@ -53,28 +53,31 @@ public class InsuranceRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelIgnore
|
||||||
|
private String ocrTemplate;
|
||||||
|
|
||||||
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("保险类型")
|
@ExcelProperty("*保险类型")
|
||||||
private String insuranceType;
|
private String insuranceType;
|
||||||
|
|
||||||
@ExcelProperty("保单号")
|
@ExcelProperty("*保单号")
|
||||||
private String policyNo;
|
private String policyNo;
|
||||||
|
|
||||||
@ExcelProperty("开始日期")
|
@ExcelProperty("*开始日期")
|
||||||
private LocalDate startDate;
|
private LocalDate startDate;
|
||||||
|
|
||||||
@ExcelProperty("结束日期")
|
@ExcelProperty("*结束日期")
|
||||||
private LocalDate endDate;
|
private LocalDate endDate;
|
||||||
|
|
||||||
@ExcelProperty("保额")
|
@ExcelProperty("保额")
|
||||||
private BigDecimal insuredAmount;
|
private BigDecimal insuredAmount;
|
||||||
|
|
||||||
@ExcelProperty("保费")
|
@ExcelProperty("*保费")
|
||||||
private BigDecimal premium;
|
private BigDecimal premium;
|
||||||
|
|
||||||
@ExcelProperty("发票号")
|
@ExcelProperty("发票号")
|
||||||
|
|||||||
@@ -54,28 +54,28 @@ public class MaintenancePlanExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("保养人")
|
@ExcelProperty("保养人")
|
||||||
private String maintainer;
|
private String maintainer;
|
||||||
|
|
||||||
@ExcelProperty("保养时间")
|
@ExcelProperty("*保养时间")
|
||||||
private LocalDateTime maintenanceTime;
|
private LocalDateTime maintenanceTime;
|
||||||
|
|
||||||
@ExcelProperty("里程/航程数")
|
@ExcelProperty("里程/航程数")
|
||||||
private BigDecimal mileage;
|
private BigDecimal mileage;
|
||||||
|
|
||||||
@ExcelProperty("里程单位")
|
@ExcelIgnore
|
||||||
private String mileageUnit;
|
private String mileageUnit;
|
||||||
|
|
||||||
@ExcelProperty("保养项目")
|
@ExcelProperty("保养项目")
|
||||||
private String maintenanceItem;
|
private String maintenanceItem;
|
||||||
|
|
||||||
@ExcelProperty("费用")
|
@ExcelProperty("*费用")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal cost;
|
private BigDecimal cost;
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ public class MaintenancePlanExcel implements Serializable {
|
|||||||
@ExcelProperty("下次保养里程/航程")
|
@ExcelProperty("下次保养里程/航程")
|
||||||
private BigDecimal nextMaintenanceMileage;
|
private BigDecimal nextMaintenanceMileage;
|
||||||
|
|
||||||
@ExcelProperty("附件")
|
@ExcelIgnore
|
||||||
private String attachments;
|
private String attachments;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
|
|||||||
@@ -54,16 +54,16 @@ public class MaintenanceRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("维修人")
|
@ExcelProperty("维修人")
|
||||||
private String maintainer;
|
private String maintainer;
|
||||||
|
|
||||||
@ExcelProperty("维修时间")
|
@ExcelProperty("*维修时间")
|
||||||
private LocalDateTime maintenanceTime;
|
private LocalDateTime maintenanceTime;
|
||||||
|
|
||||||
@ExcelProperty("维修位置")
|
@ExcelProperty("维修位置")
|
||||||
@@ -72,7 +72,7 @@ public class MaintenanceRecordExcel implements Serializable {
|
|||||||
@ExcelProperty("更换零件")
|
@ExcelProperty("更换零件")
|
||||||
private String replacedPart;
|
private String replacedPart;
|
||||||
|
|
||||||
@ExcelProperty("费用")
|
@ExcelProperty("*费用")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal cost;
|
private BigDecimal cost;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ public class MaintenanceRecordExcel implements Serializable {
|
|||||||
@ExcelProperty("里程单位")
|
@ExcelProperty("里程单位")
|
||||||
private String mileageUnit;
|
private String mileageUnit;
|
||||||
|
|
||||||
@ExcelProperty("附件")
|
@ExcelIgnore
|
||||||
private String attachments;
|
private String attachments;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
|
|||||||
@@ -53,29 +53,29 @@ public class MileageRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("上月统计里程")
|
@ExcelProperty("上月统计里程数")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal previousMonthMileage;
|
private BigDecimal previousMonthMileage;
|
||||||
|
|
||||||
@ExcelProperty("本月统计里程")
|
@ExcelProperty("本月统计里程数")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal currentMonthMileage;
|
private BigDecimal currentMonthMileage;
|
||||||
|
|
||||||
@ExcelProperty("本月行驶里程")
|
@ExcelProperty("本月行驶里程数")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal monthlyMileage;
|
private BigDecimal monthlyMileage;
|
||||||
|
|
||||||
@ExcelProperty("累计行驶里程")
|
@ExcelProperty("累计行驶里程数")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal totalMileage;
|
private BigDecimal totalMileage;
|
||||||
|
|
||||||
@ExcelProperty("里程单位")
|
@ExcelIgnore
|
||||||
private String mileageUnit;
|
private String mileageUnit;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
|
|||||||
@@ -37,20 +37,26 @@ public class OilElectricRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("卡号")
|
||||||
private String vehicleType;
|
private String cardNo;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*交易时间")
|
||||||
private String vehicleNo;
|
|
||||||
|
|
||||||
@ExcelProperty("交易时间")
|
|
||||||
private LocalDateTime transactionTime;
|
private LocalDateTime transactionTime;
|
||||||
|
|
||||||
@ExcelProperty("费用类型")
|
@ExcelProperty("*车船类型")
|
||||||
|
private String vehicleType;
|
||||||
|
|
||||||
|
@ExcelProperty("*费用类型")
|
||||||
private String feeType;
|
private String feeType;
|
||||||
|
|
||||||
@ExcelProperty("交易金额")
|
@ExcelProperty("油品")
|
||||||
private BigDecimal transactionAmount;
|
private String oilProduct;
|
||||||
|
|
||||||
|
@ExcelProperty("*车牌号/船号")
|
||||||
|
private String vehicleNo;
|
||||||
|
|
||||||
|
@ExcelProperty("持卡人")
|
||||||
|
private String cardHolder;
|
||||||
|
|
||||||
@ExcelProperty("数量")
|
@ExcelProperty("数量")
|
||||||
private BigDecimal quantity;
|
private BigDecimal quantity;
|
||||||
@@ -58,22 +64,16 @@ public class OilElectricRecordExcel implements Serializable {
|
|||||||
@ExcelProperty("单价")
|
@ExcelProperty("单价")
|
||||||
private BigDecimal unitPrice;
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
@ExcelProperty("持卡人")
|
@ExcelProperty("*交易金额")
|
||||||
private String cardHolder;
|
private BigDecimal transactionAmount;
|
||||||
|
|
||||||
@ExcelProperty("余额")
|
@ExcelProperty("余额")
|
||||||
private BigDecimal balance;
|
private BigDecimal balance;
|
||||||
|
|
||||||
@ExcelProperty("油品")
|
|
||||||
private String oilProduct;
|
|
||||||
|
|
||||||
@ExcelProperty("站点")
|
@ExcelProperty("站点")
|
||||||
private String station;
|
private String station;
|
||||||
|
|
||||||
@ExcelProperty("卡号")
|
@ExcelIgnore
|
||||||
private String cardNo;
|
|
||||||
|
|
||||||
@ExcelProperty("数据来源")
|
|
||||||
private String dataSource;
|
private String dataSource;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
|
|||||||
@@ -34,19 +34,19 @@ public class OtherExpenseRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("费用日期")
|
@ExcelProperty("*车船类型")
|
||||||
private LocalDate expenseDate;
|
|
||||||
|
|
||||||
@ExcelProperty("费用类型")
|
|
||||||
private String expenseType;
|
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("金额")
|
@ExcelProperty("*费用日期")
|
||||||
|
private LocalDate expenseDate;
|
||||||
|
|
||||||
|
@ExcelProperty("*费用类型")
|
||||||
|
private String expenseType;
|
||||||
|
|
||||||
|
@ExcelProperty("*金额")
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
|
|||||||
@@ -54,13 +54,13 @@ public class TireReplacementRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车牌号")
|
@ExcelProperty("*车牌号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("处理人")
|
@ExcelProperty("处理人")
|
||||||
private String handler;
|
private String handler;
|
||||||
|
|
||||||
@ExcelProperty("换胎时间")
|
@ExcelProperty("*换胎时间")
|
||||||
private LocalDate replacementTime;
|
private LocalDate replacementTime;
|
||||||
|
|
||||||
@ExcelProperty("轮胎品牌")
|
@ExcelProperty("轮胎品牌")
|
||||||
@@ -69,7 +69,7 @@ public class TireReplacementRecordExcel implements Serializable {
|
|||||||
@ExcelProperty("换胎数量")
|
@ExcelProperty("换胎数量")
|
||||||
private Integer tireQuantity;
|
private Integer tireQuantity;
|
||||||
|
|
||||||
@ExcelProperty("换胎费用")
|
@ExcelProperty("*换胎费用")
|
||||||
@NumberFormat("0.00")
|
@NumberFormat("0.00")
|
||||||
private BigDecimal replacementCost;
|
private BigDecimal replacementCost;
|
||||||
|
|
||||||
|
|||||||
@@ -51,16 +51,16 @@ public class TransportChangeRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("变更事项")
|
@ExcelProperty("*变更事项")
|
||||||
private String changeItem;
|
private String changeItem;
|
||||||
|
|
||||||
@ExcelProperty("变更内容")
|
@ExcelProperty("*变更内容")
|
||||||
private String changeContent;
|
private String changeContent;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
|
|||||||
@@ -53,25 +53,28 @@ public class ViolationRecordExcel implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ExcelProperty("车船类型")
|
@ExcelProperty("*车船类型")
|
||||||
private String vehicleType;
|
private String vehicleType;
|
||||||
|
|
||||||
@ExcelProperty("车牌号/船号")
|
@ExcelProperty("*车牌号/船号")
|
||||||
private String vehicleNo;
|
private String vehicleNo;
|
||||||
|
|
||||||
@ExcelProperty("驾驶人")
|
@ExcelProperty("*驾驶人")
|
||||||
private String driverName;
|
private String driverName;
|
||||||
|
|
||||||
@ExcelProperty("类型/事项")
|
@ExcelProperty("*类型")
|
||||||
private String violationContent;
|
private String violationType;
|
||||||
|
|
||||||
@ExcelProperty("时间")
|
@ExcelProperty("*事项")
|
||||||
|
private String violationItem;
|
||||||
|
|
||||||
|
@ExcelProperty("*日期")
|
||||||
private LocalDateTime violationTime;
|
private LocalDateTime violationTime;
|
||||||
|
|
||||||
@ExcelProperty("地址")
|
@ExcelProperty("*地点")
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
@ExcelProperty("被罚金额")
|
@ExcelProperty("罚款")
|
||||||
private BigDecimal fineAmount;
|
private BigDecimal fineAmount;
|
||||||
|
|
||||||
@ExcelProperty("被扣分数")
|
@ExcelProperty("被扣分数")
|
||||||
@@ -80,10 +83,10 @@ public class ViolationRecordExcel implements Serializable {
|
|||||||
@ExcelProperty("被罚单位")
|
@ExcelProperty("被罚单位")
|
||||||
private String penaltyUnit;
|
private String penaltyUnit;
|
||||||
|
|
||||||
@ExcelProperty("状态")
|
@ExcelProperty("*状态")
|
||||||
private String processStatus;
|
private String processStatus;
|
||||||
|
|
||||||
@ExcelProperty("过程描述")
|
@ExcelProperty("*过程描述")
|
||||||
private String processDescription;
|
private String processDescription;
|
||||||
|
|
||||||
@ExcelProperty("处理结果")
|
@ExcelProperty("处理结果")
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
|||||||
AnnualInspectionRecordExcel excel = data.get(index);
|
AnnualInspectionRecordExcel excel = data.get(index);
|
||||||
try {
|
try {
|
||||||
AnnualInspectionRecord annualInspectionRecord = Objects.requireNonNull(BeanUtil.copyProperties(excel, AnnualInspectionRecord.class));
|
AnnualInspectionRecord annualInspectionRecord = Objects.requireNonNull(BeanUtil.copyProperties(excel, AnnualInspectionRecord.class));
|
||||||
fillInspectionContent(annualInspectionRecord, excel.getInspectionContent());
|
|
||||||
submit(annualInspectionRecord);
|
submit(annualInspectionRecord);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + exception.getMessage());
|
excel.setErrorMessage("第" + (index + 2) + "行:" + exception.getMessage());
|
||||||
@@ -102,7 +101,8 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
|||||||
public List<AnnualInspectionRecordExcel> exportAnnualInspectionRecord(Wrapper<AnnualInspectionRecord> queryWrapper) {
|
public List<AnnualInspectionRecordExcel> exportAnnualInspectionRecord(Wrapper<AnnualInspectionRecord> queryWrapper) {
|
||||||
return list(queryWrapper).stream().map(annualInspectionRecord -> {
|
return list(queryWrapper).stream().map(annualInspectionRecord -> {
|
||||||
AnnualInspectionRecordExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(annualInspectionRecord, AnnualInspectionRecordExcel.class));
|
AnnualInspectionRecordExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(annualInspectionRecord, AnnualInspectionRecordExcel.class));
|
||||||
excel.setInspectionContent(inspectionContent(annualInspectionRecord));
|
excel.setVehicleTechnicalLevel(VEHICLE.equals(annualInspectionRecord.getVehicleType()) ? annualInspectionRecord.getVehicleTechnicalLevel() : null);
|
||||||
|
excel.setShipInspectionType(SHIP.equals(annualInspectionRecord.getVehicleType()) ? annualInspectionRecord.getShipInspectionType() : null);
|
||||||
excel.setFee(nonNegative(annualInspectionRecord.getFee()));
|
excel.setFee(nonNegative(annualInspectionRecord.getFee()));
|
||||||
return excel;
|
return excel;
|
||||||
}).toList();
|
}).toList();
|
||||||
@@ -173,18 +173,6 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillInspectionContent(AnnualInspectionRecord annualInspectionRecord, String inspectionContent) {
|
|
||||||
if (SHIP.equals(normalizeVehicleType(annualInspectionRecord.getVehicleType()))) {
|
|
||||||
annualInspectionRecord.setShipInspectionType(inspectionContent);
|
|
||||||
} else {
|
|
||||||
annualInspectionRecord.setVehicleTechnicalLevel(inspectionContent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String inspectionContent(AnnualInspectionRecord annualInspectionRecord) {
|
|
||||||
return SHIP.equals(annualInspectionRecord.getVehicleType()) ? annualInspectionRecord.getShipInspectionType() : annualInspectionRecord.getVehicleTechnicalLevel();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateMoney(BigDecimal value, String fieldName) {
|
private void validateMoney(BigDecimal value, String fieldName) {
|
||||||
if (Func.isEmpty(value)) {
|
if (Func.isEmpty(value)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
|||||||
ViolationRecordExcel excel = data.get(index);
|
ViolationRecordExcel excel = data.get(index);
|
||||||
try {
|
try {
|
||||||
ViolationRecord violationRecord = Objects.requireNonNull(BeanUtil.copyProperties(excel, ViolationRecord.class));
|
ViolationRecord violationRecord = Objects.requireNonNull(BeanUtil.copyProperties(excel, ViolationRecord.class));
|
||||||
fillViolationContent(violationRecord, excel.getViolationContent());
|
|
||||||
submit(violationRecord);
|
submit(violationRecord);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
excel.setErrorMessage("第" + (index + 2) + "行:" + exception.getMessage());
|
excel.setErrorMessage("第" + (index + 2) + "行:" + exception.getMessage());
|
||||||
@@ -105,7 +104,6 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
|||||||
public List<ViolationRecordExcel> exportViolationRecord(Wrapper<ViolationRecord> queryWrapper) {
|
public List<ViolationRecordExcel> exportViolationRecord(Wrapper<ViolationRecord> queryWrapper) {
|
||||||
return list(queryWrapper).stream().map(violationRecord -> {
|
return list(queryWrapper).stream().map(violationRecord -> {
|
||||||
ViolationRecordExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(violationRecord, ViolationRecordExcel.class));
|
ViolationRecordExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(violationRecord, ViolationRecordExcel.class));
|
||||||
excel.setViolationContent(violationContent(violationRecord));
|
|
||||||
excel.setFineAmount(nonNegative(violationRecord.getFineAmount()));
|
excel.setFineAmount(nonNegative(violationRecord.getFineAmount()));
|
||||||
excel.setDeductPoints(validDeductPoints(violationRecord.getDeductPoints()));
|
excel.setDeductPoints(validDeductPoints(violationRecord.getDeductPoints()));
|
||||||
return excel;
|
return excel;
|
||||||
@@ -194,18 +192,6 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillViolationContent(ViolationRecord violationRecord, String violationContent) {
|
|
||||||
if ("船舶".equals(normalizeVehicleType(violationRecord.getVehicleType()))) {
|
|
||||||
violationRecord.setViolationItem(violationContent);
|
|
||||||
} else {
|
|
||||||
violationRecord.setViolationType(violationContent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String violationContent(ViolationRecord violationRecord) {
|
|
||||||
return "船舶".equals(violationRecord.getVehicleType()) ? violationRecord.getViolationItem() : violationRecord.getViolationType();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateLength(String value, int maxLength, String message) {
|
private void validateLength(String value, int maxLength, String message) {
|
||||||
if (Func.isNotEmpty(value) && value.length() > maxLength) {
|
if (Func.isNotEmpty(value) && value.length() > maxLength) {
|
||||||
throw new ServiceException(message);
|
throw new ServiceException(message);
|
||||||
|
|||||||
Reference in New Issue
Block a user