|
@@ -3,6 +3,8 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Threading.Tasks;
|
|
|
+using WCS.Core;
|
|
|
+using WCS.Entity.Protocol;
|
|
|
using WCS.Service.Entity;
|
|
|
using WCS.Service.Helpers;
|
|
|
|
|
@@ -90,7 +92,7 @@ namespace WCS.Service
|
|
|
throw new Exception(res.First().ResMessage);
|
|
|
}
|
|
|
|
|
|
- public static GetProductInfoResponse GetProductInfo(string barcode, string dev)
|
|
|
+ public static GetProductInfoResponse GetProductInfo(string barcode, string dev,bool isok = false)
|
|
|
{
|
|
|
var res = APICaller.CallApi<GetProductInfoResponse>(Url + "/api/Task/GetProductInfo", new GetProductInfoRequest
|
|
|
{
|
|
@@ -99,7 +101,34 @@ namespace WCS.Service
|
|
|
try
|
|
|
{
|
|
|
if (!res.ResType)
|
|
|
- throw new Exception(res.ResMessage);
|
|
|
+ if (res.ResMessage.Contains("请联系仓库"))
|
|
|
+ {
|
|
|
+ var tpType = res.Memo3;//
|
|
|
+ if (tpType == "1")//2195
|
|
|
+ {
|
|
|
+ var station_2195 = Device.Find("2195").Device<IStation521, IStation520>();
|
|
|
+ if (station_2195.Data.PH_STATUS && station_2195.Data.PH_STATUS2)
|
|
|
+ WMS.GetProductInfo(barcode, dev, true);
|
|
|
+ }
|
|
|
+ else if (tpType == "2")//2198 2192
|
|
|
+ {
|
|
|
+ var muTP = Device.Find("2192", "2198").Select(v => v.Device<IStation521, IStation520>());
|
|
|
+ if (muTP.Any(v => v.Data.PH_STATUS && v.Data.PH_STATUS2))
|
|
|
+ {
|
|
|
+ WMS.GetProductInfo(barcode, dev, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (tpType == "3")//2201
|
|
|
+ {
|
|
|
+ var station_2201 = Device.Find("2201").Device<IStation521, IStation520>();
|
|
|
+ if (station_2201.Data.PH_STATUS && station_2201.Data.PH_STATUS2)
|
|
|
+ WMS.GetProductInfo(barcode, dev, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ throw new Exception(res.ResMessage);
|
|
|
+ }
|
|
|
if (res.ChildContainerType <= 0 || res.ChildContainerType > 9)
|
|
|
throw new Exception("托盘类型错误");
|
|
|
if (res.LoadCount <= 0)
|