You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

36 lines
1.1 KiB

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; }
}
}