|
|
|
@ -87,8 +87,9 @@ public class WmsOutstockOrderServiceImpl implements IWmsOutstockOrderService {
|
|
|
|
.select(BaseMaterialCategory::getMaterialCategoryName)
|
|
|
|
.select(BaseMaterialCategory::getMaterialCategoryName)
|
|
|
|
.leftJoin(BaseMaterialCategory.class, BaseMaterialCategory::getMaterialCategoryId, WmsOutstockOrder::getMaterialCategoryId)
|
|
|
|
.leftJoin(BaseMaterialCategory.class, BaseMaterialCategory::getMaterialCategoryId, WmsOutstockOrder::getMaterialCategoryId)
|
|
|
|
|
|
|
|
|
|
|
|
.select(WmsBaseWarehouse::getWarehouseCode)
|
|
|
|
.select(WmsBaseWarehouse::getWarehouseCode, WmsBaseWarehouse::getWarehouseName)
|
|
|
|
.leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsOutstockOrder::getWarehouseId);
|
|
|
|
.leftJoin(WmsBaseWarehouse.class, WmsBaseWarehouse::getWarehouseId, WmsOutstockOrder::getWarehouseId);
|
|
|
|
|
|
|
|
|
|
|
|
lqw.eq(bo.getOutstockId() != null, WmsOutstockOrder::getOutstockId, bo.getOutstockId());
|
|
|
|
lqw.eq(bo.getOutstockId() != null, WmsOutstockOrder::getOutstockId, bo.getOutstockId());
|
|
|
|
lqw.eq(bo.getWarehouseId() != null, WmsOutstockOrder::getWarehouseId, bo.getWarehouseId());
|
|
|
|
lqw.eq(bo.getWarehouseId() != null, WmsOutstockOrder::getWarehouseId, bo.getWarehouseId());
|
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getOutstockCode()), WmsOutstockOrder::getOutstockCode, bo.getOutstockCode());
|
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getOutstockCode()), WmsOutstockOrder::getOutstockCode, bo.getOutstockCode());
|
|
|
|
@ -100,7 +101,7 @@ public class WmsOutstockOrderServiceImpl implements IWmsOutstockOrderService {
|
|
|
|
lqw.eq(bo.getAuditTime() != null, WmsOutstockOrder::getAuditTime, bo.getAuditTime());
|
|
|
|
lqw.eq(bo.getAuditTime() != null, WmsOutstockOrder::getAuditTime, bo.getAuditTime());
|
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), WmsOutstockOrder::getAuditStatus, bo.getAuditStatus());
|
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), WmsOutstockOrder::getAuditStatus, bo.getAuditStatus());
|
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditComments()), WmsOutstockOrder::getAuditComments, bo.getAuditComments())
|
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditComments()), WmsOutstockOrder::getAuditComments, bo.getAuditComments())
|
|
|
|
.orderByAsc(WmsOutstockOrder::getCreateTime);
|
|
|
|
.orderByDesc(WmsOutstockOrder::getCreateTime);
|
|
|
|
return lqw;
|
|
|
|
return lqw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -209,6 +210,20 @@ public class WmsOutstockOrderServiceImpl implements IWmsOutstockOrderService {
|
|
|
|
if (flag) {
|
|
|
|
if (flag) {
|
|
|
|
bo.setOutstockId(add.getOutstockId());
|
|
|
|
bo.setOutstockId(add.getOutstockId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理子表数据:设置outstockCode和outstockId
|
|
|
|
|
|
|
|
if (bo.getDetailList() != null && !bo.getDetailList().isEmpty()) {
|
|
|
|
|
|
|
|
bo.getDetailList().forEach(detail -> {
|
|
|
|
|
|
|
|
detail.setOutstockCode(outStockOrder);
|
|
|
|
|
|
|
|
detail.setOutstockId(add.getOutstockId());
|
|
|
|
|
|
|
|
// 如果前端没有传递materialCategoryId,使用主表的
|
|
|
|
|
|
|
|
if (detail.getMaterialCategoryId() == null) {
|
|
|
|
|
|
|
|
detail.setMaterialCategoryId(add.getMaterialCategoryId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
wmsOutstockDetailService.insertByBo(bo.getDetailList());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 根据出库单号查询最新出库单信息
|
|
|
|
// 根据出库单号查询最新出库单信息
|
|
|
|
LambdaQueryWrapper<WmsOutstockOrder> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
LambdaQueryWrapper<WmsOutstockOrder> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
wrapper.eq(WmsOutstockOrder::getOutstockCode, outStockOrder);
|
|
|
|
wrapper.eq(WmsOutstockOrder::getOutstockCode, outStockOrder);
|
|
|
|
|