|
|
@@ -8,10 +8,7 @@ import com.kym.service.admin.StationService;
|
|
|
import com.kym.service.utils.KymCache;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import static com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNotNull;
|
|
|
|
|
|
@@ -38,7 +35,7 @@ public class StationController {
|
|
|
|
|
|
@SysLog("充电站数据统计")
|
|
|
@GetMapping("/stationStatusDetail")
|
|
|
- R stationStatusDetail(@RequestParam("stationId") String stationId,
|
|
|
+ R<?> stationStatusDetail(@RequestParam("stationId") String stationId,
|
|
|
@RequestParam("startTime") @DateTimeFormat(pattern = "yyyy-MM-dd") String startTime,
|
|
|
@RequestParam("endTime") @DateTimeFormat(pattern = "yyyy-MM-dd") String endTime) {
|
|
|
// 请求en+接口
|
|
|
@@ -46,10 +43,9 @@ public class StationController {
|
|
|
return R.success(response);
|
|
|
}
|
|
|
|
|
|
- // TODO: 2023-09-01 充电站列表(站点id,站点名称,站点编号,站点类型,充电桩数量,站点状态)
|
|
|
-
|
|
|
+ @SysLog("站点列表")
|
|
|
@GetMapping("listStation")
|
|
|
- R listStation(@RequestParam(required = false) String stationName) {
|
|
|
+ R<?> listStation(@RequestParam(required = false) String stationName) {
|
|
|
// 判断数据权限
|
|
|
var adminStationId = kymCache.getAdminUserStationId(StpUtil.getLoginIdAsLong());
|
|
|
var res = stationService.lambdaQuery()
|
|
|
@@ -59,13 +55,20 @@ public class StationController {
|
|
|
return R.success(res);
|
|
|
}
|
|
|
|
|
|
+ @SysLog("修改站点信息")
|
|
|
+ @PutMapping()
|
|
|
+ R<?> modifyStation(@RequestBody Station station){
|
|
|
+ stationService.modifyStation(station);
|
|
|
+ return R.success();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 拉取EN+充电站信息数据并更新本地服务器数据
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/pullEnStations")
|
|
|
- R pullEnStationInfos() {
|
|
|
+ R<?> pullEnStationInfos() {
|
|
|
stationService.pullEnStationInfos();
|
|
|
return R.success();
|
|
|
}
|