1
wangxinhui
2024-12-28 88d52606d0db8fb0343ebcd2d53c8df62fd05f2a
1
已删除3个文件
已修改18个文件
已添加5个文件
已重命名1个文件
498 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4a20dff1-21c1-4155-a046-64d2b9450c27.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/995da1df-bccd-4c50-83da-49435a3bf126.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9e5bb932-a2ae-42b5-8ed0-09de9b346dc6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVExtend.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/47049b24-30e9-4e73-be80-cc5abf5cfefd.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/996cb05a-4002-49d6-b075-bdc5451f77c7.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b4300a95-0842-480f-9efa-8633f9f71fe0.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/cefa9c6e-65e6-4f5e-8814-550d3e8d3f27.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/RootList.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs 109 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_StockQuantityChangeRecord.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/4a20dff1-21c1-4155-a046-64d2b9450c27.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/995da1df-bccd-4c50-83da-49435a3bf126.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9e5bb932-a2ae-42b5-8ed0-09de9b346dc6.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
@@ -47,9 +47,9 @@
builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
builder.Services.AddDbSetup();//Db å¯åŠ¨æœåŠ¡
//builder.Services.AddScoped<QuartzJobCreateDataTabel>();
builder.Services.AddScoped<QuartzJobCreateDataTabel>();
builder.Services.AddHostedService<WarehouseHostedService>();
//builder.Services.AddHostedService<QuartzJobDataTableHostedService>();
builder.Services.AddHostedService<QuartzJobDataTableHostedService>();
builder.Services.AddAutoMapperSetup();
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
@@ -13,8 +13,6 @@
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_DeviceProtocolDetail.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_DispatchInfo.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_Router.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_Task.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_TaskExecuteDetail.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Sys_Dictionary.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Sys_DictionaryList.tsv" />
        <Content Remove="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Sys_Menu.tsv" />
@@ -44,12 +42,6 @@
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </EmbeddedResource>
        <EmbeddedResource Include="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_Router.tsv">
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </EmbeddedResource>
        <EmbeddedResource Include="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_Task.tsv">
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </EmbeddedResource>
        <EmbeddedResource Include="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Dt_TaskExecuteDetail.tsv">
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </EmbeddedResource>
        <EmbeddedResource Include="wwwroot\WIDESEAWCS_DB.DBSeed.Json\Sys_Dictionary.tsv">
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/InvokeAGVService.cs
@@ -24,7 +24,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                string apiAddress = "http://10.30.4.19:8182/rcms/services/rest/hikRpcService/genAgvSchedulingTask";// AppSettings.Get(APIEnum.AgvSendTask.ToString());
                string apiAddress = "http://10.30.4.29:8182/rcms/services/rest/hikRpcService/genAgvSchedulingTask";// AppSettings.Get(APIEnum.AgvSendTask.ToString());
                string response = HttpHelper.Post(apiAddress, taskModel.Serialize());
                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
                if (agvContent.Code == "0")
