From 6ef126d9a9271afae02ee36469b1512e144bc555 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 17 十一月 2025 15:57:51 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/SCGL/日计划管理/Xs_SendGoodsPlanBillController.cs |   83 +++++++++++++----------------------------
 1 files changed, 26 insertions(+), 57 deletions(-)

diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs"
index 00a6ed8..ecb210b 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs"
@@ -113,21 +113,24 @@
                     {
                         error += $"娌℃湁绗﹀悎鏉′欢寰楅攢鍞鍗曚俊鎭紝瀹㈡埛璁㈠崟鍙�:{ tb2.Rows[i]["瀹㈡埛璁㈠崟鍙�"].ToString()},浜у搧浠g爜:{tb2.Rows[i]["鐗╂枡缂栫爜"].ToString()}";
                     }
+                }
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = ErrorResult += $"Excel妯℃澘瀛樺湪閿欒锛寋error}\r\n"; ;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
-                    if (error.Length > 0)
-                    {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 0;
-                        objJsonResult.Message = ErrorResult += $"Excel妯℃澘瀛樺湪閿欒锛岃鏁皗i + 1}:{error}\r\n"; ;
-                        objJsonResult.data = null;
-                        return objJsonResult;
-                    }
-                    else
-                    {
-                        tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HMaterID"].ToString();
-                        tb2.Rows[i]["SeOrderHInterID"] = ds.Tables[0].Rows[0]["FID"].ToString();//閿�鍞鍗曚富id
-                        tb2.Rows[i]["SeOrderHEntryID"] = ds.Tables[0].Rows[0]["FENTRYID"].ToString();//閿�鍞鍗曞瓙id
-                    }
+                //鏌ヨ閿�鍞〃鍒ゆ柇鏈夋病鏈夐攢鍞鍗曚俊鎭�
+                for (int i = 0; i < tb2.Rows.Count; i++)
+                {
+                    
+                    tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HMaterID"].ToString();
+                    tb2.Rows[i]["SeOrderHInterID"] = ds.Tables[0].Rows[0]["FID"].ToString();//閿�鍞鍗曚富id
+                    tb2.Rows[i]["SeOrderHEntryID"] = ds.Tables[0].Rows[0]["FENTRYID"].ToString();//閿�鍞鍗曞瓙id
+                    
                     //鏌ユ壘鏄惁瀛樺湪瀵瑰簲鍙戣揣璁″垝宸ュ崟
                     var dt = oCN.RunProcReturn($"select * from Xs_SendGoodsPlanBillMain where HSeOrderInterID in({ds.Tables[0].Rows[0]["FID"].ToString()}) and  HSeOrderEntryID in({ds.Tables[0].Rows[0]["FENTRYID"].ToString()})", "Xs_SendGoodsPlanBillMain");
                     if (dt.Tables[0].Rows.Count > 0)
@@ -332,6 +335,14 @@
                         }
                         oCN.Commit();//缁撴潫浜嬪姟
                     }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "褰撳墠鍗曟嵁涓嶅瓨鍦�,鏃犳硶鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                 }
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
@@ -339,50 +350,8 @@
                 objJsonResult.data = null;
                 return objJsonResult;
                 
-                //else if (DataType == 2)
-                //{
-                //    var NumData = HInterID.Split(',');
 
-                //    //鑾峰彇绯荤粺鍙傛暟
-                //    string sReturn = "";
-                //    oSystemParameter.ShowBill(ref sReturn);
-
-                //    for (int i = 0; i < NumData.Length; i++)
-                //    {
-                        
-                //        ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList_Left where 1=1 and hmainid=" + NumData[i], "h_v_JIT_Sc_WorkBillSortBillList");
-
-                //        if (ds.Tables[0].Rows.Count > 0)
-                //        {
-                //            if (ds.Tables[0].Rows[0]["鍗曟嵁鐘舵��"].ToString() != "1")
-                //            {
-                //                objJsonResult.code = "0";
-                //                objJsonResult.count = 0;
-                //                objJsonResult.Message = "褰撳墠鍗曟嵁涓嶈兘鍒犻櫎锛�";
-                //                objJsonResult.data = null;
-                //                return objJsonResult;
-                //            }
-
-                //            oCN.BeginTran();//寮�鍚簨鍔�
-
-                //            oCN.RunProc($"delete from Sc_WorkBillSortBillMain where HInterID={ NumData[i]}");
-
-                //            oCN.Commit();//缁撴潫浜嬪姟
-                //        }
-                        
-                //    }
-                //    objJsonResult.code = "1";
-                //    objJsonResult.count = 1;
-                //    objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
-
-                objJsonResult.code = "0";
-                objJsonResult.count = 0;
-                objJsonResult.Message = "褰撳墠鍗曟嵁涓嶅瓨鍦�,鏃犳硶鍒犻櫎锛�";
-                objJsonResult.data = null;
-                return objJsonResult;
+                
             }
             catch (Exception e)
             {

--
Gitblit v1.9.1