From 91154b45b40b0e09521f0802e59f27b0c62e85f9 Mon Sep 17 00:00:00 2001 From: panshulin Date: Tue, 21 Dec 2021 16:31:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=B9=E8=B1=A1=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=9A=84Excel=E5=8D=95=E5=85=83=E6=A0=BC=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/XhpcChargingPileServiceImpl.java | 11 ++--- .../xhpc/common/domain/XhpcChargingPile.java | 48 +++++++++---------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java index 7856fd5c..0d10e68f 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java @@ -325,16 +325,16 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { // 所有表格字段数据必须非空且有效 if(StrUtil.hasBlank(pile.getChargingStationName()) || StrUtil.hasBlank(pile.getName()) || StrUtil.hasBlank(pile.getBrandModel()) || StrUtil.hasBlank(pile.getNationalStandard()) - || pile.getPower() == null || pile.getPower()<0 - || pile.getAuxiliaryPowerSupply() == null || pile.getAuxiliaryPowerSupply()<0 - || pile.getInputVoltage() ==null || pile.getInputVoltage()<0 - || pile.getMaxVoltage() ==null || pile.getMaxVoltage()<0 + || pile.getPower() == null || pile.getPower() < 0 + || pile.getAuxiliaryPowerSupply() == null || pile.getAuxiliaryPowerSupply() < 0 + || pile.getInputVoltage() ==null || pile.getInputVoltage() < 0 + || pile.getMaxVoltage() ==null || pile.getMaxVoltage() < 0 || pile.getMinVoltage() == null || pile.getMinVoltage() < 0 || pile.getMaxElectricCurrent() == null || pile.getMaxElectricCurrent() < 0 || pile.getMinElectriCurrent() == null || pile.getMinElectriCurrent() < 0 || StrUtil.hasBlank(pile.getSerialNumber()) || StrUtil.hasBlank(pile.getTypeName()) - || pile.getGunNumber() == null || pile.getGunNumber() <0 + || pile.getGunNumber() == null || pile.getGunNumber() < 0 || StrUtil.hasBlank(pile.getCommunicationProtocolVersion()) || StrUtil.hasBlank(pile.getNetworkLinkType()) || StrUtil.hasBlank(pile.getProductionDate()) || StrUtil.hasBlank(pile.getManufactureName()) || StrUtil.hasBlank(pile.getConnectorTypeName())|| StrUtil.hasBlank(pile.getEquipmentTypeName())){ @@ -394,5 +394,4 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { } return successMsg.toString(); } - } diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/domain/XhpcChargingPile.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/domain/XhpcChargingPile.java index 79410ae2..f706d715 100644 --- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/domain/XhpcChargingPile.java +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/domain/XhpcChargingPile.java @@ -18,64 +18,64 @@ public class XhpcChargingPile extends BaseEntity { private Long chargingStationId; /** 场站名称 */ - @Excel(name = "电站", cellType = Excel.ColumnType.STRING) + @Excel(name = "电站") private String chargingStationName; /** 名称 */ - @Excel(name = "电桩名称(号桩)", cellType = Excel.ColumnType.STRING) + @Excel(name = "电桩名称(号桩)") private String name; /** 品牌型号 */ - @Excel(name = "品牌型号", cellType = Excel.ColumnType.STRING) + @Excel(name = "品牌型号") private String brandModel; /** 国标 */ - @Excel(name = "电桩国际", cellType = Excel.ColumnType.STRING) + @Excel(name = "电桩国际") private String nationalStandard; /** 功率 */ - @Excel(name = "电桩功率(KW)", cellType = Excel.ColumnType.STRING) + @Excel(name = "电桩功率(KW)") private Double power; /** 辅助电源支持 */ - @Excel(name = "辅助电源支持(V)", cellType = Excel.ColumnType.STRING) + @Excel(name = "辅助电源支持(V)") private Double auxiliaryPowerSupply; /** 输入电压 */ - @Excel(name = "输入电压(V)", cellType = Excel.ColumnType.STRING) + @Excel(name = "输入电压(V)") private Double inputVoltage; /** 最大电压 */ - @Excel(name = "最大电压(V)", cellType = Excel.ColumnType.STRING) + @Excel(name = "最大电压(V)") private Double maxVoltage; /** 最小电压 */ - @Excel(name = "最小电压(V)", cellType = Excel.ColumnType.STRING) + @Excel(name = "最小电压(V)") private Double minVoltage; /** 最大电流 */ - @Excel(name = "最大电流(A)", cellType = Excel.ColumnType.STRING) + @Excel(name = "最大电流(A)") private Double maxElectricCurrent; /** 最小电流 */ - @Excel(name = "最小电流(A)", cellType = Excel.ColumnType.STRING) + @Excel(name = "最小电流(A)") private Double minElectriCurrent; /** 桩编号 */ - @Excel(name = "桩编码", cellType = Excel.ColumnType.STRING) + @Excel(name = "桩编码") private String serialNumber; /** 桩类型 */ private Integer type; - @Excel(name = "电桩类型", type= Excel.Type.IMPORT) + @Excel(name = "电桩类型") private String typeName; /** 程序版本 */ - @Excel(name = "程序版本", cellType = Excel.ColumnType.STRING) + @Excel(name = "程序版本") private String programVersion; /** 网络链接类型 */ - @Excel(name = "网络连接类型", cellType = Excel.ColumnType.STRING) + @Excel(name = "网络连接类型") private String networkLinkType; /** 终端数量 */ - @Excel(name = "终端数量", cellType = Excel.ColumnType.STRING) + @Excel(name = "终端数量") private Integer gunNumber; /** 通讯协议版本 */ - @Excel(name = "通讯协议版本", cellType = Excel.ColumnType.STRING) + @Excel(name = "通讯协议版本") private String communicationProtocolVersion; /** 通讯运营商 */ - @Excel(name = "通讯运营商", cellType = Excel.ColumnType.STRING) + @Excel(name = "通讯运营商") private String communicationOperator; /** Sim卡 */ - @Excel(name = "SIM卡号", cellType = Excel.ColumnType.STRING) + @Excel(name = "SIM卡号") private String simCard; /** 状态(0正常 1停用) */ private Integer status; @@ -86,13 +86,13 @@ public class XhpcChargingPile extends BaseEntity { /** * 设备生产日期(格式YYYY-MM-DD) */ - @Excel(name = "设备生产日期", cellType = Excel.ColumnType.STRING) + @Excel(name = "设备生产日期") private String productionDate; /** * 设备生产商名称 */ - @Excel(name = "设备生产商名称", cellType = Excel.ColumnType.STRING) + @Excel(name = "设备生产商名称") private String manufactureName; /** @@ -104,12 +104,12 @@ public class XhpcChargingPile extends BaseEntity { /** * 充电设备接口类型,导入Excel使用 */ - @Excel(name = "充电设备类型", cellType = Excel.ColumnType.STRING) + @Excel(name = "充电设备类型") private String connectorTypeName; /** * 额定电流(单位A) */ - @Excel(name = "额定电流(A)", cellType = Excel.ColumnType.STRING) + @Excel(name = "额定电流(A)") private Integer current; /** @@ -120,7 +120,7 @@ public class XhpcChargingPile extends BaseEntity { /** * 设备类型,导入Excel使用 */ - @Excel(name = "设备类型", cellType = Excel.ColumnType.STRING, type = Excel.Type.IMPORT) + @Excel(name = "设备类型") private String equipmentTypeName; public String getTypeName() {