Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zhou-hongcheng
2026-03-03 11:20:44 +08:00
8 changed files with 52 additions and 19 deletions
@@ -176,6 +176,9 @@ public class HandoverTaskOrderDomainService {
String orderNumber = handoverTaskOrder.getOrderNumber();
StockOutOrder stockOutOrder = stockOutOrderMapper.selectOne(new QueryWrapper<StockOutOrder>().lambda()
.eq(StockOutOrder::getOutOrderNumber, orderNumber));
//完成交接状态改为已出库
stockOutOrder.setStatus(9);
stockOutOrderMapper.updateById(stockOutOrder);
List<OutMaterialDetail> outMaterialDetailList = outMaterialDetailMapper.selectList(new QueryWrapper<OutMaterialDetail>().lambda()
.eq(OutMaterialDetail::getOutOrderNumber, orderNumber));
for (OutMaterialDetail outMaterialDetail : outMaterialDetailList) {
@@ -238,6 +241,8 @@ public class HandoverTaskOrderDomainService {
//库存调整记录
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setAdjustAction("出库");
inventoryAdjustmentRecord.setRelateNo(orderNumber);
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
@@ -266,7 +271,7 @@ public class HandoverTaskOrderDomainService {
inventoryAdjustmentRecord.setStorageSectionId(materialInventoryPO.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventoryPO.getStorageLocationId());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventoryPO.getAllocationQuantity());
inventoryAdjustmentRecord.setAllocationBeforeQuantity(materialInventoryPO.getAllocationQuantity());
@@ -275,7 +280,7 @@ public class HandoverTaskOrderDomainService {
inventoryAdjustmentRecord.setInventoryBeforeQuantity(oldInventoryQuantity);
inventoryAdjustmentRecord.setInventoryAfterQuantity(newInventoryQuantity);
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
@@ -148,5 +148,12 @@ public class InventoryAdjustmentRecord extends BaseVOEntity {
@Excel(name = "调整后冻结数量")
private BigDecimal freezeAfterQuantity;
@ApiModelProperty("调整动作")
@Excel(name = "调整动作")
private String adjustAction;
}
@ApiModelProperty("关联单号")
@Excel(name = "关联单号")
private String relateNo;
}
@@ -205,5 +205,11 @@ public class InventoryAdjustmentRecordPO extends BaseVOEntity {
@ApiModelProperty("物料更多属性列表(批次属性)")
private List<MaterialMoreDetailPO> materialMoreDetailList;
@ApiModelProperty("调整动作")
@Excel(name = "调整动作")
private String adjustAction;
@ApiModelProperty("关联单号")
@Excel(name = "关联单号")
private String relateNo;
}
@@ -163,4 +163,12 @@ public class InventoryAdjustmentRecordDO extends BaseVOEntity {
@ApiModelProperty(name = "权限菜单ID")
private Long permissionMenuId;
}
@ApiModelProperty("调整动作")
@Excel(name = "调整动作")
private String adjustAction;
@ApiModelProperty("关联单号")
@Excel(name = "关联单号")
private String relateNo;
}
@@ -454,6 +454,8 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
//库存调整记录
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setAdjustAction("分配库存");
inventoryAdjustmentRecord.setRelateNo(outOrderNumber);
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
@@ -482,7 +484,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setStorageSectionId(materialInventoryPO.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventoryPO.getStorageLocationId());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(newAllocationQuantity);
inventoryAdjustmentRecord.setAllocationBeforeQuantity(oldAllocationQuantity);
@@ -491,7 +493,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
@@ -537,6 +539,8 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
//库存调整记录
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setAdjustAction("分配库存");
inventoryAdjustmentRecord.setRelateNo(outOrderNumber);
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
@@ -565,7 +569,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setStorageSectionId(materialInventoryPO.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventoryPO.getStorageLocationId());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(newAllocationQuantity);
inventoryAdjustmentRecord.setAllocationBeforeQuantity(oldAllocationQuantity);
@@ -573,9 +577,6 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setFreezeAfterQuantity(newFreezeQuantity);
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
Long uniqueId = outMaterialDetail.getUniqueId();
@@ -773,6 +774,8 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
//库存调整记录
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setAdjustAction("分配库存");
inventoryAdjustmentRecord.setRelateNo(outOrderNumber);
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
@@ -801,7 +804,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setStorageSectionId(materialInventoryPO.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventoryPO.getStorageLocationId());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(newAllocationQuantity);
inventoryAdjustmentRecord.setAllocationBeforeQuantity(oldAllocationQuantity);
@@ -810,7 +813,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
@@ -847,6 +850,8 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
//库存调整记录
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setAdjustAction("分配库存");
inventoryAdjustmentRecord.setRelateNo(outOrderNumber);
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
@@ -875,7 +880,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setStorageSectionId(materialInventoryPO.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventoryPO.getStorageLocationId());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(newAllocationQuantity);
inventoryAdjustmentRecord.setAllocationBeforeQuantity(oldAllocationQuantity);
@@ -884,7 +889,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
inventoryAdjustmentRecord.setInventoryBeforeQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventoryPO.getInventoryQuantity());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
}
@@ -50,8 +50,8 @@ public class StockOutOrder extends BaseVOEntity {
@Excel(name = "出库单号")
private String outOrderNumber;
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭")
@Excel(name = "出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭")
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核")
@Excel(name = "出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核")
private Integer status;
@ApiModelProperty("出库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
@@ -1211,7 +1211,7 @@ public class StockOutOrderDomainService {
}
LoginUser loginUser = SecurityUtils.getLoginUser();
stockOutOrderService.update(null, new UpdateWrapper<StockOutOrder>().lambda()
.set(StockOutOrder::getStatus, 9)
.set(StockOutOrder::getStatus, 12)
.set(StockOutOrder::getCheckStatus, 3)
.set(StockOutOrder::getUpdateBy, loginUser.getUserid())
.set(StockOutOrder::getUpdateByName, loginUser.getUsername())
@@ -699,6 +699,8 @@ public class StockShelfOrderDomainService {
//库存调整记录
InventoryAdjustmentRecord inventoryAdjustmentRecord = new InventoryAdjustmentRecord();
inventoryAdjustmentRecord.setAdjustAction("入库");
inventoryAdjustmentRecord.setRelateNo(stockReceiptOrderDO.getInOrderNumber());
inventoryAdjustmentRecord.setAdjustAfterStatusCode("he_ge");
// inventoryAdjustmentRecord.setAdjustBeforeStatusCode("he_ge");
inventoryAdjustmentRecord.setAdjustAfterStatusName("合格");
@@ -727,7 +729,7 @@ public class StockShelfOrderDomainService {
inventoryAdjustmentRecord.setStorageSectionId(materialInventory.getStorageSectionId());
inventoryAdjustmentRecord.setStorageLocationId(materialInventory.getStorageLocationId());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecord.setAllocationAfterQuantity(materialInventory.getAllocationQuantity());
inventoryAdjustmentRecord.setAllocationBeforeQuantity(BigDecimal.ZERO);
@@ -736,7 +738,7 @@ public class StockShelfOrderDomainService {
inventoryAdjustmentRecord.setInventoryBeforeQuantity(BigDecimal.ZERO);
inventoryAdjustmentRecord.setInventoryAfterQuantity(materialInventory.getInventoryQuantity());
inventoryAdjustmentRecord.setCreateBy(loginUser.getUserid());
inventoryAdjustmentRecord.setCreateByName(loginUser.getUsername());
inventoryAdjustmentRecord.setCreateByName(loginUser.getRealname());
inventoryAdjustmentRecord.setCreateTime(new Date());
inventoryAdjustmentRecordMapper.insert(inventoryAdjustmentRecord);
} else if (materialInventoryPOS.size() == 1) {