diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductStock.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductStock.java
index 2060d5fe..f64ce96d 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductStock.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/domain/WmsProductStock.java
@@ -57,6 +57,10 @@ public class WmsProductStock extends BaseEntity
@Excel(name = "计划明细编号,关联pd_base_plan_detail的plan_detail_code")
private String planDetailCode;
+ /**
+ * 销售订单编号
+ */
+ private String saleorderCode;
/** 总数量 */
@Excel(name = "总数量")
private BigDecimal totalAmount;
@@ -171,6 +175,14 @@ public class WmsProductStock extends BaseEntity
this.planDetailCode = planDetailCode;
}
+ public String getSaleorderCode() {
+ return saleorderCode;
+ }
+
+ public void setSaleorderCode(String saleorderCode) {
+ this.saleorderCode = saleorderCode;
+ }
+
public void setTotalAmount(BigDecimal totalAmount)
{
this.totalAmount = totalAmount;
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java
index 4080b468..89f9c9c1 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/mapper/WmsProductStockMapper.java
@@ -73,10 +73,11 @@ public interface WmsProductStockMapper
* 根据库位编码和入库批次号查询成品库存
* @param locationCode
* @param productBatch
+ * @param stockType
* @return WmsRawStock
*/
public WmsProductStock selectProductStockByLocationAndBatch(@Param("locationCode") String locationCode,
- @Param("productBatch") String productBatch);
+ @Param("productBatch") String productBatch,@Param("stockType") String stockType);
/**
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java
index 5503bf91..b531bf54 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsProductInstockServiceImpl.java
@@ -244,7 +244,7 @@ public class WmsProductInstockServiceImpl implements IWmsProductInstockService {
}
//如果是同一库位入同一批次,则更新数量
- WmsProductStock wmsProductStock = wmsProductStockMapper.selectProductStockByLocationAndBatch(locationCode, productBatch);
+ WmsProductStock wmsProductStock = wmsProductStockMapper.selectProductStockByLocationAndBatch(locationCode, productBatch,WmsConstants.PRODUCT_STOCK_STOCK_TYPE_PRODUCT);
if (wmsProductStock != null) {
// wmsProductStock.setQualityStatus(wmsRawInstockVo.getQualityStatus());
wmsProductStock.setTotalAmount(wmsProductStock.getTotalAmount().add(instockAmount));
diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransactionalServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransactionalServiceImpl.java
index b7a85a38..a05bdcd8 100644
--- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransactionalServiceImpl.java
+++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransactionalServiceImpl.java
@@ -43,7 +43,7 @@ public class WmsTransactionalServiceImpl implements IWmsTransactionalService {
BigDecimal applyQty = wmsTransfer.getApplyQty();
String productBatch = wmsTransfer.getProductBatch();
String oriLocationCode = wmsTransfer.getOriLocationCode();
- WmsProductStock wmsProductStock = wmsProductStockMapper.selectProductStockByLocationAndBatch(oriLocationCode, productBatch);
+ WmsProductStock wmsProductStock = wmsProductStockMapper.selectProductStockByLocationAndBatch(oriLocationCode, productBatch,WmsConstants.PRODUCT_STOCK_STOCK_TYPE_SEMI);
if (wmsProductStock == null) {
throw new ServiceException("库位["+oriLocationCode+"]没有此批次["+productBatch+"]的库存");
}
diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml
index 98cf8b98..537c18c7 100644
--- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml
+++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsProductStockMapper.xml
@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -68,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
product_id,
plan_code,
plan_detail_code,
+ saleorder_code,
total_amount,
frozen_amount,
occupy_amount,
@@ -87,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{productId},
#{planCode},
#{planDetailCode},
+ #{saleorderCode},
#{totalAmount},
#{frozenAmount},
#{occupyAmount},
@@ -110,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
product_id = #{productId},
plan_code = #{planCode},
plan_detail_code = #{planDetailCode},
+ saleorder_code = #{saleorderCode},
total_amount = #{totalAmount},
frozen_amount = #{frozenAmount},
occupy_amount = #{occupyAmount},
@@ -135,6 +139,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
+
+
+
+