using Aborlen.Model;
|
|
using FrameWork.Log;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using WorkStationBase;
|
|
|
|
namespace Aborlen.WorkStation
|
|
{
|
|
public partial class WorkStation03 : StationBase
|
|
{
|
|
|
|
public void SendOrderInfo(string stationCode, object value, DateTime triggerTime)
|
|
{
|
|
|
|
try
|
|
{
|
|
//查询订单信息 写入产品型号
|
|
|
|
//更新系统订单
|
|
PresentOrder = ProductOrder.Query().Where(p => p.plan_id == value.ToString()).First();
|
|
|
|
//读取扫描完成
|
|
if (Convert.ToInt32(Read(1080, DateTime.Now)) == 0)
|
|
{
|
|
|
|
|
|
Write(1180, (short)PresentOrder.product_id);
|
|
|
|
|
|
|
|
OrderNum_OP30 = PresentOrder.plan_id;
|
|
PlanCount_Op30 = Convert.ToInt32(PresentOrder.plan_account);
|
|
//切换型号后 刷新界面
|
|
View_OP40.OrderNum = OrderNum_OP30;
|
|
View_OP40.PlanNum = PlanCount_Op30;
|
|
SendMsg.SendMsgToStation(StationInfo.StationCode, "PlanNum", PlanCount_Op30);
|
|
SendMsg.SendMsgToStation(StationInfo.StationCode, "StationCode", PresentOrder.product_name);
|
|
SendMsg.SendMsgToStation(StationInfo.StationCode, "OrderNum", OrderNum_OP30);
|
|
InitView_OP30(DateTime.Now);
|
|
}
|
|
else
|
|
{
|
|
SendMsg.SendMsgToStation("OP40", "AlarmMsg", "OP30当前工件放行后将切换新订单。");
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.WriteLog(LogHelper.GetMethodInfo(), ex);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|