Commit c410144579feb22b61fd120d0fbbad7235cc9cf8
1 parent
836b91c8
1. 开发空托盘组入库、出库。 托盘跨站功能
2. 开发任务取消功能
Showing
44 changed files
with
4152 additions
and
265 deletions
Too many changes to show.
To preserve performance only 42 of 44 files are displayed.
jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
... | ... | @@ -125,6 +125,8 @@ export const createReceiptTask = (params)=>postAction('/receipt/receiptContainer |
125 | 125 | export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/completeTaskByWMS', params); |
126 | 126 | //下发任务给WCS |
127 | 127 | export const execute = (params)=>postAction('/task/taskHeader/execute', params); |
128 | +//取消任务 | |
129 | +export const cancelTask = (params)=>postAction('/task/taskHeader/cancelTask?1', params); | |
128 | 130 | //自动配盘 |
129 | 131 | export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params); |
130 | 132 | //创建出库任务 |
... | ... | @@ -133,6 +135,26 @@ export const createShipmentTask = (params)=>postAction('/shipment/shipmentCombin |
133 | 135 | export const selectSortingPort = (params)=>postAction('/shipment/shipmentCombination/selectSortingPort', params); |
134 | 136 | //选择入库分拣口 |
135 | 137 | export const selectSupplePort = (params)=>postAction('/receipt/receiptContainerHeader/selectSupplePort', params); |
138 | +//创建空托盘入库任务 | |
139 | +export const createEmptyIn = (params)=>postAction('/task/taskHeader/createEmptyIn', params); | |
140 | +//创建空托盘出库任务 | |
141 | +export const createEmptyOut = (params)=>postAction('/task/taskHeader/createEmptyOut', params); | |
142 | +//选择出库整出口 | |
143 | +export const selectOutPort = (params)=>postAction('/task/taskHeader/selectOutPort', params); | |
144 | +//选择出库分拣口 | |
145 | +export const selectPickPort = (params)=>postAction('/task/taskHeader/selectPickPort', params); | |
146 | +//创建移库任务 | |
147 | +export const createTransferTask = (params)=>postAction('/task/taskHeader/createTransferTask', params); | |
148 | +//创建出库查看任务 | |
149 | +export const createCheckOutTask = (params)=>postAction('/task/taskHeader/createCheckOutTask', params); | |
150 | +//选择站台 | |
151 | +export const selectPort = (params)=>postAction('/task/taskHeader/selectPort', params); | |
152 | +//创建跨站任务 | |
153 | +export const createOverStationTask = (params)=>postAction('/task/taskHeader/createOverStationTask', params); | |
154 | +//创建空托盘组入库任务 | |
155 | +export const createManyEmptyIn = (params)=>postAction('/task/taskHeader/createManyEmptyIn', params); | |
156 | +//创建空托盘组出库任务 | |
157 | +export const createManyEmptyOut = (params)=>postAction('/task/taskHeader/createManyEmptyOut', params); | |
136 | 158 | |
137 | 159 | // 中转HTTP请求 |
138 | 160 | export const transitRESTful = { |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/LocationList.vue
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
... | ... | @@ -41,6 +41,12 @@ |
41 | 41 | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
42 | 42 | @change="handleTableChange"> |
43 | 43 | |
44 | + <span slot="companyCode" slot-scope="companyCode"> | |
45 | + <a-tag :key="companyCode" color=blue> | |
46 | + {{ solutionCompany(companyCode) }} | |
47 | + </a-tag> | |
48 | + </span> | |
49 | + | |
44 | 50 | <template slot="htmlSlot" slot-scope="text"> |
45 | 51 | <div v-html="text"></div> |
46 | 52 | </template> |
... | ... | @@ -80,6 +86,7 @@ |
80 | 86 | |
81 | 87 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
82 | 88 | import InventoryDetailModal from './modules/InventoryDetailModal' |
89 | + import {getCompanyList} from '@/api/api' | |
83 | 90 | |
84 | 91 | export default { |
85 | 92 | name: "InventoryDetailList", |
... | ... | @@ -109,6 +116,7 @@ |
109 | 116 | return { |
110 | 117 | description: '库存表管理页面', |
111 | 118 | disableMixinCreated:true, |
119 | + companyList:[], | |
112 | 120 | // 表头 |
113 | 121 | columns: [ |
114 | 122 | { |
... | ... | @@ -119,7 +127,9 @@ |
119 | 127 | { |
120 | 128 | title:'货主', |
121 | 129 | align:"center", |
122 | - dataIndex: 'companyCode' | |
130 | + dataIndex: 'companyCode', | |
131 | + key: 'companyCode', | |
132 | + scopedSlots: { customRender: 'companyCode' } | |
123 | 133 | }, |
124 | 134 | { |
125 | 135 | title:'库区', |
... | ... | @@ -233,6 +243,7 @@ |
233 | 243 | } |
234 | 244 | }, |
235 | 245 | created() { |
246 | + this.loadFrom(); | |
236 | 247 | }, |
237 | 248 | computed: { |
238 | 249 | importExcelUrl(){ |
... | ... | @@ -240,6 +251,23 @@ |
240 | 251 | } |
241 | 252 | }, |
242 | 253 | methods: { |
254 | + loadFrom() { | |
255 | + getCompanyList().then((res) => { | |
256 | + if (res.success) { | |
257 | + this.companyList = res.result | |
258 | + } | |
259 | + }); | |
260 | + }, | |
261 | + solutionCompany(value) { | |
262 | + var actions = [] | |
263 | + Object.keys(this.companyList).some((key) => { | |
264 | + if (this.companyList[key].code == ('' + value)) { | |
265 | + actions.push(this.companyList[key].name) | |
266 | + return true | |
267 | + } | |
268 | + }) | |
269 | + return actions.join('') | |
270 | + }, | |
243 | 271 | clearList(){ |
244 | 272 | this.dataSource=[] |
245 | 273 | this.selectedRowKeys=[] |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
... | ... | @@ -6,7 +6,14 @@ |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | 8 | <a-form-item label="货主"> |
9 | - <a-input placeholder="请输入货主" v-model="queryParam.companyCode"></a-input> | |
9 | + <a-select | |
10 | + show-search | |
11 | + placeholder="请选择货主" | |
12 | + option-filter-prop="children" | |
13 | + :filter-option="filterOption" | |
14 | + v-model="queryParam.companyCode"> | |
15 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
16 | + </a-select> | |
10 | 17 | </a-form-item> |
11 | 18 | </a-col> |
12 | 19 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
... | ... | @@ -121,6 +128,12 @@ |
121 | 128 | class="j-table-force-nowrap" |
122 | 129 | @change="handleTableChange"> |
123 | 130 | |
131 | + <span slot="companyCode" slot-scope="companyCode"> | |
132 | + <a-tag :key="companyCode" color=blue> | |
133 | + {{ solutionCompany(companyCode) }} | |
134 | + </a-tag> | |
135 | + </span> | |
136 | + | |
124 | 137 | <template slot="htmlSlot" slot-scope="text"> |
125 | 138 | <div v-html="text"></div> |
126 | 139 | </template> |
... | ... | @@ -174,6 +187,7 @@ |
174 | 187 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
175 | 188 | import InventoryTransactionModal from './modules/InventoryTransactionModal' |
176 | 189 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
190 | + import {getCompanyList} from '@/api/api' | |
177 | 191 | |
178 | 192 | export default { |
179 | 193 | name: 'InventoryTransactionList', |
... | ... | @@ -184,6 +198,7 @@ |
184 | 198 | data () { |
185 | 199 | return { |
186 | 200 | description: '库存交易记录管理页面', |
201 | + companyList:[], | |
187 | 202 | // 表头 |
188 | 203 | columns: [ |
189 | 204 | { |
... | ... | @@ -194,7 +209,9 @@ |
194 | 209 | { |
195 | 210 | title:'货主', |
196 | 211 | align:"center", |
197 | - dataIndex: 'companyCode' | |
212 | + dataIndex: 'companyCode', | |
213 | + key: 'companyCode', | |
214 | + scopedSlots: { customRender: 'companyCode' } | |
198 | 215 | }, |
199 | 216 | { |
200 | 217 | title:'容器编码', |
... | ... | @@ -202,9 +219,14 @@ |
202 | 219 | dataIndex: 'containerCode' |
203 | 220 | }, |
204 | 221 | { |
205 | - title:'库位编码', | |
222 | + title:'起始库位编码', | |
223 | + align:"center", | |
224 | + dataIndex: 'fromLocationCode' | |
225 | + }, | |
226 | + { | |
227 | + title:'目标库位编码', | |
206 | 228 | align:"center", |
207 | - dataIndex: 'locationCode' | |
229 | + dataIndex: 'toLocationCode' | |
208 | 230 | }, |
209 | 231 | { |
210 | 232 | title:'交易类型', |
... | ... | @@ -234,7 +256,7 @@ |
234 | 256 | { |
235 | 257 | title:'库存状态', |
236 | 258 | align:"center", |
237 | - dataIndex: 'inventoryStatus' | |
259 | + dataIndex: 'inventoryStatus_dictText' | |
238 | 260 | }, |
239 | 261 | { |
240 | 262 | title:'数量', |
... | ... | @@ -288,7 +310,8 @@ |
288 | 310 | } |
289 | 311 | }, |
290 | 312 | created() { |
291 | - this.getSuperFieldList(); | |
313 | + this.getSuperFieldList(); | |
314 | + this.loadFrom(); | |
292 | 315 | }, |
293 | 316 | computed: { |
294 | 317 | importExcelUrl: function(){ |
... | ... | @@ -298,6 +321,24 @@ |
298 | 321 | methods: { |
299 | 322 | initDictConfig(){ |
300 | 323 | }, |
324 | + loadFrom() { | |
325 | + console.log("loadFrom 11"); | |
326 | + getCompanyList().then((res) => { | |
327 | + if (res.success) { | |
328 | + this.companyList = res.result | |
329 | + } | |
330 | + }); | |
331 | + }, | |
332 | + solutionCompany(value) { | |
333 | + var actions = [] | |
334 | + Object.keys(this.companyList).some((key) => { | |
335 | + if (this.companyList[key].code == ('' + value)) { | |
336 | + actions.push(this.companyList[key].name) | |
337 | + return true | |
338 | + } | |
339 | + }) | |
340 | + return actions.join('') | |
341 | + }, | |
301 | 342 | getSuperFieldList(){ |
302 | 343 | let fieldList=[]; |
303 | 344 | fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... | ... | @@ -114,7 +114,8 @@ |
114 | 114 | <span slot="action" slot-scope="text, record"> |
115 | 115 | <a @click="handleEdit(record)">编辑</a> |
116 | 116 | <a-divider type="vertical" /> |
117 | - <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)">生成任务</a> | |
117 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" >生成任务</a> | |
118 | + <a v-else-if="record.status == 0" @click="createTask(record)">生成任务</a> | |
118 | 119 | <a-divider type="vertical" /> |
119 | 120 | <a-dropdown> |
120 | 121 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
... | ... | @@ -290,10 +291,8 @@ |
290 | 291 | }, |
291 | 292 | createTask(record) { |
292 | 293 | this.loading = true; |
293 | - const that = this; | |
294 | 294 | this.model = Object.assign({}, record); |
295 | - that.querySource.id = record.id; | |
296 | - createReceiptTask(that.querySource).then((res) => { | |
295 | + createReceiptTask(this.model).then((res) => { | |
297 | 296 | this.loading = false; |
298 | 297 | if (res.success) { |
299 | 298 | this.$message.success(res.message); |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | |
34 | 34 | import { httpAction } from '@/api/manage' |
35 | 35 | import { validateDuplicateValue } from '@/utils/util' |
36 | - import {createShipmentTask} from '@/api/api' | |
36 | + import {createReceiptTask} from '@/api/api' | |
37 | 37 | import {selectSupplePort} from '@/api/api' |
38 | 38 | |
39 | 39 | export default { |
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | data () { |
52 | 52 | return { |
53 | 53 | title:"操作", |
54 | - width:800, | |
54 | + width:500, | |
55 | 55 | visible: false, |
56 | 56 | model:{ |
57 | 57 | }, |
... | ... | @@ -96,7 +96,7 @@ |
96 | 96 | this.$refs.form.validate(valid => { |
97 | 97 | if (valid) { |
98 | 98 | that.confirmLoading = true; |
99 | - createShipmentTask(this.model).then((res) => { | |
99 | + createReceiptTask(this.model).then((res) => { | |
100 | 100 | if(res.success){ |
101 | 101 | that.$message.success(res.message); |
102 | 102 | that.$emit('ok'); |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
... | ... | @@ -166,7 +166,8 @@ |
166 | 166 | </template> |
167 | 167 | |
168 | 168 | <span slot="action" slot-scope="text, record"> |
169 | - <a @click="autoShipmentCombine(record)">自动配盘</a> | |
169 | + <a-divider type="vertical" /> | |
170 | + <a v-if="record.lastStatus < 800" @click="autoShipmentCombine(record)">自动配盘</a> | |
170 | 171 | <a-divider type="vertical" /> |
171 | 172 | <a @click="handleEdit(record)">编辑</a> |
172 | 173 | |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false"> | |
3 | + <!-- 查询区域 --> | |
4 | + <div class="table-page-search-wrapper"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
6 | + <a-row :gutter="24"> | |
7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
8 | + <a-form-item label="任务类型"> | |
9 | + <j-dict-select-tag placeholder="请选择任务类型" v-model="queryParam.taskType" dictCode="task_type"/> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
13 | + <a-form-item label="容器号"> | |
14 | + <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <template v-if="toggleSearchStatus"> | |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | + <a-form-item label="库区"> | |
20 | + <a-select | |
21 | + show-search | |
22 | + placeholder="请选择库区" | |
23 | + option-filter-prop="children" | |
24 | + :filter-option="filterOption" | |
25 | + v-model="queryParam.zoneCode" | |
26 | + style="width: 200px"> | |
27 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-item> | |
30 | + </a-col> | |
31 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
32 | + <a-form-item label="起始库位"> | |
33 | + <a-input placeholder="请输入起始库位" v-model="queryParam.fromLocationCode"></a-input> | |
34 | + </a-form-item> | |
35 | + </a-col> | |
36 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
37 | + <a-form-item label="目标库位"> | |
38 | + <a-input placeholder="请输入目标库位" v-model="queryParam.toLocationCode"></a-input> | |
39 | + </a-form-item> | |
40 | + </a-col> | |
41 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
42 | + <a-form-item label="是否空出"> | |
43 | + <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | |
44 | + </a-form-item> | |
45 | + </a-col> | |
46 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
47 | + <a-form-item label="起始出入口"> | |
48 | + <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | |
49 | + </a-form-item> | |
50 | + </a-col> | |
51 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
52 | + <a-form-item label="目标出入口"> | |
53 | + <a-input placeholder="请输入目标出入口" v-model="queryParam.toPortCode"></a-input> | |
54 | + </a-form-item> | |
55 | + </a-col> | |
56 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
57 | + <a-form-item label="任务状态"> | |
58 | + <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> | |
59 | + </a-form-item> | |
60 | + </a-col> | |
61 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
62 | + <a-form-item label="是否重入"> | |
63 | + <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | |
64 | + </a-form-item> | |
65 | + </a-col> | |
66 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
67 | + <a-form-item label="重入库位号"> | |
68 | + <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | |
69 | + </a-form-item> | |
70 | + </a-col> | |
71 | + <a-col :xl="10" :lg="11" :md="12" :sm="24"> | |
72 | + <a-form-item label="创建日期"> | |
73 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date> | |
74 | + <span class="query-group-split-cust"></span> | |
75 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date> | |
76 | + </a-form-item> | |
77 | + </a-col> | |
78 | + </template> | |
79 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
80 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
81 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
82 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
83 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
84 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
85 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
86 | + </a> | |
87 | + </span> | |
88 | + </a-col> | |
89 | + </a-row> | |
90 | + </a-form> | |
91 | + </div> | |
92 | + <!-- 查询区域-END --> | |
93 | + | |
94 | + <!-- 操作按钮区域 --> | |
95 | + <div class="table-operator"> | |
96 | + <a-button @click="createCheckOut()" type="primary">出库查看</a-button> | |
97 | +<!-- <a-button type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>--> | |
98 | +<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> | |
99 | +<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
100 | +<!-- </a-upload>--> | |
101 | +<!-- <!– 高级查询区域 –>--> | |
102 | +<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> | |
103 | + </div> | |
104 | + | |
105 | + <!-- table区域-begin --> | |
106 | + <div> | |
107 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
108 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
109 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
110 | + </div> | |
111 | + | |
112 | + <a-table | |
113 | + ref="table" | |
114 | + size="middle" | |
115 | + bordered | |
116 | + rowKey="id" | |
117 | + class="j-table-force-nowrap" | |
118 | + :scroll="{x:true}" | |
119 | + :columns="columns" | |
120 | + :dataSource="dataSource" | |
121 | + :pagination="ipagination" | |
122 | + :loading="loading" | |
123 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | |
124 | + :customRow="clickThenSelect" | |
125 | + @change="handleTableChange"> | |
126 | + | |
127 | + <span slot="zoneCode" slot-scope="zoneCode"> | |
128 | + <a-tag :key="zoneCode" color=blue> | |
129 | + {{ solutionZoneCode(zoneCode) }} | |
130 | + </a-tag> | |
131 | + </span> | |
132 | + | |
133 | + <template slot="htmlSlot" slot-scope="text"> | |
134 | + <div v-html="text"></div> | |
135 | + </template> | |
136 | + <template slot="imgSlot" slot-scope="text"> | |
137 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
138 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
139 | + </template> | |
140 | + <template slot="fileSlot" slot-scope="text"> | |
141 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
142 | + <a-button | |
143 | + v-else | |
144 | + :ghost="true" | |
145 | + type="primary" | |
146 | + icon="download" | |
147 | + size="small" | |
148 | + @click="downloadFile(text)"> | |
149 | + 下载 | |
150 | + </a-button> | |
151 | + </template> | |
152 | + | |
153 | + <span slot="action" slot-scope="text, record"> | |
154 | + <a v-if="record.status == 1" @click="executeTask(record)">执行</a> | |
155 | + <a-divider type="vertical" /> | |
156 | + <a v-if="record.status < 100" @click="completeTask(record)">完成</a> | |
157 | + <a-divider type="vertical" /> | |
158 | + <a-dropdown> | |
159 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
160 | + <a-menu slot="overlay"> | |
161 | + <a-menu-item> | |
162 | + <a @click="handleEdit(record)">编辑</a> | |
163 | + </a-menu-item> | |
164 | + <a-menu-item> | |
165 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
166 | + <a>删除</a> | |
167 | + </a-popconfirm> | |
168 | + </a-menu-item> | |
169 | + </a-menu> | |
170 | + </a-dropdown> | |
171 | + </span> | |
172 | + | |
173 | + </a-table> | |
174 | + </div> | |
175 | + | |
176 | + <a-tabs defaultActiveKey="1"> | |
177 | + <a-tab-pane tab="任务详情" key="1" > | |
178 | + <TaskDetailList :mainId="selectedMainId" /> | |
179 | + </a-tab-pane> | |
180 | + </a-tabs> | |
181 | + | |
182 | + <taskHeader-modal ref="modalForm" @ok="modalFormOk"></taskHeader-modal> | |
183 | + <check-out-task-modal ref="checkOutModal" @ok="modalFormOk"></check-out-task-modal> | |
184 | + </a-card> | |
185 | +</template> | |
186 | + | |
187 | +<script> | |
188 | + | |
189 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
190 | + import TaskHeaderModal from './modules/TaskHeaderModal' | |
191 | + import { getAction } from '@/api/manage' | |
192 | + import TaskDetailList from './TaskDetailList' | |
193 | + import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |
194 | + import '@/assets/less/TableExpand.less' | |
195 | + import {completeTaskByWMS} from '@/api/api' | |
196 | + import {execute} from '@/api/api' | |
197 | + import {getZoneList} from '@/api/api' | |
198 | + import EmptyInTaskModal from './modules/EmptyInTaskModal' | |
199 | + import CheckOutTaskModal from "./modules/CheckOutTaskModal"; | |
200 | + | |
201 | + export default { | |
202 | + name: "TaskHeaderList", | |
203 | + mixins:[JeecgListMixin], | |
204 | + components: { | |
205 | + CheckOutTaskModal, | |
206 | + EmptyInTaskModal, | |
207 | + TaskDetailList, | |
208 | + TaskHeaderModal | |
209 | + }, | |
210 | + data () { | |
211 | + return { | |
212 | + description: '任务表管理页面', | |
213 | + zoneList:[], | |
214 | + // 表头 | |
215 | + columns: [ | |
216 | + { | |
217 | + title:'任务ID', | |
218 | + align:"center", | |
219 | + dataIndex: 'id', | |
220 | + }, | |
221 | + { | |
222 | + title:'任务类型', | |
223 | + align:"center", | |
224 | + dataIndex: 'taskType_dictText', | |
225 | + }, | |
226 | + { | |
227 | + title:'容器号', | |
228 | + align:"center", | |
229 | + dataIndex: 'containerCode' | |
230 | + }, | |
231 | + { | |
232 | + title:'库区', | |
233 | + align:"center", | |
234 | + dataIndex: 'zoneCode', | |
235 | + key: 'zoneCode', | |
236 | + scopedSlots: { customRender: 'zoneCode' } | |
237 | + }, | |
238 | + { | |
239 | + title:'起始库位', | |
240 | + align:"center", | |
241 | + dataIndex: 'fromLocationCode' | |
242 | + }, | |
243 | + { | |
244 | + title:'目标库位', | |
245 | + align:"center", | |
246 | + dataIndex: 'toLocationCode' | |
247 | + }, | |
248 | + { | |
249 | + title:'目标出入口', | |
250 | + align:"center", | |
251 | + dataIndex: 'toPortCode' | |
252 | + }, | |
253 | + { | |
254 | + title:'任务状态', | |
255 | + align:"center", | |
256 | + dataIndex: 'status_dictText', | |
257 | + }, | |
258 | + { | |
259 | + title:'是否重入', | |
260 | + align:"center", | |
261 | + dataIndex: 'isDoubleIn_dictText', | |
262 | + }, | |
263 | + { | |
264 | + title:'重入库位号', | |
265 | + align:"center", | |
266 | + dataIndex: 'originLocationCode' | |
267 | + }, | |
268 | + { | |
269 | + title:'创建人', | |
270 | + align:"center", | |
271 | + dataIndex: 'createBy' | |
272 | + }, | |
273 | + { | |
274 | + title:'创建日期', | |
275 | + align:"center", | |
276 | + dataIndex: 'createTime' | |
277 | + }, | |
278 | + { | |
279 | + title:'更新人', | |
280 | + align:"center", | |
281 | + dataIndex: 'updateBy' | |
282 | + }, | |
283 | + { | |
284 | + title:'更新日期', | |
285 | + align:"center", | |
286 | + dataIndex: 'updateTime' | |
287 | + }, | |
288 | + { | |
289 | + title: '操作', | |
290 | + dataIndex: 'action', | |
291 | + align:"center", | |
292 | + fixed:"right", | |
293 | + width:147, | |
294 | + scopedSlots: { customRender: 'action' }, | |
295 | + } | |
296 | + ], | |
297 | + url: { | |
298 | + list: "/task/taskHeader/list", | |
299 | + delete: "/task/taskHeader/delete", | |
300 | + deleteBatch: "/task/taskHeader/deleteBatch", | |
301 | + exportXlsUrl: "/task/taskHeader/exportXls", | |
302 | + importExcelUrl: "task/taskHeader/importExcel", | |
303 | + }, | |
304 | + dictOptions:{ | |
305 | + taskType:[], | |
306 | + isEmptyOut:[], | |
307 | + isDoubleIn:[], | |
308 | + status:[], | |
309 | + }, | |
310 | + /* 分页参数 */ | |
311 | + ipagination:{ | |
312 | + current: 1, | |
313 | + pageSize: 5, | |
314 | + pageSizeOptions: ['5', '10', '50'], | |
315 | + showTotal: (total, range) => { | |
316 | + return range[0] + "-" + range[1] + " 共" + total + "条" | |
317 | + }, | |
318 | + showQuickJumper: true, | |
319 | + showSizeChanger: true, | |
320 | + total: 0 | |
321 | + }, | |
322 | + selectedMainId:'', | |
323 | + superFieldList:[], | |
324 | + } | |
325 | + }, | |
326 | + created() { | |
327 | + this.getSuperFieldList(); | |
328 | + this.loadFrom(); | |
329 | + }, | |
330 | + computed: { | |
331 | + importExcelUrl: function(){ | |
332 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
333 | + } | |
334 | + }, | |
335 | + methods: { | |
336 | + initDictConfig(){ | |
337 | + }, | |
338 | + clickThenSelect(record) { | |
339 | + return { | |
340 | + on: { | |
341 | + click: () => { | |
342 | + this.onSelectChange(record.id.split(","), [record]); | |
343 | + } | |
344 | + } | |
345 | + } | |
346 | + }, | |
347 | + onClearSelected() { | |
348 | + this.selectedRowKeys = []; | |
349 | + this.selectionRows = []; | |
350 | + this.selectedMainId='' | |
351 | + }, | |
352 | + onSelectChange(selectedRowKeys, selectionRows) { | |
353 | + this.selectedMainId=selectedRowKeys[0] | |
354 | + this.selectedRowKeys = selectedRowKeys; | |
355 | + this.selectionRows = selectionRows; | |
356 | + }, | |
357 | + loadData(arg) { | |
358 | + if(!this.url.list){ | |
359 | + this.$message.error("请设置url.list属性!") | |
360 | + return | |
361 | + } | |
362 | + //加载数据 若传入参数1则加载第一页的内容 | |
363 | + if (arg === 1) { | |
364 | + this.ipagination.current = 1; | |
365 | + } | |
366 | + this.onClearSelected() | |
367 | + var params = this.getQueryParams();//查询条件 | |
368 | + params.innernalTaskType = 400; | |
369 | + this.loading = true; | |
370 | + getAction(this.url.list, params).then((res) => { | |
371 | + if (res.success) { | |
372 | + this.dataSource = res.result.records; | |
373 | + this.ipagination.total = res.result.total; | |
374 | + } | |
375 | + if(res.code===510){ | |
376 | + this.$message.warning(res.message) | |
377 | + } | |
378 | + this.loading = false; | |
379 | + }) | |
380 | + }, | |
381 | + loadFrom() { | |
382 | + getZoneList().then((res) => { | |
383 | + if (res.success) { | |
384 | + this.zoneList = res.result | |
385 | + } | |
386 | + }); | |
387 | + }, | |
388 | + createCheckOut() { | |
389 | + this.$refs.checkOutModal.edit(); | |
390 | + this.$refs.checkOutModal.title = "创建出库查看任务"; | |
391 | + }, | |
392 | + solutionZoneCode(value) { | |
393 | + var actions = [] | |
394 | + Object.keys(this.zoneList).some((key) => { | |
395 | + if (this.zoneList[key].code == ('' + value)) { | |
396 | + actions.push(this.zoneList[key].name) | |
397 | + return true | |
398 | + } | |
399 | + }) | |
400 | + return actions.join('') | |
401 | + }, | |
402 | + completeTask(record) { | |
403 | + this.loading = true; | |
404 | + this.model = Object.assign({}, record); | |
405 | + completeTaskByWMS(this.model).then((res) => { | |
406 | + this.loading = false; | |
407 | + if (res.success) { | |
408 | + this.$message.success(res.message); | |
409 | + } | |
410 | + else { | |
411 | + this.$message.error(res.message); | |
412 | + } | |
413 | + this.searchQuery(); | |
414 | + }); | |
415 | + }, | |
416 | + executeTask(record) { | |
417 | + this.loading = true; | |
418 | + this.model = Object.assign({}, record); | |
419 | + execute(this.model).then((res) => { | |
420 | + this.loading = false; | |
421 | + if (res.success) { | |
422 | + this.$message.success(res.message); | |
423 | + } | |
424 | + else { | |
425 | + this.$message.error(res.message); | |
426 | + } | |
427 | + this.searchQuery(); | |
428 | + }); | |
429 | + }, | |
430 | + getSuperFieldList(){ | |
431 | + let fieldList=[]; | |
432 | + fieldList.push({type:'int',value:'taskType',text:'任务类型',dictCode:'task_type'}) | |
433 | + fieldList.push({type:'string',value:'containerCode',text:'容器号',dictCode:''}) | |
434 | + fieldList.push({type:'string',value:'fromLocationCode',text:'起始库位',dictCode:''}) | |
435 | + fieldList.push({type:'string',value:'toLocationCode',text:'目标库位',dictCode:''}) | |
436 | + fieldList.push({type:'string',value:'isEmptyOut',text:'是否空出',dictCode:'is_or_not'}) | |
437 | + fieldList.push({type:'int',value:'isDoubleIn',text:'是否重入',dictCode:'is_or_not'}) | |
438 | + fieldList.push({type:'string',value:'originLocationCode',text:'重入库位号',dictCode:''}) | |
439 | + fieldList.push({type:'int',value:'status',text:'任务状态',dictCode:'task_header_status'}) | |
440 | + fieldList.push({type:'string',value:'fromPortCode',text:'起始出入口',dictCode:''}) | |
441 | + fieldList.push({type:'string',value:'toPortCode',text:'目标出入口',dictCode:''}) | |
442 | + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |
443 | + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |
444 | + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | |
445 | + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | |
446 | + this.superFieldList = fieldList | |
447 | + } | |
448 | + } | |
449 | + } | |
450 | +</script> | |
451 | +<style scoped> | |
452 | + @import '~@assets/less/common.less' | |
453 | +</style> | |
0 | 454 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... | ... | @@ -15,6 +15,19 @@ |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <template v-if="toggleSearchStatus"> |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | + <a-form-item label="库区"> | |
20 | + <a-select | |
21 | + show-search | |
22 | + placeholder="请选择库区" | |
23 | + option-filter-prop="children" | |
24 | + :filter-option="filterOption" | |
25 | + v-model="queryParam.zoneCode" | |
26 | + style="width: 200px"> | |
27 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-item> | |
30 | + </a-col> | |
18 | 31 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
19 | 32 | <a-form-item label="起始库位"> |
20 | 33 | <a-input placeholder="请输入起始库位" v-model="queryParam.fromLocationCode"></a-input> |
... | ... | @@ -32,12 +45,12 @@ |
32 | 45 | </a-col> |
33 | 46 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
34 | 47 | <a-form-item label="起始出入口"> |
35 | - <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPort"></a-input> | |
48 | + <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | |
36 | 49 | </a-form-item> |
37 | 50 | </a-col> |
38 | 51 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
39 | 52 | <a-form-item label="目标出入口"> |
40 | - <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input> | |
53 | + <a-input placeholder="请输入目标出入口" v-model="queryParam.toPortCode"></a-input> | |
41 | 54 | </a-form-item> |
42 | 55 | </a-col> |
43 | 56 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
... | ... | @@ -79,15 +92,10 @@ |
79 | 92 | <!-- 查询区域-END --> |
80 | 93 | |
81 | 94 | <!-- 操作按钮区域 --> |
82 | -<!-- <div class="table-operator">--> | |
83 | -<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | |
84 | -<!-- <a-button type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>--> | |
85 | -<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> | |
86 | -<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
87 | -<!-- </a-upload>--> | |
88 | -<!-- <!– 高级查询区域 –>--> | |
89 | -<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> | |
90 | -<!-- </div>--> | |
95 | + <div class="table-operator"> | |
96 | + <a-button @click="createEmptyIn()" type="primary">空托入库</a-button> | |
97 | + <a-button @click="createManyEmptyIn()" type="primary">空托组入库</a-button> | |
98 | + </div> | |
91 | 99 | |
92 | 100 | <!-- table区域-begin --> |
93 | 101 | <div> |
... | ... | @@ -111,6 +119,12 @@ |
111 | 119 | :customRow="clickThenSelect" |
112 | 120 | @change="handleTableChange"> |
113 | 121 | |
122 | + <span slot="zoneCode" slot-scope="zoneCode"> | |
123 | + <a-tag :key="zoneCode" color=blue> | |
124 | + {{ solutionZoneCode(zoneCode) }} | |
125 | + </a-tag> | |
126 | + </span> | |
127 | + | |
114 | 128 | <template slot="htmlSlot" slot-scope="text"> |
115 | 129 | <div v-html="text"></div> |
116 | 130 | </template> |
... | ... | @@ -134,6 +148,8 @@ |
134 | 148 | <span slot="action" slot-scope="text, record"> |
135 | 149 | <a v-if="record.status == 1" @click="executeTask(record)">执行</a> |
136 | 150 | <a-divider type="vertical" /> |
151 | + <a v-if="record.status < 100" @click="cancelTask(record)">取消</a> | |
152 | + <a-divider type="vertical" /> | |
137 | 153 | <a v-if="record.status < 100" @click="completeTask(record)">完成</a> |
138 | 154 | <a-divider type="vertical" /> |
139 | 155 | <a-dropdown> |
... | ... | @@ -161,6 +177,8 @@ |
161 | 177 | </a-tabs> |
162 | 178 | |
163 | 179 | <taskHeader-modal ref="modalForm" @ok="modalFormOk"></taskHeader-modal> |
180 | + <empty-in-task-modal ref="emptyInModal" @ok="modalFormOk"></empty-in-task-modal> | |
181 | + <many-empty-in-task-modal ref="manyEmptyInModal" @ok="modalFormOk"></many-empty-in-task-modal> | |
164 | 182 | </a-card> |
165 | 183 | </template> |
166 | 184 | |
... | ... | @@ -172,19 +190,25 @@ |
172 | 190 | import TaskDetailList from './TaskDetailList' |
173 | 191 | import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
174 | 192 | import '@/assets/less/TableExpand.less' |
175 | - import {completeTaskByWMS} from '@/api/api' | |
193 | + import {completeTaskByWMS, cancelTask} from '@/api/api' | |
176 | 194 | import {execute} from '@/api/api' |
195 | + import {getZoneList} from '@/api/api' | |
196 | + import EmptyInTaskModal from './modules/EmptyInTaskModal' | |
197 | + import ManyEmptyInTaskModal from "./modules/ManyEmptyInTaskModal"; | |
177 | 198 | |
178 | 199 | export default { |
179 | 200 | name: "TaskHeaderList", |
180 | 201 | mixins:[JeecgListMixin], |
181 | 202 | components: { |
203 | + ManyEmptyInTaskModal, | |
204 | + EmptyInTaskModal, | |
182 | 205 | TaskDetailList, |
183 | 206 | TaskHeaderModal |
184 | 207 | }, |
185 | 208 | data () { |
186 | 209 | return { |
187 | 210 | description: '任务表管理页面', |
211 | + zoneList:[], | |
188 | 212 | // 表头 |
189 | 213 | columns: [ |
190 | 214 | { |
... | ... | @@ -203,6 +227,13 @@ |
203 | 227 | dataIndex: 'containerCode' |
204 | 228 | }, |
205 | 229 | { |
230 | + title:'库区', | |
231 | + align:"center", | |
232 | + dataIndex: 'zoneCode', | |
233 | + key: 'zoneCode', | |
234 | + scopedSlots: { customRender: 'zoneCode' } | |
235 | + }, | |
236 | + { | |
206 | 237 | title:'起始库位', |
207 | 238 | align:"center", |
208 | 239 | dataIndex: 'fromLocationCode' |
... | ... | @@ -215,7 +246,7 @@ |
215 | 246 | { |
216 | 247 | title:'目标出入口', |
217 | 248 | align:"center", |
218 | - dataIndex: 'toPort' | |
249 | + dataIndex: 'toPortCode' | |
219 | 250 | }, |
220 | 251 | { |
221 | 252 | title:'任务状态', |
... | ... | @@ -292,6 +323,7 @@ |
292 | 323 | }, |
293 | 324 | created() { |
294 | 325 | this.getSuperFieldList(); |
326 | + this.loadFrom(); | |
295 | 327 | }, |
296 | 328 | computed: { |
297 | 329 | importExcelUrl: function(){ |
... | ... | @@ -344,6 +376,45 @@ |
344 | 376 | this.loading = false; |
345 | 377 | }) |
346 | 378 | }, |
379 | + loadFrom() { | |
380 | + getZoneList().then((res) => { | |
381 | + if (res.success) { | |
382 | + this.zoneList = res.result | |
383 | + } | |
384 | + }); | |
385 | + }, | |
386 | + createEmptyIn() { | |
387 | + this.$refs.emptyInModal.edit(); | |
388 | + this.$refs.emptyInModal.title = "创建空托盘入库"; | |
389 | + }, | |
390 | + createManyEmptyIn() { | |
391 | + this.$refs.manyEmptyInModal.edit(); | |
392 | + this.$refs.manyEmptyInModal.title = "创建空托盘组入库"; | |
393 | + }, | |
394 | + solutionZoneCode(value) { | |
395 | + var actions = [] | |
396 | + Object.keys(this.zoneList).some((key) => { | |
397 | + if (this.zoneList[key].code == ('' + value)) { | |
398 | + actions.push(this.zoneList[key].name) | |
399 | + return true | |
400 | + } | |
401 | + }) | |
402 | + return actions.join('') | |
403 | + }, | |
404 | + cancelTask(record) { | |
405 | + this.loading = true; | |
406 | + this.model = Object.assign({}, record); | |
407 | + cancelTask(this.model.id).then((res) => { | |
408 | + this.loading = false; | |
409 | + if (res.success) { | |
410 | + this.$message.success(res.message); | |
411 | + } | |
412 | + else { | |
413 | + this.$message.error(res.message); | |
414 | + } | |
415 | + this.searchQuery(); | |
416 | + }); | |
417 | + }, | |
347 | 418 | completeTask(record) { |
348 | 419 | this.loading = true; |
349 | 420 | this.model = Object.assign({}, record); |
... | ... | @@ -382,8 +453,8 @@ |
382 | 453 | fieldList.push({type:'int',value:'isDoubleIn',text:'是否重入',dictCode:'is_or_not'}) |
383 | 454 | fieldList.push({type:'string',value:'originLocationCode',text:'重入库位号',dictCode:''}) |
384 | 455 | fieldList.push({type:'int',value:'status',text:'任务状态',dictCode:'task_header_status'}) |
385 | - fieldList.push({type:'string',value:'fromPort',text:'起始出入口',dictCode:''}) | |
386 | - fieldList.push({type:'string',value:'toPort',text:'目标出入口',dictCode:''}) | |
456 | + fieldList.push({type:'string',value:'fromPortCode',text:'起始出入口',dictCode:''}) | |
457 | + fieldList.push({type:'string',value:'toPortCode',text:'目标出入口',dictCode:''}) | |
387 | 458 | fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) |
388 | 459 | fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) |
389 | 460 | fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
... | ... | @@ -16,6 +16,19 @@ |
16 | 16 | </a-col> |
17 | 17 | <template v-if="toggleSearchStatus"> |
18 | 18 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
19 | + <a-form-item label="库区"> | |
20 | + <a-select | |
21 | + show-search | |
22 | + placeholder="请选择库区" | |
23 | + option-filter-prop="children" | |
24 | + :filter-option="filterOption" | |
25 | + v-model="queryParam.zoneCode" | |
26 | + style="width: 200px"> | |
27 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-item> | |
30 | + </a-col> | |
31 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | 32 | <a-form-item label="起始库位"> |
20 | 33 | <a-input placeholder="请输入起始库位" v-model="queryParam.fromLocationCode"></a-input> |
21 | 34 | </a-form-item> |
... | ... | @@ -47,12 +60,12 @@ |
47 | 60 | </a-col> |
48 | 61 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
49 | 62 | <a-form-item label="起始出入口"> |
50 | - <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPort"></a-input> | |
63 | + <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | |
51 | 64 | </a-form-item> |
52 | 65 | </a-col> |
53 | 66 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
54 | 67 | <a-form-item label="目标出入口"> |
55 | - <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input> | |
68 | + <a-input placeholder="请输入目标出入口" v-model="queryParam.toPortCode"></a-input> | |
56 | 69 | </a-form-item> |
57 | 70 | </a-col> |
58 | 71 | <a-col :xl="10" :lg="11" :md="12" :sm="24"> |
... | ... | @@ -79,15 +92,10 @@ |
79 | 92 | <!-- 查询区域-END --> |
80 | 93 | |
81 | 94 | <!-- 操作按钮区域 --> |
82 | -<!-- <div class="table-operator">--> | |
83 | -<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | |
84 | -<!-- <a-button type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>--> | |
85 | -<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> | |
86 | -<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
87 | -<!-- </a-upload>--> | |
88 | -<!-- <!– 高级查询区域 –>--> | |
89 | -<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> | |
90 | -<!-- </div>--> | |
95 | + <div class="table-operator"> | |
96 | + <a-button @click="createEmptyOut()" type="primary" >空托出库</a-button> | |
97 | + <a-button @click="createManyEmptyOut()" type="primary" >空托组出库</a-button> | |
98 | + </div> | |
91 | 99 | |
92 | 100 | <!-- table区域-begin --> |
93 | 101 | <div> |
... | ... | @@ -111,6 +119,12 @@ |
111 | 119 | :customRow="clickThenSelect" |
112 | 120 | @change="handleTableChange"> |
113 | 121 | |
122 | + <span slot="zoneCode" slot-scope="zoneCode"> | |
123 | + <a-tag :key="zoneCode" color=blue> | |
124 | + {{ solutionZoneCode(zoneCode) }} | |
125 | + </a-tag> | |
126 | + </span> | |
127 | + | |
114 | 128 | <template slot="htmlSlot" slot-scope="text"> |
115 | 129 | <div v-html="text"></div> |
116 | 130 | </template> |
... | ... | @@ -161,6 +175,9 @@ |
161 | 175 | </a-tabs> |
162 | 176 | |
163 | 177 | <taskHeader-modal ref="modalForm" @ok="modalFormOk"></taskHeader-modal> |
178 | + <empty-out-task-modal ref="emptyOutModal" @ok="modalFormOk"></empty-out-task-modal> | |
179 | + <many-empty-out-task-modal ref="manyEmptyOutModal" @ok="modalFormOk"></many-empty-out-task-modal> | |
180 | + | |
164 | 181 | </a-card> |
165 | 182 | </template> |
166 | 183 | |
... | ... | @@ -174,11 +191,16 @@ |
174 | 191 | import '@/assets/less/TableExpand.less' |
175 | 192 | import {completeTaskByWMS} from '@/api/api' |
176 | 193 | import {execute} from '@/api/api' |
194 | + import {getZoneList} from '@/api/api' | |
195 | + import EmptyOutTaskModal from './modules/EmptyOutTaskModal' | |
196 | + import ManyEmptyOutTaskModal from "./modules/ManyEmptyOutTaskModal"; | |
177 | 197 | |
178 | 198 | export default { |
179 | 199 | name: "TaskHeaderList", |
180 | 200 | mixins:[JeecgListMixin], |
181 | 201 | components: { |
202 | + ManyEmptyOutTaskModal, | |
203 | + EmptyOutTaskModal, | |
182 | 204 | TaskDetailList, |
183 | 205 | TaskHeaderModal |
184 | 206 | }, |
... | ... | @@ -203,6 +225,13 @@ |
203 | 225 | dataIndex: 'containerCode' |
204 | 226 | }, |
205 | 227 | { |
228 | + title:'库区', | |
229 | + align:"center", | |
230 | + dataIndex: 'zoneCode', | |
231 | + key: 'zoneCode', | |
232 | + scopedSlots: { customRender: 'zoneCode' } | |
233 | + }, | |
234 | + { | |
206 | 235 | title:'起始库位', |
207 | 236 | align:"center", |
208 | 237 | dataIndex: 'fromLocationCode' |
... | ... | @@ -215,7 +244,7 @@ |
215 | 244 | { |
216 | 245 | title:'目标出入口', |
217 | 246 | align:"center", |
218 | - dataIndex: 'toPort' | |
247 | + dataIndex: 'toPortCode' | |
219 | 248 | }, |
220 | 249 | { |
221 | 250 | title:'任务状态', |
... | ... | @@ -287,6 +316,7 @@ |
287 | 316 | }, |
288 | 317 | created() { |
289 | 318 | this.getSuperFieldList(); |
319 | + this.loadFrom(); | |
290 | 320 | }, |
291 | 321 | computed: { |
292 | 322 | importExcelUrl: function(){ |
... | ... | @@ -315,6 +345,31 @@ |
315 | 345 | this.selectedRowKeys = selectedRowKeys; |
316 | 346 | this.selectionRows = selectionRows; |
317 | 347 | }, |
348 | + loadFrom() { | |
349 | + getZoneList().then((res) => { | |
350 | + if (res.success) { | |
351 | + this.zoneList = res.result | |
352 | + } | |
353 | + }); | |
354 | + }, | |
355 | + createEmptyOut() { | |
356 | + this.$refs.emptyOutModal.edit(); | |
357 | + this.$refs.emptyOutModal.title = "创建空托盘出库"; | |
358 | + }, | |
359 | + createManyEmptyOut() { | |
360 | + this.$refs.manyEmptyOutModal.edit(); | |
361 | + this.$refs.manyEmptyOutModal.title = "创建空托盘组出库"; | |
362 | + }, | |
363 | + solutionZoneCode(value) { | |
364 | + var actions = [] | |
365 | + Object.keys(this.zoneList).some((key) => { | |
366 | + if (this.zoneList[key].code == ('' + value)) { | |
367 | + actions.push(this.zoneList[key].name) | |
368 | + return true | |
369 | + } | |
370 | + }) | |
371 | + return actions.join('') | |
372 | + }, | |
318 | 373 | loadData(arg) { |
319 | 374 | if(!this.url.list){ |
320 | 375 | this.$message.error("请设置url.list属性!") |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false"> | |
3 | + <!-- 查询区域 --> | |
4 | + <div class="table-page-search-wrapper"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
6 | + <a-row :gutter="24"> | |
7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
8 | + <a-form-item label="任务类型"> | |
9 | + <j-dict-select-tag placeholder="请选择任务类型" v-model="queryParam.taskType" dictCode="task_type"/> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
13 | + <a-form-item label="容器号"> | |
14 | + <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <template v-if="toggleSearchStatus"> | |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | + <a-form-item label="库区"> | |
20 | + <a-select | |
21 | + show-search | |
22 | + placeholder="请选择库区" | |
23 | + option-filter-prop="children" | |
24 | + :filter-option="filterOption" | |
25 | + v-model="queryParam.zoneCode" | |
26 | + style="width: 200px"> | |
27 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-item> | |
30 | + </a-col> | |
31 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
32 | + <a-form-item label="起始库位"> | |
33 | + <a-input placeholder="请输入起始库位" v-model="queryParam.fromLocationCode"></a-input> | |
34 | + </a-form-item> | |
35 | + </a-col> | |
36 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
37 | + <a-form-item label="目标库位"> | |
38 | + <a-input placeholder="请输入目标库位" v-model="queryParam.toLocationCode"></a-input> | |
39 | + </a-form-item> | |
40 | + </a-col> | |
41 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
42 | + <a-form-item label="是否空出"> | |
43 | + <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | |
44 | + </a-form-item> | |
45 | + </a-col> | |
46 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
47 | + <a-form-item label="起始出入口"> | |
48 | + <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | |
49 | + </a-form-item> | |
50 | + </a-col> | |
51 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
52 | + <a-form-item label="目标出入口"> | |
53 | + <a-input placeholder="请输入目标出入口" v-model="queryParam.toPortCode"></a-input> | |
54 | + </a-form-item> | |
55 | + </a-col> | |
56 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
57 | + <a-form-item label="任务状态"> | |
58 | + <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> | |
59 | + </a-form-item> | |
60 | + </a-col> | |
61 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
62 | + <a-form-item label="是否重入"> | |
63 | + <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | |
64 | + </a-form-item> | |
65 | + </a-col> | |
66 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
67 | + <a-form-item label="重入库位号"> | |
68 | + <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | |
69 | + </a-form-item> | |
70 | + </a-col> | |
71 | + <a-col :xl="10" :lg="11" :md="12" :sm="24"> | |
72 | + <a-form-item label="创建日期"> | |
73 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date> | |
74 | + <span class="query-group-split-cust"></span> | |
75 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date> | |
76 | + </a-form-item> | |
77 | + </a-col> | |
78 | + </template> | |
79 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
80 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
81 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
82 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
83 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
84 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
85 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
86 | + </a> | |
87 | + </span> | |
88 | + </a-col> | |
89 | + </a-row> | |
90 | + </a-form> | |
91 | + </div> | |
92 | + <!-- 查询区域-END --> | |
93 | + | |
94 | + <!-- 操作按钮区域 --> | |
95 | + <div class="table-operator"> | |
96 | + <a-button @click="createTransfer()" type="primary">移库任务</a-button> | |
97 | + <a-button @click="createOverStation()" type="primary">跨站任务</a-button> | |
98 | +<!-- <a-button type="primary" icon="download" @click="handleExportXls('任务表')">导出</a-button>--> | |
99 | +<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> | |
100 | +<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
101 | +<!-- </a-upload>--> | |
102 | +<!-- <!– 高级查询区域 –>--> | |
103 | +<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> | |
104 | + </div> | |
105 | + | |
106 | + <!-- table区域-begin --> | |
107 | + <div> | |
108 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
109 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
110 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
111 | + </div> | |
112 | + | |
113 | + <a-table | |
114 | + ref="table" | |
115 | + size="middle" | |
116 | + bordered | |
117 | + rowKey="id" | |
118 | + class="j-table-force-nowrap" | |
119 | + :scroll="{x:true}" | |
120 | + :columns="columns" | |
121 | + :dataSource="dataSource" | |
122 | + :pagination="ipagination" | |
123 | + :loading="loading" | |
124 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | |
125 | + :customRow="clickThenSelect" | |
126 | + @change="handleTableChange"> | |
127 | + | |
128 | + <span slot="zoneCode" slot-scope="zoneCode"> | |
129 | + <a-tag :key="zoneCode" color=blue> | |
130 | + {{ solutionZoneCode(zoneCode) }} | |
131 | + </a-tag> | |
132 | + </span> | |
133 | + | |
134 | + <template slot="htmlSlot" slot-scope="text"> | |
135 | + <div v-html="text"></div> | |
136 | + </template> | |
137 | + <template slot="imgSlot" slot-scope="text"> | |
138 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
139 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
140 | + </template> | |
141 | + <template slot="fileSlot" slot-scope="text"> | |
142 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
143 | + <a-button | |
144 | + v-else | |
145 | + :ghost="true" | |
146 | + type="primary" | |
147 | + icon="download" | |
148 | + size="small" | |
149 | + @click="downloadFile(text)"> | |
150 | + 下载 | |
151 | + </a-button> | |
152 | + </template> | |
153 | + | |
154 | + <span slot="action" slot-scope="text, record"> | |
155 | + <a v-if="record.status == 1" @click="executeTask(record)">执行</a> | |
156 | + <a-divider type="vertical" /> | |
157 | + <a v-if="record.status < 100" @click="completeTask(record)">完成</a> | |
158 | + <a-divider type="vertical" /> | |
159 | + <a-dropdown> | |
160 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
161 | + <a-menu slot="overlay"> | |
162 | + <a-menu-item> | |
163 | + <a @click="handleEdit(record)">编辑</a> | |
164 | + </a-menu-item> | |
165 | + <a-menu-item> | |
166 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
167 | + <a>删除</a> | |
168 | + </a-popconfirm> | |
169 | + </a-menu-item> | |
170 | + </a-menu> | |
171 | + </a-dropdown> | |
172 | + </span> | |
173 | + | |
174 | + </a-table> | |
175 | + </div> | |
176 | + | |
177 | + <a-tabs defaultActiveKey="1"> | |
178 | + <a-tab-pane tab="任务详情" key="1" > | |
179 | + <TaskDetailList :mainId="selectedMainId" /> | |
180 | + </a-tab-pane> | |
181 | + </a-tabs> | |
182 | + | |
183 | + <taskHeader-modal ref="modalForm" @ok="modalFormOk"></taskHeader-modal> | |
184 | + <transfer-task-modal ref="transferModal" @ok="modalFormOk"></transfer-task-modal> | |
185 | + <over-station-task-modal ref="overStationModal" @ok="modalFormOk"></over-station-task-modal> | |
186 | + </a-card> | |
187 | +</template> | |
188 | + | |
189 | +<script> | |
190 | + | |
191 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
192 | + import TaskHeaderModal from './modules/TaskHeaderModal' | |
193 | + import { getAction } from '@/api/manage' | |
194 | + import TaskDetailList from './TaskDetailList' | |
195 | + import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |
196 | + import '@/assets/less/TableExpand.less' | |
197 | + import {completeTaskByWMS} from '@/api/api' | |
198 | + import {execute} from '@/api/api' | |
199 | + import {getZoneList} from '@/api/api' | |
200 | + import EmptyInTaskModal from './modules/EmptyInTaskModal' | |
201 | + import TransferTaskModal from "./modules/TransferTaskModal"; | |
202 | + import OverStationTaskModal from "./modules/OverStationTaskModal"; | |
203 | + | |
204 | + export default { | |
205 | + name: "TaskHeaderList", | |
206 | + mixins:[JeecgListMixin], | |
207 | + components: { | |
208 | + OverStationTaskModal, | |
209 | + TransferTaskModal, | |
210 | + EmptyInTaskModal, | |
211 | + TaskDetailList, | |
212 | + TaskHeaderModal | |
213 | + }, | |
214 | + data () { | |
215 | + return { | |
216 | + description: '任务表管理页面', | |
217 | + zoneList:[], | |
218 | + // 表头 | |
219 | + columns: [ | |
220 | + { | |
221 | + title:'任务ID', | |
222 | + align:"center", | |
223 | + dataIndex: 'id', | |
224 | + }, | |
225 | + { | |
226 | + title:'任务类型', | |
227 | + align:"center", | |
228 | + dataIndex: 'taskType_dictText', | |
229 | + }, | |
230 | + { | |
231 | + title:'容器号', | |
232 | + align:"center", | |
233 | + dataIndex: 'containerCode' | |
234 | + }, | |
235 | + { | |
236 | + title:'库区', | |
237 | + align:"center", | |
238 | + dataIndex: 'zoneCode', | |
239 | + key: 'zoneCode', | |
240 | + scopedSlots: { customRender: 'zoneCode' } | |
241 | + }, | |
242 | + { | |
243 | + title:'起始库位', | |
244 | + align:"center", | |
245 | + dataIndex: 'fromLocationCode' | |
246 | + }, | |
247 | + { | |
248 | + title:'目标库位', | |
249 | + align:"center", | |
250 | + dataIndex: 'toLocationCode' | |
251 | + }, | |
252 | + { | |
253 | + title:'起始出入口', | |
254 | + align:"center", | |
255 | + dataIndex: 'fromPortCode' | |
256 | + }, | |
257 | + { | |
258 | + title:'目标出入口', | |
259 | + align:"center", | |
260 | + dataIndex: 'toPortCode' | |
261 | + }, | |
262 | + { | |
263 | + title:'任务状态', | |
264 | + align:"center", | |
265 | + dataIndex: 'status_dictText', | |
266 | + }, | |
267 | + { | |
268 | + title:'是否重入', | |
269 | + align:"center", | |
270 | + dataIndex: 'isDoubleIn_dictText', | |
271 | + }, | |
272 | + { | |
273 | + title:'重入库位号', | |
274 | + align:"center", | |
275 | + dataIndex: 'originLocationCode' | |
276 | + }, | |
277 | + { | |
278 | + title:'创建人', | |
279 | + align:"center", | |
280 | + dataIndex: 'createBy' | |
281 | + }, | |
282 | + { | |
283 | + title:'创建日期', | |
284 | + align:"center", | |
285 | + dataIndex: 'createTime' | |
286 | + }, | |
287 | + { | |
288 | + title:'更新人', | |
289 | + align:"center", | |
290 | + dataIndex: 'updateBy' | |
291 | + }, | |
292 | + { | |
293 | + title:'更新日期', | |
294 | + align:"center", | |
295 | + dataIndex: 'updateTime' | |
296 | + }, | |
297 | + { | |
298 | + title: '操作', | |
299 | + dataIndex: 'action', | |
300 | + align:"center", | |
301 | + fixed:"right", | |
302 | + width:147, | |
303 | + scopedSlots: { customRender: 'action' }, | |
304 | + } | |
305 | + ], | |
306 | + url: { | |
307 | + list: "/task/taskHeader/list", | |
308 | + delete: "/task/taskHeader/delete", | |
309 | + deleteBatch: "/task/taskHeader/deleteBatch", | |
310 | + exportXlsUrl: "/task/taskHeader/exportXls", | |
311 | + importExcelUrl: "task/taskHeader/importExcel", | |
312 | + }, | |
313 | + dictOptions:{ | |
314 | + taskType:[], | |
315 | + isEmptyOut:[], | |
316 | + isDoubleIn:[], | |
317 | + status:[], | |
318 | + }, | |
319 | + /* 分页参数 */ | |
320 | + ipagination:{ | |
321 | + current: 1, | |
322 | + pageSize: 5, | |
323 | + pageSizeOptions: ['5', '10', '50'], | |
324 | + showTotal: (total, range) => { | |
325 | + return range[0] + "-" + range[1] + " 共" + total + "条" | |
326 | + }, | |
327 | + showQuickJumper: true, | |
328 | + showSizeChanger: true, | |
329 | + total: 0 | |
330 | + }, | |
331 | + selectedMainId:'', | |
332 | + superFieldList:[], | |
333 | + } | |
334 | + }, | |
335 | + created() { | |
336 | + this.getSuperFieldList(); | |
337 | + this.loadFrom(); | |
338 | + }, | |
339 | + computed: { | |
340 | + importExcelUrl: function(){ | |
341 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
342 | + } | |
343 | + }, | |
344 | + methods: { | |
345 | + initDictConfig(){ | |
346 | + }, | |
347 | + clickThenSelect(record) { | |
348 | + return { | |
349 | + on: { | |
350 | + click: () => { | |
351 | + this.onSelectChange(record.id.split(","), [record]); | |
352 | + } | |
353 | + } | |
354 | + } | |
355 | + }, | |
356 | + onClearSelected() { | |
357 | + this.selectedRowKeys = []; | |
358 | + this.selectionRows = []; | |
359 | + this.selectedMainId='' | |
360 | + }, | |
361 | + onSelectChange(selectedRowKeys, selectionRows) { | |
362 | + this.selectedMainId=selectedRowKeys[0] | |
363 | + this.selectedRowKeys = selectedRowKeys; | |
364 | + this.selectionRows = selectionRows; | |
365 | + }, | |
366 | + loadData(arg) { | |
367 | + if(!this.url.list){ | |
368 | + this.$message.error("请设置url.list属性!") | |
369 | + return | |
370 | + } | |
371 | + //加载数据 若传入参数1则加载第一页的内容 | |
372 | + if (arg === 1) { | |
373 | + this.ipagination.current = 1; | |
374 | + } | |
375 | + this.onClearSelected() | |
376 | + var params = this.getQueryParams();//查询条件 | |
377 | + params.innernalTaskType = 300; | |
378 | + this.loading = true; | |
379 | + getAction(this.url.list, params).then((res) => { | |
380 | + if (res.success) { | |
381 | + this.dataSource = res.result.records; | |
382 | + this.ipagination.total = res.result.total; | |
383 | + } | |
384 | + if(res.code===510){ | |
385 | + this.$message.warning(res.message) | |
386 | + } | |
387 | + this.loading = false; | |
388 | + }) | |
389 | + }, | |
390 | + loadFrom() { | |
391 | + getZoneList().then((res) => { | |
392 | + if (res.success) { | |
393 | + this.zoneList = res.result | |
394 | + } | |
395 | + }); | |
396 | + }, | |
397 | + createTransfer() { | |
398 | + this.$refs.transferModal.edit(); | |
399 | + this.$refs.transferModal.title = "创建移库任务"; | |
400 | + }, | |
401 | + createOverStation() { | |
402 | + this.$refs.overStationModal.edit(); | |
403 | + this.$refs.overStationModal.title = "创建跨站任务"; | |
404 | + }, | |
405 | + solutionZoneCode(value) { | |
406 | + var actions = [] | |
407 | + Object.keys(this.zoneList).some((key) => { | |
408 | + if (this.zoneList[key].code == ('' + value)) { | |
409 | + actions.push(this.zoneList[key].name) | |
410 | + return true | |
411 | + } | |
412 | + }) | |
413 | + return actions.join('') | |
414 | + }, | |
415 | + completeTask(record) { | |
416 | + this.loading = true; | |
417 | + this.model = Object.assign({}, record); | |
418 | + completeTaskByWMS(this.model).then((res) => { | |
419 | + this.loading = false; | |
420 | + if (res.success) { | |
421 | + this.$message.success(res.message); | |
422 | + } | |
423 | + else { | |
424 | + this.$message.error(res.message); | |
425 | + } | |
426 | + this.searchQuery(); | |
427 | + }); | |
428 | + }, | |
429 | + executeTask(record) { | |
430 | + this.loading = true; | |
431 | + this.model = Object.assign({}, record); | |
432 | + execute(this.model).then((res) => { | |
433 | + this.loading = false; | |
434 | + if (res.success) { | |
435 | + this.$message.success(res.message); | |
436 | + } | |
437 | + else { | |
438 | + this.$message.error(res.message); | |
439 | + } | |
440 | + this.searchQuery(); | |
441 | + }); | |
442 | + }, | |
443 | + getSuperFieldList(){ | |
444 | + let fieldList=[]; | |
445 | + fieldList.push({type:'int',value:'taskType',text:'任务类型',dictCode:'task_type'}) | |
446 | + fieldList.push({type:'string',value:'containerCode',text:'容器号',dictCode:''}) | |
447 | + fieldList.push({type:'string',value:'fromLocationCode',text:'起始库位',dictCode:''}) | |
448 | + fieldList.push({type:'string',value:'toLocationCode',text:'目标库位',dictCode:''}) | |
449 | + fieldList.push({type:'string',value:'isEmptyOut',text:'是否空出',dictCode:'is_or_not'}) | |
450 | + fieldList.push({type:'int',value:'isDoubleIn',text:'是否重入',dictCode:'is_or_not'}) | |
451 | + fieldList.push({type:'string',value:'originLocationCode',text:'重入库位号',dictCode:''}) | |
452 | + fieldList.push({type:'int',value:'status',text:'任务状态',dictCode:'task_header_status'}) | |
453 | + fieldList.push({type:'string',value:'fromPortCode',text:'起始出入口',dictCode:''}) | |
454 | + fieldList.push({type:'string',value:'toPortCode',text:'目标出入口',dictCode:''}) | |
455 | + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |
456 | + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |
457 | + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | |
458 | + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | |
459 | + this.superFieldList = fieldList | |
460 | + } | |
461 | + } | |
462 | + } | |
463 | +</script> | |
464 | +<style scoped> | |
465 | + @import '~@assets/less/common.less' | |
466 | +</style> | |
0 | 467 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/CheckOutTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" @keyup="getPortList"></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPortCode"> | |
21 | + <a-select | |
22 | + show-search | |
23 | + placeholder="请选择出库口" | |
24 | + option-filter-prop="children" | |
25 | + :filter-option="filterOption" | |
26 | + v-model="model.toPortCode"> | |
27 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + </a-row> | |
32 | + </a-form-model> | |
33 | + </a-spin> | |
34 | + </j-modal> | |
35 | +</template> | |
36 | + | |
37 | +<script> | |
38 | + | |
39 | + import { httpAction } from '@/api/manage' | |
40 | + import { validateDuplicateValue } from '@/utils/util' | |
41 | + import {createCheckOutTask} from '@/api/api' | |
42 | + import {selectPickPort} from '@/api/api' | |
43 | + | |
44 | + export default { | |
45 | + name: "CheckOutTaskModal", | |
46 | + components: { | |
47 | + }, | |
48 | + data () { | |
49 | + return { | |
50 | + title:"操作", | |
51 | + width:500, | |
52 | + portList:[], | |
53 | + querySource:{}, | |
54 | + visible: false, | |
55 | + model:{ | |
56 | + }, | |
57 | + labelCol: { | |
58 | + xs: { span: 24 }, | |
59 | + sm: { span: 5 }, | |
60 | + }, | |
61 | + wrapperCol: { | |
62 | + xs: { span: 24 }, | |
63 | + sm: { span: 16 }, | |
64 | + }, | |
65 | + | |
66 | + confirmLoading: false, | |
67 | + validatorRules: { | |
68 | + containerCode: [ | |
69 | + { required: true, message: '请输入容器编码!'}, | |
70 | + ], | |
71 | + toPortCode: [ | |
72 | + { required: true, message: '请选择出库口!'}, | |
73 | + ], | |
74 | + }, | |
75 | + url: { | |
76 | + add: "/task/taskHeader/createEmptyOut", | |
77 | + } | |
78 | + | |
79 | + } | |
80 | + }, | |
81 | + created () { | |
82 | + //备份model原始值 | |
83 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
84 | + }, | |
85 | + methods: { | |
86 | + add () { | |
87 | + this.edit(this.modelDefault); | |
88 | + }, | |
89 | + edit () { | |
90 | + // this.getPortList(); | |
91 | + // this.model = Object.assign({}, record); | |
92 | + this.visible = true; | |
93 | + }, | |
94 | + close () { | |
95 | + this.$emit('close'); | |
96 | + this.visible = false; | |
97 | + this.$refs.form.clearValidate(); | |
98 | + }, | |
99 | + getPortList() { | |
100 | + this.querySource.containerCode = this.model.containerCode; | |
101 | + selectPickPort(this.querySource).then((res) => { | |
102 | + if (res.success) { | |
103 | + this.portList = res.result; | |
104 | + this.visible = true; | |
105 | + } | |
106 | + }); | |
107 | + }, | |
108 | + handleOk () { | |
109 | + const that = this; | |
110 | + // 触发表单验证 | |
111 | + this.$refs.form.validate(valid => { | |
112 | + if (valid) { | |
113 | + that.confirmLoading = true; | |
114 | + createCheckOutTask(this.model).then((res)=>{ | |
115 | + if(res.success){ | |
116 | + that.$message.success(res.message); | |
117 | + that.$emit('ok'); | |
118 | + that.model.containerCode = ''; | |
119 | + that.model.toPortCode = ''; | |
120 | + }else{ | |
121 | + that.$message.warning(res.message); | |
122 | + } | |
123 | + }).finally(() => { | |
124 | + that.confirmLoading = false; | |
125 | + that.close(); | |
126 | + }) | |
127 | + }else{ | |
128 | + return false | |
129 | + } | |
130 | + }) | |
131 | + }, | |
132 | + handleCancel () { | |
133 | + this.close() | |
134 | + }, | |
135 | + | |
136 | + | |
137 | + } | |
138 | + } | |
139 | +</script> | |
0 | 140 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/EmptyInTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器号" ></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="目标库位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toLocationCode"> | |
21 | + <a-input v-model="model.toLocationCode" placeholder="请输入目标库位" ></a-input> | |
22 | + </a-form-model-item> | |
23 | + </a-col> | |
24 | + </a-row> | |
25 | + </a-form-model> | |
26 | + </a-spin> | |
27 | + </j-modal> | |
28 | +</template> | |
29 | + | |
30 | +<script> | |
31 | + | |
32 | + import { httpAction } from '@/api/manage' | |
33 | + import { validateDuplicateValue } from '@/utils/util' | |
34 | + import {createEmptyIn} from '@/api/api' | |
35 | + | |
36 | + export default { | |
37 | + name: "EmptyInTaskModal", | |
38 | + components: { | |
39 | + }, | |
40 | + data () { | |
41 | + return { | |
42 | + title:"操作", | |
43 | + width:500, | |
44 | + visible: false, | |
45 | + model:{ | |
46 | + }, | |
47 | + labelCol: { | |
48 | + xs: { span: 24 }, | |
49 | + sm: { span: 5 }, | |
50 | + }, | |
51 | + wrapperCol: { | |
52 | + xs: { span: 24 }, | |
53 | + sm: { span: 16 }, | |
54 | + }, | |
55 | + | |
56 | + confirmLoading: false, | |
57 | + validatorRules: { | |
58 | + containerCode: [ | |
59 | + { required: true, message: '请输入容器编码!'}, | |
60 | + ], | |
61 | + }, | |
62 | + url: { | |
63 | + add: "/task/taskHeader/createEmptyIn", | |
64 | + } | |
65 | + | |
66 | + } | |
67 | + }, | |
68 | + created () { | |
69 | + //备份model原始值 | |
70 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
71 | + }, | |
72 | + methods: { | |
73 | + add () { | |
74 | + this.edit(this.modelDefault); | |
75 | + }, | |
76 | + edit () { | |
77 | + this.visible = true; | |
78 | + }, | |
79 | + close () { | |
80 | + this.$emit('close'); | |
81 | + this.visible = false; | |
82 | + this.$refs.form.clearValidate(); | |
83 | + }, | |
84 | + handleOk () { | |
85 | + const that = this; | |
86 | + // 触发表单验证 | |
87 | + this.$refs.form.validate(valid => { | |
88 | + if (valid) { | |
89 | + that.confirmLoading = true; | |
90 | + createEmptyIn(this.model).then((res)=>{ | |
91 | + if(res.success){ | |
92 | + that.$message.success(res.message); | |
93 | + that.$emit('ok'); | |
94 | + that.model.containerCode = ''; | |
95 | + that.model.toLocationCode = ''; | |
96 | + }else{ | |
97 | + that.$message.warning(res.message); | |
98 | + } | |
99 | + }).finally(() => { | |
100 | + that.confirmLoading = false; | |
101 | + that.close(); | |
102 | + }) | |
103 | + }else{ | |
104 | + return false | |
105 | + } | |
106 | + }) | |
107 | + }, | |
108 | + handleCancel () { | |
109 | + this.close() | |
110 | + }, | |
111 | + | |
112 | + | |
113 | + } | |
114 | + } | |
115 | +</script> | |
0 | 116 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/EmptyOutTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" @keyup="getPortList"></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPortCode"> | |
21 | + <a-select | |
22 | + show-search | |
23 | + placeholder="请选择出库口" | |
24 | + option-filter-prop="children" | |
25 | + :filter-option="filterOption" | |
26 | + v-model="model.toPortCode"> | |
27 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + </a-row> | |
32 | + </a-form-model> | |
33 | + </a-spin> | |
34 | + </j-modal> | |
35 | +</template> | |
36 | + | |
37 | +<script> | |
38 | + | |
39 | + import { httpAction } from '@/api/manage' | |
40 | + import { validateDuplicateValue } from '@/utils/util' | |
41 | + import {createEmptyOut} from '@/api/api' | |
42 | + import {selectOutPort} from '@/api/api' | |
43 | + | |
44 | + export default { | |
45 | + name: "EmptyOutTaskModal", | |
46 | + components: { | |
47 | + }, | |
48 | + data () { | |
49 | + return { | |
50 | + title:"操作", | |
51 | + width:500, | |
52 | + portList:[], | |
53 | + querySource:{}, | |
54 | + visible: false, | |
55 | + model:{ | |
56 | + }, | |
57 | + labelCol: { | |
58 | + xs: { span: 24 }, | |
59 | + sm: { span: 5 }, | |
60 | + }, | |
61 | + wrapperCol: { | |
62 | + xs: { span: 24 }, | |
63 | + sm: { span: 16 }, | |
64 | + }, | |
65 | + | |
66 | + confirmLoading: false, | |
67 | + validatorRules: { | |
68 | + containerCode: [ | |
69 | + { required: true, message: '请输入容器编码!'}, | |
70 | + ], | |
71 | + toPortCode: [ | |
72 | + { required: true, message: '请选择出库口!'}, | |
73 | + ], | |
74 | + }, | |
75 | + url: { | |
76 | + add: "/task/taskHeader/createEmptyOut", | |
77 | + } | |
78 | + | |
79 | + } | |
80 | + }, | |
81 | + created () { | |
82 | + //备份model原始值 | |
83 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
84 | + }, | |
85 | + methods: { | |
86 | + add () { | |
87 | + this.edit(this.modelDefault); | |
88 | + }, | |
89 | + edit () { | |
90 | + // this.getPortList(); | |
91 | + // this.model = Object.assign({}, record); | |
92 | + this.visible = true; | |
93 | + }, | |
94 | + close () { | |
95 | + this.$emit('close'); | |
96 | + this.visible = false; | |
97 | + this.$refs.form.clearValidate(); | |
98 | + }, | |
99 | + getPortList() { | |
100 | + this.querySource.containerCode = this.model.containerCode; | |
101 | + selectOutPort(this.querySource).then((res) => { | |
102 | + if (res.success) { | |
103 | + this.portList = res.result; | |
104 | + this.visible = true; | |
105 | + } | |
106 | + }); | |
107 | + }, | |
108 | + handleOk () { | |
109 | + const that = this; | |
110 | + // 触发表单验证 | |
111 | + this.$refs.form.validate(valid => { | |
112 | + if (valid) { | |
113 | + that.confirmLoading = true; | |
114 | + createEmptyOut(this.model).then((res)=>{ | |
115 | + if(res.success){ | |
116 | + that.$message.success(res.message); | |
117 | + that.$emit('ok'); | |
118 | + that.model.containerCode = ''; | |
119 | + that.model.toPortCode = ''; | |
120 | + }else{ | |
121 | + that.$message.warning(res.message); | |
122 | + } | |
123 | + }).finally(() => { | |
124 | + that.confirmLoading = false; | |
125 | + that.close(); | |
126 | + }) | |
127 | + }else{ | |
128 | + return false | |
129 | + } | |
130 | + }) | |
131 | + }, | |
132 | + handleCancel () { | |
133 | + this.close() | |
134 | + }, | |
135 | + | |
136 | + | |
137 | + } | |
138 | + } | |
139 | +</script> | |
0 | 140 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/ManyEmptyInTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器号" ></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="目标库位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toLocationCode"> | |
21 | + <a-input v-model="model.toLocationCode" placeholder="请输入目标库位" ></a-input> | |
22 | + </a-form-model-item> | |
23 | + </a-col> | |
24 | + </a-row> | |
25 | + </a-form-model> | |
26 | + </a-spin> | |
27 | + </j-modal> | |
28 | +</template> | |
29 | + | |
30 | +<script> | |
31 | + | |
32 | + import { httpAction } from '@/api/manage' | |
33 | + import { validateDuplicateValue } from '@/utils/util' | |
34 | + import {createManyEmptyIn} from '@/api/api' | |
35 | + | |
36 | + export default { | |
37 | + name: "ManyEmptyInTaskModal", | |
38 | + components: { | |
39 | + }, | |
40 | + data () { | |
41 | + return { | |
42 | + title:"操作", | |
43 | + width:500, | |
44 | + visible: false, | |
45 | + model:{ | |
46 | + }, | |
47 | + labelCol: { | |
48 | + xs: { span: 24 }, | |
49 | + sm: { span: 5 }, | |
50 | + }, | |
51 | + wrapperCol: { | |
52 | + xs: { span: 24 }, | |
53 | + sm: { span: 16 }, | |
54 | + }, | |
55 | + | |
56 | + confirmLoading: false, | |
57 | + validatorRules: { | |
58 | + containerCode: [ | |
59 | + { required: true, message: '请输入容器编码!'}, | |
60 | + ], | |
61 | + }, | |
62 | + url: { | |
63 | + add: "/task/taskHeader/createManyEmptyIn", | |
64 | + } | |
65 | + | |
66 | + } | |
67 | + }, | |
68 | + created () { | |
69 | + //备份model原始值 | |
70 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
71 | + }, | |
72 | + methods: { | |
73 | + add () { | |
74 | + this.edit(this.modelDefault); | |
75 | + }, | |
76 | + edit () { | |
77 | + this.visible = true; | |
78 | + }, | |
79 | + close () { | |
80 | + this.$emit('close'); | |
81 | + this.visible = false; | |
82 | + this.$refs.form.clearValidate(); | |
83 | + }, | |
84 | + handleOk () { | |
85 | + const that = this; | |
86 | + // 触发表单验证 | |
87 | + this.$refs.form.validate(valid => { | |
88 | + if (valid) { | |
89 | + that.confirmLoading = true; | |
90 | + createManyEmptyIn(this.model).then((res)=>{ | |
91 | + if(res.success){ | |
92 | + that.$message.success(res.message); | |
93 | + that.$emit('ok'); | |
94 | + that.model.containerCode = ''; | |
95 | + that.model.toLocationCode = ''; | |
96 | + }else{ | |
97 | + that.$message.warning(res.message); | |
98 | + } | |
99 | + }).finally(() => { | |
100 | + that.confirmLoading = false; | |
101 | + that.close(); | |
102 | + }) | |
103 | + }else{ | |
104 | + return false | |
105 | + } | |
106 | + }) | |
107 | + }, | |
108 | + handleCancel () { | |
109 | + this.close() | |
110 | + }, | |
111 | + | |
112 | + | |
113 | + } | |
114 | + } | |
115 | +</script> | |
0 | 116 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/ManyEmptyOutTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" @keyup="getPortList"></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPortCode"> | |
21 | + <a-select | |
22 | + show-search | |
23 | + placeholder="请选择出库口" | |
24 | + option-filter-prop="children" | |
25 | + :filter-option="filterOption" | |
26 | + v-model="model.toPortCode"> | |
27 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + </a-row> | |
32 | + </a-form-model> | |
33 | + </a-spin> | |
34 | + </j-modal> | |
35 | +</template> | |
36 | + | |
37 | +<script> | |
38 | + | |
39 | + import { httpAction } from '@/api/manage' | |
40 | + import { validateDuplicateValue } from '@/utils/util' | |
41 | + import {createManyEmptyOut} from '@/api/api' | |
42 | + import {selectOutPort} from '@/api/api' | |
43 | + | |
44 | + export default { | |
45 | + name: "ManyEmptyOutTaskModal", | |
46 | + components: { | |
47 | + }, | |
48 | + data () { | |
49 | + return { | |
50 | + title:"操作", | |
51 | + width:500, | |
52 | + portList:[], | |
53 | + querySource:{}, | |
54 | + visible: false, | |
55 | + model:{ | |
56 | + }, | |
57 | + labelCol: { | |
58 | + xs: { span: 24 }, | |
59 | + sm: { span: 5 }, | |
60 | + }, | |
61 | + wrapperCol: { | |
62 | + xs: { span: 24 }, | |
63 | + sm: { span: 16 }, | |
64 | + }, | |
65 | + | |
66 | + confirmLoading: false, | |
67 | + validatorRules: { | |
68 | + containerCode: [ | |
69 | + { required: true, message: '请输入容器编码!'}, | |
70 | + ], | |
71 | + toPortCode: [ | |
72 | + { required: true, message: '请选择出库口!'}, | |
73 | + ], | |
74 | + }, | |
75 | + url: { | |
76 | + add: "/task/taskHeader/createManyEmptyOut", | |
77 | + } | |
78 | + | |
79 | + } | |
80 | + }, | |
81 | + created () { | |
82 | + //备份model原始值 | |
83 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
84 | + }, | |
85 | + methods: { | |
86 | + add () { | |
87 | + this.edit(this.modelDefault); | |
88 | + }, | |
89 | + edit () { | |
90 | + this.visible = true; | |
91 | + }, | |
92 | + close () { | |
93 | + this.$emit('close'); | |
94 | + this.visible = false; | |
95 | + this.$refs.form.clearValidate(); | |
96 | + }, | |
97 | + getPortList() { | |
98 | + this.querySource.containerCode = this.model.containerCode; | |
99 | + selectOutPort(this.querySource).then((res) => { | |
100 | + if (res.success) { | |
101 | + this.portList = res.result; | |
102 | + this.visible = true; | |
103 | + } | |
104 | + }); | |
105 | + }, | |
106 | + handleOk () { | |
107 | + const that = this; | |
108 | + // 触发表单验证 | |
109 | + this.$refs.form.validate(valid => { | |
110 | + if (valid) { | |
111 | + that.confirmLoading = true; | |
112 | + createManyEmptyOut(this.model).then((res)=>{ | |
113 | + if(res.success){ | |
114 | + that.$message.success(res.message); | |
115 | + that.$emit('ok'); | |
116 | + that.model.containerCode = ''; | |
117 | + that.model.toPortCode = ''; | |
118 | + }else{ | |
119 | + that.$message.warning(res.message); | |
120 | + } | |
121 | + }).finally(() => { | |
122 | + that.confirmLoading = false; | |
123 | + that.close(); | |
124 | + }) | |
125 | + }else{ | |
126 | + return false | |
127 | + } | |
128 | + }) | |
129 | + }, | |
130 | + handleCancel () { | |
131 | + this.close() | |
132 | + }, | |
133 | + | |
134 | + | |
135 | + } | |
136 | + } | |
137 | +</script> | |
0 | 138 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/OverStationTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" @keyup="getPortList"></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="起始站台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fromPortCode"> | |
21 | + <a-select | |
22 | + show-search | |
23 | + placeholder="请选择起始站台" | |
24 | + option-filter-prop="children" | |
25 | + :filter-option="filterOption" | |
26 | + v-model="model.fromPortCode"> | |
27 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
28 | + </a-select> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + <a-col :span="24"> | |
32 | + <a-form-model-item label="目标站台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPortCode"> | |
33 | + <a-select | |
34 | + show-search | |
35 | + placeholder="请选择目标站台" | |
36 | + option-filter-prop="children" | |
37 | + :filter-option="filterOption" | |
38 | + v-model="model.toPortCode"> | |
39 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
40 | + </a-select> | |
41 | + </a-form-model-item> | |
42 | + </a-col> | |
43 | + </a-row> | |
44 | + </a-form-model> | |
45 | + </a-spin> | |
46 | + </j-modal> | |
47 | +</template> | |
48 | + | |
49 | +<script> | |
50 | + | |
51 | + import { httpAction } from '@/api/manage' | |
52 | + import { validateDuplicateValue } from '@/utils/util' | |
53 | + import {createOverStationTask} from '@/api/api' | |
54 | + import {selectPort} from '@/api/api' | |
55 | + | |
56 | + export default { | |
57 | + name: "OverStationTaskModal", | |
58 | + components: { | |
59 | + }, | |
60 | + data () { | |
61 | + return { | |
62 | + title:"操作", | |
63 | + width:500, | |
64 | + portList:[], | |
65 | + querySource:{}, | |
66 | + visible: false, | |
67 | + model:{ | |
68 | + }, | |
69 | + labelCol: { | |
70 | + xs: { span: 24 }, | |
71 | + sm: { span: 5 }, | |
72 | + }, | |
73 | + wrapperCol: { | |
74 | + xs: { span: 24 }, | |
75 | + sm: { span: 16 }, | |
76 | + }, | |
77 | + | |
78 | + confirmLoading: false, | |
79 | + validatorRules: { | |
80 | + containerCode: [ | |
81 | + { required: true, message: '请输入容器编码!'}, | |
82 | + ], | |
83 | + fromPortCode: [ | |
84 | + { required: true, message: '请选择起始入口!'}, | |
85 | + ], | |
86 | + toPortCode: [ | |
87 | + { required: true, message: '请选择目标出口!'}, | |
88 | + ], | |
89 | + }, | |
90 | + url: { | |
91 | + add: "/task/taskHeader/createEmptyOut", | |
92 | + } | |
93 | + | |
94 | + } | |
95 | + }, | |
96 | + created () { | |
97 | + //备份model原始值 | |
98 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
99 | + }, | |
100 | + methods: { | |
101 | + add () { | |
102 | + this.edit(this.modelDefault); | |
103 | + }, | |
104 | + edit () { | |
105 | + // this.getPortList(); | |
106 | + // this.model = Object.assign({}, record); | |
107 | + this.visible = true; | |
108 | + }, | |
109 | + close () { | |
110 | + this.$emit('close'); | |
111 | + this.visible = false; | |
112 | + this.$refs.form.clearValidate(); | |
113 | + }, | |
114 | + getPortList() { | |
115 | + this.querySource.containerCode = this.model.containerCode; | |
116 | + selectPort(this.querySource).then((res) => { | |
117 | + if (res.success) { | |
118 | + this.portList = res.result; | |
119 | + this.visible = true; | |
120 | + } | |
121 | + }); | |
122 | + }, | |
123 | + handleOk () { | |
124 | + const that = this; | |
125 | + // 触发表单验证 | |
126 | + this.$refs.form.validate(valid => { | |
127 | + if (valid) { | |
128 | + that.confirmLoading = true; | |
129 | + createOverStationTask(this.model).then((res)=>{ | |
130 | + if(res.success){ | |
131 | + that.$message.success(res.message); | |
132 | + that.$emit('ok'); | |
133 | + that.model.containerCode = ''; | |
134 | + that.model.toPortCode = ''; | |
135 | + }else{ | |
136 | + that.$message.warning(res.message); | |
137 | + } | |
138 | + }).finally(() => { | |
139 | + that.confirmLoading = false; | |
140 | + that.close(); | |
141 | + }) | |
142 | + }else{ | |
143 | + return false | |
144 | + } | |
145 | + }) | |
146 | + }, | |
147 | + handleCancel () { | |
148 | + this.close() | |
149 | + }, | |
150 | + | |
151 | + | |
152 | + } | |
153 | + } | |
154 | +</script> | |
0 | 155 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/modules/TransferTaskModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="起始库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fromLocationCode"> | |
16 | + <a-input v-model="model.fromLocationCode" placeholder="请输入起始库位号" ></a-input> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="目标库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toLocationCode"> | |
21 | + <a-input v-model="model.toLocationCode" placeholder="请输入目标库位号" ></a-input> | |
22 | + </a-form-model-item> | |
23 | + </a-col> | |
24 | + </a-row> | |
25 | + </a-form-model> | |
26 | + </a-spin> | |
27 | + </j-modal> | |
28 | +</template> | |
29 | + | |
30 | +<script> | |
31 | + | |
32 | + import { httpAction } from '@/api/manage' | |
33 | + import { validateDuplicateValue } from '@/utils/util' | |
34 | + import {createTransferTask} from '@/api/api' | |
35 | + | |
36 | + export default { | |
37 | + name: "TransferTaskModal", | |
38 | + components: { | |
39 | + }, | |
40 | + data () { | |
41 | + return { | |
42 | + title:"操作", | |
43 | + width:500, | |
44 | + portList:[], | |
45 | + querySource:{}, | |
46 | + visible: false, | |
47 | + model:{ | |
48 | + }, | |
49 | + labelCol: { | |
50 | + xs: { span: 24 }, | |
51 | + sm: { span: 5 }, | |
52 | + }, | |
53 | + wrapperCol: { | |
54 | + xs: { span: 24 }, | |
55 | + sm: { span: 16 }, | |
56 | + }, | |
57 | + | |
58 | + confirmLoading: false, | |
59 | + validatorRules: { | |
60 | + fromLocationCode: [ | |
61 | + { required: true, message: '请输入起始库位号!'}, | |
62 | + ], | |
63 | + toLocationCode: [ | |
64 | + { required: true, message: '请输入目标库位号!'}, | |
65 | + ], | |
66 | + }, | |
67 | + url: { | |
68 | + add: "/task/taskHeader/createTransferTask", | |
69 | + } | |
70 | + | |
71 | + } | |
72 | + }, | |
73 | + created () { | |
74 | + //备份model原始值 | |
75 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
76 | + }, | |
77 | + methods: { | |
78 | + add () { | |
79 | + this.edit(this.modelDefault); | |
80 | + }, | |
81 | + edit () { | |
82 | + // this.getPortList(); | |
83 | + // this.model = Object.assign({}, record); | |
84 | + this.visible = true; | |
85 | + }, | |
86 | + close () { | |
87 | + this.$emit('close'); | |
88 | + this.visible = false; | |
89 | + this.$refs.form.clearValidate(); | |
90 | + }, | |
91 | + handleOk () { | |
92 | + const that = this; | |
93 | + // 触发表单验证 | |
94 | + this.$refs.form.validate(valid => { | |
95 | + if (valid) { | |
96 | + that.confirmLoading = true; | |
97 | + createTransferTask(this.model).then((res)=>{ | |
98 | + if(res.success){ | |
99 | + that.$message.success(res.message); | |
100 | + that.$emit('ok'); | |
101 | + that.model.fromLocationCode = ''; | |
102 | + that.model.toLocationCode = ''; | |
103 | + }else{ | |
104 | + that.$message.warning(res.message); | |
105 | + } | |
106 | + }).finally(() => { | |
107 | + that.confirmLoading = false; | |
108 | + that.close(); | |
109 | + }) | |
110 | + }else{ | |
111 | + return false | |
112 | + } | |
113 | + }) | |
114 | + }, | |
115 | + handleCancel () { | |
116 | + this.close() | |
117 | + }, | |
118 | + | |
119 | + | |
120 | + } | |
121 | + } | |
122 | +</script> | |
0 | 123 | \ No newline at end of file |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/api/wcs/controller/WcsController.java
... | ... | @@ -4,14 +4,20 @@ package org.jeecg.modules.wms.api.wcs.controller; |
4 | 4 | import io.swagger.annotations.ApiOperation; |
5 | 5 | import org.jeecg.common.api.vo.Result; |
6 | 6 | import org.jeecg.common.aspect.annotation.AutoLog; |
7 | +import org.jeecg.common.system.base.controller.JeecgController; | |
8 | +import org.jeecg.common.system.util.JwtUtil; | |
9 | +import org.jeecg.modules.wms.api.wcs.entity.ManyEmptyDomain; | |
7 | 10 | import org.jeecg.modules.wms.api.wcs.entity.WarecellDomain; |
8 | 11 | import org.jeecg.modules.wms.api.wcs.service.WcsService; |
9 | 12 | import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; |
10 | 13 | import org.jeecg.modules.wms.framework.controller.BaseController; |
14 | +import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | |
11 | 15 | import org.jeecg.utils.StringUtils; |
16 | +import org.springframework.transaction.annotation.Transactional; | |
12 | 17 | import org.springframework.web.bind.annotation.*; |
13 | 18 | |
14 | 19 | import javax.annotation.Resource; |
20 | +import javax.servlet.http.HttpServletRequest; | |
15 | 21 | |
16 | 22 | @RestController |
17 | 23 | @RequestMapping("/API/WMS/v2") |
... | ... | @@ -19,6 +25,8 @@ public class WcsController extends BaseController { |
19 | 25 | |
20 | 26 | @Resource |
21 | 27 | private WcsService wcsService; |
28 | + @Resource | |
29 | + private ITaskHeaderService taskHeaderService; | |
22 | 30 | |
23 | 31 | /* |
24 | 32 | WCS给的长,宽,高,重在有不同规格库位才有用,destination是区域, locationType库位类型 |
... | ... | @@ -28,17 +36,22 @@ public class WcsController extends BaseController { |
28 | 36 | @ApiOperation(value="wcs仓位分配", notes="wcs仓位分配", httpMethod = "POST") |
29 | 37 | @ResponseBody |
30 | 38 | @ApiLogger(apiName = "仓位分配", from="WCS") |
31 | - public Result warecellAllocation(@RequestBody WarecellDomain warecellDomain) { | |
39 | + public Result warecellAllocation(@RequestBody WarecellDomain warecellDomain, HttpServletRequest req) { | |
40 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
41 | + if (StringUtils.isEmpty(warehouseCode)) { | |
42 | + return Result.error("仓位分配, 仓库号为空"); | |
43 | + } | |
32 | 44 | if (StringUtils.isEmpty(warecellDomain.getTaskNo())) { |
33 | - return Result.error("任务号为空"); | |
45 | + return Result.error("仓位分配, 任务号为空"); | |
34 | 46 | } |
35 | 47 | if (StringUtils.isEmpty(warecellDomain.getZoneCode())) { |
36 | - return Result.error("目的区域为空"); | |
48 | + return Result.error("仓位分配, 目的区域为空"); | |
37 | 49 | } |
38 | 50 | if (StringUtils.isEmpty(warecellDomain.getHeight())) { |
39 | - return Result.error("高度为空"); | |
51 | + return Result.error("仓位分配, 高度为空"); | |
40 | 52 | } |
41 | - Result result = handleMultiProcess(new MultiProcessListener() { | |
53 | + warecellDomain.setWarehouseCode(warehouseCode); | |
54 | + Result result = handleMultiProcess("warecellAllocation", new JeecgController.MultiProcessListener() { | |
42 | 55 | @Override |
43 | 56 | public Result doProcess() { |
44 | 57 | Result result = wcsService.warecellAllocation(warecellDomain); |
... | ... | @@ -47,4 +60,53 @@ public class WcsController extends BaseController { |
47 | 60 | }); |
48 | 61 | return result; |
49 | 62 | } |
63 | + | |
64 | + /** | |
65 | + * WCS申请空托盘组入库 | |
66 | + * @return | |
67 | + */ | |
68 | + @AutoLog(value = "WCS申请空托盘组入库") | |
69 | + @PostMapping("/manyEmptyIn") | |
70 | + @ApiOperation(value="WCS申请空托盘组入库", notes="WCS申请空托盘组入库", httpMethod = "POST") | |
71 | + @ResponseBody | |
72 | + @ApiLogger(apiName = "manyEmptyIn", from="WCS") | |
73 | + public Result manyEmptyIn(@RequestBody ManyEmptyDomain manyEmptyDomain, HttpServletRequest req) { | |
74 | + String containerCode = manyEmptyDomain.getContainerCode(); | |
75 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
76 | + String zoneCode = manyEmptyDomain.getZoneCode(); | |
77 | + String height = manyEmptyDomain.getHeight(); | |
78 | + String roadWay = manyEmptyDomain.getRoadWay(); | |
79 | + | |
80 | + Result result = handleMultiProcess("manyEmptyIn", new JeecgController.MultiProcessListener() { | |
81 | + @Override | |
82 | + public Result doProcess() { | |
83 | + Result result = taskHeaderService.createManyEmptyInTask(containerCode, zoneCode, roadWay, height, warehouseCode); | |
84 | + return result; | |
85 | + } | |
86 | + }); | |
87 | + return result; | |
88 | + } | |
89 | + | |
90 | + /** | |
91 | + * WCS申请空托盘组出库 | |
92 | + * @return | |
93 | + */ | |
94 | + @AutoLog(value = "WCS申请空托盘组出库") | |
95 | + @PostMapping("/manyEmptyOut") | |
96 | + @ApiOperation(value="WCS申请空托盘组出库", notes="WCS申请空托盘组出库", httpMethod = "POST") | |
97 | + @ResponseBody | |
98 | + @ApiLogger(apiName = "manyEmptyOut", from="WCS") | |
99 | + public Result manyEmptyOut(@RequestBody ManyEmptyDomain manyEmptyDomain, HttpServletRequest req) { | |
100 | + String containerCode = manyEmptyDomain.getContainerCode(); | |
101 | + String toPortCode = manyEmptyDomain.getPort(); | |
102 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
103 | + Result result = handleMultiProcess("manyEmptyOut", new JeecgController.MultiProcessListener() { | |
104 | + @Override | |
105 | + public Result doProcess() { | |
106 | + Result result = taskHeaderService.createManyEmptyOutTask(containerCode, toPortCode, warehouseCode); | |
107 | + return result; | |
108 | + } | |
109 | + }); | |
110 | + return result; | |
111 | + } | |
50 | 112 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/api/wcs/entity/ManyEmptyDomain.java
0 → 100644
1 | +package org.jeecg.modules.wms.api.wcs.entity; | |
2 | + | |
3 | +import lombok.Data; | |
4 | + | |
5 | +@Data | |
6 | +public class ManyEmptyDomain { | |
7 | + | |
8 | + private String containerCode; | |
9 | + private String length; | |
10 | + private String width; | |
11 | + private String height; | |
12 | + private String weight; | |
13 | + //可用巷道 | |
14 | + private String roadWay; | |
15 | + private String zoneCode; | |
16 | + private String port; | |
17 | + | |
18 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... | ... | @@ -270,7 +270,7 @@ public class WcsServiceImpl implements WcsService { |
270 | 270 | case QuantityConstant.TASK_TYPE_EMPTYSHIPMENT: |
271 | 271 | case QuantityConstant.TASK_TYPE_CYCLECOUNT: |
272 | 272 | case QuantityConstant.TASK_TYPE_TRANSFER: |
273 | - case QuantityConstant.TASK_TYPE_VIEW: | |
273 | + case QuantityConstant.TASK_TYPE_CHECK_OUT: | |
274 | 274 | case QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT: |
275 | 275 | if(fromLocation == null) { |
276 | 276 | return Result.error("起始库位为空"); |
... | ... | @@ -280,9 +280,6 @@ public class WcsServiceImpl implements WcsService { |
280 | 280 | case QuantityConstant.TASK_TYPE_WHOLERECEIPT: |
281 | 281 | case QuantityConstant.TASK_TYPE_EMPTYRECEIPT: |
282 | 282 | case QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT: |
283 | - if(toLocation == null) { | |
284 | - return Result.error("终点库位为空"); | |
285 | - } | |
286 | 283 | direction = true; |
287 | 284 | break; |
288 | 285 | default: |
... | ... | @@ -347,8 +344,8 @@ public class WcsServiceImpl implements WcsService { |
347 | 344 | wcsTask.setTaskNo(taskHeader.getId().toString()); |
348 | 345 | wcsTask.setWarehouseCode(warehouseCode); |
349 | 346 | wcsTask.setTaskType(taskType); |
350 | - wcsTask.setFromPort(taskHeader.getFromPort()); | |
351 | - wcsTask.setToPort(taskHeader.getToPort()); | |
347 | + wcsTask.setFromPort(taskHeader.getFromPortCode()); | |
348 | + wcsTask.setToPort(taskHeader.getToPortCode()); | |
352 | 349 | wcsTask.setContainerCode(taskHeader.getContainerCode()); |
353 | 350 | if (preTaskNo != 0) { |
354 | 351 | wcsTask.setPreTaskNo(String.valueOf(preTaskNo)); |
... | ... | @@ -418,7 +415,7 @@ public class WcsServiceImpl implements WcsService { |
418 | 415 | case QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT: |
419 | 416 | case QuantityConstant.TASK_TYPE_SORTINGSHIPMENT: |
420 | 417 | case QuantityConstant.TASK_TYPE_CYCLECOUNT: |
421 | - case QuantityConstant.TASK_TYPE_VIEW: | |
418 | + case QuantityConstant.TASK_TYPE_CHECK_OUT: | |
422 | 419 | wcsTask.setTaskType(400); |
423 | 420 | break; |
424 | 421 | case QuantityConstant.TASK_TYPE_TRANSFER: |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java
... | ... | @@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; |
5 | 5 | import java.util.Date; |
6 | 6 | import java.math.BigDecimal; |
7 | 7 | import com.baomidou.mybatisplus.annotation.IdType; |
8 | +import com.baomidou.mybatisplus.annotation.TableField; | |
8 | 9 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | 11 | import lombok.Data; |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... | ... | @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService; |
4 | 4 | import org.jeecg.common.api.vo.Result; |
5 | 5 | import org.jeecg.modules.wms.config.container.entity.Container; |
6 | 6 | |
7 | +import java.util.List; | |
8 | + | |
7 | 9 | /** |
8 | 10 | * @Description: 容器管理 |
9 | 11 | * @Author: jeecg-boot |
... | ... | @@ -22,4 +24,6 @@ public interface IContainerService extends IService<Container> { |
22 | 24 | String status, String warehouseCode); |
23 | 25 | //创建零时容器 |
24 | 26 | Container createLSContainer(String warehouseCode); |
27 | + | |
28 | + List<Container> getContainerListByStatus(String status, String warehouseCode); | |
25 | 29 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... | ... | @@ -103,6 +103,15 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
103 | 103 | return container; |
104 | 104 | } |
105 | 105 | |
106 | + @Override | |
107 | + public List<Container> getContainerListByStatus(String status, String warehouseCode) { | |
108 | + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
109 | + containerLambdaQueryWrapper.eq(Container::getStatus, status) | |
110 | + .eq(Container::getWarehouseCode, warehouseCode); | |
111 | + List<Container> containerList = list(containerLambdaQueryWrapper); | |
112 | + return containerList; | |
113 | + } | |
114 | + | |
106 | 115 | |
107 | 116 | private int getStartNumber(String containerTypeCode, String warehouseCode) { |
108 | 117 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/locationHigh/service/ILocationHighService.java
... | ... | @@ -3,6 +3,8 @@ package org.jeecg.modules.wms.config.locationHigh.service; |
3 | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | 4 | import org.jeecg.modules.wms.config.locationHigh.entity.LocationHigh; |
5 | 5 | |
6 | +import java.util.List; | |
7 | + | |
6 | 8 | /** |
7 | 9 | * @Description: 库位高度管理 |
8 | 10 | * @Author: jeecg-boot |
... | ... | @@ -11,4 +13,6 @@ import org.jeecg.modules.wms.config.locationHigh.entity.LocationHigh; |
11 | 13 | */ |
12 | 14 | public interface ILocationHighService extends IService<LocationHigh> { |
13 | 15 | |
16 | + LocationHigh getLocationHighByHighLevel(int highHeight, | |
17 | + List<String> locationTypeCodeList, String warehouseCode); | |
14 | 18 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/locationHigh/service/impl/LocationHighServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.config.locationHigh.service.impl; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | 5 | import org.jeecg.modules.wms.config.locationHigh.entity.LocationHigh; |
4 | 6 | import org.jeecg.modules.wms.config.locationHigh.mapper.LocationHighMapper; |
5 | 7 | import org.jeecg.modules.wms.config.locationHigh.service.ILocationHighService; |
... | ... | @@ -7,6 +9,8 @@ import org.springframework.stereotype.Service; |
7 | 9 | |
8 | 10 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
9 | 11 | |
12 | +import java.util.List; | |
13 | + | |
10 | 14 | /** |
11 | 15 | * @Description: 库位高度管理 |
12 | 16 | * @Author: jeecg-boot |
... | ... | @@ -16,4 +20,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
16 | 20 | @Service |
17 | 21 | public class LocationHighServiceImpl extends ServiceImpl<LocationHighMapper, LocationHigh> implements ILocationHighService { |
18 | 22 | |
23 | + @Override | |
24 | + public LocationHigh getLocationHighByHighLevel(int highHeight, | |
25 | + List<String> locationTypeCodeList, String warehouseCode) { | |
26 | + LambdaQueryWrapper<LocationHigh> locationHighLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
27 | + locationHighLambdaQueryWrapper.eq(LocationHigh::getHighLevel, highHeight) | |
28 | + .eq(LocationHigh::getWarehouseCode, warehouseCode) | |
29 | + .in(LocationHigh::getLocationTypeCode, locationTypeCodeList); | |
30 | + LocationHigh locationHigh = getOne(locationHighLambdaQueryWrapper); | |
31 | + return locationHigh; | |
32 | + } | |
19 | 33 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/locationType/service/ILocationTypeService.java
... | ... | @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService; |
4 | 4 | import org.jeecg.modules.wms.config.locationType.entity.LocationType; |
5 | 5 | import org.jeecg.modules.wms.config.zone.entity.Zone; |
6 | 6 | |
7 | +import java.util.List; | |
8 | + | |
7 | 9 | /** |
8 | 10 | * @Description: 库位类型 |
9 | 11 | * @Author: jeecg-boot |
... | ... | @@ -13,4 +15,6 @@ import org.jeecg.modules.wms.config.zone.entity.Zone; |
13 | 15 | public interface ILocationTypeService extends IService<LocationType> { |
14 | 16 | |
15 | 17 | LocationType getLocationTypeByCode(String locationTypeCode, String wareohuseCode); |
18 | + | |
19 | + List<LocationType> getLocationTypeListByZoneCode(String zoneCode, String warehouseCode); | |
16 | 20 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/locationType/service/impl/LocationTypeServiceImpl.java
... | ... | @@ -9,6 +9,8 @@ import org.springframework.stereotype.Service; |
9 | 9 | |
10 | 10 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
11 | 11 | |
12 | +import java.util.List; | |
13 | + | |
12 | 14 | /** |
13 | 15 | * @Description: 库位类型 |
14 | 16 | * @Author: jeecg-boot |
... | ... | @@ -26,4 +28,13 @@ public class LocationTypeServiceImpl extends ServiceImpl<LocationTypeMapper, Loc |
26 | 28 | LocationType locationType = getOne(locationTypeMapperLambdaQueryWrapper); |
27 | 29 | return locationType; |
28 | 30 | } |
31 | + | |
32 | + @Override | |
33 | + public List<LocationType> getLocationTypeListByZoneCode(String zoneCode, String warehouseCode) { | |
34 | + LambdaQueryWrapper<LocationType> locationTypeLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
35 | + locationTypeLambdaQueryWrapper.eq(LocationType::getZoneCode, zoneCode) | |
36 | + .eq(LocationType::getWarehouseCode, warehouseCode); | |
37 | + List<LocationType> locationTypeList = list(locationTypeLambdaQueryWrapper); | |
38 | + return locationTypeList; | |
39 | + } | |
29 | 40 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java
... | ... | @@ -15,4 +15,8 @@ import java.util.List; |
15 | 15 | public interface IPortService extends IService<Port> { |
16 | 16 | |
17 | 17 | List<Port> getPortListByType(int type, String zoneCode, String warehouseCode); |
18 | + | |
19 | + Port getPortByCode(String code, String zoneCode, String warehouseCode); | |
20 | + | |
21 | + Port getPortByCode(String code, String warehouseCode); | |
18 | 22 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java
... | ... | @@ -31,4 +31,23 @@ public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IP |
31 | 31 | List<Port> portList = list(portLambdaQueryWrapper); |
32 | 32 | return portList; |
33 | 33 | } |
34 | + | |
35 | + @Override | |
36 | + public Port getPortByCode(String code, String zoneCode, String warehouseCode) { | |
37 | + LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
38 | + portLambdaQueryWrapper.eq(Port::getCode, code) | |
39 | + .eq(Port::getZoneCode, zoneCode) | |
40 | + .eq(Port::getWarehouseCode, warehouseCode); | |
41 | + Port port = getOne(portLambdaQueryWrapper); | |
42 | + return port; | |
43 | + } | |
44 | + | |
45 | + @Override | |
46 | + public Port getPortByCode(String code, String warehouseCode) { | |
47 | + LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
48 | + portLambdaQueryWrapper.eq(Port::getCode, code) | |
49 | + .eq(Port::getWarehouseCode, warehouseCode); | |
50 | + Port port = getOne(portLambdaQueryWrapper); | |
51 | + return port; | |
52 | + } | |
34 | 53 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/framework/controller/BaseController.java
1 | 1 | package org.jeecg.modules.wms.framework.controller; |
2 | 2 | |
3 | +import org.apache.commons.collections.MapUtils; | |
3 | 4 | import org.jeecg.common.api.vo.Result; |
5 | +import org.jeecg.common.system.base.controller.JeecgController; | |
4 | 6 | |
7 | +import java.util.HashMap; | |
8 | +import java.util.Map; | |
5 | 9 | import java.util.concurrent.Semaphore; |
6 | 10 | |
7 | 11 | /** |
... | ... | @@ -9,28 +13,51 @@ import java.util.concurrent.Semaphore; |
9 | 13 | */ |
10 | 14 | public class BaseController { |
11 | 15 | |
16 | + //下发任务并发控制 | |
17 | + Map<String, Boolean> runningTaskMap = new HashMap<>(); | |
18 | + | |
19 | + //并发控制,一次只允许一个请求 | |
20 | + public Result handleQuest(String taskKey, JeecgController.MultiProcessListener multiProcessListener) { | |
21 | + Result result = null; | |
22 | + if(MapUtils.getBoolean(runningTaskMap, taskKey, false)) { | |
23 | + return Result.error("重复请求,清稍后重试"); | |
24 | + } | |
25 | + runningTaskMap.put(taskKey, true); | |
26 | + try { | |
27 | + result = multiProcessListener.doProcess(); | |
28 | + } catch (Exception e) { | |
29 | + e.printStackTrace(); | |
30 | + throw new RuntimeException(e); | |
31 | + } finally { | |
32 | + runningTaskMap.put(taskKey, false); | |
33 | + } | |
34 | + return result; | |
35 | + } | |
36 | + | |
12 | 37 | Semaphore semaphore=new Semaphore(1); |
38 | + //下发任务并发控制 | |
39 | + Map<String, Boolean> multiProcessMap = new HashMap<>(); | |
13 | 40 | |
14 | - public Result handleMultiProcess(MultiProcessListener multiProcessListener) { | |
41 | + public Result handleMultiProcess(String taskKey, JeecgController.MultiProcessListener multiProcessListener) { | |
15 | 42 | Result result = null; |
16 | 43 | int max_time = 30 * 1000; |
17 | 44 | int now = 0; |
18 | 45 | boolean avail = true; |
19 | 46 | while(avail) { |
20 | - int availablePermits = semaphore.availablePermits(); | |
21 | - if(availablePermits >0) { | |
47 | + boolean availablePermits = MapUtils.getBoolean(multiProcessMap, taskKey, false); | |
48 | + if(!availablePermits) { | |
22 | 49 | avail = false; |
23 | 50 | try { |
24 | - semaphore.acquire(1); | |
51 | + multiProcessMap.put(taskKey, true); | |
25 | 52 | result = multiProcessListener.doProcess(); |
26 | 53 | } catch (Exception e) { |
27 | 54 | e.printStackTrace(); |
28 | - result = Result.error(e.getMessage()); | |
55 | + throw new RuntimeException(e); | |
29 | 56 | } finally { |
30 | - semaphore.release(1); | |
57 | + multiProcessMap.put(taskKey, false); | |
31 | 58 | } |
32 | 59 | } else { |
33 | - result = Result.error("多线程处理异常"); | |
60 | + result = Result.error("多线程处理异常, 待处理现场太多,等待时间超出30秒"); | |
34 | 61 | try { |
35 | 62 | now = now + 200; |
36 | 63 | Thread.sleep(200); |
... | ... | @@ -45,7 +72,4 @@ public class BaseController { |
45 | 72 | return result; |
46 | 73 | } |
47 | 74 | |
48 | - public interface MultiProcessListener { | |
49 | - Result doProcess(); | |
50 | - } | |
51 | 75 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/inventory/inventoryTransaction/entity/InventoryTransaction.java
... | ... | @@ -47,10 +47,14 @@ public class InventoryTransaction implements Serializable { |
47 | 47 | @Excel(name = "容器编码", width = 15) |
48 | 48 | @ApiModelProperty(value = "容器编码") |
49 | 49 | private String containerCode; |
50 | - /**库位编码*/ | |
51 | - @Excel(name = "库位编码", width = 15) | |
52 | - @ApiModelProperty(value = "库位编码") | |
53 | - private String locationCode; | |
50 | + /**起始库位编码*/ | |
51 | + @Excel(name = "起始库位编码", width = 15) | |
52 | + @ApiModelProperty(value = "起始库位编码") | |
53 | + private String fromLocationCode; | |
54 | + /**目标库位编码*/ | |
55 | + @Excel(name = "目标库位编码", width = 15) | |
56 | + @ApiModelProperty(value = "目标库位编码") | |
57 | + private String toLocationCode; | |
54 | 58 | /**交易类型*/ |
55 | 59 | @Excel(name = "交易类型", width = 15, dicCode = "inventory_transaction_type") |
56 | 60 | @Dict(dicCode = "inventory_transaction_type") |
... | ... | @@ -99,6 +103,7 @@ public class InventoryTransaction implements Serializable { |
99 | 103 | /**库存状态*/ |
100 | 104 | @Excel(name = "库存状态", width = 15) |
101 | 105 | @ApiModelProperty(value = "库存状态") |
106 | + @Dict(dicCode = "inventory_status") | |
102 | 107 | private String inventoryStatus; |
103 | 108 | /**数量*/ |
104 | 109 | @Excel(name = "数量", width = 15) |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/IReceiptContainerHeaderService.java
... | ... | @@ -37,5 +37,17 @@ public interface IReceiptContainerHeaderService extends IService<ReceiptContaine |
37 | 37 | // 获取没有完成的入库组盘 |
38 | 38 | List<ReceiptContainerHeader> getUnCompleteCombineList(); |
39 | 39 | |
40 | - boolean havaUnCompleteCombine(String containerCode, String warehouseCode); | |
40 | + boolean havaUnCompleteCombineByContainerCode(String containerCode, String warehouseCode); | |
41 | + | |
42 | + boolean havaUnCompleteCombineByLocationCode(String locationCode, String warehouseCode); | |
43 | + | |
44 | + boolean havaUnCompleteCombineByFromLocationCode(String fromLocationCode, String warehouseCode); | |
45 | + | |
46 | + boolean havaUnCompleteCombineByToLocationCode(String toLocationCode, String warehouseCode); | |
47 | + | |
48 | + /** | |
49 | + * 取消入库任务 | |
50 | + * @return | |
51 | + */ | |
52 | + boolean cancelReceiptTask(Integer receiptContainerHeaderId); | |
41 | 53 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -92,15 +92,10 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
92 | 92 | } |
93 | 93 | |
94 | 94 | @Override |
95 | - @Transactional | |
95 | + @Transactional(rollbackFor = ServiceException.class) | |
96 | 96 | public Result createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) { |
97 | - int id = receiptContainerHeader.getId(); | |
98 | - receiptContainerHeader = this.getById(id); | |
99 | - if (receiptContainerHeader == null) { | |
100 | - return Result.error("id:" + id + "的入库组盘不存在!"); | |
101 | - } | |
102 | 97 | if (!receiptContainerHeader.getWarehouseCode().equals(warehouseCode)) { |
103 | - return Result.error("id:" + id + "的入库组盘不能在" + warehouseCode + "仓库操作"); | |
98 | + return Result.error("id:" + receiptContainerHeader.getId() + "的入库组盘不能在" + warehouseCode + "仓库操作"); | |
104 | 99 | } |
105 | 100 | String containerCode = receiptContainerHeader.getContainerCode(); |
106 | 101 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
... | ... | @@ -110,27 +105,27 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
110 | 105 | List<ReceiptContainerDetail> receiptContainerDetailList = |
111 | 106 | receiptContainerDetailService.getReceiptContainerDetailListByHeaderId(receiptContainerHeader.getId()); |
112 | 107 | if(receiptContainerDetailList.size() == 0) { |
113 | - return Result.error("id:" + id + "的入库组盘,没有组盘明细,请先组盘!"); | |
108 | + return Result.error("id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!"); | |
114 | 109 | } |
115 | - boolean result = containerService.updateStatus(containerCode, | |
110 | + boolean success = containerService.updateStatus(containerCode, | |
116 | 111 | QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
117 | - if(!result) { | |
112 | + if(!success) { | |
118 | 113 | throw new ServiceException("更新容器状态失败"); |
119 | 114 | } |
120 | 115 | String fromLocationCode = receiptContainerHeader.getFromLocationCode(); |
121 | 116 | String toLocaitonCode = receiptContainerHeader.getToLocationCode(); |
122 | 117 | if(StringUtils.isNotEmpty(fromLocationCode)) { |
123 | - result = locationService.updateStatus(fromLocationCode, | |
118 | + success = locationService.updateStatus(fromLocationCode, | |
124 | 119 | QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
125 | - if(!result) { | |
120 | + if(!success) { | |
126 | 121 | throw new ServiceException("更新起始库位状态失败"); |
127 | 122 | } |
128 | 123 | } |
129 | 124 | String zoneCode = null; |
130 | 125 | if(StringUtils.isNotEmpty(toLocaitonCode)) { |
131 | - result = locationService.updateStatus(toLocaitonCode, | |
126 | + success = locationService.updateStatus(toLocaitonCode, | |
132 | 127 | QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); |
133 | - if(!result) { | |
128 | + if(!success) { | |
134 | 129 | throw new ServiceException("更新目标库位状态失败"); |
135 | 130 | } |
136 | 131 | Location toLocation = locationService.getLocationByCode(toLocaitonCode, warehouseCode); |
... | ... | @@ -148,8 +143,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
148 | 143 | throw new ServiceException("入库组盘状态不是创建状态"); |
149 | 144 | } |
150 | 145 | receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK); |
151 | - result = receiptContainerHeaderService.updateById(receiptContainerHeader); | |
152 | - if(!result) { | |
146 | + success = receiptContainerHeaderService.updateById(receiptContainerHeader); | |
147 | + if(!success) { | |
153 | 148 | throw new ServiceException("更新入库组盘头状态失败"); |
154 | 149 | } |
155 | 150 | TaskHeader taskHeader = new TaskHeader(); |
... | ... | @@ -163,9 +158,9 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
163 | 158 | taskHeader.setReceiptContainerHeaderId(receiptContainerHeader.getId()); |
164 | 159 | taskHeader.setWarehouseCode(warehouseCode); |
165 | 160 | taskHeader.setZoneCode(zoneCode); |
166 | - taskHeader.setToPort(receiptContainerHeader.getToPort()); | |
167 | - result = taskHeaderService.save(taskHeader); | |
168 | - if(!result) { | |
161 | + taskHeader.setToPortCode(receiptContainerHeader.getToPort()); | |
162 | + success = taskHeaderService.save(taskHeader); | |
163 | + if(!success) { | |
169 | 164 | throw new ServiceException("任务生成失败"); |
170 | 165 | } |
171 | 166 | List<TaskDetail> taskDetailList = new ArrayList<>(); |
... | ... | @@ -196,24 +191,24 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
196 | 191 | receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_WAIT_SHELF); |
197 | 192 | receiptDetailList.add(receiptDetail); |
198 | 193 | } |
199 | - result = taskDetailService.saveBatch(taskDetailList); | |
200 | - if(!result) { | |
194 | + success = taskDetailService.saveBatch(taskDetailList); | |
195 | + if(!success) { | |
201 | 196 | throw new ServiceException("任务详情生成失败"); |
202 | 197 | } |
203 | 198 | receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK); |
204 | - result = this.updateById(receiptContainerHeader); | |
205 | - if(!result) { | |
199 | + success = this.updateById(receiptContainerHeader); | |
200 | + if(!success) { | |
206 | 201 | throw new ServiceException("生成任务时,更新入库组盘头失败"); |
207 | 202 | } |
208 | - result = receiptDetailService.updateBatchById(receiptDetailList); | |
209 | - if(!result) { | |
203 | + success = receiptDetailService.updateBatchById(receiptDetailList); | |
204 | + if(!success) { | |
210 | 205 | throw new ServiceException("更新入库单明细失败"); |
211 | 206 | } |
212 | 207 | List<Integer> receiptIdList =receiptDetailList.stream() |
213 | 208 | .map(ReceiptDetail::getReceiptId).distinct().collect(Collectors.toList()); |
214 | 209 | for(Integer receiptId : receiptIdList) { |
215 | - result = receiptHeaderService.updateReceiptHeaderStatus(receiptId); | |
216 | - if (!result) { | |
210 | + success = receiptHeaderService.updateReceiptHeaderStatus(receiptId); | |
211 | + if (!success) { | |
217 | 212 | throw new ServiceException("更新入库单明细失败"); |
218 | 213 | } |
219 | 214 | } |
... | ... | @@ -241,7 +236,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
241 | 236 | } |
242 | 237 | |
243 | 238 | @Override |
244 | - public boolean havaUnCompleteCombine(String containerCode, String warehouseCode) { | |
239 | + public boolean havaUnCompleteCombineByContainerCode(String containerCode, String warehouseCode) { | |
245 | 240 | LambdaQueryWrapper<ReceiptContainerHeader> receiptContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
246 | 241 | receiptContainerHeaderLambdaQueryWrapper.eq(ReceiptContainerHeader::getContainerCode, containerCode) |
247 | 242 | .eq(ReceiptContainerHeader::getWarehouseCode, warehouseCode) |
... | ... | @@ -253,4 +248,87 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
253 | 248 | return false; |
254 | 249 | } |
255 | 250 | |
251 | + @Override | |
252 | + public boolean havaUnCompleteCombineByLocationCode(String locationCode, String warehouseCode) { | |
253 | + boolean success = havaUnCompleteCombineByFromLocationCode(locationCode, warehouseCode); | |
254 | + if(!success) { | |
255 | + success = havaUnCompleteCombineByToLocationCode(locationCode, warehouseCode); | |
256 | + } | |
257 | + return success; | |
258 | + } | |
259 | + | |
260 | + @Override | |
261 | + public boolean havaUnCompleteCombineByFromLocationCode(String fromLocationCode, String warehouseCode) { | |
262 | + LambdaQueryWrapper<ReceiptContainerHeader> receiptContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
263 | + receiptContainerHeaderLambdaQueryWrapper.eq(ReceiptContainerHeader::getFromLocationCode, fromLocationCode) | |
264 | + .eq(ReceiptContainerHeader::getWarehouseCode, warehouseCode) | |
265 | + .lt(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_FINISHED); | |
266 | + ReceiptContainerHeader receiptContainerHeader = getOne(receiptContainerHeaderLambdaQueryWrapper); | |
267 | + if(receiptContainerHeader != null) { | |
268 | + return true; | |
269 | + } | |
270 | + return false; | |
271 | + } | |
272 | + | |
273 | + @Override | |
274 | + public boolean havaUnCompleteCombineByToLocationCode(String toLocationCode, String warehouseCode) { | |
275 | + LambdaQueryWrapper<ReceiptContainerHeader> receiptContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
276 | + receiptContainerHeaderLambdaQueryWrapper.eq(ReceiptContainerHeader::getToLocationCode, toLocationCode) | |
277 | + .eq(ReceiptContainerHeader::getWarehouseCode, warehouseCode) | |
278 | + .lt(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_FINISHED); | |
279 | + ReceiptContainerHeader receiptContainerHeader = getOne(receiptContainerHeaderLambdaQueryWrapper); | |
280 | + if(receiptContainerHeader != null) { | |
281 | + return true; | |
282 | + } | |
283 | + return false; | |
284 | + } | |
285 | + | |
286 | + | |
287 | + @Override | |
288 | + @Transactional(rollbackFor = ServiceException.class) | |
289 | + public boolean cancelReceiptTask(Integer receiptContainerHeaderId) { | |
290 | + ReceiptContainerHeader receiptContainerHeader = getById(receiptContainerHeaderId); | |
291 | + if(receiptContainerHeader == null) { | |
292 | + return false; | |
293 | + } | |
294 | + int receiptContainerStatus = receiptContainerHeader.getStatus(); | |
295 | + if(receiptContainerStatus == QuantityConstant.RECEIPT_CONTAINER_TASK) { | |
296 | + throw new ServiceException("取消入库任务时, "); | |
297 | + } | |
298 | + receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_BUILD); | |
299 | + boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader); | |
300 | + if(!success) { | |
301 | + throw new ServiceException("取消入库任务时, 更新入库组盘头失败"); | |
302 | + } | |
303 | + | |
304 | + List<ReceiptContainerDetail> receiptContainerDetailList = receiptContainerDetailService. | |
305 | + getReceiptContainerDetailListByHeaderId(receiptContainerHeader.getId()); | |
306 | + List<ReceiptDetail> receiptDetailList = new ArrayList<>(); | |
307 | + for(ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) { | |
308 | + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); | |
309 | + if(receiptDetail == null) { | |
310 | + throw new ServiceException("取消入库任务时, 没有找到入库单详情" + receiptContainerDetail.getReceiptDetailId()); | |
311 | + } | |
312 | + receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_RECEIVING); | |
313 | + receiptDetailList.add(receiptDetail); | |
314 | + } | |
315 | + if(receiptDetailList.size() != 0) { | |
316 | + success = receiptDetailService.updateBatchById(receiptDetailList); | |
317 | + if(!success) { | |
318 | + throw new ServiceException("取消入库任务时, 更新入库单详情头失败"); | |
319 | + } | |
320 | + | |
321 | + List<Integer> receiptIdList = receiptDetailList.stream() | |
322 | + .map(ReceiptDetail::getReceiptId).distinct().collect(Collectors.toList()); | |
323 | + for(Integer receiptId : receiptIdList) { | |
324 | + success = receiptHeaderService.updateReceiptHeaderStatus(receiptId); | |
325 | + if (!success) { | |
326 | + throw new ServiceException("更新入库单明细失败"); | |
327 | + } | |
328 | + } | |
329 | + } | |
330 | + | |
331 | + return true; | |
332 | + } | |
333 | + | |
256 | 334 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java
... | ... | @@ -122,6 +122,10 @@ public class shipmentCombinationController { |
122 | 122 | return Result.error("选择分拣口时, 库区为空"); |
123 | 123 | } |
124 | 124 | int type = QuantityConstant.PORT_TYPE_PICK; |
125 | + int tasktType = shipmentContainerHeader.getTaskType(); | |
126 | + if(tasktType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT || tasktType == QuantityConstant.TASK_TYPE_EMPTYSHIPMENT) { | |
127 | + type = QuantityConstant.PORT_TYPE_OUT; | |
128 | + } | |
125 | 129 | List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode); |
126 | 130 | if(portList.size() == 0) { |
127 | 131 | return Result.error("选择分拣口时, 没有找到合适的分拣口"); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... | ... | @@ -234,7 +234,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
234 | 234 | if(!warehouseCode.equals(shipmentDetail.getWarehouseCode())) { |
235 | 235 | return Result.error("配盘时,库存仓库编码和出库单仓库编码不一致"); |
236 | 236 | } |
237 | - boolean success = receiptContainerHeaderService.havaUnCompleteCombine(containerCode, warehouseCode); | |
237 | + boolean success = receiptContainerHeaderService.havaUnCompleteCombineByContainerCode(containerCode, warehouseCode); | |
238 | 238 | if(success) { |
239 | 239 | return Result.error("配盘时, 容器:" + containerCode + " 已经用于入库组盘"); |
240 | 240 | } |
... | ... | @@ -500,7 +500,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
500 | 500 | taskHeader.setWarehouseCode(warehouseCode); |
501 | 501 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
502 | 502 | taskHeader.setContainerCode(containerCode); |
503 | - taskHeader.setToPort(shipmentContainerHeader.getToPort()); | |
503 | + taskHeader.setToPortCode(shipmentContainerHeader.getToPort()); | |
504 | 504 | taskHeader.setFromLocationCode(fromLocationCode); |
505 | 505 | if(taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) { |
506 | 506 | taskHeader.setToLocationCode(toLocationCode); |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/IShipmentContainerHeaderService.java
... | ... | @@ -28,6 +28,11 @@ public interface IShipmentContainerHeaderService extends IService<ShipmentContai |
28 | 28 | |
29 | 29 | public List<ShipmentContainerHeader> getUnCompleteCombineList(); |
30 | 30 | |
31 | - boolean havaUnCompleteCombine(String containerCode, String warehouseCode); | |
31 | + boolean havaUnCompleteCombineByContainerCode(String containerCode, String warehouseCode); | |
32 | 32 | |
33 | + boolean havaUnCompleteCombineByLocationCode(String locationCode, String warehouseCode); | |
34 | + | |
35 | + boolean havaUnCompleteCombineByFromLocationCode(String fromLocationCode, String warehouseCode); | |
36 | + | |
37 | + boolean havaUnCompleteCombineByToLocationCode(String toLocationCode, String warehouseCode); | |
33 | 38 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/impl/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -68,10 +68,31 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
68 | 68 | } |
69 | 69 | |
70 | 70 | @Override |
71 | - public boolean havaUnCompleteCombine(String containerCode, String warehouseCode) { | |
71 | + public boolean havaUnCompleteCombineByContainerCode(String containerCode, String warehouseCode) { | |
72 | 72 | LambdaQueryWrapper<ShipmentContainerHeader> shipmentContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
73 | - shipmentContainerHeaderLambdaQueryWrapper | |
74 | - .eq(ShipmentContainerHeader::getContainerCode, containerCode) | |
73 | + shipmentContainerHeaderLambdaQueryWrapper.eq(ShipmentContainerHeader::getContainerCode, containerCode) | |
74 | + .eq(ShipmentContainerHeader::getWarehouseCode, warehouseCode) | |
75 | + .lt(ShipmentContainerHeader::getStatus, QuantityConstant.SHIPMENT_CONTAINER_FINISHED); | |
76 | + ShipmentContainerHeader shipmentContainerHeader = getOne(shipmentContainerHeaderLambdaQueryWrapper); | |
77 | + if(shipmentContainerHeader != null) { | |
78 | + return true; | |
79 | + } | |
80 | + return false; | |
81 | + } | |
82 | + | |
83 | + @Override | |
84 | + public boolean havaUnCompleteCombineByLocationCode(String locationCode, String warehouseCode) { | |
85 | + boolean success = havaUnCompleteCombineByFromLocationCode(locationCode, warehouseCode); | |
86 | + if(!success) { | |
87 | + success = havaUnCompleteCombineByToLocationCode(locationCode, warehouseCode); | |
88 | + } | |
89 | + return success; | |
90 | + } | |
91 | + | |
92 | + @Override | |
93 | + public boolean havaUnCompleteCombineByFromLocationCode(String fromLocationCode, String warehouseCode) { | |
94 | + LambdaQueryWrapper<ShipmentContainerHeader> shipmentContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
95 | + shipmentContainerHeaderLambdaQueryWrapper.eq(ShipmentContainerHeader::getFromLocationCode, fromLocationCode) | |
75 | 96 | .eq(ShipmentContainerHeader::getWarehouseCode, warehouseCode) |
76 | 97 | .lt(ShipmentContainerHeader::getStatus, QuantityConstant.SHIPMENT_CONTAINER_FINISHED); |
77 | 98 | ShipmentContainerHeader shipmentContainerHeader = getOne(shipmentContainerHeaderLambdaQueryWrapper); |
... | ... | @@ -81,6 +102,18 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
81 | 102 | return false; |
82 | 103 | } |
83 | 104 | |
105 | + @Override | |
106 | + public boolean havaUnCompleteCombineByToLocationCode(String toLocationCode, String warehouseCode) { | |
107 | + LambdaQueryWrapper<ShipmentContainerHeader> shipmentContainerHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
108 | + shipmentContainerHeaderLambdaQueryWrapper.eq(ShipmentContainerHeader::getToLocationCode, toLocationCode) | |
109 | + .eq(ShipmentContainerHeader::getWarehouseCode, warehouseCode) | |
110 | + .lt(ShipmentContainerHeader::getStatus, QuantityConstant.SHIPMENT_CONTAINER_FINISHED); | |
111 | + ShipmentContainerHeader shipmentContainerHeader = getOne(shipmentContainerHeaderLambdaQueryWrapper); | |
112 | + if(shipmentContainerHeader != null) { | |
113 | + return true; | |
114 | + } | |
115 | + return false; | |
116 | + } | |
84 | 117 | |
85 | 118 | |
86 | 119 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
1 | 1 | package org.jeecg.modules.wms.task.taskHeader.controller; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | 5 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
4 | 6 | import org.jeecg.common.system.query.QueryGenerator; |
5 | 7 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
... | ... | @@ -8,14 +10,28 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
8 | 10 | import lombok.extern.slf4j.Slf4j; |
9 | 11 | import org.jeecg.common.system.base.controller.JeecgController; |
10 | 12 | import org.jeecg.common.api.vo.Result; |
13 | +import org.jeecg.common.system.util.JwtUtil; | |
14 | +import org.jeecg.modules.wms.config.container.entity.Container; | |
15 | +import org.jeecg.modules.wms.config.container.service.IContainerService; | |
16 | +import org.jeecg.modules.wms.config.location.entity.Location; | |
17 | +import org.jeecg.modules.wms.config.location.service.ILocationService; | |
18 | +import org.jeecg.modules.wms.config.port.entity.Port; | |
19 | +import org.jeecg.modules.wms.config.port.service.IPortService; | |
20 | +import org.jeecg.modules.wms.config.zone.entity.Zone; | |
21 | +import org.jeecg.modules.wms.config.zone.service.IZoneService; | |
22 | +import org.jeecg.modules.wms.framework.Convert; | |
11 | 23 | import org.jeecg.modules.wms.framework.controller.BaseController; |
24 | +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; | |
12 | 25 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; |
13 | 26 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
14 | 27 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService; |
15 | 28 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
16 | 29 | import org.jeecg.utils.StringUtils; |
30 | +import org.jeecg.utils.constant.QuantityConstant; | |
17 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 32 | import org.springframework.web.bind.annotation.*; |
33 | + | |
34 | +import javax.annotation.Resource; | |
19 | 35 | import javax.servlet.http.HttpServletRequest; |
20 | 36 | import javax.servlet.http.HttpServletResponse; |
21 | 37 | import org.springframework.web.servlet.ModelAndView; |
... | ... | @@ -55,6 +71,14 @@ public class TaskHeaderController extends JeecgController<TaskHeader, ITaskHeade |
55 | 71 | |
56 | 72 | @Autowired |
57 | 73 | private ITaskDetailService taskDetailService; |
74 | + @Resource | |
75 | + private ILocationService locationService; | |
76 | + @Resource | |
77 | + private IContainerService containerService; | |
78 | + @Resource | |
79 | + private IPortService portService; | |
80 | + @Resource | |
81 | + private IZoneService zoneService; | |
58 | 82 | |
59 | 83 | |
60 | 84 | /*---------------------------------主表处理-begin-------------------------------------*/ |
... | ... | @@ -316,6 +340,31 @@ public class TaskHeaderController extends JeecgController<TaskHeader, ITaskHeade |
316 | 340 | } |
317 | 341 | |
318 | 342 | /** |
343 | + * 取消任务 | |
344 | + */ | |
345 | + @AutoLog(value = "任务表-取消任务") | |
346 | + @ApiOperation(value="任务表-取消任务", notes="任务表-取消任务") | |
347 | + @PostMapping( "/cancelTask") | |
348 | + @ResponseBody | |
349 | + public Result cancelTask(String ids) { | |
350 | + if (StringUtils.isEmpty(ids)) { | |
351 | + return Result.error("taskId不能为空"); | |
352 | + } | |
353 | + Result result = null; | |
354 | + Integer[] idList = Convert.toIntArray(ids); | |
355 | + for (int taskId : idList) { | |
356 | + result = handleMultiProcess("cancelTask", new MultiProcessListener() { | |
357 | + @Override | |
358 | + public Result doProcess() { | |
359 | + Result result = taskHeaderService.cancelTask(taskId); | |
360 | + return result; | |
361 | + } | |
362 | + }); | |
363 | + } | |
364 | + return result; | |
365 | + } | |
366 | + | |
367 | + /** | |
319 | 368 | * 执行任务 |
320 | 369 | */ |
321 | 370 | @AutoLog(value = "任务表-执行任务") |
... | ... | @@ -337,4 +386,258 @@ public class TaskHeaderController extends JeecgController<TaskHeader, ITaskHeade |
337 | 386 | return result; |
338 | 387 | } |
339 | 388 | } |
389 | + | |
390 | + /** | |
391 | + * 创建空托入库任务 | |
392 | + */ | |
393 | + @AutoLog(value = "任务表-创建空托入库任务") | |
394 | + @ApiOperation(value="任务表-创建空托入库任务", notes="任务表-创建空托入库任务") | |
395 | + @PostMapping( "/createEmptyIn") | |
396 | + public Result createEmptyIn(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
397 | + String contaienrCode = taskHeader.getContainerCode(); | |
398 | + String toLocationCode = taskHeader.getToLocationCode(); | |
399 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
400 | + Result result = handleMultiProcess("createEmptyIn", new MultiProcessListener() { | |
401 | + @Override | |
402 | + public Result doProcess() { | |
403 | + Result result = taskHeaderService.createEmptyIn(contaienrCode, | |
404 | + toLocationCode, warehouseCode); | |
405 | + return result; | |
406 | + } | |
407 | + }); | |
408 | + return result; | |
409 | + } | |
410 | + | |
411 | + /** | |
412 | + * 创建空托出库任务 | |
413 | + */ | |
414 | + @AutoLog(value = "任务表-创建空托出库任务") | |
415 | + @ApiOperation(value="任务表-创建空托出库任务", notes="任务表-创建空托出库任务") | |
416 | + @PostMapping( "/createEmptyOut") | |
417 | + public Result createEmptyOut(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
418 | + String contaienrCode = taskHeader.getContainerCode(); | |
419 | + String toPortCode = taskHeader.getToPortCode(); | |
420 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
421 | + Result result = handleMultiProcess("createEmptyOut", new MultiProcessListener() { | |
422 | + @Override | |
423 | + public Result doProcess() { | |
424 | + Result result = taskHeaderService.createEmptyOut(contaienrCode, | |
425 | + toPortCode, warehouseCode); | |
426 | + return result; | |
427 | + } | |
428 | + }); | |
429 | + return result; | |
430 | + } | |
431 | + | |
432 | + /** | |
433 | + * 创建移库任务 | |
434 | + */ | |
435 | + @AutoLog(value = "任务表-创建移库任务") | |
436 | + @ApiOperation(value="任务表-创建移库任务", notes="任务表-创建移库任务") | |
437 | + @PostMapping( "/createTransferTask") | |
438 | + public Result createTransferTask(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
439 | + String fromLocationCode = taskHeader.getFromLocationCode(); | |
440 | + String toLocationCode = taskHeader.getToLocationCode(); | |
441 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
442 | + Result result = handleMultiProcess("createTransferTask", new MultiProcessListener() { | |
443 | + @Override | |
444 | + public Result doProcess() { | |
445 | + Result result = taskHeaderService.createTransferTask(fromLocationCode, | |
446 | + toLocationCode, warehouseCode); | |
447 | + return result; | |
448 | + } | |
449 | + }); | |
450 | + return result; | |
451 | + } | |
452 | + | |
453 | + /** | |
454 | + * 创建出库查看任务 | |
455 | + */ | |
456 | + @AutoLog(value = "任务表-创建出库查看任务") | |
457 | + @ApiOperation(value="任务表-创建出库查看任务", notes="任务表-创建出库查看任务") | |
458 | + @PostMapping( "/createCheckOutTask") | |
459 | + public Result createCheckOutTask(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
460 | + String containerCode = taskHeader.getContainerCode(); | |
461 | + String toPortCode = taskHeader.getToPortCode(); | |
462 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
463 | + Result result = handleMultiProcess("createCheckOutTask", new MultiProcessListener() { | |
464 | + @Override | |
465 | + public Result doProcess() { | |
466 | + Result result = taskHeaderService.createCheckOutTask(containerCode, | |
467 | + toPortCode, warehouseCode); | |
468 | + return result; | |
469 | + } | |
470 | + }); | |
471 | + return result; | |
472 | + } | |
473 | + | |
474 | + /** | |
475 | + * 创建跨站任务 | |
476 | + */ | |
477 | + @AutoLog(value = "任务表-创建跨站任务") | |
478 | + @ApiOperation(value="任务表-创建跨站任务", notes="任务表-创建跨站任务") | |
479 | + @PostMapping( "/createOverStationTask") | |
480 | + public Result createOverStationTask(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
481 | + String containerCode = taskHeader.getContainerCode(); | |
482 | + String fromPortCode = taskHeader.getFromPortCode(); | |
483 | + String toPortCode = taskHeader.getToPortCode(); | |
484 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
485 | + Result result = handleMultiProcess("createOverStationTask", new MultiProcessListener() { | |
486 | + @Override | |
487 | + public Result doProcess() { | |
488 | + Result result = taskHeaderService.createOverStationTask(containerCode, | |
489 | + fromPortCode, toPortCode, warehouseCode); | |
490 | + return result; | |
491 | + } | |
492 | + }); | |
493 | + return result; | |
494 | + } | |
495 | + | |
496 | + /** | |
497 | + * 创建空托盘组入库 | |
498 | + */ | |
499 | + @AutoLog(value = "任务表-创建空托盘组入库") | |
500 | + @ApiOperation(value="任务表-创建空托盘组入库", notes="任务表-创建空托盘组入库") | |
501 | + @PostMapping( "/createManyEmptyIn") | |
502 | + public Result createManyEmptyIn(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
503 | + String containerCode = taskHeader.getContainerCode(); | |
504 | + String toLocationCode = taskHeader.getToLocationCode(); | |
505 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
506 | + Result result = handleMultiProcess("createManyEmptyIn", new MultiProcessListener() { | |
507 | + @Override | |
508 | + public Result doProcess() { | |
509 | + Result result = taskHeaderService.createManyEmptyIn(containerCode, toLocationCode, warehouseCode); | |
510 | + return result; | |
511 | + } | |
512 | + }); | |
513 | + return result; | |
514 | + } | |
515 | + | |
516 | + /** | |
517 | + * 创建空托盘组出库 | |
518 | + */ | |
519 | + @AutoLog(value = "任务表-创建空托盘组出库") | |
520 | + @ApiOperation(value="任务表-创建空托盘组出库", notes="任务表-创建空托盘组出库") | |
521 | + @PostMapping( "/createManyEmptyOut") | |
522 | + public Result createManyEmptyOut(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
523 | + String containerCode = taskHeader.getContainerCode(); | |
524 | + String toPortCode = taskHeader.getToPortCode(); | |
525 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
526 | + Result result = handleMultiProcess("createManyEmptyOut", new MultiProcessListener() { | |
527 | + @Override | |
528 | + public Result doProcess() { | |
529 | + Result result = taskHeaderService.createManyEmptyOut(containerCode, toPortCode, warehouseCode); | |
530 | + return result; | |
531 | + } | |
532 | + }); | |
533 | + return result; | |
534 | + } | |
535 | + | |
536 | + /** | |
537 | + * 选择整出口 | |
538 | + * @return | |
539 | + */ | |
540 | + @ApiOperation(value="任务表-选择整出口", notes="任务表-选择整出口") | |
541 | + @PostMapping("/selectOutPort") | |
542 | + @ResponseBody | |
543 | + public Result selectOutPort(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
544 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
545 | + String containerCode = taskHeader.getContainerCode(); | |
546 | + if(StringUtils.isEmpty(containerCode)) { | |
547 | + return Result.error("选择整出口, 托盘号为空"); | |
548 | + } | |
549 | + Container container = containerService.getContainerByCode(containerCode, warehouseCode); | |
550 | + if(container == null) { | |
551 | + return Result.error("选择整出口, 没有找到托盘" + containerCode); | |
552 | + } | |
553 | + String fromLocationCode = container.getLocationCode(); | |
554 | + if(StringUtils.isEmpty(fromLocationCode)) { | |
555 | + return Result.error("选择整出口, 起始库位号为空"); | |
556 | + } | |
557 | + Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode); | |
558 | + if(fromLocation == null) { | |
559 | + return Result.error("选择整出口, 根据库位号" + fromLocationCode + " 没有找到库位"); | |
560 | + } | |
561 | + String zoneCode = fromLocation.getZoneCode(); | |
562 | + if(StringUtils.isEmpty(zoneCode)) { | |
563 | + return Result.error("选择整出口, 库区编码为空"); | |
564 | + } | |
565 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
566 | + if(zone == null) { | |
567 | + return Result.error("选择整出口, 库区为空"); | |
568 | + } | |
569 | + int type = QuantityConstant.PORT_TYPE_OUT; | |
570 | + List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode); | |
571 | + if(portList.size() == 0) { | |
572 | + return Result.error("选择整出口, 没有找到合适的整出口"); | |
573 | + } | |
574 | + return Result.OK(portList); | |
575 | + } | |
576 | + | |
577 | + /** | |
578 | + * 选择分拣口 | |
579 | + * @return | |
580 | + */ | |
581 | + @ApiOperation(value="任务表-选择分拣口", notes="任务表-选择分拣口") | |
582 | + @PostMapping("/selectPickPort") | |
583 | + @ResponseBody | |
584 | + public Result selectPickPort(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
585 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
586 | + String containerCode = taskHeader.getContainerCode(); | |
587 | + if(StringUtils.isEmpty(containerCode)) { | |
588 | + return Result.error("选择分拣口, 托盘号为空"); | |
589 | + } | |
590 | + Container container = containerService.getContainerByCode(containerCode, warehouseCode); | |
591 | + if(container == null) { | |
592 | + return Result.error("选择分拣口, 没有找到托盘" + containerCode); | |
593 | + } | |
594 | + String fromLocationCode = container.getLocationCode(); | |
595 | + if(StringUtils.isEmpty(fromLocationCode)) { | |
596 | + return Result.error("选择整出口, 起始库位号为空"); | |
597 | + } | |
598 | + Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode); | |
599 | + if(fromLocation == null) { | |
600 | + return Result.error("选择分拣口, 根据库位号" + fromLocationCode + " 没有找到库位"); | |
601 | + } | |
602 | + String zoneCode = fromLocation.getZoneCode(); | |
603 | + if(StringUtils.isEmpty(zoneCode)) { | |
604 | + return Result.error("选择分拣口, 库区编码为空"); | |
605 | + } | |
606 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
607 | + if(zone == null) { | |
608 | + return Result.error("选择分拣口, 库区为空"); | |
609 | + } | |
610 | + int type = QuantityConstant.PORT_TYPE_PICK; | |
611 | + List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode); | |
612 | + if(portList.size() == 0) { | |
613 | + return Result.error("选择分拣口, 没有找到合适的分拣口"); | |
614 | + } | |
615 | + return Result.OK(portList); | |
616 | + } | |
617 | + | |
618 | + /** | |
619 | + * 选择站台 | |
620 | + * @return | |
621 | + */ | |
622 | + @ApiOperation(value="任务表-选择站台", notes="任务表-选择站台") | |
623 | + @PostMapping("/selectPort") | |
624 | + @ResponseBody | |
625 | + public Result selectPort(@RequestBody TaskHeader taskHeader, HttpServletRequest req) { | |
626 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | |
627 | + String containerCode = taskHeader.getContainerCode(); | |
628 | + if(StringUtils.isEmpty(containerCode)) { | |
629 | + return Result.error("选择站台, 托盘号为空"); | |
630 | + } | |
631 | + Container container = containerService.getContainerByCode(containerCode, warehouseCode); | |
632 | + if(container == null) { | |
633 | + return Result.error("选择站台, 没有找到托盘" + containerCode); | |
634 | + } | |
635 | + LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
636 | + portLambdaQueryWrapper.eq(Port::getWarehouseCode, warehouseCode); | |
637 | + List<Port> portList = portService.list(portLambdaQueryWrapper); | |
638 | + if(portList.size() == 0) { | |
639 | + return Result.error("选择站台, 没有找到合适的选择站台"); | |
640 | + } | |
641 | + return Result.OK(portList); | |
642 | + } | |
340 | 643 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
... | ... | @@ -97,11 +97,11 @@ public class TaskHeader implements Serializable { |
97 | 97 | /**起始出入口*/ |
98 | 98 | @Excel(name = "起始出入口", width = 15) |
99 | 99 | @ApiModelProperty(value = "起始出入口") |
100 | - private String fromPort; | |
100 | + private String fromPortCode; | |
101 | 101 | /**目标出入口*/ |
102 | 102 | @Excel(name = "目标出入口", width = 15) |
103 | 103 | @ApiModelProperty(value = "目标出入口") |
104 | - private String toPort; | |
104 | + private String toPortCode; | |
105 | 105 | @Excel(name = "重量", width = 15) |
106 | 106 | @ApiModelProperty(value = "重量") |
107 | 107 | private Integer weight; |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/ITaskHeaderService.java
... | ... | @@ -27,18 +27,156 @@ public interface ITaskHeaderService extends IService<TaskHeader> { |
27 | 27 | */ |
28 | 28 | void delBatchMain (Collection<? extends Serializable> idList); |
29 | 29 | |
30 | + /** | |
31 | + * 判断旁边库位是否有未完成的任务,如果有 | |
32 | + * @param location | |
33 | + * @return | |
34 | + */ | |
30 | 35 | boolean haveUncompleteTaskInNear(Location location); |
31 | 36 | |
32 | - Result createTransferTask(String fromLocationCode, String toLocationCode, String warehouseCode); | |
33 | - | |
34 | - | |
37 | + /** | |
38 | + * 通过起始库位号,获取任务信息 | |
39 | + * @param fromLocationCode | |
40 | + * @param warehouseCode | |
41 | + * @return | |
42 | + */ | |
35 | 43 | TaskHeader getUnCompleteTaskByFromLocationCode(String fromLocationCode, String warehouseCode); |
36 | 44 | |
45 | + /** | |
46 | + * 通过目标库位号,获取任务信息 | |
47 | + * @param toLocationCode | |
48 | + * @param warehouseCode | |
49 | + * @return | |
50 | + */ | |
37 | 51 | TaskHeader getUnCompleteTaskByToLocationCode(String toLocationCode, String warehouseCode); |
38 | 52 | |
53 | + /** | |
54 | + * 通过库位号,获取任务信息 | |
55 | + * @param locationCode | |
56 | + * @param warehouseCode | |
57 | + * @return | |
58 | + */ | |
39 | 59 | TaskHeader getUnCompleteTaskByLocationCode(String locationCode, String warehouseCode); |
40 | 60 | |
61 | + /** | |
62 | + * 通过托盘号,获取未完成任务信息 | |
63 | + * @param containerCode | |
64 | + * @param warehouseCode | |
65 | + * @return | |
66 | + */ | |
67 | + TaskHeader getUnCompleteTaskByContainerCode(String containerCode, String warehouseCode); | |
68 | + | |
69 | + /** | |
70 | + * 通过前置任务号,获取未完成任务信息 | |
71 | + * @param preTaskNo | |
72 | + * @param warehouseCode | |
73 | + * @return | |
74 | + */ | |
75 | + TaskHeader getUnCompleteTaskByPreTaskNo(int preTaskNo, String warehouseCode); | |
76 | + | |
77 | + /** | |
78 | + * 完成WMS任务 | |
79 | + * @param taskId | |
80 | + * @return | |
81 | + */ | |
41 | 82 | Result completeTaskByWMS(Integer taskId); |
42 | 83 | |
84 | + /** | |
85 | + * 取消WMS任务 | |
86 | + * @param taskId | |
87 | + * @return | |
88 | + */ | |
89 | + Result cancelTask(Integer taskId); | |
90 | + | |
91 | + /** | |
92 | + * 下发任务给WCS | |
93 | + * @param taskId | |
94 | + * @return | |
95 | + */ | |
43 | 96 | Result sendTaskToWcs(Integer taskId); |
97 | + | |
98 | + /** | |
99 | + * 创建空托盘入库任务 | |
100 | + * @param containerCode | |
101 | + * @param toLocationCode | |
102 | + * @param warehouseCode | |
103 | + * @return | |
104 | + */ | |
105 | + Result createEmptyIn(String containerCode, String toLocationCode, String warehouseCode); | |
106 | + | |
107 | + /** | |
108 | + * 创建空托盘出库任务 | |
109 | + * @param containerCode | |
110 | + * @param toPortCode | |
111 | + * @param warehouseCode | |
112 | + * @return | |
113 | + */ | |
114 | + Result createEmptyOut(String containerCode, String toPortCode, String warehouseCode); | |
115 | + | |
116 | + /** | |
117 | + * 创建移库任务 | |
118 | + * @param fromLocationCode | |
119 | + * @param toLocationCode | |
120 | + * @param warehouseCode | |
121 | + * @return | |
122 | + */ | |
123 | + Result createTransferTask(String fromLocationCode, String toLocationCode, String warehouseCode); | |
124 | + | |
125 | + /** | |
126 | + * 创建出库查看任务 | |
127 | + * @param containerCode | |
128 | + * @param toPortCode | |
129 | + * @param warehouseCode | |
130 | + * @return | |
131 | + */ | |
132 | + Result createCheckOutTask(String containerCode, String toPortCode, String warehouseCode); | |
133 | + | |
134 | + /** | |
135 | + * 创建跨站任务任务 | |
136 | + * @param containerCode | |
137 | + * @param fromPortCode | |
138 | + * @param toPortCode | |
139 | + * @param warehouseCode | |
140 | + * @return | |
141 | + */ | |
142 | + Result createOverStationTask(String containerCode, String fromPortCode, String toPortCode, String warehouseCode); | |
143 | + | |
144 | + /** | |
145 | + * WCS申请空托盘组入库 | |
146 | + * @param containerCode | |
147 | + * @param zoneCode | |
148 | + * @param roadWay | |
149 | + * @parap height | |
150 | + * @param warehouseCode | |
151 | + * @return | |
152 | + */ | |
153 | + Result createManyEmptyInTask(String containerCode, String zoneCode, String roadWay, String height, String warehouseCode); | |
154 | + | |
155 | + /** | |
156 | + * 创建空托盘组入库 | |
157 | + * @param containerCode | |
158 | + * @param toLocationCode | |
159 | + * @param warehouseCode | |
160 | + * @return | |
161 | + */ | |
162 | + Result createManyEmptyIn(String containerCode, String toLocationCode, String warehouseCode); | |
163 | + | |
164 | + /** | |
165 | + * WCS申请空托盘组出库 | |
166 | + * @param zoneCode | |
167 | + * @param toPortCode | |
168 | + * @param warehouseCode | |
169 | + * @return | |
170 | + */ | |
171 | + Result createManyEmptyOutTask(String zoneCode, String toPortCode, String warehouseCode); | |
172 | + | |
173 | + /** | |
174 | + * 创建空托盘组出库 | |
175 | + * @param containerCode | |
176 | + * @param toPortCode | |
177 | + * @param warehouseCode | |
178 | + * @return | |
179 | + */ | |
180 | + Result createManyEmptyOut(String containerCode, String toPortCode, String warehouseCode); | |
181 | + | |
44 | 182 | } |
... | ... |