啊鑫
2024-07-12 76db5b59294f6a9fef77a77ad9536b4d0ea97657
erp接口更新优化逻辑
已修改20个文件
41 ■■■■ 文件已修改
MES.Service/bin/Debug/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Debug/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Release/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Release/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesRohInManager.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MESApplication.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MESApplication.exe 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MESApplication.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MESApplication.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MESApplication.exe 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MESApplication.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MESApplication.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MESApplication.exe 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MESApplication.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Debug/net8.0/MES.Service.dll
Binary files differ
MES.Service/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
MES.Service/bin/Release/net8.0/MES.Service.dll
Binary files differ
MES.Service/bin/Release/net8.0/MES.Service.pdb
Binary files differ
MES.Service/service/BasicData/MesRohInManager.cs
@@ -22,13 +22,14 @@
            {
                switch (rohInErpRohIn.Type)
                {
                    case "2":
                        return InsertData(db, mesRohIn, mesRohInDatas,
                            rohInErpRohIn.FBILLTYPE)
                            ? 1
                            : 0;
                    // case "2":
                    //     return InsertData(db, mesRohIn, mesRohInDatas,
                    //         rohInErpRohIn.FBILLTYPE)
                    //         ? 1
                    //         : 0;
                    case "3":
                        return UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0;
                    case "2":
                    case "4":
                        return SaveOrUpdateData(db, mesRohIn, mesRohInDatas)
                            ? 1
@@ -48,6 +49,18 @@
            {
                case "A":
                {
                    var decimals = mesRohInDatas.Select(s => s.Id).ToArray();
                    if (mesRohIn.Id != null)
                    {
                        base.DeleteById(mesRohIn.Id);
                    }
                    if (decimals.Length > 0)
                    {
                        db.Deleteable<MesRohInData>().In(decimals).ExecuteCommand();
                    }
                    var insert = base.Insert(mesRohIn);
                    var insertRange =
                        rohInDataManager.InsertRange(mesRohInDatas);
@@ -81,8 +94,11 @@
        private bool UpdateData(SqlSugarScope db, MesRohIn mesRohIn,
            List<MesRohInData> mesRohInDatas)
        {
            var update = base.Insert(mesRohIn);
            var insertOrUpdate = rohInDataManager.InsertRange(mesRohInDatas);
            var decimals = mesRohInDatas.Select(s => s.Id).ToArray();
            var update = base.DeleteById(mesRohIn.Id);
            var insertOrUpdate = db
                .Deleteable<MesRohInData>().In(decimals)
                .ExecuteCommand() > 0;
            if (update && insertOrUpdate) return true;
            throw new NotImplementedException("更新失败");
@@ -92,6 +108,17 @@
        private bool SaveOrUpdateData(SqlSugarScope db, MesRohIn mesRohIn,
            List<MesRohInData> mesRohInDatas)
        {
            if (mesRohIn.Id != null)
            {
                base.DeleteById(mesRohIn.Id);
            }
            if (mesRohInDatas.Count > 0)
            {
                db.Deleteable<MesRohInData>().Where(s=>s.ErpId == mesRohIn.EbelnK3id).ExecuteCommand();
            }
            var orUpdate = base.Insert(mesRohIn);
            var baOrUpdate = rohInDataManager.InsertRange(mesRohInDatas);
            if (orUpdate && baOrUpdate) return true;
MESApplication/bin/Debug/net8.0/MES.Service.dll
Binary files differ
MESApplication/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
MESApplication/bin/Debug/net8.0/MESApplication.dll
Binary files differ
MESApplication/bin/Debug/net8.0/MESApplication.exe
Binary files differ
MESApplication/bin/Debug/net8.0/MESApplication.pdb
Binary files differ
MESApplication/bin/Release/net8.0/MES.Service.dll
Binary files differ
MESApplication/bin/Release/net8.0/MES.Service.pdb
Binary files differ
MESApplication/bin/Release/net8.0/MESApplication.dll
Binary files differ
MESApplication/bin/Release/net8.0/MESApplication.exe
Binary files differ
MESApplication/bin/Release/net8.0/MESApplication.pdb
Binary files differ
MESApplication/bin/Release/net8.0/publish/MES.Service.dll
Binary files differ
MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
Binary files differ
MESApplication/bin/Release/net8.0/publish/MESApplication.dll
Binary files differ
MESApplication/bin/Release/net8.0/publish/MESApplication.exe
Binary files differ
MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
Binary files differ