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

@ -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;

@ -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);
/**

@ -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));

@ -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+"]的库存");
}

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

Loading…
Cancel
Save