whyclxw
2025-04-25 92d5abeefe20770dbc37bdf68097dd3bfcd1673f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.dto.StationDto;
import com.whyc.pojo.plus_inf.LockInf;
import com.whyc.pojo.plus_inf.StationInf;
import com.whyc.pojo.plus_user.UserInf;
import com.whyc.service.StationInfService;
import com.whyc.service.UserInfService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
 
@RestController
@Api(tags = "机房(左侧列表)管理")
@RequestMapping("stationInf")
public class StationInfController {
    @Autowired
    private StationInfService service;
 
    @ApiOperation(value = "获取左侧列表")
    @GetMapping("getLeftStation")
    public Response getLeftStation(){
        UserInf uinf= ActionUtil.getUser();
        return service.getLeftStation(uinf.getUid());
    }
 
    @ApiOperation(value = "添加机房")
    @PostMapping("addStatiaon")
    public Response addStatiaon(@RequestBody StationInf sinf){
        return service.addStatiaon(sinf);
    }
 
    @ApiOperation(value = "删除机房")
    @GetMapping("delStatiaon")
    public Response delStatiaon(@RequestParam Integer stationId){
        return service.delStatiaon(stationId);
    }
 
    @ApiOperation(value = "修改机房")
    @PostMapping("updateStatiaon")
    public Response updateStatiaon(@RequestBody StationInf sinf){
        return service.updateStatiaon(sinf);
    }
 
    @ApiOperation(value = "查询机房")
    @PostMapping("getStatiaon")
    public Response getStatiaon(@RequestBody StationDto dto){
        return service.getStatiaon(dto);
    }
 
    @ApiOperation(value = "根据stationid和包机组id查询机房名和包机组名")
    @GetMapping("getNamebyId")
    public Response getNamebyId(@RequestParam Integer stationId,@RequestParam Integer baojiId){
        return service.getNamebyId(stationId,baojiId);
    }
 
}