WMS:PDA接口原材料退库完善
master
xins 8 months ago
parent 21db948cfc
commit cd7e92c428

@ -293,6 +293,10 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService {
throw new ServiceException("审核未通过,不能出库"); throw new ServiceException("审核未通过,不能出库");
} }
if (wmsRawReturn.getExecuteStatus().equals(WmsConstants.WMS_EXECUTE_STATUS_FINISH)) {
throw new ServiceException("已经退库完成,无需再退库");
}
String batchFlag = mesBaseBarcodeInfo.getBatchFlag(); String batchFlag = mesBaseBarcodeInfo.getBatchFlag();
if (!batchFlag.equals(MesConstants.IS_BATCH)) { if (!batchFlag.equals(MesConstants.IS_BATCH)) {
@ -323,6 +327,15 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService {
throw new ServiceException("退库数量不能大于" + planAmount); throw new ServiceException("退库数量不能大于" + planAmount);
} }
WmsRawReturnDetail queryRawReturnDetail = new WmsRawReturnDetail();
queryRawReturnDetail.setRawReturnId(rawReturnId);
queryRawReturnDetail.setMaterialBarcode(materialBarcode);
List<WmsRawReturnDetail> wmsRawReturnDetails = wmsRawReturnDetailMapper.selectWmsRawReturnDetailList(queryRawReturnDetail);
if (wmsRawReturnDetails != null && !wmsRawReturnDetails.isEmpty()) {
throw new ServiceException("已经退库,无需重复退库");
}
String executeStatus = ""; String executeStatus = "";
if (updatedReturnAmount.compareTo(planAmount) == 0) { if (updatedReturnAmount.compareTo(planAmount) == 0) {
executeStatus = WmsConstants.WMS_EXECUTE_STATUS_FINISH; executeStatus = WmsConstants.WMS_EXECUTE_STATUS_FINISH;

@ -162,6 +162,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="materialId != null">material_id = #{materialId},</if> <if test="materialId != null">material_id = #{materialId},</if>
<if test="planAmount != null">plan_amount = #{planAmount},</if> <if test="planAmount != null">plan_amount = #{planAmount},</if>
<if test="returnAmount != null">return_amount = #{returnAmount},</if>
<if test="operationType != null">operation_type = #{operationType},</if> <if test="operationType != null">operation_type = #{operationType},</if>
<if test="taskType != null and taskType != ''">task_type = #{taskType},</if> <if test="taskType != null and taskType != ''">task_type = #{taskType},</if>
<if test="applyReason != null">apply_reason = #{applyReason},</if> <if test="applyReason != null">apply_reason = #{applyReason},</if>

Loading…
Cancel
Save