场站、终端、桩 POST接口修改,文档已更新
This commit is contained in:
parent
5a052ef69c
commit
bdafb64491
@ -5,6 +5,7 @@ import com.xhpc.common.core.web.domain.AjaxResult;
|
|||||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||||
import com.xhpc.charging.station.service.IXhpcChargingPileService;
|
import com.xhpc.charging.station.service.IXhpcChargingPileService;
|
||||||
import com.xhpc.common.domain.XhpcChargingPile;
|
import com.xhpc.common.domain.XhpcChargingPile;
|
||||||
|
import com.xhpc.common.domain.XhpcTerminal;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ public class XhpcChargingPileController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
//@PreAuthorize(hasPermi = "system:station:list")
|
//@PreAuthorize(hasPermi = "system:station:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(String name, Integer type, Integer status, String serialNumber,Long chargingStationId)
|
public TableDataInfo list(String name, Integer type,String serialNumber,Long chargingStationId)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<Map<String,Object>> list = xhpcChargingPileService.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId);
|
List<Map<String,Object>> list = xhpcChargingPileService.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId);
|
||||||
@ -45,7 +46,7 @@ public class XhpcChargingPileController extends BaseController {
|
|||||||
@PostMapping(value = "/addXhpcChargingPile")
|
@PostMapping(value = "/addXhpcChargingPile")
|
||||||
public AjaxResult addXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
public AjaxResult addXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcChargingPileService.addXhpcChargingPile(xhpcChargingPile));
|
return xhpcChargingPileService.addXhpcChargingPile(xhpcChargingPile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,7 +56,7 @@ public class XhpcChargingPileController extends BaseController {
|
|||||||
@PostMapping(value = "/updateXhpcChargingPile")
|
@PostMapping(value = "/updateXhpcChargingPile")
|
||||||
public AjaxResult updateXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
public AjaxResult updateXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcChargingPileService.updateXhpcChargingPile(xhpcChargingPile));
|
return xhpcChargingPileService.updateXhpcChargingPile(xhpcChargingPile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,9 +64,28 @@ public class XhpcChargingPileController extends BaseController {
|
|||||||
* 桩详情
|
* 桩详情
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/selectXhpcChargingPile")
|
@GetMapping(value = "/selectXhpcChargingPile")
|
||||||
public AjaxResult selectXhpcChargingPile(@RequestParam(value = "chargingPileId",required = true) Long chargingPileId)
|
public AjaxResult selectXhpcChargingPile(@RequestParam(value = "chargingPileId") Long chargingPileId)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcChargingPileService.selectXhpcChargingPile(chargingPileId));
|
return xhpcChargingPileService.selectXhpcChargingPile(chargingPileId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停用
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/updateStatus")
|
||||||
|
public AjaxResult updateStatus(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||||
|
{
|
||||||
|
return xhpcChargingPileService.updateStatus(xhpcChargingPile.getChargingPileId(),xhpcChargingPile.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电站
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/{chargingPileId}")
|
||||||
|
public AjaxResult remove(@PathVariable Long chargingPileId)
|
||||||
|
{
|
||||||
|
return toAjax(xhpcChargingPileService.updateXhpcChargingPileById(chargingPileId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,24 +104,21 @@ public class XhpcChargingStationController extends BaseController {
|
|||||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/status")
|
@PostMapping("/status")
|
||||||
public AjaxResult status(@RequestParam(value = "status",required = true)Integer status,@RequestParam(value = "chargingStationId",required = true)Long chargingStationId)
|
public AjaxResult status(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||||
{
|
{
|
||||||
return toAjax(xhpcChargingStationService.status(status,chargingStationId));
|
return toAjax(xhpcChargingStationService.status(xhpcChargingStation.getStatus(),xhpcChargingStation.getChargingStationId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP端、小程序是否可见
|
* APP端、小程序是否可见
|
||||||
* @param type 0可见 1不可见
|
|
||||||
* @param clientVisible 值
|
|
||||||
* @param chargingStationId 场站id
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/clientVisible")
|
@PostMapping("/clientVisible")
|
||||||
public AjaxResult status(@RequestParam(value = "type",required = true)Integer type,@RequestParam(value = "clientVisible",required = true)String clientVisible,@RequestParam(value = "chargingStationId",required = true)Long chargingStationId)
|
public AjaxResult clientVisible(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||||
{
|
{
|
||||||
return toAjax(xhpcChargingStationService.clientVisible(type,clientVisible,chargingStationId));
|
return toAjax(xhpcChargingStationService.clientVisible(xhpcChargingStation.getType(),xhpcChargingStation.getClientVisible(),xhpcChargingStation.getChargingStationId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -222,7 +219,7 @@ public class XhpcChargingStationController extends BaseController {
|
|||||||
@PostMapping(value = "/updateXhpcTerminal")
|
@PostMapping(value = "/updateXhpcTerminal")
|
||||||
public AjaxResult updateXhpcTerminal(@RequestBody XhpcChargingStation xhpcChargingStation)
|
public AjaxResult updateXhpcTerminal(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcChargingStationService.updateXhpcTerminal(xhpcChargingStation));
|
return xhpcChargingStationService.updateXhpcTerminal(xhpcChargingStation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -232,6 +229,6 @@ public class XhpcChargingStationController extends BaseController {
|
|||||||
@PostMapping(value = "/updateXhpcRateTime")
|
@PostMapping(value = "/updateXhpcRateTime")
|
||||||
public AjaxResult updateXhpcRateTime(@RequestBody XhpcChargingStationDto xhpcChargingStationDto)
|
public AjaxResult updateXhpcRateTime(@RequestBody XhpcChargingStationDto xhpcChargingStationDto)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcChargingStationService.updateXhpcRateTime(xhpcChargingStationDto));
|
return xhpcChargingStationService.updateXhpcRateTime(xhpcChargingStationDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.xhpc.common.core.web.controller.BaseController;
|
|||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||||
import com.xhpc.charging.station.service.IXhpcTerminalService;
|
import com.xhpc.charging.station.service.IXhpcTerminalService;
|
||||||
|
import com.xhpc.common.domain.XhpcTerminal;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -46,18 +47,18 @@ public class XhpcTerminalController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/updateStatus")
|
@PostMapping(value = "/updateStatus")
|
||||||
public AjaxResult updateStatus(Long terminalId,Integer Status)
|
public AjaxResult updateStatus(@RequestBody XhpcTerminal xhpcTerminal)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcTerminalService.updateStatus(terminalId,Status));
|
return xhpcTerminalService.updateStatus(xhpcTerminal.getTerminalId(),xhpcTerminal.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/selectXhpcTerminalMessage")
|
@GetMapping(value = "/selectXhpcTerminalMessage")
|
||||||
public AjaxResult selectXhpcTerminalMessage(Long terminalId)
|
public AjaxResult selectXhpcTerminalMessage(Long terminalId)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcTerminalService.selectXhpcTerminalMessage(terminalId));
|
return xhpcTerminalService.selectXhpcTerminalMessage(terminalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,18 +66,18 @@ public class XhpcTerminalController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/updateXhpcTerminalName")
|
@PostMapping(value = "/updateXhpcTerminalName")
|
||||||
public AjaxResult updateXhpcTerminalName(Long terminalId,String name,String serialNumber)
|
public AjaxResult updateXhpcTerminalName(@RequestBody XhpcTerminal xhpcTerminal)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcTerminalService.updateXhpcTerminalName(terminalId,name,serialNumber));
|
return xhpcTerminalService.updateXhpcTerminalName(xhpcTerminal.getTerminalId(),xhpcTerminal.getName(),xhpcTerminal.getSerialNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端详情
|
* 终端详情
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/selectXhpcTerminalPileMessage")
|
@GetMapping(value = "/selectXhpcTerminalPileMessage")
|
||||||
public AjaxResult selectXhpcTerminalPileMessage(Long terminalId)
|
public AjaxResult selectXhpcTerminalPileMessage(Long terminalId)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcTerminalService.selectXhpcTerminalPileMessage(terminalId));
|
return xhpcTerminalService.selectXhpcTerminalPileMessage(terminalId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -86,7 +87,7 @@ public class XhpcTerminalController extends BaseController {
|
|||||||
@GetMapping(value = "/getWXpNumMessage")
|
@GetMapping(value = "/getWXpNumMessage")
|
||||||
public AjaxResult getWXpNumMessage(@RequestParam(value = "pNum") String pNum)
|
public AjaxResult getWXpNumMessage(@RequestParam(value = "pNum") String pNum)
|
||||||
{
|
{
|
||||||
return AjaxResult.success(xhpcTerminalService.getWXpNumMessage(pNum));
|
return xhpcTerminalService.getWXpNumMessage(pNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public interface XhpcChargingPileMapper {
|
|||||||
Map<String,Object> selectXhpcChargingStationById(Long chargingStationId);
|
Map<String,Object> selectXhpcChargingStationById(Long chargingStationId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端
|
* 查询桩
|
||||||
*
|
*
|
||||||
* @param chargingPileId 终端ID
|
* @param chargingPileId 终端ID
|
||||||
* @return 电站
|
* @return 电站
|
||||||
@ -61,4 +61,12 @@ public interface XhpcChargingPileMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String,Object>> selectXhpcTerminalList(@Param("chargingPileId") Long chargingPileId);
|
List<Map<String,Object>> selectXhpcTerminalList(@Param("chargingPileId") Long chargingPileId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除桩信息
|
||||||
|
*
|
||||||
|
* @param chargingPileId 桩ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateXhpcChargingPileById(@Param("chargingPileId")Long chargingPileId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,4 +43,18 @@ public interface IXhpcChargingPileService {
|
|||||||
*/
|
*/
|
||||||
AjaxResult selectXhpcChargingPile(Long chargingPileId);
|
AjaxResult selectXhpcChargingPile(Long chargingPileId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停用
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult updateStatus(Long chargingPileId,Integer status);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除桩信息
|
||||||
|
*
|
||||||
|
* @param chargingPileId 桩ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateXhpcChargingPileById(Long chargingPileId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,11 +9,9 @@ import com.xhpc.charging.station.mapper.XhpcTerminalMapper;
|
|||||||
import com.xhpc.common.api.PowerPileService;
|
import com.xhpc.common.api.PowerPileService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
@ -43,6 +41,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile) {
|
public AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile) {
|
||||||
|
|
||||||
Long chargingStationId = xhpcChargingPile.getChargingStationId();
|
Long chargingStationId = xhpcChargingPile.getChargingStationId();
|
||||||
@ -83,10 +82,10 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
|||||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||||
|
|
||||||
if(xhpcChargingPile.getSerialNumber() ==null){
|
if(xhpcChargingPile.getSerialNumber() ==null){
|
||||||
AjaxResult.error("桩编号不能为空");
|
return AjaxResult.error("桩编号不能为空");
|
||||||
}
|
}
|
||||||
if(xhpc.getSerialNumber() != xhpc.getSerialNumber()){
|
if(xhpc.getSerialNumber() != xhpc.getSerialNumber()){
|
||||||
AjaxResult.error("桩编号不能编辑");
|
return AjaxResult.error("桩编号不能编辑");
|
||||||
}
|
}
|
||||||
|
|
||||||
xhpcChargingPileMapper.updaeXhpcChargingPile(xhpcChargingPile);
|
xhpcChargingPileMapper.updaeXhpcChargingPile(xhpcChargingPile);
|
||||||
@ -104,4 +103,27 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
|||||||
return AjaxResult.success(map);
|
return AjaxResult.success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult updateStatus(Long chargingPileId, Integer status) {
|
||||||
|
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||||
|
xhpc.setStatus(status);
|
||||||
|
xhpcChargingPileMapper.updaeXhpcChargingPile(xhpc);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateXhpcChargingPileById(Long chargingPileId) {
|
||||||
|
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||||
|
int i = xhpcChargingPileMapper.updateXhpcChargingPileById(chargingPileId);
|
||||||
|
if (i>0) {
|
||||||
|
//删除桩
|
||||||
|
Set<String> set =new HashSet<>();
|
||||||
|
set.add(chargingPileId+"");
|
||||||
|
powerPileService.deletePileWhitelist(xhpc.getChargingStationId(),set);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="communicationOperator" column="communication_operator" />
|
<result property="communicationOperator" column="communication_operator" />
|
||||||
<result property="simCard" column="sim_card" />
|
<result property="simCard" column="sim_card" />
|
||||||
<result property="rateModelId" column="rate_model_id" />
|
<result property="rateModelId" column="rate_model_id" />
|
||||||
<result property="chargingPileNumber" column="charging_pile_number" />
|
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
@ -33,9 +32,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="brandModel" column="brand_model" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="selectXhpcChargingPileVo">
|
<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
|
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 from xhpc_charging_pile
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectXhpcChargingPileList" resultType="java.util.Map">
|
<select id="selectXhpcChargingPileList" resultType="java.util.Map">
|
||||||
select
|
select
|
||||||
@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
cp.charging_station_id as chargingStationId,
|
cp.charging_station_id as chargingStationId,
|
||||||
st.name as chargingStationName,
|
st.name as chargingStationName,
|
||||||
cp.serial_number as serialNumber,
|
cp.serial_number as serialNumber,
|
||||||
|
cp.brand_model as brandModel,
|
||||||
cp.type as type,
|
cp.type as type,
|
||||||
cp.power as power,
|
cp.power as power,
|
||||||
cp.gun_number as gunNumber,
|
cp.gun_number as gunNumber,
|
||||||
@ -126,9 +127,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="null != rateModelId ">
|
<if test="null != rateModelId ">
|
||||||
rate_model_id,
|
rate_model_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="null != chargingPileNumber ">
|
|
||||||
charging_pile_number,
|
|
||||||
</if>
|
|
||||||
<if test="null != status ">
|
<if test="null != status ">
|
||||||
status,
|
status,
|
||||||
</if>
|
</if>
|
||||||
@ -150,6 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="null != remark and '' != remark">
|
<if test="null != remark and '' != remark">
|
||||||
remark
|
remark
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != brandModel ">
|
||||||
|
brand_model
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="null != chargingStationId ">
|
<if test="null != chargingStationId ">
|
||||||
@ -209,9 +210,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="null != rateModelId ">
|
<if test="null != rateModelId ">
|
||||||
#{rateModelId},
|
#{rateModelId},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != chargingPileNumber ">
|
|
||||||
#{chargingPileNumber},
|
|
||||||
</if>
|
|
||||||
<if test="null != status ">
|
<if test="null != status ">
|
||||||
#{status},
|
#{status},
|
||||||
</if>
|
</if>
|
||||||
@ -233,6 +231,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="null != remark and '' != remark">
|
<if test="null != remark and '' != remark">
|
||||||
#{remark}
|
#{remark}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != brandModel ">
|
||||||
|
#{brandModel}
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -271,7 +272,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="communicationOperator != null">communication_operator = #{communicationOperator},</if>
|
<if test="communicationOperator != null">communication_operator = #{communicationOperator},</if>
|
||||||
<if test="simCard != null">sim_card = #{simCard},</if>
|
<if test="simCard != null">sim_card = #{simCard},</if>
|
||||||
<if test="rateModelId != null">rate_model_id = #{rateModelId},</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="status != null">status = #{status},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
@ -279,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="remark != null">remark = #{remark}</if>
|
<if test="remark != null">remark = #{remark}</if>
|
||||||
|
<if test="brandModel != null">brand_model = #{brandModel}</if>
|
||||||
</trim>
|
</trim>
|
||||||
where charging_pile_id = #{chargingPileId}
|
where charging_pile_id = #{chargingPileId}
|
||||||
</update>
|
</update>
|
||||||
@ -302,4 +303,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and te.charging_pile_id=#{chargingPileId}
|
and te.charging_pile_id=#{chargingPileId}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateXhpcChargingPileById">
|
||||||
|
update xhpc_charging_pile set del_flag =1 where charging_pile_id = #{chargingPileId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -180,6 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
ct.charging_station_id as chargingStationId,
|
ct.charging_station_id as chargingStationId,
|
||||||
ct.name as name,
|
ct.name as name,
|
||||||
ct.operator_id as operatorId,
|
ct.operator_id as operatorId,
|
||||||
|
ct.station_type as stationType,
|
||||||
op.name as operatorName,
|
op.name as operatorName,
|
||||||
ct.type as type,
|
ct.type as type,
|
||||||
ct.station_type as stationType,
|
ct.station_type as stationType,
|
||||||
@ -190,14 +191,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
ct.address as address,
|
ct.address as address,
|
||||||
ct.detailed_address as detailedAddress,
|
ct.detailed_address as detailedAddress,
|
||||||
ct.periphery_facilities as peripheryFacilities,
|
ct.periphery_facilities as peripheryFacilities,
|
||||||
ct.service_facilities as erviceFacilities,
|
ct.service_facilities as serviceFacilities,
|
||||||
ct.parking_instructions as parkingInstructions,
|
ct.parking_instructions as parkingInstructions,
|
||||||
ct.business_instructions as businessInstructions,
|
ct.business_instructions as businessInstructions,
|
||||||
ct.reminder_instructions as reminderInstructions,
|
ct.reminder_instructions as reminderInstructions,
|
||||||
ct.img_id as imgId
|
ct.img_id as imgId
|
||||||
from xhpc_charging_station as ct
|
from xhpc_charging_station as ct
|
||||||
left join xhpc_operator as op on op.operator_id = ct.operator_id
|
left join xhpc_operator as op on op.operator_id = ct.operator_id
|
||||||
where ct.charging_station_id = 4 and ct.del_flag =0
|
where ct.charging_station_id =#{chargingStationId} and ct.del_flag =0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getWXList" resultType="map">
|
<select id="getWXList" resultType="map">
|
||||||
@ -693,6 +694,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
rt.start_time as startTime,
|
rt.start_time as startTime,
|
||||||
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
||||||
rt.rate_id as rateId,
|
rt.rate_id as rateId,
|
||||||
|
rt.rate_value as rateValue,
|
||||||
ra.name as rateName
|
ra.name as rateName
|
||||||
from xhpc_rate_time as rt
|
from xhpc_rate_time as rt
|
||||||
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
||||||
@ -703,6 +705,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
rt.start_time as startTime,
|
rt.start_time as startTime,
|
||||||
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
||||||
rt.rate_id as rateId,
|
rt.rate_id as rateId,
|
||||||
|
rt.rate_value as rateValue,
|
||||||
ra.name as rateName
|
ra.name as rateName
|
||||||
from xhpc_rate_time as rt
|
from xhpc_rate_time as rt
|
||||||
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
||||||
|
|||||||
@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="null != pileSerialNumber ">
|
<if test="null != pileSerialNumber ">
|
||||||
pile_serial_number,
|
pile_serial_number,
|
||||||
</if>
|
</if>
|
||||||
<if test="null != gunstatus ">
|
<if test="null != gunStatus ">
|
||||||
gun_status,
|
gun_status,
|
||||||
</if>
|
</if>
|
||||||
<if test="null != workStatus ">
|
<if test="null != workStatus ">
|
||||||
@ -156,8 +156,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="null != pileSerialNumber ">
|
<if test="null != pileSerialNumber ">
|
||||||
#{pileSerialNumber},
|
#{pileSerialNumber},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != gunstatus ">
|
<if test="null != gunStatus ">
|
||||||
#{gunstatus},
|
#{gunStatus},
|
||||||
</if>
|
</if>
|
||||||
<if test="null != workStatus ">
|
<if test="null != workStatus ">
|
||||||
#{workStatus},
|
#{workStatus},
|
||||||
@ -190,7 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectXhpcTerminalPileMessage" resultType="map">
|
<select id="selectXhpcTerminalPileMessage" resultType="map">
|
||||||
select
|
select
|
||||||
ter.terminal_id as terminalId,
|
ter.terminal_id as terminalId,
|
||||||
ter.charging_station_id as ter.chargingStationId,
|
ter.charging_station_id as chargingStationId,
|
||||||
ter.name as name,
|
ter.name as name,
|
||||||
ter.serial_number as serialNumber,
|
ter.serial_number as serialNumber,
|
||||||
ter.gun_status as gunStatus,
|
ter.gun_status as gunStatus,
|
||||||
@ -222,6 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
rt.start_time as startTime,
|
rt.start_time as startTime,
|
||||||
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
||||||
rt.rate_id as rateId,
|
rt.rate_id as rateId,
|
||||||
|
rate_value as rateValue,
|
||||||
ra.name as rateName
|
ra.name as rateName
|
||||||
from xhpc_rate_time as rt
|
from xhpc_rate_time as rt
|
||||||
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
||||||
@ -242,7 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="getXhpcRateTimeOrderStatistics" resultType="map">
|
<select id="getXhpcRateTimeOrderStatistics" resultType="map">
|
||||||
select
|
select
|
||||||
sum(charging_degree) as chargingDegreeSum,
|
IFNULL(sum(charging_degree),'0') AS chargingDegreeSum,
|
||||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
||||||
COUNT(DISTINCT user_id) as userIdCount
|
COUNT(DISTINCT user_id) as userIdCount
|
||||||
from xhpc_real_time_order
|
from xhpc_real_time_order
|
||||||
|
|||||||
@ -13,10 +13,12 @@ public class XhpcChargingPile extends BaseEntity {
|
|||||||
|
|
||||||
/** 电桩id */
|
/** 电桩id */
|
||||||
private Long chargingPileId;
|
private Long chargingPileId;
|
||||||
/** 电站id */
|
/** 场站id */
|
||||||
private Long chargingStationId;
|
private Long chargingStationId;
|
||||||
/** 名称 */
|
/** 名称 */
|
||||||
private String name;
|
private String name;
|
||||||
|
/** 品牌型号 */
|
||||||
|
private String brandModel;
|
||||||
/** 国标 */
|
/** 国标 */
|
||||||
private String nationalStandard;
|
private String nationalStandard;
|
||||||
/** 功率 */
|
/** 功率 */
|
||||||
@ -50,13 +52,11 @@ public class XhpcChargingPile extends BaseEntity {
|
|||||||
/** Sim卡 */
|
/** Sim卡 */
|
||||||
private String simCard;
|
private String simCard;
|
||||||
/** 状态(0正常 1停用) */
|
/** 状态(0正常 1停用) */
|
||||||
private String status;
|
private Integer status;
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
/** 计费模型id */
|
/** 计费模型id */
|
||||||
private Long rateModelId;
|
private Long rateModelId;
|
||||||
/** 桩编码 */
|
|
||||||
private String chargingPileNumber;
|
|
||||||
|
|
||||||
public Long getChargingPileId() {
|
public Long getChargingPileId() {
|
||||||
|
|
||||||
@ -248,12 +248,12 @@ public class XhpcChargingPile extends BaseEntity {
|
|||||||
this.simCard = simCard;
|
this.simCard = simCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus() {
|
public Integer getStatus() {
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(String status) {
|
public void setStatus(Integer status) {
|
||||||
|
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
@ -278,14 +278,14 @@ public class XhpcChargingPile extends BaseEntity {
|
|||||||
this.rateModelId = rateModelId;
|
this.rateModelId = rateModelId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getChargingPileNumber() {
|
public String getBrandModel() {
|
||||||
|
|
||||||
return chargingPileNumber;
|
return brandModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChargingPileNumber(String chargingPileNumber) {
|
public void setBrandModel(String brandModel) {
|
||||||
|
|
||||||
this.chargingPileNumber = chargingPileNumber;
|
this.brandModel = brandModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user