@@ -59,7 +59,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                string apiAddress = "http://10.30.4.19:8182/rcms/services/rest/hikRpcService/continueTask";// AppSettings.Get(APIEnum.AgvSecureReply.ToString());
                string apiAddress = "http://10.30.4.29:8182/rcms/services/rest/hikRpcService/continueTask";// AppSettings.Get(APIEnum.AgvSecureReply.ToString());
                string response = HttpHelper.Post(apiAddress, secureReplyModel.Serialize());
                AgvResponseContent agvContent = response.DeserializeObject<AgvResponseContent>();
                if (agvContent.Code == "0")
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -176,22 +176,40 @@
                        if (routers.Count == 1)
                        {
                            task.NextAddress = router?.NextPosi ?? "";
                            task.DeviceCode = stationManger.StationDeviceCode;
                        }
                        else
                        {
                            task.NextAddress = "";
                            task.DeviceCode = "";
                        }
                    }
                    else
                    {
                        List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi);
                        if (routers.FirstOrDefault() == null)
                        if(item.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                        {
                            return WebResponseContent.Instance.Error($"未找到路由配置信息");
                        }
                        router = routers.FirstOrDefault();
                            List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi);
                            if (routers.FirstOrDefault() == null)
                            {
                                return WebResponseContent.Instance.Error($"未找到路由配置信息");
                            }
                            router = routers.FirstOrDefault();
                        task.NextAddress = router?.NextPosi ?? "";
                            task.NextAddress = router?.StartPosi ?? "";
                            task.DeviceCode = item.RoadWay;
                        }
                        else
                        {
                            List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi);
                            if (routers.FirstOrDefault() == null)
                            {
                                return WebResponseContent.Instance.Error($"未找到路由配置信息");
                            }
                            router = routers.FirstOrDefault();
                            task.NextAddress = router?.NextPosi ?? "";
                            task.DeviceCode = "AGV";
                        }
                    }
                    tasks.Add(task);
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVExtend.cs
@@ -20,7 +20,7 @@
        {
            try
            {
                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.New.ObjToInt()).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt()).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                foreach (var agvTask in newTasks)
                {
                    AgvTaskDTO taskDTO = new AgvTaskDTO()
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/47049b24-30e9-4e73-be80-cc5abf5cfefd.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/996cb05a-4002-49d6-b075-bdc5451f77c7.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b4300a95-0842-480f-9efa-8633f9f71fe0.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/cefa9c6e-65e6-4f5e-8814-550d3e8d3f27.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs
@@ -190,20 +190,20 @@
                case PalletTypeEnum.LargePallet:
                    {
                        List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
                        moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt()) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                        moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.LocationStatus != LocationStatusEnum.PalletLock.ObjToInt() && x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                        List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                        littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                        littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                    }
                    break;
                case PalletTypeEnum.MediumPallet:
                case PalletTypeEnum.SmallPallet:
                    {
                        List<Dt_LocationInfo> moreDepth = locations.Where(x => x.Depth > emptyLocation.Depth).ToList();
                        moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                        moreDepthFlag = moreDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() && x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) == null;//查询大于当前货位深度的集合里是否有状态不为有货的货位,如果是true,则表示深货位有未被使用的情况
                        List<Dt_LocationInfo> littleDepth = locations.Where(x => x.Depth <= emptyLocation.Depth).ToList();
                        littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.OnlyIn.ObjToInt() && x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                        littleDepthFlag = littleDepth.FirstOrDefault(x => x.LocationStatus != LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) == null; //查询小于当前货位深度的集合里是否有状态不为空,且禁用状态不为禁用以及只入的货位,如果是true,则表示浅货位被使用或者被禁用的情况
                    }
                    break;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/HttpMesHelper.cs
