Commit 3e08f8645251df7b1313bcb89af1d85ec53bc586
1 parent
e1ba967f
前端增加修复空出接口
Showing
5 changed files
with
31 additions
and
18 deletions
ant-design-vue-jeecg/src/api/api.js
@@ -197,6 +197,8 @@ export const executeAgv = (params) => postAction('/task/agvTask/execute?ids=' + | @@ -197,6 +197,8 @@ export const executeAgv = (params) => postAction('/task/agvTask/execute?ids=' + | ||
197 | export const completeAgv = (params) => postAction('/task/agvTask/complete?ids=' + params, params); | 197 | export const completeAgv = (params) => postAction('/task/agvTask/complete?ids=' + params, params); |
198 | //取消AGV任务 | 198 | //取消AGV任务 |
199 | export const cancelAgv = (params) => postAction('/task/agvTask/cancel?ids=' + params, params); | 199 | export const cancelAgv = (params) => postAction('/task/agvTask/cancel?ids=' + params, params); |
200 | +//修复空出数据 | ||
201 | +export const handleEmptyOut = (params) => postAction('/task/taskHeader/handleEmptyOut?ids=' + params, params); | ||
200 | // 中转HTTP请求 | 202 | // 中转HTTP请求 |
201 | export const transitRESTful = { | 203 | export const transitRESTful = { |
202 | get: (url, parameter) => getAction(getTransitURL(url), parameter), | 204 | get: (url, parameter) => getAction(getTransitURL(url), parameter), |
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -5,21 +5,16 @@ | @@ -5,21 +5,16 @@ | ||
5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> | 5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
6 | <a-row :gutter="24"> | 6 | <a-row :gutter="24"> |
7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | - <a-form-item label="货主"> | ||
9 | - <a-input placeholder="请输入货主" v-model="queryParam.companyCode"></a-input> | ||
10 | - </a-form-item> | ||
11 | - </a-col> | ||
12 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
13 | <a-form-item label="库区"> | 8 | <a-form-item label="库区"> |
14 | <a-input placeholder="请输入库区" v-model="queryParam.zoneCode"></a-input> | 9 | <a-input placeholder="请输入库区" v-model="queryParam.zoneCode"></a-input> |
15 | </a-form-item> | 10 | </a-form-item> |
16 | </a-col> | 11 | </a-col> |
17 | - <template v-if="toggleSearchStatus"> | ||
18 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
19 | <a-form-item label="容器号"> | 13 | <a-form-item label="容器号"> |
20 | <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | 14 | <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> |
21 | </a-form-item> | 15 | </a-form-item> |
22 | </a-col> | 16 | </a-col> |
17 | + <template v-if="toggleSearchStatus"> | ||
23 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 18 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
24 | <a-form-item label="容器状态"> | 19 | <a-form-item label="容器状态"> |
25 | <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.containerStatus" | 20 | <j-dict-select-tag placeholder="请选择容器状态" v-model="queryParam.containerStatus" |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -153,12 +153,14 @@ | @@ -153,12 +153,14 @@ | ||
153 | </template> | 153 | </template> |
154 | 154 | ||
155 | <span slot="action" slot-scope="text, record"> | 155 | <span slot="action" slot-scope="text, record"> |
156 | - <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行</a> | ||
157 | - <a-divider type="vertical"/> | ||
158 | - <a v-if="record.status < 100" v-has="'taskHeader:executeTask'" @click="cancelTask(record)">取消</a> | ||
159 | - <a-divider type="vertical"/> | ||
160 | - <a v-if="record.status < 100" v-has="'taskHeader:executeTask'" @click="completeTask(record)">完成</a> | ||
161 | - <a-divider type="vertical"/> | 156 | + <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行 |
157 | + <a-divider type="vertical"/></a> | ||
158 | + <a v-if="record.isEmptyOut == 1 && record.exceptionState == 0" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)">修复空出数据 | ||
159 | + <a-divider type="vertical"/></a> | ||
160 | + <a v-if="record.status < 100" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消 | ||
161 | + <a-divider type="vertical"/></a> | ||
162 | + <a v-if="record.status < 100" v-has="'taskHeader:completeTask'" @click="completeTask(record)">完成 | ||
163 | + <a-divider type="vertical"/></a> | ||
162 | <a-dropdown> | 164 | <a-dropdown> |
163 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 165 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
164 | <a-menu slot="overlay"> | 166 | <a-menu slot="overlay"> |
@@ -200,7 +202,7 @@ import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelec | @@ -200,7 +202,7 @@ import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelec | ||
200 | import '@/assets/less/TableExpand.less' | 202 | import '@/assets/less/TableExpand.less' |
201 | import {completeTaskByWMS, cancelTask} from '@/api/api' | 203 | import {completeTaskByWMS, cancelTask} from '@/api/api' |
202 | import {execute} from '@/api/api' | 204 | import {execute} from '@/api/api' |
203 | -import {getZoneList} from '@/api/api' | 205 | +import {getZoneList, handleEmptyOut} from '@/api/api' |
204 | import EmptyOutTaskModal from './modules/EmptyOutTaskModal' | 206 | import EmptyOutTaskModal from './modules/EmptyOutTaskModal' |
205 | import ManyEmptyOutTaskModal from "./modules/ManyEmptyOutTaskModal"; | 207 | import ManyEmptyOutTaskModal from "./modules/ManyEmptyOutTaskModal"; |
206 | 208 | ||
@@ -447,6 +449,19 @@ export default { | @@ -447,6 +449,19 @@ export default { | ||
447 | this.searchQuery(); | 449 | this.searchQuery(); |
448 | }); | 450 | }); |
449 | }, | 451 | }, |
452 | + handleEmptyOutTask(record) { | ||
453 | + this.loading = true; | ||
454 | + this.model = Object.assign({}, record); | ||
455 | + handleEmptyOut(this.model.id).then((res) => { | ||
456 | + this.loading = false; | ||
457 | + if (res.success) { | ||
458 | + this.$message.success(res.message); | ||
459 | + } else { | ||
460 | + this.$message.error(res.message); | ||
461 | + } | ||
462 | + this.searchQuery(); | ||
463 | + }); | ||
464 | + }, | ||
450 | getSuperFieldList() { | 465 | getSuperFieldList() { |
451 | let fieldList = []; | 466 | let fieldList = []; |
452 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) | 467 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
@@ -658,8 +658,8 @@ public class TaskHeaderController extends HuahengBaseController { | @@ -658,8 +658,8 @@ public class TaskHeaderController extends HuahengBaseController { | ||
658 | @ApiOperation("修复空出的数据") | 658 | @ApiOperation("修复空出的数据") |
659 | @ResponseBody | 659 | @ResponseBody |
660 | @ApiLogger(apiName = "修复空出的数据", from = "WMS") | 660 | @ApiLogger(apiName = "修复空出的数据", from = "WMS") |
661 | - public Result handleEmptyOut(@RequestBody String taskNo) { | ||
662 | - Result result = taskHeaderService.handleEmptyOut(taskNo); | 661 | + public Result handleEmptyOut(@RequestParam(name = "ids", required = true) String ids) { |
662 | + Result result = taskHeaderService.handleEmptyOut(ids); | ||
663 | return result; | 663 | return result; |
664 | } | 664 | } |
665 | 665 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -4,7 +4,6 @@ import java.io.Serializable; | @@ -4,7 +4,6 @@ import java.io.Serializable; | ||
4 | import java.math.BigDecimal; | 4 | import java.math.BigDecimal; |
5 | import java.util.ArrayList; | 5 | import java.util.ArrayList; |
6 | import java.util.Collection; | 6 | import java.util.Collection; |
7 | -import java.util.Collections; | ||
8 | import java.util.Date; | 7 | import java.util.Date; |
9 | import java.util.List; | 8 | import java.util.List; |
10 | import java.util.stream.Collectors; | 9 | import java.util.stream.Collectors; |
@@ -656,6 +655,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -656,6 +655,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
656 | } | 655 | } |
657 | 656 | ||
658 | @Override | 657 | @Override |
658 | + @Transactional(rollbackFor = Exception.class) | ||
659 | public Result handleEmptyOut(String taskNo) { | 659 | public Result handleEmptyOut(String taskNo) { |
660 | // 1、判断非空字段 | 660 | // 1、判断非空字段 |
661 | if (StringUtils.isEmpty(taskNo)) { | 661 | if (StringUtils.isEmpty(taskNo)) { |
@@ -714,12 +714,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -714,12 +714,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
714 | // 8、删除库存详情失败 | 714 | // 8、删除库存详情失败 |
715 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); | 715 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); |
716 | if (inventoryDetailList.size() != 0) { | 716 | if (inventoryDetailList.size() != 0) { |
717 | - success = inventoryDetailService.removeByIds(inventoryDetailList); | 717 | + List<Integer> idList = inventoryDetailList.stream().map(InventoryDetail::getId).collect(Collectors.toList());; |
718 | + success = inventoryDetailService.removeByIds(idList); | ||
718 | if (!success) { | 719 | if (!success) { |
719 | throw new ServiceException("处理空出失败, 删除库存详情失败"); | 720 | throw new ServiceException("处理空出失败, 删除库存详情失败"); |
720 | } | 721 | } |
721 | } | 722 | } |
722 | - return Result.error("处理空出成功"); | 723 | + return Result.ok("处理空出成功"); |
723 | } | 724 | } |
724 | 725 | ||
725 | @Override | 726 | @Override |