| | |
| | | using HH.WCS.Mobox3.AnGang.models; |
| | | using HH.WCS.Mobox3.AnGang.config; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using System; |
| | |
| | | { |
| | | site = Location.S_AGV_SITE; |
| | | } |
| | | //if (Location.N_CURRENT_NUM == 1) |
| | | //{ |
| | | // site = Location.S_AGV_SITE2; |
| | | //} |
| | | //if (Location.N_CURRENT_NUM == 2) |
| | | //{ |
| | | // site = Location.S_AGV_SITE3; |
| | | //} |
| | | //if (Location.N_CURRENT_NUM == 3) |
| | | //{ |
| | | // site = Location.S_AGV_SITE4; |
| | | //} |
| | | //if (Location.N_CURRENT_NUM == 4) |
| | | //{ |
| | | // site = Location.S_AGV_SITE5; |
| | | //} |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 入库锁定终点,出库锁定起点 |
| | | /// 你创建任务锁定货位的时候,把锁的来源就是任务号也写上去(加锁的方法加个参数,可空的参数),解锁的时候把来源置空。 |
| | | /// 起点出库锁:2 --- 终点入库锁:1 |
| | | /// </summary> |
| | | /// <param name="loc"></param> |
| | | /// <param name="lockState">1:入库锁、2:出库锁、2:其它锁</param> |
| | | /// <param name="lockState">1:入库锁、2:出库锁、3:其它锁</param> |
| | | /// <param name="lockSource">锁的来源=任务号</param> |
| | | /// <returns></returns> |
| | | public static bool LockLoc(ref TN_Location loc, int lockState, string lockSource = "") { |
| | |
| | | /// 你创建任务锁定货位的时候,把锁的来源就是任务号也写上去(加锁的方法加个参数,可空的参数),解锁的时候把来源置空。 |
| | | /// </summary> |
| | | /// <param name="loc"></param> |
| | | /// <param name="lockState">1:入库锁、2:出库锁、2:其它锁</param> |
| | | /// <param name="lockState">1:入库锁、2:出库锁、3:其它锁</param> |
| | | /// <param name="lockSource">锁的来源=任务号</param> |
| | | /// <returns></returns> |
| | | public static bool LockLoc(string loc, int lockState, string lockSource = "") |
| | |
| | | |
| | | using (var tran = db.Ado.UseTran()) |
| | | { |
| | | if (db.Deleteable<TN_Loc_Container>().Where(it => cntrs.Contains(it.S_CNTR_CODE) && it.S_LOC_CODE == loc).ExecuteCommand() > 0) |
| | | if (db.Deleteable<TN_Loc_Container>().Where(it => cntrs.Contains(it.S_CNTR_CODE) && it.S_LOC_CODE == loc).ExecuteCommand() > 0 && |
| | | db.Updateable<TN_CG_Detail>().SetColumns(d => d.S_LOC_CODE == null).Where(d => cntrs.Contains(d.S_CNTR_CODE)).ExecuteCommand() > 0) // ADD:补充针对PDA分拣 |
| | | { |
| | | LogHelper.Info($"删除货位容器关系表成功,{log}"); |
| | | } |
| | |
| | | |
| | | using (var tran = db.Ado.UseTran()) |
| | | { |
| | | if (db.Insertable<TN_Loc_Container>(bindLocCntList).ExecuteCommand() > 0) |
| | | if (db.Insertable<TN_Loc_Container>(bindLocCntList).ExecuteCommand() > 0 && |
| | | db.Updateable<TN_CG_Detail>().SetColumns(d => d.S_LOC_CODE == loc).Where(d => cntrs.Contains(d.S_CNTR_CODE)).ExecuteCommand() > 0) // ADD:补充针对PDA分拣 |
| | | { |
| | | LogHelper.Info($"插入货位容器关系表成功,{log}"); |
| | | } |
| | |
| | | public class EmptyUnBindInfo |
| | | { |
| | | public string cntID { get; set; }//容器ID |
| | | } |
| | | |
| | | public class CancleTaskInfo |
| | | { |
| | | public string taskNO { get; set; }//任务号 |
| | | } |
| | | |
| | | public class PDAFullInAreaInfo |