1
huanghongfeng
2025-06-06 f5b8c1ae89286dada20ea433ffac84f4c9e72a29
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -12,6 +12,7 @@
using MailKit.Search;
using System.Reflection.Metadata;
using static WIDESEA_ITaskInfoService.ITaskService;
using WIDESEA_Common.Log;
namespace WIDESEA_TaskInfoService
{
@@ -267,16 +268,20 @@
                            if (dt_Inbound.Startingcolumn != 0 || dt_Inbound.Terminationcolumn != 0)
                            {
                                newLocation = _basicService.LocationInfoService.GetLocation2(newSourceAddress.RoadwayNo, Locationtype, dt_Inbound.Startingcolumn, dt_Inbound.Terminationcolumn);
                                WriteLog.GetLog("库位获取日志,GetLocation").Write($"原材料入库获取库位,传入值,RoadwayNo:{newSourceAddress.RoadwayNo},类型:{Locationtype},区间为:{dt_Inbound.Startingcolumn}与{dt_Inbound.Terminationcolumn}=============获取到的库位为:{newLocation.LocationCode}", $"库位获取日志,GetLocation2");
                            }
                            else
                            {
                                newLocation = _basicService.LocationInfoService.GetLocation(newSourceAddress.RoadwayNo, Locationtype);
                                WriteLog.GetLog("库位获取日志,GetLocation").Write($"原材料入库获取库位,传入值,RoadwayNo:{newSourceAddress.RoadwayNo},类型:{Locationtype},=============获取到的库位为:{newLocation.LocationCode}", $"库位获取日志,GetLocation,成品接口里面");
                            }
                            
                        }
                        else
                        {
                            newLocation = _basicService.LocationInfoService.GetLocation(newSourceAddress.RoadwayNo, Locationtype);
                            WriteLog.GetLog("库位获取日志,GetLocation").Write($"原材料入库获取库位,传入值,RoadwayNo:{newSourceAddress.RoadwayNo},类型:{Locationtype},=============获取到的库位为:{newLocation.LocationCode}", $"库位获取日志,GetLocation");
                        }
                        
@@ -406,6 +411,8 @@
            }
        }
        public static List<int> InventoryCode = new List<int>() { 0,1,2,4,5,6};  //0:待检   1:合格    2:不合格  4:退货   5:返工    6:特采
        /// <summary>
        /// è§£æžåº“å­˜
        /// </summary>
@@ -417,11 +424,17 @@
            {
                string[] targetCodes = generate.PalletCode.Split("*");
                if (targetCodes.Length == 4)
                if (targetCodes.Length == 5)
                {
                    Dt_InboundOrder dt_Inbound = _inboundService.InbounOrderService.Repository.QueryFirst(x => x.OrderName == targetCodes[0]);
                    if(dt_Inbound != null)
                    bool isContained = InventoryCode.Contains(int.Parse(targetCodes[4]));
                    if(!isContained)
                    {
                        return content = WebResponseContent.Instance.Error($"第五位物料状态编码解析错误:{generate.PalletCode}");
                    }
                    if (dt_Inbound != null)
                    {
                        string PalletCodetarget = string.Join("*", targetCodes.Take(3));
                        Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode.Contains(PalletCodetarget));
@@ -440,7 +453,7 @@
                                    CreateDate = DateTime.Now,
                                    MaterialType = (int)InventoryMaterialType.原材料,
                                    Materialweight = decimal.Parse(targetCodes[3]),
                                    Wlstatus = (int)InventoryMaterialStatus.待检,
                                    Wlstatus = int.Parse(targetCodes[4]),
                                    Mgeneratetime=DateTime.Now,
                                };
                                _unitOfWorkManage.BeginTran();
@@ -509,7 +522,7 @@
                                    CreateDate = DateTime.Now,
                                    MaterialType = (int)InventoryMaterialType.成品,
                                    Materialweight = decimal.Parse(targetCodes[3]),
                                    Wlstatus = (int)InventoryMaterialStatus.待检,
                                    Wlstatus = int.Parse(targetCodes[4]),
                                    Mgeneratetime = DateTime.Now,
                                };
                                _unitOfWorkManage.BeginTran();