huangxiaoqiang
2025-02-09 d40b63ad393e8af2a6f50ac055f582727dba6f28
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -44,7 +44,7 @@
        //var station = stationManagers.Select(x => x.stationChildCode).ToList();
        //// 获取WCSip地址相关配置
        //var wcsIpAddrss = GetWCSIpAddress();
        var wcsIpAddrss = GetWCSIpAddress();
        //if (wcsIpAddrss == null)
        //{
        //    throw new InvalidOperationException("WCS IP 未配置");
@@ -54,6 +54,20 @@
        //content = JsonConvert.DeserializeObject<WebResponseContent>(abc);
        //var num = content.Data.ObjToInt();
        //如果当前库内存在比当前时间的对应产线的料 则入库至常温3
        DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(x => x.AreaCode == "CWSC3" && x.IsFull == true && x.ProductionLine == input.ProductionLine && x.OutboundTime < DateTime.Now);
        if (stockInfo != null)
        {
            var config = _configService.GetByConfigKey("SYS_InStacker", "CW3InStacker");
            var strings = config.ConfigValue.Split(',').ToList();
            // 入库送至常温3
            var resultContent = await CreateNewTask(input, strings);
            if (resultContent.Status)
            {
                await _boxingInfoRepository.AddDataNavAsync(boxing);
            }
            return resultContent;
        }
        // TODO 判断在途数量
        var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
@@ -101,7 +115,11 @@
        if (!content.Status) return content.Error("工艺申请失败");
        var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString());
        if (!resultProcessApply.Success) return content.Error("工艺申请失败");
        if (!resultProcessApply.Success)
        {
            return await HandleErrorCells(input, area);
            //return content.Error("工艺申请失败");
        }
        var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault().Number.ToInt32();
        foreach (var item in resultProcessApply.ProcessInfo)