场站列表接口
This commit is contained in:
parent
03afa6221c
commit
2347cce36c
@ -91,6 +91,11 @@
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.7.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
package com.xhpc.charging.station.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 费率时段
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
public class XhpcRateTime extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 费率时段id */
|
||||
private Long rateTimeId;
|
||||
|
||||
/** 电站id */
|
||||
private Long chargingStationId;
|
||||
|
||||
/** 费率id */
|
||||
private Long rateId;
|
||||
|
||||
/** 启始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
private Integer status;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 计费模型id */
|
||||
private Long rateModelId;
|
||||
|
||||
/** 0 全部时间排列完 1 有剩余时间 */
|
||||
private Integer type;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public Long getRateTimeId() {
|
||||
|
||||
return rateTimeId;
|
||||
}
|
||||
|
||||
public void setRateTimeId(Long rateTimeId) {
|
||||
|
||||
this.rateTimeId = rateTimeId;
|
||||
}
|
||||
|
||||
public Long getChargingStationId() {
|
||||
|
||||
return chargingStationId;
|
||||
}
|
||||
|
||||
public void setChargingStationId(Long chargingStationId) {
|
||||
|
||||
this.chargingStationId = chargingStationId;
|
||||
}
|
||||
|
||||
public Long getRateId() {
|
||||
|
||||
return rateId;
|
||||
}
|
||||
|
||||
public void setRateId(Long rateId) {
|
||||
|
||||
this.rateId = rateId;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime() {
|
||||
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getDelFlag() {
|
||||
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(Integer delFlag) {
|
||||
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getRateModelId() {
|
||||
|
||||
return rateModelId;
|
||||
}
|
||||
|
||||
public void setRateModelId(Long rateModelId) {
|
||||
|
||||
this.rateModelId = rateModelId;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package com.xhpc.charging.station.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 终端
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
public class XhpcTerminal extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 终端id */
|
||||
private Long terminalId;
|
||||
|
||||
/** 电桩id */
|
||||
private Long chargingPileId;
|
||||
|
||||
/** 电站id */
|
||||
private Long chargingStationId;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 编号 */
|
||||
private String serialNumber;
|
||||
|
||||
/** 电桩编号 */
|
||||
private String pileSerialNumber;
|
||||
|
||||
/** 插枪状态 */
|
||||
private Integer gunStatus;
|
||||
|
||||
/** 工作状态(0离线 1故障 2空闲 3充电) */
|
||||
private Integer workStatus;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
private Integer status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private Integer delFlag;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public Long getTerminalId() {
|
||||
|
||||
return terminalId;
|
||||
}
|
||||
|
||||
public void setTerminalId(Long terminalId) {
|
||||
|
||||
this.terminalId = terminalId;
|
||||
}
|
||||
|
||||
public Long getChargingPileId() {
|
||||
|
||||
return chargingPileId;
|
||||
}
|
||||
|
||||
public void setChargingPileId(Long chargingPileId) {
|
||||
|
||||
this.chargingPileId = chargingPileId;
|
||||
}
|
||||
|
||||
public Long getChargingStationId() {
|
||||
|
||||
return chargingStationId;
|
||||
}
|
||||
|
||||
public void setChargingStationId(Long chargingStationId) {
|
||||
|
||||
this.chargingStationId = chargingStationId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSerialNumber() {
|
||||
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber) {
|
||||
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getPileSerialNumber() {
|
||||
|
||||
return pileSerialNumber;
|
||||
}
|
||||
|
||||
public void setPileSerialNumber(String pileSerialNumber) {
|
||||
|
||||
this.pileSerialNumber = pileSerialNumber;
|
||||
}
|
||||
|
||||
public Integer getGunStatus() {
|
||||
|
||||
return gunStatus;
|
||||
}
|
||||
|
||||
public void setGunStatus(Integer gunStatus) {
|
||||
|
||||
this.gunStatus = gunStatus;
|
||||
}
|
||||
|
||||
public Integer getWorkStatus() {
|
||||
|
||||
return workStatus;
|
||||
}
|
||||
|
||||
public void setWorkStatus(Integer workStatus) {
|
||||
|
||||
this.workStatus = workStatus;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getDelFlag() {
|
||||
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(Integer delFlag) {
|
||||
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
}
|
||||
@ -19,7 +19,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
public XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
|
||||
XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 查询电站列表
|
||||
@ -27,7 +27,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 电站集合
|
||||
*/
|
||||
public List<Map<String,Object>> selectXhpcChargingStationList(XhpcChargingStation xhpcChargingStation);
|
||||
List<Map<String,Object>> selectXhpcChargingStationList(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 新增电站
|
||||
@ -35,7 +35,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 修改电站
|
||||
@ -43,7 +43,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 删除电站
|
||||
@ -51,7 +51,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXhpcChargingStationById(Long chargingStationId);
|
||||
int updateXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 批量删除电站
|
||||
@ -59,5 +59,5 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXhpcChargingStationByIds(Long[] chargingStationIds);
|
||||
int updateXhpcChargingStationByIds(Long[] chargingStationIds);
|
||||
}
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
package com.xhpc.charging.station.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
public interface XhpcRateTimeMapper {
|
||||
|
||||
/**
|
||||
* 判断本时间段的电费
|
||||
* @param date 本地时间(时分秒)
|
||||
* @param datchargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Long getXhpcRateTime(@Param("date")String date,@Param("datchargingStationId")Long datchargingStationId);
|
||||
|
||||
/**
|
||||
* 获取在这个时间段的费率
|
||||
* @param datchargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getXhpcTimeType(@Param("datchargingStationId")Long datchargingStationId,@Param("rateId")Long rateId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取剩余时间费率
|
||||
* @param datchargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getXhpcRateTimeType(@Param("datchargingStationId")Long datchargingStationId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.xhpc.charging.station.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 终端Mapper接口
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
public interface XhpcTerminalMapper {
|
||||
|
||||
|
||||
/**
|
||||
* PC端页面统计
|
||||
* @param chargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> countXhpcTerminalWorkStatus(Long chargingStationId);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.xhpc.charging.station.service;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 费率时段Service接口
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
public interface IXhpcRateTimeService {
|
||||
|
||||
|
||||
/**
|
||||
* 获取本时间段的电费
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> getXhpcRateTime(String date,Long datchargingStationIde);
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.xhpc.charging.station.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 终端Service接口
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
public interface IXhpcTerminalService {
|
||||
|
||||
|
||||
/**
|
||||
* PC端页面统计
|
||||
* @param chargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> countXhpcTerminalWorkStatus(Long chargingStationId);
|
||||
|
||||
|
||||
}
|
||||
@ -1,11 +1,13 @@
|
||||
package com.xhpc.charging.station.service;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.xhpc.charging.station.domain.XhpcChargingStation;
|
||||
import com.xhpc.charging.station.mapper.XhpcChargingStationMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -20,6 +22,10 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
|
||||
@Autowired
|
||||
private XhpcChargingStationMapper xhpcChargingStationMapper;
|
||||
@Autowired
|
||||
private IXhpcRateTimeService xhpcRateTimeService;
|
||||
@Autowired
|
||||
private IXhpcTerminalService xhpcTerminalService;
|
||||
|
||||
/**
|
||||
* 查询电站
|
||||
@ -43,7 +49,24 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
public List<Map<String,Object>> selectXhpcChargingStationList(XhpcChargingStation xhpcChargingStation)
|
||||
{
|
||||
//桩的统计、该时段金额
|
||||
return xhpcChargingStationMapper.selectXhpcChargingStationList(xhpcChargingStation);
|
||||
List<Map<String,Object>> list = xhpcChargingStationMapper.selectXhpcChargingStationList(xhpcChargingStation);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Map<String,Object> map = list.get(i);
|
||||
Long chargingStationId = Long.valueOf(map.get("chargingStationId").toString());
|
||||
//获取该时段电费
|
||||
//HH:mm:ss
|
||||
String tiem = DateUtil.formatTime(new Date());
|
||||
Map<String, Object> xhpcRateTime = xhpcRateTimeService.getXhpcRateTime(tiem, chargingStationId);
|
||||
if(xhpcRateTime!=null){
|
||||
map.putAll(xhpcRateTime);
|
||||
}
|
||||
//获取桩的统计
|
||||
Map<String, Object> chargingId = xhpcTerminalService.countXhpcTerminalWorkStatus(chargingStationId);
|
||||
if(chargingId!=null){
|
||||
map.putAll(chargingId);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.xhpc.charging.station.service;
|
||||
|
||||
import com.xhpc.charging.station.mapper.XhpcRateTimeMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 费率时段Service业务层处理
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
@Service
|
||||
public class XhpcRateTimeServiceImpl implements IXhpcRateTimeService{
|
||||
|
||||
@Autowired
|
||||
private XhpcRateTimeMapper xhpcRateTimeMapper;
|
||||
/**
|
||||
* 获取本时间段的电费
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getXhpcRateTime(String date,Long datchargingStationIde) {
|
||||
|
||||
Long rateId = xhpcRateTimeMapper.getXhpcRateTime(date, datchargingStationIde);
|
||||
if(rateId ==null){
|
||||
//获取剩余时间费率
|
||||
return xhpcRateTimeMapper.getXhpcRateTimeType(datchargingStationIde);
|
||||
}
|
||||
return xhpcRateTimeMapper.getXhpcTimeType(datchargingStationIde,rateId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.xhpc.charging.station.service;
|
||||
|
||||
import com.xhpc.charging.station.mapper.XhpcTerminalMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 终端Service业务层处理
|
||||
*
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
@Service
|
||||
public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
|
||||
@Autowired
|
||||
private XhpcTerminalMapper xhpcTerminalMapper;
|
||||
|
||||
/**
|
||||
* PC端页面统计
|
||||
* @param chargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> countXhpcTerminalWorkStatus(Long chargingStationId) {
|
||||
return xhpcTerminalMapper.countXhpcTerminalWorkStatus(chargingStationId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -139,11 +139,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<update id="updateXhpcChargingStationById" parameterType="Long">
|
||||
update xhpc_charging_station set delFlag =1 where charging_station_id = #{chargingStationId}
|
||||
update xhpc_charging_station set del_flag =1 where charging_station_id = #{chargingStationId}
|
||||
</update>
|
||||
|
||||
<update id="updateXhpcChargingStationByIds" parameterType="String">
|
||||
update xhpc_charging_station set delFlag =1 where charging_station_id in
|
||||
update xhpc_charging_station set del_flag =1 where charging_station_id in
|
||||
<foreach item="chargingStationId" collection="array" open="(" separator="," close=")">
|
||||
#{chargingStationId}
|
||||
</foreach>
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
<?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.xhpc.charging.station.mapper.XhpcRateTimeMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.charging.station.domain.XhpcRateTime">
|
||||
<result property="rateTimeId" column="rate_time_id" />
|
||||
<result property="chargingStationId" column="charging_station_id" />
|
||||
<result property="rateId" column="rate_id" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="rateModelId" column="rate_model_id" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getXhpcRateTime" resultType="Long">
|
||||
select rate_id as rateId from xhpc_rate_time where charging_station_id =#{datchargingStationId} and start_time <=#{date} and end_time >=#{date} and status=0 and del_flag=0 and type=0
|
||||
</select>
|
||||
|
||||
<select id="getXhpcTimeType" resultType="map">
|
||||
select
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=#{rateId}
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeType" resultType="map">
|
||||
select
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=(select rate_id from xhpc_rate_time where status=0 and del_flag=0 and type=1 and charging_station_id =#{datchargingStationId} LIMIT 1)
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,33 @@
|
||||
<?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.xhpc.charging.station.mapper.XhpcTerminalMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.charging.station.domain.XhpcTerminal">
|
||||
<result property="terminalId" column="terminal_id" />
|
||||
<result property="chargingPileId" column="charging_pile_id" />
|
||||
<result property="chargingStationId" column="charging_station_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="pileSerialNumber" column="pile_serial_number" />
|
||||
<result property="gunStatus" column="gun_status" />
|
||||
<result property="workStatus" column="work_status" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<select id="countXhpcTerminalWorkStatus" resultType="map">
|
||||
select
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=0 and charging_station_id=#{chargingStationId}) offLine,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=1 and charging_station_id=#{chargingStationId}) fault,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=2 and charging_station_id=#{chargingStationId}) freeTime,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=3 and charging_station_id=#{chargingStationId}) charge
|
||||
from xhpc_terminal LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user