wangxinhui
昨天 011ca316e6ec2ed93e31c45a9ebd9d3c66664871
代码更新
已添加9个文件
已修改25个文件
703 ■■■■ 文件已修改
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/PackaxisTaskService.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPC.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPH.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/RGVJob_CP.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_BasicRepository/SendStationCodeRepository.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_BasicService/SendStationCodeService.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_DTO/ERP/ERPProDeliveryDTO.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IBasicRepository/ISendStationCodeRepository.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IBasicService/ISendStationCodeService.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IInboundService/IPurchaseOrderService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_IOutboundService/IProDeliveryOrderService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_SendStationCode.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_ProDeliveryOrder.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/ProDeliveryOrderService.cs 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/SendStationCodeController.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/变更管理/龙利得项目需求变更确认书-20260401.doc 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/变更管理/龙利得项目需求变更确认书-20260402.doc 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/变更管理/龙利得项目需求变更确认书-20260416.doc 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口协议/博斯通利拓接口.V2.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口协议/龙利得RCS叉车AGV确认目标点接口.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口协议/龙利得RCS顶升AGV确认目标点接口.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/二楼环线20250715.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/成品输送线通讯协议_20250707.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/龙利得设备通讯协议.xls 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/PackaxisTaskService.cs
@@ -61,7 +61,6 @@
                Dt_StationPackInfo? stationPackInfo = stationPackInfos.FirstOrDefault(x => x.PackType == packinfo.PackType && x.OrderNo == packinfo.OrderNo && x.AssignNum < x.PackNum);
                Dt_PackaxisTask packaxisTask = new Dt_PackaxisTask();
                //如果订单相同、垛型一致并且分配数量少于码垛结托数量则分配到一起
                _unitOfWorkManage.BeginTran();
                if (stationPackInfo != null)
                {
                    packaxisTask = new Dt_PackaxisTask()
@@ -82,14 +81,14 @@
                    stationPackInfo.AssignNum += 1;
                    stationPackInfo.ExecutingNum += 1;
                    packinfo.PackStatus = StationOccupiedEnum.Sure.ObjToInt();
                    _unitOfWorkManage.BeginTran();
                    //更新码垛执行工位
                    _stationPackInfoRepository.UpdateData(stationPackInfo);
                    //更新待码垛信息表
                    _packinfoRepository.UpdateData(packinfo);
                    //添加码垛任务
                    BaseDal.AddData(packaxisTask);
                    _unitOfWorkManage.CommitTran();
                }
                else//分配新工位
                {
@@ -130,14 +129,16 @@
                    packInfoAssign.AssignNum += 1;
                    packInfoAssign.ExecutingNum += 1;
                    packinfo.PackStatus = StationOccupiedEnum.Sure.ObjToInt();
                    _unitOfWorkManage.BeginTran();
                    //更新码垛执行工位
                    _stationPackInfoRepository.UpdateData(packInfoAssign);
                    //更新待码垛信息表
                    _packinfoRepository.UpdateData(packinfo);
                    //添加码垛任务
                    BaseDal.AddData(packaxisTask);
                    _unitOfWorkManage.CommitTran();
                }
                _unitOfWorkManage.CommitTran();
                return content.OK(barCode, packaxisTask);
            }
            catch (Exception ex)
@@ -209,7 +210,6 @@
        {
            try
            {
                Dt_PackaxisTask? packaxisTaskFinish = null;
                if (packaxisTask!=null)
                {
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPC.cs
@@ -75,7 +75,7 @@
                    {
                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null)
                        if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null && deviceProWrite != null)
                        {
                            R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
                            //码垛满盘生成RGV搬运任务
@@ -91,6 +91,7 @@
                                        Dt_Task taskNew = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()));
                                        if (taskNew != null)
                                        {
                                            device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode);
                                            _taskService.UpdateTask(taskNew, TaskStatusEnum.RGV_Execute);
                                        }
                                    }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPH.cs
@@ -217,6 +217,7 @@
                                                                    packaxisTask.DeviceCode = item.StackerCraneCode;
                                                                    packaxisTask.TaskState = TaskStatusEnum.MD_Executing.ObjToInt();
                                                                    _packaxisTaskRepository.UpdateData(packaxisTask);
                                                                    device.SetValue(W_CLineCPHDB.W_Request, 1, item.StationCode);
                                                                }
                                                            }
                                                            else
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/RGVJob_CP.cs
@@ -88,6 +88,7 @@
                        Dt_Task? task2 = tasks.FirstOrDefault(x => x.HeightType == 2);
                        Dt_Task? task3 = tasks.FirstOrDefault(x => x.HeightType == 3);
                        List<Dt_Task> tasksDown = _taskRepository.QueryData(x => _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode).OrderBy(x=>x.CreateDate).Take(3).ToList();
                        List<Dt_Task> taskSends = new List<Dt_Task>();
                        if (tasksDown.Count>0)
                        {
                            bool ReceivedDone = false;
@@ -102,8 +103,7 @@
                                    device.SetValue(W_RgvCPDB.Qu1, tasksDown[0].CurrentAddress);
                                    device.SetValue(W_RgvCPDB.Fang1, tasksDown[0].NextAddress);
                                    tasksDown[0].HeightType = 1;
                                    _taskService.UpdateTask(tasksDown[0], TaskStatusEnum.RGV_Executing);
                                    Thread.Sleep(100);
                                    taskSends.Add(tasksDown[0]);
                                    ReceivedDone=true;
                                }
                            }
