Commit 314e1feef3ea9b2c4414664180a6f144de4a96d2
1 parent
1675b450
ACS controller 增加swagger api
Showing
1 changed file
with
7 additions
and
14 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java
... | ... | @@ -12,38 +12,33 @@ import org.jeecg.modules.wms.config.address.service.IAddressService; |
12 | 12 | import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; |
13 | 13 | import org.jeecg.modules.wms.framework.controller.HuahengBaseController; |
14 | 14 | import org.jeecg.modules.wms.task.agvTask.service.IAgvTaskService; |
15 | -import org.jeecg.utils.HuahengJwtUtil; | |
16 | 15 | import org.jeecg.utils.StringUtils; |
17 | 16 | import org.jeecg.utils.constant.QuantityConstant; |
18 | -import org.springframework.transaction.annotation.Transactional; | |
19 | -import org.springframework.web.bind.annotation.PostMapping; | |
20 | -import org.springframework.web.bind.annotation.RequestBody; | |
21 | -import org.springframework.web.bind.annotation.RequestMapping; | |
22 | -import org.springframework.web.bind.annotation.ResponseBody; | |
23 | -import org.springframework.web.bind.annotation.RestController; | |
17 | +import org.springframework.web.bind.annotation.*; | |
24 | 18 | |
25 | 19 | import cn.monitor4all.logRecord.annotation.OperationLog; |
26 | -import cn.monitor4all.logRecord.context.LogRecordContext; | |
20 | +import io.swagger.annotations.Api; | |
27 | 21 | import io.swagger.annotations.ApiOperation; |
28 | 22 | |
29 | 23 | @RestController |
30 | 24 | @RequestMapping("/api/wms/acs") |
25 | +@Api(tags = "AGV接口") | |
31 | 26 | public class AcsController extends HuahengBaseController { |
32 | 27 | |
33 | 28 | @Resource |
34 | 29 | private IAcsService acsService; |
35 | - | |
30 | + | |
36 | 31 | @Resource |
37 | 32 | private IAgvTaskService agvTaskService; |
38 | - | |
33 | + | |
39 | 34 | @Resource |
40 | 35 | private IAddressService addressService; |
41 | - | |
36 | + | |
42 | 37 | // @PassApiAuthentication |
43 | 38 | // @ApiLogger(apiName = "API接口第三方Token校验测试", from = "TEST") |
44 | 39 | @ResponseBody |
45 | 40 | @PostMapping(value = "/testTokenCheck") |
46 | - @OperationLog(bizType = "'物料追踪'", tag = "'入库完成'", bizId = "#paramMap.get('bizId')",extra = "#jsonString", msg = "'测试操作日志'", recordReturnValue = true) | |
41 | + @OperationLog(bizType = "'物料追踪'", tag = "'入库完成'", bizId = "#paramMap.get('bizId')", extra = "#jsonString", msg = "'测试操作日志'", recordReturnValue = true) | |
47 | 42 | public Result<?> testTokenCheck(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { |
48 | 43 | // String audience = ApiAuthentication.getInstance().getAudience(); |
49 | 44 | // String url = "http://localhost:8080/wms/api/wms/acs/testTokenCheck"; |
... | ... | @@ -51,13 +46,11 @@ public class AcsController extends HuahengBaseController { |
51 | 46 | // String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_AGV_TASK_ASSIGN); |
52 | 47 | return Result.ok(); |
53 | 48 | } |
54 | - | |
55 | 49 | |
56 | 50 | @PostMapping("/notifyAGVTask") |
57 | 51 | @ApiOperation("更新AGV状态") |
58 | 52 | @ResponseBody |
59 | 53 | @ApiLogger(apiName = "更新AGV状态", from = "ACS") |
60 | - @Transactional(rollbackFor = Exception.class) | |
61 | 54 | public Result notifyAGVTask(@RequestBody AcsStatus acsStatus) { |
62 | 55 | if (acsStatus == null) { |
63 | 56 | return Result.error("更新AGV状态,数据为空"); |
... | ... |