修改终端详情

This commit is contained in:
yuyang 2021-11-02 15:29:28 +08:00
parent c0078f62c8
commit 201604828c
4 changed files with 59 additions and 7 deletions

View File

@ -87,7 +87,7 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService {
Map<String, Object> map = xhpcTerminalMapper.selectXhpcTerminalPileMessage(terminalId);
if (map != null && map.get("chargingStationId") != null && map.get("serialNumber") != null) {
Long chargingStationId = Long.parseLong(map.get("chargingStationId").toString());
String gunNumber = map.get("serialNumber").toString();
String gunNumber = map.get("serialNumber").toString().substring(14);
//费率时段,先反设置时段在反默认时段
List<Map<String, Object>> xhpcRateTimeTypeList = xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 1);
xhpcRateTimeTypeList.addAll(xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
@ -95,8 +95,20 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService {
//统计终端充redis获取终端信息
map.putAll(xhpcTerminalMapper.getXhpcRateTimeOrderStatistics(chargingStationId, gunNumber));
if(map.get("chargingDegreeSum")==null || map.get("chargingDegreeSum").toString()==null || "".equals(map.get("chargingDegreeSum").toString())){
map.put("chargingDegreeSum",0);
}
Integer status = xhpcChargingStationService.getTerminalStatus(map.get("serialNumber").toString());
map.put("workStatus",status);
return AjaxResult.success(map);
}
return AjaxResult.error("无效终端");
}
@ -108,8 +120,6 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService {
return AjaxResult.error(1007, "无效的终端编码");
}
//获取桩的状态
Long chargingStationId = Long.parseLong(map.get("chargingStationId").toString());
//HH:mm:ss
String tiem = DateUtil.formatTime(new Date());

View File

@ -310,7 +310,42 @@
</select>
<select id="selectXhpcChargingPileById" resultMap="BaseResultMap">
<include refid="selectXhpcChargingPileVo"/>
select
charging_pile_id,
charging_station_id,
name,
national_standard,
power,
auxiliary_power_supply,
input_voltage,
max_voltage,
min_voltage,
max_electric_current,
min_electric_current,
serial_number,
type,
program_version,
network_link_type,
gun_number,
communication_protocol_version,
communication_operator,
sim_card,
rate_model_id,
status,
del_flag,
create_time,
create_by,
update_time,
update_by,
remark,
rate_model_id,
brand_model,
production_date productionDate,
manufacture_name manufactureName,
connector_type connectorType,
current,
equipment_type equipmentType
from xhpc_charging_pile
where charging_pile_id = #{chargingPileId}
</select>

View File

@ -271,10 +271,14 @@
cp.min_electric_current as minElectricCurrent,
cp.communication_operator as communicationOperator,
cp.sim_card as simCard,
ter.connector_type as connectorType
cp.connector_type as connectorType,
cp.brand_model as brandModel,
db.dict_value as attribute
from xhpc_terminal as ter
left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id
left join xhpc_charging_station as ct on ct.charging_station_id = ter.charging_station_id
left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id
left join xhpc_charging_station as ct on ct.charging_station_id = ter.charging_station_id
left join xhpc_operator as op on op.operator_id = ct.operator_id
left join xhpc_dict_biz as db on db.code='operator_attribute' and db.dict_key=op.attribute
where ter.terminal_id = #{terminalId}
</select>

View File

@ -38,6 +38,9 @@
<select id="getTimeIntervalPage" resultType="map">
select
sum(act_price) actPrice,
sum(act_power_price) actPowerPrice,
sum(act_service_price) actServicePrice,
sum(charging_degree) chargingDegree,
sum(charging_time) chargingTime,
sum(charging_number) chargingNumber,