123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using DBHelper;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using WCS.Core;
- using WCS.Entity;
- using WCS.Entity.Protocol;
- namespace WCS.Service.Helpers
- {
- /// <summary>
- /// 通用帮助内
- /// </summary>
- public class GeneralHelper
- {
- /// <summary>
- /// 托盘排出
- /// </summary>
- public static void DischargeOfTray(Device<IStation521, IStation520, IRobotStation> device,bool needUnBind=true)
- {
- DB.Do(db =>
- {
- var t = db.Default.Set<WCS_TASK>().Find(device.Data.TASKNUM);
- if (t != null && needUnBind)
- {
- t.ADDRTO = "2202";
- db.Default.SaveChanges();
- WMS.UnBound(t.BARCODE);
- }
- else if (t != null && !needUnBind)
- {
- t.ADDRTO = "2202";
- db.Default.SaveChanges();
- }
- device.Data3.PalletType = 0;
- device.Data3.MaxQty = 0;
- device.Data3.DocId = 0;
- device.Data2.TASKNUM = device.Data.TASKNUM;
- device.Data2.GOODSSIZE = device.Data.GOODSSIZE;
- device.Data2.GOODSEND = 2202;
- device.Data2.CONFIRM = true;
- });
- }
- }
- }
|