桩详情信息
This commit is contained in:
parent
9932749b27
commit
f740a822a4
@ -4,7 +4,6 @@ import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.xhpc.charging.station.domain.XhpcChargingPile;
|
||||
import com.xhpc.charging.station.dto.XhpcChargingStationDto;
|
||||
import com.xhpc.charging.station.service.IXhpcChargingPileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -65,7 +64,7 @@ public class XhpcChargingPileController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/selectXhpcChargingPile")
|
||||
public AjaxResult selectXhpcChargingPile(@PathVariable("roleId")Long chargingPileId)
|
||||
public AjaxResult selectXhpcChargingPile(@RequestParam(value = "chargingPileId",required = true) Long chargingPileId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingPileService.selectXhpcChargingPile(chargingPileId));
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@Param("status")Integer status,@Param("chargingStationId")Long chargingStationId)
|
||||
public AjaxResult status(@RequestParam(value = "status",required = true)Integer status,@RequestParam(value = "chargingStationId",required = true)Long chargingStationId)
|
||||
{
|
||||
return toAjax(xhpcChargingStationService.status(status,chargingStationId));
|
||||
}
|
||||
@ -121,7 +121,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/clientVisible")
|
||||
public AjaxResult status(@Param("type")Integer type,@Param("clientVisible")String clientVisible,@Param("chargingStationId")Long chargingStationId)
|
||||
public AjaxResult status(@RequestParam(value = "type",required = true)Integer type,@RequestParam(value = "clientVisible",required = true)String clientVisible,@RequestParam(value = "chargingStationId",required = true)Long chargingStationId)
|
||||
{
|
||||
return toAjax(xhpcChargingStationService.clientVisible(type,clientVisible,chargingStationId));
|
||||
}
|
||||
@ -133,7 +133,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@GetMapping(value = "/stationInternetBlackList")
|
||||
public AjaxResult stationInternetBlackList(@Param("chargingStationId") Long chargingStationId)
|
||||
public AjaxResult stationInternetBlackList(@RequestParam(value = "chargingStationId",required = true) Long chargingStationId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.stationInternetBlackList(chargingStationId));
|
||||
}
|
||||
@ -162,12 +162,6 @@ public class XhpcChargingStationController extends BaseController {
|
||||
return AjaxResult.success(xhpcChargingStationService.getXhpcChargingStationMessage(chargingStationId,type));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 微信小程序电站列表
|
||||
* @param name 电站名称
|
||||
@ -195,7 +189,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcChargingStationMessage")
|
||||
public AjaxResult getWXXhpcChargingStationMessage(@RequestParam("chargingStationId") Long chargingStationId,@RequestParam("longitude")String longitude,@RequestParam("latitude")String latitude)
|
||||
public AjaxResult getWXXhpcChargingStationMessage(@RequestParam(value = "chargingStationId",required = true)Long chargingStationId,@RequestParam(value = "longitude",required = true)String longitude,@RequestParam(value = "latitude",required = true)String latitude)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getWXXhpcChargingStationMessage(chargingStationId,longitude,latitude));
|
||||
}
|
||||
@ -206,7 +200,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcRateTimeMassage")
|
||||
public AjaxResult getXhpcRateTimeMassage(@Param("chargingStationId") Long chargingStationId)
|
||||
public AjaxResult getXhpcRateTimeMassage(@RequestParam(value = "chargingStationId",required = true) Long chargingStationId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getWXXhpcRateTimeMassage(chargingStationId));
|
||||
}
|
||||
@ -217,7 +211,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcTerminalMassage")
|
||||
public AjaxResult getWXXhpcTerminalMassage(@Param("chargingStationId") Long chargingStationId)
|
||||
public AjaxResult getWXXhpcTerminalMassage(@RequestParam(value = "chargingStationId",required = true) Long chargingStationId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getWXXhpcTerminalMassage(chargingStationId));
|
||||
}
|
||||
|
||||
@ -55,4 +55,11 @@ public interface XhpcChargingPileMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
int updaeXhpcChargingPile(XhpcChargingPile xhpcChargingPile);
|
||||
|
||||
/**
|
||||
* 终端列表
|
||||
* @param chargingPileId 桩id
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> selectXhpcTerminalList(@Param("chargingPileId") Long chargingPileId);
|
||||
}
|
||||
|
||||
@ -23,14 +23,14 @@ public interface IXhpcChargingPileService {
|
||||
|
||||
|
||||
/**
|
||||
* 添加电站(编辑费率)
|
||||
* 添加桩
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile);
|
||||
|
||||
/**
|
||||
* 编辑电站(编辑费率)
|
||||
* 编辑桩
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -9,6 +9,7 @@ import com.xhpc.common.api.PowerPileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -93,8 +94,13 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
|
||||
@Override
|
||||
public AjaxResult selectXhpcChargingPile(Long chargingPileId) {
|
||||
|
||||
return null;
|
||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||
//终端信息
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
List<Map<String, Object>> list = xhpcChargingPileMapper.selectXhpcTerminalList(chargingPileId);
|
||||
map.put("chargingPile",xhpc);
|
||||
map.put("terminal",list);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -248,6 +248,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<update id="updaeXhpcChargingPile" >
|
||||
|
||||
update xhpc_charging_pile
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="chargingStationId != null">charging_station_id = #{chargingStationId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="nationalStandard != null">national_standard = #{nationalStandard},</if>
|
||||
<if test="power != null">power = #{power},</if>
|
||||
<if test="auxiliaryPowerSupply != null">auxiliary_power_supply = #{auxiliaryPowerSupply},</if>
|
||||
<if test="inputVoltage != null">input_voltage = #{inputVoltage},</if>
|
||||
<if test="maxVoltage != null">max_voltage = #{maxVoltage},</if>
|
||||
<if test="minVoltage != null">min_voltage = #{minVoltage},</if>
|
||||
<if test="maxElectricCurrent != null">max_electric_current = #{maxElectricCurrent},</if>
|
||||
<if test="minElectriCurrent != null">min_electric_current = #{minElectriCurrent},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="programVersion != null">program_version = #{programVersion},</if>
|
||||
<if test="networkLinkType != null">network_link_type = #{networkLinkType},</if>
|
||||
<if test="gunNumber != null">network_link_type = #{gunNumber},</if>
|
||||
<if test="networkLinkType != null">gun_number = #{networkLinkType},</if>
|
||||
<if test="communicationProtocolVersion != null">communication_protocol_version = #{communicationProtocolVersion},</if>
|
||||
<if test="communicationOperator != null">communication_operator = #{communicationOperator},</if>
|
||||
<if test="simCard != null">sim_card = #{simCard},</if>
|
||||
<if test="rateModelId != null">rate_model_id = #{rateModelId},</if>
|
||||
<if test="chargingPileNumber != null">charging_pile_number = #{chargingPileNumber},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where charging_pile_id = #{chargingPileId}
|
||||
</update>
|
||||
|
||||
<select id="selectXhpcTerminalList" resultType="map">
|
||||
select
|
||||
te.terminal_id as terminalId,
|
||||
te.name as terminalName,
|
||||
ct.name as chargingStationName,
|
||||
te.pile_serial_number as pileSerialNumber,
|
||||
cp.power as power,
|
||||
cp.serial_number as serialNumber,
|
||||
te.status as status,
|
||||
te.work_status as workStatus
|
||||
from xhpc_terminal as te
|
||||
left join xhpc_charging_station as ct on ct.charging_station_id = te.charging_station_id
|
||||
left join xhpc_charging_pile as cp on cp.charging_pile_id = te.charging_pile_id
|
||||
where te.del_flag=0
|
||||
<if test="chargingPileId !=null">
|
||||
and te.charging_pile_id=#{chargingPileId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user