Commit e2b6a8a437ea9f76e73ef238802e35446b76c676
1 parent
cbd7786d
1. 路径指引
2. 打印拣货单 3. 增加培训计划
Showing
27 changed files
with
267 additions
and
33 deletions
ant-design-vue-jeecg/src/api/api.js
... | ... | @@ -151,6 +151,8 @@ export const autoCombination = (params) => postAction('/shipment/shipmentCombina |
151 | 151 | export const autoShipment = (params) => postAction('/shipment/shipmentHeader/autoShipment', params); |
152 | 152 | //自动预配盘出库 |
153 | 153 | export const autoShipmentAdvice = (params) => postAction('/shipment/shipmentHeader/autoShipmentAdvice', params); |
154 | +//平库路径指引 | |
155 | +export const autoFlatShipmentAdvice = (params) => postAction('/shipment/shipmentHeader/autoFlatShipmentAdvice', params); | |
154 | 156 | //根据序列号扣减预配盘的库存 |
155 | 157 | export const reduceInventoryDetailBySn = (params) => postAction('/shipment/shipmentCombination/reduceInventoryDetailBySn?snList=' + params, params); |
156 | 158 | //创建出库任务 |
... | ... |
ant-design-vue-jeecg/src/views/system/config/MaterialList.vue
... | ... | @@ -315,7 +315,7 @@ export default { |
315 | 315 | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
316 | 316 | ids += this.selectedRowKeys[a] + ","; |
317 | 317 | } |
318 | - window.open(window._CONFIG['domianURL'] + "/jmreport/view/963689682890440704/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); | |
318 | + window.open(window._CONFIG['domianURL'] + "/jmreport/view/897299074078208000/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); | |
319 | 319 | } |
320 | 320 | }, |
321 | 321 | doubleBarCodePrint() { |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/QualityInventoryDetailModal.vue
... | ... | @@ -87,7 +87,9 @@ export default { |
87 | 87 | selectPickPort(this.querySource).then(res => { |
88 | 88 | if (res.success) { |
89 | 89 | this.portList = res.result |
90 | - this.visible = true | |
90 | + if (this.portList.length == 1) { | |
91 | + this.model.outPortCode = this.portList[0].code; | |
92 | + } | |
91 | 93 | } |
92 | 94 | }) |
93 | 95 | }, |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerAdviceList.vue
... | ... | @@ -125,16 +125,16 @@ |
125 | 125 | </template> |
126 | 126 | |
127 | 127 | <span slot="action" slot-scope="text, record"> |
128 | - <a @click="handleEdit(record)">编辑</a> | |
128 | + <a v-if="record.status == 0" @click="handleEdit(record)">编辑</a> | |
129 | 129 | |
130 | 130 | <a-divider type="vertical" /> |
131 | 131 | <a-dropdown> |
132 | 132 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
133 | 133 | <a-menu slot="overlay"> |
134 | - <a-menu-item> | |
134 | + <a-menu-item > | |
135 | 135 | <a @click="handleDetail(record)">详情</a> |
136 | 136 | </a-menu-item> |
137 | - <a-menu-item> | |
137 | + <a-menu-item v-if="record.status == 0"> | |
138 | 138 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
139 | 139 | <a>删除</a> |
140 | 140 | </a-popconfirm> |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | </span> |
62 | 62 | |
63 | 63 | <span slot="action" slot-scope="text, record"> |
64 | - <a v-if=" (flowStatus == '15' && flowStatus != '20' && record.status < 800) || (flowOff == '0' && record.status < 800)" @click="combine(record)">配盘</a> | |
64 | + <a v-has="'shipmentDetail:combine'" v-if=" (flowStatus == '15' && flowStatus != '20' && record.status < 800) || (flowOff == '0' && record.status < 800)" @click="combine(record)">配盘</a> | |
65 | 65 | <a v-has="'shipmentDetail:edit'" v-if="record.status == 0 && record.referCode == null" @click="handleEdit(record)"><a-divider type="vertical"/>编辑</a> |
66 | 66 | <a-popconfirm v-has="'shipmentDetail:delete'" v-if="record.status == 0 && record.referCode == null" title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
67 | 67 | <a-divider type="vertical"/><a>删除</a> |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
... | ... | @@ -215,7 +215,7 @@ |
215 | 215 | </a-popconfirm> |
216 | 216 | <a v-show="record.lastStatus == 850" @click="viewReason(record)"><a-button type="danger">原因</a-button></a> |
217 | 217 | <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0)) |
218 | - || (flowOff == '0' && record.lastStatus < 800 && record.totalLines != 0)" @click="manualShipmentCombine(record.id)" v-has="'shipmentHeader:autoShipmentCombine'"><a-button type="primary">手动配盘</a-button></a> | |
218 | + || (flowOff == '0' && record.lastStatus < 800 && record.totalLines != 0)" @click="manualShipmentCombine(record.id)" v-has="'shipmentHeader:combine'"><a-button type="primary">手动配盘</a-button></a> | |
219 | 219 | <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0)) |
220 | 220 | || (flowOff == '0' && record.lastStatus < 800 && record.totalLines != 0)" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'"><a-button type="primary">自动配盘</a-button></a> |
221 | 221 | <a-dropdown v-if="(record.firstStatus > 0 && record.firstStatus <= 20 && flowOff=='1') |
... | ... | @@ -227,12 +227,18 @@ |
227 | 227 | <a-menu-item v-if="record.firstStatus > 0 && record.firstStatus <= 20 && flowOff=='1'"> |
228 | 228 | <a @click="openProcess(record)" type="primary">审核进度</a> |
229 | 229 | </a-menu-item> |
230 | - <a-menu-item v-if="(record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800) && record.totalLines != 0 || (flowOff == '0' && record.lastStatus <= 200 && record.totalLines != 0)" v-has="'shipmentHeader:autoShipment'"> | |
230 | + <a-menu-item v-if="(record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0 && record.zoneType == 'L' ) || (flowOff == '0' && record.lastStatus <= 200 && record.totalLines != 0 && record.zoneType == 'L')" v-has="'shipmentHeader:autoShipment'"> | |
231 | 231 | <a @click="autoShipment(record)" type="primary">自动出库</a> |
232 | 232 | </a-menu-item> |
233 | - <a-menu-item v-if="(record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0) || (flowOff == '0' && record.lastStatus <= 200 && record.totalLines != 0)" v-has="'shipmentHeader:autoShipmentAdvice'"> | |
233 | + <a-menu-item v-if="(record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0 && record.zoneType == 'L' ) || (flowOff == '0' && record.lastStatus <= 200 && record.totalLines != 0 && record.zoneType == 'L')" v-has="'shipmentHeader:autoShipmentAdvice'"> | |
234 | 234 | <a @click="autoShipmentAdvice(record)" type="primary">预配盘出库</a> |
235 | 235 | </a-menu-item> |
236 | + <a-menu-item v-if="(record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0 && record.zoneType == 'P' ) || (flowOff == '0' && record.lastStatus <= 200 && record.totalLines != 0 && record.zoneType == 'P')" v-has="'shipmentHeader:autoShipmentAdvice'"> | |
237 | + <a @click="autoFlatShipmentAdvice(record)" type="primary">路径指引</a> | |
238 | + </a-menu-item> | |
239 | + <a-menu-item v-if="(record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800 && record.totalLines != 0 && record.zoneType == 'P' ) || (flowOff == '0' && record.lastStatus <= 200 && record.totalLines != 0 && record.zoneType == 'P')" v-has="'shipmentHeader:print'"> | |
240 | + <a @click="print(record)" type="primary">打印拣货单</a> | |
241 | + </a-menu-item> | |
236 | 242 | <a-menu-item v-has="'shipmentHeader:edit'" v-if="record.firstStatus == 0 && record.lastStatus == 0 && record.referCode == null"> |
237 | 243 | <a @click="handleEdit(record)">编辑</a> |
238 | 244 | </a-menu-item> |
... | ... | @@ -269,7 +275,7 @@ import {downFile, getAction} from '@/api/manage' |
269 | 275 | import ShipmentDetailList from './ShipmentDetailList' |
270 | 276 | import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
271 | 277 | import '@/assets/less/TableExpand.less' |
272 | -import {getCompanyList, backErpShipment, getZoneList} from '@/api/api' | |
278 | +import {getCompanyList, backErpShipment, getZoneList, autoFlatShipmentAdvice} from '@/api/api' | |
273 | 279 | import {getShipmentTypeList} from '@/api/api' |
274 | 280 | import {getCustomerList} from '@/api/api' |
275 | 281 | import {autoCombination} from '@/api/api' |
... | ... | @@ -616,6 +622,16 @@ export default { |
616 | 622 | window.open(window._CONFIG['domianURL'] + "/jmreport/view/770140222517493760/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); |
617 | 623 | } |
618 | 624 | }, |
625 | + print(record) { | |
626 | + if (this.selectedRowKeys.length <= 0) { | |
627 | + this.$message.warning('请选择一条记录!'); | |
628 | + return; | |
629 | + } else { | |
630 | + var ids = ""; | |
631 | + ids = this.selectedRowKeys[0]; | |
632 | + window.open(window._CONFIG['domianURL'] + "/jmreport/view/973383742890766336/?id=" + ids, "newWindow", "toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); | |
633 | + } | |
634 | + }, | |
619 | 635 | solutionCompany(value) { |
620 | 636 | var actions = [] |
621 | 637 | Object.keys(this.companyList).some((key) => { |
... | ... | @@ -701,6 +717,18 @@ export default { |
701 | 717 | this.searchQuery(); |
702 | 718 | }); |
703 | 719 | }, |
720 | + autoFlatShipmentAdvice(record) { | |
721 | + this.loading = true; | |
722 | + autoFlatShipmentAdvice(record).then((res) => { | |
723 | + if (res.success) { | |
724 | + this.$message.success(res.message); | |
725 | + } else { | |
726 | + this.$message.warning(res.message) | |
727 | + } | |
728 | + this.loading = false; | |
729 | + this.searchQuery(); | |
730 | + }); | |
731 | + }, | |
704 | 732 | dataSearch(){ |
705 | 733 | //加载数据 若传入参数1则加载第一页的内容 |
706 | 734 | var params = this.getQueryParams();//查询条件 |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentManualCombineModal.vue
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/service/impl/ErpServiceImpl.java
... | ... | @@ -24,6 +24,8 @@ import org.jeecg.modules.wms.config.supplier.entity.Supplier; |
24 | 24 | import org.jeecg.modules.wms.config.supplier.service.ISupplierService; |
25 | 25 | import org.jeecg.modules.wms.config.warehouse.entity.Warehouse; |
26 | 26 | import org.jeecg.modules.wms.config.warehouse.service.IWarehouseService; |
27 | +import org.jeecg.modules.wms.config.zone.entity.Zone; | |
28 | +import org.jeecg.modules.wms.config.zone.service.IZoneService; | |
27 | 29 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
28 | 30 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
29 | 31 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; |
... | ... | @@ -76,6 +78,8 @@ public class ErpServiceImpl implements IErpService { |
76 | 78 | private ISupplierService supplierService; |
77 | 79 | @Resource |
78 | 80 | private ICustomerService customerService; |
81 | + @Resource | |
82 | + private IZoneService zoneService; | |
79 | 83 | |
80 | 84 | @Override |
81 | 85 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -277,11 +281,20 @@ public class ErpServiceImpl implements IErpService { |
277 | 281 | } |
278 | 282 | customerName = customer.getName(); |
279 | 283 | } |
284 | + String zoneType = null; | |
285 | + if (StringUtils.isNotEmpty(zoneCode)) { | |
286 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
287 | + if (zone == null) { | |
288 | + return Result.error("出库单下发, 没有找到库区"); | |
289 | + } | |
290 | + zoneType = zone.getType(); | |
291 | + } | |
280 | 292 | ShipmentHeader shipmentHeader = new ShipmentHeader(); |
281 | 293 | shipmentHeader.setWarehouseCode(warehouseCode); |
282 | 294 | shipmentHeader.setCompanyCode(companyCode); |
283 | 295 | shipmentHeader.setCustomerName(customerName); |
284 | 296 | shipmentHeader.setZoneCode(zoneCode); |
297 | + shipmentHeader.setZoneType(zoneType); | |
285 | 298 | shipmentHeader.setType(shipmentType); |
286 | 299 | shipmentHeader.setReferCode(referCode); |
287 | 300 | shipmentHeader.setCustomerCode(customerCode); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... | ... | @@ -498,11 +498,11 @@ public class WcsServiceImpl implements WcsService { |
498 | 498 | if (unCompleteTaskHeader != null) { |
499 | 499 | return Result.error("任务下发, 执行外侧库位出库时,相应的内侧库位有入库类型任务,请先执行完内侧库位任务"); |
500 | 500 | } |
501 | - // 如果是有任务,从这个库位出托盘,那么等这个任务作为前置任务。 | |
502 | - unCompleteTaskHeader = taskHeaderService.getUnCompleteTaskByFromLocationCode(insideLocationCode, warehouseCode); | |
503 | - if (unCompleteTaskHeader != null) { | |
504 | - preTaskNo = unCompleteTaskHeader.getId(); | |
505 | - } | |
501 | +// // 如果是有任务,从这个库位出托盘,那么等这个任务作为前置任务。 | |
502 | +// unCompleteTaskHeader = taskHeaderService.getUnCompleteTaskByFromLocationCode(insideLocationCode, warehouseCode); | |
503 | +// if (unCompleteTaskHeader != null) { | |
504 | +// preTaskNo = unCompleteTaskHeader.getId(); | |
505 | +// } | |
506 | 506 | } |
507 | 507 | taskHeader.setPreTaskNo(preTaskNo); |
508 | 508 | boolean success = taskHeaderService.updatePreTaskNoById(preTaskNo, taskHeader.getId()); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/IHuahengMultiHandlerService.java
... | ... | @@ -31,6 +31,11 @@ public interface IHuahengMultiHandlerService { |
31 | 31 | Result cancelCombine(Integer id); |
32 | 32 | |
33 | 33 | /** |
34 | + * 取消预配盘 | |
35 | + */ | |
36 | + Result cancelCombineAdvice(Integer id); | |
37 | + | |
38 | + /** | |
34 | 39 | * 取消组盘 |
35 | 40 | */ |
36 | 41 | Result cancelReceiving(Integer id); |
... | ... | @@ -39,6 +44,8 @@ public interface IHuahengMultiHandlerService { |
39 | 44 | |
40 | 45 | Result autoShipmentAdvice(String shipmentCode, String warehouseCode); |
41 | 46 | |
47 | + Result autoFlatShipmentAdvice(String shipmentCode, String warehouseCode); | |
48 | + | |
42 | 49 | Result autoShipment(String shipmentCode, String warehouseCode); |
43 | 50 | |
44 | 51 | 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
... | ... | @@ -35,6 +35,7 @@ import org.jeecg.modules.wms.receipt.receiving.service.IReceiveService; |
35 | 35 | import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel; |
36 | 36 | import org.jeecg.modules.wms.shipment.shipmentCombination.entity.FlatShipment; |
37 | 37 | import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; |
38 | +import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.service.IShipmentContainerAdviceService; | |
38 | 39 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; |
39 | 40 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; |
40 | 41 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.CombinationParam; |
... | ... | @@ -97,6 +98,8 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem |
97 | 98 | private IContainerService containerService; |
98 | 99 | @Resource |
99 | 100 | private ILocationService locationService; |
101 | + @Resource | |
102 | + private IShipmentContainerAdviceService shipmentContainerAdviceService; | |
100 | 103 | |
101 | 104 | @Override |
102 | 105 | public Result sendTaskToWcs(TaskHeader taskHeader, String zoneCode) { |
... | ... | @@ -161,6 +164,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem |
161 | 164 | shipmentHeader.setWarehouseCode(warehouseCode); |
162 | 165 | shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); |
163 | 166 | shipmentHeader.setZoneCode(QuantityConstant.ZONE_TYPE_FLAT); |
167 | + shipmentHeader.setZoneType(QuantityConstant.ZONE_TYPE_FLAT); | |
164 | 168 | shipmentHeader.setCompanyCode(inventoryDetailList.get(0).getCompanyCode()); |
165 | 169 | Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); |
166 | 170 | if (!result.isSuccess()) { |
... | ... | @@ -344,6 +348,18 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem |
344 | 348 | } |
345 | 349 | |
346 | 350 | @Override |
351 | + public Result cancelCombineAdvice(Integer id) { | |
352 | + Result result = handleMultiProcess("cancelCombineAdvice", new MultiProcessListener() { | |
353 | + @Override | |
354 | + public Result<?> doProcess() { | |
355 | + Result result = shipmentContainerAdviceService.cancelCombineAdvice(id); | |
356 | + return result; | |
357 | + } | |
358 | + }); | |
359 | + return result; | |
360 | + } | |
361 | + | |
362 | + @Override | |
347 | 363 | public Result cancelReceiving(Integer id) { |
348 | 364 | Result result = handleMultiProcess("cancelReceiving", new MultiProcessListener() { |
349 | 365 | @Override |
... | ... | @@ -380,6 +396,18 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem |
380 | 396 | } |
381 | 397 | |
382 | 398 | @Override |
399 | + public Result autoFlatShipmentAdvice(String shipmentCode, String warehouseCode) { | |
400 | + Result result = handleMultiProcess("combination", new MultiProcessListener() { | |
401 | + @Override | |
402 | + public Result<?> doProcess() { | |
403 | + Result result = shipmentHeaderService.autoFlatShipmentAdvice(shipmentCode, warehouseCode); | |
404 | + return result; | |
405 | + } | |
406 | + }); | |
407 | + return result; | |
408 | + } | |
409 | + | |
410 | + @Override | |
383 | 411 | public Result autoShipment(String shipmentCode, String warehouseCode) { |
384 | 412 | Result result = handleMultiProcess("combination", new MultiProcessListener() { |
385 | 413 | @Override |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
... | ... | @@ -217,11 +217,20 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
217 | 217 | if (StringUtils.isEmpty(inventoryDetails)) { |
218 | 218 | return Result.error("批量快速出库, 排除锁定库存后没有可出库存详情"); |
219 | 219 | } |
220 | + String zoneType = null; | |
221 | + if (StringUtils.isNotEmpty(zoneCode)) { | |
222 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
223 | + if (zone == null) { | |
224 | + return Result.error("出库单下发, 没有找到库区"); | |
225 | + } | |
226 | + zoneType = zone.getType(); | |
227 | + } | |
220 | 228 | String companyCode = inventoryDetails.get(0).getCompanyCode(); |
221 | 229 | ShipmentHeader shipmentHeader = new ShipmentHeader(); |
222 | 230 | shipmentHeader.setWarehouseCode(warehouseCode); |
223 | 231 | shipmentHeader.setCompanyCode(companyCode); |
224 | 232 | shipmentHeader.setZoneCode(zoneCode); |
233 | + shipmentHeader.setZoneType(zoneType); | |
225 | 234 | shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); |
226 | 235 | shipmentHeader.setRemark("快速出库"); |
227 | 236 | Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); |
... | ... | @@ -312,11 +321,20 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
312 | 321 | if (StringUtils.isEmpty(inventoryDetailList)) { |
313 | 322 | return Result.error("批量快速出库, 排除锁定库存后没有可出库存详情"); |
314 | 323 | } |
324 | + String zoneType = null; | |
325 | + if (StringUtils.isNotEmpty(zoneCode)) { | |
326 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
327 | + if (zone == null) { | |
328 | + return Result.error("出库单下发, 没有找到库区"); | |
329 | + } | |
330 | + zoneType = zone.getType(); | |
331 | + } | |
315 | 332 | String companyCode = inventoryDetailList.get(0).getCompanyCode(); |
316 | 333 | ShipmentHeader shipmentHeader = new ShipmentHeader(); |
317 | 334 | shipmentHeader.setWarehouseCode(warehouseCode); |
318 | 335 | shipmentHeader.setCompanyCode(companyCode); |
319 | 336 | shipmentHeader.setZoneCode(zoneCode); |
337 | + shipmentHeader.setZoneType(zoneType); | |
320 | 338 | shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); |
321 | 339 | shipmentHeader.setRemark("快速出库"); |
322 | 340 | Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... | ... | @@ -793,7 +793,8 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
793 | 793 | shipmentContainerAdvice.setWarehouseCode(shipmentContainerHeader.getWarehouseCode()); |
794 | 794 | shipmentContainerAdvice.setCompanyCode(shipmentDetail.getCompanyCode()); |
795 | 795 | shipmentContainerAdvice.setContainerCode(shipmentContainerHeader.getContainerCode()); |
796 | -// shipmentContainerAdvice.setInventoryDetailId(inventoryDetail.getId()); | |
796 | + shipmentContainerAdvice.setLocationCode(shipmentContainerHeader.getFromLocationCode()); | |
797 | + shipmentContainerAdvice.setInventoryDetailId(inventoryDetail.getId()); | |
797 | 798 | shipmentContainerAdvice.setShipmentCode(shipmentDetail.getShipmentCode()); |
798 | 799 | shipmentContainerAdvice.setShipmentId(shipmentDetail.getShipmentId()); |
799 | 800 | shipmentContainerAdvice.setShipmentDetailId(shipmentDetail.getId()); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerAdvice/controller/ShipmentContainerAdviceController.java
... | ... | @@ -93,8 +93,8 @@ public class ShipmentContainerAdviceController extends JeecgController<ShipmentC |
93 | 93 | @ApiOperation(value = "出库预配盘-通过id删除", notes = "出库预配盘-通过id删除") |
94 | 94 | @DeleteMapping(value = "/delete") |
95 | 95 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
96 | - shipmentContainerAdviceService.removeById(id); | |
97 | - return Result.OK("删除成功!"); | |
96 | + Result result = shipmentContainerAdviceService.cancelFlatCombineAdvice(Integer.parseInt(id)); | |
97 | + return result; | |
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
... | ... | @@ -106,7 +106,10 @@ public class ShipmentContainerAdviceController extends JeecgController<ShipmentC |
106 | 106 | @ApiOperation(value = "出库预配盘-批量删除", notes = "出库预配盘-批量删除") |
107 | 107 | @DeleteMapping(value = "/deleteBatch") |
108 | 108 | public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
109 | - this.shipmentContainerAdviceService.removeByIds(Arrays.asList(ids.split(","))); | |
109 | + List<String> idList = Arrays.asList(ids.split(",")); | |
110 | + for (String id : idList) { | |
111 | + shipmentContainerAdviceService.cancelFlatCombineAdvice(Integer.parseInt(id)); | |
112 | + } | |
110 | 113 | return Result.OK("批量删除成功!"); |
111 | 114 | } |
112 | 115 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerAdvice/entity/ShipmentContainerAdvice.java
... | ... | @@ -42,14 +42,14 @@ public class ShipmentContainerAdvice implements Serializable { |
42 | 42 | @Excel(name = "容器编码", width = 15) |
43 | 43 | @ApiModelProperty(value = "容器编码") |
44 | 44 | private java.lang.String containerCode; |
45 | -// /** 库位编码 */ | |
46 | -// @Excel(name = "库位编码", width = 15) | |
47 | -// @ApiModelProperty(value = "库位编码") | |
48 | -// private java.lang.String locationCode; | |
49 | -// /** 库存明细id */ | |
50 | -// @Excel(name = "库存明细id", width = 15) | |
51 | -// @ApiModelProperty(value = "库存明细id") | |
52 | -// private java.lang.Integer inventoryDetailId; | |
45 | + /** 库位编码 */ | |
46 | + @Excel(name = "库位编码", width = 15) | |
47 | + @ApiModelProperty(value = "库位编码") | |
48 | + private java.lang.String locationCode; | |
49 | + /** 库存明细id */ | |
50 | + @Excel(name = "库存明细id", width = 15) | |
51 | + @ApiModelProperty(value = "库存明细id") | |
52 | + private java.lang.Integer inventoryDetailId; | |
53 | 53 | /** 出库配盘ID */ |
54 | 54 | @Excel(name = "出库配盘ID", width = 15) |
55 | 55 | @ApiModelProperty(value = "出库配盘ID") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerAdvice/service/IShipmentContainerAdviceService.java
... | ... | @@ -23,10 +23,16 @@ public interface IShipmentContainerAdviceService extends IService<ShipmentContai |
23 | 23 | boolean updateTaskQtyById(BigDecimal qty, int id); |
24 | 24 | |
25 | 25 | /** |
26 | - * 取消配盘 | |
26 | + * 取消预配盘 | |
27 | 27 | * @return |
28 | 28 | */ |
29 | - Result cancelCombine(Integer id); | |
29 | + Result cancelCombineAdvice(Integer id); | |
30 | + | |
31 | + /** | |
32 | + * 取消平库预配盘 | |
33 | + * @return | |
34 | + */ | |
35 | + Result cancelFlatCombineAdvice(Integer id); | |
30 | 36 | |
31 | 37 | List<ShipmentContainerAdvice> getShipmentContainerAdviceListByShipmentCode(String shipmentCode, String warehouseCode); |
32 | 38 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerAdvice/service/impl/ShipmentContainerAdviceServiceImpl.java
... | ... | @@ -98,10 +98,10 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont |
98 | 98 | |
99 | 99 | @Override |
100 | 100 | @Transactional(rollbackFor = Exception.class) |
101 | - public Result cancelCombine(Integer id) { | |
101 | + public Result cancelCombineAdvice(Integer id) { | |
102 | 102 | log.info("开始取消预配盘,id:" + id); |
103 | 103 | ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(id); |
104 | - if (shipmentContainerHeader == null) { | |
104 | + if (shipmentContainerHeader != null) { | |
105 | 105 | return Result.error("取消出库预配盘失败, 没有找到出库组盘头ID:" + id); |
106 | 106 | } |
107 | 107 | int status = shipmentContainerHeader.getStatus(); |
... | ... | @@ -143,6 +143,37 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont |
143 | 143 | } |
144 | 144 | |
145 | 145 | @Override |
146 | + @Transactional(rollbackFor = Exception.class) | |
147 | + public Result cancelFlatCombineAdvice(Integer id) { | |
148 | + log.info("开始取消预配盘,id:" + id); | |
149 | + ShipmentContainerAdvice shipmentContainerAdvice = shipmentContainerAdviceService.getById(id); | |
150 | + if (shipmentContainerAdvice == null) { | |
151 | + return Result.error("取消出库预配盘失败,没有找到预配盘" + id); | |
152 | + } | |
153 | + if (shipmentContainerAdvice.getStatus().intValue() != QuantityConstant.SHIPMENT_CONTAINER_BUILD) { | |
154 | + return Result.error("取消出库预配盘失败,预配盘id" + id); | |
155 | + } | |
156 | + ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentContainerAdvice.getShipmentDetailId()); | |
157 | + BigDecimal taskQty = shipmentDetail.getTaskQty().subtract(shipmentContainerAdvice.getQty()); | |
158 | + shipmentDetail.setTaskQty(taskQty); | |
159 | + if (!shipmentDetailService.updateTaskQtyAndStatusById(taskQty, QuantityConstant.SHIPMENT_HEADER_BUILD, shipmentDetail.getId())) { | |
160 | + throw new JeecgBootException("取消出库预配盘失败, 更新出库明细失败,出库详情ID:" + shipmentContainerAdvice.getShipmentDetailId()); | |
161 | + } | |
162 | + if (!shipmentContainerAdviceService.removeById(shipmentContainerAdvice.getId())) { | |
163 | + throw new JeecgBootException("取消出库预配盘失败, 删除出库组盘明细表失败,配盘详情ID:" + shipmentContainerAdvice.getId()); | |
164 | + } | |
165 | + if (!shipmentHeaderService.updateShipmentHeaderStatus(shipmentDetail.getShipmentId())) { | |
166 | + throw new JeecgBootException("取消出库预配盘失败, 更新出库单头失败,出库单ID:" + shipmentDetail.getShipmentId()); | |
167 | + } | |
168 | + InventoryDetail inventoryDetail = inventoryDetailService.getById(shipmentContainerAdvice.getInventoryDetailId()); | |
169 | + if (!inventoryDetailService.updateTaskQtyById(BigDecimal.ZERO, inventoryDetail.getId())) { | |
170 | + throw new JeecgBootException("取消出库预配盘失败, 解锁库存详情失败,库存详情ID:" + inventoryDetail.getId()); | |
171 | + } | |
172 | + log.info("完成取消预配盘,id:" + id); | |
173 | + return Result.ok("取消预配盘成功"); | |
174 | + } | |
175 | + | |
176 | + @Override | |
146 | 177 | public List<ShipmentContainerAdvice> getShipmentContainerAdviceListByShipmentCode(String shipmentCode, String warehouseCode) { |
147 | 178 | LambdaQueryWrapper<ShipmentContainerAdvice> shipmentContainerAdviceLambdaQueryWrapper = Wrappers.lambdaQuery(); |
148 | 179 | shipmentContainerAdviceLambdaQueryWrapper.eq(ShipmentContainerAdvice::getShipmentCode, shipmentCode) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/impl/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -211,7 +211,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
211 | 211 | throw new JeecgBootException("取消出库任务时, 取消配盘失败"); |
212 | 212 | } |
213 | 213 | } else { |
214 | - Result result = shipmentContainerAdviceService.cancelCombine(shipmentContainerHeader.getId()); | |
214 | + Result result = shipmentContainerAdviceService.cancelCombineAdvice(shipmentContainerHeader.getId()); | |
215 | 215 | if (!result.isSuccess()) { |
216 | 216 | throw new JeecgBootException("取消出库任务时, 取消配盘失败"); |
217 | 217 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
... | ... | @@ -460,6 +460,17 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS |
460 | 460 | return result; |
461 | 461 | } |
462 | 462 | |
463 | + @AutoLog(value = "平库路径指引") | |
464 | + @ApiOperation(value = "平库路径指引", notes = "平库路径指引") | |
465 | + @PostMapping("/autoFlatShipmentAdvice") | |
466 | + @ResponseBody | |
467 | + public Result<TaskHeader> autoFlatShipmentAdvice(@RequestBody ShipmentHeader shipmentHeader, HttpServletRequest req) { | |
468 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | |
469 | + String shipmentCode = shipmentHeader.getCode(); | |
470 | + Result result = huahengMultiHandlerService.autoFlatShipmentAdvice(shipmentCode, warehouseCode); | |
471 | + return result; | |
472 | + } | |
473 | + | |
463 | 474 | /** |
464 | 475 | * 获取出库单物料库存信息 |
465 | 476 | * @return |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentHeader.java
... | ... | @@ -47,6 +47,10 @@ public class ShipmentHeader implements Serializable { |
47 | 47 | @Excel(name = "库区", width = 15) |
48 | 48 | @ApiModelProperty(value = "库区") |
49 | 49 | private String zoneCode; |
50 | + /** 库区类型 */ | |
51 | + @Excel(name = "库区类型", width = 15) | |
52 | + @ApiModelProperty(value = "库区类型") | |
53 | + private String zoneType; | |
50 | 54 | /** 货主编码 */ |
51 | 55 | @Excel(name = "货主编码", width = 15) |
52 | 56 | @ApiModelProperty(value = "货主编码") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/IShipmentHeaderService.java
... | ... | @@ -52,6 +52,8 @@ public interface IShipmentHeaderService extends IService<ShipmentHeader> { |
52 | 52 | |
53 | 53 | Result autoShipmentAdvice(String shipmentCode, String warehouseCode); |
54 | 54 | |
55 | + Result autoFlatShipmentAdvice(String shipmentCode, String warehouseCode); | |
56 | + | |
55 | 57 | Result createShipment(WaveConfig waveConfig, List<WaveConfigDetail> waveConfigDetailList); |
56 | 58 | |
57 | 59 | Result updateShipmentHeader(ShipmentDetail shipmentDetail); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
... | ... | @@ -175,6 +175,14 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, |
175 | 175 | if (zoneByCode == null) { |
176 | 176 | throw new JeecgBootException("库区:" + zoneCodeList.get(0) + "不存在"); |
177 | 177 | } |
178 | + String zoneType = null; | |
179 | + if (StringUtils.isNotEmpty(zoneCodeList.get(0))) { | |
180 | + Zone zone = zoneService.getZoneByCode(zoneCodeList.get(0), QuantityConstant.DEFAULT_WAREHOUSE); | |
181 | + if (zone == null) { | |
182 | + throw new JeecgBootException("出库单导入失败, 没有找到库区"); | |
183 | + } | |
184 | + zoneType = zone.getType(); | |
185 | + } | |
178 | 186 | BigDecimal totalQty = shipmentDetailList.stream().map(i -> i.getQty()).reduce(BigDecimal.ZERO, BigDecimal::add); |
179 | 187 | ShipmentHeader shipmentHeader = new ShipmentHeader(); |
180 | 188 | shipmentHeader.setWarehouseCode(QuantityConstant.DEFAULT_WAREHOUSE); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
... | ... | @@ -225,8 +225,18 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
225 | 225 | } |
226 | 226 | customerName = customer.getName(); |
227 | 227 | } |
228 | + String zoneCode = shipmentHeader.getZoneCode(); | |
229 | + String zoneType = null; | |
230 | + if (StringUtils.isNotEmpty(zoneCode)) { | |
231 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
232 | + if (zone == null) { | |
233 | + return Result.error("出库单下发, 没有找到库区信息"); | |
234 | + } | |
235 | + zoneType = zone.getType(); | |
236 | + } | |
228 | 237 | shipmentHeader.setCustomerName(customerName); |
229 | 238 | shipmentHeader.setCode(code); |
239 | + shipmentHeader.setZoneType(zoneType); | |
230 | 240 | shipmentHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_BUILD); |
231 | 241 | shipmentHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_BUILD); |
232 | 242 | boolean result = save(shipmentHeader); |
... | ... | @@ -384,6 +394,15 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
384 | 394 | shipmentDetailLambdaQueryWrapper.in(ShipmentDetail::getShipmentCode, shipmentHeaderList.stream().map(ShipmentHeader::getCode).collect(Collectors.toList())); |
385 | 395 | List<ShipmentDetail> mergeshipmentDetailList = shipmentDetailService.list(shipmentDetailLambdaQueryWrapper); |
386 | 396 | |
397 | + String zoneType = null; | |
398 | + if (StringUtils.isNotEmpty(mergeShipmentHeaderList.get(0).getZoneCode())) { | |
399 | + Zone zone = zoneService.getZoneByCode(mergeShipmentHeaderList.get(0).getZoneCode(), mergeShipmentHeaderList.get(0).getWarehouseCode()); | |
400 | + if (zone == null) { | |
401 | + return Result.error("出库单下发, 没有找到库区"); | |
402 | + } | |
403 | + zoneType = zone.getType(); | |
404 | + } | |
405 | + | |
387 | 406 | ShipmentHeader mergeShipmentHeader = new ShipmentHeader(); |
388 | 407 | mergeShipmentHeader.setZoneCode(mergeShipmentHeaderList.get(0).getZoneCode()); |
389 | 408 | mergeShipmentHeader.setCode(this.createCode(mergeShipmentHeaderList.get(0).getType())); |
... | ... | @@ -616,13 +635,62 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
616 | 635 | |
617 | 636 | @Override |
618 | 637 | @Transactional(rollbackFor = Exception.class) |
638 | + public Result autoFlatShipmentAdvice(String shipmentCode, String warehouseCode) { | |
639 | + if (StringUtils.isEmpty(shipmentCode)) { | |
640 | + return Result.error("自动预配盘出库, 出库单编码为空"); | |
641 | + } | |
642 | + if (StringUtils.isEmpty(warehouseCode)) { | |
643 | + return Result.error("自动预配盘出库, 仓库编码为空"); | |
644 | + } | |
645 | + ShipmentHeader shipmentHeader = shipmentHeaderService.getShipmentHeaderByCode(shipmentCode, warehouseCode); | |
646 | + if (shipmentHeader == null) { | |
647 | + throw new JeecgBootException("自动预配盘出库, 没有找到出库单"); | |
648 | + } | |
649 | + String zoneCode = shipmentHeader.getZoneCode(); | |
650 | + if (StringUtils.isEmpty(zoneCode)) { | |
651 | + throw new JeecgBootException("自动预配盘出库, 库区编码为空"); | |
652 | + } | |
653 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | |
654 | + if (zone == null) { | |
655 | + throw new JeecgBootException("自动预配盘出库, 库区为空"); | |
656 | + } | |
657 | + String zoneType = zone.getType(); | |
658 | + if (StringUtils.isEmpty(zoneType)) { | |
659 | + throw new JeecgBootException("自动预配盘出库, 库区类型编码为空"); | |
660 | + } | |
661 | + if (!zoneType.equals(QuantityConstant.ZONE_TYPE_FLAT)) { | |
662 | + throw new JeecgBootException("自动预配盘出库, 库区类型必须为平库区类型"); | |
663 | + } | |
664 | + Result result = shipmentCombinationService.autoCombination(shipmentCode, true, warehouseCode); | |
665 | + if (!result.isSuccess()) { | |
666 | + throw new JeecgBootException("自动预配盘出库," + result.getMessage()); | |
667 | + } | |
668 | + List<ShipmentContainerAdvice> shipmentContainerAdviceList = | |
669 | + shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentCode(shipmentCode, warehouseCode); | |
670 | + if (CollectionUtils.isEmpty(shipmentContainerAdviceList)) { | |
671 | + throw new JeecgBootException("自动预配盘出库, 没有找到出库配盘详情"); | |
672 | + } | |
673 | + return Result.OK("平库预配盘出库成功"); | |
674 | + } | |
675 | + | |
676 | + @Override | |
677 | + @Transactional(rollbackFor = Exception.class) | |
619 | 678 | public Result createShipment(WaveConfig waveConfig, List<WaveConfigDetail> waveConfigDetailList) { |
679 | + String zoneType = null; | |
680 | + if (StringUtils.isNotEmpty(waveConfig.getZoneCode())) { | |
681 | + Zone zone = zoneService.getZoneByCode(waveConfig.getZoneCode(), waveConfig.getWarehouseCode()); | |
682 | + if (zone == null) { | |
683 | + return Result.error("出库单下发, 没有找到库区"); | |
684 | + } | |
685 | + zoneType = zone.getType(); | |
686 | + } | |
620 | 687 | ShipmentHeader shipmentHeader = new ShipmentHeader(); |
621 | 688 | shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); |
622 | 689 | shipmentHeader.setWaveConfigId(waveConfig.getId()); |
623 | 690 | shipmentHeader.setCompanyCode(waveConfig.getCompanyCode()); |
624 | 691 | shipmentHeader.setWarehouseCode(waveConfig.getWarehouseCode()); |
625 | 692 | shipmentHeader.setZoneCode(waveConfig.getZoneCode()); |
693 | + shipmentHeader.setZoneType(zoneType); | |
626 | 694 | Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); |
627 | 695 | if (!result.isSuccess()) { |
628 | 696 | throw new JeecgBootException("创建出库单失败,波次ID:" + waveConfigDetailList.get(0).getId()); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -317,7 +317,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
317 | 317 | Location location = locationService.getNear(fromLocation); |
318 | 318 | String locationCode = location.getCode(); |
319 | 319 | if (StringUtils.isNotEmpty(location.getContainerCode())) { |
320 | - TaskHeader taskHeader = getUnCompleteTaskByFromLocationCode(locationCode, warehouseCode); | |
320 | + TaskHeader taskHeader = taskHeaderService.getUnCompleteTaskByFromLocationCode(locationCode, warehouseCode); | |
321 | 321 | if (taskHeader != null) { |
322 | 322 | preTaskNo = taskHeader.getId(); |
323 | 323 | } else { |
... | ... | @@ -3619,6 +3619,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3619 | 3619 | shipmentHeader.setType(receiptType); |
3620 | 3620 | shipmentHeader.setRemark(remark); |
3621 | 3621 | shipmentHeader.setZoneCode(zoneCode); |
3622 | + shipmentHeader.setZoneType(QuantityConstant.ZONE_TYPE_STEREOSCOPIC); | |
3622 | 3623 | Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); |
3623 | 3624 | if (!result.isSuccess()) { |
3624 | 3625 | throw new JeecgBootException("快速出库, 创建出库单头失败" + result.getMessage()); |
... | ... |
培训计划/WMS培训计划表.xls
0 → 100644
No preview for this file type
培训计划/WMS软件培训考核.docx
0 → 100644
No preview for this file type
培训计划/参加培训人员签到表.docx
0 → 100644
No preview for this file type