@@ -114,19 +114,16 @@
                                {
                                    //下发执行工位
                                    device.SetValue(W_RgvCPDB.WorkStation, 4);
                                    device.SetValue(W_RgvCPDB.WcsTask1, tasksDown[0].TaskNum);
                                    device.SetValue(W_RgvCPDB.Qu1, tasksDown[0].CurrentAddress);
                                    device.SetValue(W_RgvCPDB.Fang1, tasksDown[0].NextAddress);
                                    tasksDown[0].HeightType = 1;
                                    _taskService.UpdateTask(tasksDown[0], TaskStatusEnum.RGV_Executing);
                                    Thread.Sleep(100);
                                    device.SetValue(W_RgvCPDB.WcsTask2, tasksDown[1].TaskNum);
                                    device.SetValue(W_RgvCPDB.Qu2, tasksDown[1].CurrentAddress);
                                    device.SetValue(W_RgvCPDB.Fang2, tasksDown[1].NextAddress);
                                    tasksDown[1].HeightType = 2;
                                    _taskService.UpdateTask(tasksDown[1], TaskStatusEnum.RGV_Executing);
                                    Thread.Sleep(100);
                                    taskSends.Add(tasksDown[0]);
                                    taskSends.Add(tasksDown[1]);
                                    ReceivedDone = true;
                                }
                            }