@@ -23,14 +23,11 @@
                    
                    using HttpClient httpClient = new HttpClient();
                    httpClient.Timeout = new TimeSpan(0, 0, 60);
                    long currentTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
                    string key = $"appkey=1830415116987195392&timestamp={currentTimestamp}";
                    string authorization = "Open " + GetStr(key);
                    string authorization = "AppKey 1830415116987195392";
                    headers = new Dictionary<string, string>
                    {
                        { "Appkey", "1830415116987195392" },
                        { "Authorization", authorization },
                        { "site_tenant_id", "ced19269-2b83-4577-be43-8cc2f700251e" }
                        { "Site_tenant_id", "0dc2d164-8a62-417e-8a00-808007464feb" }
                    };
                    if (headers != null)
                    {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/RootList.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_DTO.MES
{
    public class RootList
    {
        /// <summary>
        ///
        /// </summary>
        public string From { get; set; }
        /// <summary>
        ///
        /// </summary>
        public string DateTime { get; set; }
        public List<TestToolScrap> Content { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs
@@ -35,7 +35,7 @@
        /// æµ‹è¯•架批次号
        /// </summary>
        [PropertyValidate("测试架批次号", NotNullAndEmpty = true)]
        public string ToolCode { get; set; }
        public List<string> ToolCodes { get; set; }
    }
    /// <summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs
@@ -24,7 +24,10 @@
        WebResponseContent FeedbackInboundOrder(int id);
        WebResponseContent MaterielGroup(SaveModel saveModel);
        //入库完成上报
        WebResponseContent FeedbackInboundOrder(Dt_StockInfo stockInfo);
        /// <summary>
        /// å…¥åº“完成上报
        /// </summary>
        /// <returns></returns>
        WebResponseContent FeedbackInboundOrder(Dt_StockInfo stockInfo,Dt_InboundOrder inboundOrder);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs
@@ -18,6 +18,6 @@
        IOutboundOrderRepository Repository { get; }
        WebResponseContent ReceiveOutOrder(ErpOutOrderDTO model);
        WebResponseContent TestOutUpload(int id);
        WebResponseContent TestOutUpload(int id,Dt_StockInfo stockInfo=null);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -110,7 +110,7 @@
        /// </summary>
        /// <param name="toolScrap"></param>
        /// <returns></returns>
        MesResponseContent TestScrap(TestToolScrap toolScrap);
        MesResponseContent TestScrap(TestToolScrap toolScraps);
        WebResponseContent IsRelocation(int taskNum, string locationCode);
        WebResponseContent TestSynStock(TestToolSynInfo toolSynInfo);
    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs
@@ -1,5 +1,6 @@
using AutoMapper;
using HslCommunication.WebSocket;
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
@@ -152,17 +153,7 @@
                {
                    return WebResponseContent.Instance.Error($"未找到入库单明细信息");
                }
                MatSerNumAnalysisModel model = new MatSerNumAnalysisModel()
                {
                    MaterielCode = "504907335",
                    LotNo = "20241217001",
                    ProductionDate = "2024-12-17",
                    EffectiveDate = "2025-12-17",
                    PurchaseOrderNo = "POHA02241227285",
                    Quantity = 1,
                    SerialNumber = "M:504907335,BS:20241217001,DM:2024-12-17,DE:2025-12-17,Q:1,PO:POHA02241227285"
                };//测试
                //CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serNum);
                MatSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serNum);
                Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == model.MaterielCode);
                if (materielInfo == null)
                {
@@ -567,15 +558,97 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent FeedbackInboundOrder(Dt_StockInfo stockInfo)
        /// <summary>
        /// å…¥åº“完成上报ERP
        /// </summary>
        /// <returns></returns>
        public WebResponseContent FeedbackInboundOrder(Dt_StockInfo stockInfo,Dt_InboundOrder inboundOrder)
        {
            WebResponseContent content=new WebResponseContent();
            try
            {
                if (inboundOrder.Details.Count == 0)
                {
                    return WebResponseContent.Instance.Error($"未找到入库单明细信息");
                }
                if (inboundOrder.OrderStatus == InOrderStatusEnum.入库完成.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"入库单据已完成");
                }
                List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>();
                Dt_Warehouse warehouse = _warehouseService.Repository.QueryFirst(x => x.WarehouseId == stockInfo.WarehouseId);
                if (warehouse == null)
                {
                    return WebResponseContent.Instance.Error($"未找到仓库信息");
                }
                List<Dt_InboundOrderDetail> inboundOrderDetails = new List<Dt_InboundOrderDetail>();
                foreach (var item in stockInfo.Details)
                {
                    Dt_InboundOrderDetail? inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x=>x.RowNo==item.InboundOrderRowNo);
                    if (inboundOrderDetail == null)
                    {
                        continue;
                    }
                    ERPInboundDetailModel detailModel = new ERPInboundDetailModel()
                    {
                        ExpiryDate = item.EffectiveDate ?? "",
                        LocationCode = warehouse.WarehouseCode,
                        MaterialsCode = item.MaterielCode,
                        MfgDate = item.ProductionDate ?? "",
                        QtyCustoms = "0",
                        Quantity = item.StockQuantity.ToString(),
                        Rack = stockInfo.LocationCode,
                        ReceiptCode = inboundOrder.UpperOrderNo,
                        ReceiptSerNo = item.InboundOrderRowNo.ToString()
                    };
                    inboundOrderDetail.OverInQuantity += detailModel.Quantity.ObjToInt();
                    if (inboundOrderDetail.OverInQuantity== inboundOrderDetail.OrderQuantity)
                    {
                        inboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
                    }
                    inboundOrderDetails.Add(inboundOrderDetail);
                    detailModels.Add(detailModel);
                }
                ERPInboundModel model = new ERPInboundModel()
                {
                    Code = inboundOrder.InboundOrderNo,
                    CreatorCode = "TC20082",//测试
                    EntDate = inboundOrder.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"),
                    StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                    SuppliersId = inboundOrder.SupplierId,
                    Type = "S",
                    UniqueTag = inboundOrder.Id.ToString(),
                    WarehouseCode = warehouse.WarehouseCode,
                    Way = 1,
                    Details = detailModels
                };
                //入库明细新增完成数量
                int newCount = inboundOrderDetails.Select(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count;
                //入库明细原完成数量
                int oldCount = inboundOrder.Details.Select(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count;
                string response = _invokeERPService.InvokeInboundOrderApi(model);
                ErpRequestContent requestContent = JsonConvert.DeserializeObject<ErpRequestContent>(response);
                if (requestContent==null)
                {
                    return WebResponseContent.Instance.Error();
                }
                if (requestContent.res==0)
                {
                    return WebResponseContent.Instance.Error(requestContent.Data);
                }
                _unitOfWorkManage.BeginTran();
                _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetails);
                if (inboundOrder.Details.Count == (newCount + oldCount))
                {
                    inboundOrder.OrderStatus = InOrderStatusEnum.入库完成.ObjToInt();
                    _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
                }
                _unitOfWorkManage.CommitTran();
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                content.Error(ex.Message);
            }
            return content;
@@ -599,13 +672,9 @@
                {
                    return WebResponseContent.Instance.Error($"未找到入库单明细信息");
                }
                if (inboundOrder.OrderStatus != InOrderStatusEnum.入库完成.ObjToInt())
                if (inboundOrder.OrderStatus == InOrderStatusEnum.入库完成.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"入库单据未完成");
                }
                if (inboundOrder.Details.FirstOrDefault(x => x.OrderDetailStatus != OrderDetailStatusEnum.Over.ObjToInt()) != null)
                {
                    return WebResponseContent.Instance.Error($"入库明细未完成");
                    return WebResponseContent.Instance.Error($"入库单据已完成");
                }
                List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => x.Details.Any(v => v.OrderNo == inboundOrder.InboundOrderNo)).Includes(x => x.Details).ToList();
