wangxinhui
2026-03-17 89bccb9b8fb1070f7ac5f36510c868fecead9384
更新
已复制4个文件
已重命名1个文件
已修改6个文件
102 ■■■■■ 文件已修改
项目代码/WCS/WCSClient/src/api/http.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/PackaxisTaskService.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPH.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob1_CP.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob2_CP.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob3_CP.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob4_CP.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/码垛/MDJob5_CP.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSClient/src/api/http.js
@@ -12,8 +12,8 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
    axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    // axios.defaults.baseURL = 'http://192.168.35.3:9281/';
    // axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    axios.defaults.baseURL = 'http://192.168.35.3:9281/';
}
else if (process.env.NODE_ENV == 'debug') {
    axios.defaults.baseURL = 'http://127.0.0.1:8098/';
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/PackaxisTaskService.cs
@@ -60,12 +60,14 @@
                    {
                        return content.Error($"未找到条码{barCode}");
                    }
                    List<Dt_StationPackInfo> stationPackInfos = _stationPackInfoRepository.QueryData();
                    List<Dt_StationPackInfo> stationPackInfos = _stationPackInfoRepository.Db.Queryable<Dt_StationPackInfo>().ToList();
                    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)
                    {
                        Dt_PackaxisTask packaxisTask = new Dt_PackaxisTask()
                        packaxisTask = new Dt_PackaxisTask()
                        {
                            DeviceCode = deviceCode,
                            SourceAddress = "2421",
@@ -83,22 +85,21 @@
                        stationPackInfo.AssignNum += 1;
                        stationPackInfo.ExecutingNum += 1;
                        packinfo.PackStatus = StationOccupiedEnum.Sure.ObjToInt();
                        _unitOfWorkManage.BeginTran();
                        //更新码垛执行工位
                        _stationPackInfoRepository.UpdateData(stationPackInfo);
                        //更新待码垛信息表
                        _packinfoRepository.UpdateData(packinfo);
                        //添加码垛任务
                        BaseDal.AddData(packaxisTask);
                        _unitOfWorkManage.CommitTran();
                        return content.OK(barCode, packaxisTask);
                    }
                    else//分配新工位
                    {
                        //获取当前空盘准备的码垛工位
                        List<string> stations = _stationMangerRepository.QueryData(x => x.StationDeviceCode == "CLC_CP" && x.IsOccupied == StationOccupiedEnum.None.ObjToInt()).Select(x => x.StationCode).ToList();
                        //获取码垛配置表查询可分配并已配置的码垛工位
                        List<Dt_Packaxis> packaxes = _packaxisRepository.QueryData(x => x.PackType == packinfo.PackType && stations.Contains(x.StationCode));
                        List<Dt_Packaxis> packaxes = _packaxisRepository.Db.Queryable<Dt_Packaxis>().Where(x => x.PackType == packinfo.PackType && stations.Contains(x.StationCode)).ToList();
                        if (packaxes.Count == 0)
                        {
                            return content.Error("未找到可分配码垛配置");
@@ -114,7 +115,7 @@
                        packInfoAssign.MakeCode = packinfo.MakeCode;
                        packInfoAssign.MaterielCode = packInfoAssign.MaterielCode;
                        packInfoAssign.PackNum = packaxes.FirstOrDefault(x => x.StationCode == packInfoAssign.StationCode).PackNum;
                        Dt_PackaxisTask packaxisTask = new Dt_PackaxisTask()
                        packaxisTask = new Dt_PackaxisTask()
                        {
                            DeviceCode = deviceCode,
                            SourceAddress = "2421",
@@ -132,16 +133,15 @@
                        packInfoAssign.AssignNum += 1;
                        packInfoAssign.ExecutingNum += 1;
                        packinfo.PackStatus = StationOccupiedEnum.Sure.ObjToInt();
                        _unitOfWorkManage.BeginTran();
                        //更新码垛执行工位
                        _stationPackInfoRepository.UpdateData(packInfoAssign);
                        //更新待码垛信息表
                        _packinfoRepository.UpdateData(packinfo);
                        //添加码垛任务
                        BaseDal.AddData(packaxisTask);
                        _unitOfWorkManage.CommitTran();
                        return content.OK(barCode, packaxisTask);
                    }
                    _unitOfWorkManage.CommitTran();
                    return content.OK(barCode, packaxisTask);
                }
                catch (Exception ex)
                {
@@ -263,7 +263,6 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                    Dt_PackaxisTask packaxisTask = BaseDal.QueryFirst(x => x.PackTaskNum == PackTaskNum);
                    if(packaxisTask == null)
                    {
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPH.cs
@@ -100,6 +100,7 @@
                                        WriteInfo($"线程 {Thread.CurrentThread.ManagedThreadId}分垛口","开始执行");
                                        while (true)
                                        {
                                            //WriteInfo($"分垛口运行时间" , $"开始时间:" + DateTime.Now.ToString("HH:mm:ss.fff"));
                                            if (RequestIn != null)
                                            {
                                                DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -110,6 +111,7 @@
                                                    //码垛环线请求任务 
                                                    if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.R_BoxCode) && conveyorLineInfoRead.R_Request == 1)
                                                    {
                                                        //WriteInfo($"分垛口运行时间", $"{conveyorLineInfoRead.R_BoxCode}请求" + DateTime.Now.ToString("HH:mm:ss.fff"));
                                                        //判断是否任务已经存在
                                                        Dt_PackaxisTask packaxisTask = _packaxisTaskRepository.Db.Queryable<Dt_PackaxisTask>().Where(x => x.BarCode == conveyorLineInfoRead.R_BoxCode.Trim() && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()).First();
                                                        if (packaxisTask != null)
@@ -120,8 +122,9 @@
                                                            device.SetValue(W_CLineCPHDB.W_Long, packaxisTask.PackLength, RequestIn.StationCode);
                                                            device.SetValue(W_CLineCPHDB.W_Wide, packaxisTask.PackWidth, RequestIn.StationCode);
                                                            device.SetValue(W_CLineCPHDB.W_High, packaxisTask.PackHeight, RequestIn.StationCode);
                                                            device.SetValue(W_CLineCPHDB.W_TMID, packaxisTask.BarCode, RequestIn.StationCode);
                                                            device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode.Trim(), RequestIn.StationCode);
                                                            device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode);
                                                            //WriteInfo($"分垛口运行时间", $"{conveyorLineInfoRead.R_BoxCode}请求完成" + DateTime.Now.ToString("HH:mm:ss.fff"));
                                                        }
                                                        else
                                                        {
@@ -136,8 +139,9 @@
                                                                device.SetValue(W_CLineCPHDB.W_Long, _PackaxisTask.PackLength, RequestIn.StationCode);
                                                                device.SetValue(W_CLineCPHDB.W_Wide, _PackaxisTask.PackWidth, RequestIn.StationCode);
                                                                device.SetValue(W_CLineCPHDB.W_High, _PackaxisTask.PackHeight, RequestIn.StationCode);
                                                                device.SetValue(W_CLineCPHDB.W_TMID, _PackaxisTask.BarCode, RequestIn.StationCode);
                                                                device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode.Trim(), RequestIn.StationCode);
                                                                device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode);
                                                                //WriteInfo($"分垛口运行时间", $"{conveyorLineInfoRead.R_BoxCode}请求完成" + DateTime.Now.ToString("HH:mm:ss.fff"));
                                                                WebResponseContent content = _taskService.MESBoxCodeNotice(conveyorLineInfoRead.R_BoxCode.Trim());
                                                                if (content.Status)
                                                                {
@@ -161,6 +165,7 @@
                                                    WriteError(RequestIn.StationName, $"未找到设备子编号{RequestIn.StationCode}的协议信息");
                                                }
                                            }
                                            //WriteInfo($"分垛口运行时间", $"结束时间:" + DateTime.Now.ToString("HH:mm:ss.fff"));
                                        }
                                    }
                                    catch (Exception ex)
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob1_CP.cs
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs" copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob1_CP.cs"
Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ
@@ -36,7 +36,7 @@
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class MDJob_CP : JobBase, IJob
    public class MDJob1_CP : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly IStationMangerRepository _stationMangerRepository;
