using Aborlen.Model;
|
|
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using WorkStationBase;
|
|
|
|
namespace Aborlen.WorkStation
|
|
{
|
|
public partial class WorkStation12 : StationBase
|
|
{
|
|
public override void StationInit()
|
|
{
|
|
int tuopanId = Convert.ToInt32(Read(2180));
|
|
//查询订单(根据质量数据查询)
|
|
var datas = Deploy_Data.Query().Where(p => p.process_state < 4 && p.tuopan_id == tuopanId).OrderBy(p => p.Id, OrderByType.Desc);
|
|
|
|
if (datas.Count() > 0)
|
|
{
|
|
PresentOrder = ProductOrder.Query().Where(p => p.plan_id == datas.First().plan_id).OrderBy(p => p.id, OrderByType.Desc).First();
|
|
}
|
|
else
|
|
{
|
|
PresentOrder = ProductOrder.Query().OrderBy(p => p.id, OrderByType.Desc).First();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上次托盘号,防止出两个标签用
|
|
/// </summary>
|
|
public int LastPallet { get; set; }
|
|
|
|
}
|
|
}
|