@@ -658,9 +727,7 @@
                    Way = 1,
                    Details = detailModels
                };
                string response = _invokeERPService.InvokeInboundOrderApi(model);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs
@@ -231,7 +231,7 @@
                Dt_InboundOrder inboundOrder = new Dt_InboundOrder()
                {
                    InboundOrderNo = "TestInboundNo21",//测试
                    InboundOrderNo="IN"+DateTime.Now.ToString("yyyyMMddHHmmss"),//测试
                    UpperOrderNo = receiveOrder.ReceiveOrderNo,
                    CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(),
                    OrderStatus = InOrderStatusEnum.未开始.ObjToInt(),
@@ -353,7 +353,7 @@
                    }
                    receiveOrder = new Dt_ReceiveOrder()
                    {
                        ReceiveOrderNo = "TestReceiveOrderNo21",//测试
                        ReceiveOrderNo= "RE"+DateTime.Now.ToString("yyyyMMddHHmmss"),//测试
                        ReceiveOrderStatus = ReceiveOrderStatusEnum.Receiving.ObjToInt(),
                        CustomerId = "",
                        DeliveryCode = "/",
@@ -400,19 +400,19 @@
                        rowNo += 1;
                        receiveOrderDetails.Add(receiveOrderDetail);
                        if (materielInfo.IsCheck == WhetherEnum.True)
                        {
                            Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
                            checkOrder.CheckOrderNo = "Test-CheckNo1";//测试
                            checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
                            checkOrder.ScrappedQuantity = 0;
                            checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
                            checkOrder.ReturnQuantity = 0;
                            checkOrder.DefectedQuantity = 0;
                            checkOrder.ReceiveDetailRowNo = rowNo;
                            checkOrder.UploadStatus = CheckUploadEnum.UploadNo.ObjToInt();
                            checkOrders.Add(checkOrder);
                        }
                        //if (materielInfo.IsCheck == WhetherEnum.True)
                        //{
                        //    Dt_CheckOrder checkOrder = _mapper.Map<Dt_CheckOrder>(receiveOrderDetail);
                        //    checkOrder.CheckOrderNo = "Test-CheckNo1";//测试
                        //    checkOrder.QualifiedQuantity = receiveOrderDetail.ReceivedQuantity;
                        //    checkOrder.ScrappedQuantity = 0;
                        //    checkOrder.ReceiveOrderNo = receiveOrder.ReceiveOrderNo;
                        //    checkOrder.ReturnQuantity = 0;
                        //    checkOrder.DefectedQuantity = 0;
                        //    checkOrder.ReceiveDetailRowNo = rowNo;
                        //    checkOrder.UploadStatus = CheckUploadEnum.UploadNo.ObjToInt();
                        //    checkOrders.Add(checkOrder);
                        //}
                    }
                }
