diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java index 30ccc3d7..0e1d192a 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java @@ -87,7 +87,7 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService { Map 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> 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()); diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml index 2b549d80..65e4d3a8 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml @@ -310,7 +310,42 @@ diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml index 6047619f..1c208f19 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml @@ -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} diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index c08e8786..ce9b43c9 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -38,6 +38,9 @@