56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using System;
|
|
//using SystemFramework;
|
|
using MesServerWork;
|
|
|
|
namespace MesServerFunctions
|
|
{
|
|
partial class Functions_BASE_10
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
///扫描物料条码或批次号
|
|
/// </summary>
|
|
/// <param name="OpName"></param>
|
|
/// <param name="barcode"></param>
|
|
public void Barcode_Repair(string OpName, string QRcode)
|
|
{
|
|
try
|
|
{
|
|
string barcode = "";
|
|
string EngineType = "";
|
|
bool ispartload = false;
|
|
bool select_OK = false;
|
|
|
|
MIS_BASE.Read_PartLoad(OpName, out ispartload);
|
|
if (!ispartload)
|
|
{
|
|
AsyncSendMessage_Notice(OpName, "PLC未申请上线,请确认");
|
|
return;
|
|
}
|
|
//判断是否是返修上线条码
|
|
select_OK = SelectRepairBarcode(OpName, QRcode, out barcode, out EngineType);
|
|
if (barcode.Length < 5 || !select_OK)
|
|
{
|
|
AsyncSendMessage_Notice(OpName, "条码无效,请确认");
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
//显示该总成各个工位的质量数据
|
|
SendInfomation("RepairQuality", barcode, OpName);
|
|
|
|
//向前端发送查询后的barcode
|
|
SendInfomation("SelectBarcode", barcode, OpName);
|
|
}
|
|
}
|
|
catch (Exception err)
|
|
{
|
|
////ApplicationLog.WriteLog(err, "Function10:Barcode_Repair");
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|