IPC-610
2025-01-02 286db121ac6b7e56b1b579ebcdd191526890f4af
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -21,6 +21,7 @@
using WMS.Entity.SysEntity;
using WMS.IBLL.IBllAsnServer;
using WMS.Entity.BllQualityEntity;
using WMS.Entity.BllCheckEntity;
namespace WMS.BLL.BllAsnServer
{
@@ -1186,7 +1187,7 @@
                            EndLocate = beingTask.EndLocat, // 目标位置
                            EndRoadway = beingTask.EndRoadway, //  目标巷道
                            TaskNo = beingTask.TaskNo, // 任务号
                            TaskType = "0",// 任务类型 (出库)
                            TaskType = "0",// 任务类型 (入库)
                            OutMode = "",  //目标地址
                            Order = 1
                        };
@@ -1908,9 +1909,9 @@
                                EndLocate = beingTask.EndLocat, // 目标位置
                                EndRoadway = beingTask.EndRoadway,                           //  目标巷道
                                TaskNo = beingTask.TaskNo, // 任务号
                                TaskType = "0",// 任务类型 (出库)
                                TaskType = "0",// 任务类型 (出库)
                                OutMode = "",  //目标地址
                                Order = 1
                                Order = 1
                            };
                            if (beingTask.IsSuccess == 0)
                            {
@@ -3187,6 +3188,86 @@
        }
        //申请缠膜入库
        public int RequestPackWcs(string palletNo)
        {
            try
            {
                int t = -1;
                //验证托盘条码是否为空
                if (string.IsNullOrEmpty(palletNo))
                {
                    throw new Exception("未找到该托盘条码:"+ palletNo);
                }
                var palletBindList = Db.Queryable<BllPalletBind>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo && m.Status == "1").OrderByDescending(m=>m.CreateTime).First();
                if (palletBindList.IsBale == "1")
                {
                    t = 1;
                }
                return t;
            }
            catch  (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //申请拆膜出库
        public int RequestUnPackWcs(string palletNo)
        {
            try
            {
                int t = -1;
                //验证托盘条码是否为空
                if (string.IsNullOrEmpty(palletNo))
                {
                    throw new Exception("未找到该托盘条码:" + palletNo);
                }
                var palletBindList = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo && m.LocatNo.Substring(0,1) != "B").First();
                if (palletBindList.IsBelt == "1")
                {
                    palletBindList.IsBelt = "0";
                    Db.Updateable(palletBindList).ExecuteCommand();
                    t = 1;
                }
                return t;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        //缠膜完成
        public int RequestPackedWcs(string palletNo)
        {
            try
            {
                int t = -1;
                //验证托盘条码是否为空
                if (string.IsNullOrEmpty(palletNo))
                {
                    throw new Exception("未找到该托盘条码:" + palletNo);
                }
                var palletBindList = Db.Queryable<BllPalletBind>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo && m.Status == "1").OrderByDescending(m => m.CreateTime).First();
                if (palletBindList.IsBale == "1")
                {
                    palletBindList.IsBelt = "1";
                    Db.Updateable(palletBindList).ExecuteCommand();
                }
                return t;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        ////重新下发入库任务
        //public OutCommandDto AgainSendAsnTask(string taskNo, int userId, string url)