@@ -46,7 +46,7 @@
        private readonly IStationPackInfoRepository _stationPackInfoRepository;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        public MDJob1_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        {
            _cacheService = cacheService;
            _stationMangerRepository = stationMangerRepository;
@@ -74,6 +74,10 @@
                if (flag && value != null)
                {
                    OtherDevice device = (OtherDevice)value;
                    if (!device.IsConnected)
                    {
                        return Task.CompletedTask;
                    }
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt());
                    //获取协议
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -199,7 +203,7 @@
            }
            catch (Exception ex)
            {
                WriteError(nameof(MDJob_CP),ex.Message);
                WriteError(nameof(MDJob1_CP),ex.Message);
            }
            return Task.CompletedTask;
        }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob2_CP.cs
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs" copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob2_CP.cs"
Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ
@@ -36,7 +36,7 @@
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class MDJob_CP : JobBase, IJob
    public class MDJob2_CP : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly IStationMangerRepository _stationMangerRepository;
@@ -46,7 +46,7 @@
        private readonly IStationPackInfoRepository _stationPackInfoRepository;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        public MDJob2_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        {
            _cacheService = cacheService;
            _stationMangerRepository = stationMangerRepository;
@@ -74,6 +74,10 @@
                if (flag && value != null)
                {
                    OtherDevice device = (OtherDevice)value;
                    if (!device.IsConnected)
                    {
                        return Task.CompletedTask;
                    }
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt());
                    //获取协议
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -199,7 +203,7 @@
            }
            catch (Exception ex)
            {
                WriteError(nameof(MDJob_CP),ex.Message);
                WriteError(nameof(MDJob2_CP),ex.Message);
            }
            return Task.CompletedTask;
        }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob3_CP.cs
ÎļþÃû´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ÐÞ¸Ä
@@ -36,7 +36,7 @@
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class MDJob_CP : JobBase, IJob
    public class MDJob3_CP : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly IStationMangerRepository _stationMangerRepository;