@@ -429,10 +429,10 @@
                    Db.InsertNav(receiveOrder).Include(x => x.Details).ExecuteCommand();
                    checkOrders.ForEach(x => x.ReceiveOrderNo = receiveOrder.ReceiveOrderNo);
                }
                if (checkOrders.Count > 0)
                {
                    _checkOrderRepository.AddData(checkOrders);
                }
                //if (checkOrders.Count > 0)
                //{
                //    _checkOrderRepository.AddData(checkOrders);
                //}
                _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder);
                _inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrder.Details);
                _unitOfWorkManage.CommitTran();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_StockQuantityChangeRecord.cs
@@ -47,7 +47,7 @@
        /// <summary>
        /// æ‰¹æ¬¡å·
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "批次号")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "批次号")]
        public string BatchNo { get; set; }
        /// <summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs
@@ -171,50 +171,101 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        //上报出库完成 æµ‹è¯•æž¶
        public WebResponseContent TestOutUpload(int id)
        //上报出库完成
        public WebResponseContent TestOutUpload(int id,Dt_StockInfo stockInfo)
        {
            try
            {
                Dt_OutboundOrder outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x=>x.Id==id).Includes(x=>x.Details).First();
                Dt_Warehouse warehouse = _basicService.WarehouseService.Repository.QueryFirst(x => x.WarehouseId == outboundOrder.WarehouseId);
                //测试架库给ERP上报出库完成
                ERPPickItemModel eRPOutPick = new ERPPickItemModel()
                ERPIssueModel issueModel = new ERPIssueModel();
                List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
                if (stockInfo==null)
                {
                    Lotno = "20241227001",
                    Qty = "1",
                    Location = warehouse.WarehouseCode
                };
                ERPPickModel pickModel = new ERPPickModel()
                    stockInfos = TestOutStocksUpdate(warehouse).Data as List<Dt_StockInfo> ?? new List<Dt_StockInfo>();
                    List<ERPPickItemModel> eRPOutPick =new List<ERPPickItemModel>();
                    for (int i = 0; i < stockInfos.Count; i++)
                    {
                        ERPPickItemModel pickItemModel = new ERPPickItemModel()
                        {
                            Lotno= stockInfos[i].Details[0].BatchNo,
                            Qty= stockInfos[i].Details[0].StockQuantity.ObjToInt().ToString(),
                            Location= warehouse.WarehouseCode
                        };
                        eRPOutPick.Add(pickItemModel);
                    }
                    ERPPickModel pickModel = new ERPPickModel()
                    {
                        Rowindex = outboundOrder.Details[0].RowNo,
                        Material = outboundOrder.Details[0].MaterielCode,
                        Qty = (outboundOrder.Details[0].OrderQuantity.ObjToInt()).ToString(),
                        Dataitem = eRPOutPick
                    };
                    ERPIssueItemModel issueItemModel = new ERPIssueItemModel()
                    {
                        Pickcode = outboundOrder.UpperOrderNo,
                        PickList = new List<ERPPickModel>() { pickModel }
                    };
                    issueModel = new ERPIssueModel()
                    {
                        UniqueTag = id.ToString(),
                        Code = "OT" + DateTime.Now.ToString("yyyyMMddHHmmss"),//测试
                        WarehouseCode = warehouse.WarehouseCode,
                        Docremark = "",
                        Deptno = outboundOrder.DepartmentCode,
                        Deptname = outboundOrder.DepartmentName,
                        Createtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                        Createuser = "TC20082",
                        Issitem = new List<ERPIssueItemModel>() { issueItemModel },
                    };
                }
                else
                {
                    Rowindex = outboundOrder.Details[0].RowNo,
                    Material = outboundOrder.Details[0].MaterielCode,
                    Qty = (outboundOrder.Details[0].OrderQuantity.ObjToInt()).ToString(),
                    Dataitem=new List<ERPPickItemModel> { eRPOutPick }
                };
                    Dt_OutboundOrderDetail orderDetail = outboundOrder.Details.FirstOrDefault(x => x.MaterielCode == stockInfo.Details[0].MaterielCode);
                    ERPPickItemModel pickItemModel = new ERPPickItemModel()
                    {
                        Lotno = stockInfo.Details[0].BatchNo,
                        Qty = stockInfo.Details[0].StockQuantity.ObjToInt().ToString(),
                        Location = stockInfo.LocationCode
                    };
                    ERPPickModel pickModel = new ERPPickModel()
                    {
                        Rowindex = outboundOrder.Details[0].RowNo,
                        Material = outboundOrder.Details[0].MaterielCode,
                        Qty = (outboundOrder.Details[0].OrderQuantity.ObjToInt()).ToString(),
                        Dataitem = new List<ERPPickItemModel> { pickItemModel }
                    };
                    ERPIssueItemModel issueItemModel = new ERPIssueItemModel()
                    {
                        Pickcode = outboundOrder.UpperOrderNo,
                        PickList = new List<ERPPickModel>() { pickModel }
                    };
                    issueModel = new ERPIssueModel()
                    {
                        UniqueTag = id.ToString(),
                        Code = "OT" + DateTime.Now.ToString("yyyyMMddHHmmss"),//测试
                        WarehouseCode = warehouse.WarehouseCode,
                        Docremark = "",
                        Deptno = outboundOrder.DepartmentCode,
                        Deptname = outboundOrder.DepartmentName,
                        Createtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                        Createuser = "TC20082",
                        Issitem = new List<ERPIssueItemModel>() { issueItemModel },
                    };
                }
                
                ERPIssueItemModel issueItemModel = new ERPIssueItemModel()
                {
                    Pickcode = outboundOrder.UpperOrderNo,
                    PickList = new List<ERPPickModel>() { pickModel }
                };
                ERPIssueModel issueModel = new ERPIssueModel()
                {
                    UniqueTag = id.ToString(),
                    Code = "FL20241227001",//测试
                    WarehouseCode = warehouse.WarehouseCode,
                    Docremark = "",
                    Deptno = outboundOrder.DepartmentCode,
                    Deptname = outboundOrder.DepartmentName,
                    Createtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                    Createuser = "TC20082",
                    Issitem = new List<ERPIssueItemModel>() { issueItemModel },
                };
                string response = _invokeERPService.InvokeOutStandardsApi(issueModel);
                ErpRequestContent requestContent = response.DeserializeObject<ErpRequestContent>();
                if (requestContent.res == 1)
                {
                    if (stockInfos.Count>0)
                    {
                        _stockInfoRepository.UpdateData(stockInfos);
                    }
                    return WebResponseContent.Instance.OK(requestContent.Data);
                }
                else
