|
|
@ -77,21 +77,21 @@ public class InjectionMoldingRequestReader : IReader |
|
|
|
if (count == 0) |
|
|
|
{ |
|
|
|
// 调用 ReaderCameraApi 方法获取摄像头信息
|
|
|
|
//string camera = await ReaderCameraApi().ConfigureAwait(false);
|
|
|
|
//List<InjectionRequest> cameraList = new List<InjectionRequest>();
|
|
|
|
//if (camera == "Error occured")
|
|
|
|
//{
|
|
|
|
// // 记录错误日志并返回空列表
|
|
|
|
// _logger.LogInformation($"没有读取到摄像头信息{DateTime.Now},请检查网络");
|
|
|
|
// return new List<IncomingFromExternal>();
|
|
|
|
//}
|
|
|
|
////将摄像头信息转换为注塑叫料明细任务数据
|
|
|
|
//cameraList = System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(camera);
|
|
|
|
//测试数据
|
|
|
|
var cameraList = new List<InjectionIssueRequest>() |
|
|
|
string camera = await ReaderCameraApi().ConfigureAwait(false); |
|
|
|
List<InjectionRequest> cameraList = new List<InjectionRequest>(); |
|
|
|
if (camera == "Error occured") |
|
|
|
{ |
|
|
|
new InjectionIssueRequest() { ItemCode = "THILDD0A542AG", ToLocCode = "ZSXB2", Qty = 100 }, |
|
|
|
}; |
|
|
|
// 记录错误日志并返回空列表
|
|
|
|
_logger.LogInformation($"没有读取到摄像头信息{DateTime.Now},请检查网络"); |
|
|
|
return new List<IncomingFromExternal>(); |
|
|
|
} |
|
|
|
//将摄像头信息转换为注塑叫料明细任务数据
|
|
|
|
cameraList = System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(camera); |
|
|
|
//测试数据
|
|
|
|
//var cameraList = new List<InjectionRequest>()
|
|
|
|
//{
|
|
|
|
// new InjectionRequest() { ItemCode = "THILDD0A542AG", ToLocCode = "ZSXB2", Qty = 100 },
|
|
|
|
// };
|
|
|
|
InjectionIssueRequestEditInput input = new InjectionIssueRequestEditInput(); |
|
|
|
input.Worker = "Vision"; |
|
|
|
input.Type = "Vision"; |
|
|
@ -220,11 +220,11 @@ public class InjectionMoldingRequestReader : IReader |
|
|
|
return "Error occurred"; |
|
|
|
} |
|
|
|
|
|
|
|
private List<InjectionIssueRequest> Parse(string p_str) |
|
|
|
private List<InjectionRequest> Parse(string p_str) |
|
|
|
{ |
|
|
|
List<InjectionIssueRequest> requests = new List<InjectionIssueRequest>(); |
|
|
|
List<InjectionRequest> requests = new List<InjectionRequest>(); |
|
|
|
|
|
|
|
return System.Text.Json.JsonSerializer.Deserialize<List<InjectionIssueRequest>>(p_str); |
|
|
|
return System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(p_str); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -234,7 +234,7 @@ public class InjectionMoldingRequestReader : IReader |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class InjectionIssueRequest |
|
|
|
public class InjectionRequest |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// 零件M
|
|
|
|