init: 导入项目到 meswork Gitea
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using bizFacade;
|
||||
using MesServerWork;
|
||||
//using SystemFramework;
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
partial class Functions_BASE_04
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化处理工序工步执行过程
|
||||
/// </summary>
|
||||
private void InitWorkStep(string OpName, int engineTypeID, string engineType, string engineID)
|
||||
{
|
||||
try
|
||||
{
|
||||
NextWorkStep(OpName, engineTypeID, engineType, engineID);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, err.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理工序工步执行过程下一步信息
|
||||
/// </summary>
|
||||
private void NextWorkStep(string OpName, int engineTypeID, string engineType, string engineID)
|
||||
{
|
||||
int workStepProperty = 512;
|
||||
|
||||
|
||||
if (MIS_BASE.hashtable_workStepProperty == null)
|
||||
{
|
||||
MIS_BASE.InitHashtable_MesServerCode();
|
||||
}
|
||||
//获取工步属性
|
||||
if (MIS_BASE.hashtable_workStepProperty.ContainsKey(OpName))
|
||||
{
|
||||
workStepProperty = Convert.ToInt32(MIS_BASE.hashtable_workStepProperty[OpName]);
|
||||
}
|
||||
|
||||
//16和64都表示分步保存质量数据(B6中并不是表示正常拧紧与返修拧紧的关系)
|
||||
if (workStepProperty == 16 || workStepProperty == 64)
|
||||
{
|
||||
int BoltCode = 0;
|
||||
int ProcessCode = 512;
|
||||
if (!GetShaftWoringStepIsWorked_WorkGroup(OpName, engineTypeID, engineType, out ProcessCode, out BoltCode,out workStepProperty))
|
||||
{
|
||||
//发动UDP,通知MES工作站拧紧第几组
|
||||
SendInfomation("FixAllowGuid", Convert.ToString(ProcessCode) + "&" + Convert.ToString(BoltCode), OpName);//显示拧紧标志
|
||||
|
||||
//写入拧紧顺序
|
||||
MIS_BASE.Write_ProcessCode(OpName, ProcessCode);
|
||||
//写入子程序(套筒号)
|
||||
MIS_BASE.Write_BoltCode(OpName, BoltCode);
|
||||
|
||||
//通知PLC允许工作
|
||||
MIS_BASE.Write_FixAllow(OpName, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//如果合格,在线,回写“合格放行”和“工作完成”信号(注意清零)
|
||||
MIS_BASE.Write_ConfirmOkGo(OpName, true);
|
||||
MIS_BASE.Write_FalseGO(OpName, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否还有需要拧紧的组号 ProcessCode=拧紧序号 BoltCode=套筒号
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
/// <param name="engineTypeID"></param>
|
||||
/// <param name="engineType"></param>
|
||||
/// <param name="ProcessCode">拧紧序号</param>
|
||||
/// <param name="BoltCode">套筒号</param>
|
||||
/// <returns></returns>
|
||||
private bool GetShaftWoringStepIsWorked_WorkGroup(string opName, int engineTypeID, string engineType, out int ProcessCode, out int BoltCode, out int workStepProperty)
|
||||
{
|
||||
ProcessCode = 0;
|
||||
BoltCode = 0;
|
||||
workStepProperty = 0;
|
||||
bool sn_WorkingStepIsOver = true;//是否完成拧紧
|
||||
|
||||
//电子看板_工位机型_质量数据测量位置_临时表_查询_完成情况
|
||||
BaseDataSystemMES.MesServer_ShaftPosition_Select_FinishResult(opName, out ProcessCode, out BoltCode, out workStepProperty, out sn_WorkingStepIsOver);
|
||||
if (MIS_BASE.hashtable_WorkGroupIndex == null)
|
||||
{
|
||||
MIS_BASE.InitHashtable_MesServerCode();
|
||||
}
|
||||
|
||||
//记录当前拧紧序号
|
||||
if (MIS_BASE.hashtable_WorkGroupIndex.ContainsKey(opName))
|
||||
{
|
||||
MIS_BASE.hashtable_WorkGroupIndex[opName] = ProcessCode;
|
||||
}
|
||||
return sn_WorkingStepIsOver;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user