wangxinhui
2025-06-05 17bca2d690f283ec110c0c327a8508ed8fba9d21
最新代码提交
已删除4个文件
已修改22个文件
已添加5个文件
已重命名1个文件
612 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/009c71ac-3f6b-4e87-8d77-9e67b15f196a.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05de9a72-8eef-42af-bb91-2884b11682fc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1c314e67-7b22-4b95-82d8-39953c4ffcb1.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/30faed0f-10c1-4ef3-8430-efc0de767fc3.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8323bc-3d97-4f52-8315-faf14a56756c.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/be38a26a-2b17-43c8-b4f8-d9fd5f3264c6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fc24c9bc-a681-4021-afee-e9730bbda510.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineDBName.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/ConveyorLineJob_PP.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandGMPP.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/ConveyorLineJob_GM.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/ConveyorLineJob_FL.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b157c59e-a4e0-4f94-a6da-466245995b56.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bfe4e4fb-c551-4c7f-94ec-d7011d126854.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/24KH244 深圳美瑞安 淮安特创立体库项目电控软件开发、测试及维护服务-技术协议-2024.11.21.pdf 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/009c71ac-3f6b-4e87-8d77-9e67b15f196a.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05de9a72-8eef-42af-bb91-2884b11682fc.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/1c314e67-7b22-4b95-82d8-39953c4ffcb1.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/30faed0f-10c1-4ef3-8430-efc0de767fc3.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8323bc-3d97-4f52-8315-faf14a56756c.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/be38a26a-2b17-43c8-b4f8-d9fd5f3264c6.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fc24c9bc-a681-4021-afee-e9730bbda510.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs
@@ -60,6 +60,11 @@
        /// </summary>
        public string GroupId { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç‰©æ–™é•¿åº¦
        /// </summary>
        public int TaskLength { get; set; }
        public string AGVArea { get; set; }
        public int PalletType { get; set; }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -64,7 +64,7 @@
        /// <param name="palletCode">托盘号</param>
        /// <param name="sourceAddress">起始地址</param>
        /// <returns></returns>
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress);
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string materielBoxCode = "");
        /// <summary>
        /// å‘WMS申请任务