@@ -136,39 +133,53 @@
                                {
                                    //下发执行工位
                                    device.SetValue(W_RgvCPDB.WorkStation, 7);
                                    device.SetValue(W_RgvCPDB.WcsTask1, tasksDown[0].TaskNum);
                                    device.SetValue(W_RgvCPDB.Qu1, tasksDown[0].CurrentAddress);
                                    device.SetValue(W_RgvCPDB.Fang1, tasksDown[0].NextAddress);
                                    tasksDown[0].HeightType = 1;
                                    _taskService.UpdateTask(tasksDown[0], TaskStatusEnum.RGV_Executing);
                                    Thread.Sleep(100);
                                    device.SetValue(W_RgvCPDB.WcsTask2, tasksDown[1].TaskNum);
                                    device.SetValue(W_RgvCPDB.Qu2, tasksDown[1].CurrentAddress);
                                    device.SetValue(W_RgvCPDB.Fang2, tasksDown[1].NextAddress);
                                    tasksDown[1].HeightType = 2;
                                    _taskService.UpdateTask(tasksDown[1], TaskStatusEnum.RGV_Executing);
                                    Thread.Sleep(100);
                                    device.SetValue(W_RgvCPDB.WcsTask3, tasksDown[2].TaskNum);
                                    device.SetValue(W_RgvCPDB.Qu3, tasksDown[2].CurrentAddress);
                                    device.SetValue(W_RgvCPDB.Fang3, tasksDown[2].NextAddress);
                                    tasksDown[2].HeightType = 3;
                                    _taskService.UpdateTask(tasksDown[2], TaskStatusEnum.RGV_Executing);
                                    Thread.Sleep(100);
                                    taskSends.Add(tasksDown[0]);
                                    taskSends.Add(tasksDown[1]);
                                    taskSends.Add(tasksDown[2]);
                                    ReceivedDone = true;
                                }
                            }
                            //下发更新任务
                            if (ReceivedDone)
                            {
                                device.SetValue(W_RgvCPDB.TaskType, 4);
                                device.SetValue(W_RgvCPDB.TaskReceivedDone, 1);
                                foreach (var item in taskSends)
                                {
                                    _taskService.UpdateTask(item, TaskStatusEnum.RGV_Executing);
                                }
                            }
                        }
                    }
                    else if((rgvInfoRead.Mode == 5 || rgvInfoRead.Mode == 4) && rgvInfoRead.TaskDone == 3)
                    {
                        int taskNum = 0;
                        if (rgvInfoRead.RgvTask > 0)
                        {
                            taskNum = rgvInfoRead.RgvTask;
                        }
                        else if (rgvInfoRead.RgvEndTask > 0)
                        {
                            taskNum = rgvInfoRead.RgvEndTask;
                        }
                        else if (rgvInfoRead.RgvLastTask > 0)
                        {
                            taskNum = rgvInfoRead.RgvLastTask;
                        }
                        //获取任务
                        Dt_Task task = _taskRepository.QueryFirst(x =>x.TaskNum==rgvInfoRead.RgvTask &&  _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.RGV_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                        Dt_Task task = _taskRepository.QueryFirst(x =>x.TaskNum== taskNum &&  _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.RGV_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                        if (task != null)
                        {
                            //获取下一个节点的路由
@@ -178,18 +189,18 @@
                            task.DeviceCode = stationManger.StationDeviceCode;
                            device.SetValue(W_RgvCPDB.TaskReceivedDone, 2);
                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute);
                            WriteInfo(device.DeviceName, $"RGV任务完成,任务号{rgvInfoRead.RgvEndTask}");
                            WriteInfo(device.DeviceName, $"RGV任务完成,任务号{taskNum}");
                        }
                        else
                        {
                            WriteInfo(device.DeviceName, $"未找到RGV对应的结束任务{rgvInfoRead.RgvEndTask}");
                            WriteInfo(device.DeviceName, $"未找到RGV对应的结束任务{taskNum}");
                        }
                    }
                    else if (rgvInfoRead.TaskDone == 2 && rgvInfoWrite.TaskReceivedDone == 1)
                    {
                        device.SetValue(W_RgvCPDB.TaskReceivedDone, 0);
                    }
                    else if (rgvInfoRead.TaskDone == 0 && rgvInfoWrite.TaskReceivedDone == 2)
                    else if (rgvInfoRead.TaskDone != 3 && rgvInfoWrite.TaskReceivedDone == 2)
                    {
                        device.SetValue(W_RgvCPDB.TaskReceivedDone, 0);
                    }
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_BasicRepository/SendStationCodeRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicRepository
{
    /// <summary>
    /// å‘货车位信息仓储实现层
    /// </summary>
    public class SendStationCodeRepository : RepositoryBase<Dt_SendStationCode>, ISendStationCodeRepository
    {
        public SendStationCodeRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_BasicService/SendStationCodeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_BasicRepository;
using WIDESEA_Common.MaterielEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
{
    public class SendStationCodeService : ServiceBase<Dt_SendStationCode, ISendStationCodeRepository>, ISendStationCodeService
    {
        public ISendStationCodeRepository Repository => BaseDal;
        private readonly IMapper _mapper;
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public SendStationCodeService(ISendStationCodeRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
        {
            _mapper = mapper;
            _unitOfWorkManage = unitOfWorkManage;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_DTO/ERP/ERPProDeliveryDTO.cs
@@ -9,27 +9,27 @@
    public class DeliveryDetailItem
    {
        /// <summary>
        ///
        /// é”€å”®å‘货明细ID
        /// </summary>
        public int DetailId { get; set; }
        /// <summary>
        ///
        /// é”€å”®å•号
        /// </summary>
        public string SaleOrderNo { get; set; }
        /// <summary>
        ///
        /// å®¢æˆ·
        /// </summary>
        public string Customer { get; set; }
        /// <summary>
        ///
        /// ç‰©æ–™ç¼–码
        /// </summary>
        public string MaterialCode { get; set; }
        /// <summary>
        ///
        /// ç‰©æ–™æ‰¹æ¬¡
        /// </summary>
        public string MaterialLot { get; set; }
        /// <summary>
        ///
        /// ç‰©æ–™æ•°é‡
        /// </summary>
        public decimal MaterialQty { get; set; }
    }
@@ -37,7 +37,7 @@
    public class ERPProDeliveryDTO
    {
        /// <summary>
        ///
        /// é”€å”®å•号
        /// </summary>
        public string DeliveryCode { get; set; }
        /// <summary>
@@ -53,10 +53,14 @@
        /// </summary>
        public int DeliveryType { get; set; }
        /// <summary>
        ///
        /// è®¡åˆ’出库时间
        /// </summary>
        public string PlanDate { get; set; }
        /// <summary>
        /// å‘货车号
        /// </summary>
        public string CarCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Remark { get; set; }
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IBasicRepository/ISendStationCodeRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicRepository
{
    /// <summary>
    /// å‘货车位信息仓储接口层
    /// </summary>
    public interface ISendStationCodeRepository : IRepository<Dt_SendStationCode>
    {
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IBasicService/ISendStationCodeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
    public interface ISendStationCodeService : IService<Dt_SendStationCode>
    {
        ISendStationCodeRepository Repository { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IInboundService/IPurchaseOrderService.cs
@@ -24,11 +24,6 @@
        /// <returns></returns>
        WebResponseContent ReceivePurchaseReturn(ERPReturnOrderDTO eRPReturnOrderDTO);
        /// <summary>
        /// æŽ¥æ”¶ERP成品销售出库信息
        /// </summary>
        /// <returns></returns>
        WebResponseContent ReceiveProDeliveryOrder(ERPProDeliveryDTO eRPProDeliveryDTO);
        /// <summary>
        /// æŽ¥æ”¶ERP非生产领料信息
        /// </summary>
        /// <returns></returns>
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundService/IOutboundService.cs
@@ -32,5 +32,13 @@
        /// è€åŽ‚çº¿ä½“ç¼“å­˜ä¸šåŠ¡æŽ¥å£å±‚
        /// </summary>
        IOutLineViewService OutLineViewService { get; }
        /// <summary>
        /// æ–°åŽ‚æˆå“é”€å”®ä¸šåŠ¡æŽ¥å£å±‚
        /// </summary>
        IProDeliveryOrderService ProDeliveryOrderService { get; }
        /// <summary>
        /// æ–°åŽ‚æˆå“é”€å”®æ˜Žç»†ä¸šåŠ¡æŽ¥å£å±‚
        /// </summary>
        IProDeliveryOrderDetailService ProDeliveryOrderDetailService { get; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_IOutboundService/IProDeliveryOrderService.cs
@@ -3,7 +3,9 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.ERP;
using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
@@ -12,5 +14,16 @@
    public interface IProDeliveryOrderService : IService<Dt_ProDeliveryOrder>
    {
        IProDeliveryOrderRepository Repository { get; }
        /// <summary>
        /// æŽ¥æ”¶ERP成品销售出库信息
        /// </summary>
        /// <returns></returns>
        WebResponseContent ReceiveProDeliveryOrder(ERPProDeliveryDTO eRPProDeliveryDTO);
        /// <summary>
        /// ERP成品销售出库分配库存
        /// </summary>
        /// <returns></returns>
        (List<Dt_ProStockInfo>, List<Dt_ProDeliveryOrder>, List<Dt_ProDeliveryOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignProStockOutbound(List<Dt_ProDeliveryOrder> proDeliveryOrders, List<Dt_ProDeliveryOrderDetail> deliveryOrderDetails);
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -262,6 +262,12 @@
        /// <returns></returns>
        WebResponseContent CreateSGManualTasks(List<int> ids);
        /// <summary>
        /// åˆ›å»ºé”€å”®å‡ºåº“
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        WebResponseContent CreateProDeliveryTasks(List<int> ids);
        /// <summary>
        /// ç©ºæ‰˜å ç›˜å‡ºåº“
        /// </summary>
        /// <returns></returns>
@@ -276,6 +282,10 @@
        /// </summary>
        /// <returns></returns>
        WebResponseContent DisableStatus(int[] keys);
        /// <summary>
        /// æˆå“ç»„盘
        /// </summary>
        /// <returns></returns>
        WebResponseContent BoxingInBound(string stationCode, List<string> barCodes);
        /// <summary>
        /// æˆå“å…¥åº“扫码请求更新条码
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_InboundService/PurchaseOrderService.cs
@@ -312,114 +312,6 @@
            return content;
        }
        /// <summary>
        /// æŽ¥æ”¶ERP成品销售出库信息
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ReceiveProDeliveryOrder(ERPProDeliveryDTO eRPProDeliveryDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (eRPProDeliveryDTO == null)
                {
                    return content.Error("销售出库信息不能为空");
                }
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == eRPProDeliveryDTO.WarehouseCode);
                if (warehouse == null)
                {
                    return content.Error($"仓库信息不存在{eRPProDeliveryDTO.WarehouseCode}");
                }
                //获取所有物料
                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == warehouse.WarehouseId && x.MaterielInvOrgId == MaterielInvOrgEnum.新厂.ObjToInt());
                //获取所有客户
                List<Dt_CustomerInfo> customerInfos  = _basicRepository.CustomerInfoRepository.QueryData();
                //判断是否存在物料
                DeliveryDetailItem? deliveryDetailItem = eRPProDeliveryDTO.DeliveryDetail.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialCode));
                if (deliveryDetailItem != null)
                {
                    return content.Error($"物料信息{deliveryDetailItem.MaterialCode}不存在");
                }
                //判断是否存在客户
                DeliveryDetailItem? deliveryDetailCustom = eRPProDeliveryDTO.DeliveryDetail.FirstOrDefault(x => !customerInfos.Select(x => x.CustomerCode).Contains(x.Customer));
                if (deliveryDetailCustom != null)
                {
                    return content.Error($"客户信息{deliveryDetailCustom.Customer}不存在");
                }
                //获取所有销售出库信息
                List<Dt_ProDeliveryOrder> proDeliveryOrdersOld = BaseDal.Db.Queryable<Dt_ProDeliveryOrder>().Includes(x => x.Details).ToList();
                if (eRPProDeliveryDTO.OperateType == 1)
                {
                    //判断重复插入
                    Dt_ProDeliveryOrder? proDeliveryOrderOld = proDeliveryOrdersOld.FirstOrDefault(x => x.DeliveryCode == eRPProDeliveryDTO.DeliveryCode);
                    if (proDeliveryOrderOld != null)
                    {
                        return content.Error($"销售出库单号{proDeliveryOrderOld.DeliveryCode}信息已存在");
                    }
                    List<Dt_ProDeliveryOrderDetail> proDeliveryOrderDetails = eRPProDeliveryDTO.DeliveryDetail.Select(x => _mapper.Map<Dt_ProDeliveryOrderDetail>(x)).ToList();
                    Dt_ProDeliveryOrder proDeliveryOrderAdd = _mapper.Map<Dt_ProDeliveryOrder>(eRPProDeliveryDTO);
                    proDeliveryOrderDetails.ForEach(x =>
                    {
                        Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(t => t.MaterielCode == x.MaterialCode);
                        x.MaterielName = materielInfo?.MaterielName;
                        x.Unit = materielInfo?.MaterielUnit;
                    });
                    proDeliveryOrderAdd.Details = proDeliveryOrderDetails;
                    proDeliveryOrderAdd.WarehouseId = warehouse.WarehouseId;
                    //新增
                    BaseDal.Db.InsertNav(proDeliveryOrderAdd).Include(x => x.Details).ExecuteCommand();
                }
                //else if (eRPPurchaseOrderDTO.OperateType == 2)
                //{
                //    //判断是否存在
                //    Dt_UserInfo? userInfoOld = OlduserInfos.FirstOrDefault(x => x.Code == eRPUserInfoDTO.StaffCode);
                //    if (userInfoOld == null)
                //    {
                //        return content.Error($"更新工号{eRPUserInfoDTO.StaffCode},员工{eRPUserInfoDTO.StaffName}不存在");
                //    }
                //    Dt_UserInfo userInfo = _mapper.Map<Dt_UserInfo>(eRPUserInfoDTO);
                //    userInfo.Id = userInfoOld.Id;
                //    Sys_User user = _userRepository.QueryFirst(x => x.UserName == userInfo.Code);
                //    if (userInfoOld == null)
                //    {
                //        return content.Error($"更新工号{eRPUserInfoDTO.StaffCode},员工{eRPUserInfoDTO.StaffName},WMS账号不存在");
                //    }
                //    user.Enable = (byte)userInfo.State;
                //    user.UserTrueName = userInfo.Name;
                //    //更新
                //    BaseDal.UpdateData(userInfo);
                //    _userRepository.UpdateData(user);
                //}
                //else if (eRPPurchaseOrderDTO.OperateType == 3)
                //{
                //    //判断是否存在
                //    Dt_UserInfo? userInfoOld = OlduserInfos.FirstOrDefault(x => x.Code == eRPUserInfoDTO.StaffCode);
                //    if (userInfoOld == null)
                //    {
                //        return content.Error($"更新工号{eRPUserInfoDTO.StaffCode},员工{eRPUserInfoDTO.StaffName}不存在");
                //    }
                //    BaseDal.DeleteData(userInfoOld);
                //}
                else
                {
                    return content.Error("未找到操作类型");
                }
                //更新数据
                return content.OK("接收成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// æŽ¥æ”¶ERP非生产领料信息
        /// </summary>
        /// <returns></returns>
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_AGVStationInfo.cs
@@ -42,6 +42,12 @@
        public int Depth { get; set; }
        /// <summary>
        /// è½¦ä½å·
        /// </summary>
        [SugarColumn(IsNullable = true,Length = 50, ColumnDescription = "车位号")]
        public string CodeName { get; set; }
        /// <summary>
        /// æ˜¯å¦å ç”¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "是否占用")]
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Basic/Dt_SendStationCode.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// å‘货月台车位
    /// </summary>
    [SugarTable(nameof(Dt_SendStationCode), "发货月台车位")]
    public class Dt_SendStationCode : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// è½¦ä½
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "车位")]
        public string CodeName { get; set; }
        /// <summary>
        /// å½“前车号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "当前车号")]
        public string CarCode { get; set; }
        /// <summary>
        /// æ‰€å«å‘货单号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 255, ColumnDescription = "所含发货单号")]
        public string DeliveryCodes { get; set; }
        /// <summary>
        /// æ˜¯å¦å ç”¨
        /// </summary>
        [SugarColumn(IsNullable = false,  ColumnDescription = "是否占用")]
        public int IsOccupied { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutStockLockInfo.cs
@@ -10,7 +10,7 @@
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// å‡ºåº“详情(原料)
    /// å‡ºåº“详情
    /// </summary>
    [SugarTable(nameof(Dt_OutStockLockInfo), "出库详情")]
    public class Dt_OutStockLockInfo : BaseEntity
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_ProDeliveryOrder.cs
@@ -68,6 +68,18 @@
        public DateTime PlanDate { get; set; }
        /// <summary>
        /// å‘货车号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "发货车号")]
        public string CarCode { get; set; }
        /// <summary>
        /// æ´¾é€è½¦ä½
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "派送车位")]
        public string SendStationCode { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutboundService.cs
@@ -32,13 +32,23 @@
        /// è€åŽ‚çº¿ä½“ç¼“å­˜ä¸šåŠ¡æŽ¥å£å±‚
        /// </summary>
        public IOutLineViewService OutLineViewService { get; }
        public OutboundService(IOutMESOrderService outMESOrderService, IOutSGOrderService outSGOrderService, IOutSGOrderDetailService outSGOrderDetailService, IOutStockLockInfoService outStockLockInfoService, IOutLineViewService outLineViewService)
        /// <summary>
        /// æ–°åŽ‚æˆå“é”€å”®ä¸šåŠ¡æŽ¥å£å±‚
        /// </summary>
        public IProDeliveryOrderService ProDeliveryOrderService { get; }
        /// <summary>
        /// æ–°åŽ‚æˆå“é”€å”®æ˜Žç»†ä¸šåŠ¡æŽ¥å£å±‚
        /// </summary>
        public IProDeliveryOrderDetailService ProDeliveryOrderDetailService { get; }
        public OutboundService(IOutMESOrderService outMESOrderService, IOutSGOrderService outSGOrderService, IOutSGOrderDetailService outSGOrderDetailService, IOutStockLockInfoService outStockLockInfoService, IOutLineViewService outLineViewService, IProDeliveryOrderService proDeliveryOrderService, IProDeliveryOrderDetailService proDeliveryOrderDetailService)
        {
            OutMESOrderService = outMESOrderService;
            OutSGOrderService = outSGOrderService;
            OutSGOrderDetailService = outSGOrderDetailService;
            OutStockLockInfoService = outStockLockInfoService;
            OutLineViewService = outLineViewService;
            ProDeliveryOrderService = proDeliveryOrderService;
            ProDeliveryOrderDetailService = proDeliveryOrderDetailService;
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/ProDeliveryOrderService.cs
@@ -4,7 +4,13 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.MaterielEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.ERP;
using WIDESEA_IBasicRepository;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
@@ -17,10 +23,197 @@
        public IProDeliveryOrderRepository Repository => BaseDal;
        private readonly IBasicRepository _basicRepository;
        private readonly IMapper _mapper;
        public ProDeliveryOrderService(IProDeliveryOrderRepository BaseDal, IBasicRepository basicRepository, IMapper mapper) : base(BaseDal)
        private readonly IProDeliveryOrderDetailRepository _proDeliveryOrderDetailRepository;
        public ProDeliveryOrderService(IProDeliveryOrderRepository BaseDal, IBasicRepository basicRepository, IMapper mapper, IProDeliveryOrderDetailRepository proDeliveryOrderDetailRepository) : base(BaseDal)
        {
            _basicRepository = basicRepository;
            _mapper = mapper;
            _proDeliveryOrderDetailRepository = proDeliveryOrderDetailRepository;
        }
        /// <summary>
        /// æŽ¥æ”¶ERP成品销售出库信息
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ReceiveProDeliveryOrder(ERPProDeliveryDTO eRPProDeliveryDTO)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (eRPProDeliveryDTO == null)
                {
                    return content.Error("销售出库信息不能为空");
                }
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == eRPProDeliveryDTO.WarehouseCode);
                if (warehouse == null)
                {
                    return content.Error($"仓库信息不存在{eRPProDeliveryDTO.WarehouseCode}");
                }
                //获取所有物料
                List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData(x => x.WarehouseId == warehouse.WarehouseId && x.MaterielInvOrgId == MaterielInvOrgEnum.新厂.ObjToInt());
                //获取所有客户
                List<Dt_CustomerInfo> customerInfos = _basicRepository.CustomerInfoRepository.QueryData();
                //判断是否存在物料
                DeliveryDetailItem? deliveryDetailItem = eRPProDeliveryDTO.DeliveryDetail.FirstOrDefault(x => !materielInfos.Select(x => x.MaterielCode).Contains(x.MaterialCode));
                if (deliveryDetailItem != null)
                {
                    return content.Error($"物料信息{deliveryDetailItem.MaterialCode}不存在");
                }
                //判断是否存在客户
                DeliveryDetailItem? deliveryDetailCustom = eRPProDeliveryDTO.DeliveryDetail.FirstOrDefault(x => !customerInfos.Select(x => x.CustomerCode).Contains(x.Customer));
                if (deliveryDetailCustom != null)
                {
                    return content.Error($"客户信息{deliveryDetailCustom.Customer}不存在");
                }
                //获取所有销售出库信息
                List<Dt_ProDeliveryOrder> proDeliveryOrdersOld = BaseDal.Db.Queryable<Dt_ProDeliveryOrder>().Includes(x => x.Details).ToList();
                if (eRPProDeliveryDTO.OperateType == 1)
                {
                    //判断重复插入
                    Dt_ProDeliveryOrder? proDeliveryOrderOld = proDeliveryOrdersOld.FirstOrDefault(x => x.DeliveryCode == eRPProDeliveryDTO.DeliveryCode);
                    if (proDeliveryOrderOld != null)
                    {
                        return content.Error($"销售出库单号{proDeliveryOrderOld.DeliveryCode}信息已存在");
                    }
                    List<Dt_ProDeliveryOrderDetail> proDeliveryOrderDetails = eRPProDeliveryDTO.DeliveryDetail.Select(x => _mapper.Map<Dt_ProDeliveryOrderDetail>(x)).ToList();
                    Dt_ProDeliveryOrder proDeliveryOrderAdd = _mapper.Map<Dt_ProDeliveryOrder>(eRPProDeliveryDTO);
                    proDeliveryOrderDetails.ForEach(x =>
                    {
                        Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(t => t.MaterielCode == x.MaterialCode);
                        x.MaterielName = materielInfo?.MaterielName;
                        x.Unit = materielInfo?.MaterielUnit;
                    });
                    proDeliveryOrderAdd.Details = proDeliveryOrderDetails;
                    proDeliveryOrderAdd.WarehouseId = warehouse.WarehouseId;
                    //新增
                    BaseDal.Db.InsertNav(proDeliveryOrderAdd).Include(x => x.Details).ExecuteCommand();
                }
                else if (eRPProDeliveryDTO.OperateType == 2)
                {
                    //判断是否存在
                    Dt_ProDeliveryOrder? proDeliveryOrderOld = proDeliveryOrdersOld.FirstOrDefault(x => x.DeliveryCode == eRPProDeliveryDTO.DeliveryCode);
                    if (proDeliveryOrderOld == null)
                    {
                        return content.Error($"销售出库单号{eRPProDeliveryDTO.DeliveryCode}信息不存在");
                    }
                    if (proDeliveryOrderOld.ProDeliveryStatus != OutOrderStatusEnum.未开始.ObjToInt())
                    {
                        return content.Error($"销售出库单号{proDeliveryOrderOld.DeliveryCode}状态为{(OutOrderStatusEnum)proDeliveryOrderOld.ProDeliveryStatus}");
                    }
                    List<Dt_ProDeliveryOrderDetail> proDeliveryOrderDetails = eRPProDeliveryDTO.DeliveryDetail.Select(x => _mapper.Map<Dt_ProDeliveryOrderDetail>(x)).ToList();
                    Dt_ProDeliveryOrder proDeliveryOrder = _mapper.Map<Dt_ProDeliveryOrder>(eRPProDeliveryDTO);
                    proDeliveryOrder.Id = proDeliveryOrderOld.Id;
                    proDeliveryOrderDetails.ForEach(x =>
                    {
                        Dt_MaterielInfo? materielInfo = materielInfos.FirstOrDefault(t => t.MaterielCode == x.MaterialCode);
                        x.MaterielName = materielInfo?.MaterielName;
                        x.Unit = materielInfo?.MaterielUnit;
                    });
                    proDeliveryOrder.Details = proDeliveryOrderDetails;
                    proDeliveryOrder.WarehouseId = warehouse.WarehouseId;
                    //更新
                    BaseDal.Db.UpdateNav(proDeliveryOrder).Include(x => x.Details).ExecuteCommand();
                }
                else if (eRPProDeliveryDTO.OperateType == 3)
                {
                    //判断是否存在
                    Dt_ProDeliveryOrder? proDeliveryOrderOld = proDeliveryOrdersOld.FirstOrDefault(x => x.DeliveryCode == eRPProDeliveryDTO.DeliveryCode);
                    if (proDeliveryOrderOld == null)
                    {
                        return content.Error($"销售出库单号{eRPProDeliveryDTO.DeliveryCode}信息不存在");
                    }
                    if (proDeliveryOrderOld.ProDeliveryStatus != OutOrderStatusEnum.未开始.ObjToInt())
                    {
                        return content.Error($"销售出库单号{proDeliveryOrderOld.DeliveryCode}状态为{(OutOrderStatusEnum)proDeliveryOrderOld.ProDeliveryStatus}");
                    }
                    //删除
                    BaseDal.Db.DeleteNav(proDeliveryOrderOld).Include(x => x.Details).ExecuteCommand();
                }
                else
                {
                    return content.Error("未找到操作类型");
                }
                //更新数据
                return content.OK("接收成功");
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// ERP成品销售出库分配库存
        /// </summary>
        public (List<Dt_ProStockInfo>, List<Dt_ProDeliveryOrder>, List<Dt_ProDeliveryOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignProStockOutbound(List<Dt_ProDeliveryOrder> proDeliveryOrders,List<Dt_ProDeliveryOrderDetail> deliveryOrderDetails)
        {
            List<Dt_ProStockInfo> outStocks = new List<Dt_ProStockInfo>();
            //出库详情
            List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
            //货位存储
            List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
            //foreach (var item in )
            //{
            //}
            //foreach (var item in deliveryOrderDetails)
            //{
            //    decimal needQuantity = item.ReqQuantity;
            //    //获取可用库存
            //    List<Dt_ProStockInfo> stockInfos = _stockService.ProStockInfoService.GetUseableStocks(item.MaterialCode, WarehouseEnum.LLDCP.ObjToInt()).Where(x => !outStocks.Select(x => x.PalletCode).Contains(x.PalletCode)).ToList();
            //    if (!stockInfos.Any())
            //    {
            //        continue;
            //    }
            //    //分配实际库存
            //    List<Dt_ProStockInfo> autoAssignStocks = _stockService.ProStockInfoService.GetOutboundStocks(stockInfos, needQuantity);
            //    //添加库存分配
            //    outStocks.AddRange(autoAssignStocks);
            //    //订单数量
            //    decimal orderQuantity = item.ReqQuantity;
            //    bool assignStop = true;
            //    while (assignStop)
            //    {
            //        //出库订单明细已分配数量
            //        decimal detailAssignQuantity = outStockLockInfos.Where(x => x.OrderDetailId == item.OutDetailId).Sum(x => x.AssignQuantity);
            //        decimal orderDetailNeedQuantity = item.ReqQuantity - detailAssignQuantity;
            //        decimal useStockLength = autoAssignStocks[0].proStockInfoDetails
            //            .Sum(x => x.StockQty);
            //        if (orderDetailNeedQuantity > useStockLength)
            //        {
            //            //生成详情
            //            Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(item, autoAssignStocks[0], useStockLength);
            //            outStockLockInfos.Add(outStockLockInfo);
            //            item.AssignTotalUsage += useStockLength;
            //            autoAssignStocks.Remove(autoAssignStocks[0]);
            //        }
            //        else
            //        {
            //            //生成详情
            //            Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(item, autoAssignStocks[0], orderDetailNeedQuantity);
            //            outStockLockInfos.Add(outStockLockInfo);
            //            item.AssignTotalUsage = orderQuantity;
            //            autoAssignStocks.Remove(autoAssignStocks[0]);
            //            assignStop = false;
            //        }
            //    }
            //    item.OutMESOrderStatus = OutOrderStatusEnum.出库中.ObjToInt();
            //    locationInfos.AddRange(_basicRepository.LocationInfoRepository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
            //}
            return (outStocks, proDeliveryOrders, deliveryOrderDetails, outStockLockInfos, locationInfos);
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -975,7 +975,7 @@
                {
                    item.Count -= count.Count;
                }
                if (item.Count >= 50 && count?.Count<=2)
                if (item.Count >= 50 && count?.Count<=1)
                {
                    return item.RoadwayNo;
                }
@@ -2158,6 +2158,10 @@
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// æˆå“ç»„盘
        /// </summary>
        /// <returns></returns>
        public WebResponseContent BoxingInBound(string stationCode,List<string> barCodes)
        {
            WebResponseContent content = new WebResponseContent();
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -61,7 +61,7 @@
                }
                tasks.ForEach(x =>
                {
                    x.Grade = 99;
                    x.Grade = 1;
                });
                stockInfos.ForEach(x =>
                {
@@ -907,7 +907,6 @@
                        item.StockLength = 0;
                        item.MaterielWeight = 0;
                        item.MaterielThickness = 0;
                        item.MaterielWide = 0;
                        item.StockOutLength = 0;
                        item.IsFull = WhetherEnum.True.ObjToInt();
                        item.IsPick = WhetherEnum.True.ObjToInt();
@@ -960,6 +959,76 @@
            }
            return content;
        }
        /// <summary>
        /// åˆ›å»ºé”€å”®å‡ºåº“
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public WebResponseContent CreateProDeliveryTasks(List<int> ids)
        {
            WebResponseContent content=new WebResponseContent();
            try
            {
                ////获取销售出库单据
                //List<Dt_ProDeliveryOrder> deliveryOrders = BaseDal.Db.Queryable<Dt_ProDeliveryOrder>().Where(x=> ids.Contains(x.Id)).Includes(x=>x.Details).ToList();
                //Dt_ProDeliveryOrder? proDeliveryOrder = deliveryOrders.FirstOrDefault(x => x.ProDeliveryStatus != OutOrderStatusEnum.未开始.ObjToInt());
                //if (proDeliveryOrder != null)
                //{
                //    return content.Error($"单号{proDeliveryOrder.DeliveryCode},订单状态{(OutOrderStatusEnum)proDeliveryOrder.ProDeliveryStatus}");
                //}
                //List<Dt_ProDeliveryOrderDetail> proDeliveryOrderDetails = deliveryOrders.SelectMany(x=>x.Details).ToList();
                //if (!proDeliveryOrderDetails.Any())
                //{
                //    throw new Exception($"未找到需出库的明细信息");
                //}
                //_unitOfWorkManage.BeginTran();
                //List<Dt_Task> tasks = new List<Dt_Task>();
                //List<Dt_ProStockInfo>? stockInfos = null;
                //List<Dt_ProDeliveryOrder>? Orders = null;
                //List<Dt_ProDeliveryOrderDetail>? OrderDetails = null;
                //List<Dt_OutStockLockInfo>? outStockLockInfos = null;
                //List<Dt_LocationInfo>? locationInfos = null;
                //{
                //    //分配库存
                //    (List<Dt_ProStockInfo>, List<Dt_ProDeliveryOrder>, List<Dt_ProDeliveryOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.ProDeliveryOrderService.AssignProStockOutbound(deliveryOrders, proDeliveryOrderDetails);
                //    if (result.Item1 != null && result.Item1.Count > 0)
                //    {
                //        //创建任务
                //        tasks = GetTasks(result.Item1, result.Item3);
                //        result.Item3.ForEach(x =>
                //        {
                //            x.Status = OutLockStockStatusEnum.出库中.ObjToInt();
                //        });
                //        stockInfos = result.Item1;
                //        Orders = result.Item2;
                //        outStockLockInfos = result.Item3;
                //        locationInfos = result.Item4;
                //    }
                //}
                //if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0)
                //{
                //    BaseDal.AddData(tasks);
                //    stockInfos.ForEach(x =>
                //    {
                //        x.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
                //    });
                //    WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks);
                //    if (!contentResponse.Status)
                //    {
                //        _unitOfWorkManage.RollbackTran();
                //        return content.Error(contentResponse.Message);
                //    }
                //}
                //_unitOfWorkManage.CommitTran();
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                content.Error(ex.Message);
            }
            return content;
        }
        List<string> GradeCodes = new List<string>
        {
            "001"
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/Basic/SendStationCodeController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Basic
{
    /// <summary>
    /// å‘货车位信息
    /// </summary>
    [Route("api/SendStationCode")]
    [ApiController]
    public class SendStationCodeController : ApiBaseController<ISendStationCodeService, Dt_SendStationCode>
    {
        public SendStationCodeController(ISendStationCodeService service) : base(service)
        {
        }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs
@@ -16,6 +16,7 @@
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.ERP
@@ -30,12 +31,14 @@
        private readonly IBasicService _basicService;
        private readonly IInvokeERPService _invokeERPService;
        private readonly IInboundService _inboundService;
        private readonly IOutboundService _outboundService;
        public ErpController(IBasicService basicService,IInvokeERPService invokeERPService, IInboundService inboundService)
        public ErpController(IBasicService basicService,IInvokeERPService invokeERPService, IInboundService inboundService, IOutboundService outboundService)
        {
            _basicService = basicService;
            _invokeERPService = invokeERPService;
            _inboundService = inboundService;
            _outboundService = outboundService;
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸç‰©æ–™
@@ -109,7 +112,7 @@
        public WebResponseContent ProDeliveryOrder([FromBody] ERPRoot<ERPProDeliveryDTO> eRPRoot)
        {
            return _inboundService.PurchaseOrderService.ReceiveProDeliveryOrder(eRPRoot.Content);
            return _outboundService.ProDeliveryOrderService.ReceiveProDeliveryOrder(eRPRoot.Content);
        }
        /// <summary>
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -148,7 +148,16 @@
        {
            return Service.CreateSGManualTasks(ids);
        }
        /// <summary>
        /// åˆ›å»ºé”€å”®å‡ºåº“
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        [HttpPost, Route("CreateSGManualTasks"), AllowAnonymous]
        public WebResponseContent CreateProDeliveryTasks([FromBody] List<int> ids)
        {
            return Service.CreateProDeliveryTasks(ids);
        }
        /// <summary>
        /// ä¿®æ”¹ä»»åŠ¡çŠ¶æ€
        /// </summary>
ÏîÄ¿×ÊÁÏ/±ä¸ü¹ÜÀí/ÁúÀûµÃÏîÄ¿ÐèÇó±ä¸üÈ·ÈÏÊé-20260401.doc
Binary files differ
ÏîÄ¿×ÊÁÏ/±ä¸ü¹ÜÀí/ÁúÀûµÃÏîÄ¿ÐèÇó±ä¸üÈ·ÈÏÊé-20260402.doc
Binary files differ
ÏîÄ¿×ÊÁÏ/±ä¸ü¹ÜÀí/ÁúÀûµÃÏîÄ¿ÐèÇó±ä¸üÈ·ÈÏÊé-20260416.doc
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿ÚЭÒé/²©Ë¹Í¨ÀûÍØ½Ó¿Ú.V2.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿ÚЭÒé/ÁúÀûµÃRCS²æ³µAGVÈ·ÈÏÄ¿±êµã½Ó¿Ú.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿ÚЭÒé/ÁúÀûµÃRCS¶¥ÉýAGVÈ·ÈÏÄ¿±êµã½Ó¿Ú.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/¶þÂ¥»·Ïß20250715.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/³ÉÆ·ÊäËÍÏßͨѶЭÒé_20250707.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÁúÀûµÃÉ豸ͨѶЭÒé.xls
Binary files differ