WMS:修改PDA接口:转库任务(半成品出半成品库入成品库)。
master
xins 2 years ago
parent d145ba3b34
commit 49843665fc

@ -57,6 +57,10 @@ public class WmsProductStock extends BaseEntity
@Excel(name = "计划明细编号,关联pd_base_plan_detail的plan_detail_code") @Excel(name = "计划明细编号,关联pd_base_plan_detail的plan_detail_code")
private String planDetailCode; private String planDetailCode;
/**
*
*/
private String saleorderCode;
/** 总数量 */ /** 总数量 */
@Excel(name = "总数量") @Excel(name = "总数量")
private BigDecimal totalAmount; private BigDecimal totalAmount;
@ -171,6 +175,14 @@ public class WmsProductStock extends BaseEntity
this.planDetailCode = planDetailCode; this.planDetailCode = planDetailCode;
} }
public String getSaleorderCode() {
return saleorderCode;
}
public void setSaleorderCode(String saleorderCode) {
this.saleorderCode = saleorderCode;
}
public void setTotalAmount(BigDecimal totalAmount) public void setTotalAmount(BigDecimal totalAmount)
{ {
this.totalAmount = totalAmount; this.totalAmount = totalAmount;

@ -73,10 +73,11 @@ public interface WmsProductStockMapper
* *
* @param locationCode * @param locationCode
* @param productBatch * @param productBatch
* @param stockType
* @return WmsRawStock * @return WmsRawStock
*/ */
public WmsProductStock selectProductStockByLocationAndBatch(@Param("locationCode") String locationCode, public WmsProductStock selectProductStockByLocationAndBatch(@Param("locationCode") String locationCode,
@Param("productBatch") String productBatch); @Param("productBatch") String productBatch,@Param("stockType") String stockType);
/** /**

@ -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) { if (wmsProductStock != null) {
// wmsProductStock.setQualityStatus(wmsRawInstockVo.getQualityStatus()); // wmsProductStock.setQualityStatus(wmsRawInstockVo.getQualityStatus());
wmsProductStock.setTotalAmount(wmsProductStock.getTotalAmount().add(instockAmount)); wmsProductStock.setTotalAmount(wmsProductStock.getTotalAmount().add(instockAmount));

@ -43,7 +43,7 @@ public class WmsTransactionalServiceImpl implements IWmsTransactionalService {
BigDecimal applyQty = wmsTransfer.getApplyQty(); BigDecimal applyQty = wmsTransfer.getApplyQty();
String productBatch = wmsTransfer.getProductBatch(); String productBatch = wmsTransfer.getProductBatch();
String oriLocationCode = wmsTransfer.getOriLocationCode(); 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) { if (wmsProductStock == null) {
throw new ServiceException("库位["+oriLocationCode+"]没有此批次["+productBatch+"]的库存"); throw new ServiceException("库位["+oriLocationCode+"]没有此批次["+productBatch+"]的库存");
} }

@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="productId" column="product_id" /> <result property="productId" column="product_id" />
<result property="planCode" column="plan_code" /> <result property="planCode" column="plan_code" />
<result property="planDetailCode" column="plan_detail_code" /> <result property="planDetailCode" column="plan_detail_code" />
<result property="saleorderCode" column="saleorder_code" />
<result property="totalAmount" column="total_amount" /> <result property="totalAmount" column="total_amount" />
<result property="frozenAmount" column="frozen_amount" /> <result property="frozenAmount" column="frozen_amount" />
<result property="occupyAmount" column="occupy_amount" /> <result property="occupyAmount" column="occupy_amount" />
@ -68,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productId != null">product_id,</if> <if test="productId != null">product_id,</if>
<if test="planCode != null">plan_code,</if> <if test="planCode != null">plan_code,</if>
<if test="planDetailCode != null">plan_detail_code,</if> <if test="planDetailCode != null">plan_detail_code,</if>
<if test="saleorderCode != null">saleorder_code,</if>
<if test="totalAmount != null">total_amount,</if> <if test="totalAmount != null">total_amount,</if>
<if test="frozenAmount != null">frozen_amount,</if> <if test="frozenAmount != null">frozen_amount,</if>
<if test="occupyAmount != null">occupy_amount,</if> <if test="occupyAmount != null">occupy_amount,</if>
@ -87,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productId != null">#{productId},</if> <if test="productId != null">#{productId},</if>
<if test="planCode != null">#{planCode},</if> <if test="planCode != null">#{planCode},</if>
<if test="planDetailCode != null">#{planDetailCode},</if> <if test="planDetailCode != null">#{planDetailCode},</if>
<if test="saleorderCode != null">#{saleorderCode},</if>
<if test="totalAmount != null">#{totalAmount},</if> <if test="totalAmount != null">#{totalAmount},</if>
<if test="frozenAmount != null">#{frozenAmount},</if> <if test="frozenAmount != null">#{frozenAmount},</if>
<if test="occupyAmount != null">#{occupyAmount},</if> <if test="occupyAmount != null">#{occupyAmount},</if>
@ -110,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productId != null">product_id = #{productId},</if> <if test="productId != null">product_id = #{productId},</if>
<if test="planCode != null">plan_code = #{planCode},</if> <if test="planCode != null">plan_code = #{planCode},</if>
<if test="planDetailCode != null">plan_detail_code = #{planDetailCode},</if> <if test="planDetailCode != null">plan_detail_code = #{planDetailCode},</if>
<if test="saleorderCode != null">saleorder_code = #{saleorderCode},</if>
<if test="totalAmount != null">total_amount = #{totalAmount},</if> <if test="totalAmount != null">total_amount = #{totalAmount},</if>
<if test="frozenAmount != null">frozen_amount = #{frozenAmount},</if> <if test="frozenAmount != null">frozen_amount = #{frozenAmount},</if>
<if test="occupyAmount != null">occupy_amount = #{occupyAmount},</if> <if test="occupyAmount != null">occupy_amount = #{occupyAmount},</if>
@ -135,6 +139,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<select id="getProductStockTotalAmount" resultType="BigDecimal" parameterType="WmsProductStock"> <select id="getProductStockTotalAmount" resultType="BigDecimal" parameterType="WmsProductStock">
select sum(total_amount) from wms_product_stock select sum(total_amount) from wms_product_stock
<where> <where>
@ -145,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectProductStockByLocationAndBatch" resultMap="WmsProductStockResult"> <select id="selectProductStockByLocationAndBatch" resultMap="WmsProductStockResult">
<include refid="selectWmsProductStockVo"/> <include refid="selectWmsProductStockVo"/>
where location_code = #{locationCode} and product_batch = #{productBatch} where location_code = #{locationCode} and product_batch = #{productBatch} and stock_type = #{stockType}
</select> </select>

Loading…
Cancel
Save