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