dengjunjie
2024-11-20 0d2f7d905975c1f5d39f70689760b070cef31349
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
@@ -1,4 +1,5 @@
锘縰sing AutoMapper;
using Microsoft.IdentityModel.Tokens;
using SqlSugar;
using System;
using System.Collections.Generic;
@@ -54,6 +55,14 @@
        {
            InboundOrderAddDTO orderAddDTO = saveModel.MainData.DicToModel<InboundOrderAddDTO>();
            orderAddDTO.Details = saveModel.DetailData.DicToIEnumerable<InboundOrderDetailAddDTO>();
            List<string> LocationCodes = orderAddDTO.Details
                .Where(x => !string.IsNullOrEmpty(x.LocationCode))
                .Select(x => x.LocationCode).ToList();
            if (LocationCodes.Any())
            {
                var content = _basicService.LocationInfoService.UpdateStatus(LocationCodes, LocationStatusEnum.PalletLock.ObjToInt());
                if (!content.Status) return WebResponseContent.Instance.Error("鎸囧畾璐т綅寮傚父");
            }
            return AddInboundOrder(orderAddDTO);
        }