Commit d31f9cfdd04a109b61c79aa1cc987e7743c86987
Merge remote-tracking branch 'origin/develop' into develop
Showing
5 changed files
with
32 additions
and
40 deletions
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
@@ -538,6 +538,7 @@ public class MobileBatchReceiptController { | @@ -538,6 +538,7 @@ public class MobileBatchReceiptController { | ||
538 | 538 | ||
539 | @PostMapping("/callBox") | 539 | @PostMapping("/callBox") |
540 | @ApiOperation("移动端呼叫料盒") | 540 | @ApiOperation("移动端呼叫料盒") |
541 | + @ApiLogger(apiName = "wcs调用wms分配库位", from = "WCS") | ||
541 | @Log(title = "移动端呼叫料盒", action = BusinessType.OTHER) | 542 | @Log(title = "移动端呼叫料盒", action = BusinessType.OTHER) |
542 | @Transactional(rollbackFor = Exception.class) | 543 | @Transactional(rollbackFor = Exception.class) |
543 | public AjaxResult callBox(@RequestBody @ApiParam(value = "物料号") Map<String, String> param) { | 544 | public AjaxResult callBox(@RequestBody @ApiParam(value = "物料号") Map<String, String> param) { |
src/main/java/com/huaheng/pc/receipt/receiptDetailHistory/controller/ReceiptDetailHistoryController.java
@@ -54,7 +54,7 @@ public class ReceiptDetailHistoryController extends BaseController { | @@ -54,7 +54,7 @@ public class ReceiptDetailHistoryController extends BaseController { | ||
54 | */ | 54 | */ |
55 | @ApiOperation(value = "查看入库详情", notes = "根据头表id获取入库单明细信息", httpMethod = "POST") | 55 | @ApiOperation(value = "查看入库详情", notes = "根据头表id获取入库单明细信息", httpMethod = "POST") |
56 | @RequiresPermissions("receipt:receiptDetail:list") | 56 | @RequiresPermissions("receipt:receiptDetail:list") |
57 | - @Log(title = "入库-入库单明细管理", operating = "查看入库单明细", action = BusinessType.GRANT) | 57 | + //@Log(title = "入库-入库单明细管理", operating = "查看入库单明细", action = BusinessType.GRANT) |
58 | @PostMapping("/list") | 58 | @PostMapping("/list") |
59 | @ResponseBody | 59 | @ResponseBody |
60 | public TableDataInfo list(@ApiParam(name = "receiptDetail", value = "入库详情") ReceiptDetailHistory receiptDetail, | 60 | public TableDataInfo list(@ApiParam(name = "receiptDetail", value = "入库详情") ReceiptDetailHistory receiptDetail, |
src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/controller/ReceiptHeaderHistoryController.java
@@ -126,7 +126,7 @@ public class ReceiptHeaderHistoryController extends BaseController { | @@ -126,7 +126,7 @@ public class ReceiptHeaderHistoryController extends BaseController { | ||
126 | */ | 126 | */ |
127 | @ApiOperation(value = "查询入库单 ", notes = "查询入库单 ", httpMethod = "POST") | 127 | @ApiOperation(value = "查询入库单 ", notes = "查询入库单 ", httpMethod = "POST") |
128 | @RequiresPermissions("receipt:receiptDetail:add") | 128 | @RequiresPermissions("receipt:receiptDetail:add") |
129 | - @Log(title = "入库-入库单 ", operating = "查询入库单 ", action = BusinessType.OTHER) | 129 | + //@Log(title = "入库-入库单 ", operating = "查询入库单 ", action = BusinessType.OTHER) |
130 | @PostMapping("/getReceiptHeader") | 130 | @PostMapping("/getReceiptHeader") |
131 | @ResponseBody | 131 | @ResponseBody |
132 | public AjaxResult<ReceiptHeaderHistory> getReceiptHeader(String id) { | 132 | public AjaxResult<ReceiptHeaderHistory> getReceiptHeader(String id) { |
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
@@ -565,7 +565,7 @@ public class ShipmentHeaderController extends BaseController { | @@ -565,7 +565,7 @@ public class ShipmentHeaderController extends BaseController { | ||
565 | * 查询波次列表 | 565 | * 查询波次列表 |
566 | */ | 566 | */ |
567 | @RequiresPermissions("shipment:bill:wave") | 567 | @RequiresPermissions("shipment:bill:wave") |
568 | - @Log(title = "出库-出库单", operating = "查询库区列表", action = BusinessType.GRANT) | 568 | + //@Log(title = "出库-出库单", operating = "查询库区列表", action = BusinessType.GRANT) |
569 | @PostMapping("/waveList") | 569 | @PostMapping("/waveList") |
570 | @ResponseBody | 570 | @ResponseBody |
571 | public TableDataInfo waveList() { | 571 | public TableDataInfo waveList() { |
src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java
@@ -331,46 +331,37 @@ public class ReceiptTaskService { | @@ -331,46 +331,37 @@ public class ReceiptTaskService { | ||
331 | inventoryHeader = inventoryHeaderService.getOne(new LambdaQueryWrapper<InventoryHeader>() | 331 | inventoryHeader = inventoryHeaderService.getOne(new LambdaQueryWrapper<InventoryHeader>() |
332 | .eq(InventoryHeader::getLocationCode, fromLocationCode) | 332 | .eq(InventoryHeader::getLocationCode, fromLocationCode) |
333 | .eq(InventoryHeader::getContainerCode, task.getContainerCode())); | 333 | .eq(InventoryHeader::getContainerCode, task.getContainerCode())); |
334 | - | ||
335 | - if (inventoryHeader == null) { | ||
336 | - throw new ServiceException("补充入库,原库位的库存查不到了:" + fromLocationCode + ",请检查库存," + task.getContainerCode()); | ||
337 | - } | ||
338 | - | ||
339 | - //修改库位状态和对应的容器 | ||
340 | - Location updateLocation = new Location(); | ||
341 | - updateLocation.setContainerCode(""); | ||
342 | - updateLocation.setWarehouseCode(warehouseCode); | ||
343 | - updateLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); | ||
344 | - LambdaUpdateWrapper<Location> locationLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | ||
345 | - locationLambdaUpdateWrapper.eq(Location::getCode, fromLocationCode); | ||
346 | - locationLambdaUpdateWrapper.eq(Location::getWarehouseCode, warehouseCode); | ||
347 | - if (!locationService.update(updateLocation, locationLambdaUpdateWrapper)) { | ||
348 | - throw new ServiceException("补充入库,更新库位失败"); | ||
349 | - } | ||
350 | - | ||
351 | - | ||
352 | - //解除右侧库位禁用和对应4个库位标记 | ||
353 | - Container container = containerService.getContainerByCode(task.getContainerCode()); | ||
354 | - locationService.unbanRightLocationAndUnmark(container.getContainerType(), fromLocationCode); | ||
355 | - | ||
356 | - Location toLocation = locationService.getLocationByCode(task.getToLocation()); | ||
357 | - inventoryHeader.setLocationCode(task.getToLocation()); | ||
358 | - if (!inventoryHeaderService.updateById(inventoryHeader)) { | ||
359 | - throw new ServiceException("补充入库,更新库存头表失败"); | ||
360 | - } | ||
361 | - | ||
362 | - List<InventoryDetail> inventoryDetails = inventoryDetailService.list(new LambdaQueryWrapper<InventoryDetail>().eq(InventoryDetail::getInventoryHeaderId, inventoryHeader.getId())); | ||
363 | - | ||
364 | - if (inventoryDetails != null && !inventoryDetails.isEmpty()) { | ||
365 | - for (InventoryDetail inventoryDetail : inventoryDetails) { | ||
366 | - inventoryDetail.setLocationCode(task.getToLocation()); | ||
367 | - inventoryDetail.setZoneCode(toLocation.getZoneCode()); | ||
368 | - if (!inventoryDetailService.updateById(inventoryDetail)) { | ||
369 | - throw new ServiceException("补充入库,更新库存明细失败"); | 334 | + if (inventoryHeader != null) { |
335 | + //修改库位状态和对应的容器 | ||
336 | + Location updateLocation = new Location(); | ||
337 | + updateLocation.setContainerCode(""); | ||
338 | + updateLocation.setWarehouseCode(warehouseCode); | ||
339 | + updateLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); | ||
340 | + LambdaUpdateWrapper<Location> locationLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | ||
341 | + locationLambdaUpdateWrapper.eq(Location::getCode, fromLocationCode); | ||
342 | + locationLambdaUpdateWrapper.eq(Location::getWarehouseCode, warehouseCode); | ||
343 | + if (!locationService.update(updateLocation, locationLambdaUpdateWrapper)) { | ||
344 | + throw new ServiceException("补充入库,更新库位失败"); | ||
345 | + } | ||
346 | + //解除右侧库位禁用和对应4个库位标记 | ||
347 | + Container container = containerService.getContainerByCode(task.getContainerCode()); | ||
348 | + locationService.unbanRightLocationAndUnmark(container.getContainerType(), fromLocationCode); | ||
349 | + Location toLocation = locationService.getLocationByCode(task.getToLocation()); | ||
350 | + inventoryHeader.setLocationCode(task.getToLocation()); | ||
351 | + if (!inventoryHeaderService.updateById(inventoryHeader)) { | ||
352 | + throw new ServiceException("补充入库,更新库存头表失败"); | ||
353 | + } | ||
354 | + List<InventoryDetail> inventoryDetails = inventoryDetailService.list(new LambdaQueryWrapper<InventoryDetail>().eq(InventoryDetail::getInventoryHeaderId, inventoryHeader.getId())); | ||
355 | + if (inventoryDetails != null && !inventoryDetails.isEmpty()) { | ||
356 | + for (InventoryDetail inventoryDetail : inventoryDetails) { | ||
357 | + inventoryDetail.setLocationCode(task.getToLocation()); | ||
358 | + inventoryDetail.setZoneCode(toLocation.getZoneCode()); | ||
359 | + if (!inventoryDetailService.updateById(inventoryDetail)) { | ||
360 | + throw new ServiceException("补充入库,更新库存明细失败"); | ||
361 | + } | ||
370 | } | 362 | } |
371 | } | 363 | } |
372 | } | 364 | } |
373 | - | ||
374 | } | 365 | } |
375 | if (StringUtils.isNull(inventoryHeader)) { | 366 | if (StringUtils.isNull(inventoryHeader)) { |
376 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | 367 | LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |