修改终端详情接口,优化代码格式
This commit is contained in:
parent
87f36b78fd
commit
1bccc67846
@ -25,67 +25,73 @@ public class XhpcChargingPileController extends BaseController {
|
||||
|
||||
/**
|
||||
* 桩列表
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
*
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
* @return
|
||||
*/
|
||||
//@PreAuthorize(hasPermi = "system:station:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(String name, Integer type,String serialNumber,Long chargingStationId)
|
||||
{
|
||||
public TableDataInfo list(String name, Integer type, String serialNumber, Long chargingStationId) {
|
||||
|
||||
startPage();
|
||||
List<Map<String,Object>> list = xhpcChargingPileService.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId);
|
||||
List<Map<String, Object>> list = xhpcChargingPileService.selectXhpcChargingPileList(name, type, serialNumber, chargingStationId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增桩
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addXhpcChargingPile")
|
||||
public AjaxResult addXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||
{
|
||||
public AjaxResult addXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile) {
|
||||
|
||||
return xhpcChargingPileService.addXhpcChargingPile(xhpcChargingPile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑桩
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateXhpcChargingPile")
|
||||
public AjaxResult updateXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||
{
|
||||
public AjaxResult updateXhpcChargingPile(@RequestBody XhpcChargingPile xhpcChargingPile) {
|
||||
|
||||
return xhpcChargingPileService.updateXhpcChargingPile(xhpcChargingPile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 桩详情
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/selectXhpcChargingPile")
|
||||
public AjaxResult selectXhpcChargingPile(@RequestParam(value = "chargingPileId") Long chargingPileId)
|
||||
{
|
||||
public AjaxResult selectXhpcChargingPile(@RequestParam(value = "chargingPileId") Long chargingPileId) {
|
||||
|
||||
return xhpcChargingPileService.selectXhpcChargingPile(chargingPileId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateStatus")
|
||||
public AjaxResult updateStatus(@RequestBody XhpcChargingPile xhpcChargingPile)
|
||||
{
|
||||
return xhpcChargingPileService.updateStatus(xhpcChargingPile.getChargingPileId(),xhpcChargingPile.getStatus());
|
||||
public AjaxResult updateStatus(@RequestBody XhpcChargingPile xhpcChargingPile) {
|
||||
|
||||
return xhpcChargingPileService.updateStatus(xhpcChargingPile.getChargingPileId(), xhpcChargingPile.getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电站
|
||||
*/
|
||||
@DeleteMapping("/{chargingPileId}")
|
||||
public AjaxResult remove(@PathVariable Long chargingPileId)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long chargingPileId) {
|
||||
|
||||
return toAjax(xhpcChargingPileService.updateXhpcChargingPileById(chargingPileId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -35,10 +35,10 @@ public class XhpcChargingStationController extends BaseController {
|
||||
*/
|
||||
//@PreAuthorize(hasPermi = "system:station:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(String name,String operatorName)
|
||||
{
|
||||
public TableDataInfo list(String name, String operatorName) {
|
||||
|
||||
startPage();
|
||||
List<Map<String,Object>> list = xhpcChargingStationService.selectXhpcChargingStationList(name,operatorName);
|
||||
List<Map<String, Object>> list = xhpcChargingStationService.selectXhpcChargingStationList(name, operatorName);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -48,8 +48,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
@PreAuthorize(hasPermi = "system:station:export")
|
||||
@Log(title = "电站", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XhpcChargingStation xhpcChargingStation) throws IOException
|
||||
{
|
||||
public void export(HttpServletResponse response, XhpcChargingStation xhpcChargingStation) throws IOException {
|
||||
//List<XhpcChargingStation> list = xhpcChargingStationService.selectXhpcChargingStationList(xhpcChargingStation);
|
||||
//ExcelUtil<XhpcChargingStation> util = new ExcelUtil<XhpcChargingStation>(XhpcChargingStation.class);
|
||||
//util.exportExcel(response, list, "电站数据");
|
||||
@ -60,8 +59,8 @@ public class XhpcChargingStationController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize(hasPermi = "system:station:query")
|
||||
@GetMapping(value = "/{chargingStationId}")
|
||||
public AjaxResult getInfo(@PathVariable("chargingStationId") Long chargingStationId)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("chargingStationId") Long chargingStationId) {
|
||||
|
||||
return AjaxResult.success(xhpcChargingStationService.selectXhpcChargingStationById(chargingStationId));
|
||||
}
|
||||
|
||||
@ -71,8 +70,8 @@ public class XhpcChargingStationController extends BaseController {
|
||||
@PreAuthorize(hasPermi = "system:station:add")
|
||||
@Log(title = "电站", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||
{
|
||||
public AjaxResult add(@RequestBody XhpcChargingStation xhpcChargingStation) {
|
||||
|
||||
return toAjax(xhpcChargingStationService.insertXhpcChargingStation(xhpcChargingStation));
|
||||
}
|
||||
|
||||
@ -82,8 +81,8 @@ public class XhpcChargingStationController extends BaseController {
|
||||
@PreAuthorize(hasPermi = "system:station:edit")
|
||||
@Log(title = "电站", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody XhpcChargingStation xhpcChargingStation) {
|
||||
|
||||
return toAjax(xhpcChargingStationService.updateXhpcChargingStation(xhpcChargingStation));
|
||||
}
|
||||
|
||||
@ -93,8 +92,8 @@ public class XhpcChargingStationController extends BaseController {
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{chargingStationIds}")
|
||||
public AjaxResult remove(@PathVariable Long chargingStationIds)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long chargingStationIds) {
|
||||
|
||||
return toAjax(xhpcChargingStationService.updateXhpcChargingStationById(chargingStationIds));
|
||||
}
|
||||
|
||||
@ -104,21 +103,22 @@ public class XhpcChargingStationController extends BaseController {
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||
{
|
||||
return toAjax(xhpcChargingStationService.status(xhpcChargingStation.getStatus(),xhpcChargingStation.getChargingStationId()));
|
||||
public AjaxResult status(@RequestBody XhpcChargingStation xhpcChargingStation) {
|
||||
|
||||
return toAjax(xhpcChargingStationService.status(xhpcChargingStation.getStatus(), xhpcChargingStation.getChargingStationId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* APP端、小程序是否可见
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/clientVisible")
|
||||
public AjaxResult clientVisible(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||
{
|
||||
return toAjax(xhpcChargingStationService.clientVisible(xhpcChargingStation.getType(),xhpcChargingStation.getClientVisible(),xhpcChargingStation.getChargingStationId()));
|
||||
public AjaxResult clientVisible(@RequestBody XhpcChargingStation xhpcChargingStation) {
|
||||
|
||||
return toAjax(xhpcChargingStationService.clientVisible(xhpcChargingStation.getType(), xhpcChargingStation.getClientVisible(), xhpcChargingStation.getChargingStationId()));
|
||||
}
|
||||
|
||||
|
||||
@ -128,107 +128,116 @@ public class XhpcChargingStationController extends BaseController {
|
||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||
@GetMapping(value = "/stationInternetBlackList")
|
||||
public AjaxResult stationInternetBlackList(@RequestParam(value = "chargingStationId",required = true) Long chargingStationId)
|
||||
{
|
||||
public AjaxResult stationInternetBlackList(@RequestParam(value = "chargingStationId", required = true) Long chargingStationId) {
|
||||
|
||||
return AjaxResult.success(xhpcChargingStationService.stationInternetBlackList(chargingStationId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加场点
|
||||
*
|
||||
* @param xhpcChargingStationDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addXhpcChargingStation")
|
||||
public AjaxResult addXhpcChargingStation(@RequestBody XhpcChargingStationDto xhpcChargingStationDto)
|
||||
{
|
||||
public AjaxResult addXhpcChargingStation(@RequestBody XhpcChargingStationDto xhpcChargingStationDto) {
|
||||
|
||||
return xhpcChargingStationService.addXhpcChargingStation(xhpcChargingStationDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 场站详情接口
|
||||
*
|
||||
* @param chargingStationId
|
||||
* @param type 1编辑使用 2详情使用
|
||||
* @param type 1编辑使用 2详情使用
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getXhpcChargingStationMessage")
|
||||
public AjaxResult getXhpcChargingStationMessage(Long chargingStationId,Integer type)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getXhpcChargingStationMessage(chargingStationId,type));
|
||||
public AjaxResult getXhpcChargingStationMessage(Long chargingStationId, Integer type) {
|
||||
|
||||
return AjaxResult.success(xhpcChargingStationService.getXhpcChargingStationMessage(chargingStationId, type));
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序电站列表
|
||||
* @param name 电站名称
|
||||
* @param serviceFacilities 标签(服务设施)
|
||||
* @param code 城市id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
*
|
||||
* @param name 电站名称
|
||||
* @param serviceFacilities 标签(服务设施)
|
||||
* @param code 城市id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
* @return
|
||||
*/
|
||||
//@PreAuthorize(hasPermi = "system:station:list")
|
||||
@GetMapping("/getWXList")
|
||||
public TableDataInfo getWXList(String name,String serviceFacilities,Integer code,String longitude,String latitude)
|
||||
{
|
||||
public TableDataInfo getWXList(String name, String serviceFacilities, Integer code, String longitude, String latitude) {
|
||||
|
||||
startPage();
|
||||
List<Map<String,Object>> list = xhpcChargingStationService.getWXList(name,serviceFacilities,code,longitude,latitude);
|
||||
List<Map<String, Object>> list = xhpcChargingStationService.getWXList(name, serviceFacilities, code, longitude, latitude);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情+站点详情
|
||||
* @param chargingStationId 站点id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
*
|
||||
* @param chargingStationId 站点id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcChargingStationMessage")
|
||||
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));
|
||||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 电站详情---价格详情
|
||||
* @param chargingStationId 站点id
|
||||
*
|
||||
* @param chargingStationId 站点id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcRateTimeMassage")
|
||||
public AjaxResult getXhpcRateTimeMassage(@RequestParam(value = "chargingStationId",required = true) Long chargingStationId)
|
||||
{
|
||||
public AjaxResult getXhpcRateTimeMassage(@RequestParam(value = "chargingStationId", required = true) Long chargingStationId) {
|
||||
|
||||
return AjaxResult.success(xhpcChargingStationService.getWXXhpcRateTimeMassage(chargingStationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 电站详情---终端列表
|
||||
* @param chargingStationId 站点id
|
||||
*
|
||||
* @param chargingStationId 站点id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getWXXhpcTerminalMassage")
|
||||
public AjaxResult getWXXhpcTerminalMassage(@RequestParam(value = "chargingStationId",required = true) Long chargingStationId)
|
||||
{
|
||||
public AjaxResult getWXXhpcTerminalMassage(@RequestParam(value = "chargingStationId", required = true) Long chargingStationId) {
|
||||
|
||||
return AjaxResult.success(xhpcChargingStationService.getWXXhpcTerminalMassage(chargingStationId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑电站(基本信息)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateXhpcTerminal")
|
||||
public AjaxResult updateXhpcTerminal(@RequestBody XhpcChargingStation xhpcChargingStation)
|
||||
{
|
||||
public AjaxResult updateXhpcTerminal(@RequestBody XhpcChargingStation xhpcChargingStation) {
|
||||
|
||||
return xhpcChargingStationService.updateXhpcTerminal(xhpcChargingStation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑费率
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateXhpcRateTime")
|
||||
public AjaxResult updateXhpcRateTime(@RequestBody XhpcChargingStationDto xhpcChargingStationDto)
|
||||
{
|
||||
public AjaxResult updateXhpcRateTime(@RequestBody XhpcChargingStationDto xhpcChargingStationDto) {
|
||||
|
||||
return xhpcChargingStationService.updateXhpcRateTime(xhpcChargingStationDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,58 +25,61 @@ public class XhpcTerminalController extends BaseController {
|
||||
|
||||
/**
|
||||
* 终端列表
|
||||
* @param serialNumber 终端编号
|
||||
* @param type 桩类型
|
||||
* @param status 0启用 1停用
|
||||
* @param workStatus 0离线 1故障 2空闲 3充电
|
||||
*
|
||||
* @param serialNumber 终端编号
|
||||
* @param type 桩类型
|
||||
* @param status 0启用 1停用
|
||||
* @param workStatus 0离线 1故障 2空闲 3充电
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
//@PreAuthorize(hasPermi = "system:station:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(String serialNumber, Integer type,Integer status,String workStatus, Long chargingStationId)
|
||||
{
|
||||
public TableDataInfo list(String serialNumber, Integer type, Integer status, String workStatus, Long chargingStationId) {
|
||||
|
||||
startPage();
|
||||
List<Map<String,Object>> list = xhpcTerminalService.getXhpcTerminalList(serialNumber,type,status,workStatus,chargingStationId);
|
||||
List<Map<String, Object>> list = xhpcTerminalService.getXhpcTerminalList(serialNumber, type, status, workStatus, chargingStationId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateStatus")
|
||||
public AjaxResult updateStatus(@RequestBody XhpcTerminal xhpcTerminal)
|
||||
{
|
||||
return xhpcTerminalService.updateStatus(xhpcTerminal.getTerminalId(),xhpcTerminal.getStatus());
|
||||
public AjaxResult updateStatus(@RequestBody XhpcTerminal xhpcTerminal) {
|
||||
|
||||
return xhpcTerminalService.updateStatus(xhpcTerminal.getTerminalId(), xhpcTerminal.getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@GetMapping(value = "/selectXhpcTerminalMessage")
|
||||
public AjaxResult selectXhpcTerminalMessage(Long terminalId)
|
||||
{
|
||||
public AjaxResult selectXhpcTerminalMessage(Long terminalId) {
|
||||
|
||||
return xhpcTerminalService.selectXhpcTerminalMessage(terminalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateXhpcTerminalName")
|
||||
public AjaxResult updateXhpcTerminalName(@RequestBody XhpcTerminal xhpcTerminal)
|
||||
{
|
||||
return xhpcTerminalService.updateXhpcTerminalName(xhpcTerminal.getTerminalId(),xhpcTerminal.getName(),xhpcTerminal.getSerialNumber());
|
||||
public AjaxResult updateXhpcTerminalName(@RequestBody XhpcTerminal xhpcTerminal) {
|
||||
|
||||
return xhpcTerminalService.updateXhpcTerminalName(xhpcTerminal.getTerminalId(), xhpcTerminal.getName(), xhpcTerminal.getSerialNumber());
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端详情
|
||||
*/
|
||||
@GetMapping(value = "/selectXhpcTerminalPileMessage")
|
||||
public AjaxResult selectXhpcTerminalPileMessage(Long terminalId)
|
||||
{
|
||||
public AjaxResult selectXhpcTerminalPileMessage(Long terminalId) {
|
||||
|
||||
return xhpcTerminalService.selectXhpcTerminalPileMessage(terminalId);
|
||||
}
|
||||
|
||||
@ -85,8 +88,8 @@ public class XhpcTerminalController extends BaseController {
|
||||
* 通过终端编号进入小程序开始充电页面
|
||||
*/
|
||||
@GetMapping(value = "/getWXpNumMessage")
|
||||
public AjaxResult getWXpNumMessage(@RequestParam(value = "pNum") String pNum)
|
||||
{
|
||||
public AjaxResult getWXpNumMessage(@RequestParam(value = "pNum") String pNum) {
|
||||
|
||||
return xhpcTerminalService.getWXpNumMessage(pNum);
|
||||
}
|
||||
|
||||
|
||||
@ -15,12 +15,13 @@ public interface XhpcChargingPileMapper {
|
||||
|
||||
/**
|
||||
* 桩列表
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
*
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> selectXhpcChargingPileList(@Param("name") String name, @Param("type")Integer type,@Param("serialNumber") String serialNumber,@Param("chargingStationId")Long chargingStationId);
|
||||
List<Map<String, Object>> selectXhpcChargingPileList(@Param("name") String name, @Param("type") Integer type, @Param("serialNumber") String serialNumber, @Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 终端
|
||||
@ -37,7 +38,7 @@ public interface XhpcChargingPileMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
Map<String,Object> selectXhpcChargingStationById(Long chargingStationId);
|
||||
Map<String, Object> selectXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 查询桩
|
||||
@ -57,10 +58,11 @@ public interface XhpcChargingPileMapper {
|
||||
|
||||
/**
|
||||
* 终端列表
|
||||
* @param chargingPileId 桩id
|
||||
*
|
||||
* @param chargingPileId 桩id
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> selectXhpcTerminalList(@Param("chargingPileId") Long chargingPileId);
|
||||
List<Map<String, Object>> selectXhpcTerminalList(@Param("chargingPileId") Long chargingPileId);
|
||||
|
||||
/**
|
||||
* 删除桩信息
|
||||
@ -68,20 +70,22 @@ public interface XhpcChargingPileMapper {
|
||||
* @param chargingPileId 桩ID
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingPileById(@Param("chargingPileId")Long chargingPileId);
|
||||
int updateXhpcChargingPileById(@Param("chargingPileId") Long chargingPileId);
|
||||
|
||||
/**
|
||||
* 判断
|
||||
*
|
||||
* @param serialNumber
|
||||
* @return
|
||||
*/
|
||||
int getXhpcChargingPileSerialNumberCount(@Param("serialNumber")String serialNumber);
|
||||
int getXhpcChargingPileSerialNumberCount(@Param("serialNumber") String serialNumber);
|
||||
|
||||
/**
|
||||
* 删除终端
|
||||
*
|
||||
* @param chargingPileId
|
||||
* @return
|
||||
*/
|
||||
int updateXhpcTerminal(@Param("chargingPileId")Long chargingPileId);
|
||||
int updateXhpcTerminal(@Param("chargingPileId") Long chargingPileId);
|
||||
|
||||
}
|
||||
|
||||
@ -25,15 +25,16 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
|
||||
XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 查询电站列表
|
||||
* @param name 电站名称
|
||||
*
|
||||
* @param name 电站名称
|
||||
* @param operatorName 运营商名称
|
||||
* @return 电站集合
|
||||
*/
|
||||
List<Map<String,Object>> selectXhpcChargingStationList(@Param("name")String name, @Param("operatorName")String operatorName);
|
||||
List<Map<String, Object>> selectXhpcChargingStationList(@Param("name") String name, @Param("operatorName") String operatorName);
|
||||
|
||||
/**
|
||||
* 新增电站
|
||||
@ -41,7 +42,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 结果
|
||||
*/
|
||||
int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 修改电站
|
||||
@ -49,7 +50,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 删除电站
|
||||
@ -57,7 +58,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingStationById(Long chargingStationId);
|
||||
int updateXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 批量删除电站
|
||||
@ -65,7 +66,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingStationByIds(Long[] chargingStationIds);
|
||||
int updateXhpcChargingStationByIds(Long[] chargingStationIds);
|
||||
|
||||
/**
|
||||
* 状态(0启用 1停用)
|
||||
@ -73,17 +74,17 @@ public interface XhpcChargingStationMapper {
|
||||
* @param status 0启用 1停用
|
||||
* @return 结果
|
||||
*/
|
||||
void status(@Param("status") Integer status,@Param("chargingStationId")Long chargingStationId);
|
||||
void status(@Param("status") Integer status, @Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* APP端、小程序是否可见
|
||||
*
|
||||
* @param clientVisible app可见值
|
||||
* @param clientVisible app可见值
|
||||
* @param chargingStationId 场站id
|
||||
* @return 结果
|
||||
*/
|
||||
void clientVisible(@Param("clientVisible") String clientVisible,@Param("chargingStationId")Long chargingStationId);
|
||||
void clientVisible(@Param("clientVisible") String clientVisible, @Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 合作的电站
|
||||
@ -91,7 +92,7 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> stationInternetBlackList(Long chargingStationId);
|
||||
List<Map<String, Object>> stationInternetBlackList(Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
@ -100,30 +101,31 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
Map<String,Object> getXhpcChargingStationMessage(@Param("chargingStationId")Long chargingStationId);
|
||||
Map<String, Object> getXhpcChargingStationMessage(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 微信小程序电站列表
|
||||
* @param name 电站名称
|
||||
* @param serviceFacilities 标签集合(服务设施)
|
||||
* @param code 城市id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
* @param clientVisible 微信小程序是否可见 2可见
|
||||
*
|
||||
* @param name 电站名称
|
||||
* @param serviceFacilities 标签集合(服务设施)
|
||||
* @param code 城市id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
* @param clientVisible 微信小程序是否可见 2可见
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getWXList(@Param("name") String name,@Param("serviceFacilities")List<String> serviceFacilities,@Param("code")Integer code,@Param("longitude")String longitude,@Param("latitude")String latitude,@Param("clientVisible")Integer clientVisible);
|
||||
List<Map<String, Object>> getWXList(@Param("name") String name, @Param("serviceFacilities") List<String> serviceFacilities, @Param("code") Integer code, @Param("longitude") String longitude, @Param("latitude") String latitude, @Param("clientVisible") Integer clientVisible);
|
||||
|
||||
|
||||
/**
|
||||
* 根据code获取数据
|
||||
*
|
||||
* @param code 字典code
|
||||
* @param code 字典code
|
||||
* @param serviceFacilities 筛选条件
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getCode(@Param("code")String code,@Param("serviceFacilities")List<String> serviceFacilities);
|
||||
List<Map<String, Object>> getCode(@Param("code") String code, @Param("serviceFacilities") List<String> serviceFacilities);
|
||||
|
||||
/**
|
||||
* 电站详情(站点详情)
|
||||
@ -131,31 +133,34 @@ public interface XhpcChargingStationMapper {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
Map<String,Object> getWXXhpcChargingStationMessage(@Param("chargingStationId")Long chargingStationId,@Param("longitude")String longitude,@Param("latitude")String latitude);
|
||||
Map<String, Object> getWXXhpcChargingStationMessage(@Param("chargingStationId") Long chargingStationId, @Param("longitude") String longitude, @Param("latitude") String latitude);
|
||||
|
||||
|
||||
/**
|
||||
* 获取图片信息
|
||||
*
|
||||
* @param imgIds
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getImageList(@Param("imgIds")List<String> imgIds);
|
||||
List<Map<String, Object>> getImageList(@Param("imgIds") List<String> imgIds);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---价格详情
|
||||
*
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getWXXhpcRateTimeMassage(@Param("chargingStationId")Long chargingStationId);
|
||||
List<Map<String, Object>> getWXXhpcRateTimeMassage(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---终端列表
|
||||
*
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getWXXhpcTerminalMassage(@Param("chargingStationId")Long chargingStationId);
|
||||
List<Map<String, Object>> getWXXhpcTerminalMassage(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
@ -183,46 +188,50 @@ public interface XhpcChargingStationMapper {
|
||||
/**
|
||||
* 返回费率
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateList(@Param("chargingStationId")Long chargingStationId);
|
||||
List<Map<String, Object>> getXhpcRateList(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 返回费率时段(设置时段)
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateTimeTypeList(@Param("chargingStationId")Long chargingStationId,@Param("type")Integer type);
|
||||
List<Map<String, Object>> getXhpcRateTimeTypeList(@Param("chargingStationId") Long chargingStationId, @Param("type") Integer type);
|
||||
|
||||
|
||||
/**
|
||||
* 今日充电量、今日充电用户、今日充电次数
|
||||
*/
|
||||
Map<String,Object> getXhpcRateTimeOrderStatistics(@Param("chargingStationId")Long chargingStationId);
|
||||
Map<String, Object> getXhpcRateTimeOrderStatistics(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 删除之前的费率
|
||||
*
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
int updateXhpcRate(@Param("chargingStationId")Long chargingStationId);
|
||||
int updateXhpcRate(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 删除之前的费率时段
|
||||
*
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
int updateXhpcRateTime(@Param("chargingStationId")Long chargingStationId);
|
||||
int updateXhpcRateTime(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 根据场站id获取桩编号
|
||||
*
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
Set<String> getXchargingPileList(@Param("chargingStationId")Long chargingStationId);
|
||||
Set<String> getXchargingPileList(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 按照没30分钟为一段进行分组
|
||||
*
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateTimeNumber(@Param("chargingStationId")Long chargingStationId);
|
||||
List<Map<String, Object>> getXhpcRateTimeNumber(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
}
|
||||
|
||||
@ -9,27 +9,29 @@ public interface XhpcRateTimeMapper {
|
||||
|
||||
/**
|
||||
* 判断本时间段的电费
|
||||
* @param date 本地时间(时分秒)
|
||||
* @param datchargingStationId 电站id
|
||||
*
|
||||
* @param date 本地时间(时分秒)
|
||||
* @param datchargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getXhpcRateTime(@Param("date")String date,@Param("datchargingStationId")Long datchargingStationId);
|
||||
Map<String, Object> getXhpcRateTime(@Param("date") String date, @Param("datchargingStationId") Long datchargingStationId);
|
||||
|
||||
/**
|
||||
* 获取在这个时间段的费率
|
||||
* @param datchargingStationId 电站id
|
||||
*
|
||||
* @param datchargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getXhpcTimeType(@Param("datchargingStationId")Long datchargingStationId,@Param("rateId")Long rateId);
|
||||
Map<String, Object> getXhpcTimeType(@Param("datchargingStationId") Long datchargingStationId, @Param("rateId") Long rateId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取剩余时间费率
|
||||
* @param datchargingStationId 电站id
|
||||
*
|
||||
* @param datchargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getXhpcRateTimeType(@Param("datchargingStationId")Long datchargingStationId);
|
||||
|
||||
Map<String, Object> getXhpcRateTimeType(@Param("datchargingStationId") Long datchargingStationId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -19,21 +19,23 @@ public interface XhpcTerminalMapper {
|
||||
|
||||
/**
|
||||
* PC端页面统计
|
||||
*
|
||||
* @param chargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> countXhpcTerminalWorkStatus(Long chargingStationId);
|
||||
Map<String, Object> countXhpcTerminalWorkStatus(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 终端列表
|
||||
* @param serialNumber 终端编号
|
||||
* @param type 桩类型
|
||||
* @param status 0启用 1停用
|
||||
* @param workStatus 0离线 1故障 2空闲 3充电
|
||||
*
|
||||
* @param serialNumber 终端编号
|
||||
* @param type 桩类型
|
||||
* @param status 0启用 1停用
|
||||
* @param workStatus 0离线 1故障 2空闲 3充电
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getXhpcTerminalList(@Param("serialNumber") String serialNumber,@Param("type") Integer type,@Param("status") Integer status, @Param("workStatus")String workStatus,@Param("chargingStationId") Long chargingStationId);
|
||||
List<Map<String, Object>> getXhpcTerminalList(@Param("serialNumber") String serialNumber, @Param("type") Integer type, @Param("status") Integer status, @Param("workStatus") String workStatus, @Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
@ -60,33 +62,37 @@ public interface XhpcTerminalMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
int addXhpcTerminal(XhpcTerminal xhpcTerminal);
|
||||
|
||||
/**
|
||||
* 终端详情
|
||||
*/
|
||||
Map<String,Object> selectXhpcTerminalPileMessage(Long terminalId);
|
||||
Map<String, Object> selectXhpcTerminalPileMessage(Long terminalId);
|
||||
|
||||
/**
|
||||
* 返回费率时段(设置时段)
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateTimeTypeList(@Param("chargingStationId")Long chargingStationId,@Param("type")Integer type);
|
||||
List<Map<String, Object>> getXhpcRateTimeTypeList(@Param("chargingStationId") Long chargingStationId, @Param("type") Integer type);
|
||||
|
||||
/**
|
||||
* 今日充电量、今日充电用户、今日充电次数
|
||||
*/
|
||||
Map<String,Object> getXhpcRateTimeOrderStatistics(@Param("chargingStationId")Long chargingStationId,@Param("gunNumber")String gunNumber);
|
||||
Map<String, Object> getXhpcRateTimeOrderStatistics(@Param("chargingStationId") Long chargingStationId, @Param("gunNumber") String gunNumber);
|
||||
|
||||
/**
|
||||
* 通过终端编号进入小程序开始充电页面
|
||||
* @param pNum 终端编号
|
||||
*
|
||||
* @param pNum 终端编号
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getWXpNumMessage(@Param("pNum")String pNum);
|
||||
Map<String, Object> getWXpNumMessage(@Param("pNum") String pNum);
|
||||
|
||||
|
||||
/**
|
||||
* 获取图片信息
|
||||
*
|
||||
* @param imgIds
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getImageList(@Param("imgIds")List<String> imgIds);
|
||||
List<Map<String, Object>> getImageList(@Param("imgIds") List<String> imgIds);
|
||||
|
||||
}
|
||||
|
||||
@ -14,16 +14,18 @@ public interface IXhpcChargingPileService {
|
||||
|
||||
/**
|
||||
* 桩列表
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
*
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> selectXhpcChargingPileList(String name, Integer type, String serialNumber,Long chargingStationId);
|
||||
List<Map<String, Object>> selectXhpcChargingPileList(String name, Integer type, String serialNumber, Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 添加桩
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ -31,6 +33,7 @@ public interface IXhpcChargingPileService {
|
||||
|
||||
/**
|
||||
* 编辑桩
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ -38,6 +41,7 @@ public interface IXhpcChargingPileService {
|
||||
|
||||
/**
|
||||
* 桩详情
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ -45,9 +49,10 @@ public interface IXhpcChargingPileService {
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateStatus(Long chargingPileId,Integer status);
|
||||
AjaxResult updateStatus(Long chargingPileId, Integer status);
|
||||
|
||||
|
||||
/**
|
||||
@ -57,4 +62,5 @@ public interface IXhpcChargingPileService {
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingPileById(Long chargingPileId);
|
||||
|
||||
}
|
||||
|
||||
@ -21,16 +21,16 @@ public interface IXhpcChargingStationService {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
|
||||
XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 查询电站列表
|
||||
*
|
||||
* @param name 电站名称
|
||||
* @param name 电站名称
|
||||
* @param operatorName 运营商名称
|
||||
* @return 电站集合
|
||||
*/
|
||||
List<Map<String,Object>> selectXhpcChargingStationList(String name,String operatorName);
|
||||
List<Map<String, Object>> selectXhpcChargingStationList(String name, String operatorName);
|
||||
|
||||
/**
|
||||
* 新增电站
|
||||
@ -38,7 +38,7 @@ public interface IXhpcChargingStationService {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 结果
|
||||
*/
|
||||
int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 修改电站
|
||||
@ -46,7 +46,7 @@ public interface IXhpcChargingStationService {
|
||||
* @param xhpcChargingStation 电站
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation);
|
||||
|
||||
/**
|
||||
* 批量删除电站
|
||||
@ -54,7 +54,7 @@ public interface IXhpcChargingStationService {
|
||||
* @param chargingStationIds 需要删除的电站ID
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingStationByIds(Long[] chargingStationIds);
|
||||
int updateXhpcChargingStationByIds(Long[] chargingStationIds);
|
||||
|
||||
/**
|
||||
* 删除电站信息
|
||||
@ -62,26 +62,26 @@ public interface IXhpcChargingStationService {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcChargingStationById(Long chargingStationId);
|
||||
int updateXhpcChargingStationById(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 状态(0启用 1停用)
|
||||
*
|
||||
* @param status 0启用 1停用
|
||||
* @param status 0启用 1停用
|
||||
* @param chargingStationId 场站id
|
||||
* @return 结果
|
||||
*/
|
||||
int status(Integer status,Long chargingStationId);
|
||||
int status(Integer status, Long chargingStationId);
|
||||
|
||||
/**
|
||||
* APP端、小程序是否可见
|
||||
*
|
||||
* @param type 0可见 1不可见
|
||||
* @param clientVisible 值
|
||||
* @param type 0可见 1不可见
|
||||
* @param clientVisible 值
|
||||
* @param chargingStationId 场站id
|
||||
* @return 结果
|
||||
*/
|
||||
int clientVisible(Integer type,String clientVisible,Long chargingStationId);
|
||||
int clientVisible(Integer type, String clientVisible, Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 合作的电站
|
||||
@ -89,10 +89,11 @@ public interface IXhpcChargingStationService {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
public List<Map<String,Object>> stationInternetBlackList(Long chargingStationId);
|
||||
public List<Map<String, Object>> stationInternetBlackList(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 添加场点
|
||||
*
|
||||
* @param xhpcChargingStationDto
|
||||
* @return
|
||||
*/
|
||||
@ -105,18 +106,19 @@ public interface IXhpcChargingStationService {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
Map<String,Object> getXhpcChargingStationMessage(Long chargingStationId,Integer type);
|
||||
Map<String, Object> getXhpcChargingStationMessage(Long chargingStationId, Integer type);
|
||||
|
||||
/**
|
||||
* 微信小程序电站列表
|
||||
* @param name 电站名称
|
||||
* @param serviceFacilities 标签(服务设施)
|
||||
* @param code 城市id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
*
|
||||
* @param name 电站名称
|
||||
* @param serviceFacilities 标签(服务设施)
|
||||
* @param code 城市id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getWXList(String name,String serviceFacilities,Integer code,String longitude,String latitude);
|
||||
List<Map<String, Object>> getWXList(String name, String serviceFacilities, Integer code, String longitude, String latitude);
|
||||
|
||||
|
||||
/**
|
||||
@ -125,26 +127,29 @@ public interface IXhpcChargingStationService {
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
Map<String,Object> getWXXhpcChargingStationMessage(Long chargingStationId,String longitude,String latitude);
|
||||
Map<String, Object> getWXXhpcChargingStationMessage(Long chargingStationId, String longitude, String latitude);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---价格详情
|
||||
*
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getWXXhpcRateTimeMassage(Long chargingStationId);
|
||||
List<Map<String, Object>> getWXXhpcRateTimeMassage(Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---终端列表
|
||||
*
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getWXXhpcTerminalMassage(Long chargingStationId);
|
||||
List<Map<String, Object>> getWXXhpcTerminalMassage(Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 编辑电站(基本信息)
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ -152,6 +157,7 @@ public interface IXhpcChargingStationService {
|
||||
|
||||
/**
|
||||
* 编辑电站(编辑费率)
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ -159,8 +165,10 @@ public interface IXhpcChargingStationService {
|
||||
|
||||
/**
|
||||
* 上传桩编号和删除编号
|
||||
* @param status 0启用 1停用
|
||||
* @param chargingStationId 场站id
|
||||
*
|
||||
* @param status 0启用 1停用
|
||||
* @param chargingStationId 场站id
|
||||
*/
|
||||
void extracted(Integer status, Long chargingStationId);
|
||||
|
||||
}
|
||||
|
||||
@ -15,9 +15,10 @@ public interface IXhpcRateTimeService {
|
||||
|
||||
/**
|
||||
* 获取本时间段的电费
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> getXhpcRateTime(String date,Long datchargingStationIde);
|
||||
public Map<String, Object> getXhpcRateTime(String date, Long datchargingStationIde);
|
||||
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ import java.util.*;
|
||||
* @date 2021/7/27 14:36
|
||||
*/
|
||||
@Service
|
||||
public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
|
||||
|
||||
@Autowired
|
||||
private XhpcChargingPileMapper xhpcChargingPileMapper;
|
||||
@ -29,14 +29,16 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
|
||||
/**
|
||||
* 桩列表
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
*
|
||||
* @param serialNumber 桩编号
|
||||
* @param type 桩类型
|
||||
* @param name 桩名称
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String,Object>> selectXhpcChargingPileList(String name, Integer type, String serialNumber, Long chargingStationId) {
|
||||
return xhpcChargingPileMapper.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId);
|
||||
public List<Map<String, Object>> selectXhpcChargingPileList(String name, Integer type, String serialNumber, Long chargingStationId) {
|
||||
|
||||
return xhpcChargingPileMapper.selectXhpcChargingPileList(name, type, serialNumber, chargingStationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -51,7 +53,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
String serialNumber = xhpcChargingPile.getSerialNumber();
|
||||
//判断桩编号是否重复
|
||||
int count = xhpcChargingPileMapper.getXhpcChargingPileSerialNumberCount(serialNumber);
|
||||
if(count>0){
|
||||
if (count > 0) {
|
||||
return AjaxResult.error("桩编号重复");
|
||||
}
|
||||
|
||||
@ -59,15 +61,15 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
//桩
|
||||
xhpcChargingPileMapper.addXhpcChargingPile(xhpcChargingPile);
|
||||
//终端
|
||||
Long chargingPileId=xhpcChargingPile.getChargingPileId();
|
||||
Long chargingPileId = xhpcChargingPile.getChargingPileId();
|
||||
|
||||
if(xhpcChargingPile.getGunNumber()>0){
|
||||
if (xhpcChargingPile.getGunNumber() > 0) {
|
||||
for (int i = 0; i < xhpcChargingPile.getGunNumber(); i++) {
|
||||
XhpcTerminal xhpcTerminal =new XhpcTerminal();
|
||||
XhpcTerminal xhpcTerminal = new XhpcTerminal();
|
||||
xhpcTerminal.setChargingStationId(chargingStationId);
|
||||
xhpcTerminal.setChargingPileId(chargingPileId);
|
||||
xhpcTerminal.setName(serialNumber + "-" + (i));
|
||||
xhpcTerminal.setSerialNumber(serialNumber+ "0" + i);
|
||||
xhpcTerminal.setSerialNumber(serialNumber + "0" + i);
|
||||
xhpcTerminal.setPileSerialNumber(serialNumber);
|
||||
xhpcTerminal.setWorkStatus(2);
|
||||
xhpcTerminal.setStatus(0);
|
||||
@ -89,26 +91,26 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
Long chargingPileId = xhpcChargingPile.getChargingPileId();
|
||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||
|
||||
if(xhpcChargingPile.getSerialNumber() ==null){
|
||||
if (xhpcChargingPile.getSerialNumber() == null) {
|
||||
return AjaxResult.error("桩编号不能为空");
|
||||
}
|
||||
if(xhpc.getSerialNumber() != xhpc.getSerialNumber()){
|
||||
if (xhpc.getSerialNumber() != xhpc.getSerialNumber()) {
|
||||
return AjaxResult.error("桩编号不能编辑");
|
||||
}
|
||||
|
||||
if(!xhpcChargingPile.getGunNumber().equals(xhpc.getGunNumber())){
|
||||
if (!xhpcChargingPile.getGunNumber().equals(xhpc.getGunNumber())) {
|
||||
//删除之前的终端
|
||||
xhpcChargingPileMapper.updateXhpcTerminal(chargingPileId);
|
||||
|
||||
String serialNumber = xhpcChargingPile.getSerialNumber();
|
||||
Long chargingStationId = xhpcChargingPile.getChargingStationId();
|
||||
if(xhpcChargingPile.getGunNumber()>0){
|
||||
if (xhpcChargingPile.getGunNumber() > 0) {
|
||||
for (int i = 0; i < xhpcChargingPile.getGunNumber(); i++) {
|
||||
XhpcTerminal xhpcTerminal =new XhpcTerminal();
|
||||
XhpcTerminal xhpcTerminal = new XhpcTerminal();
|
||||
xhpcTerminal.setChargingStationId(chargingStationId);
|
||||
xhpcTerminal.setChargingPileId(chargingPileId);
|
||||
xhpcTerminal.setName(serialNumber + "-" + (i));
|
||||
xhpcTerminal.setSerialNumber(serialNumber+ "0" + i);
|
||||
xhpcTerminal.setSerialNumber(serialNumber + "0" + i);
|
||||
xhpcTerminal.setPileSerialNumber(serialNumber);
|
||||
xhpcTerminal.setWorkStatus(2);
|
||||
xhpcTerminal.setStatus(0);
|
||||
@ -126,18 +128,20 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
|
||||
@Override
|
||||
public AjaxResult selectXhpcChargingPile(Long chargingPileId) {
|
||||
|
||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||
//终端信息
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
List<Map<String, Object>> list = xhpcChargingPileMapper.selectXhpcTerminalList(chargingPileId);
|
||||
map.put("chargingPile",xhpc);
|
||||
map.put("terminal",list);
|
||||
map.put("chargingPile", xhpc);
|
||||
map.put("terminal", list);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult updateStatus(Long chargingPileId, Integer status) {
|
||||
|
||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||
xhpc.setStatus(status);
|
||||
xhpcChargingPileMapper.updaeXhpcChargingPile(xhpc);
|
||||
@ -146,13 +150,14 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
||||
|
||||
@Override
|
||||
public int updateXhpcChargingPileById(Long chargingPileId) {
|
||||
|
||||
XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId);
|
||||
int i = xhpcChargingPileMapper.updateXhpcChargingPileById(chargingPileId);
|
||||
if (i>0) {
|
||||
if (i > 0) {
|
||||
//删除桩
|
||||
Set<String> set =new HashSet<>();
|
||||
set.add(chargingPileId+"");
|
||||
powerPileService.deletePileWhitelist(xhpc.getChargingStationId(),set);
|
||||
Set<String> set = new HashSet<>();
|
||||
set.add(chargingPileId + "");
|
||||
powerPileService.deletePileWhitelist(xhpc.getChargingStationId(), set);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -15,30 +15,32 @@ import java.util.Map;
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
@Service
|
||||
public class XhpcRateTimeServiceImpl implements IXhpcRateTimeService{
|
||||
public class XhpcRateTimeServiceImpl implements IXhpcRateTimeService {
|
||||
|
||||
@Autowired
|
||||
private XhpcRateTimeMapper xhpcRateTimeMapper;
|
||||
|
||||
/**
|
||||
* 获取本时间段的电费
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getXhpcRateTime(String date,Long datchargingStationIde) {
|
||||
public Map<String, Object> getXhpcRateTime(String date, Long datchargingStationIde) {
|
||||
|
||||
//判断本时间段的电费
|
||||
Map<String,Object> hpcRateTimeMap = xhpcRateTimeMapper.getXhpcRateTime(date, datchargingStationIde);
|
||||
Map<String, Object> hpcRateTimeMap = xhpcRateTimeMapper.getXhpcRateTime(date, datchargingStationIde);
|
||||
//该判断防止某个时间段费率没有录入
|
||||
if(hpcRateTimeMap ==null){
|
||||
if (hpcRateTimeMap == null) {
|
||||
//获取剩余时间费率
|
||||
return new HashMap<>();
|
||||
}
|
||||
Map<String,Object> map =new HashMap<>();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Long rateId = Long.valueOf(hpcRateTimeMap.get("rateId").toString());
|
||||
Map<String, Object> xhpcTimeType = xhpcRateTimeMapper.getXhpcTimeType(datchargingStationIde, rateId);
|
||||
map.put("startTime",hpcRateTimeMap.get("startTime"));
|
||||
map.put("endTime",hpcRateTimeMap.get("endTime"));
|
||||
map.put("startTime", hpcRateTimeMap.get("startTime"));
|
||||
map.put("endTime", hpcRateTimeMap.get("endTime"));
|
||||
map.putAll(xhpcTimeType);
|
||||
return map;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ import java.util.*;
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
@Service
|
||||
public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
public class XhpcTerminalServiceImpl implements IXhpcTerminalService {
|
||||
|
||||
@Autowired
|
||||
private XhpcTerminalMapper xhpcTerminalMapper;
|
||||
@ -25,22 +25,25 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
|
||||
/**
|
||||
* PC端页面统计
|
||||
*
|
||||
* @param chargingStationId 电站id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> countXhpcTerminalWorkStatus(Long chargingStationId) {
|
||||
|
||||
return xhpcTerminalMapper.countXhpcTerminalWorkStatus(chargingStationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getXhpcTerminalList(String serialNumber, Integer type, Integer status, String workStatus, Long chargingStationId) {
|
||||
|
||||
return xhpcTerminalMapper.getXhpcTerminalList(serialNumber,type,status,workStatus,chargingStationId);
|
||||
return xhpcTerminalMapper.getXhpcTerminalList(serialNumber, type, status, workStatus, chargingStationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateStatus(Long terminalId, Integer Status) {
|
||||
|
||||
XhpcTerminal xhpcTerminal = xhpcTerminalMapper.selectXhpcTerminalById(terminalId);
|
||||
xhpcTerminal.setStatus(Status);
|
||||
xhpcTerminalMapper.updateXhpcTerminal(xhpcTerminal);
|
||||
@ -49,12 +52,14 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
|
||||
@Override
|
||||
public AjaxResult selectXhpcTerminalMessage(Long terminalId) {
|
||||
|
||||
XhpcTerminal xhpcTerminal = xhpcTerminalMapper.selectXhpcTerminalById(terminalId);
|
||||
return AjaxResult.success(xhpcTerminal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateXhpcTerminalName(Long terminalId,String name, String serialNumber) {
|
||||
public AjaxResult updateXhpcTerminalName(Long terminalId, String name, String serialNumber) {
|
||||
|
||||
XhpcTerminal xhpcTerminal = xhpcTerminalMapper.selectXhpcTerminalById(terminalId);
|
||||
xhpcTerminal.setName(name);
|
||||
xhpcTerminal.setSerialNumber(serialNumber);
|
||||
@ -66,16 +71,16 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
public AjaxResult selectXhpcTerminalPileMessage(Long terminalId) {
|
||||
|
||||
Map<String, Object> map = xhpcTerminalMapper.selectXhpcTerminalPileMessage(terminalId);
|
||||
if(map !=null && map.get("chargingStationId") !=null && map.get("serialNumber") !=null){
|
||||
Long chargingStationId =Long.parseLong(map.get("chargingStationId").toString());
|
||||
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();
|
||||
//费率时段,先反设置时段,在反默认时段
|
||||
List<Map<String, Object>> xhpcRateTimeTypeList = xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 1);
|
||||
xhpcRateTimeTypeList.addAll(xhpcTerminalMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
|
||||
map.put("rateTimeList",xhpcRateTimeTypeList);
|
||||
map.put("rateTimeList", xhpcRateTimeTypeList);
|
||||
|
||||
//统计终端(充redis获取终端信息)
|
||||
map.putAll(xhpcTerminalMapper.getXhpcRateTimeOrderStatistics(chargingStationId,gunNumber));
|
||||
map.putAll(xhpcTerminalMapper.getXhpcRateTimeOrderStatistics(chargingStationId, gunNumber));
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
return AjaxResult.error("无效终端");
|
||||
@ -85,8 +90,8 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
public AjaxResult getWXpNumMessage(String pNum) {
|
||||
|
||||
Map<String, Object> map = xhpcTerminalMapper.getWXpNumMessage(pNum);
|
||||
if(map ==null || map.get("chargingStationId")==null){
|
||||
return AjaxResult.error(1007,"无效的终端编码");
|
||||
if (map == null || map.get("chargingStationId") == null) {
|
||||
return AjaxResult.error(1007, "无效的终端编码");
|
||||
}
|
||||
//获取桩的状态
|
||||
|
||||
@ -95,18 +100,18 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
||||
//HH:mm:ss
|
||||
String tiem = DateUtil.formatTime(new Date());
|
||||
Map<String, Object> xhpcRateTime = xhpcRateTimeService.getXhpcRateTime(tiem, chargingStationId);
|
||||
if(xhpcRateTime!=null){
|
||||
if (xhpcRateTime != null) {
|
||||
map.putAll(xhpcRateTime);
|
||||
}
|
||||
//图片信息
|
||||
List<String> imgList =new ArrayList<>();
|
||||
if(map.get("imgId") !=null && map.get("imgId").toString() !=""){
|
||||
List<String> imgList = new ArrayList<>();
|
||||
if (map.get("imgId") != null && map.get("imgId").toString() != "") {
|
||||
String[] split = map.get("imgId").toString().split(",");
|
||||
imgList= Arrays.asList(split);
|
||||
imgList = Arrays.asList(split);
|
||||
List<Map<String, Object>> imgLists = xhpcTerminalMapper.getImageList(imgList);
|
||||
map.put("imgIdList",imgLists);
|
||||
}else{
|
||||
map.put("imgIdList",new ArrayList<>());
|
||||
map.put("imgIdList", imgLists);
|
||||
} else {
|
||||
map.put("imgIdList", new ArrayList<>());
|
||||
}
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.charging.station.mapper.XhpcChargingPileMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcChargingPile">
|
||||
@ -15,41 +15,70 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="maxVoltage" column="max_voltage"/>
|
||||
<result property="minVoltage" column="min_voltage"/>
|
||||
<result property="maxElectricCurrent" column="max_electric_current"/>
|
||||
<result property="minElectriCurrent" column="min_electric_current" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="type" column="type" />
|
||||
<result property="programVersion" column="program_version" />
|
||||
<result property="networkLinkType" column="network_link_type" />
|
||||
<result property="gunNumber" column="gun_number" />
|
||||
<result property="communicationProtocolVersion" column="communication_protocol_version" />
|
||||
<result property="communicationOperator" column="communication_operator" />
|
||||
<result property="simCard" column="sim_card" />
|
||||
<result property="rateModelId" column="rate_model_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="brandModel" column="brand_model" />
|
||||
<result property="minElectriCurrent" column="min_electric_current"/>
|
||||
<result property="serialNumber" column="serial_number"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="programVersion" column="program_version"/>
|
||||
<result property="networkLinkType" column="network_link_type"/>
|
||||
<result property="gunNumber" column="gun_number"/>
|
||||
<result property="communicationProtocolVersion" column="communication_protocol_version"/>
|
||||
<result property="communicationOperator" column="communication_operator"/>
|
||||
<result property="simCard" column="sim_card"/>
|
||||
<result property="rateModelId" column="rate_model_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="brandModel" column="brand_model"/>
|
||||
</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,status, del_flag, create_time, create_by, update_time, update_by, remark, rate_model_id ,brand_model 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>
|
||||
<select id="selectXhpcChargingPileList" resultType="java.util.Map">
|
||||
select
|
||||
cp.charging_pile_id as chargingPileId,
|
||||
cp.charging_station_id as chargingStationId,
|
||||
cp.name as chargingPileName,
|
||||
st.name as chargingStationName,
|
||||
cp.serial_number as serialNumber,
|
||||
cp.brand_model as brandModel,
|
||||
cp.type as type,
|
||||
cp.power as power,
|
||||
cp.gun_number as gunNumber,
|
||||
cp.status as status
|
||||
from xhpc_charging_pile as cp
|
||||
cp.charging_pile_id as chargingPileId,
|
||||
cp.charging_station_id as chargingStationId,
|
||||
cp.name as chargingPileName,
|
||||
st.name as chargingStationName,
|
||||
cp.serial_number as serialNumber,
|
||||
cp.brand_model as brandModel,
|
||||
cp.type as type,
|
||||
cp.power as power,
|
||||
cp.gun_number as gunNumber,
|
||||
cp.status as status
|
||||
from xhpc_charging_pile as cp
|
||||
left join xhpc_charging_station as st on st.charging_station_id =cp.charging_station_id
|
||||
where cp.del_flag =0
|
||||
<if test="name !=null and name !=''">
|
||||
@ -239,10 +268,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<select id="selectXhpcChargingStationById" resultType="java.util.Map">
|
||||
select
|
||||
charging_station_id as chargingStationId,
|
||||
rate_model_id as rateModelId
|
||||
from xhpc_charging_station where charging_station_id=#{chargingStationId}
|
||||
select charging_station_id as chargingStationId,
|
||||
rate_model_id as rateModelId
|
||||
from xhpc_charging_station
|
||||
where charging_station_id = #{chargingStationId}
|
||||
</select>
|
||||
|
||||
<select id="selectXhpcChargingPileById" resultMap="BaseResultMap">
|
||||
@ -269,7 +298,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="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>
|
||||
@ -301,19 +332,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
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}
|
||||
and te.charging_pile_id=#{chargingPileId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateXhpcChargingPileById">
|
||||
update xhpc_charging_pile set del_flag =1 where charging_pile_id = #{chargingPileId}
|
||||
update xhpc_charging_pile
|
||||
set del_flag =1
|
||||
where charging_pile_id = #{chargingPileId}
|
||||
</update>
|
||||
|
||||
<select id="getXhpcChargingPileSerialNumberCount" resultType="int">
|
||||
select count(charging_pile_id) from xhpc_charging_pile where serial_number=#{serialNumber}
|
||||
select count(charging_pile_id)
|
||||
from xhpc_charging_pile
|
||||
where serial_number = #{serialNumber}
|
||||
</select>
|
||||
|
||||
<update id="updateXhpcTerminal">
|
||||
update xhpc_terminal set del_flag = 2 where charging_pile_id = #{chargingPileId}
|
||||
update xhpc_terminal
|
||||
set del_flag = 2
|
||||
where charging_pile_id = #{chargingPileId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.charging.station.mapper.XhpcChargingStationMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcChargingStation">
|
||||
@ -15,39 +15,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="peripheryFacilities" column="periphery_facilities"/>
|
||||
<result property="areaCode" column="area_code"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="detailedAddress" column="detailed_address" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="parkingInstructions" column="parking_instructions" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="clientVisible" column="client_visible" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="rateModelId" column="rate_model_id" />
|
||||
<result property="imgId" column="img_id" />
|
||||
<result property="businessInstructions" column="business_instructions" />
|
||||
<result property="reminderInstructions" column="reminder_instructions" />
|
||||
<result property="detailedAddress" column="detailed_address"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="parkingInstructions" column="parking_instructions"/>
|
||||
<result property="serialNumber" column="serial_number"/>
|
||||
<result property="clientVisible" column="client_visible"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="rateModelId" column="rate_model_id"/>
|
||||
<result property="imgId" column="img_id"/>
|
||||
<result property="businessInstructions" column="business_instructions"/>
|
||||
<result property="reminderInstructions" column="reminder_instructions"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXhpcChargingStationVo">
|
||||
select charging_station_id, name, operator_id, type, construction_site, service_facilities, periphery_facilities, area_code, address, detailed_address, longitude, latitude, parking_instructions, serial_number, client_visible, status, del_flag, create_time, create_by, update_time, update_by, remark, rate_model_id from xhpc_charging_station
|
||||
select charging_station_id,
|
||||
name,
|
||||
operator_id,
|
||||
type,
|
||||
construction_site,
|
||||
service_facilities,
|
||||
periphery_facilities,
|
||||
area_code,
|
||||
address,
|
||||
detailed_address,
|
||||
longitude,
|
||||
latitude,
|
||||
parking_instructions,
|
||||
serial_number,
|
||||
client_visible,
|
||||
status,
|
||||
del_flag,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
remark,
|
||||
rate_model_id
|
||||
from xhpc_charging_station
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectXhpcChargingStationList" resultType="java.util.Map">
|
||||
select
|
||||
cs.charging_station_id as chargingStationId,
|
||||
cs.name as name,
|
||||
ope.name as operatorName,
|
||||
cs.address as address,
|
||||
(select url from xhpc_img where img_id = cs.img_id and del_flag =0 limit 1) as url,
|
||||
cs.client_visible as clientVisible,
|
||||
cs.status as status
|
||||
cs.charging_station_id as chargingStationId,
|
||||
cs.name as name,
|
||||
ope.name as operatorName,
|
||||
cs.address as address,
|
||||
(select url from xhpc_img where img_id = cs.img_id and del_flag =0 limit 1) as url,
|
||||
cs.client_visible as clientVisible,
|
||||
cs.status as status
|
||||
from xhpc_charging_station as cs
|
||||
left join xhpc_operator as ope on cs.operator_id = ope.operator_id
|
||||
where cs.del_flag =0
|
||||
@ -91,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="rateModelId != null">rate_model_id,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="chargingStationId != null">#{chargingStationId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
@ -116,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="rateModelId != null">#{rateModelId},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateXhpcChargingStation" parameterType="com.xhpc.common.domain.XhpcChargingStation">
|
||||
@ -153,67 +176,84 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<update id="updateXhpcChargingStationById" parameterType="Long">
|
||||
update xhpc_charging_station set del_flag =1 where charging_station_id = #{chargingStationId}
|
||||
update xhpc_charging_station
|
||||
set del_flag =1
|
||||
where charging_station_id = #{chargingStationId}
|
||||
</update>
|
||||
|
||||
<update id="updateXhpcChargingStationByIds" parameterType="java.lang.String">
|
||||
update xhpc_charging_station set del_flag =1 where charging_station_id in
|
||||
update xhpc_charging_station set del_flag =1 where charging_station_id in
|
||||
<foreach item="chargingStationId" collection="array" open="(" separator="," close=")">
|
||||
#{chargingStationId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="status">
|
||||
update xhpc_charging_station set status =#{status} where charging_station_id = #{chargingStationId} and del_flag =0
|
||||
update xhpc_charging_station
|
||||
set status =#{status}
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
</update>
|
||||
|
||||
<update id="clientVisible">
|
||||
update xhpc_charging_station set client_visible =#{clientVisible} where charging_station_id = #{chargingStationId} and del_flag =0
|
||||
update xhpc_charging_station
|
||||
set client_visible =#{clientVisible}
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
</update>
|
||||
|
||||
<select id="stationInternetBlackList" resultType="java.util.Map">
|
||||
select name from xhpc_internet_user where del_flag=0 and internet_user_id not in (select internet_user_id from xhpc_station_internet_blacklist where charging_station_id=#{chargingStationId})
|
||||
select name
|
||||
from xhpc_internet_user
|
||||
where del_flag = 0
|
||||
and internet_user_id not in (select internet_user_id
|
||||
from xhpc_station_internet_blacklist
|
||||
where charging_station_id = #{chargingStationId})
|
||||
</select>
|
||||
|
||||
<select id="getXhpcChargingStationMessage" resultType="java.util.Map">
|
||||
select
|
||||
ct.charging_station_id as chargingStationId,
|
||||
ct.name as name,
|
||||
ct.operator_id as operatorId,
|
||||
ct.station_type as stationType,
|
||||
op.name as operatorName,
|
||||
ct.type as type,
|
||||
(select dict_value from xhpc_dict_biz where code ='charging_station_type' and dict_key =ct.station_type) as stationTypeName,
|
||||
ct.serial_number as serialNumber,
|
||||
ct.construction_site as constructionSite,
|
||||
(select dict_value from xhpc_dict_biz where code ='charging_construction_site' and dict_key =ct.construction_site) as constructionSiteName,
|
||||
ct.address as address,
|
||||
ct.remark as remark,
|
||||
ct.detailed_address as detailedAddress,
|
||||
ct.periphery_facilities as peripheryFacilities,
|
||||
ct.service_facilities as serviceFacilities,
|
||||
ct.parking_instructions as parkingInstructions,
|
||||
ct.business_instructions as businessInstructions,
|
||||
ct.reminder_instructions as reminderInstructions,
|
||||
ct.client_visible as clientVisible,
|
||||
ct.img_id as imgId
|
||||
select ct.charging_station_id as chargingStationId,
|
||||
ct.name as name,
|
||||
ct.operator_id as operatorId,
|
||||
ct.station_type as stationType,
|
||||
op.name as operatorName,
|
||||
ct.type as type,
|
||||
(select dict_value
|
||||
from xhpc_dict_biz
|
||||
where code = 'charging_station_type' and dict_key = ct.station_type) as stationTypeName,
|
||||
ct.serial_number as serialNumber,
|
||||
ct.construction_site as constructionSite,
|
||||
(select dict_value
|
||||
from xhpc_dict_biz
|
||||
where code = 'charging_construction_site' and dict_key = ct.construction_site) as constructionSiteName,
|
||||
ct.address as address,
|
||||
ct.remark as remark,
|
||||
ct.detailed_address as detailedAddress,
|
||||
ct.periphery_facilities as peripheryFacilities,
|
||||
ct.service_facilities as serviceFacilities,
|
||||
ct.parking_instructions as parkingInstructions,
|
||||
ct.business_instructions as businessInstructions,
|
||||
ct.reminder_instructions as reminderInstructions,
|
||||
ct.client_visible as clientVisible,
|
||||
ct.img_id as imgId
|
||||
from xhpc_charging_station as ct
|
||||
left join xhpc_operator as op on op.operator_id = ct.operator_id
|
||||
where ct.charging_station_id =#{chargingStationId} and ct.del_flag =0
|
||||
left join xhpc_operator as op on op.operator_id = ct.operator_id
|
||||
where ct.charging_station_id = #{chargingStationId}
|
||||
and ct.del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getWXList" resultType="map">
|
||||
select
|
||||
charging_station_id as chargingStationId,
|
||||
name as name,
|
||||
parking_instructions as parkingInstructions,
|
||||
detailed_address as detailedAddress,
|
||||
service_facilities as serviceFacilities,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((latitude * 3.141593) / 180 ) +
|
||||
COS((#{latitude} * 3.141593) / 180 ) * COS((latitude * 3.141593) / 180 ) *
|
||||
COS((#{longitude} * 3.141593) / 180 - (longitude * 3.141593) / 180 ) ) * 6370.9968,4)AS distance
|
||||
charging_station_id as chargingStationId,
|
||||
name as name,
|
||||
parking_instructions as parkingInstructions,
|
||||
detailed_address as detailedAddress,
|
||||
service_facilities as serviceFacilities,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((latitude * 3.141593) / 180 ) +
|
||||
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 del_flag =0 and status =0
|
||||
where del_flag =0 and status =0
|
||||
and FIND_IN_SET(#{clientVisible},client_visible)>0
|
||||
<if test="name !=null and name !=''">
|
||||
and name like CONCAT('%',#{name},'%')
|
||||
@ -237,69 +277,75 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from xhpc_dict_biz
|
||||
where code = #{code} and parent_id > 0 and del_flag = 0
|
||||
<if test="serviceFacilities !=null and serviceFacilities.size()>0 ">
|
||||
and
|
||||
<foreach collection="serviceFacilities" item="item" index="index" open="(" close=")" separator="or">
|
||||
dict_biz_id like CONCAT('%',#{item},'%')
|
||||
</foreach>
|
||||
and
|
||||
<foreach collection="serviceFacilities" item="item" index="index" open="(" close=")" separator="or">
|
||||
dict_biz_id like CONCAT('%',#{item},'%')
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getWXXhpcChargingStationMessage" resultType="java.util.Map">
|
||||
select
|
||||
charging_station_id as chargingStationId,
|
||||
(select type from xhpc_charging_pile where charging_station_id = charging_station_id and del_flag=0 and status=0) as type,
|
||||
name as name,
|
||||
reminder_instructions as reminderInstructions,
|
||||
detailed_address as detailedAddress,
|
||||
parking_instructions as parkingInstructions,
|
||||
business_instructions as businessInstructions,
|
||||
service_facilities as serviceFacilities,
|
||||
img_id as imgId,
|
||||
remark as remark,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((latitude * 3.141593) / 180 ) +
|
||||
COS((#{latitude} * 3.141593) / 180 ) * COS((latitude * 3.141593) / 180 ) *
|
||||
COS((#{longitude} * 3.141593) / 180 - (longitude * 3.141593) / 180 ) ) * 6370.9968,4)AS distance
|
||||
select charging_station_id as chargingStationId,
|
||||
(select type
|
||||
from xhpc_charging_pile
|
||||
where charging_station_id = charging_station_id and del_flag = 0 and status = 0) as type,
|
||||
name as name,
|
||||
reminder_instructions as reminderInstructions,
|
||||
detailed_address as detailedAddress,
|
||||
parking_instructions as parkingInstructions,
|
||||
business_instructions as businessInstructions,
|
||||
service_facilities as serviceFacilities,
|
||||
img_id as imgId,
|
||||
remark as remark,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180) * SIN((latitude * 3.141593) / 180) +
|
||||
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
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
and status = 0
|
||||
</select>
|
||||
|
||||
<select id="getImageList" resultType="java.util.Map">
|
||||
select
|
||||
img_id as imgId,
|
||||
url as url
|
||||
img_id as imgId,
|
||||
url as url
|
||||
from xhpc_img where del_flag=0 and status=0
|
||||
<if test="imgIds !=null and imgIds.size()>0 ">
|
||||
and img_id in
|
||||
<foreach collection="imgIds" item="chargingStationId" open="(" separator="," close=")">
|
||||
<foreach collection="imgIds" item="chargingStationId" open="(" separator="," close=")">
|
||||
#{chargingStationId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getWXXhpcRateTimeMassage" resultType="java.util.Map">
|
||||
select
|
||||
xrt.start_time as startTime,
|
||||
xrt.end_time as endTime,
|
||||
xr.power_fee as powerFee,
|
||||
xr.service_fee as serviceFee
|
||||
select xrt.start_time as startTime,
|
||||
xrt.end_time as endTime,
|
||||
xr.power_fee as powerFee,
|
||||
xr.service_fee as serviceFee
|
||||
from xhpc_rate_time as xrt
|
||||
left join xhpc_rate as xr on xr.rate_id = xrt.rate_id
|
||||
where xrt.charging_station_id =#{chargingStationId} and xrt.status=0 and xrt.del_flag=0
|
||||
left join xhpc_rate as xr on xr.rate_id = xrt.rate_id
|
||||
where xrt.charging_station_id = #{chargingStationId}
|
||||
and xrt.status = 0
|
||||
and xrt.del_flag = 0
|
||||
order by xrt.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getWXXhpcTerminalMassage" resultType="java.util.Map">
|
||||
select
|
||||
te.name as name,
|
||||
cp.power as power,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
cp.serial_number as serialNumber,
|
||||
cp.input_voltage as inputVoltage
|
||||
select te.name as name,
|
||||
cp.power as power,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
cp.serial_number as serialNumber,
|
||||
cp.input_voltage as inputVoltage
|
||||
from xhpc_terminal as te
|
||||
left join xhpc_charging_pile as cp on cp.charging_pile_id = te.charging_pile_id
|
||||
where te.charging_station_id =#{chargingStationId} and te.status=0 and te.del_flag=0
|
||||
left join xhpc_charging_pile as cp on cp.charging_pile_id = te.charging_pile_id
|
||||
where te.charging_station_id = #{chargingStationId}
|
||||
and te.status = 0
|
||||
and te.del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="addXhpcRateModel" parameterType="com.xhpc.common.domain.XhpcRateModel" useGeneratedKeys="true"
|
||||
@ -438,7 +484,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="null != name and '' != name">
|
||||
#{name},
|
||||
#{name},
|
||||
</if>
|
||||
<if test="null != operatorId ">
|
||||
#{operatorId},
|
||||
@ -697,13 +743,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<select id="getXhpcRateList" resultType="java.util.Map">
|
||||
select
|
||||
power_fee as powerFee,
|
||||
service_fee as serviceFee,
|
||||
name as name,
|
||||
rate_value as id
|
||||
select power_fee as powerFee,
|
||||
service_fee as serviceFee,
|
||||
name as name,
|
||||
rate_value as id
|
||||
from xhpc_rate
|
||||
where charging_station_id=#{chargingStationId} and del_flag =0
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
GROUP BY rate_value
|
||||
</select>
|
||||
|
||||
@ -736,37 +782,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeOrderStatistics" resultType="java.util.Map">
|
||||
select
|
||||
IF(SUM(charging_degree) IS NULL,0, charging_degree) as chargingDegreeSum,
|
||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
||||
COUNT(DISTINCT user_id) as userIdCount
|
||||
select IF(SUM(charging_degree) IS NULL, 0, charging_degree) as chargingDegreeSum,
|
||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
||||
COUNT(DISTINCT user_id) as userIdCount
|
||||
from xhpc_real_time_order
|
||||
where real_time_order_id in (
|
||||
select max(real_time_order_id) from xhpc_real_time_order WHERE to_days(create_time) = to_days(now()) and charging_station_id=#{chargingStationId} group by charging_order_id )
|
||||
select max(real_time_order_id)
|
||||
from xhpc_real_time_order
|
||||
WHERE to_days(create_time) = to_days(now())
|
||||
and charging_station_id = #{chargingStationId}
|
||||
group by charging_order_id)
|
||||
</select>
|
||||
|
||||
<update id="updateXhpcRate">
|
||||
update xhpc_rate set del_flag =1 where charging_station_id = #{chargingStationId} and del_flag =0
|
||||
update xhpc_rate
|
||||
set del_flag =1
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
</update>
|
||||
|
||||
<update id="updateXhpcRateTime">
|
||||
update xhpc_rate_time set del_flag =1 where charging_station_id = #{chargingStationId} and del_flag =0
|
||||
update xhpc_rate_time
|
||||
set del_flag =1
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
</update>
|
||||
|
||||
<select id="getXchargingPileList" resultType="java.lang.String">
|
||||
select
|
||||
serial_number as pileNo
|
||||
select serial_number as pileNo
|
||||
from xhpc_charging_pile
|
||||
where charging_station_id=#{chargingStationId} and del_flag =0 and status =0
|
||||
where charging_station_id = #{chargingStationId}
|
||||
and del_flag = 0
|
||||
and status = 0
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeNumber" resultType="java.util.Map">
|
||||
SELECT
|
||||
CAST(((UNIX_TIMESTAMP(end_time)-UNIX_TIMESTAMP(start_time))/1800) AS SIGNED) as number,
|
||||
rate_value as rateValue
|
||||
FROM
|
||||
xhpc_rate_time
|
||||
where charging_station_id=#{chargingStationId}
|
||||
SELECT CAST(((UNIX_TIMESTAMP(end_time) - UNIX_TIMESTAMP(start_time)) / 1800) AS SIGNED) as number,
|
||||
rate_value as rateValue
|
||||
FROM xhpc_rate_time
|
||||
where charging_station_id = #{chargingStationId}
|
||||
order by sort
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.charging.station.mapper.XhpcRateTimeMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcRateTime">
|
||||
@ -15,38 +15,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="rateModelId" column="rate_model_id"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="type" column="type" />
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="rateValue" column="rate_value"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getXhpcRateTime" resultType="map">
|
||||
select
|
||||
rate_time_id as rateTimeId,
|
||||
rate_id as rateId,
|
||||
start_time as startTime,
|
||||
end_time as endTime
|
||||
from xhpc_rate_time where charging_station_id =#{datchargingStationId} and start_time <=#{date} and end_time >=#{date} and status=0 and del_flag=0
|
||||
select rate_time_id as rateTimeId,
|
||||
rate_id as rateId,
|
||||
start_time as startTime,
|
||||
end_time as endTime
|
||||
from xhpc_rate_time
|
||||
where charging_station_id = #{datchargingStationId}
|
||||
and start_time <= #{date}
|
||||
and end_time >= #{date}
|
||||
and status = 0
|
||||
and del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getXhpcTimeType" resultType="map">
|
||||
select
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
select ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=#{rateId}
|
||||
where ra.charging_station_id = #{datchargingStationId}
|
||||
and ra.status = 0
|
||||
and ra.del_flag = 0
|
||||
and ra.rate_id = #{rateId}
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeType" resultType="map">
|
||||
select
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
select ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=(select rate_id from xhpc_rate_time where status=0 and del_flag=0 and charging_station_id =#{datchargingStationId} LIMIT 1)
|
||||
where ra.charging_station_id = #{datchargingStationId}
|
||||
and ra.status = 0
|
||||
and ra.del_flag = 0
|
||||
and ra.rate_id = (select rate_id
|
||||
from xhpc_rate_time
|
||||
where status = 0 and del_flag = 0 and charging_station_id = #{datchargingStationId}
|
||||
LIMIT 1)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xhpc.charging.station.mapper.XhpcTerminalMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcTerminal">
|
||||
@ -15,54 +15,88 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="workStatus" column="work_status"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXhpcTerminalVo">
|
||||
select terminal_id, charging_pile_id, charging_station_id, name, serial_number, pile_serial_number, gun_status, work_status, status, del_flag, create_time, create_by, update_time, update_by, remark from xhpc_terminal
|
||||
select terminal_id,
|
||||
charging_pile_id,
|
||||
charging_station_id,
|
||||
name,
|
||||
serial_number,
|
||||
pile_serial_number,
|
||||
gun_status,
|
||||
work_status,
|
||||
status,
|
||||
del_flag,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
remark
|
||||
from xhpc_terminal
|
||||
</sql>
|
||||
|
||||
<select id="countXhpcTerminalWorkStatus" resultType="map">
|
||||
select
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=0 and charging_station_id=#{chargingStationId}) offLine,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=1 and charging_station_id=#{chargingStationId}) fault,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=2 and charging_station_id=#{chargingStationId}) freeTime,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag=0 and work_status=3 and charging_station_id=#{chargingStationId}) charge
|
||||
select (select count(terminal_id)
|
||||
from xhpc_terminal
|
||||
where status = 0
|
||||
and del_flag = 0
|
||||
and work_status = 0
|
||||
and charging_station_id = #{chargingStationId}) offLine,
|
||||
(select count(terminal_id)
|
||||
from xhpc_terminal
|
||||
where status = 0
|
||||
and del_flag = 0
|
||||
and work_status = 1
|
||||
and charging_station_id = #{chargingStationId}) fault,
|
||||
(select count(terminal_id)
|
||||
from xhpc_terminal
|
||||
where status = 0
|
||||
and del_flag = 0
|
||||
and work_status = 2
|
||||
and charging_station_id = #{chargingStationId}) freeTime,
|
||||
(select count(terminal_id)
|
||||
from xhpc_terminal
|
||||
where status = 0
|
||||
and del_flag = 0
|
||||
and work_status = 3
|
||||
and charging_station_id = #{chargingStationId}) charge
|
||||
from xhpc_terminal LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getXhpcTerminalList" resultType="map">
|
||||
<select id="getXhpcTerminalList" 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
|
||||
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="chargingStationId !=null">
|
||||
and te.charging_station_id=#{chargingStationId}
|
||||
and te.charging_station_id=#{chargingStationId}
|
||||
</if>
|
||||
<if test="serialNumber !=null and serialNumber !=''">
|
||||
and te.serial_number like CONCAT('%',#{serialNumber},'%')
|
||||
and te.serial_number like CONCAT('%',#{serialNumber},'%')
|
||||
</if>
|
||||
<if test="type !=null ">
|
||||
and cp.type=#{type}
|
||||
and cp.type=#{type}
|
||||
</if>
|
||||
<if test="status !=null ">
|
||||
and cp.status=#{status}
|
||||
and cp.status=#{status}
|
||||
</if>
|
||||
<if test="workStatus !=null and workStatus !=''">
|
||||
and te.work_status=#{chargingStationId}
|
||||
and te.work_status=#{chargingStationId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@ -188,32 +222,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<select id="selectXhpcTerminalPileMessage" resultType="map">
|
||||
select
|
||||
ter.terminal_id as terminalId,
|
||||
ter.charging_station_id as chargingStationId,
|
||||
ter.name as name,
|
||||
ter.serial_number as serialNumber,
|
||||
ter.gun_status as gunStatus,
|
||||
ter.work_status as workStatus,
|
||||
ter.status as status,
|
||||
ct.name as chargingStationName,
|
||||
ter.create_time as createTime,
|
||||
cp.serial_number as pileSerialNumber,
|
||||
cp.type as type,
|
||||
cp.national_standard as nationalStandard,
|
||||
cp.power as power,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
cp.input_voltage as inputVoltage,
|
||||
cp.max_voltage as maxVoltage,
|
||||
cp.min_voltage as minVoltage,
|
||||
cp.max_electric_current as maxElectricCurrent,
|
||||
cp.min_electric_current as minElectricCurrent,
|
||||
cp.communication_operator as communicationOperator,
|
||||
cp.sim_card as simCard
|
||||
select ter.terminal_id as terminalId,
|
||||
ter.charging_station_id as chargingStationId,
|
||||
ter.name as name,
|
||||
ter.serial_number as serialNumber,
|
||||
ter.gun_status as gunStatus,
|
||||
ter.work_status as workStatus,
|
||||
ter.status as status,
|
||||
ct.name as chargingStationName,
|
||||
ter.create_time as createTime,
|
||||
cp.serial_number as pileSerialNumber,
|
||||
cp.type as type,
|
||||
cp.national_standard as nationalStandard,
|
||||
cp.power as power,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
cp.input_voltage as inputVoltage,
|
||||
cp.max_voltage as maxVoltage,
|
||||
cp.min_voltage as minVoltage,
|
||||
cp.max_electric_current as maxElectricCurrent,
|
||||
cp.min_electric_current as minElectricCurrent,
|
||||
cp.communication_operator as communicationOperator,
|
||||
cp.sim_card as simCard
|
||||
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
|
||||
where ter.terminal_id =#{terminalId}
|
||||
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
|
||||
where ter.terminal_id = #{terminalId}
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeTypeList" resultType="map">
|
||||
@ -223,6 +256,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
||||
rt.rate_id as rateId,
|
||||
rt.rate_value as rateValue,
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee,
|
||||
ra.name as rateName
|
||||
from xhpc_rate_time as rt
|
||||
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
||||
@ -233,6 +268,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
rt.start_time as startTime,
|
||||
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
||||
rt.rate_id as rateId,
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee,
|
||||
ra.name as rateName
|
||||
from xhpc_rate_time as rt
|
||||
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
||||
@ -242,30 +279,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeOrderStatistics" resultType="map">
|
||||
select
|
||||
IFNULL(sum(charging_degree),'0') AS chargingDegreeSum,
|
||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
||||
COUNT(DISTINCT user_id) as userIdCount
|
||||
select IFNULL(sum(charging_degree), '0') AS chargingDegreeSum,
|
||||
COUNT(real_time_order_id) as realTimeOrderIdCount,
|
||||
COUNT(DISTINCT user_id) as userIdCount
|
||||
from xhpc_real_time_order
|
||||
where real_time_order_id in (
|
||||
select max(real_time_order_id) from xhpc_real_time_order WHERE to_days(create_time) = to_days(now()) and charging_station_id=#{chargingStationId} and gun_number =#{gunNumber} group by charging_order_id )
|
||||
select max(real_time_order_id)
|
||||
from xhpc_real_time_order
|
||||
WHERE to_days(create_time) = to_days(now())
|
||||
and charging_station_id = #{chargingStationId}
|
||||
and gun_number = #{gunNumber}
|
||||
group by charging_order_id)
|
||||
</select>
|
||||
|
||||
<select id="getWXpNumMessage" resultType="map">
|
||||
select
|
||||
ter.name as terminalName,
|
||||
ter.serial_number as serialNumber,
|
||||
cp.power as power,
|
||||
cp.type as type,
|
||||
cp.max_voltage as maxVoltage,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
ct.parking_instructions as parkingInstructions,
|
||||
ct.create_time as createTime,
|
||||
ter.charging_station_id as chargingStationId
|
||||
select ter.name as terminalName,
|
||||
ter.serial_number as serialNumber,
|
||||
cp.power as power,
|
||||
cp.type as type,
|
||||
cp.max_voltage as maxVoltage,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
ct.parking_instructions as parkingInstructions,
|
||||
ct.create_time as createTime,
|
||||
ter.charging_station_id as chargingStationId
|
||||
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
|
||||
where ter.serial_number=#{pNum} and ter.del_flag = 0
|
||||
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
|
||||
where ter.serial_number = #{pNum}
|
||||
and ter.del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getImageList" resultType="map">
|
||||
@ -275,7 +316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from xhpc_img where del_flag=0 and status=0
|
||||
<if test="imgIds !=null and imgIds.size()>0 ">
|
||||
and img_id in
|
||||
<foreach collection="imgIds" item="chargingStationId" open="(" separator="," close=")">
|
||||
<foreach collection="imgIds" item="chargingStationId" open="(" separator="," close=")">
|
||||
#{chargingStationId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user