仓库控制信息

This commit is contained in:
秦鸿展
2026-04-23 01:11:54 +08:00
parent 4ff74f3664
commit 40d63d6fd8
11 changed files with 52 additions and 22 deletions
@@ -671,7 +671,8 @@ public class ReservationStockInOrderDomainService {
MaterialWarehouseControlPO materialWarehouseControlPO = reservationStockInOrderMapper.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
//MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialWarehouseControlPO == null){
throw new ServiceException("物料仓库控制信息不存在");
// throw new ServiceException("物料仓库控制信息不存在");
materialWarehouseControlPO = new MaterialWarehouseControlPO();
}
inMaterialDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
inMaterialDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
@@ -686,7 +687,8 @@ public class ReservationStockInOrderDomainService {
MaterialGoodsRulePO materialGoodsRulePO = reservationStockInOrderMapper.getGoodsInfoByMaterialBaseInfoIds(inMaterialDetailDO.getMaterialBaseInfoId());
//MaterialGoodsRulePO materialGoodsRulePO = materialGoodsRuleService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialGoodsRulePO == null){
throw new ServiceException("物料商品规则信息不存在");
// throw new ServiceException("物料商品规则信息不存在");
materialGoodsRulePO =new MaterialGoodsRulePO();
}
inMaterialDetailDO.setDistributeRuleId(materialGoodsRulePO.getMaterialGoodsRuleId());
inMaterialDetailDO.setDistributeRuleCode(materialGoodsRulePO.getRuleCode());
@@ -584,9 +584,9 @@ public class ReviewOrderApplicationService {
taskOrderDO.setWarehouseId(reviewOrderPO.getWarehouseId());
taskOrderDO.setWarehouseCode(reviewOrderPO.getWarehouseCode());
taskOrderDO.setWarehouseName(reviewOrderPO.getWarehouseName());
// 货主与复核单客户一致(出库单货主可能与复核客户口径不同
taskOrderDO.setShipperId(reviewOrderPO.getCustomerId());
taskOrderDO.setShipperName(reviewOrderPO.getCustomerName());
// 货主与出库单/复核单主表货主一致(非客户
taskOrderDO.setShipperId(reviewOrderPO.getShipperId());
taskOrderDO.setShipperName(reviewOrderPO.getShipperName());
taskOrderDO.setOrderNumber(reviewOrderPO.getOutOrderNumber());
taskOrderDO.setPickingOrderNumber(reviewOrderPO.getReviewOrderNumber());
taskOrderDO.setSerialNumber(OrderSequence.getOrderCode("FHZYLS"));
@@ -3564,7 +3564,8 @@ public class StockReceiptOrderApplicationService {
//获取仓库控制信息
MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialWarehouseControlPO == null){
throw new ServiceException("物料仓库控制信息不存在");
// throw new ServiceException("物料仓库控制信息不存在");
materialWarehouseControlPO = new MaterialWarehouseControlPO();
}
receiptMaterialDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
receiptMaterialDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
@@ -3578,7 +3579,8 @@ public class StockReceiptOrderApplicationService {
//获取商品规则信息
MaterialGoodsRulePO materialGoodsRulePO = materialGoodsRuleService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialGoodsRulePO == null){
throw new ServiceException("物料商品规则信息不存在");
// throw new ServiceException("物料商品规则信息不存在");
materialGoodsRulePO =new MaterialGoodsRulePO();
}
receiptMaterialDetailDO.setDistributeRuleId(materialGoodsRulePO.getMaterialGoodsRuleId());
receiptMaterialDetailDO.setDistributeRuleCode(materialGoodsRulePO.getRuleCode());
@@ -359,7 +359,8 @@ public class MobilizeManageDomainService {
//获取仓库控制信息
MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialWarehouseControlPO == null){
throw new ServiceException("物料仓库控制信息不存在");
// throw new ServiceException("物料仓库控制信息不存在");
materialWarehouseControlPO = new MaterialWarehouseControlPO();
}
mobilizeManageDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
mobilizeManageDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
@@ -174,7 +174,8 @@ public class NoticeMaterialDetailImpl extends ServiceImpl<NoticeMaterialDetailMa
//获取仓库控制信息
MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialWarehouseControlPO == null){
throw new ServiceException("物料仓库控制信息不存在");
// throw new ServiceException("物料仓库控制信息不存在");
materialWarehouseControlPO = new MaterialWarehouseControlPO();
}
noticeMaterialDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
noticeMaterialDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
@@ -149,6 +149,9 @@ public class ReviewOrderDomainService {
header.setCustomerId(stockOutOrder.getCustomerId());
header.setCustomerCode(stockOutOrder.getCustomerCode());
header.setCustomerName(stockOutOrder.getCustomerName());
header.setShipperId(stockOutOrder.getShipperId());
header.setShipperCode(stockOutOrder.getShipperCode());
header.setShipperName(stockOutOrder.getShipperName());
header.setDelFlag(1);
String operatorDisplayName = resolveLoginDisplayName(loginUser);
header.setCreateBy(loginUser.getUserid());
@@ -185,8 +188,8 @@ public class ReviewOrderDomainService {
log.info("跳过生成复核单:拣货明细无已拣货数量>0 的行 outOrderNumber={}", outOrderNumber);
return;
}
// 复核也生成作业单同拣货作业单表结构用于作业任务跟踪
genStockOutTaskOrderForReview(header, loginUser, now);
// 复核也生成作业单同拣货作业单表结构用于作业任务跟踪货主须来自出库单不能误用客户字段
genStockOutTaskOrderForReview(header, stockOutOrder, loginUser, now);
StockOutOrder statusUpdate = new StockOutOrder();
statusUpdate.setStatus(8);
@@ -313,7 +316,7 @@ public class ReviewOrderDomainService {
/**
* 复核单生成后同步生成一张作业单到 stock_out_task_order结构与拣货作业单一致
*/
private void genStockOutTaskOrderForReview(ReviewOrder header, LoginUser loginUser, Date now) {
private void genStockOutTaskOrderForReview(ReviewOrder header, StockOutOrder stockOutOrder, LoginUser loginUser, Date now) {
if (header == null || header.getReviewOrderNumber() == null) {
return;
}
@@ -338,8 +341,8 @@ public class ReviewOrderDomainService {
taskDO.setWarehouseId(header.getWarehouseId());
taskDO.setWarehouseCode(header.getWarehouseCode());
taskDO.setWarehouseName(header.getWarehouseName());
taskDO.setShipperId(header.getCustomerId());
taskDO.setShipperName(header.getCustomerName());
taskDO.setShipperId(stockOutOrder != null ? stockOutOrder.getShipperId() : null);
taskDO.setShipperName(stockOutOrder != null ? stockOutOrder.getShipperName() : null);
taskDO.setOrderNumber(header.getOutOrderNumber());
taskDO.setPickingOrderNumber(header.getReviewOrderNumber());
taskDO.setSerialNumber(OrderSequence.getOrderCode("FHZYLS"));
@@ -50,6 +50,11 @@ public class ReviewOrder extends BaseVOEntity {
private String customerName;
/** 货主(与出库单 stock_out_order 一致;id 通常为用户中心 userId) */
private Long shipperId;
private String shipperCode;
private String shipperName;
private Date receiveTime;
private String remark;
@@ -67,6 +67,15 @@ public class ReviewOrderPO extends BaseVOEntity {
@ApiModelProperty("客户名称")
private String customerName;
@ApiModelProperty("货主ID")
private Long shipperId;
@ApiModelProperty("货主编码")
private String shipperCode;
@ApiModelProperty("货主名称")
private String shipperName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("下发确认时间(PDA 点击确定/接收的时间)")
@@ -243,13 +243,13 @@ public class ShiftManageImpl extends ServiceImpl<ShiftManageMapper, ShiftManage>
shiftMaterialDetailDO.setUnitName(packDetailFeignPO.getName());
shiftMaterialDetailDO.setUnitNumber(packDetailFeignPO.getNumber());
//获取仓库控制信息
MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialWarehouseControlPO == null){
throw new ServiceException("物料仓库控制信息不存在");
}
shiftMaterialDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
shiftMaterialDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
// //获取仓库控制信息
// MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
// if (materialWarehouseControlPO == null){
// throw new ServiceException("物料仓库控制信息不存在");
// }
// shiftMaterialDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
// shiftMaterialDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
}
@@ -605,7 +605,8 @@ public class StockInOrderDomainService {
//获取商品规则信息
MaterialGoodsRulePO materialGoodsRulePO = materialGoodsRuleService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
if (materialGoodsRulePO == null){
throw new ServiceException("物料商品规则信息不存在");
// throw new ServiceException("物料商品规则信息不存在");
materialGoodsRulePO =new MaterialGoodsRulePO();
}
inMaterialDetailDO.setDistributeRuleId(materialGoodsRulePO.getMaterialGoodsRuleId());
inMaterialDetailDO.setDistributeRuleCode(materialGoodsRulePO.getRuleCode());
@@ -20,6 +20,9 @@
<result property="customerId" column="customer_id"/>
<result property="customerCode" column="customer_code"/>
<result property="customerName" column="customer_name"/>
<result property="shipperId" column="shipper_id"/>
<result property="shipperCode" column="shipper_code"/>
<result property="shipperName" column="shipper_name"/>
<result property="receiveTime" column="receive_time"/>
<result property="remark" column="remark"/>
<result property="createBy" column="create_by"/>
@@ -92,6 +95,9 @@
a.customer_id,
a.customer_code,
a.customer_name,
a.shipper_id,
a.shipper_code,
a.shipper_name,
a.receive_time,
a.remark,
a.create_by,