@@ -46,7 +46,7 @@
        private readonly IStationPackInfoRepository _stationPackInfoRepository;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        public MDJob3_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        {
            _cacheService = cacheService;
            _stationMangerRepository = stationMangerRepository;
@@ -74,6 +74,10 @@
                if (flag && value != null)
                {
                    OtherDevice device = (OtherDevice)value;
                    if (!device.IsConnected)
                    {
                        return Task.CompletedTask;
                    }
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt());
                    //获取协议
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -199,7 +203,7 @@
            }
            catch (Exception ex)
            {
                WriteError(nameof(MDJob_CP),ex.Message);
                WriteError(nameof(MDJob3_CP),ex.Message);
            }
            return Task.CompletedTask;
        }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob4_CP.cs
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs" copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob4_CP.cs"
Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ
@@ -36,7 +36,7 @@
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class MDJob_CP : JobBase, IJob
    public class MDJob4_CP : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly IStationMangerRepository _stationMangerRepository;
@@ -46,7 +46,7 @@
        private readonly IStationPackInfoRepository _stationPackInfoRepository;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        public MDJob4_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        {
            _cacheService = cacheService;
            _stationMangerRepository = stationMangerRepository;
@@ -74,6 +74,10 @@
                if (flag && value != null)
                {
                    OtherDevice device = (OtherDevice)value;
                    if (!device.IsConnected)
                    {
                        return Task.CompletedTask;
                    }
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt());
                    //获取协议
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -199,7 +203,7 @@
            }
            catch (Exception ex)
            {
                WriteError(nameof(MDJob_CP),ex.Message);
                WriteError(nameof(MDJob4_CP),ex.Message);
            }
            return Task.CompletedTask;
        }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob5_CP.cs
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs" copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob5_CP.cs"
Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ
@@ -36,7 +36,7 @@
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class MDJob_CP : JobBase, IJob
    public class MDJob5_CP : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly IStationMangerRepository _stationMangerRepository;
@@ -46,7 +46,7 @@
        private readonly IStationPackInfoRepository _stationPackInfoRepository;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        public MDJob5_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository,  IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository)
        {
            _cacheService = cacheService;
            _stationMangerRepository = stationMangerRepository;
@@ -74,6 +74,10 @@
                if (flag && value != null)
                {
                    OtherDevice device = (OtherDevice)value;
                    if (!device.IsConnected)
                    {
                        return Task.CompletedTask;
                    }
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt());
                    //获取协议
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -199,7 +203,7 @@
            }
            catch (Exception ex)
            {
                WriteError(nameof(MDJob_CP),ex.Message);
                WriteError(nameof(MDJob5_CP),ex.Message);
            }
            return Task.CompletedTask;
        }
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_Model/Models/Outbound/Dt_OutSGOrder.cs
@@ -95,6 +95,7 @@
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(Dt_OutSGOrderDetail.OutSGOrderId), nameof(Id))]
        public List<Dt_OutSGOrderDetail> Details { get; set; }
        [SugarColumn(IsIgnore = true)]
        public string MaterialLackStatus { get; set; }
    }
}
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs
@@ -5,6 +5,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
@@ -80,8 +81,17 @@
                List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseOldCacheStocks(item.MaterialNo, item.Width).Where(x => !palletCodes.Contains(x.PalletCode)).ToList() ?? new List<Dt_StockInfo>();
                //获取立库可用库存
                stockInfos.AddRange(_stockService.StockInfoService.GetUseableStocks(item.MaterialNo, item.Width, outBSTOrders.FirstOrDefault().WarehouseId).Where(x=>!palletCodes.Contains(x.PalletCode)).ToList());
                //获取所有该物料单据
                List<Dt_OutSGOrderDetail> details = outboundOrderDetails.Where(x => x.MaterialNo == item.MaterialNo && x.Width == item.Width && x.MachineName == item.MachineName).ToList();
                if (!stockInfos.Any())
                {
                    //没有可用库存,标记为缺料
                    foreach (var detail in details)
                    {
                        detail.OutSGOrderDetailStatus = OutOrderStatusEnum.缺料.ObjToInt();
                    }
                    message += $"物料:{item.MaterialNo},幅宽:{item.Width}无库存;";
                    continue;
                }
@@ -90,8 +100,7 @@
                List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutOldStocks(stockInfos, needQuantity).ToList();
                //添加库存分配
                outStocks.AddRange(autoAssignStocks);
                //获取所有该物料单据
                List<Dt_OutSGOrderDetail> details = outboundOrderDetails.Where(x => x.MaterialNo == item.MaterialNo && x.Width == item.Width && x.MachineName == item.MachineName).ToList();
                autoAssignStocks.ForEach(x =>
                {
                    x.StockOutLength = 0;
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -975,6 +975,10 @@
                {
                    item.Count -= count.Count;
                }
                if (item.Count >= 50 && count?.Count<=2)
                {
                    return item.RoadwayNo;
                }
            }
            return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
        }