feat: 增加LG-AGV接口并完善物料校验与报工逻辑
This commit is contained in:
@@ -24,6 +24,17 @@ namespace WebApi
|
||||
{
|
||||
public class CALL_Inerface_DataHandle
|
||||
{
|
||||
private static bool TryCheckProcessReportAllowed(string opName, string engineID, string orderForm, string reqType)
|
||||
{
|
||||
DataTable isSendDT = MisDataFun.IOT_ReqData_UpLoad_IsSend(opName, orderForm, reqType, engineID);
|
||||
if (isSendDT.Rows[0]["result"].ToString() != "1")
|
||||
{
|
||||
SaveMesLog($"工序{reqType}", isSendDT.Rows[0]["msg"].ToString(), MesLogType.ERROR);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开工(工序)
|
||||
/// </summary>
|
||||
@@ -32,10 +43,8 @@ namespace WebApi
|
||||
/// <param name="OrderForm"></param>
|
||||
public static void CALL_Inerface_JobStart(string OpName, string EngineID, string OrderForm)
|
||||
{
|
||||
DataTable IsSendDT = MisDataFun.IOT_ReqData_UpLoad_IsSend(OpName, OrderForm, "完工");
|
||||
if (IsSendDT.Rows[0]["result"].ToString() != "1")
|
||||
if (!TryCheckProcessReportAllowed(OpName, EngineID, OrderForm, "开工"))
|
||||
{
|
||||
SaveMesLog("工序完工", IsSendDT.Rows[0]["msg"].ToString(), MesLogType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -101,10 +110,8 @@ namespace WebApi
|
||||
/// <param name="OrderForm"></param>
|
||||
public static void CALL_Inerface_JobFinished(string OpName, string EngineID, string OrderForm)
|
||||
{
|
||||
DataTable IsSendDT = MisDataFun.IOT_ReqData_UpLoad_IsSend(OpName, OrderForm, "完工");
|
||||
if (IsSendDT.Rows[0]["result"].ToString() != "1")
|
||||
if (!TryCheckProcessReportAllowed(OpName, EngineID, OrderForm, "完工"))
|
||||
{
|
||||
SaveMesLog("工序完工", IsSendDT.Rows[0]["msg"].ToString(), MesLogType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user