@@ -233,15 +284,15 @@
        /// <param name="warehouse"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        public WebResponseContent TestOutStocksUpdate(Dt_Warehouse warehouse, ErpOutOrderDTO model)
        public WebResponseContent TestOutStocksUpdate(Dt_Warehouse warehouse)
        {
            try
            {
                //获取出库单库存
                List<Dt_StockInfo> stockInfos = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).ToList();
                if (model.Qty > stockInfos.Count)
                if (stockInfos.Count<=0)
                {
                    return WebResponseContent.Instance.Error($"物料:{model.MCode}库存不足");
                    return WebResponseContent.Instance.Error($"库存不足");
                }
                //更改状态
                stockInfos.ForEach(x =>
@@ -255,33 +306,5 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        ///推送测试架出库
        //public WebResponseContent TestOutBack(int id,List<string> locationIds)
        //{
        //    try
        //    {
        //        string response = _invokeERPService.InvokeOutStandardsApi(issueModel);
        //        ErpRequestContent requestContent = response.DeserializeObject<ErpRequestContent>();
        //        if (requestContent.res == 1)
        //        {
        //            return WebResponseContent.Instance.OK(requestContent.Data);
        //        }
        //        else
        //        {
        //            return WebResponseContent.Instance.Error(requestContent.Data);
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        return WebResponseContent.Instance.Error(ex.Message);
        //    }
        //}
        //public WebResponseContent FeedbackOutbondIssue(List<Dt_OutStockLockInfo> outStockLockInfos)
        //{
        //    ERPPickItemModel
        //}
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs
@@ -75,6 +75,12 @@
                stockInfo.StockStatus = (int)StockStatusEmun.出库锁定;
                LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
                locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
                //将任务推送到WCS
                WebResponseContent content = PushTasksToWCS(new List<Dt_Task>() { taskOut }, "AGV");
                if (!content.Status)
                {
                    return responseContent.Error();
                }
                //判断是否有出库单信息
                _unitOfWorkManage.BeginTran();
                //更新库存状态
@@ -88,8 +94,6 @@
                //加入库存变动记录
                //_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.StockLock);
                _unitOfWorkManage.CommitTran();
                //将任务推送到WCS
                PushTasksToWCS(new List<Dt_Task>() { taskOut }, "AGV");
                responseContent.OK();
            }
            catch (Exception ex)
@@ -137,9 +141,14 @@
                };
                //更改库存状态
                stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                //将任务推送到WCS
                PushTasksToWCS(new List<Dt_Task>() { taskIn }, "AGV");
                BaseDal.AddData(taskIn);
                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                //将任务推送到WCS
                WebResponseContent content = PushTasksToWCS(new List<Dt_Task>() { taskIn }, "AGV"); ;
                if (!content.Status)
                {
                    return responseContent.Error();
                }
                responseContent.OK();
            }
            catch (Exception ex)