@@ -81,7 +81,7 @@
        /// <param name="sourceAddress">起始地址</param>
        /// <param name="roadway">巷道号</param>
        /// <returns></returns>
        WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway);
        //WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway);
        /// <summary>
        /// 
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs
@@ -183,7 +183,13 @@
        [ExporterHeader(DisplayName = "任务组")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务组")]
        public string GroupId { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç‰©æ–™é•¿åº¦
        /// </summary>
        [ImporterHeader(Name = "任务物料长度")]
        [ExporterHeader(DisplayName = "任务物料长度")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务物料长度")]
        public int TaskLength { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs
@@ -293,12 +293,12 @@
                                //调用AGV预调度接口
                                AgvScheduleTaskDTO agvScheduleTask = new AgvScheduleTaskDTO()
                                {
                                    PositionCode = task.CurrentAddress,
                                    NextTask = "60",
                                    PositionCode = "8001",
                                    NextTask = "90",
                                    UseableLayers = "1",
                                    CacheCount = "1",
                                    Update = "0",
                                    AgvTyp = "11",
                                    AgvTyp = "10",
                                    PreTaskQty = "1",
                                    ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
                                    ReqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -386,7 +386,7 @@
        /// <param name="palletCode">托盘号</param>
        /// <param name="sourceAddress">起始地址</param>
        /// <returns></returns>
        public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress)
        public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string materielBoxCode = "")
        {
            WebResponseContent content = new WebResponseContent();
            try
@@ -401,7 +401,15 @@
                {
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}");
                string responseStr = "";
                if (!string.IsNullOrEmpty(materielBoxCode))
                {
                    responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}&materielBoxCode={materielBoxCode}");
                }
                else
                {
                    responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}");
                }
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
@@ -462,34 +470,34 @@
        /// <param name="sourceAddress"></param>
        /// <param name="roadway"></param>
        /// <returns></returns>
        public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string address = AppSettings.Get("WMSApiAddress");
                if (string.IsNullOrEmpty(address))
                {
                    return WebResponseContent.Instance.Error($"未找到WMSApi地址");
                }
                string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={roadway}&palletCode={palletCode}");
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
                    WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
                    if (taskDTO != null)
                    {
                        content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                    }
                }
        //public WebResponseContent RequestWMSTask(string palletCode, string sourceAddress, string roadway)
        //{
        //    WebResponseContent content = new WebResponseContent();
        //    try
        //    {
        //        string address = AppSettings.Get("WMSApiAddress");
        //        if (string.IsNullOrEmpty(address))
        //        {
        //            return WebResponseContent.Instance.Error($"未找到WMSApi地址");
        //        }
        //        string responseStr = HttpHelper.Get($"{address}/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={roadway}&palletCode={palletCode}");
        //        WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
        //        if (responseContent != null && responseContent.Status && responseContent.Data != null)
        //        {
        //            WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
        //            if (taskDTO != null)
        //            {
        //                content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
        //            }
        //        }
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
            }
            return content;
        }
        //    }
        //    catch (Exception ex)
        //    {
        //        content = WebResponseContent.Instance.Error(ex.Message);
        //    }
        //    return content;
        //}
        /// <summary>
        /// 
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs
@@ -163,6 +163,15 @@
        /// </summary>
        public short CheckPos { get; set; }
    }
    public class R_ConveyorLineGMInfo : DeviceCommand
    {
        /// <summary>
        /// ç®±å·
        /// </summary>
        /// <summary>
        [DataLength(120)]
        public string Boxcode { get; set; }
    }
    public class R_ConveyorLineFLInfo : DeviceCommand
    {
        /// <summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineDBName.cs
@@ -118,7 +118,11 @@
        /// <summary>
        /// å“åº”信号
        /// </summary>
        ACK
        ACK,
        /// <summary>
        /// æ¡ç 
        /// </summary>
        Boxcode
    }
    public enum R_ConveyorLineWorkType
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP²Ö/ConveyorLineJob_PP.cs
@@ -73,14 +73,41 @@
                        {
                            if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
                            {
                                if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
                                string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode);
                                if (!string.IsNullOrEmpty(boxcode))
                                {
                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                    string sc = device.Communicator.Read<string>("DB900.598.0");
                                    WriteError(device.DeviceName, $"读取值:{boxcode},对比{sc}");
                                    string boxEndCode = "";
                                    if (boxcode.LastIndexOf(",SC:") >= 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",SC:")) + sc.Substring(sc.IndexOf(",SC:")).Replace("\0", "");
                                    }
                                    else if (boxcode.LastIndexOf(",SC") > 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",SC")) + sc.Substring(sc.IndexOf("SC:")).Replace("\0", "");
                                    }
                                    else if (boxcode.LastIndexOf(",S") > 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",S")) + sc.Substring(sc.IndexOf("SC:")).Replace("\0", "");
                                    }
                                    //入库申请任务
                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode, boxEndCode);
                                    if (content.Status)
                                    {
                                        device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                    }
                                }
                                //if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
                                //{
                                //    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                //    if (content.Status)
                                //    {
                                //        device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
                                //    }
                                //}
                            }
                            else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
                            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandGMPP.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,87 @@
#region << ç‰ˆ æœ¬ æ³¨ é‡Š >>
/*----------------------------------------------------------------
 * å‘½åç©ºé—´ï¼šWIDESEAWCS_Tasks.StackerCraneJob
 * åˆ›å»ºè€…:胡童庆
 * åˆ›å»ºæ—¶é—´ï¼š2024/8/2 16:13:36
 * ç‰ˆæœ¬ï¼šV1.0.0
 * æè¿°ï¼š
 *
 * ----------------------------------------------------------------
 * ä¿®æ”¹äººï¼š
 * ä¿®æ”¹æ—¶é—´ï¼š
 * ç‰ˆæœ¬ï¼šV1.0.1
 * ä¿®æ”¹è¯´æ˜Žï¼š
 *
 *----------------------------------------------------------------*/
