Commit bad35d31ca2333e77c09e6f8acb6002ab57b06da
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # ant-design-vue-jeecg/src/api/api.js
Showing
37 changed files
with
1014 additions
and
198 deletions
ant-design-vue-jeecg/src/api/api.js
@@ -129,6 +129,8 @@ export const searchMaterialByCode = (params) => postAction('/config/material/sea | @@ -129,6 +129,8 @@ export const searchMaterialByCode = (params) => postAction('/config/material/sea | ||
129 | export const listReceiveByReceiptId = (params) => postAction('/receipt/receiveHeader/listReceiveByReceiptId', params); | 129 | export const listReceiveByReceiptId = (params) => postAction('/receipt/receiveHeader/listReceiveByReceiptId', params); |
130 | //创建入库任务 | 130 | //创建入库任务 |
131 | export const createReceiptTask = (params) => postAction('/receipt/receiptContainerHeader/createReceiptTask', params); | 131 | export const createReceiptTask = (params) => postAction('/receipt/receiptContainerHeader/createReceiptTask', params); |
132 | +//批量创建入库任务 | ||
133 | +export const createReceiptBatchTask = (params) => postAction('/receipt/receiptContainerHeader/createReceiptBatchTask', params); | ||
132 | //完成WMS任务 | 134 | //完成WMS任务 |
133 | export const completeTaskByWMS = (params) => postAction('/task/taskHeader/completeTaskByWMS', params); | 135 | export const completeTaskByWMS = (params) => postAction('/task/taskHeader/completeTaskByWMS', params); |
134 | //下发任务给WCS | 136 | //下发任务给WCS |
@@ -139,6 +141,8 @@ export const cancelTask = (params) => postAction('/task/taskHeader/cancelTask?id | @@ -139,6 +141,8 @@ export const cancelTask = (params) => postAction('/task/taskHeader/cancelTask?id | ||
139 | export const autoCombination = (params) => postAction('/shipment/shipmentCombination/autoCombination', params); | 141 | export const autoCombination = (params) => postAction('/shipment/shipmentCombination/autoCombination', params); |
140 | //创建出库任务 | 142 | //创建出库任务 |
141 | export const createShipmentTask = (params) => postAction('/shipment/shipmentCombination/createShipmentTask', params); | 143 | export const createShipmentTask = (params) => postAction('/shipment/shipmentCombination/createShipmentTask', params); |
144 | +//批量创建出库任务 | ||
145 | +export const createShipmentBatchTask = (params) => postAction('/shipment/shipmentCombination/createShipmentBatchTask', params); | ||
142 | //选择出库分拣口 | 146 | //选择出库分拣口 |
143 | export const selectSortingPort = (params) => postAction('/shipment/shipmentCombination/selectSortingPort', params); | 147 | export const selectSortingPort = (params) => postAction('/shipment/shipmentCombination/selectSortingPort', params); |
144 | //选择入库分拣口 | 148 | //选择入库分拣口 |
@@ -223,6 +227,10 @@ export const auditReceipt = (params) => getAction("/audit/audit/auditReceipt", p | @@ -223,6 +227,10 @@ export const auditReceipt = (params) => getAction("/audit/audit/auditReceipt", p | ||
223 | //查询审核流程进度 | 227 | //查询审核流程进度 |
224 | export const searchAuditFlow = (params) => getAction("/audit/audit/searchAuditFlow", params); | 228 | export const searchAuditFlow = (params) => getAction("/audit/audit/searchAuditFlow", params); |
225 | 229 | ||
230 | +//批量快速出整托 | ||
231 | +export const shipmentInventoryHeader = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryHeader', params); | ||
232 | +//批量快速出库存详情 | ||
233 | +export const shipmentInventoryDetail = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryDetail', params); | ||
226 | // 中转HTTP请求 | 234 | // 中转HTTP请求 |
227 | export const transitRESTful = { | 235 | export const transitRESTful = { |
228 | get: (url, parameter) => getAction(getTransitURL(url), parameter), | 236 | get: (url, parameter) => getAction(getTransitURL(url), parameter), |
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
@@ -37,9 +37,15 @@ | @@ -37,9 +37,15 @@ | ||
37 | </a-tag> | 37 | </a-tag> |
38 | </span> | 38 | </span> |
39 | 39 | ||
40 | - <span slot="controller_dictText" slot-scope="controller_dictText"> | ||
41 | - <a-tag :key="controller_dictText" :color="getStatusColor(controller_dictText)"> | ||
42 | - {{ controller_dictText }} | 40 | + <span slot="containerStatus_dictText" slot-scope="containerStatus_dictText"> |
41 | + <a-tag :key="containerStatus_dictText" :color="getStatusColor(containerStatus_dictText)"> | ||
42 | + {{ containerStatus_dictText }} | ||
43 | + </a-tag> | ||
44 | + </span> | ||
45 | + | ||
46 | + <span slot="enable_dictText" slot-scope="enable_dictText"> | ||
47 | + <a-tag :key="enable_dictText" :color="getStatusColor(enable_dictText)"> | ||
48 | + {{ enable_dictText }} | ||
43 | </a-tag> | 49 | </a-tag> |
44 | </span> | 50 | </span> |
45 | 51 | ||
@@ -199,10 +205,10 @@ export default { | @@ -199,10 +205,10 @@ export default { | ||
199 | scopedSlots: {customRender: 'inventoryStatus_dictText'} | 205 | scopedSlots: {customRender: 'inventoryStatus_dictText'} |
200 | }, | 206 | }, |
201 | { | 207 | { |
202 | - title: '受控状态', | 208 | + title: '可用状态', |
203 | align: 'center', | 209 | align: 'center', |
204 | - dataIndex: 'controller_dictText', | ||
205 | - scopedSlots: {customRender: 'controller_dictText'} | 210 | + dataIndex: 'enable_dictText', |
211 | + scopedSlots: {customRender: 'enable_dictText'} | ||
206 | }, | 212 | }, |
207 | { | 213 | { |
208 | title: '批次', | 214 | title: '批次', |
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -63,6 +63,7 @@ | @@ -63,6 +63,7 @@ | ||
63 | @change="handleImportExcel"> | 63 | @change="handleImportExcel"> |
64 | <a-button type="primary" icon="import">导入</a-button> | 64 | <a-button type="primary" icon="import">导入</a-button> |
65 | </a-upload> | 65 | </a-upload> |
66 | + <a-button v-has="'inventoryHeader:quickShipmentInventoryHeader'" @click="quickShipment()" type="primary">快速出库</a-button> | ||
66 | </div> | 67 | </div> |
67 | 68 | ||
68 | <!-- table区域-begin --> | 69 | <!-- table区域-begin --> |
@@ -84,7 +85,7 @@ | @@ -84,7 +85,7 @@ | ||
84 | :dataSource="dataSource" | 85 | :dataSource="dataSource" |
85 | :pagination="ipagination" | 86 | :pagination="ipagination" |
86 | :loading="loading" | 87 | :loading="loading" |
87 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | 88 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" |
88 | :customRow="clickThenSelect" | 89 | :customRow="clickThenSelect" |
89 | @change="handleTableChange"> | 90 | @change="handleTableChange"> |
90 | 91 | ||
@@ -145,6 +146,7 @@ | @@ -145,6 +146,7 @@ | ||
145 | </a-tabs> | 146 | </a-tabs> |
146 | 147 | ||
147 | <inventoryHeader-modal ref="modalForm" @ok="modalFormOk"></inventoryHeader-modal> | 148 | <inventoryHeader-modal ref="modalForm" @ok="modalFormOk"></inventoryHeader-modal> |
149 | + <QuickShipmentModel ref='quickShipmentModel' @ok='quickShipmentModalFormOk'></QuickShipmentModel> | ||
148 | </a-card> | 150 | </a-card> |
149 | </template> | 151 | </template> |
150 | 152 | ||
@@ -157,11 +159,13 @@ import InventoryDetailList from './InventoryDetailList' | @@ -157,11 +159,13 @@ import InventoryDetailList from './InventoryDetailList' | ||
157 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 159 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
158 | import '@/assets/less/TableExpand.less' | 160 | import '@/assets/less/TableExpand.less' |
159 | import { getZoneList } from '@api/api' | 161 | import { getZoneList } from '@api/api' |
162 | +import QuickShipmentModel from "@views/system/shipment/modules/QuickShipmentModal"; | ||
160 | 163 | ||
161 | export default { | 164 | export default { |
162 | name: "InventoryHeaderList", | 165 | name: "InventoryHeaderList", |
163 | mixins: [JeecgListMixin], | 166 | mixins: [JeecgListMixin], |
164 | components: { | 167 | components: { |
168 | + QuickShipmentModel, | ||
165 | InventoryDetailList, | 169 | InventoryDetailList, |
166 | InventoryHeaderModal | 170 | InventoryHeaderModal |
167 | }, | 171 | }, |
@@ -265,6 +269,7 @@ export default { | @@ -265,6 +269,7 @@ export default { | ||
265 | }, | 269 | }, |
266 | selectedMainId: '', | 270 | selectedMainId: '', |
267 | superFieldList: [], | 271 | superFieldList: [], |
272 | + selectRecord:[], | ||
268 | } | 273 | } |
269 | }, | 274 | }, |
270 | created() { | 275 | created() { |
@@ -320,6 +325,7 @@ export default { | @@ -320,6 +325,7 @@ export default { | ||
320 | this.selectedMainId = selectedRowKeys[0].toString(); | 325 | this.selectedMainId = selectedRowKeys[0].toString(); |
321 | this.selectedRowKeys = selectedRowKeys; | 326 | this.selectedRowKeys = selectedRowKeys; |
322 | this.selectionRows = selectionRows; | 327 | this.selectionRows = selectionRows; |
328 | + this.selectRecord = selectionRows; | ||
323 | }, | 329 | }, |
324 | loadData(arg) { | 330 | loadData(arg) { |
325 | if (!this.url.list) { | 331 | if (!this.url.list) { |
@@ -359,6 +365,19 @@ export default { | @@ -359,6 +365,19 @@ export default { | ||
359 | } | 365 | } |
360 | }); | 366 | }); |
361 | }, | 367 | }, |
368 | + quickShipment() { | ||
369 | + if (this.selectedRowKeys.length <= 0) { | ||
370 | + this.$message.warning('请选择一条记录!'); | ||
371 | + } else { | ||
372 | + let zoneCodes = this.selectRecord.map(row => row.zoneCode); | ||
373 | + if (new Set(zoneCodes).size !== 1) { | ||
374 | + this.$message.warning('所选数据非同库区'); | ||
375 | + return; | ||
376 | + } | ||
377 | + this.$refs.quickShipmentModel.edit(this.selectRecord); | ||
378 | + this.$refs.quickShipmentModel.title = '选择出库口'; | ||
379 | + } | ||
380 | + }, | ||
362 | getSuperFieldList() { | 381 | getSuperFieldList() { |
363 | let fieldList = []; | 382 | let fieldList = []; |
364 | fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) | 383 | fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) |
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
@@ -299,9 +299,14 @@ export default { | @@ -299,9 +299,14 @@ export default { | ||
299 | scopedSlots: {customRender: 'inventoryStatus_dictText'} | 299 | scopedSlots: {customRender: 'inventoryStatus_dictText'} |
300 | }, | 300 | }, |
301 | { | 301 | { |
302 | - title: '数量', | 302 | + title: '入库数量', |
303 | align: "center", | 303 | align: "center", |
304 | - dataIndex: 'qty' | 304 | + dataIndex: 'receiptQty' |
305 | + }, | ||
306 | + { | ||
307 | + title: '出库数量', | ||
308 | + align: "center", | ||
309 | + dataIndex: 'shipmentQty' | ||
305 | }, | 310 | }, |
306 | { | 311 | { |
307 | title: '库存数量', | 312 | title: '库存数量', |
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
@@ -49,11 +49,11 @@ | @@ -49,11 +49,11 @@ | ||
49 | </a-form-item> | 49 | </a-form-item> |
50 | </a-col> | 50 | </a-col> |
51 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 51 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
52 | - <a-form-item label="受控状态"> | 52 | + <a-form-item label="可用状态"> |
53 | <j-dict-select-tag | 53 | <j-dict-select-tag |
54 | - placeholder="请选择受控状态" | 54 | + placeholder="请选择可用状态" |
55 | v-model="queryParam.controller" | 55 | v-model="queryParam.controller" |
56 | - dictCode="inventory_controller" | 56 | + dictCode="inventory_enable" |
57 | /> | 57 | /> |
58 | </a-form-item> | 58 | </a-form-item> |
59 | </a-col> | 59 | </a-col> |
@@ -136,8 +136,9 @@ | @@ -136,8 +136,9 @@ | ||
136 | > | 136 | > |
137 | <a-button type="primary" icon="import">导入</a-button> | 137 | <a-button type="primary" icon="import">导入</a-button> |
138 | </a-upload> | 138 | </a-upload> |
139 | - <a-button v-has="'inventoryDetail:controller'" @click='controller()' type='primary'>受控</a-button> | ||
140 | - <a-button v-has="'inventoryDetail:releaseController'" @click='releaseController()' type='primary'>释放受控</a-button> | 139 | + <a-button v-has="'inventoryDetail:controller'" @click='controller()' type='primary'>冻结</a-button> |
140 | + <a-button v-has="'inventoryDetail:releaseController'" @click='releaseController()' type='primary'>释放冻结</a-button> | ||
141 | + <a-button v-has="'inventoryHeader:quickShipmentInventoryHeader'" @click='quickShipment()' type='primary'>快速出库</a-button> | ||
141 | <!-- 高级查询区域 --> | 142 | <!-- 高级查询区域 --> |
142 | <j-super-query | 143 | <j-super-query |
143 | :fieldList="superFieldList" | 144 | :fieldList="superFieldList" |
@@ -174,9 +175,9 @@ | @@ -174,9 +175,9 @@ | ||
174 | class="j-table-force-nowrap" | 175 | class="j-table-force-nowrap" |
175 | @change="handleTableChange" | 176 | @change="handleTableChange" |
176 | > | 177 | > |
177 | - <span slot="controller_dictText" slot-scope="controller_dictText"> | ||
178 | - <a-tag :key="controller_dictText" :color="getStatusColor(controller_dictText)"> | ||
179 | - {{ controller_dictText }} | 178 | + <span slot="enable_dictText" slot-scope="enable_dictText"> |
179 | + <a-tag :key="enable_dictText" :color="getStatusColor(enable_dictText)"> | ||
180 | + {{ enable_dictText }} | ||
180 | </a-tag> | 181 | </a-tag> |
181 | </span> | 182 | </span> |
182 | 183 | ||
@@ -225,6 +226,7 @@ | @@ -225,6 +226,7 @@ | ||
225 | </div> | 226 | </div> |
226 | 227 | ||
227 | <simple-inventory-detail-modal ref="modalForm" @ok="modalFormOk"></simple-inventory-detail-modal> | 228 | <simple-inventory-detail-modal ref="modalForm" @ok="modalFormOk"></simple-inventory-detail-modal> |
229 | + <QuickShipmentDetailModel ref='quickShipmentModel' @ok='quickShipmentModalFormOk'></QuickShipmentDetailModel> | ||
228 | </a-card> | 230 | </a-card> |
229 | </template> | 231 | </template> |
230 | 232 | ||
@@ -236,11 +238,13 @@ import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' | @@ -236,11 +238,13 @@ import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' | ||
236 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 238 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
237 | import {getCompanyList, getZoneList, } from "@api/api"; | 239 | import {getCompanyList, getZoneList, } from "@api/api"; |
238 | import {postAction} from '@/api/manage' | 240 | import {postAction} from '@/api/manage' |
241 | +import QuickShipmentDetailModel from "@views/system/shipment/modules/QuickShipmentDetailModal"; | ||
239 | 242 | ||
240 | export default { | 243 | export default { |
241 | name: 'InventoryDetailList', | 244 | name: 'InventoryDetailList', |
242 | mixins: [JeecgListMixin, mixinDevice], | 245 | mixins: [JeecgListMixin, mixinDevice], |
243 | components: { | 246 | components: { |
247 | + QuickShipmentDetailModel, | ||
244 | SimpleInventoryDetailModal | 248 | SimpleInventoryDetailModal |
245 | }, | 249 | }, |
246 | data() { | 250 | data() { |
@@ -327,10 +331,10 @@ export default { | @@ -327,10 +331,10 @@ export default { | ||
327 | scopedSlots: {customRender: 'inventoryStatus_dictText'} | 331 | scopedSlots: {customRender: 'inventoryStatus_dictText'} |
328 | }, | 332 | }, |
329 | { | 333 | { |
330 | - title: '受控状态', | 334 | + title: '可用状态', |
331 | align: 'center', | 335 | align: 'center', |
332 | - dataIndex: 'controller_dictText', | ||
333 | - scopedSlots: {customRender: 'controller_dictText'} | 336 | + dataIndex: 'enable_dictText', |
337 | + scopedSlots: {customRender: 'enable_dictText'} | ||
334 | }, | 338 | }, |
335 | { | 339 | { |
336 | title: '批次', | 340 | title: '批次', |
@@ -392,7 +396,8 @@ export default { | @@ -392,7 +396,8 @@ export default { | ||
392 | releaseController: 'inventory/inventoryHeader/releaseController', | 396 | releaseController: 'inventory/inventoryHeader/releaseController', |
393 | }, | 397 | }, |
394 | dictOptions: {}, | 398 | dictOptions: {}, |
395 | - superFieldList: [] | 399 | + superFieldList: [], |
400 | + selectRecord:[], | ||
396 | } | 401 | } |
397 | }, | 402 | }, |
398 | created() { | 403 | created() { |
@@ -441,8 +446,8 @@ export default { | @@ -441,8 +446,8 @@ export default { | ||
441 | } else { | 446 | } else { |
442 | let that = this; | 447 | let that = this; |
443 | this.$confirm({ | 448 | this.$confirm({ |
444 | - title: '确认受控', | ||
445 | - content: '是否受控选中数据?', | 449 | + title: '确认冻结', |
450 | + content: '是否冻结选中数据?', | ||
446 | onOk: function() { | 451 | onOk: function() { |
447 | that.loading = true; | 452 | that.loading = true; |
448 | postAction(that.url.controller, that.selectedRowKeys).then((res) => { | 453 | postAction(that.url.controller, that.selectedRowKeys).then((res) => { |
@@ -469,8 +474,8 @@ export default { | @@ -469,8 +474,8 @@ export default { | ||
469 | } else { | 474 | } else { |
470 | let that = this; | 475 | let that = this; |
471 | this.$confirm({ | 476 | this.$confirm({ |
472 | - title: '释放受控', | ||
473 | - content: '释放受控选中数据?', | 477 | + title: '释放冻结', |
478 | + content: '释放冻结选中数据?', | ||
474 | onOk: function() { | 479 | onOk: function() { |
475 | that.loading = true; | 480 | that.loading = true; |
476 | postAction(that.url.releaseController, that.selectedRowKeys).then((res) => { | 481 | postAction(that.url.releaseController, that.selectedRowKeys).then((res) => { |
@@ -491,22 +496,22 @@ export default { | @@ -491,22 +496,22 @@ export default { | ||
491 | }) | 496 | }) |
492 | } | 497 | } |
493 | }, | 498 | }, |
499 | + onSelectChange(selectedRowKeys, selectionRows) { | ||
500 | + this.selectedMainId = selectedRowKeys[0].toString(); | ||
501 | + this.selectedRowKeys = selectedRowKeys; | ||
502 | + this.selectRecord = selectionRows; | ||
503 | + }, | ||
494 | quickShipment() { | 504 | quickShipment() { |
495 | if (this.selectedRowKeys.length <= 0) { | 505 | if (this.selectedRowKeys.length <= 0) { |
496 | this.$message.warning('请选择一条记录!'); | 506 | this.$message.warning('请选择一条记录!'); |
497 | } else { | 507 | } else { |
498 | - let zoneCodes = this.selectRecord.map(row => row.zoneCode) | 508 | + let zoneCodes = this.selectRecord.map(row => row.zoneCode); |
499 | if (new Set(zoneCodes).size !== 1) { | 509 | if (new Set(zoneCodes).size !== 1) { |
500 | this.$message.warning('所选数据非同库区'); | 510 | this.$message.warning('所选数据非同库区'); |
501 | return; | 511 | return; |
502 | } | 512 | } |
503 | - if ('D' !== this.selectRecord[0].zoneCode){ | ||
504 | - this.$refs.quickShipmentModel.model.containerCode = this.selectRecord[0].containerCode; | ||
505 | - this.$refs.quickShipmentModel.edit(); | ||
506 | - this.$refs.quickShipmentModel.title = '选择出库口'; | ||
507 | - }else { | ||
508 | - this.quickShipmentModalFormOk(null) | ||
509 | - } | 513 | + this.$refs.quickShipmentModel.edit(this.selectRecord); |
514 | + this.$refs.quickShipmentModel.title = '选择出库口'; | ||
510 | } | 515 | } |
511 | }, | 516 | }, |
512 | solutionCompany(value) { | 517 | solutionCompany(value) { |
@@ -544,7 +549,7 @@ export default { | @@ -544,7 +549,7 @@ export default { | ||
544 | fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''}) | 549 | fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''}) |
545 | fieldList.push({type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: ''}) | 550 | fieldList.push({type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: ''}) |
546 | fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'}) | 551 | fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'}) |
547 | - fieldList.push({type: 'int', value: 'controller', text: '受控状态', dictCode: 'inventory_controller'}) | 552 | + fieldList.push({type: 'int', value: 'enable', text: '可用状态', dictCode: 'inventory_enable'}) |
548 | fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''}) | 553 | fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''}) |
549 | // fieldList.push({type:'string',value:'sn',text:'序列号',dictCode:''}) | 554 | // fieldList.push({type:'string',value:'sn',text:'序列号',dictCode:''}) |
550 | fieldList.push({type: 'datetime', value: 'receiptDate', text: '入库日期'}) | 555 | fieldList.push({type: 'datetime', value: 'receiptDate', text: '入库日期'}) |
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | </a-col> | 55 | </a-col> |
56 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 56 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
57 | <a-form-item label="业务响应码"> | 57 | <a-form-item label="业务响应码"> |
58 | - <j-input placeholder="请输入业务响应码" v-model="queryParam.retCode"></j-input> | 58 | + <a-input placeholder="请输入业务响应码" v-model="queryParam.retCode"></a-input> |
59 | </a-form-item> | 59 | </a-form-item> |
60 | </a-col> | 60 | </a-col> |
61 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 61 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -103,24 +103,22 @@ | @@ -103,24 +103,22 @@ | ||
103 | <template :slot="expandedRowRender" slot-scope="record"> | 103 | <template :slot="expandedRowRender" slot-scope="record"> |
104 | <div style="margin: 0"> | 104 | <div style="margin: 0"> |
105 | <div> | 105 | <div> |
106 | - <a-badge status="default" style="vertical-align: text-bottom;" /> | ||
107 | <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 106 | <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
108 | - <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">请求头:{{ record.requestHeader }}</span> | 107 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">请求头:</span> |
108 | + <a-button @click="record.expandHeader = !record.expandHeader" type="link" icon="down-circle" style="vertical-align: revert;"></a-button> | ||
109 | + <span v-if="record.expandHeader" style="padding:0 0 0 32px;display: block; vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">{{ record.requestHeader }}</span> | ||
109 | </div> | 110 | </div> |
110 | <div> | 111 | <div> |
111 | - <a-badge status="success" style="vertical-align: text-bottom;" /> | ||
112 | <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 112 | <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
113 | - <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span> | 113 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span> |
114 | </div> | 114 | </div> |
115 | <div> | 115 | <div> |
116 | - <a-badge status="processing" style="vertical-align: text-bottom;" /> | ||
117 | <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 116 | <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
118 | - <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#0066CC;">响应内容:{{ record.responseBody }}</span> | 117 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#0066CC;">响应内容:{{ record.responseBody }}</span> |
119 | </div> | 118 | </div> |
120 | <div v-if="record.exception" > | 119 | <div v-if="record.exception" > |
121 | - <a-badge status="error" style="vertical-align: text-bottom;" /> | ||
122 | <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | 120 | <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" style="vertical-align: revert;"></a-button> |
123 | - <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:red">异常堆栈信息:{{ record.exception }}</span> | 121 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:red">异常堆栈信息:{{ record.exception }}</span> |
124 | </div> | 122 | </div> |
125 | </div> | 123 | </div> |
126 | </template> | 124 | </template> |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -72,6 +72,8 @@ | @@ -72,6 +72,8 @@ | ||
72 | <a-upload v-has="'receiptContainerHeader:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | 72 | <a-upload v-has="'receiptContainerHeader:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
73 | <a-button type="primary" icon="import">导入</a-button> | 73 | <a-button type="primary" icon="import">导入</a-button> |
74 | </a-upload> | 74 | </a-upload> |
75 | + <a-button v-has="'receiptContainerHeader:createTask'" @click="createBatchTask" type="primary" >批量生成任务</a-button> | ||
76 | + <a-button v-has="'receiptContainerHeader:delete'" @click="cancelBatchTask" type="primary" >批量取消组盘</a-button> | ||
75 | </div> | 77 | </div> |
76 | 78 | ||
77 | <!-- table区域-begin --> | 79 | <!-- table区域-begin --> |
@@ -87,7 +89,7 @@ | @@ -87,7 +89,7 @@ | ||
87 | :dataSource="dataSource" | 89 | :dataSource="dataSource" |
88 | :pagination="ipagination" | 90 | :pagination="ipagination" |
89 | :loading="loading" | 91 | :loading="loading" |
90 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | 92 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" |
91 | :customRow="clickThenSelect" | 93 | :customRow="clickThenSelect" |
92 | @change="handleTableChange"> | 94 | @change="handleTableChange"> |
93 | 95 | ||
@@ -115,15 +117,16 @@ | @@ -115,15 +117,16 @@ | ||
115 | size="small" | 117 | size="small" |
116 | @click="downloadFile(text)">下载 | 118 | @click="downloadFile(text)">下载 |
117 | </a-button> | 119 | </a-button> |
118 | - </template> | 120 | + </template>selectPort |
119 | <span slot="action" slot-scope="text, record"> | 121 | <span slot="action" slot-scope="text, record"> |
120 | - <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | ||
121 | - <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | ||
122 | -<!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> | ||
123 | -<!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>--> | 122 | +<!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> |
123 | +<!-- <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> | ||
124 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> | ||
125 | + <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> | ||
124 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> | 126 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
125 | <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a> | 127 | <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a> |
126 | </a-popconfirm> | 128 | </a-popconfirm> |
129 | + | ||
127 | <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a> | 130 | <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a> |
128 | </span> | 131 | </span> |
129 | </a-table> | 132 | </a-table> |
@@ -146,11 +149,11 @@ | @@ -146,11 +149,11 @@ | ||
146 | 149 | ||
147 | import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 150 | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
148 | import ReceiptContainerHeaderModal from './modules/ReceiptContainerHeaderModal' | 151 | import ReceiptContainerHeaderModal from './modules/ReceiptContainerHeaderModal' |
149 | -import {getAction} from '@/api/manage' | 152 | +import {deleteAction, getAction} from '@/api/manage' |
150 | import ReceiptContainerDetailList from './ReceiptContainerDetailList' | 153 | import ReceiptContainerDetailList from './ReceiptContainerDetailList' |
151 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 154 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
152 | import '@/assets/less/TableExpand.less' | 155 | import '@/assets/less/TableExpand.less' |
153 | -import {createReceiptTask} from '@/api/api' | 156 | +import {createReceiptTask, createReceiptBatchTask} from '@/api/api' |
154 | import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; | 157 | import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal"; |
155 | import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal"; | 158 | import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal"; |
156 | import ReceiptContainerStatusSelectModal from "./modules/ReceiptContainerStatusSelectModal"; | 159 | import ReceiptContainerStatusSelectModal from "./modules/ReceiptContainerStatusSelectModal"; |
@@ -322,17 +325,92 @@ export default { | @@ -322,17 +325,92 @@ export default { | ||
322 | selectPort(record) { | 325 | selectPort(record) { |
323 | this.$refs.modalForm2.edit(record); | 326 | this.$refs.modalForm2.edit(record); |
324 | this.$refs.modalForm2.title = "选择分拣入库口"; | 327 | this.$refs.modalForm2.title = "选择分拣入库口"; |
325 | - console.log("selectPort"); | ||
326 | }, | 328 | }, |
327 | selectFillPort(record) { | 329 | selectFillPort(record) { |
328 | this.$refs.modalForm3.edit(record); | 330 | this.$refs.modalForm3.edit(record); |
329 | this.$refs.modalForm3.title = "选择分拣入库口"; | 331 | this.$refs.modalForm3.title = "选择分拣入库口"; |
330 | - console.log("selectFillPort"); | ||
331 | }, | 332 | }, |
332 | selectContainerStatus(record) { | 333 | selectContainerStatus(record) { |
333 | this.$refs.modalForm4.edit(record); | 334 | this.$refs.modalForm4.edit(record); |
334 | this.$refs.modalForm4.title = "选择容器状态"; | 335 | this.$refs.modalForm4.title = "选择容器状态"; |
335 | - console.log("selectContainerStatus"); | 336 | + }, |
337 | + createBatchTask(){ | ||
338 | + if (this.selectedRowKeys.length <= 0) { | ||
339 | + this.$message.warning('请选择一条记录!') | ||
340 | + return | ||
341 | + }else{ | ||
342 | + console.log("createBatchTask"); | ||
343 | + var receiptContainerHeaderList =[]; | ||
344 | + var receiptContainerHeader= null; | ||
345 | + for (var a = 0; a < this.selectedRowKeys.length; a++) { | ||
346 | + if (this.selectionRows[a].status == 0) { | ||
347 | + if (receiptContainerHeader == null) | ||
348 | + { | ||
349 | + receiptContainerHeader = this.selectionRows[a]; | ||
350 | + } | ||
351 | + if (receiptContainerHeader.taskType == this.selectionRows[a].taskType) | ||
352 | + { | ||
353 | + receiptContainerHeaderList.push(this.selectionRows[a]); | ||
354 | + } | ||
355 | + } | ||
356 | + } | ||
357 | + if(receiptContainerHeader.taskType == 100) { | ||
358 | + createReceiptBatchTask(receiptContainerHeaderList).then((res) => { | ||
359 | + this.loading = false; | ||
360 | + if (res.success) { | ||
361 | + this.$message.success(res.message); | ||
362 | + } else { | ||
363 | + this.$message.error(res.message); | ||
364 | + } | ||
365 | + this.searchQuery(); | ||
366 | + }); | ||
367 | + } else { | ||
368 | + this.$refs.modalForm2.batchEdit(receiptContainerHeaderList); | ||
369 | + this.$refs.modalForm2.title = "选择出库口"; | ||
370 | + } | ||
371 | + } | ||
372 | + }, | ||
373 | + cancelBatchTask() { | ||
374 | + if (!this.url.deleteBatch) { | ||
375 | + this.$message.error("请设置url.deleteBatch属性!") | ||
376 | + return | ||
377 | + } | ||
378 | + if (this.selectedRowKeys.length <= 0) { | ||
379 | + this.$message.warning('请选择一条记录!'); | ||
380 | + return; | ||
381 | + } else { | ||
382 | + var ids = ""; | ||
383 | + for (var a = 0; a < this.selectedRowKeys.length; a++) { | ||
384 | + if (this.selectionRows[a].status == 0) { | ||
385 | + ids += this.selectedRowKeys[a] + ","; | ||
386 | + } | ||
387 | + } | ||
388 | + if(ids == "") { | ||
389 | + this.$message.warning("没有符合取消条件的组盘"); | ||
390 | + return; | ||
391 | + } | ||
392 | + var that = this; | ||
393 | + this.$confirm({ | ||
394 | + title: "确认删除", | ||
395 | + content: "是否删除选中数据?", | ||
396 | + onOk: function () { | ||
397 | + that.loading = true; | ||
398 | + deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { | ||
399 | + if (res.success) { | ||
400 | + //重新计算分页问题 | ||
401 | + that.reCalculatePage(that.selectedRowKeys.length) | ||
402 | + that.$message.success(res.message); | ||
403 | + that.loadData(); | ||
404 | + that.onClearSelected(); | ||
405 | + } else { | ||
406 | + that.$message.warning(res.message); | ||
407 | + } | ||
408 | + }).finally(() => { | ||
409 | + that.loading = false; | ||
410 | + }); | ||
411 | + } | ||
412 | + }); | ||
413 | + } | ||
336 | }, | 414 | }, |
337 | loadData(arg) { | 415 | loadData(arg) { |
338 | if (!this.url.list) { | 416 | if (!this.url.list) { |
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | 37 | ||
38 | import {httpAction} from '@/api/manage' | 38 | import {httpAction} from '@/api/manage' |
39 | import {validateDuplicateValue} from '@/utils/util' | 39 | import {validateDuplicateValue} from '@/utils/util' |
40 | -import {createReceiptTask} from '@/api/api' | 40 | +import {createReceiptTask, createReceiptBatchTask} from '@/api/api' |
41 | import {selectSupplePort} from '@/api/api' | 41 | import {selectSupplePort} from '@/api/api' |
42 | 42 | ||
43 | export default { | 43 | export default { |
@@ -54,6 +54,8 @@ export default { | @@ -54,6 +54,8 @@ export default { | ||
54 | return { | 54 | return { |
55 | title: "操作", | 55 | title: "操作", |
56 | portList: [], | 56 | portList: [], |
57 | + flag:'0', | ||
58 | + receiptContainerHeaderList:[], | ||
57 | width: 500, | 59 | width: 500, |
58 | visible: false, | 60 | visible: false, |
59 | model: {}, | 61 | model: {}, |
@@ -83,8 +85,15 @@ export default { | @@ -83,8 +85,15 @@ export default { | ||
83 | }, | 85 | }, |
84 | edit(record) { | 86 | edit(record) { |
85 | console.log("edit"); | 87 | console.log("edit"); |
88 | + this.flag='0'; | ||
86 | this.getPortList(record); | 89 | this.getPortList(record); |
87 | }, | 90 | }, |
91 | + batchEdit(record) { | ||
92 | + this.visible = true; | ||
93 | + this.flag = '1'; | ||
94 | + this.getPortList(record[0]); | ||
95 | + this.receiptContainerHeaderList=record; | ||
96 | + }, | ||
88 | close() { | 97 | close() { |
89 | this.$emit('close'); | 98 | this.$emit('close'); |
90 | this.visible = false; | 99 | this.visible = false; |
@@ -93,24 +102,48 @@ export default { | @@ -93,24 +102,48 @@ export default { | ||
93 | handleOk() { | 102 | handleOk() { |
94 | const that = this; | 103 | const that = this; |
95 | // 触发表单验证 | 104 | // 触发表单验证 |
96 | - this.$refs.form.validate(valid => { | ||
97 | - if (valid) { | ||
98 | - that.confirmLoading = true; | ||
99 | - createReceiptTask(this.model).then((res) => { | ||
100 | - if (res.success) { | ||
101 | - that.$message.success(res.message); | ||
102 | - that.$emit('ok'); | ||
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 | - }) | 105 | + if (this.flag=='1'){ |
106 | + this.$refs.form.validate(valid => { | ||
107 | + if (valid) { | ||
108 | + this.receiptContainerHeaderList.forEach(x=>{ | ||
109 | + x["toPort"]=that.model.toPort; | ||
110 | + }) | ||
111 | + that.confirmLoading = true; | ||
112 | + createReceiptBatchTask(this.receiptContainerHeaderList).then((res) => { | ||
113 | + if (res.success) { | ||
114 | + that.$message.success(res.message); | ||
115 | + that.$emit('ok'); | ||
116 | + } else { | ||
117 | + that.$message.warning(res.message); | ||
118 | + } | ||
119 | + }).finally(() => { | ||
120 | + that.confirmLoading = false; | ||
121 | + that.close(); | ||
122 | + }); | ||
123 | + } else { | ||
124 | + return false | ||
125 | + } | ||
126 | + }); | ||
127 | + } else { | ||
128 | + this.$refs.form.validate(valid => { | ||
129 | + if (valid) { | ||
130 | + that.confirmLoading = true; | ||
131 | + createReceiptTask(this.model).then((res) => { | ||
132 | + if (res.success) { | ||
133 | + that.$message.success(res.message); | ||
134 | + that.$emit('ok'); | ||
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 | + } | ||
114 | }, | 147 | }, |
115 | handleCancel() { | 148 | handleCancel() { |
116 | this.close() | 149 | this.close() |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue
@@ -185,14 +185,9 @@ export default { | @@ -185,14 +185,9 @@ export default { | ||
185 | // 表头 | 185 | // 表头 |
186 | columns: [ | 186 | columns: [ |
187 | { | 187 | { |
188 | - title: '#', | ||
189 | - dataIndex: '', | ||
190 | - key: 'rowIndex', | ||
191 | - width: 60, | 188 | + title: '组盘详情ID', |
192 | align: "center", | 189 | align: "center", |
193 | - customRender: function (t, r, index) { | ||
194 | - return parseInt(index) + 1; | ||
195 | - } | 190 | + dataIndex: 'id' |
196 | }, | 191 | }, |
197 | { | 192 | { |
198 | title: '货主', | 193 | title: '货主', |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
@@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> | 5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
6 | <a-row :gutter="24"> | 6 | <a-row :gutter="24"> |
7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | - <a-form-item label="容器编码"> | ||
9 | - <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | 8 | + <a-form-item label="容器号"> |
9 | + <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | ||
10 | </a-form-item> | 10 | </a-form-item> |
11 | </a-col> | 11 | </a-col> |
12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -14,33 +14,33 @@ | @@ -14,33 +14,33 @@ | ||
14 | <j-dict-select-tag placeholder="请选择任务类型" v-model="queryParam.taskType" dictCode="shipment_task_type"/> | 14 | <j-dict-select-tag placeholder="请选择任务类型" v-model="queryParam.taskType" dictCode="shipment_task_type"/> |
15 | </a-form-item> | 15 | </a-form-item> |
16 | </a-col> | 16 | </a-col> |
17 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
18 | - <a-form-item label="状态"> | ||
19 | - <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" | ||
20 | - dictCode="shipment_container_status"/> | ||
21 | - </a-form-item> | ||
22 | - </a-col> | ||
23 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
24 | - <a-form-item label="起始库位"> | ||
25 | - <a-input placeholder="请输入起始库位" v-model="queryParam.fromLocationCode"></a-input> | ||
26 | - </a-form-item> | ||
27 | - </a-col> | ||
28 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
29 | - <a-form-item label="目标库位"> | ||
30 | - <a-input placeholder="请输入目标库位" v-model="queryParam.toLocationCode"></a-input> | ||
31 | - </a-form-item> | ||
32 | - </a-col> | ||
33 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
34 | - <a-form-item label="目标出入口"> | ||
35 | - <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input> | ||
36 | - </a-form-item> | ||
37 | - </a-col> | ||
38 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
39 | - <a-form-item label="创建人"> | ||
40 | - <a-input placeholder="请输入创建人" v-model="queryParam.createBy"></a-input> | ||
41 | - </a-form-item> | ||
42 | - </a-col> | ||
43 | <template v-if="toggleSearchStatus"> | 17 | <template v-if="toggleSearchStatus"> |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
19 | + <a-form-item label="状态"> | ||
20 | + <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" | ||
21 | + dictCode="shipment_container_status"/> | ||
22 | + </a-form-item> | ||
23 | + </a-col> | ||
24 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
25 | + <a-form-item label="起始库位"> | ||
26 | + <a-input placeholder="请输入起始库位" v-model="queryParam.fromLocationCode"></a-input> | ||
27 | + </a-form-item> | ||
28 | + </a-col> | ||
29 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
30 | + <a-form-item label="目标库位"> | ||
31 | + <a-input placeholder="请输入目标库位" v-model="queryParam.toLocationCode"></a-input> | ||
32 | + </a-form-item> | ||
33 | + </a-col> | ||
34 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
35 | + <a-form-item label="目标出入口"> | ||
36 | + <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input> | ||
37 | + </a-form-item> | ||
38 | + </a-col> | ||
39 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
40 | + <a-form-item label="创建人"> | ||
41 | + <a-input placeholder="请输入创建人" v-model="queryParam.createBy"></a-input> | ||
42 | + </a-form-item> | ||
43 | + </a-col> | ||
44 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> | 44 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
45 | <a-form-item label="创建日期"> | 45 | <a-form-item label="创建日期"> |
46 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" | 46 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" |
@@ -74,6 +74,8 @@ | @@ -74,6 +74,8 @@ | ||
74 | @change="handleImportExcel"> | 74 | @change="handleImportExcel"> |
75 | <a-button type="primary" icon="import">导入</a-button> | 75 | <a-button type="primary" icon="import">导入</a-button> |
76 | </a-upload> | 76 | </a-upload> |
77 | + <a-button @click="createBatchTask" type="primary" >批量生成任务</a-button> | ||
78 | + <a-button @click="cancelBatchTask" type="primary" >批量取消配盘</a-button> | ||
77 | </div> | 79 | </div> |
78 | 80 | ||
79 | <!-- table区域-begin --> | 81 | <!-- table区域-begin --> |
@@ -95,16 +97,10 @@ | @@ -95,16 +97,10 @@ | ||
95 | :dataSource="dataSource" | 97 | :dataSource="dataSource" |
96 | :pagination="ipagination" | 98 | :pagination="ipagination" |
97 | :loading="loading" | 99 | :loading="loading" |
98 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | 100 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" |
99 | :customRow="clickThenSelect" | 101 | :customRow="clickThenSelect" |
100 | @change="handleTableChange"> | 102 | @change="handleTableChange"> |
101 | 103 | ||
102 | - <span slot="status_dictText" slot-scope="status_dictText"> | ||
103 | - <a-tag :key="status_dictText" :color="getStatusColor(status_dictText)"> | ||
104 | - {{ status_dictText }} | ||
105 | - </a-tag> | ||
106 | - </span> | ||
107 | - | ||
108 | <template slot="htmlSlot" slot-scope="text"> | 104 | <template slot="htmlSlot" slot-scope="text"> |
109 | <div v-html="text"></div> | 105 | <div v-html="text"></div> |
110 | </template> | 106 | </template> |
@@ -126,11 +122,11 @@ | @@ -126,11 +122,11 @@ | ||
126 | </template> | 122 | </template> |
127 | 123 | ||
128 | <span slot="action" slot-scope="text, record"> | 124 | <span slot="action" slot-scope="text, record"> |
129 | - <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | 125 | + <a v-if="record.status == 0" @click="selectPort(record)">生成任务<a-divider type="vertical"/></a> |
130 | <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> | 126 | <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
131 | - <a><a-button type="danger">取消配盘</a-button><a-divider type="vertical"/></a> | 127 | + <a>取消配盘<a-divider type="vertical"/></a> |
132 | </a-popconfirm> | 128 | </a-popconfirm> |
133 | - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a> | 129 | + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a> |
134 | </span> | 130 | </span> |
135 | </a-table> | 131 | </a-table> |
136 | </div> | 132 | </div> |
@@ -150,7 +146,7 @@ | @@ -150,7 +146,7 @@ | ||
150 | 146 | ||
151 | import {JeecgListMixin} from '@/mixins/JeecgListMixin' | 147 | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
152 | import ShipmentContainerHeaderModal from './modules/ShipmentContainerHeaderModal' | 148 | import ShipmentContainerHeaderModal from './modules/ShipmentContainerHeaderModal' |
153 | -import {getAction} from '@/api/manage' | 149 | +import {deleteAction, getAction} from '@/api/manage' |
154 | import ShipmentContainerDetailList from './ShipmentContainerDetailList' | 150 | import ShipmentContainerDetailList from './ShipmentContainerDetailList' |
155 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 151 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
156 | import '@/assets/less/TableExpand.less' | 152 | import '@/assets/less/TableExpand.less' |
@@ -171,10 +167,11 @@ export default { | @@ -171,10 +167,11 @@ export default { | ||
171 | description: '出库组盘管理页面', | 167 | description: '出库组盘管理页面', |
172 | querySource: {}, | 168 | querySource: {}, |
173 | portList: [], | 169 | portList: [], |
170 | + hh:'123', | ||
174 | // 表头 | 171 | // 表头 |
175 | columns: [ | 172 | columns: [ |
176 | { | 173 | { |
177 | - title: '容器编码', | 174 | + title: '容器号', |
178 | align: "center", | 175 | align: "center", |
179 | dataIndex: 'containerCode' | 176 | dataIndex: 'containerCode' |
180 | }, | 177 | }, |
@@ -187,7 +184,6 @@ export default { | @@ -187,7 +184,6 @@ export default { | ||
187 | title: '状态', | 184 | title: '状态', |
188 | align: "center", | 185 | align: "center", |
189 | dataIndex: 'status_dictText', | 186 | dataIndex: 'status_dictText', |
190 | - scopedSlots: {customRender: 'status_dictText'} | ||
191 | }, | 187 | }, |
192 | { | 188 | { |
193 | title: '起始库位', | 189 | title: '起始库位', |
@@ -269,15 +265,6 @@ export default { | @@ -269,15 +265,6 @@ export default { | ||
269 | } | 265 | } |
270 | }, | 266 | }, |
271 | methods: { | 267 | methods: { |
272 | - getStatusColor(status) { | ||
273 | - const colors = { | ||
274 | - '新建': 'green', | ||
275 | - '生成任务': 'blue', | ||
276 | - '下架完成': 'gray', | ||
277 | - default: 'blue' | ||
278 | - }; | ||
279 | - return colors[status] || colors.default; | ||
280 | - }, | ||
281 | initDictConfig() { | 268 | initDictConfig() { |
282 | }, | 269 | }, |
283 | clickThenSelect(record) { | 270 | clickThenSelect(record) { |
@@ -303,6 +290,72 @@ export default { | @@ -303,6 +290,72 @@ export default { | ||
303 | this.$refs.modalForm2.edit(record); | 290 | this.$refs.modalForm2.edit(record); |
304 | this.$refs.modalForm2.title = "选择出库口"; | 291 | this.$refs.modalForm2.title = "选择出库口"; |
305 | }, | 292 | }, |
293 | + createBatchTask(){ | ||
294 | + if (this.selectedRowKeys.length <= 0) { | ||
295 | + this.$message.warning('请选择一条记录!') | ||
296 | + return | ||
297 | + }else{ | ||
298 | + console.log("createBatchTask"); | ||
299 | + var shipmentContainerHeaderList =[]; | ||
300 | + var shipmentContainerHeader= null; | ||
301 | + for (var a = 0; a < this.selectedRowKeys.length; a++) { | ||
302 | + if (this.selectionRows[a].status == 0) { | ||
303 | + if (shipmentContainerHeader == null) | ||
304 | + { | ||
305 | + shipmentContainerHeader = this.selectionRows[a]; | ||
306 | + } | ||
307 | + if (shipmentContainerHeader.taskType == this.selectionRows[a].taskType) | ||
308 | + { | ||
309 | + shipmentContainerHeaderList.push(this.selectionRows[a]); | ||
310 | + } | ||
311 | + } | ||
312 | + } | ||
313 | + this.$refs.modalForm2.batchEdit(shipmentContainerHeaderList); | ||
314 | + this.$refs.modalForm2.title = "选择出库口"; | ||
315 | + } | ||
316 | + }, | ||
317 | + cancelBatchTask() { | ||
318 | + if (!this.url.deleteBatch) { | ||
319 | + this.$message.error("请设置url.deleteBatch属性!") | ||
320 | + return | ||
321 | + } | ||
322 | + if (this.selectedRowKeys.length <= 0) { | ||
323 | + this.$message.warning('请选择一条记录!'); | ||
324 | + return; | ||
325 | + } else { | ||
326 | + var ids = ""; | ||
327 | + for (var a = 0; a < this.selectedRowKeys.length; a++) { | ||
328 | + if (this.selectionRows[a].status == 0) { | ||
329 | + ids += this.selectedRowKeys[a] + ","; | ||
330 | + } | ||
331 | + } | ||
332 | + if(ids == "") { | ||
333 | + this.$message.warning("没有符合取消条件的组盘"); | ||
334 | + return; | ||
335 | + } | ||
336 | + var that = this; | ||
337 | + this.$confirm({ | ||
338 | + title: "确认删除", | ||
339 | + content: "是否删除选中数据?", | ||
340 | + onOk: function () { | ||
341 | + that.loading = true; | ||
342 | + deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { | ||
343 | + if (res.success) { | ||
344 | + //重新计算分页问题 | ||
345 | + that.reCalculatePage(that.selectedRowKeys.length) | ||
346 | + that.$message.success(res.message); | ||
347 | + that.loadData(); | ||
348 | + that.onClearSelected(); | ||
349 | + } else { | ||
350 | + that.$message.warning(res.message); | ||
351 | + } | ||
352 | + }).finally(() => { | ||
353 | + that.loading = false; | ||
354 | + }); | ||
355 | + } | ||
356 | + }); | ||
357 | + } | ||
358 | + }, | ||
306 | loadData(arg) { | 359 | loadData(arg) { |
307 | if (!this.url.list) { | 360 | if (!this.url.list) { |
308 | this.$message.error("请设置url.list属性!") | 361 | this.$message.error("请设置url.list属性!") |
@@ -328,7 +381,7 @@ export default { | @@ -328,7 +381,7 @@ export default { | ||
328 | }, | 381 | }, |
329 | getSuperFieldList() { | 382 | getSuperFieldList() { |
330 | let fieldList = []; | 383 | let fieldList = []; |
331 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | 384 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) |
332 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'shipment_task_type'}) | 385 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'shipment_task_type'}) |
333 | fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: 'shipment_container_status'}) | 386 | fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: 'shipment_container_status'}) |
334 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) | 387 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
ant-design-vue-jeecg/src/views/system/shipment/modules/QuickShipmentDetailModal.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 | + > | ||
12 | + <a-spin :spinning="confirmLoading"> | ||
13 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
14 | + <a-row> | ||
15 | + <a-col :span="24"> | ||
16 | + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outPortCode"> | ||
17 | + <a-select show-search placeholder="请选择出库口" option-filter-prop="children" v-model="model.outPortCode"> | ||
18 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code"> | ||
19 | + {{ item.name }} | ||
20 | + </a-select-option> | ||
21 | + </a-select> | ||
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 | +import {getZoneList, selectOutPort, shipmentInventoryDetail} from '@/api/api' | ||
32 | + | ||
33 | +export default { | ||
34 | + name: 'QuickShipmentDetailModel', | ||
35 | + components: { }, | ||
36 | + data() { | ||
37 | + return { | ||
38 | + title: '操作', | ||
39 | + width: 400, | ||
40 | + portList: [], | ||
41 | + inventoryDetailList: [], | ||
42 | + querySource: {}, | ||
43 | + visible: false, | ||
44 | + model: {}, | ||
45 | + labelCol: { | ||
46 | + xs: { span: 24 }, | ||
47 | + sm: { span: 5 } | ||
48 | + }, | ||
49 | + wrapperCol: { | ||
50 | + xs: { span: 24 }, | ||
51 | + sm: { span: 16 } | ||
52 | + }, | ||
53 | + // 选择用户查询条件配置 | ||
54 | + selectUserQueryConfig: [], | ||
55 | + confirmLoading: false, | ||
56 | + validatorRules: { | ||
57 | + outPortCode: [{ required: true, message: '请选择出库口!' }] | ||
58 | + } | ||
59 | + } | ||
60 | + }, | ||
61 | + created() { | ||
62 | + //备份model原始值 | ||
63 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
64 | + }, | ||
65 | + methods: { | ||
66 | + add() { | ||
67 | + this.edit(this.modelDefault) | ||
68 | + }, | ||
69 | + edit(record) { | ||
70 | + this.visible = true; | ||
71 | + this.model.containerCode = record[0].containerCode; | ||
72 | + this.inventoryDetailList = record; | ||
73 | + this.getPortList(); | ||
74 | + }, | ||
75 | + close() { | ||
76 | + this.$emit('close') | ||
77 | + this.visible = false | ||
78 | + this.$refs.form.clearValidate() | ||
79 | + }, | ||
80 | + getPortList() { | ||
81 | + this.querySource.containerCode = this.model.containerCode | ||
82 | + selectOutPort(this.querySource).then(res => { | ||
83 | + if (res.success) { | ||
84 | + this.portList = res.result; | ||
85 | + this.visible = true; | ||
86 | + } | ||
87 | + }) | ||
88 | + }, | ||
89 | + handleOk() { | ||
90 | + if (this.model.outPortCode === ''){ | ||
91 | + this.$message.warning('请选择出库口'); | ||
92 | + } | ||
93 | + this.inventoryDetailList.forEach(x=>{ | ||
94 | + x["toPortCode"]=this.model.outPortCode; | ||
95 | + }) | ||
96 | + shipmentInventoryDetail(this.inventoryDetailList).then((res) => { | ||
97 | + if (res.success) { | ||
98 | + this.$message.success(res.message); | ||
99 | + } else { | ||
100 | + this.$message.error(res.message); | ||
101 | + } | ||
102 | + }); | ||
103 | + this.$emit("ok", this.model.outPortCode); | ||
104 | + this.close() | ||
105 | + }, | ||
106 | + handleCancel() { | ||
107 | + this.close() | ||
108 | + } | ||
109 | + } | ||
110 | +} | ||
111 | +</script> | ||
0 | \ No newline at end of file | 112 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/shipment/modules/QuickShipmentModal.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 | + > | ||
12 | + <a-spin :spinning="confirmLoading"> | ||
13 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | ||
14 | + <a-row> | ||
15 | + <a-col :span="24"> | ||
16 | + <a-form-model-item label="出库口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outPortCode"> | ||
17 | + <a-select show-search placeholder="请选择出库口" option-filter-prop="children" v-model="model.outPortCode"> | ||
18 | + <a-select-option v-for="item in portList" :key="item.name" :value="item.code"> | ||
19 | + {{ item.name }} | ||
20 | + </a-select-option> | ||
21 | + </a-select> | ||
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 | +import {getZoneList, selectOutPort, shipmentInventoryHeader} from '@/api/api' | ||
32 | + | ||
33 | +export default { | ||
34 | + name: 'QuickShipmentModel', | ||
35 | + components: { }, | ||
36 | + data() { | ||
37 | + return { | ||
38 | + title: '操作', | ||
39 | + width: 400, | ||
40 | + portList: [], | ||
41 | + inventoryHeaderList: [], | ||
42 | + querySource: {}, | ||
43 | + visible: false, | ||
44 | + model: {}, | ||
45 | + labelCol: { | ||
46 | + xs: { span: 24 }, | ||
47 | + sm: { span: 5 } | ||
48 | + }, | ||
49 | + wrapperCol: { | ||
50 | + xs: { span: 24 }, | ||
51 | + sm: { span: 16 } | ||
52 | + }, | ||
53 | + // 选择用户查询条件配置 | ||
54 | + selectUserQueryConfig: [], | ||
55 | + confirmLoading: false, | ||
56 | + validatorRules: { | ||
57 | + outPortCode: [{ required: true, message: '请选择出库口!' }] | ||
58 | + } | ||
59 | + } | ||
60 | + }, | ||
61 | + created() { | ||
62 | + //备份model原始值 | ||
63 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
64 | + }, | ||
65 | + methods: { | ||
66 | + add() { | ||
67 | + this.edit(this.modelDefault) | ||
68 | + }, | ||
69 | + edit(record) { | ||
70 | + this.visible = true; | ||
71 | + this.model.containerCode = record[0].containerCode; | ||
72 | + this.inventoryHeaderList = record; | ||
73 | + this.getPortList(); | ||
74 | + }, | ||
75 | + close() { | ||
76 | + this.$emit('close') | ||
77 | + this.visible = false | ||
78 | + this.$refs.form.clearValidate() | ||
79 | + }, | ||
80 | + getPortList() { | ||
81 | + this.querySource.containerCode = this.model.containerCode | ||
82 | + selectOutPort(this.querySource).then(res => { | ||
83 | + if (res.success) { | ||
84 | + this.portList = res.result; | ||
85 | + this.visible = true; | ||
86 | + } | ||
87 | + }) | ||
88 | + }, | ||
89 | + handleOk() { | ||
90 | + if (this.model.outPortCode === ''){ | ||
91 | + this.$message.warning('请选择出库口'); | ||
92 | + } | ||
93 | + this.inventoryHeaderList.forEach(x=>{ | ||
94 | + x["toPortCode"]=this.model.outPortCode; | ||
95 | + }) | ||
96 | + shipmentInventoryHeader(this.inventoryHeaderList).then((res) => { | ||
97 | + if (res.success) { | ||
98 | + this.$message.success(res.message); | ||
99 | + } else { | ||
100 | + this.$message.error(res.message); | ||
101 | + } | ||
102 | + }); | ||
103 | + this.$emit("ok", this.model.outPortCode); | ||
104 | + this.close() | ||
105 | + }, | ||
106 | + handleCancel() { | ||
107 | + this.close() | ||
108 | + } | ||
109 | + } | ||
110 | +} | ||
111 | +</script> | ||
0 | \ No newline at end of file | 112 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue
@@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
35 | 35 | ||
36 | import {httpAction} from '@/api/manage' | 36 | import {httpAction} from '@/api/manage' |
37 | import {validateDuplicateValue} from '@/utils/util' | 37 | import {validateDuplicateValue} from '@/utils/util' |
38 | -import {createShipmentTask} from '@/api/api' | 38 | +import {createShipmentTask,createShipmentBatchTask} from '@/api/api' |
39 | import {selectSortingPort} from '@/api/api' | 39 | import {selectSortingPort} from '@/api/api' |
40 | 40 | ||
41 | export default { | 41 | export default { |
@@ -51,6 +51,8 @@ export default { | @@ -51,6 +51,8 @@ export default { | ||
51 | data() { | 51 | data() { |
52 | return { | 52 | return { |
53 | portList: [], | 53 | portList: [], |
54 | + flag:'0', | ||
55 | + shipmentContainerHeaderList:[], | ||
54 | title: "操作", | 56 | title: "操作", |
55 | width: 500, | 57 | width: 500, |
56 | visible: false, | 58 | visible: false, |
@@ -81,8 +83,15 @@ export default { | @@ -81,8 +83,15 @@ export default { | ||
81 | this.edit(this.modelDefault); | 83 | this.edit(this.modelDefault); |
82 | }, | 84 | }, |
83 | edit(record) { | 85 | edit(record) { |
86 | + this.flag='0'; | ||
84 | this.getPortList(record); | 87 | this.getPortList(record); |
85 | }, | 88 | }, |
89 | + batchEdit(record) { | ||
90 | + this.visible = true; | ||
91 | + this.flag='1'; | ||
92 | + this.getPortList(record[0]) | ||
93 | + this.shipmentContainerHeaderList=record; | ||
94 | + }, | ||
86 | close() { | 95 | close() { |
87 | this.$emit('close'); | 96 | this.$emit('close'); |
88 | this.visible = false; | 97 | this.visible = false; |
@@ -90,25 +99,51 @@ export default { | @@ -90,25 +99,51 @@ export default { | ||
90 | }, | 99 | }, |
91 | handleOk() { | 100 | handleOk() { |
92 | const that = this; | 101 | const that = this; |
93 | - // 触发表单验证 | ||
94 | - this.$refs.form.validate(valid => { | ||
95 | - if (valid) { | ||
96 | - that.confirmLoading = true; | ||
97 | - createShipmentTask(this.model).then((res) => { | ||
98 | - if (res.success) { | ||
99 | - that.$message.success(res.message); | ||
100 | - that.$emit('ok'); | ||
101 | - } else { | ||
102 | - that.$message.warning(res.message); | ||
103 | - } | ||
104 | - }).finally(() => { | ||
105 | - that.confirmLoading = false; | ||
106 | - that.close(); | ||
107 | - }); | ||
108 | - } else { | ||
109 | - return false | ||
110 | - } | ||
111 | - }) | 102 | + if (this.flag=='1'){ |
103 | + this.$refs.form.validate(valid => { | ||
104 | + if (valid) { | ||
105 | + this.shipmentContainerHeaderList.forEach(x=>{ | ||
106 | + x["toPort"]=that.model.toPort; | ||
107 | + }) | ||
108 | + createShipmentBatchTask(this.shipmentContainerHeaderList).then((res) => { | ||
109 | + if (res.success) { | ||
110 | + that.$message.success(res.message); | ||
111 | + that.$emit('ok'); | ||
112 | + } else { | ||
113 | + that.$message.warning(res.message); | ||
114 | + } | ||
115 | + }).finally(() => { | ||
116 | + that.confirmLoading = false; | ||
117 | + that.close(); | ||
118 | + }); | ||
119 | + }else { | ||
120 | + return false | ||
121 | + } | ||
122 | + }) | ||
123 | + | ||
124 | + }else{ | ||
125 | + // 触发表单验证 | ||
126 | + this.$refs.form.validate(valid => { | ||
127 | + if (valid) { | ||
128 | + that.confirmLoading = true; | ||
129 | + createShipmentTask(this.model).then((res) => { | ||
130 | + if (res.success) { | ||
131 | + that.$message.success(res.message); | ||
132 | + that.$emit('ok'); | ||
133 | + } else { | ||
134 | + that.$message.warning(res.message); | ||
135 | + } | ||
136 | + }).finally(() => { | ||
137 | + that.confirmLoading = false; | ||
138 | + that.close(); | ||
139 | + }); | ||
140 | + } else { | ||
141 | + return false | ||
142 | + } | ||
143 | + }) | ||
144 | + } | ||
145 | + | ||
146 | + | ||
112 | }, | 147 | }, |
113 | handleCancel() { | 148 | handleCancel() { |
114 | this.close() | 149 | this.close() |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java
@@ -71,9 +71,9 @@ public class LocationController extends JeecgController<Location, ILocationServi | @@ -71,9 +71,9 @@ public class LocationController extends JeecgController<Location, ILocationServi | ||
71 | QueryWrapper<Location> queryWrapper = QueryGenerator.initQueryWrapper(location, null); | 71 | QueryWrapper<Location> queryWrapper = QueryGenerator.initQueryWrapper(location, null); |
72 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = queryWrapper.lambda(); | 72 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = queryWrapper.lambda(); |
73 | if (haveContainer != null) { | 73 | if (haveContainer != null) { |
74 | - if (haveContainer == QuantityConstant.STATUS_NOT_CONTAINER) { | 74 | + if (haveContainer == QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE) { |
75 | locationLambdaQueryWrapper.eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING); | 75 | locationLambdaQueryWrapper.eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING); |
76 | - } else if (haveContainer == QuantityConstant.STATUS_HAVE_CONTAINER) { | 76 | + } else if (haveContainer == QuantityConstant.INVENTORY_DETAIL_STATUS_CONTAINER) { |
77 | locationLambdaQueryWrapper.ne(Location::getContainerCode, QuantityConstant.EMPTY_STRING); | 77 | locationLambdaQueryWrapper.ne(Location::getContainerCode, QuantityConstant.EMPTY_STRING); |
78 | } | 78 | } |
79 | } | 79 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/entity/Location.java
@@ -153,9 +153,9 @@ public class Location implements Serializable { | @@ -153,9 +153,9 @@ public class Location implements Serializable { | ||
153 | 153 | ||
154 | public Integer getHaveContainer() { | 154 | public Integer getHaveContainer() { |
155 | if (StringUtils.isNotEmpty(containerCode)) { | 155 | if (StringUtils.isNotEmpty(containerCode)) { |
156 | - return QuantityConstant.STATUS_HAVE_CONTAINER; | 156 | + return QuantityConstant.INVENTORY_DETAIL_STATUS_CONTAINER; |
157 | } else { | 157 | } else { |
158 | - return QuantityConstant.STATUS_NOT_CONTAINER; | 158 | + return QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE; |
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/IHuahengMultiHandlerService.java
@@ -24,8 +24,16 @@ public interface IHuahengMultiHandlerService { | @@ -24,8 +24,16 @@ public interface IHuahengMultiHandlerService { | ||
24 | 24 | ||
25 | Result combination(CombinationParam combinationParam); | 25 | Result combination(CombinationParam combinationParam); |
26 | 26 | ||
27 | + /** | ||
28 | + * 取消配盘 | ||
29 | + */ | ||
27 | Result cancelCombine(Integer id); | 30 | Result cancelCombine(Integer id); |
28 | 31 | ||
32 | + /** | ||
33 | + * 取消组盘 | ||
34 | + */ | ||
35 | + Result cancelReceiving(Integer id); | ||
36 | + | ||
29 | Result autoCombination(String shipmentCode, String warehouseCode); | 37 | Result autoCombination(String shipmentCode, String warehouseCode); |
30 | 38 | ||
31 | Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber); | 39 | Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/impl/HuahengMultiHandlerServiceImpl.java
@@ -27,7 +27,6 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailServ | @@ -27,7 +27,6 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailServ | ||
27 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | 27 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
28 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | 28 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
29 | import org.springframework.stereotype.Service; | 29 | import org.springframework.stereotype.Service; |
30 | -import org.springframework.transaction.annotation.Transactional; | ||
31 | 30 | ||
32 | /** | 31 | /** |
33 | * @author 游杰 | 32 | * @author 游杰 |
@@ -128,6 +127,18 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | @@ -128,6 +127,18 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem | ||
128 | } | 127 | } |
129 | 128 | ||
130 | @Override | 129 | @Override |
130 | + public Result cancelReceiving(Integer id) { | ||
131 | + Result result = handleMultiProcess("cancelReceiving", new MultiProcessListener() { | ||
132 | + @Override | ||
133 | + public Result<?> doProcess() { | ||
134 | + Result result = receiptContainerHeaderService.cancelReceiving(id); | ||
135 | + return result; | ||
136 | + } | ||
137 | + }); | ||
138 | + return result; | ||
139 | + } | ||
140 | + | ||
141 | + @Override | ||
131 | public Result autoCombination(String shipmentCode, String warehouseCode) { | 142 | public Result autoCombination(String shipmentCode, String warehouseCode) { |
132 | Result result = handleMultiProcess("combination", new MultiProcessListener() { | 143 | Result result = handleMultiProcess("combination", new MultiProcessListener() { |
133 | @Override | 144 | @Override |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/controller/InventoryHeaderController.java
@@ -90,6 +90,7 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -90,6 +90,7 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
90 | String inventoryHeaderZoneCode = inventoryHeader.getZoneCode(); | 90 | String inventoryHeaderZoneCode = inventoryHeader.getZoneCode(); |
91 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | 91 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
92 | QueryWrapper<InventoryHeader> queryWrapper = QueryGenerator.initQueryWrapper(inventoryHeader, req.getParameterMap()); | 92 | QueryWrapper<InventoryHeader> queryWrapper = QueryGenerator.initQueryWrapper(inventoryHeader, req.getParameterMap()); |
93 | + queryWrapper.orderByDesc("id"); | ||
93 | Page<InventoryHeader> page = new Page<InventoryHeader>(pageNo, pageSize); | 94 | Page<InventoryHeader> page = new Page<InventoryHeader>(pageNo, pageSize); |
94 | IPage<InventoryHeader> pageList = inventoryHeaderService.page(page, queryWrapper); | 95 | IPage<InventoryHeader> pageList = inventoryHeaderService.page(page, queryWrapper); |
95 | if (StringUtils.isEmpty(inventoryHeaderZoneCode)) { | 96 | if (StringUtils.isEmpty(inventoryHeaderZoneCode)) { |
@@ -346,7 +347,6 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -346,7 +347,6 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
346 | 347 | ||
347 | @AutoLog("库存详情-释放受控") | 348 | @AutoLog("库存详情-释放受控") |
348 | @ApiOperation(value = "释放受控", notes = "释放受控") | 349 | @ApiOperation(value = "释放受控", notes = "释放受控") |
349 | - @ApiLogger(apiName = "释放受控") | ||
350 | @PostMapping(value = "/releaseController") | 350 | @PostMapping(value = "/releaseController") |
351 | @ResponseBody | 351 | @ResponseBody |
352 | public Result releaseController(@RequestBody List<Integer> ids, HttpServletRequest req) { | 352 | public Result releaseController(@RequestBody List<Integer> ids, HttpServletRequest req) { |
@@ -358,7 +358,6 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -358,7 +358,6 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
358 | 358 | ||
359 | @AutoLog("库存详情-批量受控") | 359 | @AutoLog("库存详情-批量受控") |
360 | @ApiOperation(value = "批量受控", notes = "批量受控") | 360 | @ApiOperation(value = "批量受控", notes = "批量受控") |
361 | - @ApiLogger(apiName = "批量受控") | ||
362 | @PostMapping("/controller") | 361 | @PostMapping("/controller") |
363 | @ResponseBody | 362 | @ResponseBody |
364 | public Result controller(@RequestBody List<Integer> ids) { | 363 | public Result controller(@RequestBody List<Integer> ids) { |
@@ -367,4 +366,30 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | @@ -367,4 +366,30 @@ public class InventoryHeaderController extends JeecgController<InventoryHeader, | ||
367 | } | 366 | } |
368 | return inventoryDetailService.controller(ids); | 367 | return inventoryDetailService.controller(ids); |
369 | } | 368 | } |
369 | + | ||
370 | + @AutoLog("库存头-批量出整托库存") | ||
371 | + @ApiOperation(value = "批量出整托库存", notes = "批量出整托库存") | ||
372 | + @ApiLogger(apiName = "批量出整托库存") | ||
373 | + @PostMapping("/shipmentInventoryHeader") | ||
374 | + @ResponseBody | ||
375 | + public Result shipmentInventoryHeader(@RequestBody List<InventoryHeader> inventoryHeaderList, HttpServletRequest req) { | ||
376 | + if (StringUtils.isEmpty(inventoryHeaderList)) { | ||
377 | + return Result.error("库存头为空"); | ||
378 | + } | ||
379 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | ||
380 | + return inventoryHeaderService.shipmentInventoryHeader(inventoryHeaderList, warehouseCode); | ||
381 | + } | ||
382 | + | ||
383 | + @AutoLog("库存头-批量出库存详情") | ||
384 | + @ApiOperation(value = "批量出库存详情", notes = "批量出库存详情") | ||
385 | + @ApiLogger(apiName = "批量出库存详情") | ||
386 | + @PostMapping("/shipmentInventoryDetail") | ||
387 | + @ResponseBody | ||
388 | + public Result shipmentInventoryDetail(@RequestBody List<InventoryDetail> inventoryDetailList, HttpServletRequest req) { | ||
389 | + if (StringUtils.isEmpty(inventoryDetailList)) { | ||
390 | + return Result.error("库存明细为空"); | ||
391 | + } | ||
392 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | ||
393 | + return inventoryHeaderService.shipmentInventoryDetail(inventoryDetailList, warehouseCode); | ||
394 | + } | ||
370 | } | 395 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryDetail.java
@@ -125,11 +125,11 @@ public class InventoryDetail implements Serializable { | @@ -125,11 +125,11 @@ public class InventoryDetail implements Serializable { | ||
125 | @Excel(name = "库龄(天)", width = 15) | 125 | @Excel(name = "库龄(天)", width = 15) |
126 | @ApiModelProperty(value = "库龄(天)") | 126 | @ApiModelProperty(value = "库龄(天)") |
127 | private Integer inventoryAge; | 127 | private Integer inventoryAge; |
128 | - /** 受控 */ | ||
129 | - @Excel(name = "受控", width = 15) | ||
130 | - @Dict(dicCode = "inventory_controller") | ||
131 | - @ApiModelProperty(value = "受控") | ||
132 | - private Integer controller; | 128 | + /** 是否可用 */ |
129 | + @Excel(name = "是否可用", width = 15) | ||
130 | + @Dict(dicCode = "inventory_enable") | ||
131 | + @ApiModelProperty(value = "是否可用") | ||
132 | + private Integer enable; | ||
133 | /** 备用字段1 */ | 133 | /** 备用字段1 */ |
134 | @Excel(name = "备用字段1", width = 15) | 134 | @Excel(name = "备用字段1", width = 15) |
135 | @ApiModelProperty(value = "备用字段1") | 135 | @ApiModelProperty(value = "备用字段1") |
@@ -154,6 +154,8 @@ public class InventoryDetail implements Serializable { | @@ -154,6 +154,8 @@ public class InventoryDetail implements Serializable { | ||
154 | /** 更新日期 */ | 154 | /** 更新日期 */ |
155 | @ApiModelProperty(value = "更新日期") | 155 | @ApiModelProperty(value = "更新日期") |
156 | private Date updateTime; | 156 | private Date updateTime; |
157 | + @TableField(exist = false) | ||
158 | + private String toPortCode; | ||
157 | 159 | ||
158 | public void setQty(BigDecimal qty) { | 160 | public void setQty(BigDecimal qty) { |
159 | if (qty.compareTo(BigDecimal.ZERO) < 0) { | 161 | if (qty.compareTo(BigDecimal.ZERO) < 0) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryHeader.java
@@ -9,6 +9,7 @@ import org.jeecg.common.exception.JeecgBootException; | @@ -9,6 +9,7 @@ import org.jeecg.common.exception.JeecgBootException; | ||
9 | import org.jeecgframework.poi.excel.annotation.Excel; | 9 | import org.jeecgframework.poi.excel.annotation.Excel; |
10 | 10 | ||
11 | import com.baomidou.mybatisplus.annotation.IdType; | 11 | import com.baomidou.mybatisplus.annotation.IdType; |
12 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
12 | import com.baomidou.mybatisplus.annotation.TableId; | 13 | import com.baomidou.mybatisplus.annotation.TableId; |
13 | import com.baomidou.mybatisplus.annotation.TableName; | 14 | import com.baomidou.mybatisplus.annotation.TableName; |
14 | 15 | ||
@@ -97,6 +98,8 @@ public class InventoryHeader implements Serializable { | @@ -97,6 +98,8 @@ public class InventoryHeader implements Serializable { | ||
97 | /** 更新日期 */ | 98 | /** 更新日期 */ |
98 | @ApiModelProperty(value = "更新日期") | 99 | @ApiModelProperty(value = "更新日期") |
99 | private Date updateTime; | 100 | private Date updateTime; |
101 | + @TableField(exist = false) | ||
102 | + private String toPortCode; | ||
100 | 103 | ||
101 | public void setTotalQty(BigDecimal totalQty) { | 104 | public void setTotalQty(BigDecimal totalQty) { |
102 | if (totalQty.compareTo(BigDecimal.ZERO) < 0) { | 105 | if (totalQty.compareTo(BigDecimal.ZERO) < 0) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java
@@ -23,9 +23,14 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { | @@ -23,9 +23,14 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { | ||
23 | 23 | ||
24 | List<InventoryDetail> getInventoryDetailListByInventoryHeaderId(Integer inventoryHeaderId); | 24 | List<InventoryDetail> getInventoryDetailListByInventoryHeaderId(Integer inventoryHeaderId); |
25 | 25 | ||
26 | + List<InventoryDetail> getInventoryDetailListByInventoryHeaderIds(List<Integer> inventoryHeaderIds); | ||
27 | + | ||
26 | List<InventoryDetail> getInventoryDetailListByContainerCode(String containerCode, String warehouseCode); | 28 | List<InventoryDetail> getInventoryDetailListByContainerCode(String containerCode, String warehouseCode); |
27 | 29 | ||
28 | - // 求一种物料的库存之和 | 30 | + // 求一种物料的库存之和(总数) |
31 | + BigDecimal getInventorySumQty(InventoryDetail inventoryDetail); | ||
32 | + | ||
33 | + // 求一种物料的库存之和(扣除了配盘数量) | ||
29 | BigDecimal getSumQty(InventoryDetail inventoryDetail); | 34 | BigDecimal getSumQty(InventoryDetail inventoryDetail); |
30 | 35 | ||
31 | // 求一种物料的可出库存之和 | 36 | // 求一种物料的可出库存之和 |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryHeaderService.java
@@ -2,7 +2,10 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service; | @@ -2,7 +2,10 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service; | ||
2 | 2 | ||
3 | import java.io.Serializable; | 3 | import java.io.Serializable; |
4 | import java.util.Collection; | 4 | import java.util.Collection; |
5 | +import java.util.List; | ||
5 | 6 | ||
7 | +import org.jeecg.common.api.vo.Result; | ||
8 | +import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | ||
6 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | 9 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; |
7 | 10 | ||
8 | import com.baomidou.mybatisplus.extension.service.IService; | 11 | import com.baomidou.mybatisplus.extension.service.IService; |
@@ -36,4 +39,8 @@ public interface IInventoryHeaderService extends IService<InventoryHeader> { | @@ -36,4 +39,8 @@ public interface IInventoryHeaderService extends IService<InventoryHeader> { | ||
36 | boolean updateContainerStatusAndLocationCode(String containerStatus, String locationCode, Integer id); | 39 | boolean updateContainerStatusAndLocationCode(String containerStatus, String locationCode, Integer id); |
37 | 40 | ||
38 | boolean updateLocationCodeById(String locationCode, Integer id); | 41 | boolean updateLocationCodeById(String locationCode, Integer id); |
42 | + | ||
43 | + Result shipmentInventoryHeader(List<InventoryHeader> inventoryHeaderList, String warehouseCode); | ||
44 | + | ||
45 | + Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode); | ||
39 | } | 46 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
@@ -17,7 +17,6 @@ import org.jeecg.modules.wms.config.container.service.IContainerService; | @@ -17,7 +17,6 @@ import org.jeecg.modules.wms.config.container.service.IContainerService; | ||
17 | import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; | 17 | import org.jeecg.modules.wms.config.containerCapacity.entity.ContainerCapacity; |
18 | import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; | 18 | import org.jeecg.modules.wms.config.containerCapacity.service.IContainerCapacityService; |
19 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | 19 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
20 | -import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | ||
21 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; | 20 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; |
22 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | 21 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
23 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; | 22 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; |
@@ -65,7 +64,17 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -65,7 +64,17 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
65 | @Override | 64 | @Override |
66 | public List<InventoryDetail> getInventoryDetailListByInventoryHeaderId(Integer inventoryHeaderId) { | 65 | public List<InventoryDetail> getInventoryDetailListByInventoryHeaderId(Integer inventoryHeaderId) { |
67 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | 66 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
68 | - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryHeaderId, inventoryHeaderId); | 67 | + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryHeaderId, inventoryHeaderId).eq(InventoryDetail::getEnable, |
68 | + QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE); | ||
69 | + List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); | ||
70 | + return inventoryDetailList; | ||
71 | + } | ||
72 | + | ||
73 | + @Override | ||
74 | + public List<InventoryDetail> getInventoryDetailListByInventoryHeaderIds(List<Integer> inventoryHeaderIds) { | ||
75 | + LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
76 | + inventoryDetailLambdaQueryWrapper.in(InventoryDetail::getInventoryHeaderId, inventoryHeaderIds).eq(InventoryDetail::getEnable, | ||
77 | + QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE); | ||
69 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); | 78 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); |
70 | return inventoryDetailList; | 79 | return inventoryDetailList; |
71 | } | 80 | } |
@@ -73,12 +82,30 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -73,12 +82,30 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
73 | @Override | 82 | @Override |
74 | public List<InventoryDetail> getInventoryDetailListByContainerCode(String containerCode, String warehouseCode) { | 83 | public List<InventoryDetail> getInventoryDetailListByContainerCode(String containerCode, String warehouseCode) { |
75 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | 84 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
76 | - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode).eq(InventoryDetail::getWarehouseCode, warehouseCode); | 85 | + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode).eq(InventoryDetail::getWarehouseCode, warehouseCode) |
86 | + .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE); | ||
77 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); | 87 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); |
78 | return inventoryDetailList; | 88 | return inventoryDetailList; |
79 | } | 89 | } |
80 | 90 | ||
81 | @Override | 91 | @Override |
92 | + public BigDecimal getInventorySumQty(InventoryDetail inventoryDetail) { | ||
93 | + LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
94 | + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryStatus, inventoryDetail.getInventoryStatus()) | ||
95 | + .eq(InventoryDetail::getMaterialCode, inventoryDetail.getMaterialCode()).eq(InventoryDetail::getWarehouseCode, inventoryDetail.getWarehouseCode()) | ||
96 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getBatch()), InventoryDetail::getBatch, inventoryDetail.getBatch()) | ||
97 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getLot()), InventoryDetail::getLot, inventoryDetail.getLot()) | ||
98 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getProject()), InventoryDetail::getProject, inventoryDetail.getLot()) | ||
99 | + .eq(InventoryDetail::getCompanyCode, inventoryDetail.getCompanyCode()); | ||
100 | + List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); | ||
101 | + if (inventoryDetailList.size() == 0) { | ||
102 | + return BigDecimal.ZERO; | ||
103 | + } | ||
104 | + BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); | ||
105 | + return totalQty; | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
82 | public BigDecimal getSumQty(InventoryDetail inventoryDetail) { | 109 | public BigDecimal getSumQty(InventoryDetail inventoryDetail) { |
83 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | 110 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
84 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryStatus, inventoryDetail.getInventoryStatus()) | 111 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryStatus, inventoryDetail.getInventoryStatus()) |
@@ -105,15 +132,16 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -105,15 +132,16 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
105 | .eq(StringUtils.isNotEmpty(inventoryDetail.getBatch()), InventoryDetail::getBatch, inventoryDetail.getBatch()) | 132 | .eq(StringUtils.isNotEmpty(inventoryDetail.getBatch()), InventoryDetail::getBatch, inventoryDetail.getBatch()) |
106 | .eq(StringUtils.isNotEmpty(inventoryDetail.getLot()), InventoryDetail::getLot, inventoryDetail.getLot()) | 133 | .eq(StringUtils.isNotEmpty(inventoryDetail.getLot()), InventoryDetail::getLot, inventoryDetail.getLot()) |
107 | .eq(StringUtils.isNotEmpty(inventoryDetail.getProject()), InventoryDetail::getProject, inventoryDetail.getLot()) | 134 | .eq(StringUtils.isNotEmpty(inventoryDetail.getProject()), InventoryDetail::getProject, inventoryDetail.getLot()) |
108 | - .eq(InventoryDetail::getController, QuantityConstant.CONTROLLER_NOT_ENABLE) | ||
109 | - .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).eq(InventoryDetail::getTaskQty, BigDecimal.ZERO) | ||
110 | - .eq(InventoryDetail::getCompanyCode, inventoryDetail.getCompanyCode()); | 135 | + .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE) |
136 | + .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).eq(InventoryDetail::getCompanyCode, inventoryDetail.getCompanyCode()); | ||
111 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); | 137 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); |
112 | if (inventoryDetailList.size() == 0) { | 138 | if (inventoryDetailList.size() == 0) { |
113 | return BigDecimal.ZERO; | 139 | return BigDecimal.ZERO; |
114 | } | 140 | } |
115 | BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); | 141 | BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); |
116 | - return totalQty; | 142 | + BigDecimal totalTaskQty = inventoryDetailList.stream().map(InventoryDetail::getTaskQty).reduce(BigDecimal.ZERO, BigDecimal::add); |
143 | + BigDecimal sumQty = totalQty.subtract(totalTaskQty); | ||
144 | + return sumQty; | ||
117 | } | 145 | } |
118 | 146 | ||
119 | @Override | 147 | @Override |
@@ -209,11 +237,11 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -209,11 +237,11 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
209 | } | 237 | } |
210 | List<InventoryDetail> inventoryDetailUpdateList = new ArrayList<>(); | 238 | List<InventoryDetail> inventoryDetailUpdateList = new ArrayList<>(); |
211 | List<Integer> inventoryHeaderIdList = inventoryDetailList.stream().map(InventoryDetail::getInventoryHeaderId).distinct().collect(Collectors.toList()); | 239 | List<Integer> inventoryHeaderIdList = inventoryDetailList.stream().map(InventoryDetail::getInventoryHeaderId).distinct().collect(Collectors.toList()); |
212 | - List<InventoryHeader> inventoryHeaderList = inventoryHeaderService.listByIds(inventoryHeaderIdList); | 240 | +// List<InventoryHeader> inventoryHeaderList = inventoryHeaderService.listByIds(inventoryHeaderIdList); |
213 | for (InventoryDetail inventoryDetail : inventoryDetailList) { | 241 | for (InventoryDetail inventoryDetail : inventoryDetailList) { |
214 | InventoryDetail inventoryDetail1 = new InventoryDetail(); | 242 | InventoryDetail inventoryDetail1 = new InventoryDetail(); |
215 | inventoryDetail1.setId(inventoryDetail.getId()); | 243 | inventoryDetail1.setId(inventoryDetail.getId()); |
216 | - inventoryDetail1.setController(QuantityConstant.CONTROLLER_ENABLE); | 244 | + inventoryDetail1.setEnable(QuantityConstant.INVENTORY_DETAIL_STATUS_CONTAINER); |
217 | inventoryDetailUpdateList.add(inventoryDetail1); | 245 | inventoryDetailUpdateList.add(inventoryDetail1); |
218 | } | 246 | } |
219 | boolean success = updateBatchById(inventoryDetailUpdateList); | 247 | boolean success = updateBatchById(inventoryDetailUpdateList); |
@@ -233,7 +261,7 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | @@ -233,7 +261,7 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe | ||
233 | for (InventoryDetail inventoryDetail : inventoryDetailList) { | 261 | for (InventoryDetail inventoryDetail : inventoryDetailList) { |
234 | InventoryDetail inventoryDetail1 = new InventoryDetail(); | 262 | InventoryDetail inventoryDetail1 = new InventoryDetail(); |
235 | inventoryDetail1.setId(inventoryDetail.getId()); | 263 | inventoryDetail1.setId(inventoryDetail.getId()); |
236 | - inventoryDetail1.setController(QuantityConstant.CONTROLLER_NOT_ENABLE); | 264 | + inventoryDetail1.setEnable(QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE); |
237 | inventoryDetailUpdateList.add(inventoryDetail1); | 265 | inventoryDetailUpdateList.add(inventoryDetail1); |
238 | } | 266 | } |
239 | boolean success = updateBatchById(inventoryDetailUpdateList); | 267 | boolean success = updateBatchById(inventoryDetailUpdateList); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
@@ -4,18 +4,33 @@ import java.io.Serializable; | @@ -4,18 +4,33 @@ import java.io.Serializable; | ||
4 | import java.util.ArrayList; | 4 | import java.util.ArrayList; |
5 | import java.util.Collection; | 5 | import java.util.Collection; |
6 | import java.util.List; | 6 | import java.util.List; |
7 | +import java.util.stream.Collectors; | ||
7 | 8 | ||
8 | import javax.annotation.Resource; | 9 | import javax.annotation.Resource; |
9 | 10 | ||
11 | +import org.jeecg.common.api.vo.Result; | ||
10 | import org.jeecg.common.exception.JeecgBootException; | 12 | import org.jeecg.common.exception.JeecgBootException; |
11 | import org.jeecg.modules.wms.config.container.entity.Container; | 13 | import org.jeecg.modules.wms.config.container.entity.Container; |
12 | import org.jeecg.modules.wms.config.container.service.IContainerService; | 14 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
15 | +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; | ||
13 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | 16 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
14 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | 17 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; |
15 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; | 18 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; |
16 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryHeaderMapper; | 19 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryHeaderMapper; |
17 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | 20 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
18 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; | 21 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; |
22 | +import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel; | ||
23 | +import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; | ||
24 | +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerDetail; | ||
25 | +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; | ||
26 | +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerDetailService; | ||
27 | +import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; | ||
28 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; | ||
29 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | ||
30 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; | ||
31 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; | ||
32 | +import org.jeecg.utils.StringUtils; | ||
33 | +import org.jeecg.utils.constant.QuantityConstant; | ||
19 | import org.springframework.beans.factory.annotation.Autowired; | 34 | import org.springframework.beans.factory.annotation.Autowired; |
20 | import org.springframework.stereotype.Service; | 35 | import org.springframework.stereotype.Service; |
21 | import org.springframework.transaction.annotation.Transactional; | 36 | import org.springframework.transaction.annotation.Transactional; |
@@ -43,6 +58,18 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -43,6 +58,18 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
43 | private IInventoryHeaderService inventoryHeaderService; | 58 | private IInventoryHeaderService inventoryHeaderService; |
44 | @Resource | 59 | @Resource |
45 | private IInventoryDetailService inventoryDetailService; | 60 | private IInventoryDetailService inventoryDetailService; |
61 | + @Resource | ||
62 | + private IShipmentHeaderService shipmentHeaderService; | ||
63 | + @Resource | ||
64 | + private IShipmentDetailService shipmentDetailService; | ||
65 | + @Resource | ||
66 | + private IShipmentContainerHeaderService shipmentContainerHeaderService; | ||
67 | + @Resource | ||
68 | + private IShipmentCombinationService shipmentCombinationService; | ||
69 | + @Resource | ||
70 | + private IShipmentContainerDetailService shipmentContainerDetailService; | ||
71 | + @Resource | ||
72 | + private IHuahengMultiHandlerService huahengMultiHandlerService; | ||
46 | 73 | ||
47 | @Override | 74 | @Override |
48 | @Transactional | 75 | @Transactional |
@@ -98,7 +125,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -98,7 +125,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
98 | } | 125 | } |
99 | 126 | ||
100 | @Override | 127 | @Override |
101 | - @Transactional | ||
102 | public boolean updateInventoryLocationAndZoneById(String locationCode, String zoneCode, Integer id) { | 128 | public boolean updateInventoryLocationAndZoneById(String locationCode, String zoneCode, Integer id) { |
103 | InventoryHeader inventoryHeader = new InventoryHeader(); | 129 | InventoryHeader inventoryHeader = new InventoryHeader(); |
104 | inventoryHeader.setId(id); | 130 | inventoryHeader.setId(id); |
@@ -108,7 +134,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -108,7 +134,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
108 | } | 134 | } |
109 | 135 | ||
110 | @Override | 136 | @Override |
111 | - @Transactional | ||
112 | public boolean updateContainerStatusById(String containerStatus, Integer id) { | 137 | public boolean updateContainerStatusById(String containerStatus, Integer id) { |
113 | InventoryHeader inventoryHeader = new InventoryHeader(); | 138 | InventoryHeader inventoryHeader = new InventoryHeader(); |
114 | inventoryHeader.setId(id); | 139 | inventoryHeader.setId(id); |
@@ -117,7 +142,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -117,7 +142,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
117 | } | 142 | } |
118 | 143 | ||
119 | @Override | 144 | @Override |
120 | - @Transactional | ||
121 | public boolean updateContainerStatusAndLocationCode(String containerStatus, String locationCode, Integer id) { | 145 | public boolean updateContainerStatusAndLocationCode(String containerStatus, String locationCode, Integer id) { |
122 | InventoryHeader inventoryHeader = new InventoryHeader(); | 146 | InventoryHeader inventoryHeader = new InventoryHeader(); |
123 | inventoryHeader.setId(id); | 147 | inventoryHeader.setId(id); |
@@ -127,7 +151,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -127,7 +151,6 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
127 | } | 151 | } |
128 | 152 | ||
129 | @Override | 153 | @Override |
130 | - @Transactional | ||
131 | public boolean updateLocationCodeById(String locationCode, Integer id) { | 154 | public boolean updateLocationCodeById(String locationCode, Integer id) { |
132 | InventoryHeader inventoryHeader = new InventoryHeader(); | 155 | InventoryHeader inventoryHeader = new InventoryHeader(); |
133 | inventoryHeader.setId(id); | 156 | inventoryHeader.setId(id); |
@@ -135,4 +158,181 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -135,4 +158,181 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
135 | return inventoryHeaderService.updateById(inventoryHeader); | 158 | return inventoryHeaderService.updateById(inventoryHeader); |
136 | } | 159 | } |
137 | 160 | ||
161 | + @Override | ||
162 | + @Transactional(rollbackFor = JeecgBootException.class) | ||
163 | + public Result shipmentInventoryHeader(List<InventoryHeader> inventoryHeaderList, String warehouseCode) { | ||
164 | + if (StringUtils.isEmpty(inventoryHeaderList)) { | ||
165 | + return Result.error("批量快速出库,所选库存头为空"); | ||
166 | + } | ||
167 | + String toPortCode = inventoryHeaderList.get(0).getToPortCode(); | ||
168 | + if (StringUtils.isEmpty(toPortCode)) { | ||
169 | + return Result.error("批量快速出库,出库站台编码为空"); | ||
170 | + } | ||
171 | + String companyCode = inventoryHeaderList.get(0).getCompanyCode(); | ||
172 | + List<InventoryHeader> shipmentInventoryHeaderList = | ||
173 | + inventoryHeaderList.stream().filter((item) -> item.getContainerStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)).collect(Collectors.toList()); | ||
174 | + if (StringUtils.isEmpty(shipmentInventoryHeaderList)) { | ||
175 | + return Result.error("批量快速出库, 排除锁定库存后没有可出库存头"); | ||
176 | + } | ||
177 | + List<Integer> inventoryHeaderIds = shipmentInventoryHeaderList.stream().map(InventoryHeader::getId).collect(Collectors.toList()); | ||
178 | + List<InventoryDetail> inventoryDetails = inventoryDetailService.getInventoryDetailListByInventoryHeaderIds(inventoryHeaderIds); | ||
179 | + if (StringUtils.isEmpty(inventoryDetails)) { | ||
180 | + return Result.error("批量快速出库, 排除锁定库存后没有可出库存详情"); | ||
181 | + } | ||
182 | + ShipmentHeader shipmentHeader = new ShipmentHeader(); | ||
183 | + shipmentHeader.setWarehouseCode(warehouseCode); | ||
184 | + shipmentHeader.setCompanyCode(companyCode); | ||
185 | + shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); | ||
186 | + shipmentHeader.setRemark("快速出库"); | ||
187 | + Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); | ||
188 | + if (!result.isSuccess()) { | ||
189 | + throw new JeecgBootException("批量快速出库,创建出库单失败:".concat(result.getMessage())); | ||
190 | + } | ||
191 | + | ||
192 | + List<ShipmentDetail> shipmentDetailList = new ArrayList<>(); | ||
193 | + for (InventoryDetail inventoryDetail : inventoryDetails) { | ||
194 | + ShipmentDetail shipmentDetail = new ShipmentDetail(); | ||
195 | + shipmentDetail.setShipmentId(shipmentHeader.getId()); | ||
196 | + shipmentDetail.setMaterialCode(inventoryDetail.getMaterialCode()); | ||
197 | + shipmentDetail.setInventoryStatus(inventoryDetail.getInventoryStatus()); | ||
198 | + shipmentDetail.setQty(inventoryDetail.getQty()); | ||
199 | + shipmentDetail.setBatch(inventoryDetail.getBatch()); | ||
200 | + result = shipmentDetailService.saveShipmentDetail(shipmentDetail); | ||
201 | + if (!result.isSuccess()) { | ||
202 | + throw new JeecgBootException("批量快速出库,创建出库详情失败:".concat(result.getMessage())); | ||
203 | + } | ||
204 | + shipmentDetail = shipmentDetailService.getById(shipmentDetail.getId()); | ||
205 | + shipmentDetailList.add(shipmentDetail); | ||
206 | + } | ||
207 | + | ||
208 | + for (int i = 0; i < inventoryDetails.size(); i++) { | ||
209 | + InventoryDetail inventoryDetail = inventoryDetails.get(i); | ||
210 | + ShipmentDetail shipmentDetail = shipmentDetailList.get(i); | ||
211 | + CombinationModel combinationModel = new CombinationModel(); | ||
212 | + combinationModel.setInventoryDetail(inventoryDetail); | ||
213 | + combinationModel.setShipmentDetail(shipmentDetail); | ||
214 | + combinationModel.setShipQty(inventoryDetail.getQty()); | ||
215 | + result = shipmentCombinationService.combination(combinationModel); | ||
216 | + if (!result.isSuccess()) { | ||
217 | + throw new JeecgBootException("批量快速出库,配盘失败:".concat(result.getMessage())); | ||
218 | + } | ||
219 | + } | ||
220 | + | ||
221 | + List<ShipmentContainerDetail> shipmentContainerDetailList = | ||
222 | + shipmentContainerDetailService.getShipmentContainerDetailListByShipmentCode(shipmentHeader.getCode()); | ||
223 | + if (StringUtils.isEmpty(shipmentContainerDetailList)) { | ||
224 | + throw new JeecgBootException("批量快速出库,根据出库单没有找到配盘详情"); | ||
225 | + } | ||
226 | + | ||
227 | + List<Integer> shipmentContainerHeaderIdList = | ||
228 | + shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).collect(Collectors.toList()); | ||
229 | + long shipmentOrder = System.currentTimeMillis(); | ||
230 | + int sequenceNumber = shipmentContainerHeaderIdList.size(); | ||
231 | + int sequence = 0; | ||
232 | + for (int shipmentContainerId : shipmentContainerHeaderIdList) { | ||
233 | + sequence++; | ||
234 | + ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(shipmentContainerId); | ||
235 | + if (shipmentContainerHeader == null) { | ||
236 | + throw new JeecgBootException("批量快速出库,没有找到出库表头:" + shipmentContainerId); | ||
237 | + } | ||
238 | + shipmentContainerHeader.setToPort(toPortCode); | ||
239 | + boolean success = shipmentContainerHeaderService.updateById(shipmentContainerHeader); | ||
240 | + if (!success) { | ||
241 | + throw new JeecgBootException("批量快速出库,更新出库组盘头失败"); | ||
242 | + } | ||
243 | + result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, warehouseCode, shipmentOrder, sequence, sequenceNumber); | ||
244 | + if (!result.isSuccess()) { | ||
245 | + throw new JeecgBootException(result.getMessage()); | ||
246 | + } | ||
247 | + } | ||
248 | + | ||
249 | + return Result.OK("批量快速出库成功"); | ||
250 | + } | ||
251 | + | ||
252 | + @Override | ||
253 | + @Transactional(rollbackFor = JeecgBootException.class) | ||
254 | + public Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { | ||
255 | + if (StringUtils.isEmpty(inventoryDetailList)) { | ||
256 | + return Result.error("批量快速出库,所选库存详情为空"); | ||
257 | + } | ||
258 | + String toPortCode = inventoryDetailList.get(0).getToPortCode(); | ||
259 | + if (StringUtils.isEmpty(toPortCode)) { | ||
260 | + return Result.error("批量快速出库,出库站台编码为空"); | ||
261 | + } | ||
262 | + inventoryDetailList = | ||
263 | + inventoryDetailList.stream().filter((item) -> item.getContainerStatus().equals(QuantityConstant.STATUS_CONTAINER_EMPTY)).collect(Collectors.toList()); | ||
264 | + if (StringUtils.isEmpty(inventoryDetailList)) { | ||
265 | + return Result.error("批量快速出库, 排除锁定库存后没有可出库存详情"); | ||
266 | + } | ||
267 | + String companyCode = inventoryDetailList.get(0).getCompanyCode(); | ||
268 | + ShipmentHeader shipmentHeader = new ShipmentHeader(); | ||
269 | + shipmentHeader.setWarehouseCode(warehouseCode); | ||
270 | + shipmentHeader.setCompanyCode(companyCode); | ||
271 | + shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); | ||
272 | + shipmentHeader.setRemark("快速出库"); | ||
273 | + Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); | ||
274 | + if (!result.isSuccess()) { | ||
275 | + throw new JeecgBootException("批量快速出库,创建出库单失败:".concat(result.getMessage())); | ||
276 | + } | ||
277 | + | ||
278 | + List<ShipmentDetail> shipmentDetailList = new ArrayList<>(); | ||
279 | + for (InventoryDetail inventoryDetail : inventoryDetailList) { | ||
280 | + ShipmentDetail shipmentDetail = new ShipmentDetail(); | ||
281 | + shipmentDetail.setShipmentId(shipmentHeader.getId()); | ||
282 | + shipmentDetail.setMaterialCode(inventoryDetail.getMaterialCode()); | ||
283 | + shipmentDetail.setInventoryStatus(inventoryDetail.getInventoryStatus()); | ||
284 | + shipmentDetail.setQty(inventoryDetail.getQty()); | ||
285 | + shipmentDetail.setBatch(inventoryDetail.getBatch()); | ||
286 | + result = shipmentDetailService.saveShipmentDetail(shipmentDetail); | ||
287 | + if (!result.isSuccess()) { | ||
288 | + throw new JeecgBootException("批量快速出库,创建出库详情失败:".concat(result.getMessage())); | ||
289 | + } | ||
290 | + shipmentDetail = shipmentDetailService.getById(shipmentDetail.getId()); | ||
291 | + shipmentDetailList.add(shipmentDetail); | ||
292 | + } | ||
293 | + | ||
294 | + for (int i = 0; i < inventoryDetailList.size(); i++) { | ||
295 | + InventoryDetail inventoryDetail = inventoryDetailList.get(i); | ||
296 | + ShipmentDetail shipmentDetail = shipmentDetailList.get(i); | ||
297 | + CombinationModel combinationModel = new CombinationModel(); | ||
298 | + combinationModel.setInventoryDetail(inventoryDetail); | ||
299 | + combinationModel.setShipmentDetail(shipmentDetail); | ||
300 | + combinationModel.setShipQty(inventoryDetail.getQty()); | ||
301 | + result = shipmentCombinationService.combination(combinationModel); | ||
302 | + if (!result.isSuccess()) { | ||
303 | + throw new JeecgBootException("批量快速出库,配盘失败:".concat(result.getMessage())); | ||
304 | + } | ||
305 | + } | ||
306 | + | ||
307 | + List<ShipmentContainerDetail> shipmentContainerDetailList = | ||
308 | + shipmentContainerDetailService.getShipmentContainerDetailListByShipmentCode(shipmentHeader.getCode()); | ||
309 | + if (StringUtils.isEmpty(shipmentContainerDetailList)) { | ||
310 | + throw new JeecgBootException("批量快速出库,根据出库单没有找到配盘详情"); | ||
311 | + } | ||
312 | + | ||
313 | + List<Integer> shipmentContainerHeaderIdList = | ||
314 | + shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).collect(Collectors.toList()); | ||
315 | + long shipmentOrder = System.currentTimeMillis(); | ||
316 | + int sequenceNumber = shipmentContainerHeaderIdList.size(); | ||
317 | + int sequence = 0; | ||
318 | + for (int shipmentContainerId : shipmentContainerHeaderIdList) { | ||
319 | + sequence++; | ||
320 | + ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(shipmentContainerId); | ||
321 | + if (shipmentContainerHeader == null) { | ||
322 | + throw new JeecgBootException("批量快速出库,没有找到出库表头:" + shipmentContainerId); | ||
323 | + } | ||
324 | + shipmentContainerHeader.setToPort(toPortCode); | ||
325 | + boolean success = shipmentContainerHeaderService.updateById(shipmentContainerHeader); | ||
326 | + if (!success) { | ||
327 | + throw new JeecgBootException("批量快速出库,更新出库组盘头失败"); | ||
328 | + } | ||
329 | + result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, warehouseCode, shipmentOrder, sequence, sequenceNumber); | ||
330 | + if (!result.isSuccess()) { | ||
331 | + throw new JeecgBootException(result.getMessage()); | ||
332 | + } | ||
333 | + } | ||
334 | + | ||
335 | + return Result.OK("批量快速出库成功"); | ||
336 | + } | ||
337 | + | ||
138 | } | 338 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apiLog/entity/ApiLog.java
@@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; | @@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; | ||
5 | import java.util.Date; | 5 | import java.util.Date; |
6 | import java.math.BigDecimal; | 6 | import java.math.BigDecimal; |
7 | import com.baomidou.mybatisplus.annotation.IdType; | 7 | import com.baomidou.mybatisplus.annotation.IdType; |
8 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
8 | import com.baomidou.mybatisplus.annotation.TableId; | 9 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | import com.baomidou.mybatisplus.annotation.TableName; | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | import lombok.Data; | 11 | import lombok.Data; |
@@ -105,4 +106,7 @@ public class ApiLog implements Serializable { | @@ -105,4 +106,7 @@ public class ApiLog implements Serializable { | ||
105 | /** 创建日期 */ | 106 | /** 创建日期 */ |
106 | @ApiModelProperty(value = "创建日期") | 107 | @ApiModelProperty(value = "创建日期") |
107 | private Date createTime; | 108 | private Date createTime; |
109 | + | ||
110 | + @TableField(exist = false) | ||
111 | + private boolean expandHeader = false; | ||
108 | } | 112 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
@@ -98,6 +98,7 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | @@ -98,6 +98,7 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | ||
98 | HttpServletRequest req) { | 98 | HttpServletRequest req) { |
99 | HuahengJwtUtil.setWarehouseCode(req, receiptContainerHeader); | 99 | HuahengJwtUtil.setWarehouseCode(req, receiptContainerHeader); |
100 | QueryWrapper<ReceiptContainerHeader> queryWrapper = QueryGenerator.initQueryWrapper(receiptContainerHeader, req.getParameterMap()); | 100 | QueryWrapper<ReceiptContainerHeader> queryWrapper = QueryGenerator.initQueryWrapper(receiptContainerHeader, req.getParameterMap()); |
101 | + queryWrapper.orderByDesc("id"); | ||
101 | Page<ReceiptContainerHeader> page = new Page<ReceiptContainerHeader>(pageNo, pageSize); | 102 | Page<ReceiptContainerHeader> page = new Page<ReceiptContainerHeader>(pageNo, pageSize); |
102 | IPage<ReceiptContainerHeader> pageList = receiptContainerHeaderService.page(page, queryWrapper); | 103 | IPage<ReceiptContainerHeader> pageList = receiptContainerHeaderService.page(page, queryWrapper); |
103 | return Result.OK(pageList); | 104 | return Result.OK(pageList); |
@@ -142,7 +143,7 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | @@ -142,7 +143,7 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | ||
142 | @DeleteMapping(value = "/delete") | 143 | @DeleteMapping(value = "/delete") |
143 | @RequiresPermissions("receiptContainerHeader:delete") | 144 | @RequiresPermissions("receiptContainerHeader:delete") |
144 | public Result<?> delete(@RequestParam(name = "id", required = true) String id) { | 145 | public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
145 | - return receiptContainerHeaderService.cancelReceiving(Integer.parseInt(id)); | 146 | + return huahengMultiHandlerService.cancelReceiving(Integer.parseInt(id)); |
146 | } | 147 | } |
147 | 148 | ||
148 | /** | 149 | /** |
@@ -153,11 +154,18 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | @@ -153,11 +154,18 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | ||
153 | @AutoLog(value = "入库组盘-批量删除") | 154 | @AutoLog(value = "入库组盘-批量删除") |
154 | @ApiOperation(value = "入库组盘-批量删除", notes = "入库组盘-批量删除") | 155 | @ApiOperation(value = "入库组盘-批量删除", notes = "入库组盘-批量删除") |
155 | @DeleteMapping(value = "/deleteBatch") | 156 | @DeleteMapping(value = "/deleteBatch") |
156 | - @RequiresPermissions("receiptContainerHeader:deleteBatch") | 157 | + @RequiresPermissions("receiptContainerHeader:delete") |
157 | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { | 158 | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
158 | List<String> idList = Arrays.asList(ids.split(",")); | 159 | List<String> idList = Arrays.asList(ids.split(",")); |
159 | List<Integer> idInterList = idList.stream().map(Integer::parseInt).collect(Collectors.toList()); | 160 | List<Integer> idInterList = idList.stream().map(Integer::parseInt).collect(Collectors.toList()); |
160 | - return receiptContainerHeaderService.cancelReceiving(idInterList); | 161 | + Result result = null; |
162 | + for (Integer id : idInterList) { | ||
163 | + result = huahengMultiHandlerService.cancelReceiving(id); | ||
164 | + if (!result.isSuccess()) { | ||
165 | + return result; | ||
166 | + } | ||
167 | + } | ||
168 | + return result; | ||
161 | } | 169 | } |
162 | 170 | ||
163 | /** | 171 | /** |
@@ -341,6 +349,24 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | @@ -341,6 +349,24 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | ||
341 | } | 349 | } |
342 | 350 | ||
343 | /** | 351 | /** |
352 | + * 创建任务 | ||
353 | + * @return | ||
354 | + */ | ||
355 | + @ApiOperation(value = "入库组盘-创建任务", notes = "入库组盘-创建任务") | ||
356 | + @PostMapping("/createReceiptBatchTask") | ||
357 | + @ResponseBody | ||
358 | + public Result createReceiptBatchTask(@RequestBody List<ReceiptContainerHeader> receiptContainerHeaderList, HttpServletRequest req) { | ||
359 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | ||
360 | + for (ReceiptContainerHeader receiptContainerHeader : receiptContainerHeaderList) { | ||
361 | + Result result = huahengMultiHandlerService.createReceiptTask(receiptContainerHeader, warehouseCode); | ||
362 | + if (!result.isSuccess()) { | ||
363 | + return result; | ||
364 | + } | ||
365 | + } | ||
366 | + return Result.OK("批量创建入库任务成功"); | ||
367 | + } | ||
368 | + | ||
369 | + /** | ||
344 | * 选择分拣口 | 370 | * 选择分拣口 |
345 | * @return | 371 | * @return |
346 | */ | 372 | */ |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -184,6 +184,9 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -184,6 +184,9 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
184 | if (qty == null || taskQty == null) { | 184 | if (qty == null || taskQty == null) { |
185 | throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量或可收数量为空"); | 185 | throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量或可收数量为空"); |
186 | } | 186 | } |
187 | + if (taskQty.compareTo(BigDecimal.ZERO) < 0) { | ||
188 | + throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量不能小于0,收货数量:" + taskQty + "可收数量:" + qty); | ||
189 | + } | ||
187 | if (taskQty.compareTo(qty) > 0) { | 190 | if (taskQty.compareTo(qty) > 0) { |
188 | throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty); | 191 | throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty); |
189 | } | 192 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/ShipmentCombinationController.java
@@ -117,6 +117,24 @@ public class ShipmentCombinationController { | @@ -117,6 +117,24 @@ public class ShipmentCombinationController { | ||
117 | } | 117 | } |
118 | 118 | ||
119 | /** | 119 | /** |
120 | + * 批量创建出库任务 | ||
121 | + * @return | ||
122 | + */ | ||
123 | + @ApiOperation(value = "出库组盘-批量创建出库任务", notes = "出库组盘-批量创建出库任务") | ||
124 | + @PostMapping("/createShipmentBatchTask") | ||
125 | + @ResponseBody | ||
126 | + public Result createShipmentBatchTask(@RequestBody List<ShipmentContainerHeader> shipmentContainerHeaderLiat, HttpServletRequest req) { | ||
127 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | ||
128 | + for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderLiat) { | ||
129 | + Result result = huahengMultiHandlerService.createShipmentTask(shipmentContainerHeader, warehouseCode, 0, 0, 0); | ||
130 | + if (!result.isSuccess()) { | ||
131 | + return result; | ||
132 | + } | ||
133 | + } | ||
134 | + return Result.OK("批量创建出库任务成功"); | ||
135 | + } | ||
136 | + | ||
137 | + /** | ||
120 | * 选择分拣口 | 138 | * 选择分拣口 |
121 | * @return | 139 | * @return |
122 | */ | 140 | */ |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -118,7 +118,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -118,7 +118,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
118 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | 118 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
119 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode) | 119 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode) |
120 | .eq(InventoryDetail::getMaterialCode, materialCode).eq(InventoryDetail::getInventoryStatus, inventoryStatus) | 120 | .eq(InventoryDetail::getMaterialCode, materialCode).eq(InventoryDetail::getInventoryStatus, inventoryStatus) |
121 | - .eq(InventoryDetail::getController, QuantityConstant.CONTROLLER_NOT_ENABLE) | 121 | + .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE) |
122 | .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY); | 122 | .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY); |
123 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); | 123 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); |
124 | return inventoryDetailList; | 124 | return inventoryDetailList; |
@@ -194,12 +194,12 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -194,12 +194,12 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
194 | continue; | 194 | continue; |
195 | } | 195 | } |
196 | } | 196 | } |
197 | - for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderList) { | ||
198 | - if (shipmentContainerHeader.getContainerCode().equals(containerCode)) { | ||
199 | - removeInventoryList.add(inventoryDetail); | ||
200 | - continue; | ||
201 | - } | ||
202 | - } | 197 | +// for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderList) { |
198 | +// if (shipmentContainerHeader.getContainerCode().equals(containerCode)) { | ||
199 | +// removeInventoryList.add(inventoryDetail); | ||
200 | +// continue; | ||
201 | +// } | ||
202 | +// } | ||
203 | } | 203 | } |
204 | inventoryList.removeAll(removeInventoryList); | 204 | inventoryList.removeAll(removeInventoryList); |
205 | if (inventoryList.size() < 1) { | 205 | if (inventoryList.size() < 1) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/controller/ShipmentContainerHeaderController.java
@@ -82,6 +82,7 @@ public class ShipmentContainerHeaderController extends JeecgController<ShipmentC | @@ -82,6 +82,7 @@ public class ShipmentContainerHeaderController extends JeecgController<ShipmentC | ||
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | HuahengJwtUtil.setWarehouseCode(req, shipmentContainerHeader); | 83 | HuahengJwtUtil.setWarehouseCode(req, shipmentContainerHeader); |
84 | QueryWrapper<ShipmentContainerHeader> queryWrapper = QueryGenerator.initQueryWrapper(shipmentContainerHeader, req.getParameterMap()); | 84 | QueryWrapper<ShipmentContainerHeader> queryWrapper = QueryGenerator.initQueryWrapper(shipmentContainerHeader, req.getParameterMap()); |
85 | + queryWrapper.orderByDesc("id"); | ||
85 | Page<ShipmentContainerHeader> page = new Page<ShipmentContainerHeader>(pageNo, pageSize); | 86 | Page<ShipmentContainerHeader> page = new Page<ShipmentContainerHeader>(pageNo, pageSize); |
86 | IPage<ShipmentContainerHeader> pageList = shipmentContainerHeaderService.page(page, queryWrapper); | 87 | IPage<ShipmentContainerHeader> pageList = shipmentContainerHeaderService.page(page, queryWrapper); |
87 | return Result.OK(pageList); | 88 | return Result.OK(pageList); |
@@ -136,7 +137,7 @@ public class ShipmentContainerHeaderController extends JeecgController<ShipmentC | @@ -136,7 +137,7 @@ public class ShipmentContainerHeaderController extends JeecgController<ShipmentC | ||
136 | */ | 137 | */ |
137 | @AutoLog(value = "出库组盘-批量删除") | 138 | @AutoLog(value = "出库组盘-批量删除") |
138 | @ApiOperation(value = "出库组盘-批量删除", notes = "出库组盘-批量删除") | 139 | @ApiOperation(value = "出库组盘-批量删除", notes = "出库组盘-批量删除") |
139 | - @RequiresPermissions("shipmentContainerHeader:deleteBatch") | 140 | + @RequiresPermissions("shipmentContainerHeader:delete") |
140 | @DeleteMapping(value = "/deleteBatch") | 141 | @DeleteMapping(value = "/deleteBatch") |
141 | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { | 142 | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
142 | List<String> idList = Arrays.asList(ids.split(",")); | 143 | List<String> idList = Arrays.asList(ids.split(",")); |
@@ -144,9 +145,11 @@ public class ShipmentContainerHeaderController extends JeecgController<ShipmentC | @@ -144,9 +145,11 @@ public class ShipmentContainerHeaderController extends JeecgController<ShipmentC | ||
144 | Result result = null; | 145 | Result result = null; |
145 | for (Integer id : idInterList) { | 146 | for (Integer id : idInterList) { |
146 | result = huahengMultiHandlerService.cancelCombine(id); | 147 | result = huahengMultiHandlerService.cancelCombine(id); |
148 | + if (!result.isSuccess()) { | ||
149 | + return result; | ||
150 | + } | ||
147 | } | 151 | } |
148 | return result; | 152 | return result; |
149 | -// return shipmentContainerHeaderService.cancelCombine(idInterList); | ||
150 | } | 153 | } |
151 | 154 | ||
152 | /** | 155 | /** |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
@@ -19,6 +19,7 @@ import org.jeecg.utils.StringUtils; | @@ -19,6 +19,7 @@ import org.jeecg.utils.StringUtils; | ||
19 | import org.jeecg.utils.constant.QuantityConstant; | 19 | import org.jeecg.utils.constant.QuantityConstant; |
20 | import org.springframework.beans.factory.annotation.Autowired; | 20 | import org.springframework.beans.factory.annotation.Autowired; |
21 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
22 | +import org.springframework.transaction.annotation.Transactional; | ||
22 | 23 | ||
23 | import com.alibaba.fastjson.JSON; | 24 | import com.alibaba.fastjson.JSON; |
24 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 25 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
@@ -52,6 +53,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | @@ -52,6 +53,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | ||
52 | } | 53 | } |
53 | 54 | ||
54 | @Override | 55 | @Override |
56 | + @Transactional(rollbackFor = JeecgBootException.class) | ||
55 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情添加'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 57 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情添加'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
56 | public Result saveShipmentDetail(ShipmentDetail shipmentDetail) { | 58 | public Result saveShipmentDetail(ShipmentDetail shipmentDetail) { |
57 | ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentDetail.getShipmentId()); | 59 | ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentDetail.getShipmentId()); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -99,7 +99,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -99,7 +99,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
99 | } | 99 | } |
100 | 100 | ||
101 | @Override | 101 | @Override |
102 | - @Transactional | 102 | + @Transactional(rollbackFor = JeecgBootException.class) |
103 | @OperationLog(bizId = "#shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单新增'", | 103 | @OperationLog(bizId = "#shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单新增'", |
104 | msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", recordReturnValue = true) | 104 | msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", recordReturnValue = true) |
105 | public Result saveShipmentHeader(ShipmentHeader shipmentHeader) { | 105 | public Result saveShipmentHeader(ShipmentHeader shipmentHeader) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/controller/AgvTaskController.java
@@ -52,6 +52,7 @@ public class AgvTaskController extends JeecgController<AgvTask, IAgvTaskService> | @@ -52,6 +52,7 @@ public class AgvTaskController extends JeecgController<AgvTask, IAgvTaskService> | ||
52 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | 52 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
53 | HuahengJwtUtil.setWarehouseCode(req, agvTask); | 53 | HuahengJwtUtil.setWarehouseCode(req, agvTask); |
54 | QueryWrapper<AgvTask> queryWrapper = QueryGenerator.initQueryWrapper(agvTask, req.getParameterMap()); | 54 | QueryWrapper<AgvTask> queryWrapper = QueryGenerator.initQueryWrapper(agvTask, req.getParameterMap()); |
55 | + queryWrapper.orderByDesc("id"); | ||
55 | Page<AgvTask> page = new Page<AgvTask>(pageNo, pageSize); | 56 | Page<AgvTask> page = new Page<AgvTask>(pageNo, pageSize); |
56 | IPage<AgvTask> pageList = agvTaskService.page(page, queryWrapper); | 57 | IPage<AgvTask> pageList = agvTaskService.page(page, queryWrapper); |
57 | return Result.OK(pageList); | 58 | return Result.OK(pageList); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
@@ -102,6 +102,7 @@ public class TaskHeaderController extends HuahengBaseController { | @@ -102,6 +102,7 @@ public class TaskHeaderController extends HuahengBaseController { | ||
102 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | 102 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
103 | HuahengJwtUtil.setWarehouseCode(req, taskHeader); | 103 | HuahengJwtUtil.setWarehouseCode(req, taskHeader); |
104 | QueryWrapper<TaskHeader> queryWrapper = QueryGenerator.initQueryWrapper(taskHeader, req.getParameterMap()); | 104 | QueryWrapper<TaskHeader> queryWrapper = QueryGenerator.initQueryWrapper(taskHeader, req.getParameterMap()); |
105 | + queryWrapper.orderByDesc("id"); | ||
105 | Page<TaskHeader> page = new Page<TaskHeader>(pageNo, pageSize); | 106 | Page<TaskHeader> page = new Page<TaskHeader>(pageNo, pageSize); |
106 | IPage<TaskHeader> pageList = taskHeaderService.page(page, queryWrapper); | 107 | IPage<TaskHeader> pageList = taskHeaderService.page(page, queryWrapper); |
107 | return Result.OK(pageList); | 108 | return Result.OK(pageList); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -1142,7 +1142,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1142,7 +1142,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1142 | inventoryTransaction.setQty(receiptQty); | 1142 | inventoryTransaction.setQty(receiptQty); |
1143 | inventoryTransaction.setReceiptQty(receiptQty); | 1143 | inventoryTransaction.setReceiptQty(receiptQty); |
1144 | // 获得库存数量 | 1144 | // 获得库存数量 |
1145 | - BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail); | 1145 | + BigDecimal inventoryQty = inventoryDetailService.getInventorySumQty(inventoryDetail); |
1146 | inventoryQty = inventoryQty.add(receiptQty); | 1146 | inventoryQty = inventoryQty.add(receiptQty); |
1147 | inventoryTransaction.setInventoryQty(inventoryQty); | 1147 | inventoryTransaction.setInventoryQty(inventoryQty); |
1148 | inventoryTransactionList.add(inventoryTransaction); | 1148 | inventoryTransactionList.add(inventoryTransaction); |
@@ -1317,6 +1317,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1317,6 +1317,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1317 | inventoryTransaction.setContainerCode(containerCode); | 1317 | inventoryTransaction.setContainerCode(containerCode); |
1318 | inventoryTransaction.setZoneCode(zoneCode); | 1318 | inventoryTransaction.setZoneCode(zoneCode); |
1319 | inventoryTransaction.setFromLocationCode(fromLocationCode); | 1319 | inventoryTransaction.setFromLocationCode(fromLocationCode); |
1320 | + inventoryTransaction.setToLocationCode(toLocationCode); | ||
1320 | inventoryTransaction.setMaterialCode(inventoryDetail.getMaterialCode()); | 1321 | inventoryTransaction.setMaterialCode(inventoryDetail.getMaterialCode()); |
1321 | inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); | 1322 | inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); |
1322 | inventoryTransaction.setMaterialSpec(inventoryDetail.getMaterialSpec()); | 1323 | inventoryTransaction.setMaterialSpec(inventoryDetail.getMaterialSpec()); |
@@ -1332,7 +1333,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1332,7 +1333,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1332 | inventoryTransaction.setProject(inventoryDetail.getProject()); | 1333 | inventoryTransaction.setProject(inventoryDetail.getProject()); |
1333 | inventoryTransaction.setQty(taskDetail.getQty()); | 1334 | inventoryTransaction.setQty(taskDetail.getQty()); |
1334 | inventoryTransaction.setShipmentQty(taskDetail.getQty()); | 1335 | inventoryTransaction.setShipmentQty(taskDetail.getQty()); |
1335 | - BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail); | 1336 | + BigDecimal inventoryQty = inventoryDetailService.getInventorySumQty(inventoryDetail); |
1336 | inventoryTransaction.setInventoryQty(inventoryQty); | 1337 | inventoryTransaction.setInventoryQty(inventoryQty); |
1337 | inventoryTransactionList.add(inventoryTransaction); | 1338 | inventoryTransactionList.add(inventoryTransaction); |
1338 | shipmentIdList.add(taskDetail.getShipmentId()); | 1339 | shipmentIdList.add(taskDetail.getShipmentId()); |
@@ -1353,6 +1354,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1353,6 +1354,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1353 | if (!success) { | 1354 | if (!success) { |
1354 | throw new JeecgBootException("完成出库任务,更新库存头失败"); | 1355 | throw new JeecgBootException("完成出库任务,更新库存头失败"); |
1355 | } | 1356 | } |
1357 | + List<InventoryDetail> updateInventoryDetailList = new ArrayList<>(); | ||
1358 | + for (InventoryDetail inventoryDetail : inventoryDetailList) { | ||
1359 | + InventoryDetail inventoryDetail1 = new InventoryDetail(); | ||
1360 | + inventoryDetail1.setId(inventoryDetail.getId()); | ||
1361 | + inventoryDetail1.setLocationCode(toLocationCode); | ||
1362 | + updateInventoryDetailList.add(inventoryDetail1); | ||
1363 | + } | ||
1364 | + success = inventoryDetailService.updateBatchLocationCodeById(updateInventoryDetailList); | ||
1365 | + if (!success) { | ||
1366 | + throw new JeecgBootException("完成出库任务,更新库存详情失败"); | ||
1367 | + } | ||
1356 | } | 1368 | } |
1357 | success = inventoryTransactionService.saveBatch(inventoryTransactionList); | 1369 | success = inventoryTransactionService.saveBatch(inventoryTransactionList); |
1358 | if (!success) { | 1370 | if (!success) { |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -577,10 +577,10 @@ public class QuantityConstant { | @@ -577,10 +577,10 @@ public class QuantityConstant { | ||
577 | /* 不可用 */ | 577 | /* 不可用 */ |
578 | public static final int STATUS_DISABLE = 0; | 578 | public static final int STATUS_DISABLE = 0; |
579 | 579 | ||
580 | - /* 库内有托盘 */ | ||
581 | - public static final int STATUS_HAVE_CONTAINER = 1; | ||
582 | - /* 库内没有托盘 */ | ||
583 | - public static final int STATUS_NOT_CONTAINER = 0; | 580 | + /* 可用 */ |
581 | + public static final int INVENTORY_DETAIL_STATUS_ENABLE = 0; | ||
582 | + /* 受控 */ | ||
583 | + public static final int INVENTORY_DETAIL_STATUS_CONTAINER = 1; | ||
584 | 584 | ||
585 | public static final int HTTP_OK = 200; | 585 | public static final int HTTP_OK = 200; |
586 | 586 |