RescueConfigController.java
17.5 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
package cn.com.glsx.entmicro.controller.drainage;
import cn.com.glsx.entmicro.model.response.DracRescueAppletVO;
import cn.com.glsx.entmicro.model.response.DracRescueStaffFollowVO;
import cn.com.glsx.entmicro.model.response.DracRescueStaffVO;
import cn.com.glsx.entmicro.request.DefaultRequest;
import cn.com.glsx.entmicro.request.drainage.rescue.*;
import cn.com.glsx.entmicro.response.drainage.rescue.*;
import cn.com.glsx.entmicro.service.drainage.DracImService;
import cn.com.glsx.entmicro.utils.Pagination;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
import java.util.List;
/**
* @ClassName RescueController
* @Description 道路救援卡
* @Author lichongyuan
* @Date 2022/8/5
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("道路救援卡")
@Slf4j
public class RescueConfigController {
@Resource
private DracImService dracImService;
/**
* 编辑救援卡
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.config.updateConfig",needInSession = NeedInSessionType.YES)
@ApiOperation("编辑救援卡")
public RopResponse<Boolean> updateConfig(DracRescueConfigSaveRopRequest dracRescueConfigSaveRopRequest) {
try {
dracImService.updateConfig(dracRescueConfigSaveRopRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__updateConfig__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 救援卡详情
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.config.getConfigDetail",needInSession = NeedInSessionType.YES)
@ApiOperation("救援卡详情")
public RopResponse<DracRescueConfigDetailRopResponse> getConfigDetail(DracSearchRescueRopRequest dracSearchRescueRopRequest) {
try {
DracRescueConfigDetailRopResponse configDetail = dracImService.getConfigDetail(dracSearchRescueRopRequest);
return RopResponse.success(configDetail);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__getConfigDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 救援卡联系方式列表
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.listContact",needInSession = NeedInSessionType.YES)
@ApiOperation("救援卡联系方式列表")
public RopResponse<List<DracRescueContactListRopResponse>> listContact(DracSearchRescueRopRequest dracSearchRescueRopRequest) {
try {
List<DracRescueContactListRopResponse> dracRescueContactListRopResponses = dracImService.listContact(dracSearchRescueRopRequest);
return RopResponse.success(dracRescueContactListRopResponses);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__listContact__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 删除联系方式
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.deleteContact",needInSession = NeedInSessionType.YES)
@ApiOperation("删除联系方式")
public RopResponse<Boolean> deleteContact(DracRescueDeleteRopRequest dracRescueDeleteRopRequest) {
try {
dracImService.deleteContact(dracRescueDeleteRopRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__deleteContact__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 保存联系方式
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.saveContact",needInSession = NeedInSessionType.YES)
@ApiOperation("保存联系方式")
public RopResponse<Boolean> saveContact(DracRescueContactSaveRopRequest dracRescueContactSaveRopRequest) {
try {
dracImService.saveContact(dracRescueContactSaveRopRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__saveContact__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 编辑联系方式
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.updateContact",needInSession = NeedInSessionType.YES)
@ApiOperation("编辑联系方式")
public RopResponse<Boolean> updateContact(DracRescueContactSaveRopRequest dracRescueContactSaveRopRequest) {
try {
dracImService.updateContact(dracRescueContactSaveRopRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__updateContact__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 道路救援卡客户列表查询接口
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.listCustomer",needInSession = NeedInSessionType.YES)
@ApiOperation("道路救援卡客户列表查询接口")
public RopResponse<Pagination<DracRescueFollowRopResponse>> listCustomer(DracSearchRescueCustomerRopRequest dracSearchRescueCustomerRopRequest) {
try {
return RopResponse.success(dracImService.listCustomer(dracSearchRescueCustomerRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__listCustomer__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 客户列表导出
*
* @param dracSearchRescueCustomerExportRopRequest
* @return
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.listCustomerExport",needInSession = NeedInSessionType.YES)
@ApiOperation("客户列表导出")
public RopResponse<String> listCustomerExport(DracSearchRescueCustomerExportRopRequest dracSearchRescueCustomerExportRopRequest) {
try {
return RopResponse.success(dracImService.listCustomerExport(dracSearchRescueCustomerExportRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__listCustomerExport__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 获取道路救援卡小程序客户页面
*
* @param dracRescueAppleRopRequest 获取道路救援小程序页面请求参数
* @return 获取道路救援卡小程序客户页面
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.getRescueCustomerView",needInSession = NeedInSessionType.NO)
@ApiOperation("获取道路救援卡小程序客户页面接口")
public RopResponse<DracRescueAppletVO> getRescueCustomerView(DracRescueAppleRopRequest dracRescueAppleRopRequest) {
try {
return RopResponse.success(dracImService.getRescueCustomerView(dracRescueAppleRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__getRescueCustomerView__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 刷新生成企微员工二维码
*
* @param dracRescueAppleRopRequest 刷新生成企微员工二维码请求参数
* @return 企微员工二维码
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.getRescueStaffCode",needInSession = NeedInSessionType.YES)
@ApiOperation("刷新生成企微员工二维码接口")
public RopResponse<String> getRescueStaffCode(DracRescueAppleRopRequest dracRescueAppleRopRequest) {
try {
return RopResponse.success(dracImService.getRescueStaffCode(dracRescueAppleRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__getRescueStaffCode__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 道路救援卡小程序重新定位
*
* @param dracRescueAppleRopRequest 刷新生成企微员工二维码请求参数
* @return 定位更新结果
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.rescueReacquireLocation",needInSession = NeedInSessionType.NO)
@ApiOperation("道路救援卡小程序重新定位接口")
public RopResponse<Boolean> rescueReacquireLocation(DracRescueAppleRopRequest dracRescueAppleRopRequest) {
try {
return RopResponse.success(dracImService.rescueReacquireLocation(dracRescueAppleRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__rescueReacquireLocation__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 校验首次进入页面
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.config.validFirst",needInSession = NeedInSessionType.YES)
@ApiOperation("校验首次进入页面")
public RopResponse<Boolean> validFirst(DracRescueConfigSaveRopRequest dracRescueConfigSaveRopRequest) {
try {
dracImService.validFirst(dracRescueConfigSaveRopRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__validFirst__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 道路救援员工跟进详情
*
* @param dracRescueStaffFollwRopRequest 道路救援员工跟进详情请求参数
* @return 道路救援员工跟进详情
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.rescueStaffFollowDetail",needInSession = NeedInSessionType.YES)
@ApiOperation("道路救援员工跟进详情接口")
public RopResponse<DracRescueStaffFollowVO> rescueStaffFollowDetail(DracRescueStaffFollwRopRequest dracRescueStaffFollwRopRequest) {
try {
return RopResponse.success(dracImService.rescueStaffFollowDetail(dracRescueStaffFollwRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__rescueStaffFollowDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 道路救援员工跟进结果
*
* @param dracRescueStaffFollwRopRequest 道路救援员工跟进结果请求参数
* @return 道路救援员工跟进结果
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.rescueStaffFollowResult",needInSession = NeedInSessionType.YES)
@ApiOperation("道路救援员工跟进结果接口")
public RopResponse<Boolean> rescueStaffFollowResult(DracRescueStaffFollwRopRequest dracRescueStaffFollwRopRequest) {
try {
return RopResponse.success(dracImService.rescueStaffFollowResult(dracRescueStaffFollwRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__rescueStaffFollowResult__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 道路救援卡员工跟进列表
*
* @param dracRescueStaffFollwRopRequest 道路救援卡员工跟进列表请求参数
* @return 道路救援卡员工跟进列表
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.getRescueStaffFollowList",needInSession = NeedInSessionType.YES)
@ApiOperation("道路救援卡员工跟进列表接口")
public RopResponse<DracRescueStaffVO> getRescueStaffFollowList(DracRescueStaffFollwRopRequest dracRescueStaffFollwRopRequest) {
try {
return RopResponse.success(dracImService.getRescueStaffFollowList(dracRescueStaffFollwRopRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__getRescueStaffFollowList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 道路救援跟进类型
*
* @param ropRequest 道路救援跟进类型请求参数
* @return 道路救援跟进类型
*/
@ServiceMethod(method = "entmicro.api.drac.rescue.findDictByRescueFollowType",needInSession = NeedInSessionType.YES)
@ApiOperation("道路救援跟进结果类型接口")
public RopResponse<List<String>> findDictByRescueFollowType(DefaultRequest ropRequest) {
try {
return RopResponse.success(dracImService.findDictByRescueFollowType(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__getRescueStaffFollowList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.move.car.code.bind",needInSession = NeedInSessionType.YES)
@ApiOperation("车主绑定挪车码")
public RopResponse<Boolean> moveCarCodeBind(MoveCarCodeBindRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.moveCarCodeBind(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__moveCarCodeBind__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.move.car.code.check",needInSession = NeedInSessionType.NO)
@ApiOperation("挪车码校验是否被绑定")
public RopResponse<Integer> moveCarCodeCheck(MoveCarCodeCheckRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.moveCarCodeCheck(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__moveCarCodeCheck__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.move.car.code.bind.ax",needInSession = NeedInSessionType.NO)
@ApiOperation("调用百度接口绑定车主和X虚拟号码(返回值为虚拟号码X)")
public RopResponse<String> moveCarCodeBindAX(MoveCarCodeBindAXRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.moveCarCodeBindAX(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__moveCarCodeBindAX__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.move.car.code.bind.update",needInSession = NeedInSessionType.YES)
@ApiOperation("修改挪车码绑定信息")
public RopResponse<Boolean> moveCarCodeBindUpdate(MoveCarCodeBindUpdateRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.moveCarCodeBindUpdate(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__moveCarCodeBindUpdate__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.move.car.code.bind.get",needInSession = NeedInSessionType.NO)
@ApiOperation("挪车码绑定信息获取")
public RopResponse<MoveCarCodeBindRopResponse> moveCarCodeBindGet(MoveCarCodeBindGetRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.moveCarCodeBindGet(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__moveCarCodeBindGet__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.card.scan.record.save",needInSession = NeedInSessionType.YES)
@ApiOperation("救援码扫码信息保存")
public RopResponse<Boolean> rescueCardScanRecordSave(RescueCardScanRecordRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.rescueCardScanRecordSave(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__rescueCardScanRecordSave__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.drac.rescue.card.scan.record.page",needInSession = NeedInSessionType.YES)
@ApiOperation("救援码扫码信息分页查询")
public RopResponse<Pagination<RescueCardScanRecordRopResponse>> rescueCardScanRecordPage(RescueCardScanRecordPageRopRequest ropRequest) {
try {
return RopResponse.success(dracImService.rescueCardScanRecordPage(ropRequest));
} catch (RpcServiceException e) {
log.info("=======RescueConfigController__invoke__rescueCardScanRecordPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}