#endregion << ç‰ˆ æœ¬ æ³¨ é‡Š >>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob.DeviceBase;
namespace WIDESEAWCS_Tasks.StackerCraneJob
{
    public class StackerCraneTaskCommandGMPP : DeviceCommand
    {
        #region <Public Menber>
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        public int TaskNum { get; set; }
        /// <summary>
        /// ä½œä¸šç±»åž‹
        /// </summary>
        public short WorkType { get; set; }
        /// <summary>
        /// æ‰˜ç›˜ç±»åž‹
        /// </summary>
        public short TrayType { get; set; }
        /// <summary>
        /// èµ·å§‹è¡Œ
        /// </summary>
        public short StartRow { get; set; }
        /// <summary>
        /// èµ·å§‹åˆ—
        /// </summary>
        public short StartColumn { get; set; }
        /// <summary>
        /// èµ·å§‹å±‚
        /// </summary>
        public short StartLayer { get; set; }
        /// <summary>
        /// ç›®æ ‡è¡Œ
        /// </summary>
        public short EndRow { get; set; }
        /// <summary>
        /// ç›®æ ‡åˆ—
        /// </summary>
        public short EndColumn { get; set; }
        /// <summary>
        /// ç›®æ ‡å±‚
        /// </summary>
        public short EndLayer { get; set; }
        /// <summary>
        /// æ‰˜ç›˜å·
        /// </summary>
        [DataLength(30)]
        public string Barcode { get; set; }
        /// <summary>
        /// ç‰©æ–™é•¿åº¦
        /// </summary>
        public short TaskLength { get; set; }
        #endregion <Public Menber>
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/ConveyorLineJob_GM.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using Quartz;
using System;
using System.Collections.Generic;
@@ -94,10 +95,28 @@
                        {
                            if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
                            {
                                if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
                                string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode);
                                if (!string.IsNullOrEmpty(boxcode))
                                {
                                    string sc = device.Communicator.Read<string>("DB900.508.0");
                                    WriteError(device.DeviceName, $"读取值:{boxcode},对比{sc}");
                                    string boxEndCode = "";
                                    if (boxcode.LastIndexOf(",SC:") >=0)
                                    {
                                        boxEndCode = "M"+ boxcode.Substring(0,boxcode.LastIndexOf(",SC:")) + sc.Substring(sc.IndexOf(",SC:")).Replace("\0", "");
                                    }
                                    else if (boxcode.LastIndexOf(",SC") > 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",SC")) + sc.Substring(sc.IndexOf("SC:")).Replace("\0", "");
                                    }
                                    else if (boxcode.LastIndexOf(",S") > 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",S")) + sc.Substring(sc.IndexOf("SC:")).Replace("\0", "");
                                    }
                                    //入库申请任务
                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode, boxEndCode);
                                    if (content.Status)
                                    {
                                        device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
@@ -106,7 +125,8 @@
                            }
                            else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
                            {
                                Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
                                string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode);
                                Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && boxcode.Contains(x.PalletCode) && x.TaskState == TaskStatusEnum.New.ObjToInt());
                                if (task != null)
                                {
                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress);
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/StackerCraneJob_GM.cs
@@ -92,6 +92,12 @@
                                    commonStackerCrane.LastTaskType = task.TaskType;
                                    task.Dispatchertime = DateTime.Now;
                                    task.ExceptionMessage = "";
                                    if (task.TaskLength<=0)
                                    {
                                        WriteInfo(commonStackerCrane.DeviceCode, $"物料长度错误{task.TaskLength}");
                                        return Task.CompletedTask;
                                    }
                                    commonStackerCrane.Communicator.Write("DB105.58", (short)task.TaskLength);
                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
                                    commonStackerCrane.Communicator.Write("DB105.54", (short)1);
                                    //延时1s
