pan
2025-12-01 561c40186ee1a0134c5f671cf4ed24badcdcd6a3
提交
已修改3个文件
77 ■■■■ 文件已修改
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs
@@ -2681,7 +2681,7 @@
            }
        }
        public async  Task<WebResponseContent> NoStockOutSubmit(NoStockOutSubmit noStockOutSubmit)
        public async Task<WebResponseContent> NoStockOutSubmit(NoStockOutSubmit noStockOutSubmit)
        {
            try
            {
@@ -2935,9 +2935,9 @@
                }
              //  Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
                //  Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
                var dbinboundOrderDetails = Db.Queryable<Dt_PickingRecord>().Where(x=>x.OrderNo== materielGroupDTO.OrderNo && !x.IsCancelled && x.Barcode==materielGroupDTO.Barcodes).ToList();
                var dbinboundOrderDetails = Db.Queryable<Dt_PickingRecord>().Where(x => x.OrderNo == materielGroupDTO.OrderNo && !x.IsCancelled && x.Barcode == materielGroupDTO.Barcodes).ToList();
                if (dbinboundOrderDetails != null && !dbinboundOrderDetails.Any())
                {
@@ -2950,13 +2950,38 @@
                (bool, string, object?) result = CheckMaterielGroupParam(materielGroupDTO, materielCodes,  stockInfo);
                (bool, string, object?) result = CheckMaterielGroupParam(materielGroupDTO, materielCodes, stockInfo);
                if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
                if (stockInfo == null)
                {
                    stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = materielGroupDTO.locationType.ObjToInt() };
                    stockInfo.Details = new List<Dt_StockInfoDetail>();
                }
                var inboindId = 0; Dt_InboundOrder dt_InboundOrder = null;
                var dbinbound = _inboundOrderRepository.QueryData(x => x.InboundOrderNo == dbinboundOrderDetails.First().OrderNo).First();
                if (dbinbound == null)
                {
                    dt_InboundOrder = new Dt_InboundOrder
                    {
                        WarehouseId = 0,
                        InboundOrderNo = dbinboundOrderDetails.First()?.OrderNo,
                        UpperOrderNo = dbinboundOrderDetails.First()?.OrderNo,
                        SupplierId = dbinboundOrderDetails.First()?.SupplyCode,
                        OrderType = InOrderTypeEnum.InternalAllocat.ObjToInt(),
                        BusinessType = InOrderTypeEnum.InternalAllocat.ObjToInt().ToString(),
                        FactoryArea = dbinboundOrderDetails.First()?.FactoryArea,
                        Remark = "",
                        Details = new List<Dt_InboundOrderDetail>()
                    };
                    inboindId = _inboundOrderRepository.AddData(dt_InboundOrder);
                }
                else
                {
                    dt_InboundOrder = new Dt_InboundOrder { Details = new List<Dt_InboundOrderDetail>() };
                    inboindId = dbinbound.Id;
                }
                foreach (var item in dbinboundOrderDetails)
@@ -2976,12 +3001,34 @@
                        BarcodeUnit = item.BarcodeUnit,
                        FactoryArea = item.FactoryArea,
                        Status = 0,
                        OrderNo = item.OrderNo,
                        OrderNo = item.OrderNo,
                        BusinessType = InOrderTypeEnum.InternalAllocat.ObjToInt().ToString()
                    });
                    });
                    item.WarehouseCode = item.WarehouseCode;
                    dt_InboundOrder.Details.Add(new Dt_InboundOrderDetail
                    {
                        OrderId = inboindId,
                        MaterielCode = item.MaterielCode,
                        MaterielName = "",
                        BatchNo = item.BatchNo,
                        OrderQuantity = item.PickQuantity,
                        ReceiptQuantity = 0,
                        OverInQuantity = 0,
                        Unit = item.BarcodeUnit,
                        RowNo = 0,
                        lineNo = item.lineNo,
                        SupplyCode = item.SupplyCode,
                        WarehouseCode = item.WarehouseCode,
                        Barcode = item.Barcode,
                        OutBoxbarcodes = "",
                        BarcodeQty = (decimal)item.BarcodeQty,
                        BarcodeUnit = item.BarcodeUnit
                    });
                }
                _inboundOrderDetailService.Db.Insertable<Dt_InboundOrderDetail>(dt_InboundOrder.Details);
                if (stockInfo.Id == 0)
                {
                    stockInfo.PalletCode = materielGroupDTO.PalletCode;
@@ -2994,7 +3041,7 @@
                try
                {
                    _unitOfWorkManage.BeginTran();
                    _stockService.StockInfoService.AddMaterielGroup(stockInfo);
                    _unitOfWorkManage.CommitTran();
                    return WebResponseContent.Instance.OK();
@@ -3003,7 +3050,7 @@
                {
                    _unitOfWorkManage.RollbackTran();
                    return WebResponseContent.Instance.Error(ex.Message);
                }
                }
            }
            catch (Exception ex)
            {
@@ -3016,9 +3063,9 @@
            return content;
        }
        public (bool, string, object?) CheckMaterielGroupParam(BarcodeMaterielGroupDTO materielGroupDTO, List<string> barcodeCodes,   Dt_StockInfo stockInfo)
        public (bool, string, object?) CheckMaterielGroupParam(BarcodeMaterielGroupDTO materielGroupDTO, List<string> barcodeCodes, Dt_StockInfo stockInfo)
        {
            (bool, string, object?) result = ModelValidate.ValidateModelData(materielGroupDTO);
            if (!result.Item1) return result;
@@ -3037,8 +3084,8 @@
            {
                return (false, $"{barcodeCodes[0]} æ¡ç åœ¨åº“存中已存在", materielGroupDTO);
            }
            return (true, "成功", materielGroupDTO);
        }
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -327,6 +327,10 @@
                    {
                    }
                    else if (inboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) //智仓调智仓
                    {
                        _logger.LogInformation($"InboundTaskCompleted å›žå†™MES  : {inboundOrder.InboundOrderNo }  ,ordertype: {InOrderTypeEnum.InternalAllocat.ObjToInt()} "  );
                    }
                    else
                    {
                        if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.入库完成.ObjToInt())
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -32,7 +32,7 @@
                Dt_Task dbtask = Repository.Db.Queryable<Dt_Task>().Where(x => x.PalletCode == palletCode).OrderByDescending(x=>x.CreateDate).First();
                if (dbtask != null)
                {
                    _logger.LogInformation(dbtask.TaskType.ToString());
                    _logger.LogInformation($"任务类型{dbtask.TaskType.ToString()} ,{dbtask.TaskNum}  ");
                    if (dbtask.TaskType == TaskTypeEnum.Outbound.ObjToInt())
                    {
                        return WebResponseContent.Instance.Error($"出库待分拣任务");