| | |
| | | <modules> |
| | | <module>ruoyi-api-system</module> |
| | | <module>ruoyi-api-account</module> |
| | | <module>ruoyi-api-chargingPile</module> |
| | | <module>ruoyi-api-integration</module> |
| | | <module>ruoyi-api-order</module> |
| | | <module>ruoyi-api-other</module> |
| | | <module>ruoyi-api-payment</module> |
| | | </modules> |
| | | |
| | | <artifactId>ruoyi-api</artifactId> |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.dto; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value="TAccountingStrategyDTO对象", description="计费策略") |
| | | public class TAccountingStrategyDTO extends TAccountingStrategy { |
| | | |
| | | @ApiModelProperty(value = "计费策略明细") |
| | | private List<TAccountingStrategyDetail> accountingStrategyDetails; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.dto; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value="TAccountingStrategyDetailDTO对象", description="计费策略明细") |
| | | public class TAccountingStrategyDetailDTO extends TAccountingStrategyDetail { |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.dto; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value="TChargingGunDTO对象", description="充电枪") |
| | | public class TChargingGunDTO extends TChargingGun { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.dto; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TMonitoringEquipment; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TMonitoringEquipmentDTO对象", description = "监控") |
| | | public class TMonitoringEquipmentDTO extends TMonitoringEquipment { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.dto; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TParkingLotDTO对象", description = "停车场") |
| | | public class TParkingLotDTO extends TParkingLot { |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_accounting_strategy") |
| | | @ApiModel(value="TAccountingStrategy对象", description="计费策略") |
| | | public class TAccountingStrategy extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "策略名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "策略说明") |
| | | @TableField("description") |
| | | private String description; |
| | | |
| | | @ApiModelProperty(value = "会员折扣") |
| | | @TableField("discount") |
| | | private BigDecimal discount; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略明细 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_accounting_strategy_detail") |
| | | @ApiModel(value="TAccountingStrategyDetail对象", description="计费策略明细") |
| | | public class TAccountingStrategyDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "策略id") |
| | | @TableField("accounting_strategy_id") |
| | | private Integer accountingStrategyId; |
| | | |
| | | @ApiModelProperty(value = "阶段(1=尖阶段,2=峰阶段,3=平阶段,4=谷阶段)") |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "开始时间") |
| | | @TableField("start_time") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("end_time") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "电价") |
| | | @TableField("electrovalence") |
| | | private BigDecimal electrovalence; |
| | | |
| | | @ApiModelProperty(value = "服务费") |
| | | @TableField("service_charge") |
| | | private BigDecimal serviceCharge; |
| | | |
| | | @ApiModelProperty(value = "原价服务费") |
| | | @TableField("cost_service_charge") |
| | | private BigDecimal costServiceCharge; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车库 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_carport") |
| | | @ApiModel(value="TCarport对象", description="车库") |
| | | public class TCarport extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "停车场id") |
| | | @TableField("parking_lot_id") |
| | | private Integer parkingLotId; |
| | | |
| | | @ApiModelProperty(value = "车库编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "车库名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BaseModel; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电枪 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_charging_gun") |
| | | @ApiModel(value="TChargingGun对象", description="充电枪") |
| | | public class TChargingGun extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "充电枪编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "合作商id") |
| | | @TableField("partner_id") |
| | | private Integer partnerId; |
| | | |
| | | @ApiModelProperty(value = "充电桩id") |
| | | @TableField("charging_pile_id") |
| | | private Integer chargingPileId; |
| | | |
| | | @ApiModelProperty(value = "充电枪名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "充电枪类型(0=其他,1=家用插座(模式2),2=交流接口插座(模式3,连接方式B),3=交流接口插头(带枪线,模式3,连接方式C)4=直流接口枪头(带枪线,模式4)5=无线充电座)") |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "充电枪状态(1=离线,2=空闲,3=占用(未充电),4=占用(充电中),5=占用(已充满),6=占用(预约锁定),7=故障)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "充电模式(1=超级快充,2=快充,3=慢充)") |
| | | @TableField("charge_mode") |
| | | private Integer chargeMode; |
| | | |
| | | @ApiModelProperty(value = "计费策略id") |
| | | @TableField("accounting_strategy_id") |
| | | private Integer accountingStrategyId; |
| | | |
| | | @ApiModelProperty(value = "额定电压上限") |
| | | @TableField("upper_rated_voltage") |
| | | private BigDecimal upperRatedVoltage; |
| | | |
| | | @ApiModelProperty(value = "额定电压下限") |
| | | @TableField("lower_limit_of_rated_voltage") |
| | | private BigDecimal lowerLimitOfRatedVoltage; |
| | | |
| | | @ApiModelProperty(value = "额定电流") |
| | | @TableField("rated_current") |
| | | private BigDecimal ratedCurrent; |
| | | |
| | | @ApiModelProperty(value = "额定功率") |
| | | @TableField("rated_power") |
| | | private BigDecimal ratedPower; |
| | | |
| | | @ApiModelProperty(value = "车位号") |
| | | @TableField("parking_number") |
| | | private String parkingNumber; |
| | | |
| | | @ApiModelProperty(value = "车位状态(0=未知,1=空闲,2=占用)") |
| | | @TableField("parking_status") |
| | | private Integer parkingStatus; |
| | | |
| | | @ApiModelProperty(value = "地锁状态|(0=未知,1=已解锁,2=已上锁)") |
| | | @TableField("parking_lock_state") |
| | | private Integer parkingLockState; |
| | | |
| | | @ApiModelProperty(value = "国家标准") |
| | | @TableField("national_standard") |
| | | private String nationalStandard; |
| | | |
| | | @ApiModelProperty(value = "说明") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电桩 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_charging_pile") |
| | | @ApiModel(value="TChargingPile对象", description="充电桩") |
| | | public class TChargingPile extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "设备编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "充电设备名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "桩号") |
| | | @TableField("number") |
| | | private Integer number; |
| | | |
| | | @ApiModelProperty(value = "设备类型(0=其他,1=直流设备,2=交流设备,3=交直流一体设备,4=无线设备)") |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "合作商id") |
| | | @TableField("partner_id") |
| | | private Integer partnerId; |
| | | |
| | | @ApiModelProperty(value = "生产商机构代码") |
| | | @TableField("manufacturer_code") |
| | | private String manufacturerCode; |
| | | |
| | | @ApiModelProperty(value = "生产商名称") |
| | | @TableField("manufacturer") |
| | | private String manufacturer; |
| | | |
| | | @ApiModelProperty(value = "设备型号") |
| | | @TableField("equipment_type") |
| | | private String equipmentType; |
| | | |
| | | @ApiModelProperty(value = "生产日期") |
| | | @TableField("production_date") |
| | | private LocalDate productionDate; |
| | | |
| | | @ApiModelProperty(value = "额定功率") |
| | | @TableField("rated_power") |
| | | private BigDecimal ratedPower; |
| | | |
| | | @ApiModelProperty(value = "设备充电站编号") |
| | | @TableField("charging_station_number") |
| | | private String chargingStationNumber; |
| | | |
| | | @ApiModelProperty(value = "设备状态(1=工作中,2=离线,3=故障)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监控 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_monitoring_equipment") |
| | | @ApiModel(value="TMonitoringEquipment对象", description="监控") |
| | | public class TMonitoringEquipment extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "监控") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "设备设备码") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "停车场id") |
| | | @TableField("parking_lot_id") |
| | | private Integer parkingLotId; |
| | | |
| | | @ApiModelProperty(value = "位置") |
| | | @TableField("location") |
| | | private String location; |
| | | |
| | | @ApiModelProperty(value = "监控链接") |
| | | @TableField("url_link") |
| | | private String urlLink; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 停车场 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_parking_lot") |
| | | @ApiModel(value="TParkingLot对象", description="停车场") |
| | | public class TParkingLot extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "车场名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "第三方停车场编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "充电免费时长(分钟)") |
| | | @TableField("charge_free_duration") |
| | | private Integer chargeFreeDuration; |
| | | |
| | | @ApiModelProperty(value = "充电收费上限") |
| | | @TableField("charge_capping") |
| | | private BigDecimal chargeCapping; |
| | | |
| | | @ApiModelProperty(value = "充电收费费率(元/分钟)") |
| | | @TableField("charge_rate") |
| | | private BigDecimal chargeRate; |
| | | |
| | | @ApiModelProperty(value = "非充电免费时长(分钟)") |
| | | @TableField("non_charge_free_duration") |
| | | private Integer nonChargeFreeDuration; |
| | | |
| | | @ApiModelProperty(value = "非充电收费上限") |
| | | @TableField("non_charge_capping") |
| | | private BigDecimal nonChargeCapping; |
| | | |
| | | @ApiModelProperty(value = "非充电收费费率(元/分钟)") |
| | | @TableField("non_charge_rate") |
| | | private BigDecimal nonChargeRate; |
| | | |
| | | @ApiModelProperty(value = "绑定车牌说明") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车道 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_vehicle_ramp") |
| | | @ApiModel(value="TVehicleRamp对象", description="车道") |
| | | public class TVehicleRamp extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "停车场id") |
| | | @TableField("parking_lot_id") |
| | | private Integer parkingLotId; |
| | | |
| | | @ApiModelProperty(value = "车库id") |
| | | @TableField("carport_id") |
| | | private Integer carportId; |
| | | |
| | | @ApiModelProperty(value = "车道名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "车道编号") |
| | | @TableField("carport_num") |
| | | private String carportNum; |
| | | |
| | | @ApiModelProperty(value = "方向(1=入口,2=出口)") |
| | | @TableField("direction") |
| | | private Integer direction; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.query; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value="TAccountingStrategyQuery对象", description="计费策略") |
| | | public class TAccountingStrategyQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "计费策略名称") |
| | | private String name; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value="TChargingGunQuery对象", description="充电枪") |
| | | public class TChargingGunQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "充电桩id") |
| | | private Integer chargingPileId; |
| | | |
| | | @ApiModelProperty(value = "充电枪名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "充电枪类型(0=其他,1=家用插座(模式2),2=交流接口插座(模式3,连接方式B),3=交流接口插头(带枪线,模式3,连接方式C)4=直流接口枪头(带枪线,模式4)5=无线充电座)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "充电枪状态(1=离线,2=空闲,3=占用(未充电),4=占用(充电中),5=占用(已充满),6=占用(预约锁定),7=故障)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "充电模式(1=超级快充,2=快充,3=慢充)") |
| | | private Integer chargeMode; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.query; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "监控查询Query") |
| | | public class TMonitoringEquipmentQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "停车场id") |
| | | private Integer parkingLotId; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.query; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "停车场查询Query") |
| | | public class TParkingLotQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "停车场名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "第三方停车场编号") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | private Integer siteId; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.query; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "车道查询Query") |
| | | public class TVehicleRampQuery extends BasePage { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TAccountingStrategyDetailVO",description = "计费策略明细") |
| | | public class TAccountingStrategyDetailVO extends TAccountingStrategyDetail { |
| | | |
| | | @ApiModelProperty(value = "原价服务费") |
| | | private BigDecimal totalPrice; |
| | | |
| | | @ApiModelProperty(value = "会员折扣") |
| | | private BigDecimal discount; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "计费策略VO") |
| | | public class TAccountingStrategyVO extends TAccountingStrategy { |
| | | |
| | | @ApiModelProperty(value = "计费策略明细集合") |
| | | private List<TAccountingStrategyDetail> accountingStrategyDetailList; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value="TCarportVO对象", description="车库") |
| | | public class TCarportVO extends TCarport { |
| | | |
| | | @ApiModelProperty(value = "车道信息") |
| | | private List<TVehicleRamp> vehicleRamps; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value="TChargingGunVO对象", description="充电枪") |
| | | public class TChargingGunVO extends TChargingGun { |
| | | |
| | | @ApiModelProperty(value = "策略名称") |
| | | private String strategyName; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TMonitoringEquipment; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "监控VO") |
| | | public class TMonitoringEquipmentVO extends TMonitoringEquipment { |
| | | |
| | | @ApiModelProperty(value = "停车场名称") |
| | | private String parkingLotName; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TParkingLotVO对象", description = "停车场") |
| | | public class TParkingLotVO extends TParkingLot { |
| | | |
| | | @ApiModelProperty(value = "归属电站") |
| | | private String siteName; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.vo; |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "车道VO") |
| | | public class TVehicleRampVO extends TVehicleRamp { |
| | | } |
New file |
| | |
| | | package com.ruoyi.common.core.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @author xiaochen |
| | | * @ClassName Disable |
| | | * @Description |
| | | * @date 2022-06-08 16:55 |
| | | */ |
| | | public enum DelFlagEnum { |
| | | NO(0, "否"), |
| | | YES(1, "是"); |
| | | |
| | | @Getter |
| | | private String desc; |
| | | |
| | | |
| | | @Getter |
| | | private int code; |
| | | |
| | | |
| | | DelFlagEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static DelFlagEnum fromCode(Integer code) { |
| | | DelFlagEnum[] resultTypes = DelFlagEnum.values(); |
| | | for (DelFlagEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.common.core.web.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * Entity基类 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class BasePojo implements Serializable |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 创建时间 */ |
| | | @ApiModelProperty(value = "记录创建时间,前端忽略") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(value = "create_time", fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** 是否删除 0未删除 1已删除 */ |
| | | @TableField("del_flag") |
| | | @ApiModelProperty(value = "是否删除 0未删除 1已删除") |
| | | @TableLogic |
| | | private Boolean delFlag; |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Boolean getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Boolean delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | } |
| | |
| | | </description> |
| | | |
| | | <dependencies> |
| | | |
| | | <!-- ruoyi-modules-chargingPile-api --> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-api-chargingPile</artifactId> |
| | | <version>3.6.2</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | <!-- SpringCloud Alibaba Nacos --> |
| | | <dependency> |
| | | <groupId>com.alibaba.cloud</groupId> |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.chargingPile.api.dto.TAccountingStrategyDTO; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import com.ruoyi.chargingPile.api.query.TAccountingStrategyQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyVO; |
| | | import com.ruoyi.chargingPile.service.TAccountingStrategyDetailService; |
| | | import com.ruoyi.chargingPile.service.TAccountingStrategyService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "计费策略") |
| | | @RestController |
| | | @RequestMapping("/t-accounting-strategy") |
| | | public class TAccountingStrategyController { |
| | | |
| | | private final TAccountingStrategyService accountingStrategyService; |
| | | private final TAccountingStrategyDetailService accountingStrategyDetailService; |
| | | |
| | | @Autowired |
| | | public TAccountingStrategyController(TAccountingStrategyService accountingStrategyService, TAccountingStrategyDetailService accountingStrategyDetailService) { |
| | | this.accountingStrategyService = accountingStrategyService; |
| | | this.accountingStrategyDetailService = accountingStrategyDetailService; |
| | | } |
| | | |
| | | /** |
| | | * 查询计费策略列表 |
| | | */ |
| | | @ApiOperation(value = "查询计费策略分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TAccountingStrategyVO>> pageList(@RequestBody TAccountingStrategyQuery query) { |
| | | return AjaxResult.ok(accountingStrategyService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 查询计费策略明细列表 |
| | | */ |
| | | @ApiOperation(value = "查询计费策略明细列表") |
| | | @GetMapping(value = "/queryAccountingStrategyDetailByStrategyId") |
| | | public AjaxResult<List<TAccountingStrategyDetailVO>> queryAccountingStrategyDetailByStrategyId(@RequestParam Integer strategyId) { |
| | | List<TAccountingStrategyDetailVO> list = accountingStrategyDetailService.queryAccountingStrategyDetailByStrategyId(strategyId); |
| | | list.forEach(detail -> { |
| | | detail.setTotalPrice(detail.getCostServiceCharge().add(detail.getElectrovalence())); |
| | | }); |
| | | return AjaxResult.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 添加计费策略管理 |
| | | */ |
| | | @ApiOperation(value = "添加计费策略") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TAccountingStrategyDTO dto) { |
| | | accountingStrategyService.save(dto); |
| | | // 添加明细 |
| | | dto.getAccountingStrategyDetails().forEach(detail -> detail.setAccountingStrategyId(dto.getId())); |
| | | // TODO 硬件 同步策略到充电桩 |
| | | return AjaxResult.ok(accountingStrategyDetailService.saveBatch(dto.getAccountingStrategyDetails())); |
| | | } |
| | | |
| | | /** |
| | | * 修改计费策略 |
| | | */ |
| | | @ApiOperation(value = "修改计费策略") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TAccountingStrategyDTO dto) { |
| | | // 删除计费策略明细信息 |
| | | accountingStrategyDetailService.remove(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, dto.getId())); |
| | | accountingStrategyService.updateById(dto); |
| | | // 添加明细 |
| | | dto.getAccountingStrategyDetails().forEach(detail -> detail.setAccountingStrategyId(dto.getId())); |
| | | // TODO 硬件 同步策略到充电桩 |
| | | return AjaxResult.ok(accountingStrategyDetailService.saveBatch(dto.getAccountingStrategyDetails())); |
| | | } |
| | | |
| | | /** |
| | | * 查看计费策略详情 |
| | | */ |
| | | @ApiOperation(value = "查看计费策略详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TAccountingStrategy> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(accountingStrategyService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除计费策略 |
| | | */ |
| | | @ApiOperation(value = "删除计费策略") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | // 刪除计费策略明细信息 |
| | | accountingStrategyDetailService.remove(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, id)); |
| | | return AjaxResult.ok(accountingStrategyService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除计费策略 |
| | | */ |
| | | @ApiOperation(value = "批量删除计费策略") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | // 刪除计费策略明细信息 |
| | | accountingStrategyDetailService.remove(Wrappers.lambdaQuery(TAccountingStrategyDetail.class) |
| | | .in(TAccountingStrategyDetail::getAccountingStrategyId, ids)); |
| | | return AjaxResult.ok(accountingStrategyService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略明细 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "计费策略明细") |
| | | @RestController |
| | | @RequestMapping("/t-accounting-strategy-detail") |
| | | public class TAccountingStrategyDetailController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import com.ruoyi.chargingPile.api.vo.TCarportVO; |
| | | import com.ruoyi.chargingPile.service.TCarportService; |
| | | import com.ruoyi.chargingPile.service.TVehicleRampService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车库 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "车库") |
| | | @RestController |
| | | @RequestMapping("/t-carport") |
| | | public class TCarportController { |
| | | |
| | | private final TCarportService carportService; |
| | | private final TVehicleRampService vehicleRampService; |
| | | |
| | | @Autowired |
| | | public TCarportController(TCarportService carportService, TVehicleRampService vehicleRampService) { |
| | | this.carportService = carportService; |
| | | this.vehicleRampService = vehicleRampService; |
| | | } |
| | | |
| | | /** |
| | | * 通过停车场id查询车库及车道信息 |
| | | */ |
| | | @ApiOperation(value = "通过停车场id查询车库及车道信息") |
| | | @GetMapping(value = "/queryCarportByParkId") |
| | | public AjaxResult<List<TCarportVO>> queryCarportByParkId(@RequestParam(value = "parkingLotId", required = true) Integer parkingLotId) { |
| | | return AjaxResult.ok(carportService.queryCarportByParkId(parkingLotId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加车库管理 |
| | | */ |
| | | @ApiOperation(value = "添加车库") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TCarport dto) { |
| | | return AjaxResult.ok(carportService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改车库 |
| | | */ |
| | | @ApiOperation(value = "修改车库") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TCarport dto) { |
| | | return AjaxResult.ok(carportService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看车库详情 |
| | | */ |
| | | @ApiOperation(value = "查看车库详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TCarport> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(carportService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除车库 |
| | | */ |
| | | @ApiOperation(value = "删除车库") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | // 刪除车道信息 |
| | | vehicleRampService.remove(Wrappers.lambdaQuery(TVehicleRamp.class) |
| | | .eq(TVehicleRamp::getCarportId, id)); |
| | | return AjaxResult.ok(carportService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除车库 |
| | | */ |
| | | @ApiOperation(value = "批量删除车库") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | // 刪除车道信息 |
| | | vehicleRampService.remove(Wrappers.lambdaQuery(TVehicleRamp.class) |
| | | .in(TVehicleRamp::getCarportId, ids)); |
| | | return AjaxResult.ok(carportService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.ruoyi.chargingPile.api.dto.TChargingGunDTO; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.query.TChargingGunQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | | import com.ruoyi.chargingPile.service.TChargingGunService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电枪 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "充电枪") |
| | | @RestController |
| | | @RequestMapping("/t-charging-gun") |
| | | public class TChargingGunController { |
| | | |
| | | private final TChargingGunService chargingGunService; |
| | | |
| | | @Autowired |
| | | public TChargingGunController(TChargingGunService chargingGunService) { |
| | | this.chargingGunService = chargingGunService; |
| | | } |
| | | |
| | | /** |
| | | * 查询充电枪列表 |
| | | */ |
| | | @ApiOperation(value = "查询充电枪分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TChargingGunVO>> pageList(@RequestBody TChargingGunQuery query) { |
| | | return AjaxResult.ok(chargingGunService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加充电枪管理 |
| | | */ |
| | | @ApiOperation(value = "添加充电枪") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TChargingGunDTO dto) { |
| | | return AjaxResult.ok(chargingGunService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改充电枪 |
| | | */ |
| | | @ApiOperation(value = "修改充电枪") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TChargingGunDTO dto) { |
| | | return AjaxResult.ok(chargingGunService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看充电枪详情 |
| | | */ |
| | | @ApiOperation(value = "查看充电枪详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TChargingGun> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(chargingGunService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除充电枪 |
| | | */ |
| | | @ApiOperation(value = "删除充电枪") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(chargingGunService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除充电枪 |
| | | */ |
| | | @ApiOperation(value = "批量删除充电枪") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | return AjaxResult.ok(chargingGunService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 结束充电 |
| | | */ |
| | | @ApiOperation(value = "结束充电") |
| | | @PostMapping(value = "/stopCharging") |
| | | public AjaxResult<String> stopCharging() { |
| | | // TODO 硬件 结束充电 |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电桩 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "充电桩") |
| | | @RestController |
| | | @RequestMapping("/t-charging-pile") |
| | | public class TChargingPileController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.ruoyi.chargingPile.api.dto.TMonitoringEquipmentDTO; |
| | | import com.ruoyi.chargingPile.api.model.TMonitoringEquipment; |
| | | import com.ruoyi.chargingPile.api.query.TMonitoringEquipmentQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TMonitoringEquipmentVO; |
| | | import com.ruoyi.chargingPile.service.TMonitoringEquipmentService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监控 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "监控") |
| | | @RestController |
| | | @RequestMapping("/t-monitoring-equipment") |
| | | public class TMonitoringEquipmentController { |
| | | |
| | | private final TMonitoringEquipmentService monitoringEquipmentService; |
| | | |
| | | @Autowired |
| | | public TMonitoringEquipmentController(TMonitoringEquipmentService monitoringEquipmentService) { |
| | | this.monitoringEquipmentService = monitoringEquipmentService; |
| | | } |
| | | |
| | | /** |
| | | * 查询监控列表 |
| | | */ |
| | | @ApiOperation(value = "查询监控分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TMonitoringEquipmentVO>> pageList(@RequestBody TMonitoringEquipmentQuery query) { |
| | | return AjaxResult.ok(monitoringEquipmentService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加监控管理 |
| | | */ |
| | | @ApiOperation(value = "添加监控") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TMonitoringEquipmentDTO dto) { |
| | | return AjaxResult.ok(monitoringEquipmentService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改监控 |
| | | */ |
| | | @ApiOperation(value = "修改监控") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TMonitoringEquipmentDTO dto) { |
| | | return AjaxResult.ok(monitoringEquipmentService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看监控详情 |
| | | */ |
| | | @ApiOperation(value = "查看监控详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TMonitoringEquipment> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(monitoringEquipmentService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除监控 |
| | | */ |
| | | @ApiOperation(value = "删除监控") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(monitoringEquipmentService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除监控 |
| | | */ |
| | | @ApiOperation(value = "批量删除监控") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | return AjaxResult.ok(monitoringEquipmentService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.chargingPile.api.dto.TParkingLotDTO; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import com.ruoyi.chargingPile.api.query.TParkingLotQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TParkingLotVO; |
| | | import com.ruoyi.chargingPile.service.TCarportService; |
| | | import com.ruoyi.chargingPile.service.TParkingLotService; |
| | | import com.ruoyi.chargingPile.service.TVehicleRampService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 停车场 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "停车场") |
| | | @RestController |
| | | @RequestMapping("/t-parking-lot") |
| | | public class TParkingLotController { |
| | | |
| | | private final TParkingLotService parkingLotService; |
| | | private final TVehicleRampService vehicleRampService; |
| | | private final TCarportService carportService; |
| | | |
| | | @Autowired |
| | | public TParkingLotController(TParkingLotService parkingLotService, TVehicleRampService vehicleRampService, TCarportService carportService) { |
| | | this.parkingLotService = parkingLotService; |
| | | this.vehicleRampService = vehicleRampService; |
| | | this.carportService = carportService; |
| | | } |
| | | |
| | | /** |
| | | * 查询停车场列表 |
| | | */ |
| | | @ApiOperation(value = "查询停车场分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TParkingLotVO>> pageList(@RequestBody TParkingLotQuery query) { |
| | | return AjaxResult.ok(parkingLotService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 查询停车场列表 |
| | | */ |
| | | @ApiOperation(value = "查询停车场列表") |
| | | @PostMapping(value = "/list") |
| | | public AjaxResult<List<TParkingLot>> list(@RequestBody TParkingLotQuery query) { |
| | | return AjaxResult.ok(parkingLotService.list(Wrappers.lambdaQuery(TParkingLot.class) |
| | | .eq(TParkingLot::getName,query.getName()))); |
| | | } |
| | | |
| | | /** |
| | | * 添加停车场管理 |
| | | */ |
| | | @ApiOperation(value = "添加停车场") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TParkingLotDTO dto) { |
| | | return AjaxResult.ok(parkingLotService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改停车场 |
| | | */ |
| | | @ApiOperation(value = "修改停车场") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TParkingLotDTO dto) { |
| | | return AjaxResult.ok(parkingLotService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看停车场详情 |
| | | */ |
| | | @ApiOperation(value = "查看停车场详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TParkingLot> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(parkingLotService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除停车场 |
| | | */ |
| | | @ApiOperation(value = "删除停车场") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | // 刪除车道信息 |
| | | vehicleRampService.remove(Wrappers.lambdaQuery(TVehicleRamp.class) |
| | | .eq(TVehicleRamp::getParkingLotId, id)); |
| | | // 删除车库信息 |
| | | carportService.remove(Wrappers.lambdaQuery(TCarport.class) |
| | | .eq(TCarport::getParkingLotId, id)); |
| | | return AjaxResult.ok(parkingLotService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除停车场 |
| | | */ |
| | | @ApiOperation(value = "批量删除停车场") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | // 刪除车道信息 |
| | | vehicleRampService.remove(Wrappers.lambdaQuery(TVehicleRamp.class) |
| | | .in(TVehicleRamp::getParkingLotId, ids)); |
| | | // 删除车库信息 |
| | | carportService.remove(Wrappers.lambdaQuery(TCarport.class) |
| | | .in(TCarport::getParkingLotId, ids)); |
| | | return AjaxResult.ok(parkingLotService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import com.ruoyi.chargingPile.service.TVehicleRampService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车道 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Api(tags = "车道") |
| | | @RestController |
| | | @RequestMapping("/t-vehicle-ramp") |
| | | public class TVehicleRampController { |
| | | |
| | | private final TVehicleRampService vehicleRampService; |
| | | |
| | | @Autowired |
| | | public TVehicleRampController(TVehicleRampService vehicleRampService) { |
| | | this.vehicleRampService = vehicleRampService; |
| | | } |
| | | |
| | | /** |
| | | * 添加车道管理 |
| | | */ |
| | | @ApiOperation(value = "添加车道") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TVehicleRamp dto) { |
| | | return AjaxResult.ok(vehicleRampService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改车道 |
| | | */ |
| | | @ApiOperation(value = "修改车道") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TVehicleRamp dto) { |
| | | return AjaxResult.ok(vehicleRampService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看车道详情 |
| | | */ |
| | | @ApiOperation(value = "查看车道详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TVehicleRamp> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(vehicleRampService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除车道 |
| | | */ |
| | | @ApiOperation(value = "删除车道") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(vehicleRampService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除车道 |
| | | */ |
| | | @ApiOperation(value = "批量删除车道") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | return AjaxResult.ok(vehicleRampService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 开关闸车道 |
| | | */ |
| | | @ApiOperation(value = "开关闸车道") |
| | | @PostMapping(value = "/openOrDown") |
| | | public AjaxResult<String> openOrDown(@RequestBody TVehicleRamp dto) { |
| | | // TODO 硬件 开关闸车道 |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略明细 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TAccountingStrategyDetailMapper extends BaseMapper<TAccountingStrategyDetail> { |
| | | |
| | | /** |
| | | * 查询计费策略明细列表 |
| | | * @param strategyId |
| | | * @return |
| | | */ |
| | | List<TAccountingStrategyDetailVO> queryAccountingStrategyDetailByStrategyId(@Param("strategyId") Integer strategyId); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.query.TAccountingStrategyQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TAccountingStrategyMapper extends BaseMapper<TAccountingStrategy> { |
| | | |
| | | /** |
| | | * 查询计费策略分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TAccountingStrategyVO> pageList(@Param("query") TAccountingStrategyQuery query, @Param("pageInfo")PageInfo<TAccountingStrategyVO> pageInfo); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.vo.TCarportVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车库 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TCarportMapper extends BaseMapper<TCarport> { |
| | | |
| | | /** |
| | | * 通过停车场id查询车库及车道信息 |
| | | * @param parkingLotId |
| | | * @return |
| | | */ |
| | | List<TCarportVO> queryCarportByParkId(@Param("parkingLotId") Integer parkingLotId); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.query.TChargingGunQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电枪 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TChargingGunMapper extends BaseMapper<TChargingGun> { |
| | | |
| | | /** |
| | | * 查询充电枪分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TChargingGunVO> pageList(@Param("query") TChargingGunQuery query, @Param("pageInfo")PageInfo<TChargingGunVO> pageInfo); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电桩 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TChargingPileMapper extends BaseMapper<TChargingPile> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TMonitoringEquipment; |
| | | import com.ruoyi.chargingPile.api.query.TMonitoringEquipmentQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TMonitoringEquipmentVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监控 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TMonitoringEquipmentMapper extends BaseMapper<TMonitoringEquipment> { |
| | | |
| | | /** |
| | | * 查询监控分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TMonitoringEquipmentVO> pageList(@Param("query") TMonitoringEquipmentQuery query, @Param("pageInfo")PageInfo<TMonitoringEquipmentVO> pageInfo); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.query.TParkingLotQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TParkingLotVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 停车场 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TParkingLotMapper extends BaseMapper<TParkingLot> { |
| | | |
| | | /** |
| | | * 查询停车场分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TParkingLotVO> pageList(@Param("query") TParkingLotQuery query, @Param("pageInfo")PageInfo<TParkingLotVO> pageInfo); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车道 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Mapper |
| | | public interface TVehicleRampMapper extends BaseMapper<TVehicleRamp> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略明细 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TAccountingStrategyDetailService extends IService<TAccountingStrategyDetail> { |
| | | |
| | | /** |
| | | * 查询计费策略明细列表 |
| | | * @param strategyId |
| | | * @return |
| | | */ |
| | | List<TAccountingStrategyDetailVO> queryAccountingStrategyDetailByStrategyId(Integer strategyId); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.query.TAccountingStrategyQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TAccountingStrategyService extends IService<TAccountingStrategy> { |
| | | |
| | | /** |
| | | * 查询计费策略分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TAccountingStrategyVO> pageList(TAccountingStrategyQuery query); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.vo.TCarportVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车库 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TCarportService extends IService<TCarport> { |
| | | |
| | | /** |
| | | * 通过停车场id查询车库及车道信息 |
| | | * @param parkingLotId |
| | | * @return |
| | | */ |
| | | List<TCarportVO> queryCarportByParkId(Integer parkingLotId); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.query.TChargingGunQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电枪 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TChargingGunService extends IService<TChargingGun> { |
| | | |
| | | /** |
| | | * 查询充电枪分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TChargingGunVO> pageList(TChargingGunQuery query); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电桩 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TChargingPileService extends IService<TChargingPile> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TMonitoringEquipment; |
| | | import com.ruoyi.chargingPile.api.query.TMonitoringEquipmentQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TMonitoringEquipmentVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监控 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TMonitoringEquipmentService extends IService<TMonitoringEquipment> { |
| | | |
| | | /** |
| | | * 查询监控分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TMonitoringEquipmentVO> pageList(TMonitoringEquipmentQuery query); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.query.TParkingLotQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TParkingLotVO; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | |
| | | /** |
| | | * <p> |
| | | * 停车场 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TParkingLotService extends IService<TParkingLot> { |
| | | |
| | | /** |
| | | * 查询停车场分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TParkingLotVO> pageList(TParkingLotQuery query); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车道 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface TVehicleRampService extends IService<TVehicleRamp> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO; |
| | | import com.ruoyi.chargingPile.mapper.TAccountingStrategyDetailMapper; |
| | | import com.ruoyi.chargingPile.service.TAccountingStrategyDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略明细 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TAccountingStrategyDetailServiceImpl extends ServiceImpl<TAccountingStrategyDetailMapper, TAccountingStrategyDetail> implements TAccountingStrategyDetailService { |
| | | |
| | | @Override |
| | | public List<TAccountingStrategyDetailVO> queryAccountingStrategyDetailByStrategyId(Integer strategyId) { |
| | | return this.baseMapper.queryAccountingStrategyDetailByStrategyId(strategyId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.query.TAccountingStrategyQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyVO; |
| | | import com.ruoyi.chargingPile.api.vo.TParkingLotVO; |
| | | import com.ruoyi.chargingPile.mapper.TAccountingStrategyMapper; |
| | | import com.ruoyi.chargingPile.service.TAccountingStrategyService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 计费策略 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TAccountingStrategyServiceImpl extends ServiceImpl<TAccountingStrategyMapper, TAccountingStrategy> implements TAccountingStrategyService { |
| | | |
| | | @Override |
| | | public PageInfo<TAccountingStrategyVO> pageList(TAccountingStrategyQuery query) { |
| | | PageInfo<TAccountingStrategyVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TAccountingStrategyVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import com.ruoyi.chargingPile.api.vo.TCarportVO; |
| | | import com.ruoyi.chargingPile.mapper.TCarportMapper; |
| | | import com.ruoyi.chargingPile.mapper.TVehicleRampMapper; |
| | | import com.ruoyi.chargingPile.service.TCarportService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车库 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TCarportServiceImpl extends ServiceImpl<TCarportMapper, TCarport> implements TCarportService { |
| | | |
| | | @Autowired |
| | | private TVehicleRampMapper vehicleRampMapper; |
| | | |
| | | @Override |
| | | public List<TCarportVO> queryCarportByParkId(Integer parkingLotId) { |
| | | // 查询车库信息 |
| | | List<TCarportVO> carportVOS = this.baseMapper.queryCarportByParkId(parkingLotId); |
| | | List<TVehicleRamp> vehicleRamps = vehicleRampMapper.selectList(Wrappers.lambdaQuery(TVehicleRamp.class) |
| | | .eq(TVehicleRamp::getParkingLotId, parkingLotId)); |
| | | // 查询车道信息 |
| | | carportVOS.forEach(carportVO -> { |
| | | carportVO.setVehicleRamps(vehicleRamps.stream().filter(vehicleRamp -> vehicleRamp.getCarportId().equals(carportVO.getId())).collect(Collectors.toList())); |
| | | }); |
| | | return carportVOS; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TChargingGun; |
| | | import com.ruoyi.chargingPile.api.query.TChargingGunQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | | import com.ruoyi.chargingPile.api.vo.TMonitoringEquipmentVO; |
| | | import com.ruoyi.chargingPile.mapper.TChargingGunMapper; |
| | | import com.ruoyi.chargingPile.service.TChargingGunService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电枪 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TChargingGunServiceImpl extends ServiceImpl<TChargingGunMapper, TChargingGun> implements TChargingGunService { |
| | | |
| | | @Override |
| | | public PageInfo<TChargingGunVO> pageList(TChargingGunQuery query) { |
| | | PageInfo<TChargingGunVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TChargingGunVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import com.ruoyi.chargingPile.mapper.TChargingPileMapper; |
| | | import com.ruoyi.chargingPile.service.TChargingPileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 充电桩 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TChargingPileServiceImpl extends ServiceImpl<TChargingPileMapper, TChargingPile> implements TChargingPileService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TMonitoringEquipment; |
| | | import com.ruoyi.chargingPile.api.query.TMonitoringEquipmentQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TMonitoringEquipmentVO; |
| | | import com.ruoyi.chargingPile.api.vo.TParkingLotVO; |
| | | import com.ruoyi.chargingPile.mapper.TMonitoringEquipmentMapper; |
| | | import com.ruoyi.chargingPile.service.TMonitoringEquipmentService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监控 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TMonitoringEquipmentServiceImpl extends ServiceImpl<TMonitoringEquipmentMapper, TMonitoringEquipment> implements TMonitoringEquipmentService { |
| | | |
| | | @Override |
| | | public PageInfo<TMonitoringEquipmentVO> pageList(TMonitoringEquipmentQuery query) { |
| | | PageInfo<TMonitoringEquipmentVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TMonitoringEquipmentVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TParkingLot; |
| | | import com.ruoyi.chargingPile.api.query.TParkingLotQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TParkingLotVO; |
| | | import com.ruoyi.chargingPile.mapper.TParkingLotMapper; |
| | | import com.ruoyi.chargingPile.service.TParkingLotService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 停车场 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TParkingLotServiceImpl extends ServiceImpl<TParkingLotMapper, TParkingLot> implements TParkingLotService { |
| | | |
| | | @Override |
| | | public PageInfo<TParkingLotVO> pageList(TParkingLotQuery query) { |
| | | PageInfo<TParkingLotVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TParkingLotVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TVehicleRamp; |
| | | import com.ruoyi.chargingPile.mapper.TVehicleRampMapper; |
| | | import com.ruoyi.chargingPile.service.TVehicleRampService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 车道 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-06 |
| | | */ |
| | | @Service |
| | | public class TVehicleRampServiceImpl extends ServiceImpl<TVehicleRampMapper, TVehicleRamp> implements TVehicleRampService { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TAccountingStrategyDetailMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail"> |
| | | <id column="id" property="id" /> |
| | | <result column="accounting_strategy_id" property="accountingStrategyId" /> |
| | | <result column="`type`" property="type" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="electrovalence" property="electrovalence" /> |
| | | <result column="service_charge" property="serviceCharge" /> |
| | | <result column="cost_service_charge" property="costServiceCharge" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, accounting_strategy_id, `type`, start_time, end_time, electrovalence, service_charge, cost_service_charge |
| | | </sql> |
| | | <select id="queryAccountingStrategyDetailByStrategyId" resultType="com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO"> |
| | | SELECT |
| | | tasd.id, tasd.accounting_strategy_id, tasd.`type`, tasd.start_time, tasd.end_time, tasd.electrovalence, tasd.service_charge, |
| | | tasd.cost_service_charge,tas.discount |
| | | FROM t_accounting_strategy_detail tasd |
| | | LEFT JOIN t_accounting_strategy tas ON tas.id = tasd.accounting_strategy_id |
| | | <where> |
| | | <if test="strategyId != null"> |
| | | AND tasd.accounting_strategy_id = #{strategyId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TAccountingStrategyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TAccountingStrategy"> |
| | | <id column="id" property="id" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="`name`" property="name" /> |
| | | <result column="description" property="description" /> |
| | | <result column="discount" property="discount" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, site_id, `name`, description, discount, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.chargingPile.api.vo.TAccountingStrategyVO"> |
| | | SELECT |
| | | id, site_id, `name`, description, discount, create_time, del_flag |
| | | FROM t_accounting_strategy |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND `name` LIKE concat('%',#{query.name}, '%') |
| | | </if> |
| | | AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TCarportMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TCarport"> |
| | | <id column="id" property="id" /> |
| | | <result column="parking_lot_id" property="parkingLotId" /> |
| | | <result column="code" property="code" /> |
| | | <result column="`name`" property="name" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, parking_lot_id, code, `name`, create_time, del_flag |
| | | </sql> |
| | | <select id="queryCarportByParkId" resultType="com.ruoyi.chargingPile.api.vo.TCarportVO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM t_carport |
| | | <where> |
| | | <if test="parkingLotId != null"> |
| | | AND parking_lot_id = #{parkingLotId} |
| | | </if> |
| | | AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TChargingGunMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TChargingGun"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="partner_id" property="partnerId" /> |
| | | <result column="charging_pile_id" property="chargingPileId" /> |
| | | <result column="`name`" property="name" /> |
| | | <result column="`type`" property="type" /> |
| | | <result column="status" property="status" /> |
| | | <result column="charge_mode" property="chargeMode" /> |
| | | <result column="accounting_strategy_id" property="accountingStrategyId" /> |
| | | <result column="upper_rated_voltage" property="upperRatedVoltage" /> |
| | | <result column="lower_limit_of_rated_voltage" property="lowerLimitOfRatedVoltage" /> |
| | | <result column="rated_current" property="ratedCurrent" /> |
| | | <result column="rated_power" property="ratedPower" /> |
| | | <result column="parking_number" property="parkingNumber" /> |
| | | <result column="parking_status" property="parkingStatus" /> |
| | | <result column="parking_lock_state" property="parkingLockState" /> |
| | | <result column="national_standard" property="nationalStandard" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, site_id, partner_id, charging_pile_id, `name`, `type`, status, charge_mode, accounting_strategy_id, upper_rated_voltage, lower_limit_of_rated_voltage, rated_current, rated_power, parking_number, parking_status, parking_lock_state, national_standard, remark, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.chargingPile.api.vo.TChargingGunVO"> |
| | | SELECT |
| | | tas.id, tas.code, tas.site_id, tas.partner_id, tas.charging_pile_id, tas.`name`, tas.`type`, tas.status, tas.charge_mode, tas.accounting_strategy_id, |
| | | tas.upper_rated_voltage, tas.lower_limit_of_rated_voltage, tas.rated_current, tas.rated_power, tas.parking_number, tas.parking_status, |
| | | tas.parking_lock_state, tas.national_standard, tas.remark, tas.create_time, tas.del_flag,tcg.name AS strategyName |
| | | FROM t_charging_gun tcg |
| | | LEFT JOIN t_accounting_strategy tas ON tas.id = tcg.accounting_strategy_id |
| | | <where> |
| | | <if test="query.siteId != null"> |
| | | AND tas.site_id = #{query.siteId} |
| | | </if> |
| | | <if test="query.chargingPileId != null"> |
| | | AND tas.charging_pile_id = #{query.chargingPileId} |
| | | </if> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND tas.`name` LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.type != null"> |
| | | AND tas.`type` = #{query.type} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND tas.status = #{query.status} |
| | | </if> |
| | | <if test="query.chargeMode != null"> |
| | | AND tas.chargeMode = #{query.chargeMode} |
| | | </if> |
| | | AND tas.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tas.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TChargingPileMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TChargingPile"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="name" property="name" /> |
| | | <result column="number" property="number" /> |
| | | <result column="type" property="type" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="partner_id" property="partnerId" /> |
| | | <result column="manufacturer_code" property="manufacturerCode" /> |
| | | <result column="manufacturer" property="manufacturer" /> |
| | | <result column="equipment_type" property="equipmentType" /> |
| | | <result column="production_date" property="productionDate" /> |
| | | <result column="rated_power" property="ratedPower" /> |
| | | <result column="charging_station_number" property="chargingStationNumber" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, `name`, `number`, `type`, site_id, partner_id, manufacturer_code, manufacturer, equipment_type, production_date, rated_power, charging_station_number, status, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TMonitoringEquipmentMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TMonitoringEquipment"> |
| | | <id column="id" property="id" /> |
| | | <result column="`name`" property="name" /> |
| | | <result column="code" property="code" /> |
| | | <result column="parking_lot_id" property="parkingLotId" /> |
| | | <result column="location" property="location" /> |
| | | <result column="url_link" property="urlLink" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, `name`, code, parking_lot_id, location, url_link, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.chargingPile.api.vo.TMonitoringEquipmentVO"> |
| | | SELECT |
| | | tme.id, tme.`name`, tme.code, tme.parking_lot_id, tme.location, tme.url_link, tme.create_time, tme.del_flag, tpl.name AS parkingLotName |
| | | FROM t_monitoring_equipment tme |
| | | LEFT JOIN t_parking_lot tpl ON tme.parking_lot_id = tpl.id |
| | | <where> |
| | | <if test="query.parkingLotId != null"> |
| | | AND tme.parking_lot_id = #{query.parkingLotId} |
| | | </if> |
| | | AND tme.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tme.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TParkingLotMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TParkingLot"> |
| | | <id column="id" property="id" /> |
| | | <result column="`name`" property="name" /> |
| | | <result column="code" property="code" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="charge_free_duration" property="chargeFreeDuration" /> |
| | | <result column="charge_capping" property="chargeCapping" /> |
| | | <result column="charge_rate" property="chargeRate" /> |
| | | <result column="non_charge_free_duration" property="nonChargeFreeDuration" /> |
| | | <result column="non_charge_capping" property="nonChargeCapping" /> |
| | | <result column="non_charge_rate" property="nonChargeRate" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, `name`, code, site_id, charge_free_duration, charge_capping, charge_rate, non_charge_free_duration, non_charge_capping, non_charge_rate, remark, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.chargingPile.api.vo.TParkingLotVO"> |
| | | SELECT |
| | | tpl.id, tpl.`name`, tpl.code, tpl.site_id, tpl.charge_free_duration, tpl.charge_capping, tpl.charge_rate, tpl.non_charge_free_duration, |
| | | tpl.non_charge_capping, tpl.non_charge_rate, tpl.remark, tpl.create_time, tpl.del_flag, ts.name AS siteName |
| | | FROM t_parking_lot tpl |
| | | LEFT JOIN t_site ts ON tpl.site_id = ts.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND tpl.`name` LIKE concat('%', #{query.name}, '%') |
| | | </if> |
| | | <if test="query.code != null and query.code != ''"> |
| | | AND tpl.code LIKE concat('%', #{query.code}, '%') |
| | | </if> |
| | | <if test="query.siteId != null"> |
| | | AND tpl.site_id = #{query.siteId} |
| | | </if> |
| | | AND tpl.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tpl.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TVehicleRampMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TVehicleRamp"> |
| | | <id column="id" property="id" /> |
| | | <result column="parking_lot_id" property="parkingLotId" /> |
| | | <result column="carport_id" property="carportId" /> |
| | | <result column="`name`" property="name" /> |
| | | <result column="direction" property="direction" /> |
| | | <result column="carport_num" property="carportNum" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, parking_lot_id, carport_id, `name`, direction,carport_num, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |