wangxinhui
2026-02-03 261ec6b250b3aea2d26e629203c7d699747c27ea
空托回流区分叠盘或直接回立库
已删除2个文件
已修改9个文件
137 ■■■■■ 文件已修改
项目代码/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/成品输送线通讯协议_20250707.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/物料二维码规则.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/物料编码规则20250618.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs
@@ -148,6 +148,12 @@
        EmptyProductBack = 630,
        /// <summary>
        /// ç©ºæ‰˜å ç›˜
        /// </summary>
        [Description("空托叠盘")]
        EmptyStackPlate = 635,
        /// <summary>
        /// åˆ†åˆ‡åŠæˆå“å…¥åº“
        /// </summary>
        [Description("分切半成品入库")]
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -262,7 +262,7 @@
                            {
                                throw new Exception($"{task.NextAddress}AGV站台未定义");
                            }
                            if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt())
                            if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt() || task.TaskType == TaskTypeEnum.EmptyStackPlate.ObjToInt())
                            {
                                List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.NextAddress == x.StartPosi);
                                Dt_Router router = routers.FirstOrDefault();
@@ -278,7 +278,7 @@
                                _taskService.UpdateTask(task, TaskStatusEnum.AGV_Finish);
                                PutFinish(oldAddress, task.TaskNum);
                            }
                            else if (task.TaskType == TaskTypeEnum.WFBLMYLBackInbound.ObjToInt() || task.TaskType == TaskTypeEnum.WFBYLInbound.ObjToInt())
                            else if (task.TaskType == TaskTypeEnum.WFBLMYLBackInbound.ObjToInt() || task.TaskType == TaskTypeEnum.WFBYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.WFBLMYLInbound.ObjToInt())
                            {
                                _taskService.TaskCompleted(task.TaskNum);
                            }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -243,7 +243,7 @@
                            //入库
                            if (taskTypeGroup == TaskTypeGroup.InboundGroup)
                            {
                                if (router.NextPosi == "AGV" && router.StartPosi=="AGV")
                                if (router.NextPosi == "AGV" && router.StartPosi=="AGV") //无纺布&纸杯纸片供料
                                {
                                    task.CurrentAddress = item.SourceAddress;
                                    task.NextAddress = item.TargetAddress;
@@ -265,8 +265,7 @@
                        }
                        else
                        {
                            //成品码垛任务生成
                            if (taskTypeGroup == TaskTypeGroup.InboundGroup && !task.Roadway.Contains("YL"))
                            if (taskTypeGroup == TaskTypeGroup.InboundGroup && !task.Roadway.Contains("YL")) //成品码垛任务生成
                            {
                                task.CurrentAddress = router.StartPosi;
                                task.NextAddress = "";
@@ -299,7 +298,10 @@
                            if (routers.Count == 1)
                            {
                                task.NextAddress = router.NextPosi;
                                task.DeviceCode = router.ChildPosi;
                                if (task.Roadway.Contains("StackPlate"))
                                    task.DeviceCode = router.ChildPosiDeviceCode;
                                else
                                    task.DeviceCode = router.ChildPosi;
                            }
                        }
                        
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs
@@ -10,6 +10,7 @@
using WIDESEAWCS_IPackInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_Tasks.ConveyorLineJob;
@@ -68,7 +69,7 @@
            var station = _stationMangerRepository.QueryFirst(x => x.StationDeviceCode == device.DeviceCode);
            if (station != null && station.Remark != null)//获取站台里面的托盘号
            {
                var task = _taskRepository.QueryFirst(x => x.DeviceCode == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing) && x.SourceAddress == station.AGVStationCode);
                var task = _taskRepository.QueryData(x => x.SourceAddress == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing));
                if (task == null)
                {
                    WebResponseContent content = _taskService.CPEmptyInbound(station.Remark, station.AGVStationCode);
@@ -87,12 +88,13 @@
            var tasks = _taskRepository.QueryData(x => x.Roadway == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing) && x.TargetAddress == device.DeviceCode);
            if (tasks.Count + Convert.ToInt32(command.Num) < 9)
            {
                var task = _taskRepository.QueryFirst(x => x.Roadway == device.DeviceCode && x.TaskState == (int)TaskStatusEnum.StackPlate_Execute);
                var task = _taskRepository.Db.Queryable<Dt_Task>().Where(x => x.Roadway == device.DeviceCode && x.TaskState == (int)TaskStatusEnum.New).OrderBy(x=>x.TaskNum).First();
                if (task != null && station != null)
                {
                    task.TaskState = (int)TaskStatusEnum.AGV_Execute;
                    _taskRepository.UpdateData(task);
                    task.DeviceCode = station.StackerCraneCode;
                    station.Remark = task.PalletCode;
                    _taskRepository.UpdateData(task);
                    _stationMangerRepository.UpdateData(station);
                }
            }
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs
@@ -148,6 +148,12 @@
        EmptyProductBack = 630,
        /// <summary>
        /// ç©ºæ‰˜å ç›˜
        /// </summary>
        [Description("空托叠盘")]
        EmptyStackPlate = 635,
        /// <summary>
        /// åˆ†åˆ‡åŠæˆå“å…¥åº“
        /// </summary>
        [Description("分切半成品入库")]
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -16,6 +16,7 @@
#endregion << ç‰ˆ æœ¬ æ³¨ é‡Š >>
using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Asn1.X509;
using SqlSugar;
using System;
using System.Collections.Generic;
@@ -143,7 +144,7 @@
        /// <param name="barCode"></param>
        /// <param name="startPoint"></param>
        /// <returns></returns>
        WebResponseContent EmptyBackTask(string barCode, string startPoint);
        WebResponseContent EmptyBackTask(string barCode, string startPoint,int target);
        /// <summary>
        /// è¾…æ–™/成品临时入库
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -982,6 +982,19 @@
                    {
                        agvstation.IsOccupied = WhetherEnum.False.ObjToInt();
                    }
                    //叠盘任务单独完成
                    if (task.TaskType==TaskTypeEnum.EmptyStackPlate.ObjToInt())
                    {
                        task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
                        _unitOfWorkManage.BeginTran();
                        if (agvstation != null)
                        {
                            _basicRepository.AGVStationInfoRepository.UpdateData(agvstation);
                        }
                        BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.人工完成 : WIDESEA_Core.Enums.OperateTypeEnum.自动完成);
                        _unitOfWorkManage.CommitTran();
                        return content.OK();
                    }
                    Dt_ProStockInfo proStockInfo = _stockRepository.ProStockInfoRepository.Db.Queryable<Dt_ProStockInfo>().Where(x => x.PalletCode == task.PalletCode).Includes(x=>x.proStockInfoDetails).First();
                    if (proStockInfo != null && proStockInfo.StockStatus == StockStatusEmun.MES空托退库.ObjToInt())
                    {
@@ -1226,7 +1239,7 @@
        /// <summary>
        /// æˆå“ç©ºæ‰˜å›žåº“
        /// </summary>
        public WebResponseContent EmptyBackTask(string barCode, string startPoint)
        public WebResponseContent EmptyBackTask(string barCode, string startPoint,int target)
        {
            WebResponseContent content = new WebResponseContent();
            try
@@ -1253,41 +1266,64 @@
                {
                    return content.Error($"托盘{barCode}任务已存在");
                }
                Dt_ProStockInfo proStockInfoOld = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
                if (proStockInfoOld!=null)
                Dt_Task newTask = null;
                Dt_ProStockInfo proStockInfo = null;
                if (target==WhetherEnum.False.ObjToInt())//叠盘空托任务
                {
                    return content.Error($"托盘{barCode}已存在");
                    newTask = new Dt_Task()
                    {
                        CurrentAddress = startPoint,
                        Grade = 0,
                        NextAddress = "",
                        PalletCode = barCode,
                        Roadway = agvstation.AGVStationCode.StartsWith("PNT_1") ? "StackPlate1": "StackPlate2",
                        SourceAddress = startPoint,
                        TargetAddress = "",
                        TaskType = TaskTypeEnum.EmptyStackPlate.ObjToInt(),
                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        WarehouseId = WarehouseEnum.LLDFL.ObjToInt(),
                        PalletType = 1
                    };
                }
                //分配巷道
                string roadWay=AssignCPRoadwayNo();
                Dt_ProStockInfo proStockInfo = new Dt_ProStockInfo()
                else //立库空托任务
                {
                    PalletCode=barCode,
                    ProStockAttribute=ProStockAttributeEnum.空托.ObjToInt(),
                    PalletType=1,
                    LocationCode="",
                    WarehouseId= WarehouseEnum.LLDFL.ObjToInt(),
                    StockStatus=StockStatusEmun.MES空托退库.ObjToInt()
                };
                Dt_Task newTask = new Dt_Task()
                {
                    CurrentAddress = startPoint,
                    Grade = 0,
                    NextAddress = "",
                    PalletCode = barCode,
                    Roadway = roadWay,
                    SourceAddress = startPoint,
                    TargetAddress = "",
                    TaskType = TaskTypeEnum.EmptyProductBack.ObjToInt(),
                    TaskStatus = TaskStatusEnum.New.ObjToInt(),
                    WarehouseId = WarehouseEnum.LLDFL.ObjToInt(),
                    PalletType = 1
                };
                    Dt_ProStockInfo proStockInfoOld = _stockRepository.ProStockInfoRepository.QueryFirst(x => x.PalletCode == barCode);
                    if (proStockInfoOld != null)
                    {
                        return content.Error($"托盘{barCode}已存在");
                    }
                    //分配巷道
                    string roadWay = AssignCPRoadwayNo();
                    proStockInfo = new Dt_ProStockInfo()
                    {
                        PalletCode = barCode,
                        ProStockAttribute = ProStockAttributeEnum.空托.ObjToInt(),
                        PalletType = 1,
                        LocationCode = "",
                        WarehouseId = WarehouseEnum.LLDFL.ObjToInt(),
                        StockStatus = StockStatusEmun.MES空托退库.ObjToInt()
                    };
                    newTask = new Dt_Task()
                    {
                        CurrentAddress = startPoint,
                        Grade = 0,
                        NextAddress = "",
                        PalletCode = barCode,
                        Roadway = roadWay,
                        SourceAddress = startPoint,
                        TargetAddress = "",
                        TaskType = TaskTypeEnum.EmptyProductBack.ObjToInt(),
                        TaskStatus = TaskStatusEnum.New.ObjToInt(),
                        WarehouseId = WarehouseEnum.LLDFL.ObjToInt(),
                        PalletType = 1
                    };
                }
                _unitOfWorkManage.BeginTran();
                int taskId = BaseDal.AddData(newTask);
                _stockRepository.ProStockInfoRepository.AddData(proStockInfo);
                if (proStockInfo!=null)
                {
                    _stockRepository.ProStockInfoRepository.AddData(proStockInfo);
                }
                newTask.TaskId = taskId;
                _unitOfWorkManage.CommitTran();
                //推送任务
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -69,7 +69,7 @@
        [HttpPost, HttpGet, Route("EmptyBackTask"), AllowAnonymous]
        public WebResponseContent EmptyBackTask(string barCode, string startPoint,int target)
        {
            return Service.EmptyBackTask(barCode, startPoint);
            return Service.EmptyBackTask(barCode, startPoint, target);
        }
        /// <summary>
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/³ÉÆ·ÊäËÍÏßͨѶЭÒé_20250707.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÎïÁ϶þάÂë¹æÔò.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÎïÁϱàÂë¹æÔò20250618.xlsx
Binary files differ