Commit 2fee472575181fea0ef9db0207ab29d74ce8237e
1 parent
314e1fee
修改接口地址 api/wms 改成api
Showing
13 changed files
with
60 additions
and
26 deletions
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
... | ... | @@ -187,14 +187,15 @@ |
187 | 187 | <a>回传</a> |
188 | 188 | </a-popconfirm> |
189 | 189 | <a v-if="record.lastStatus < 800" @click="autoShipmentCombine(record)">自动配盘</a> |
190 | - <a-divider type="vertical"/> | |
191 | - <a v-has="'shipmentHeader:edit'" @click="handleEdit(record)">编辑</a> | |
192 | 190 | |
193 | 191 | <a-divider type="vertical"/> |
194 | 192 | <a-dropdown> |
195 | 193 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
196 | - <a-menu slot="overlay" v-has="'shipmentHeader:delete'"> | |
197 | - <a-menu-item> | |
194 | + <a-menu slot="overlay"> | |
195 | + <a-menu-item v-has="'shipmentHeader:edit'"> | |
196 | + <a @click="handleEdit(record)">编辑</a> | |
197 | + </a-menu-item> | |
198 | + <a-menu-item v-has="'shipmentHeader:delete'"> | |
198 | 199 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
199 | 200 | <a>删除</a> |
200 | 201 | </a-popconfirm> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/controller/AcsController.java
... | ... | @@ -21,7 +21,7 @@ import io.swagger.annotations.Api; |
21 | 21 | import io.swagger.annotations.ApiOperation; |
22 | 22 | |
23 | 23 | @RestController |
24 | -@RequestMapping("/api/wms/acs") | |
24 | +@RequestMapping("/api/acs") | |
25 | 25 | @Api(tags = "AGV接口") |
26 | 26 | public class AcsController extends HuahengBaseController { |
27 | 27 | |
... | ... | @@ -58,7 +58,6 @@ public class AcsController extends HuahengBaseController { |
58 | 58 | String taskNo = acsStatus.getTaskNo(); |
59 | 59 | String carNo = acsStatus.getCarNo(); |
60 | 60 | int status = acsStatus.getStatus(); |
61 | - String updateBy = acsStatus.getUpdateBy(); | |
62 | 61 | if (StringUtils.isEmpty(taskNo)) { |
63 | 62 | return Result.error("更新AGV状态,任务号为空"); |
64 | 63 | } |
... | ... | @@ -68,14 +67,12 @@ public class AcsController extends HuahengBaseController { |
68 | 67 | if (status == 0) { |
69 | 68 | return Result.error("更新AGV状态,状态信息为空"); |
70 | 69 | } |
71 | - if (StringUtils.isEmpty(updateBy)) { | |
72 | - return Result.error("更新AGV状态,更新者信息为空"); | |
73 | - } | |
74 | 70 | if (status == QuantityConstant.TASK_STATUS_COMPLETED) { |
75 | 71 | Result result = agvTaskService.completeAgvTask(Integer.parseInt(taskNo)); |
76 | 72 | return result; |
77 | 73 | } |
78 | - Result result = acsService.notifyAGVTask(taskNo, carNo, status, updateBy); | |
74 | + System.out.println(""); | |
75 | + Result result = acsService.notifyAGVTask(taskNo, carNo, status); | |
79 | 76 | return result; |
80 | 77 | } |
81 | 78 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/entity/AcsStatus.java
1 | 1 | package org.jeecg.modules.wms.api.acs.entity; |
2 | 2 | |
3 | +import io.swagger.annotations.ApiModelProperty; | |
3 | 4 | import lombok.Data; |
4 | 5 | |
5 | 6 | /** |
... | ... | @@ -8,9 +9,10 @@ import lombok.Data; |
8 | 9 | @Data |
9 | 10 | public class AcsStatus { |
10 | 11 | |
12 | + @ApiModelProperty(value = "WMS任务号", required = true) | |
11 | 13 | private String taskNo; |
14 | + @ApiModelProperty(value = "小车编号") | |
12 | 15 | private String carNo; |
16 | + @ApiModelProperty(value = "任务状态", required = true) | |
13 | 17 | private int status; |
14 | - private String updateBy; | |
15 | - | |
16 | 18 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/service/IAcsService.java
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/service/impl/AcsServiceImpl.java
... | ... | @@ -122,14 +122,13 @@ public class AcsServiceImpl implements IAcsService { |
122 | 122 | } |
123 | 123 | |
124 | 124 | @Override |
125 | - public Result notifyAGVTask(String taskNo, String carNo, int status, String updateBy) { | |
125 | + public Result notifyAGVTask(String taskNo, String carNo, int status) { | |
126 | 126 | AgvTask agvTask = agvTaskService.getById(taskNo); |
127 | 127 | if (agvTask == null) { |
128 | 128 | return Result.error("没有找到对应AGV任务,任务号为" + taskNo); |
129 | 129 | } |
130 | 130 | agvTask.setStatus(status); |
131 | 131 | agvTask.setCarno(carNo); |
132 | - agvTask.setUpdateBy(updateBy); | |
133 | 132 | boolean result = agvTaskService.updateById(agvTask); |
134 | 133 | if (!result) { |
135 | 134 | return Result.error("更新任务信息失败 "); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/controller/ErpController.java
... | ... | @@ -16,11 +16,15 @@ import org.jeecg.modules.wms.framework.controller.HuahengBaseController; |
16 | 16 | import org.jeecg.utils.HuahengJwtUtil; |
17 | 17 | import org.springframework.web.bind.annotation.*; |
18 | 18 | |
19 | +import io.swagger.annotations.Api; | |
20 | +import io.swagger.annotations.ApiOperation; | |
21 | + | |
19 | 22 | /** |
20 | 23 | * @author 游杰 |
21 | 24 | */ |
22 | 25 | @RestController |
23 | -@RequestMapping("/api/wms/erp") | |
26 | +@RequestMapping("/api/erp") | |
27 | +@Api(tags = "ERP接口") | |
24 | 28 | public class ErpController extends HuahengBaseController { |
25 | 29 | |
26 | 30 | @Resource |
... | ... | @@ -28,6 +32,7 @@ public class ErpController extends HuahengBaseController { |
28 | 32 | |
29 | 33 | @PostMapping("/receipt") |
30 | 34 | @ResponseBody |
35 | + @ApiOperation("入库单下发") | |
31 | 36 | @ApiLogger(apiName = "入库单下发", from = "ERP") |
32 | 37 | public Result receipt(@RequestBody ErpReceipt erpReceipt, @RequestHeader(value = "token", required = false) String token) { |
33 | 38 | String operator = HuahengJwtUtil.getAudienceByToken(token); |
... | ... | @@ -36,6 +41,7 @@ public class ErpController extends HuahengBaseController { |
36 | 41 | |
37 | 42 | @PostMapping("/cancelReceipt") |
38 | 43 | @ResponseBody |
44 | + @ApiOperation("取消入库单") | |
39 | 45 | @ApiLogger(apiName = "取消入库单", from = "ERP") |
40 | 46 | public Result cancelReceipt(@RequestBody Map<String, String> param, HttpServletRequest req) { |
41 | 47 | String referCode = param.get("referCode"); |
... | ... | @@ -45,6 +51,7 @@ public class ErpController extends HuahengBaseController { |
45 | 51 | |
46 | 52 | @PostMapping("/shipment") |
47 | 53 | @ResponseBody |
54 | + @ApiOperation("出库单下发") | |
48 | 55 | @ApiLogger(apiName = "出库单下发", from = "ERP") |
49 | 56 | public Result shipment(@RequestBody ErpShipment erpShipment) { |
50 | 57 | return erpService.shipment(erpShipment); |
... | ... | @@ -52,6 +59,7 @@ public class ErpController extends HuahengBaseController { |
52 | 59 | |
53 | 60 | @PostMapping("/cancelShipment") |
54 | 61 | @ResponseBody |
62 | + @ApiOperation("取消出库单") | |
55 | 63 | @ApiLogger(apiName = "取消出库单", from = "ERP") |
56 | 64 | public Result cancelShipment(@RequestBody Map<String, String> param, HttpServletRequest req) { |
57 | 65 | String referCode = param.get("referCode"); |
... | ... | @@ -61,6 +69,7 @@ public class ErpController extends HuahengBaseController { |
61 | 69 | |
62 | 70 | @PostMapping("/searchInventory") |
63 | 71 | @ResponseBody |
72 | + @ApiOperation("查询库存") | |
64 | 73 | @ApiLogger(apiName = "查询库存", from = "ERP") |
65 | 74 | public Result searchInventory(@RequestBody InventoryQueryParam inventoryQueryParam, HttpServletRequest req) { |
66 | 75 | Result result = erpService.searchInventory(inventoryQueryParam); |
... | ... | @@ -69,6 +78,7 @@ public class ErpController extends HuahengBaseController { |
69 | 78 | |
70 | 79 | @PostMapping("/addMaterial") |
71 | 80 | @ResponseBody |
81 | + @ApiOperation("增加物料") | |
72 | 82 | @ApiLogger(apiName = "增加物料", from = "ERP") |
73 | 83 | public Result addMaterial(@RequestBody Material material) { |
74 | 84 | return erpService.addMaterial(material); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/entity/ErpMaterial.java
0 → 100644
1 | +package org.jeecg.modules.wms.api.erp.entity; | |
2 | + | |
3 | +import io.swagger.annotations.ApiModelProperty; | |
4 | +import lombok.Data; | |
5 | + | |
6 | +@Data | |
7 | +public class ErpMaterial { | |
8 | + | |
9 | + @ApiModelProperty(value = "物料编码", required = true) | |
10 | + private String code; | |
11 | + @ApiModelProperty(value = "物料名称", required = true) | |
12 | + private String name; | |
13 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/controller/MesController.java
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/controller/WcsController.java
... | ... | @@ -22,7 +22,7 @@ import org.jeecg.utils.constant.QuantityConstant; |
22 | 22 | import org.springframework.web.bind.annotation.*; |
23 | 23 | |
24 | 24 | @RestController |
25 | -@RequestMapping("/api/wms") | |
25 | +@RequestMapping("/api/wcs") | |
26 | 26 | public class WcsController extends HuahengBaseController { |
27 | 27 | |
28 | 28 | @Resource |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java
... | ... | @@ -10,6 +10,7 @@ import org.springframework.context.annotation.Bean; |
10 | 10 | import org.springframework.context.annotation.Configuration; |
11 | 11 | import org.springframework.context.annotation.Import; |
12 | 12 | import org.springframework.web.bind.annotation.RestController; |
13 | +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | |
13 | 14 | |
14 | 15 | import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; |
15 | 16 | |
... | ... | @@ -31,6 +32,17 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; |
31 | 32 | public class Swagger3Config extends Swagger2Config { |
32 | 33 | |
33 | 34 | /** |
35 | + * 显示swagger-ui.html文档展示页,还必须注入swagger资源: | |
36 | + * @param registry | |
37 | + */ | |
38 | + @Override | |
39 | + public void addResourceHandlers(ResourceHandlerRegistry registry) { | |
40 | + registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); | |
41 | + registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/"); | |
42 | + registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); | |
43 | + } | |
44 | + | |
45 | + /** | |
34 | 46 | * swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等 |
35 | 47 | * @return Docket |
36 | 48 | */ |
... | ... | @@ -39,7 +51,7 @@ public class Swagger3Config extends Swagger2Config { |
39 | 51 | public Docket defaultApi2() { |
40 | 52 | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() |
41 | 53 | // 此包路径下的类,才生成接口文档 |
42 | - .apis(RequestHandlerSelectors.basePackage("org.jeecg")) | |
54 | + .apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.wms.api")) | |
43 | 55 | // 加了ApiOperation注解的类,才生成接口文档 |
44 | 56 | .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class)).apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
45 | 57 | .paths(PathSelectors.any()).build().securitySchemes(Collections.singletonList(securityScheme())).securityContexts(securityContexts()); |
... | ... |
huaheng-wms-core/src/main/resources/application-dev.yml
... | ... | @@ -196,7 +196,7 @@ jeecg: |
196 | 196 | #webapp文件路径 |
197 | 197 | webapp: /opt/webapp |
198 | 198 | shiro: |
199 | - excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/test/test**,/api/wms/**,/sys/cas/client/validateLogin | |
199 | + excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/test/test**,/api/**,/sys/cas/client/validateLogin | |
200 | 200 | #阿里云oss存储和大鱼短信秘钥配置 |
201 | 201 | oss: |
202 | 202 | accessKey: ?? |
... | ... | @@ -204,10 +204,10 @@ jeecg: |
204 | 204 | endpoint: oss-cn-beijing.aliyuncs.com |
205 | 205 | bucketName: jeecgdev |
206 | 206 | # ElasticSearch 6设置 |
207 | - elasticsearch: | |
208 | - cluster-name: jeecg-ES | |
209 | - cluster-nodes: 127.0.0.1:9200 | |
210 | - check-enabled: false | |
207 | + elasticsearch:a | |
208 | + cluster-name: jeecg-ES | |
209 | + cluster-nodes: 127.0.0.1:9200 | |
210 | + check-enabled: false | |
211 | 211 | # 表单设计器配置 |
212 | 212 | desform: |
213 | 213 | # 主题颜色(仅支持 16进制颜色代码) |
... | ... |
huaheng-wms-core/src/main/resources/application-prod.yml
... | ... | @@ -194,7 +194,7 @@ jeecg: |
194 | 194 | #webapp文件路径 |
195 | 195 | webapp: /opt/jeecg-boot/webapp |
196 | 196 | shiro: |
197 | - excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/test/test**,/api/wms/**,/sys/cas/client/validateLogin | |
197 | + excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/test/test**,/api/**,/sys/cas/client/validateLogin | |
198 | 198 | #阿里云oss存储和大鱼短信秘钥配置 |
199 | 199 | oss: |
200 | 200 | accessKey: ?? |
... | ... |
huaheng-wms-core/src/main/resources/application-test.yml
... | ... | @@ -196,7 +196,7 @@ jeecg: |
196 | 196 | #webapp文件路径 |
197 | 197 | webapp: /opt/webapp |
198 | 198 | shiro: |
199 | - excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/api/wms/**,/sys/cas/client/validateLogin | |
199 | + excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/api/**,/sys/cas/client/validateLogin | |
200 | 200 | #阿里云oss存储和大鱼短信秘钥配置 |
201 | 201 | oss: |
202 | 202 | accessKey: ?? |
... | ... |