|
|
|
@ -293,6 +293,10 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService {
|
|
|
|
|
throw new ServiceException("审核未通过,不能出库");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (wmsRawReturn.getExecuteStatus().equals(WmsConstants.WMS_EXECUTE_STATUS_FINISH)) {
|
|
|
|
|
throw new ServiceException("已经退库完成,无需再退库");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String batchFlag = mesBaseBarcodeInfo.getBatchFlag();
|
|
|
|
|
|
|
|
|
|
if (!batchFlag.equals(MesConstants.IS_BATCH)) {
|
|
|
|
@ -323,6 +327,15 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService {
|
|
|
|
|
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 = "";
|
|
|
|
|
if (updatedReturnAmount.compareTo(planAmount) == 0) {
|
|
|
|
|
executeStatus = WmsConstants.WMS_EXECUTE_STATUS_FINISH;
|
|
|
|
|