wangxinhui
2025-01-16 1954334b901db3563837a010f833ff4106f0ad5b
增加根据出库单推送至ERP接口
已删除1个文件
已修改3个文件
已添加1个文件
42 ■■■■■ 文件已修改
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2cbd37ae-d297-46cd-8de4-4c2b91cc41c7.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c55dc563-0ab2-4a62-9fbf-42cb95118eea.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2cbd37ae-d297-46cd-8de4-4c2b91cc41c7.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c55dc563-0ab2-4a62-9fbf-42cb95118eea.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs
@@ -24,5 +24,6 @@
        WebResponseContent TestOutUpload(int id,List<Dt_OutStockLockInfo>? outStockLockInfos=null);
        string CreateCodeByRule(string ruleCode);
        ERPIssueModel GetERPIssueModel(Dt_OutboundOrder outboundOrder, string WarehouseCode);
        WebResponseContent PushERPOutBound(int outId, string WarehouseCode);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs
@@ -628,5 +628,36 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// æ ¹æ®å‡ºåº“单推送ERP系统
        /// </summary>
        /// <param name="outId"></param>
        /// <param name="WarehouseCode"></param>
        /// <returns></returns>
        public WebResponseContent PushERPOutBound(int outId, string WarehouseCode)
        {
            WebResponseContent content=new WebResponseContent();
            try
            {
                //获取出库单
                Dt_OutboundOrder outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.Id == outId).Includes(x => x.Details).First();
                if (outboundOrder == null)
                {
                    return content.Error("出库单不存在");
                }
                if (outboundOrder.Details.Count!=(outboundOrder.Details.Where(x=>x.OrderDetailStatus==OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count)||outboundOrder.OrderStatus!=OutOrderStatusEnum.出库完成.ObjToInt())
                {
                    return content.Error("该出库单未完成");
                }
                ERPIssueModel issueModel = GetERPIssueModel(outboundOrder, WarehouseCode);
                string response=_invokeERPService.InvokeOutStandardsApi(issueModel);
                return content.OK(response);
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs
@@ -63,5 +63,15 @@
        {
            return Service.CreateCodeByRule(nameof(RuleCodeEnum.FLCodeRule));
        }
        /// <summary>
        /// ä½¿ç”¨å‡ºåº“单完成ERP出库推送
        /// </summary>
        /// <param name="outId">出库单ID</param>
        /// <param name="WarehouseCode">仓库代号</param>
        /// <returns></returns>
        public WebResponseContent PushERPOutBound(int outId, string WarehouseCode)
        {
            return Service.PushERPOutBound(outId, WarehouseCode);
        }
    }
}