桩查询接口
This commit is contained in:
parent
99aaf6456d
commit
10b59a584b
@ -39,9 +39,8 @@ public class XhpcChargingPileController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
//新增终端
|
||||
/**
|
||||
* 编辑费率
|
||||
* 新增桩
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addXhpcChargingPile")
|
||||
@ -50,4 +49,14 @@ public class XhpcChargingPileController extends BaseController {
|
||||
return AjaxResult.success(xhpcChargingPileService.addXhpcChargingPile(xhpcChargingPile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑桩
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateXhpcChargingPile")
|
||||
public AjaxResult updateXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingPileService.updateXhpcChargingPile(xhpcChargingPile));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcChargingStationMessage")
|
||||
public AjaxResult getWXXhpcChargingStationMessage(@Param("chargingStationId") Long chargingStationId,@Param("longitude")String longitude,@Param("latitude")String latitude)
|
||||
public AjaxResult getWXXhpcChargingStationMessage(@RequestParam("chargingStationId") Long chargingStationId,@RequestParam("longitude")String longitude,@RequestParam("latitude")String latitude)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getWXXhpcChargingStationMessage(chargingStationId,longitude,latitude));
|
||||
}
|
||||
|
||||
@ -39,4 +39,12 @@ public interface XhpcChargingPileMapper {
|
||||
* @return 电站
|
||||
*/
|
||||
Map<String,Object> selectXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 查询终端
|
||||
*
|
||||
* @param chargingPileId 终端ID
|
||||
* @return 电站
|
||||
*/
|
||||
XhpcChargingPile selectXhpcChargingPileById(Long chargingPileId);
|
||||
}
|
||||
|
||||
@ -23,10 +23,17 @@ public interface IXhpcChargingPileService {
|
||||
|
||||
|
||||
/**
|
||||
* 编辑电站(编辑费率)
|
||||
* 添加电站(编辑费率)
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile);
|
||||
|
||||
/**
|
||||
* 编辑电站(编辑费率)
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateXhpcChargingPile(XhpcChargingPile xhpcChargingPile);
|
||||
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
public AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile) {
|
||||
|
||||
Long chargingStationId = xhpcChargingPile.getChargingStationId();
|
||||
//获取计费模型
|
||||
//获取计费模型id
|
||||
Map<String, Object> stringObjectMap = xhpcChargingPileMapper.selectXhpcChargingStationById(chargingStationId);
|
||||
Long rateModelId = Long.parseLong(stringObjectMap.get("rateModelId").toString());
|
||||
xhpcChargingPile.setRateModelId(rateModelId);
|
||||
@ -63,4 +63,12 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateXhpcChargingPile(XhpcChargingPile xhpcChargingPile) {
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -34,7 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="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,charging_pile_number,status, del_flag, create_time, create_by, update_time, update_by, remark, rate_model_id from xhpc_charging_pile
|
||||
</sql>
|
||||
<select id="selectXhpcChargingStationList" resultType="map">
|
||||
select
|
||||
cp.charging_pile_id as chargingPileId,
|
||||
@ -239,4 +241,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
rate_model_id as rateModelId
|
||||
from xhpc_charging_station where charging_station_id=#{chargingStationId}
|
||||
</select>
|
||||
|
||||
<select id="selectXhpcChargingPileById" resultMap="BaseResultMap">
|
||||
<include refid="selectXhpcChargingPileVo"/>
|
||||
where charging_pile_id = #{chargingPileId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user