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 WorkStation11 : StationBase
|
|
{
|
|
public override void OdsStep(string stationCode, object value, DateTime triggerTime)
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
public override void ViewInit()
|
|
{
|
|
try
|
|
{
|
|
|
|
|
|
Deploy_Data deploy_Data = SqlSugarAdo.SqlQuery<Deploy_Data>($"select top(1) * from Deploy_Data where tuopan_id={PalletCode} and process_state<4 order by id desc ").First();
|
|
|
|
PresentOrder = ProductOrder.Query().Where(p => p.plan_id == deploy_Data.plan_id).First();
|
|
|
|
|
|
//托盘号变更,重新向前端发送订单信息
|
|
|
|
//获取订单信息
|
|
View.StationCode = StationInfo.StationCode;
|
|
View.CycleTime = ProductCycleTime;
|
|
View.OrderNum = PresentOrder.plan_id;
|
|
View.PalletCode = PalletCode;
|
|
View.PlanStartTime = PresentOrder.set_time;
|
|
View.ProductTypeCode = PresentOrder.product_id;
|
|
View.ProductType = PresentOrder.product_name ;
|
|
View.PlanNum = PresentOrder.plan_account;
|
|
View.OkNum = PresentOrder.ok_account ;
|
|
View.NokNum = PresentOrder.nok_account;
|
|
View.Deploy_Data = deploy_Data;
|
|
View.NgProductCode = StationBase.NgProductCode;
|
|
View.NgPalletCode = StationBase.NgPalletCode;
|
|
View.PrintType = PresentOrder.yfas_rule;
|
|
View.ProductCode = deploy_Data.Id.ToString();
|
|
SendMsg.SendMsgToStation(StationInfo.StationCode, "", View);
|
|
|
|
|
|
//SendMsgToStation(, deploy_Data);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.WriteLog(LogHelper.GetMethodInfo(), ex);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|