修改终端详情接口,优化代码格式
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,8 +33,8 @@ 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);
|
||||||
@ -41,42 +42,46 @@ public class XhpcChargingPileController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增桩
|
* 新增桩
|
||||||
|
*
|
||||||
* @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());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,8 +89,9 @@ public class XhpcChargingPileController extends BaseController {
|
|||||||
* 删除电站
|
* 删除电站
|
||||||
*/
|
*/
|
||||||
@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,8 +35,8 @@ 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,20 +103,21 @@ public class XhpcChargingStationController extends BaseController {
|
|||||||
//@PreAuthorize(hasPermi = "system:station:remove")
|
//@PreAuthorize(hasPermi = "system:station:remove")
|
||||||
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
//@Log(title = "电站", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/status")
|
@PostMapping("/status")
|
||||||
public AjaxResult status(@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,8 +171,8 @@ 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);
|
||||||
@ -178,57 +181,63 @@ public class XhpcChargingStationController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站详情+站点详情
|
* 电站详情+站点详情
|
||||||
|
*
|
||||||
* @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,8 +35,8 @@ 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);
|
||||||
@ -44,11 +45,12 @@ public class XhpcTerminalController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 停用
|
* 停用
|
||||||
|
*
|
||||||
* @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());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,18 +58,19 @@ public class XhpcTerminalController extends BaseController {
|
|||||||
* 查询
|
* 查询
|
||||||
*/
|
*/
|
||||||
@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());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,8 +78,8 @@ public class XhpcTerminalController extends BaseController {
|
|||||||
* 终端详情
|
* 终端详情
|
||||||
*/
|
*/
|
||||||
@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,6 +15,7 @@ public interface XhpcChargingPileMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 桩列表
|
* 桩列表
|
||||||
|
*
|
||||||
* @param serialNumber 桩编号
|
* @param serialNumber 桩编号
|
||||||
* @param type 桩类型
|
* @param type 桩类型
|
||||||
* @param name 桩名称
|
* @param name 桩名称
|
||||||
@ -57,6 +58,7 @@ public interface XhpcChargingPileMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端列表
|
* 终端列表
|
||||||
|
*
|
||||||
* @param chargingPileId 桩id
|
* @param chargingPileId 桩id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -72,6 +74,7 @@ public interface XhpcChargingPileMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断
|
* 判断
|
||||||
|
*
|
||||||
* @param serialNumber
|
* @param serialNumber
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -79,6 +82,7 @@ public interface XhpcChargingPileMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除终端
|
* 删除终端
|
||||||
|
*
|
||||||
* @param chargingPileId
|
* @param chargingPileId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -29,6 +29,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询电站列表
|
* 查询电站列表
|
||||||
|
*
|
||||||
* @param name 电站名称
|
* @param name 电站名称
|
||||||
* @param operatorName 运营商名称
|
* @param operatorName 运营商名称
|
||||||
* @return 电站集合
|
* @return 电站集合
|
||||||
@ -105,6 +106,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序电站列表
|
* 微信小程序电站列表
|
||||||
|
*
|
||||||
* @param name 电站名称
|
* @param name 电站名称
|
||||||
* @param serviceFacilities 标签集合(服务设施)
|
* @param serviceFacilities 标签集合(服务设施)
|
||||||
* @param code 城市id
|
* @param code 城市id
|
||||||
@ -136,6 +138,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取图片信息
|
* 获取图片信息
|
||||||
|
*
|
||||||
* @param imgIds
|
* @param imgIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -144,6 +147,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站详情---价格详情
|
* 电站详情---价格详情
|
||||||
|
*
|
||||||
* @param chargingStationId 电站ID
|
* @param chargingStationId 电站ID
|
||||||
* @return 电站
|
* @return 电站
|
||||||
*/
|
*/
|
||||||
@ -152,6 +156,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站详情---终端列表
|
* 电站详情---终端列表
|
||||||
|
*
|
||||||
* @param chargingStationId 电站ID
|
* @param chargingStationId 电站ID
|
||||||
* @return 电站
|
* @return 电站
|
||||||
*/
|
*/
|
||||||
@ -199,6 +204,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除之前的费率
|
* 删除之前的费率
|
||||||
|
*
|
||||||
* @param chargingStationId
|
* @param chargingStationId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -206,6 +212,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除之前的费率时段
|
* 删除之前的费率时段
|
||||||
|
*
|
||||||
* @param chargingStationId
|
* @param chargingStationId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -213,6 +220,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据场站id获取桩编号
|
* 根据场站id获取桩编号
|
||||||
|
*
|
||||||
* @param chargingStationId
|
* @param chargingStationId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -220,6 +228,7 @@ public interface XhpcChargingStationMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 按照没30分钟为一段进行分组
|
* 按照没30分钟为一段进行分组
|
||||||
|
*
|
||||||
* @param chargingStationId
|
* @param chargingStationId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -9,6 +9,7 @@ public interface XhpcRateTimeMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断本时间段的电费
|
* 判断本时间段的电费
|
||||||
|
*
|
||||||
* @param date 本地时间(时分秒)
|
* @param date 本地时间(时分秒)
|
||||||
* @param datchargingStationId 电站id
|
* @param datchargingStationId 电站id
|
||||||
* @return
|
* @return
|
||||||
@ -17,6 +18,7 @@ public interface XhpcRateTimeMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取在这个时间段的费率
|
* 获取在这个时间段的费率
|
||||||
|
*
|
||||||
* @param datchargingStationId 电站id
|
* @param datchargingStationId 电站id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -25,11 +27,11 @@ public interface XhpcRateTimeMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取剩余时间费率
|
* 获取剩余时间费率
|
||||||
|
*
|
||||||
* @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,6 +19,7 @@ public interface XhpcTerminalMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* PC端页面统计
|
* PC端页面统计
|
||||||
|
*
|
||||||
* @param chargingStationId 电站id
|
* @param chargingStationId 电站id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -26,6 +27,7 @@ public interface XhpcTerminalMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端列表
|
* 终端列表
|
||||||
|
*
|
||||||
* @param serialNumber 终端编号
|
* @param serialNumber 终端编号
|
||||||
* @param type 桩类型
|
* @param type 桩类型
|
||||||
* @param status 0启用 1停用
|
* @param status 0启用 1停用
|
||||||
@ -60,6 +62,7 @@ public interface XhpcTerminalMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int addXhpcTerminal(XhpcTerminal xhpcTerminal);
|
int addXhpcTerminal(XhpcTerminal xhpcTerminal);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端详情
|
* 终端详情
|
||||||
*/
|
*/
|
||||||
@ -77,6 +80,7 @@ public interface XhpcTerminalMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过终端编号进入小程序开始充电页面
|
* 通过终端编号进入小程序开始充电页面
|
||||||
|
*
|
||||||
* @param pNum 终端编号
|
* @param pNum 终端编号
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -85,8 +89,10 @@ public interface XhpcTerminalMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取图片信息
|
* 获取图片信息
|
||||||
|
*
|
||||||
* @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,6 +14,7 @@ public interface IXhpcChargingPileService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 桩列表
|
* 桩列表
|
||||||
|
*
|
||||||
* @param serialNumber 桩编号
|
* @param serialNumber 桩编号
|
||||||
* @param type 桩类型
|
* @param type 桩类型
|
||||||
* @param name 桩名称
|
* @param name 桩名称
|
||||||
@ -24,6 +25,7 @@ public interface IXhpcChargingPileService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加桩
|
* 添加桩
|
||||||
|
*
|
||||||
* @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,6 +49,7 @@ 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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,7 @@ public interface IXhpcChargingStationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加场点
|
* 添加场点
|
||||||
|
*
|
||||||
* @param xhpcChargingStationDto
|
* @param xhpcChargingStationDto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -109,6 +110,7 @@ public interface IXhpcChargingStationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序电站列表
|
* 微信小程序电站列表
|
||||||
|
*
|
||||||
* @param name 电站名称
|
* @param name 电站名称
|
||||||
* @param serviceFacilities 标签(服务设施)
|
* @param serviceFacilities 标签(服务设施)
|
||||||
* @param code 城市id
|
* @param code 城市id
|
||||||
@ -130,6 +132,7 @@ public interface IXhpcChargingStationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站详情---价格详情
|
* 电站详情---价格详情
|
||||||
|
*
|
||||||
* @param chargingStationId 电站ID
|
* @param chargingStationId 电站ID
|
||||||
* @return 电站
|
* @return 电站
|
||||||
*/
|
*/
|
||||||
@ -138,6 +141,7 @@ public interface IXhpcChargingStationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站详情---终端列表
|
* 电站详情---终端列表
|
||||||
|
*
|
||||||
* @param chargingStationId 电站ID
|
* @param chargingStationId 电站ID
|
||||||
* @return 电站
|
* @return 电站
|
||||||
*/
|
*/
|
||||||
@ -145,6 +149,7 @@ public interface IXhpcChargingStationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑电站(基本信息)
|
* 编辑电站(基本信息)
|
||||||
|
*
|
||||||
* @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,6 +15,7 @@ public interface IXhpcRateTimeService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取本时间段的电费
|
* 获取本时间段的电费
|
||||||
|
*
|
||||||
* @param date
|
* @param date
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -29,6 +29,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 桩列表
|
* 桩列表
|
||||||
|
*
|
||||||
* @param serialNumber 桩编号
|
* @param serialNumber 桩编号
|
||||||
* @param type 桩类型
|
* @param type 桩类型
|
||||||
* @param name 桩名称
|
* @param name 桩名称
|
||||||
@ -36,6 +37,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
|||||||
*/
|
*/
|
||||||
@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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,6 +128,7 @@ 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<>();
|
||||||
@ -138,6 +141,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
|
|||||||
|
|
||||||
@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,6 +150,7 @@ 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) {
|
||||||
|
|||||||
@ -51,8 +51,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
* @return 电站
|
* @return 电站
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId)
|
public XhpcChargingStation selectXhpcChargingStationById(Long chargingStationId) {
|
||||||
{
|
|
||||||
return xhpcChargingStationMapper.selectXhpcChargingStationById(chargingStationId);
|
return xhpcChargingStationMapper.selectXhpcChargingStationById(chargingStationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,8 +64,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
* @return 电站
|
* @return 电站
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String,Object>> selectXhpcChargingStationList(String name,String operatorName)
|
public List<Map<String, Object>> selectXhpcChargingStationList(String name, String operatorName) {
|
||||||
{
|
|
||||||
//桩的统计、该时段金额
|
//桩的统计、该时段金额
|
||||||
List<Map<String, Object>> list = xhpcChargingStationMapper.selectXhpcChargingStationList(name, operatorName);
|
List<Map<String, Object>> list = xhpcChargingStationMapper.selectXhpcChargingStationList(name, operatorName);
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@ -94,8 +93,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation)
|
public int insertXhpcChargingStation(XhpcChargingStation xhpcChargingStation) {
|
||||||
{
|
|
||||||
xhpcChargingStation.setCreateTime(DateUtils.getNowDate());
|
xhpcChargingStation.setCreateTime(DateUtils.getNowDate());
|
||||||
return xhpcChargingStationMapper.insertXhpcChargingStation(xhpcChargingStation);
|
return xhpcChargingStationMapper.insertXhpcChargingStation(xhpcChargingStation);
|
||||||
}
|
}
|
||||||
@ -107,8 +106,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation)
|
public int updateXhpcChargingStation(XhpcChargingStation xhpcChargingStation) {
|
||||||
{
|
|
||||||
xhpcChargingStation.setUpdateTime(DateUtils.getNowDate());
|
xhpcChargingStation.setUpdateTime(DateUtils.getNowDate());
|
||||||
return xhpcChargingStationMapper.updateXhpcChargingStation(xhpcChargingStation);
|
return xhpcChargingStationMapper.updateXhpcChargingStation(xhpcChargingStation);
|
||||||
}
|
}
|
||||||
@ -120,8 +119,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateXhpcChargingStationByIds(Long[] chargingStationIds)
|
public int updateXhpcChargingStationByIds(Long[] chargingStationIds) {
|
||||||
{
|
|
||||||
return xhpcChargingStationMapper.updateXhpcChargingStationByIds(chargingStationIds);
|
return xhpcChargingStationMapper.updateXhpcChargingStationByIds(chargingStationIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +131,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateXhpcChargingStationById(Long chargingStationId)
|
public int updateXhpcChargingStationById(Long chargingStationId) {
|
||||||
{
|
|
||||||
int i = xhpcChargingStationMapper.updateXhpcChargingStationById(chargingStationId);
|
int i = xhpcChargingStationMapper.updateXhpcChargingStationById(chargingStationId);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
extracted(1, chargingStationId);
|
extracted(1, chargingStationId);
|
||||||
@ -150,6 +149,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int status(Integer status, Long chargingStationId) {
|
public int status(Integer status, Long chargingStationId) {
|
||||||
|
|
||||||
if (status != null && (status == 0 || status == 1)) {
|
if (status != null && (status == 0 || status == 1)) {
|
||||||
xhpcChargingStationMapper.status(status, chargingStationId);
|
xhpcChargingStationMapper.status(status, chargingStationId);
|
||||||
extracted(status, chargingStationId);
|
extracted(status, chargingStationId);
|
||||||
@ -159,7 +159,6 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APP端、小程序是否可见
|
* APP端、小程序是否可见
|
||||||
*
|
*
|
||||||
@ -199,6 +198,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> stationInternetBlackList(Long chargingStationId) {
|
public List<Map<String, Object>> stationInternetBlackList(Long chargingStationId) {
|
||||||
|
|
||||||
return xhpcChargingStationMapper.stationInternetBlackList(chargingStationId);
|
return xhpcChargingStationMapper.stationInternetBlackList(chargingStationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +249,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < xhpcChargingStationDto.getXhpcRateTimeList().size(); i++) {
|
for (int i = 0; i < xhpcChargingStationDto.getXhpcRateTimeList().size(); i++) {
|
||||||
String id = xhpcChargingStationDto.getXhpcRateTimeList().get(i).getId();
|
String id = xhpcChargingStationDto.getXhpcRateTimeList().get(i).getId();
|
||||||
if("00".equals(id)||"01".equals(id)||"02".equals(id)||"03".equals(id)){}else{
|
if ("00".equals(id) || "01".equals(id) || "02".equals(id) || "03".equals(id)) {
|
||||||
|
} else {
|
||||||
return AjaxResult.error("1003", "费率id格式不对");
|
return AjaxResult.error("1003", "费率id格式不对");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -266,7 +267,8 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
Pattern compile = Pattern.compile(pattern);
|
Pattern compile = Pattern.compile(pattern);
|
||||||
Matcher m = compile.matcher(start);
|
Matcher m = compile.matcher(start);
|
||||||
|
|
||||||
if("00".equals(id)||"01".equals(id)||"02".equals(id)||"03".equals(id)){}else{
|
if ("00".equals(id) || "01".equals(id) || "02".equals(id) || "03".equals(id)) {
|
||||||
|
} else {
|
||||||
return AjaxResult.error("1003", "费率id格式不对");
|
return AjaxResult.error("1003", "费率id格式不对");
|
||||||
}
|
}
|
||||||
boolean isMatch = m.matches();
|
boolean isMatch = m.matches();
|
||||||
@ -509,6 +511,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 场站详情接口
|
* 场站详情接口
|
||||||
|
*
|
||||||
* @param chargingStationId
|
* @param chargingStationId
|
||||||
* @param type 1编辑使用 2详情使用
|
* @param type 1编辑使用 2详情使用
|
||||||
* @return
|
* @return
|
||||||
@ -545,6 +548,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int addXhpcRateTime(Long chargingStationId, Long rateModelId, Long defaultPeriodId, String startTime, String endTime, int sort, int type, String rateValue) {
|
private int addXhpcRateTime(Long chargingStationId, Long rateModelId, Long defaultPeriodId, String startTime, String endTime, int sort, int type, String rateValue) {
|
||||||
|
|
||||||
XhpcRateTime xhpcRateTime = new XhpcRateTime();
|
XhpcRateTime xhpcRateTime = new XhpcRateTime();
|
||||||
xhpcRateTime.setChargingStationId(chargingStationId);
|
xhpcRateTime.setChargingStationId(chargingStationId);
|
||||||
xhpcRateTime.setRateId(defaultPeriodId);
|
xhpcRateTime.setRateId(defaultPeriodId);
|
||||||
@ -649,6 +653,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getWXXhpcRateTimeMassage(Long chargingStationId) {
|
public List<Map<String, Object>> getWXXhpcRateTimeMassage(Long chargingStationId) {
|
||||||
|
|
||||||
return xhpcChargingStationMapper.getWXXhpcRateTimeMassage(chargingStationId);
|
return xhpcChargingStationMapper.getWXXhpcRateTimeMassage(chargingStationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -857,6 +862,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 0 添加 1删除
|
* 0 添加 1删除
|
||||||
|
*
|
||||||
* @param status
|
* @param status
|
||||||
* @param chargingStationId
|
* @param chargingStationId
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -19,8 +19,10 @@ public class XhpcRateTimeServiceImpl implements IXhpcRateTimeService{
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private XhpcRateTimeMapper xhpcRateTimeMapper;
|
private XhpcRateTimeMapper xhpcRateTimeMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取本时间段的电费
|
* 获取本时间段的电费
|
||||||
|
*
|
||||||
* @param date
|
* @param date
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -25,11 +25,13 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +43,7 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService{
|
|||||||
|
|
||||||
@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);
|
||||||
|
|||||||
@ -35,7 +35,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<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>
|
||||||
|
|||||||
@ -35,7 +35,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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,
|
||||||
@ -258,10 +299,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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,36 +782,44 @@ 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>
|
||||||
|
|||||||
@ -25,28 +25,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,15 +23,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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,
|
||||||
@ -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,
|
||||||
@ -265,7 +305,8 @@ 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.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