bug-1510 发货管理-条码打印-物料码打印
This commit is contained in:
parent
b15b3cb55b
commit
9a54619974
|
|
@ -62,7 +62,7 @@ public class WmsShipmentMaterialCode implements Serializable {
|
|||
private String orderDate;
|
||||
|
||||
/**
|
||||
* 状态,0:未开始;1:打包中;2:已完成
|
||||
* 状态,0:未装货;1:已装货;2:已装车;3:已发车;4:已收货
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
|
|
|||
|
|
@ -719,12 +719,24 @@ public class MaterialCodeController extends BaseController {
|
|||
WmsShipmentPackagingCode info = packagingCodeService.getById(qo.getPackagingCodeId());
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(info)).throwMessage("包装箱不存在");
|
||||
VUtil.trueThrowBusinessError(info.getStatus() > 1).throwMessage("包装箱已装车");
|
||||
Set<Long> materialCodeIds = materialCodeForwardService.lambdaQuery()
|
||||
.select(WmsShipmentMaterialCodeForward::getMaterialCodeId)
|
||||
.in(WmsShipmentMaterialCodeForward::getId, qo.getIds())
|
||||
.list()
|
||||
.stream()
|
||||
.map(WmsShipmentMaterialCodeForward::getMaterialCodeId)
|
||||
.collect(Collectors.toSet());
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(materialCodeIds)).throwMessage("没有需要装箱的数据");
|
||||
materialCodeForwardService.lambdaUpdate()
|
||||
.set(WmsShipmentMaterialCodeForward::getStatus, 2)
|
||||
.set(WmsShipmentMaterialCodeForward::getPackagingCodeId, qo.getPackagingCodeId())
|
||||
.isNull(WmsShipmentMaterialCodeForward::getPackagingCodeId)
|
||||
.in(WmsShipmentMaterialCodeForward::getId, qo.getIds())
|
||||
.update();
|
||||
materialCodeService.lambdaUpdate()
|
||||
.set(WmsShipmentMaterialCode::getStatus,2)
|
||||
.in(WmsShipmentMaterialCode::getId, materialCodeIds)
|
||||
.update();
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ public class PackagingCodeController extends BaseController {
|
|||
@Resource
|
||||
private IDictionaryItemService dictionaryItemService;
|
||||
|
||||
@Resource
|
||||
private IWmsShipmentMaterialCodeService materialCodeService;
|
||||
|
||||
@Resource
|
||||
private BasdeSerialNumberControllerService serialNumberControllerService;
|
||||
|
||||
|
|
@ -225,6 +228,20 @@ public class PackagingCodeController extends BaseController {
|
|||
materialCodeItemQrService.updateBatchById(itemQrs);
|
||||
materialCodeItemService.updateStatusAndBoxNoAndActualNum(items, 2, info.getNo(), null, itemId2ActualNumMap);
|
||||
|
||||
// 更新WmsShipmentMaterialCode状态为1(已装货)
|
||||
Set<Long> materialCodeIds = items.stream()
|
||||
.map(WmsShipmentMaterialCodeItem::getMaterialCodeId)
|
||||
.collect(Collectors.toSet());
|
||||
if (CollectionUtil.isNotEmpty(materialCodeIds)) {
|
||||
materialCodeService.lambdaUpdate()
|
||||
.set(WmsShipmentMaterialCode::getStatus, 1)
|
||||
.set(WmsShipmentMaterialCode::getUpdateBy, UserUtil.getUserName())
|
||||
.set(WmsShipmentMaterialCode::getUpdateTime, LocalDateTime.now())
|
||||
.in(WmsShipmentMaterialCode::getId, materialCodeIds)
|
||||
.eq(WmsShipmentMaterialCode::getStatus, 0)
|
||||
.update();
|
||||
}
|
||||
|
||||
addMaterialCodeItemIfNumBigThenActualNum(materialCodeItemKey2NewActualNumMap, items);
|
||||
}
|
||||
return ApiResult.success();
|
||||
|
|
@ -361,6 +378,21 @@ public class PackagingCodeController extends BaseController {
|
|||
);
|
||||
materialCodeItemQrService.updateBatchById(itemQrs);
|
||||
materialCodeItemService.updateStatusAndBoxNoAndActualNum(items, 2, info.getNo(),null, itemId2ActualNumMap);
|
||||
|
||||
// 更新WmsShipmentMaterialCode状态为1(已装货)
|
||||
Set<Long> materialCodeIds = items.stream()
|
||||
.map(WmsShipmentMaterialCodeItem::getMaterialCodeId)
|
||||
.collect(Collectors.toSet());
|
||||
if (CollectionUtil.isNotEmpty(materialCodeIds)) {
|
||||
materialCodeService.lambdaUpdate()
|
||||
.set(WmsShipmentMaterialCode::getStatus, 1)
|
||||
.set(WmsShipmentMaterialCode::getUpdateBy, UserUtil.getUserName())
|
||||
.set(WmsShipmentMaterialCode::getUpdateTime, LocalDateTime.now())
|
||||
.in(WmsShipmentMaterialCode::getId, materialCodeIds)
|
||||
.eq(WmsShipmentMaterialCode::getStatus, 0)
|
||||
.update();
|
||||
}
|
||||
|
||||
addMaterialCodeItemIfNumBigThenActualNum(materialCodeItemKey2NewActualNumMap, items);
|
||||
|
||||
return ApiResult.success();
|
||||
|
|
|
|||
Loading…
Reference in New Issue