VenueController.ts
6.64 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Area} from "lib/src/entity/venue/entity/Area";
import {ParkingSpace} from "lib/src/entity/venue/entity/ParkingSpace";
import {Venue} from "lib/src/entity/venue/entity/Venue";
import {Page} from "autumn-vue/lib/core/page/Page";
import {CascaderOption} from "lib/src/domain/CascaderOption";
import {User} from "lib/src/entity/security/entity/User";
import {VenueOption} from "lib/src/entity/venue/domain/VenueOption";
// endregion
/**
* 车辆场地(Venue) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export class VenueController{
/**
* 新增区域
* @param area
* @return Area
*/
static addArea(axios:AxiosStatic, area: any): Promise<AxiosResponse<Area>> {
return axios.post('venue/addArea', area);
}
/**
* 新增车位
* @param parkingSpace
* @return ParkingSpace
*/
static addParkingSpace(axios:AxiosStatic, parkingSpace: any): Promise<AxiosResponse<ParkingSpace>> {
return axios.post('venue/addParkingSpace', parkingSpace);
}
/**
* 新增车辆场地
* @param venue
* @return Venue
*/
static addVenue(axios:AxiosStatic, venue: any): Promise<AxiosResponse<Venue>> {
return axios.post('venue/addVenue', venue);
}
/**
*/
static addVenueUsers(axios:AxiosStatic, users: any, venueId: number): Promise<AxiosResponse<number>> {
return axios.post('venue/addVenueUsers', users, {params: {venueId: venueId}});
}
/**
* 启用禁用$车辆场地
* @param venueId
* @return boolean
*/
static enableVenue(axios:AxiosStatic, venueId: number, enabled: boolean): Promise<AxiosResponse<boolean>> {
return axios.post('venue/enableVenue', null, {params: {venueId: venueId,enabled: enabled}});
}
/**
* 根据id查询区域
* @param areaId
* @return Area
*/
static getAreaById(axios:AxiosStatic, areaId: number): Promise<AxiosResponse<Area>> {
return axios.get('venue/getAreaById', {params: {areaId: areaId}});
}
/**
* 查询全部启用$车辆场地
* @return List
*/
static getEnableVenues(axios:AxiosStatic): Promise<AxiosResponse<Venue[]>> {
return axios.get('venue/getEnabledVenues');
}
/**
*/
static getEnabledVenueOptionItems(axios:AxiosStatic): Promise<AxiosResponse<VenueOption[]>> {
return axios.get('venue/getEnabledVenueOptionItems');
}
/**
*/
static getEnabledVenueOptions(axios:AxiosStatic): Promise<AxiosResponse<CascaderOption[]>> {
return axios.get('venue/getEnabledVenueOptions');
}
/**
*/
static getParkingSpaceCountGroupBySpaceType(axios:AxiosStatic, venueId: number): Promise<AxiosResponse<any>> {
return axios.get('venue/getParkingSpaceCountGroupBySpaceType', {params: {venueId: venueId}});
}
/**
* 根据id查询车位
* @param areaId
* @return List
*/
static getParkingSpacesByAreaId(axios:AxiosStatic, areaId: number): Promise<AxiosResponse<ParkingSpace[]>> {
return axios.get('venue/getParkingSpacesByAreaId', {params: {areaId: areaId}});
}
/**
*/
static getVehicleCountByVenueId(axios:AxiosStatic, venueId: number): Promise<AxiosResponse<any>> {
return axios.get('venue/getVehicleCountByVenueId', {params: {venueId: venueId}});
}
/**
* 根据id查询车辆场地
* @param venueId
* @return Venue
*/
static getVenueById(axios:AxiosStatic, venueId: number): Promise<AxiosResponse<Venue>> {
return axios.get('venue/getVenueById', {params: {venueId: venueId}});
}
/**
*/
static getVenueDetailById(axios:AxiosStatic, venueId: number): Promise<AxiosResponse<Venue>> {
return axios.get('venue/getVenueDetailById', {params: {venueId: venueId}});
}
/**
* 查询场地下的用户
* @return List
*/
static getVenueUsers(axios:AxiosStatic, venueId: number): Promise<AxiosResponse<User[]>> {
return axios.get('venue/getVenueUsers', {params: {venueId: venueId}});
}
/**
* 分页查询区域
* @param pagination
*/
static pageArea(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Area>>> {
return axios.post('venue/pageArea', pagination);
}
static PAGE_AREA = 'venue/pageArea';
/**
* 分页查询车位
* @param pagination
* @return Page
*/
static pageParkingSpace(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ParkingSpace>>> {
return axios.post('venue/pageParkingSpace', pagination);
}
static PAGE_PARKING_SPACE = 'venue/pageParkingSpace';
/**
* 分页查询车辆场地
* @param pagination
* @return Page
*/
static pageVenue(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Venue>>> {
return axios.post('venue/pageVenue', pagination);
}
static PAGE_VENUE = 'venue/pageVenue';
/**
*/
static pageVenueUser(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<User>>> {
return axios.post('venue/pageVenueUser', pagination);
}
static PAGE_VENUE_USER = 'venue/pageVenueUser';
/**
* 删除区域
* @param areaId
* @return int
*/
static removeAreaById(axios:AxiosStatic, areaId: number): Promise<AxiosResponse<number>> {
return axios.delete('venue/removeAreaById', {params: {areaId: areaId}});
}
/**
* 删除
* @param venueId
* @return int
*/
static removeUserByVenueId(axios:AxiosStatic, venueId: number, userId: number): Promise<AxiosResponse<number>> {
return axios.delete('venue/removeUserByVenueId', {params: {venueId: venueId,userId: userId}});
}
/**
* 删除车辆场地
* @param venueId
* @return int
*/
static removeVenueById(axios:AxiosStatic, venueId: number): Promise<AxiosResponse<number>> {
return axios.delete('venue/removeVenueById', {params: {venueId: venueId}});
}
/**
* 修改区域
* @param area
* @return Area
*/
static updateArea(axios:AxiosStatic, area: any): Promise<AxiosResponse<Area>> {
return axios.post('venue/updateArea', area);
}
/**
* 修改车位
* @param parkingSpace
* @return ParkingSpace
*/
static updateParkingSpace(axios:AxiosStatic, parkingSpace: any): Promise<AxiosResponse<ParkingSpace>> {
return axios.post('venue/updateParkingSpace', parkingSpace);
}
/**
* 修改车辆场地
* @param venue
* @return Venue
*/
static updateVenue(axios:AxiosStatic, venue: any): Promise<AxiosResponse<Venue>> {
return axios.post('venue/updateVenue', venue);
}
// region 前端扩展代码区
// endregion
}