VenueController.ts
5.96 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
import { Page } from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
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";
// 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";
// endregion
/**
* 车辆场地(Venue) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export const VenueController = {
/**
* 新增区域
* @param area
* @return Area
*/
addArea(axios: AxiosStatic, area: any): Promise<AxiosResponse<Area>> {
return axios.post("venue/addArea", area);
},
/**
* 新增车位
* @param parkingSpace
* @return ParkingSpace
*/
addParkingSpace(axios: AxiosStatic, parkingSpace: any): Promise<AxiosResponse<ParkingSpace>> {
return axios.post("venue/addParkingSpace", parkingSpace);
},
/**
* 新增车辆场地
* @param venue
* @return Venue
*/
addVenue(axios: AxiosStatic, venue: any): Promise<AxiosResponse<Venue>> {
return axios.post("venue/addVenue", venue);
},
/**
*/
addVenueUsers(axios: AxiosStatic, users: any, venueId: number): Promise<AxiosResponse<number>> {
return axios.post("venue/addVenueUsers", users, { params: { venueId } });
},
/**
* 启用禁用$车辆场地
* @param venueId
* @return boolean
*/
enableVenue(axios: AxiosStatic, venueId: number, enabled: boolean): Promise<AxiosResponse<boolean>> {
return axios.post("venue/enableVenue", null, { params: { venueId, enabled } });
},
/**
* 根据id查询区域
* @param areaId
* @return Area
*/
getAreaById(axios: AxiosStatic, areaId: number): Promise<AxiosResponse<Area>> {
return axios.get("venue/getAreaById", { params: { areaId } });
},
/**
* 查询全部启用$车辆场地
* @return List
*/
getEnableVenues(axios: AxiosStatic): Promise<AxiosResponse<Venue[]>> {
return axios.get("venue/getEnabledVenues");
},
/**
*/
getEnabledVenueOptionItems(axios: AxiosStatic): Promise<AxiosResponse<VenueOption[]>> {
return axios.get("venue/getEnabledVenueOptionItems");
},
/**
*/
getEnabledVenueOptions(axios: AxiosStatic): Promise<AxiosResponse<CascaderOption[]>> {
return axios.get("venue/getEnabledVenueOptions");
},
/**
*/
getParkingSpaceCountGroupBySpaceType(axios: AxiosStatic, venueId: number): Promise<AxiosResponse<any>> {
return axios.get("venue/getParkingSpaceCountGroupBySpaceType", { params: { venueId } });
},
/**
* 根据id查询车位
* @param areaId
* @return List
*/
getParkingSpacesByAreaId(axios: AxiosStatic, areaId: number): Promise<AxiosResponse<ParkingSpace[]>> {
return axios.get("venue/getParkingSpacesByAreaId", { params: { areaId } });
},
/**
*/
getVehicleCountByVenueId(axios: AxiosStatic, venueId: number): Promise<AxiosResponse<any>> {
return axios.get("venue/getVehicleCountByVenueId", { params: { venueId } });
},
/**
* 根据id查询车辆场地
* @param venueId
* @return Venue
*/
getVenueById(axios: AxiosStatic, venueId: number): Promise<AxiosResponse<Venue>> {
return axios.get("venue/getVenueById", { params: { venueId } });
},
/**
*/
getVenueDetailById(axios: AxiosStatic, venueId: number): Promise<AxiosResponse<Venue>> {
return axios.get("venue/getVenueDetailById", { params: { venueId } });
},
/**
* 查询场地下的用户
* @return List
*/
getVenueUsers(axios: AxiosStatic, venueId: number): Promise<AxiosResponse<User[]>> {
return axios.get("venue/getVenueUsers", { params: { venueId } });
},
/**
* 分页查询区域
* @param pagination
*/
pageArea(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Area>>> {
return axios.post("venue/pageArea", pagination);
},
PAGE_AREA : "venue/pageArea",
/**
* 分页查询车位
* @param pagination
* @return Page
*/
pageParkingSpace(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<ParkingSpace>>> {
return axios.post("venue/pageParkingSpace", pagination);
},
PAGE_PARKING_SPACE : "venue/pageParkingSpace",
/**
* 分页查询车辆场地
* @param pagination
* @return Page
*/
pageVenue(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Venue>>> {
return axios.post("venue/pageVenue", pagination);
},
PAGE_VENUE : "venue/pageVenue",
/**
*/
pageVenueUser(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<User>>> {
return axios.post("venue/pageVenueUser", pagination);
},
PAGE_VENUE_USER : "venue/pageVenueUser",
/**
* 删除区域
* @param areaId
* @return int
*/
removeAreaById(axios: AxiosStatic, areaId: number): Promise<AxiosResponse<number>> {
return axios.delete("venue/removeAreaById", { params: { areaId } });
},
/**
* 删除
* @param venueId
* @return int
*/
removeUserByVenueId(axios: AxiosStatic, venueId: number, userId: number): Promise<AxiosResponse<number>> {
return axios.delete("venue/removeUserByVenueId", { params: { venueId, userId } });
},
/**
* 删除车辆场地
* @param venueId
* @return int
*/
removeVenueById(axios: AxiosStatic, venueId: number): Promise<AxiosResponse<number>> {
return axios.delete("venue/removeVenueById", { params: { venueId } });
},
/**
* 修改区域
* @param area
* @return Area
*/
updateArea(axios: AxiosStatic, area: any): Promise<AxiosResponse<Area>> {
return axios.post("venue/updateArea", area);
},
/**
* 修改车位
* @param parkingSpace
* @return ParkingSpace
*/
updateParkingSpace(axios: AxiosStatic, parkingSpace: any): Promise<AxiosResponse<ParkingSpace>> {
return axios.post("venue/updateParkingSpace", parkingSpace);
},
/**
* 修改车辆场地
* @param venue
* @return Venue
*/
updateVenue(axios: AxiosStatic, venue: any): Promise<AxiosResponse<Venue>> {
return axios.post("venue/updateVenue", venue);
},
// region 前端扩展代码区
// endregion
};