@@ -297,7 +303,7 @@
            stackerCraneTaskCommand.Barcode = task.PalletCode;
            stackerCraneTaskCommand.TaskNum = task.TaskNum;
            stackerCraneTaskCommand.WorkType = 1;
            stackerCraneTaskCommand.TrayType = (Int16)task.PalletType;
            stackerCraneTaskCommand.TrayType = 0;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                string[] startCodes = task.CurrentAddress.Split("-");
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸¨ÁϲÖ/ConveyorLineJob_FL.cs
@@ -60,31 +60,38 @@
        public Task Execute(IJobExecutionContext context)
        {
            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
            if (flag && value != null)
            try
            {
                OtherDevice device = (OtherDevice)value;
                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
                if (flag && value != null)
                {
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineFLDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                    if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null)
                    OtherDevice device = (OtherDevice)value;
                    List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                    foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                    {
                        R_ConveyorLineFLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineFLInfo>(deviceProRead.DeviceProAddress);
                        bool conveyArrivaled = device.GetValue<R_ConveyorLineFLDB, bool>(R_ConveyorLineFLDB.ConveyArrivaled, item.StationCode);
                        if (conveyArrivaled)
                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineFLDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null)
                        {
                            Dt_Task newTask = _taskRepository.QueryFirst(x => x.TaskNum== conveyorLineInfoRead.TaskNum.ObjToInt() && x.PalletCode == conveyorLineInfoRead.Barcode && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode== item.StackerCraneCode && !string.IsNullOrEmpty(x.DeviceCode));
                            if (newTask != null)
                            R_ConveyorLineFLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineFLInfo>(deviceProRead.DeviceProAddress);
                            bool conveyArrivaled = device.GetValue<R_ConveyorLineFLDB, bool>(R_ConveyorLineFLDB.ConveyArrivaled, item.StationCode);
                            if (conveyArrivaled)
                            {
                                _taskService.UpdateTask(newTask, TaskStatusEnum.AGV_Execute);
                                Dt_Task newTask = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum.ObjToInt() && x.PalletCode == conveyorLineInfoRead.Barcode && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode == item.StackerCraneCode && !string.IsNullOrEmpty(x.DeviceCode));
                                if (newTask != null)
                                {
                                    _taskService.UpdateTask(newTask, TaskStatusEnum.AGV_Execute);
                                }
                                WriteError(item.StationName, $"入库到位信号,托盘号{conveyorLineInfoRead.Barcode},任务号:{conveyorLineInfoRead.TaskNum}");
                            }
                            WriteError(item.StationName, $"入库到位信号,托盘号{conveyorLineInfoRead.Barcode},任务号:{conveyorLineInfoRead.TaskNum}");
                        }
                    }
                }
                }
            }
            catch (Exception ex)
            {
                WriteError(nameof(ConveyorLineJob_FL), ex.Message, ex);
            }
            return Task.CompletedTask;
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b157c59e-a4e0-4f94-a6da-466245995b56.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bfe4e4fb-c551-4c7f-94ec-d7011d126854.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/WMSTaskDTO.cs
@@ -67,6 +67,11 @@
        public string GroupId { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç‰©æ–™é•¿åº¦
        /// </summary>
        public int TaskLength { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string AGVArea { get; set; }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs
@@ -28,6 +28,8 @@
        //WebResponseContent FeedbackInboundOrder(int id);
        WebResponseContent MaterielGroup(SaveModel saveModel);
        WebResponseContent MaterielPPorGM(string materielBoxCode="");
        /// <summary>
        /// å…¥åº“完成上报
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -87,7 +87,7 @@
        /// <param name="roadwayNo"></param>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode);
        WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode,string materielBoxCode = "");
        /// <summary>
        /// ä»…申请任务,让WCS根据路由确定下一地址
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using SqlSugar;
using System;
using System.Collections;
@@ -900,6 +901,220 @@
            }
            return content;
        }
        public WebResponseContent MaterielPPorGM(string materielBoxCode = "")
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                string SerNum = materielBoxCode.Substring(0, materielBoxCode.LastIndexOf("SC:")-1);
                MatSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, SerNum);
                //验证判断时间格式
                WebResponseContent IsValidContent = IsValidMCDates(new List<MatSerNumAnalysisModel>() { model });
                if (!IsValidContent.Status)
                {
                    return content.Error(IsValidContent.Message);
                }
                string result = materielBoxCode.Substring(materielBoxCode.LastIndexOf("SC:") + 3);
                //获取入库单明细
                Dt_InboundOrderDetail inboundOrderDetail = _inboundRepository.InboundOrderDetailRepository.QueryFirst(x=>x.BatchNo== model.LotNo && x.MaterielCode== model.MaterielCode);
                if (inboundOrderDetail == null)
                {
                    return InOtherGMOrPP(model, result);
                }
                Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().First(x => x.Id == inboundOrderDetail.OrderId);
                if (inboundOrder == null)
                {
                    return WebResponseContent.Instance.Error($"未找到入库单信息");
                }
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == inboundOrder.WarehouseId);
                //除采购入库单以外其他入库单组盘数据处理
                if (inboundOrder.OrderType != InOrderTypeEnum.Purchase.ObjToInt())
                {
                    return OtherInGroup(inboundOrder, model.LotNo, 0, warehouse, new List<MatSerNumAnalysisModel>() { model });
                }
                Dt_ReceiveOrder receiveOrder = _inboundRepository.ReceiveOrderRepository.Db.Queryable<Dt_ReceiveOrder>().Where(x => x.ReceiveOrderNo == inboundOrder.UpperOrderNo).Includes(x => x.Details).First();
                if (receiveOrder == null)
                {
                    return WebResponseContent.Instance.Error($"未找到对应的收货单");
                }
                if (receiveOrder.Details == null || receiveOrder.Details.Count <= 0)
                {
                    return WebResponseContent.Instance.Error($"未找到对应的收货单明细");
                }
                List<string> purchaseOrderNos = receiveOrder.Details.Select(x => x.PurchaseOrderNo).ToList();
                string materielCode = model?.MaterielCode ?? "";
                Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == materielCode);
                if (materielInfo == null)
                {
                    return WebResponseContent.Instance.Error($"未找到该物料的信息");
                }
                float beforeQuantity = 0;
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == model.LotNo).Includes(x => x.Details).First();
                if (stockInfo == null)
                {
                    stockInfo = new Dt_StockInfo()
                    {
                        PalletCode = model.LotNo,
                        StockStatus = StockStatusEmun.组盘暂存.ObjToInt(),
                        WarehouseId = inboundOrder.WarehouseId,
                        PalletType = GetPalletTypeGMOrPP(warehouse, result.Split("*")[0]),
                        StockLength = result.Split("*")[0].ObjToInt(),
                        Details = new List<Dt_StockInfoDetail>()
                    };
                }
                else
                {
                    if (stockInfo.StockStatus != StockStatusEmun.组盘暂存.ObjToInt())
                    {
                        return WebResponseContent.Instance.Error($"托盘号重复");
                    }
                }
                if (stockInfo.PalletType==-1)
                {
                    return WebResponseContent.Instance.Error($"托盘类型不存在");
                }
                List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
                if (purchaseOrderNos.FirstOrDefault(x => x == model.PurchaseOrderNo) == null)
                {
                    return WebResponseContent.Instance.Error($"未在收货明细中找到该采购单");
                }
                if (inboundOrderDetail.OrderDetailStatus > OrderDetailStatusEnum.Inbounding.ObjToInt() || inboundOrderDetail.OrderQuantity == inboundOrderDetail.ReceiptQuantity)
                {
                    return WebResponseContent.Instance.Error($"该物料在该入库单中已全部组盘完成");
                }
                Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
                {
                    BatchNo = model.LotNo,
                    MaterielCode = materielInfo.MaterielCode,
                    MaterielName = materielInfo.MaterielName,
                    MaterielSpec = materielInfo.MaterielSpec,
                    OrderNo = inboundOrder.InboundOrderNo,
                    SerialNumber = model.SerialNumber,
                    StockQuantity = model.Quantity,
                    OutboundQuantity = 0,
                    Unit = materielInfo.MaterielUnit,
                    Status = StockStatusEmun.组盘暂存.ObjToInt(),
                    ProductionDate = model.ProductionDate,
                    EffectiveDate = model.EffectiveDate,
                    InboundOrderRowNo = inboundOrderDetail.RowNo,
                };
                stockInfo.Details.Add(stockInfoDetail);
                stockInfoDetails.Add(stockInfoDetail);
                inboundOrderDetail.ReceiptQuantity += model.Quantity;
                if (inboundOrderDetail.ReceiptQuantity > inboundOrderDetail.OrderQuantity)
                {
                    return WebResponseContent.Instance.Error($"组盘数量溢出{inboundOrderDetail.ReceiptQuantity - inboundOrderDetail.OrderQuantity}");
                }
                if (inboundOrderDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt())
                {
                    inboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.GroupAndInbound.ObjToInt();
                }
                float totalQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
                if (inboundOrder.OrderStatus == InOrderStatusEnum.未开始.ObjToInt())
                {
                    inboundOrder.OrderStatus = InOrderStatusEnum.入库中.ObjToInt();
                }
                _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail);
                _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
                _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup);
                content.OK(data: stockInfo);
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        public WebResponseContent InOtherGMOrPP(MatSerNumAnalysisModel model,string request = "")
        {
            string materielCode = model?.MaterielCode ?? "";
            Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == materielCode);
            if (materielInfo == null)
            {
                return WebResponseContent.Instance.Error($"未找到该物料的信息");
            }
            float beforeQuantity = 0;
            Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == materielInfo.WarehouseId);
            Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == model.LotNo).Includes(x => x.Details).First();
            if (stockInfo == null)
            {
                stockInfo = new Dt_StockInfo()
                {
                    PalletCode = model.LotNo,
                    StockStatus = StockStatusEmun.组盘暂存.ObjToInt(),
                    WarehouseId = warehouse.WarehouseId,
                    PalletType = GetPalletTypeGMOrPP(warehouse, request.Split("*")[0]),
                    StockLength = request.Split("*")[0].ObjToInt(),
                    Details = new List<Dt_StockInfoDetail>()
                };
            }
            else
            {
                if (stockInfo.StockStatus != StockStatusEmun.组盘暂存.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"托盘号重复");
                }
            }
            if (stockInfo.PalletType == -1)
            {
                return WebResponseContent.Instance.Error($"托盘类型不存在");
            }
            List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
            Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
            {
                BatchNo = model.LotNo,
                MaterielCode = materielInfo.MaterielCode,
                MaterielName = materielInfo.MaterielName,
                MaterielSpec = materielInfo.MaterielSpec,
                OrderNo = "",
                SerialNumber = model.SerialNumber,
                StockQuantity = model.Quantity,
                OutboundQuantity = 0,
                Unit = materielInfo.MaterielUnit,
                Status = StockStatusEmun.组盘暂存.ObjToInt(),
                ProductionDate = model.ProductionDate,
                EffectiveDate = model.EffectiveDate,
                InboundOrderRowNo = 0,
            };
            stockInfo.Details.Add(stockInfoDetail);
            stockInfoDetails.Add(stockInfoDetail);
            float totalQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
            _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.MaterielGroup);
            return WebResponseContent.Instance.OK(data: stockInfo);
        }
        public int GetPalletTypeGMOrPP(Dt_Warehouse warehouse, string boxWidth)
        {
            if (warehouse.WarehouseCode == WarehouseEnum.HA152.ToString())
            {
                if (boxWidth.ObjToInt() <= 690 && boxWidth.ObjToInt()>=515)
                {
                    return 15;
                }
                else if (boxWidth.ObjToInt() > 690 && boxWidth.ObjToInt() <= 1400)
                {
                    return 16;
                }
            }
            else if (warehouse.WarehouseCode == WarehouseEnum.HA58.ToString())
            {
                Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.WarehouseId == warehouse.WarehouseId);
                return palletTypeInfo.PalletType;
            }
            return -1;
        }
        public WebResponseContent OtherInGroup(Dt_InboundOrder inboundOrder,string? palletCode,int Initiallife,Dt_Warehouse warehouse,List<MatSerNumAnalysisModel> models)
        {
            WebResponseContent content = new WebResponseContent();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs
@@ -55,6 +55,11 @@
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        /// <summary>
        /// åº“存物料长度GM/PP
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "库存物料长度")]
        public int StockLength { get; set; }
        /// <summary>
        /// åº“存明细
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs
@@ -142,6 +142,13 @@
        [SugarColumn(IsNullable = true, ColumnDescription = "任务组")]
        public string GroupId { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç‰©æ–™é•¿åº¦
        /// </summary>
        [ImporterHeader(Name = "任务物料长度")]
        [ExporterHeader(DisplayName = "任务物料长度")]
        [SugarColumn(IsNullable = true, ColumnDescription = "任务物料长度")]
        public int TaskLength { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [ImporterHeader(Name = "备注")]
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -687,6 +687,10 @@
                    {
                        x.Status = StockStatusEmun.出库完成.ObjToInt();
                    });
                    if (stockInfo.StockLength>0)
                    {
                        stockInfo.StockLength = 0;
                    }
                    _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                    _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details);
                }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -278,7 +278,7 @@
        /// <param name="roadwayNo"></param>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode)
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode,string materielBoxCode = "")
        {
            try
            {
@@ -293,7 +293,72 @@
                {
                    return WebResponseContent.Instance.Error($"该站点已有未执行的任务");
                }
                if (!string.IsNullOrEmpty(materielBoxCode))
                {
                    _unitOfWorkManage.BeginTran();
                    WebResponseContent responseGroup = _inboundOrderService.MaterielPPorGM(materielBoxCode);
                    if (!responseGroup.Status)
                    {
                        return WebResponseContent.Instance.Error($"{responseGroup.Message}");
                    }
                    Dt_StockInfo stockInfoPPorGM = responseGroup.Data as Dt_StockInfo ?? null;
                    if (stockInfoPPorGM==null)
                    {
                        return WebResponseContent.Instance.Error($"组盘数据转换失败");
                    }
                    Dt_LocationInfo? locationInfoPPorGM = _basicService.LocationInfoService.AssignLocation(roadwayNo, stockInfoPPorGM.PalletType, stockInfoPPorGM.WarehouseId);
                    if (locationInfoPPorGM == null)
                    {
                        return WebResponseContent.Instance.Error($"货位分配失败,未找到可分配货位");
                    }
                    Dt_Task newTaskPPorGM = new Dt_Task()
                    {
                        CurrentAddress = stationCode,
                        Grade = 0,
                        NextAddress = locationInfoPPorGM.LocationCode,
                        PalletCode = stockInfoPPorGM.PalletCode,
                        Roadway = roadwayNo,
                        SourceAddress = stationCode,
                        TargetAddress = locationInfoPPorGM.LocationCode,
                        TaskType = TaskTypeEnum.Inbound.ObjToInt(),
                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        WarehouseId = stockInfoPPorGM.WarehouseId,
                        PalletType = stockInfoPPorGM.PalletType,
                        TaskLength= stockInfoPPorGM.StockLength
                    };
                    //获取是否存在入库单
                    Dt_InboundOrder? inboundOrderPPorGM = null;
                    if (stockInfoPPorGM != null && stockInfoPPorGM.Details.Count > 0)
                    {
                        string? orderNo = stockInfoPPorGM.Details.FirstOrDefault()?.OrderNo ?? "";
                        inboundOrderPPorGM = _inboundOrderService.Repository.QueryFirst(x => x.InboundOrderNo == orderNo && x.OrderStatus < InOrderStatusEnum.入库完成.ObjToInt());
                    }
                    if (inboundOrderPPorGM != null)
                    {
                        if (inboundOrderPPorGM.OrderType == InOrderTypeEnum.Allocat.ObjToInt())
                        {
                            newTaskPPorGM.TaskType = TaskTypeEnum.InAllocate.ObjToInt();
                        }
                        else if (inboundOrderPPorGM.OrderType == InOrderTypeEnum.Return.ObjToInt())
                        {
                            newTaskPPorGM.TaskType = TaskTypeEnum.ProductionReturn.ObjToInt();
                        }
                    }
                    stockInfoPPorGM.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                    LocationStatusEnum lastStatusPPorGM = (LocationStatusEnum)locationInfoPPorGM.LocationStatus;
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfoPPorGM, lastStatusPPorGM, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation);
                    _basicService.LocationInfoService.UpdateLocationStatus(locationInfoPPorGM, newTaskPPorGM.PalletType, LocationStatusEnum.Lock, newTaskPPorGM.WarehouseId);
                    int taskIdPPorGM = BaseDal.AddData(newTaskPPorGM);
                    newTaskPPorGM.TaskId = taskIdPPorGM;
                    _stockRepository.StockInfoRepository.Db.InsertNav(stockInfoPPorGM).Include(x => x.Details).ExecuteCommand();
                    _unitOfWorkManage.CommitTran();
                    WMSTaskDTO wMSTaskDTOPPorGM = _mapper.Map<WMSTaskDTO>(newTaskPPorGM);
                    PushTasksToWCS(new List<Dt_Task> { newTaskPPorGM });
                    return WebResponseContent.Instance.OK(data: wMSTaskDTOPPorGM);
                }
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
                if (stockInfo == null)
                {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -526,6 +526,10 @@
                            PalletType = stockInfo.PalletType,
                            WarehouseId = stockInfo.WarehouseId,
                        };
                        if (stockInfo.StockLength>0)
                        {
                            task.TaskLength = stockInfo.StockLength;
                        }
                        tasks.Add(task);
                    }
                }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -75,9 +75,9 @@
        /// <param name="palletCode"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous]
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode)
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode,string materielBoxCode = "")
        {
            return Service.DeviceRequestInboundTask(stationCode, roadwayNo, palletCode);
            return Service.DeviceRequestInboundTask(stationCode, roadwayNo, palletCode, materielBoxCode);
        }
        /// <summary>
ÏîÄ¿×ÊÁÏ/24KH244 ÉîÛÚÃÀÈð°² »´°²ÌØ´´Á¢Ìå¿âÏîÄ¿µç¿ØÈí¼þ¿ª·¢¡¢²âÊÔ¼°Î¬»¤·þÎñ-¼¼ÊõЭÒé-2024.11.21.pdf
Binary files differ