@@ -153,7 +162,7 @@
        /// æµ‹è¯•架报废
        /// </summary>
        /// <returns></returns>
        public MesResponseContent TestScrap(TestToolScrap toolScrap)
        public MesResponseContent TestScrap(TestToolScrap toolScraps)
        {
            MesResponseContent responseContent = new MesResponseContent();
            try
@@ -161,21 +170,25 @@
                //获取测试架批次号库存
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA64.ToString());
                //获取库存记录
                //获取库存记录
                List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x =>
                  x.WarehouseId == warehouse.WarehouseId &&
                  x.StockStatus == (int)StockStatusEmun.出库完成).Includes(x => x.Details).ToList();
                Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.BatchNo == toolScrap.ToolCode));
                if (stockInfo == null)
                List<Dt_StockInfo> stockInfoUpdates = new List<Dt_StockInfo>();
                List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
                foreach (var item in toolScraps.ToolCodes)
                {
                    return responseContent.Error($"{toolScrap.ToolCode}库存信息不存在");
                    Dt_StockInfo stockInfo = stockInfos.Find(x => x.Details.Any(x => x.BatchNo == item));
                    if (stockInfo == null)
                    {
                        return responseContent.Error($"{item}库存信息不存在");
                    }
                    stockInfoUpdates.Add(stockInfo);
                }
                //清除库存信息
                _unitOfWorkManage.BeginTran();
                _stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfo,OperateTypeEnum.自动删除);
                _stockRepository.StockInfoDetailRepository.DeleteAndMoveIntoHty(stockInfo.Details, OperateTypeEnum.自动删除);
                _stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfoUpdates, OperateTypeEnum.自动删除);
                _unitOfWorkManage.CommitTran();
                responseContent.OK($"报废成功");
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -64,6 +64,7 @@
        private readonly IApiInfoRepository _apiInfoRepository;
        private readonly IInvokeERPService _invokeERPService;
        private readonly IInboundRepository _inboundRepository;
        private readonly IInboundOrderService _inboundOrderService;
        public ITaskRepository Repository => BaseDal;
@@ -77,7 +78,7 @@
        public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList();
        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IInboundRepository inboundRepository) : base(BaseDal)
        public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IInboundRepository inboundRepository, IInboundOrderService inboundOrderService) : base(BaseDal)
        {
            _mapper = mapper;
            _unitOfWorkManage = unitOfWorkManage;
@@ -90,6 +91,7 @@
            _apiInfoRepository = apiInfoRepository;
            _invokeERPService = invokeERPService;
            _inboundRepository = inboundRepository;
            _inboundOrderService = inboundOrderService;
        }
        /// <summary>
@@ -130,10 +132,10 @@
                    return WebResponseContent.Instance.Error($"未找到该任务信息");
                }
                if (task.TaskType != TaskTypeEnum.Inbound.ObjToInt())
                {
                    return WebResponseContent.Instance.Error($"任务类型错误");
                }
                //if (task.TaskType != TaskTypeEnum.Inbound.ObjToInt())
                //{
                //    return WebResponseContent.Instance.Error($"任务类型错误");
                //}
                Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == task.PalletCode && x.WarehouseId==task.WarehouseId).Includes(x => x.Details).First();
                if (stockInfo == null)
