diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java index 952e8742..3a2ce494 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java @@ -47,4 +47,12 @@ public interface XhpcChargingPileMapper { * @return 电站 */ XhpcChargingPile selectXhpcChargingPileById(Long chargingPileId); + + /** + * 编辑 + * + * @param xhpcChargingPile 终端 + * @return 结果 + */ + int updaeXhpcChargingPile(XhpcChargingPile xhpcChargingPile); } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index ed0d08c5..8c6bb834 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -456,7 +456,10 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi //获取基本信息 Map map = xhpcChargingStationMapper.getWXXhpcChargingStationMessage(chargingStationId,longitude,latitude); - //桩空闲数量,从redis获取 + //桩(空闲和使用从redis获取) + map.put("free",10); + + map.put("common",12); //服务设施 List serviceFacilitiesList =new ArrayList<>(); @@ -468,11 +471,11 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi map.put("serviceFacilitiesList",service_facilities); //周边设施 - List peripheryFacilities =new ArrayList<>(); - if(map.get("peripheryFacilities") !=null && map.get("peripheryFacilities").toString() !=""){ - String[] split = map.get("peripheryFacilities").toString().split(","); - peripheryFacilities=Arrays.asList(split); - } +// List peripheryFacilities =new ArrayList<>(); +// if(map.get("peripheryFacilities") !=null && map.get("peripheryFacilities").toString() !=""){ +// String[] split = map.get("peripheryFacilities").toString().split(","); +// peripheryFacilities=Arrays.asList(split); +// } List> charging_periphery_facilities = xhpcChargingStationMapper.getCode("charging_periphery_facilities",peripheryFacilities); map.put("peripheryFacilities",charging_periphery_facilities); 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 3a5c0da2..c04fa973 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 @@ -246,4 +246,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where charging_pile_id = #{chargingPileId} + + + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml index 673a3d80..6e86ccde 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml @@ -256,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" COS((#{latitude} * 3.141593) / 180 ) * COS((latitude * 3.141593) / 180 ) * COS((#{longitude} * 3.141593) / 180 - (longitude * 3.141593) / 180 ) ) * 6370.9968,4)AS distance from xhpc_charging_station + where charging_station_id=#{chargingStationId} and del_flag=0 and status=0 diff --git a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java index 398cd72c..25b8cbf8 100644 --- a/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java +++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java @@ -22,7 +22,7 @@ public class XhpcDictBizController extends BaseController { @Autowired private IXhpcDictBizService xhpcDictBizService; /** - * 根据code获取数据 + * 根据code获取数据(通用接口) */ //@PreAuthorize(hasPermi = "system:station:remove") //@Log(title = "电站", businessType = BusinessType.DELETE)