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,38 +12,33 @@ import org.jeecg.modules.wms.config.address.service.IAddressService; | ||
12 | import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; | 12 | import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; |
13 | import org.jeecg.modules.wms.framework.controller.HuahengBaseController; | 13 | import org.jeecg.modules.wms.framework.controller.HuahengBaseController; |
14 | import org.jeecg.modules.wms.task.agvTask.service.IAgvTaskService; | 14 | import org.jeecg.modules.wms.task.agvTask.service.IAgvTaskService; |
15 | -import org.jeecg.utils.HuahengJwtUtil; | ||
16 | import org.jeecg.utils.StringUtils; | 15 | import org.jeecg.utils.StringUtils; |
17 | import org.jeecg.utils.constant.QuantityConstant; | 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 | import cn.monitor4all.logRecord.annotation.OperationLog; | 19 | import cn.monitor4all.logRecord.annotation.OperationLog; |
26 | -import cn.monitor4all.logRecord.context.LogRecordContext; | 20 | +import io.swagger.annotations.Api; |
27 | import io.swagger.annotations.ApiOperation; | 21 | import io.swagger.annotations.ApiOperation; |
28 | 22 | ||
29 | @RestController | 23 | @RestController |
30 | @RequestMapping("/api/wms/acs") | 24 | @RequestMapping("/api/wms/acs") |
25 | +@Api(tags = "AGV接口") | ||
31 | public class AcsController extends HuahengBaseController { | 26 | public class AcsController extends HuahengBaseController { |
32 | 27 | ||
33 | @Resource | 28 | @Resource |
34 | private IAcsService acsService; | 29 | private IAcsService acsService; |
35 | - | 30 | + |
36 | @Resource | 31 | @Resource |
37 | private IAgvTaskService agvTaskService; | 32 | private IAgvTaskService agvTaskService; |
38 | - | 33 | + |
39 | @Resource | 34 | @Resource |
40 | private IAddressService addressService; | 35 | private IAddressService addressService; |
41 | - | 36 | + |
42 | // @PassApiAuthentication | 37 | // @PassApiAuthentication |
43 | // @ApiLogger(apiName = "API接口第三方Token校验测试", from = "TEST") | 38 | // @ApiLogger(apiName = "API接口第三方Token校验测试", from = "TEST") |
44 | @ResponseBody | 39 | @ResponseBody |
45 | @PostMapping(value = "/testTokenCheck") | 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 | public Result<?> testTokenCheck(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { | 42 | public Result<?> testTokenCheck(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { |
48 | // String audience = ApiAuthentication.getInstance().getAudience(); | 43 | // String audience = ApiAuthentication.getInstance().getAudience(); |
49 | // String url = "http://localhost:8080/wms/api/wms/acs/testTokenCheck"; | 44 | // String url = "http://localhost:8080/wms/api/wms/acs/testTokenCheck"; |
@@ -51,13 +46,11 @@ public class AcsController extends HuahengBaseController { | @@ -51,13 +46,11 @@ public class AcsController extends HuahengBaseController { | ||
51 | // String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_AGV_TASK_ASSIGN); | 46 | // String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_AGV_TASK_ASSIGN); |
52 | return Result.ok(); | 47 | return Result.ok(); |
53 | } | 48 | } |
54 | - | ||
55 | 49 | ||
56 | @PostMapping("/notifyAGVTask") | 50 | @PostMapping("/notifyAGVTask") |
57 | @ApiOperation("更新AGV状态") | 51 | @ApiOperation("更新AGV状态") |
58 | @ResponseBody | 52 | @ResponseBody |
59 | @ApiLogger(apiName = "更新AGV状态", from = "ACS") | 53 | @ApiLogger(apiName = "更新AGV状态", from = "ACS") |
60 | - @Transactional(rollbackFor = Exception.class) | ||
61 | public Result notifyAGVTask(@RequestBody AcsStatus acsStatus) { | 54 | public Result notifyAGVTask(@RequestBody AcsStatus acsStatus) { |
62 | if (acsStatus == null) { | 55 | if (acsStatus == null) { |
63 | return Result.error("更新AGV状态,数据为空"); | 56 | return Result.error("更新AGV状态,数据为空"); |