|
|
|
@ -309,11 +309,11 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
|
|
|
|
|
|
|
|
|
|
R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER);
|
|
|
|
|
if (baseBarcodeInfoR == null) {
|
|
|
|
|
throw new ServiceException("物料编码有误");
|
|
|
|
|
throw new ServiceException("物料条码有误");
|
|
|
|
|
}
|
|
|
|
|
MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData();
|
|
|
|
|
if (baseBarcodeInfo == null) {
|
|
|
|
|
throw new ServiceException("物料编码有误");
|
|
|
|
|
throw new ServiceException("物料条码有误");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String batchFlag = baseBarcodeInfo.getBatchFlag();
|
|
|
|
@ -333,23 +333,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
|
|
|
|
|
if (rawOutstockId != null) {
|
|
|
|
|
wmsRawOutstock = wmsRawOutstockMapper.selectWmsRawOutstockByRawOutstockId(rawOutstockId);
|
|
|
|
|
} else {
|
|
|
|
|
WmsRawOutstock queryRawOutstock = new WmsRawOutstock();
|
|
|
|
|
queryRawOutstock.setWarehouseId(baseLocation.getWarehouseId());
|
|
|
|
|
queryRawOutstock.setMaterialId(baseBarcodeInfo.getMaterialId());
|
|
|
|
|
queryRawOutstock.setExecuteStatusStr(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE + "," + WmsConstants.WMS_EXECUTE_STATUS_EXECUTING);
|
|
|
|
|
queryRawOutstock.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_PASS);
|
|
|
|
|
queryRawOutstock.setRawOutstockId(rawOutstockId);
|
|
|
|
|
|
|
|
|
|
List<WmsRawOutstock> wmsRawOutstocks = wmsRawOutstockMapper.selectWmsRawOutstockList(queryRawOutstock);
|
|
|
|
|
if (wmsRawOutstocks == null || wmsRawOutstocks.isEmpty()) {
|
|
|
|
|
throw new ServiceException("无此出库任务");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (wmsRawOutstocks.size() > 1) {
|
|
|
|
|
throw new ServiceException("请选择具体出库任务后点击确认");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
wmsRawOutstock = wmsRawOutstocks.get(0);
|
|
|
|
|
wmsRawOutstock = this.getWmsRawOutstock(baseLocation,baseBarcodeInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -403,6 +387,28 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public WmsRawOutstock getWmsRawOutstock(WmsBaseLocation baseLocation,MesBaseBarcodeInfo baseBarcodeInfo){
|
|
|
|
|
WmsRawOutstock queryRawOutstock = new WmsRawOutstock();
|
|
|
|
|
queryRawOutstock.setWarehouseId(baseLocation.getWarehouseId());
|
|
|
|
|
queryRawOutstock.setMaterialId(baseBarcodeInfo.getMaterialId());
|
|
|
|
|
queryRawOutstock.setExecuteStatusStr(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE + "," + WmsConstants.WMS_EXECUTE_STATUS_EXECUTING);
|
|
|
|
|
queryRawOutstock.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_PASS);
|
|
|
|
|
|
|
|
|
|
List<WmsRawOutstock> wmsRawOutstocks = wmsRawOutstockMapper.selectWmsRawOutstockList(queryRawOutstock);
|
|
|
|
|
if (wmsRawOutstocks == null || wmsRawOutstocks.isEmpty()) {
|
|
|
|
|
throw new ServiceException("无此出库任务");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (wmsRawOutstocks.size() > 1) {
|
|
|
|
|
throw new ServiceException("请选择具体出库任务后点击确认");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WmsRawOutstock wmsRawOutstock = wmsRawOutstocks.get(0);
|
|
|
|
|
|
|
|
|
|
return wmsRawOutstock;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void insertRawOutstockDetail(WmsRawOutstock wmsRawOutstock, String locationCode, String materialBarcode, String batchCode,
|
|
|
|
|
String userName, Date currentDate) {
|
|
|
|
|
WmsRawOutstockDetail wmsRawOutstockDetail = new WmsRawOutstockDetail();
|
|
|
|
|