pan
2025-11-17 5fc251a847ccc0540da8b112ed2bddba846455d8
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -223,11 +223,13 @@
                    }
                    //Db.DeleteNav(inboundOrder).Include(x => x.Details).ExecuteCommand();
                    _unitOfWorkManage.BeginTran();
                    BaseDal.DeleteAndMoveIntoHty(inboundOrder, OperateTypeEnum.自动删除);
                    //BaseDal.DeleteAndMoveIntoHty(inboundOrder, OperateTypeEnum.自动删除);
                    foreach (var item in inboundOrder.Details)
                    {
                        _inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.自动删除);
                        _inboundOrderDetailRepository.DeleteData(item);
                        //_inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.自动删除);
                    }
                    BaseDal.DeleteData(inboundOrder);
                    _unitOfWorkManage.CommitTran();
                }
                return WebResponseContent.Instance.OK();
@@ -422,12 +424,12 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
            {
                (bool, string, object?) result2 = ModelValidate.ValidateModelData(materielGroupDTO);
                if (!result2.Item1) return content = WebResponseContent.Instance.Error(result2.Item2);
                var code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Code == materielGroupDTO.WarehouseCode).Select(x => x.Code).First();
                if (string.IsNullOrEmpty(code))
                bool code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Id == materielGroupDTO.WarehouseCode).Any();
                if (!code)
                {
                    return content = WebResponseContent.Instance.Error($"仓库中没有该{materielGroupDTO.WarehouseCode}编号。");
                }
@@ -451,13 +453,14 @@
                {
                    if (stockInfo == null)
                    {
                        stockInfo = new Dt_StockInfo() { PalletType = PalletTypeEnum.Empty.ObjToInt(), StockStatus = StockStatusEmun.组盘暂存.ObjToInt(), PalletCode = materielGroupDTO.PalletCode,LocationType=1 };
                        stockInfo = new Dt_StockInfo() { PalletType = PalletTypeEnum.Empty.ObjToInt(), StockStatus = StockStatusEmun.组盘暂存.ObjToInt(), PalletCode = materielGroupDTO.PalletCode,LocationType= materielGroupDTO.WarehouseCode.ObjToInt() };
                        stockInfo.Details = new List<Dt_StockInfoDetail>();
                    }
                    else
                    {
                        stockInfo.PalletType = PalletTypeEnum.Empty.ObjToInt();
                        stockInfo.StockStatus = StockStatusEmun.组盘暂存.ObjToInt();
                        stockInfo.LocationType = materielGroupDTO.WarehouseCode.ObjToInt();
                    }
                    _unitOfWorkManage.BeginTran();