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