@@ -181,12 +183,15 @@
                });
                stockInfo.LocationCode = locationInfo.LocationCode;
                //推送入库完成给Erp
                //获取入库单更新入库单
                //Dt_InboundOrder inboundOrder = _inboundRepository.InboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x=>x.InboundOrderNo);
                if (true)
                Dt_InboundOrder? inboundOrder = _inboundRepository.InboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x=>x.Details).First();
                if (inboundOrder == null)
                {
                    return WebResponseContent.Instance.Error($"对应入库单不存在");
                }
                if (!_inboundOrderService.FeedbackInboundOrder(stockInfo, inboundOrder).Status)
                {
                    return WebResponseContent.Instance.Error($"入库同步Erp失败");
                }
                _unitOfWorkManage.BeginTran();
                BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.人工完成 : OperateTypeEnum.自动完成);
                _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
@@ -230,9 +235,10 @@
                {
                    return WebResponseContent.Instance.Error($"未找到货位信息");
                }
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseId== task.WarehouseId);
                List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.TaskNum == taskNum);
                if (outStockLockInfos == null || outStockLockInfos.Count == 0)
                if ((outStockLockInfos == null || outStockLockInfos.Count == 0) && warehouse.WarehouseCode != WarehouseEnum.HA64.ToString())
                {
                    return WebResponseContent.Instance.Error($"未找到出库详情信息");
                }
@@ -251,14 +257,23 @@
                        outboundOrderDetails.Add(outboundOrderDetail);
                    }
                }
                if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString())
                {
                    //推送出库完成
                    WebResponseContent webResponse = _outboundService.OutboundOrderService.TestOutUpload(outboundOrderDetails.FirstOrDefault().Id,stockInfo);
                    if (!webResponse.Status)
                    {
                        return webResponse;
                    }
                }
                _unitOfWorkManage.BeginTran();
                _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
                if (outboundOrderDetails.Count>0)
                {
                    _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
                }
                stockInfo.LocationCode = locationInfo.LocationCode;
                stockInfo.StockStatus = StockStatusEmun.出库完成.ObjToInt();
                _stockService.StockInfoService.Repository.UpdateData(stockInfo);
                int beforeStatus = locationInfo.LocationStatus;
                locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
                _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, (PalletTypeEnum)stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
@@ -266,7 +281,8 @@
                _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
                _unitOfWorkManage.CommitTran();
                //推送出库完成
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs
@@ -29,14 +29,18 @@
            _taskService = taskService;
        }
        /// <summary>
        /// ä¸‹è½½PDA
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("DownLoadApp"), AllowAnonymous]
        public virtual ActionResult DownLoadApp()
        {
            string path = $"{AppDomain.CurrentDomain.BaseDirectory}Upload/App/";
            if (!Directory.Exists(path)) Directory.CreateDirectory(path);
            path += "WMS-PDA.apk";
            if(System.IO.File.Exists(path))
            if (System.IO.File.Exists(path))
            {
                byte[] fileBytes = System.IO.File.ReadAllBytes(path);
                return File(
@@ -49,9 +53,14 @@
            {
                return Json(WebResponseContent.Instance.Error($"未找到安装包"));
            }
        }
        /// <summary>
        /// ä¸Šä¼ PDA
        /// </summary>
        /// <param name="fileInput"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("UploadApp"), AllowAnonymous]
        [Consumes("multipart/form-data")]
        public WebResponseContent UploadApp(IEnumerable<IFormFile> fileInput)
@@ -66,7 +75,8 @@
                if (!Directory.Exists(dicPath)) Directory.CreateDirectory(dicPath);
                string path = $"{dicPath}WMS-PDA{DateTime.Now:yyyyMMddhhmmss}.apk";
                dicPath = $"{dicPath}WMS-PDA.apk";
                System.IO.File.Move(dicPath, path);
                if (System.IO.File.Exists(dicPath))
                    System.IO.File.Move(dicPath, path);
                using (var stream = new FileStream(dicPath, FileMode.Create))
                {