From 560cbe48b5c63634ff351477e00c885c4e162f92 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 11 七月 2023 09:02:30 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormImportController.cs | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" index 0a7ac31..b607cfa 100644 --- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" +++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" @@ -55,11 +55,13 @@ tb2.Columns.Add("鍗曟嵁鍙�", typeof(string)); tb2.Columns.Add("HWorkShopID", typeof(Int32));//鐢熶骇杞﹂棿 tb2.Columns.Add("HEmpID", typeof(Int32));//鑱屽憳 + tb2.Columns.Add("鍛樺伐", typeof(string));//鑱屽憳 tb2.Columns.Add("HUnitID", typeof(Int32));//璁¢噺鍗曚綅 tb2.Columns.Add("HSourceID", typeof(Int32));//鐢熶骇璧勬簮id tb2.Columns.Add("ICMOBillHInterID", typeof(Int32));//鐢熶骇璁㈠崟涓籭d tb2.Columns.Add("ICMOBillHEntryID", typeof(Int32));//鐢熶骇璁㈠崟瀛恑d tb2.Columns.Add("HProdORGID", typeof(Int32));//缁勭粐id + tb2.Columns.Add("HSeOrderBillNo", typeof(string));//閿�鍞鍗曞彿 //娣诲姞鏁版嵁 for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) @@ -127,6 +129,7 @@ tb2.Rows[i]["ICMOBillHInterID"] = ds.Tables[0].Rows[0]["hmainid"].ToString();//鐢熶骇璁㈠崟涓籭d tb2.Rows[i]["ICMOBillHEntryID"] = ds.Tables[0].Rows[0]["HEntryID"].ToString();//鐢熶骇璁㈠崟瀛恑d tb2.Rows[i]["鐢熶骇璁㈠崟鏁伴噺"] = ds.Tables[0].Rows[0]["鐢熶骇浠诲姟鍗曟暟閲�"].ToString();//鐢熶骇璁㈠崟鏁伴噺 + tb2.Rows[i]["HSeOrderBillNo"] = ds.Tables[0].Rows[0]["閿�鍞鍗曞彿"].ToString();//閿�鍞鍗曞彿 } ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList " + @@ -144,6 +147,7 @@ tb2.Rows[i]["HSourceID"] = ds.Tables[0].Rows[0]["HSourceID"].ToString(); tb2.Rows[i]["HEmpID"] = ds.Tables[0].Rows[0]["HEmpID"].ToString(); tb2.Rows[i]["鍛樺伐缂栫爜"] = ds.Tables[0].Rows[0]["鑱屽憳浠g爜"].ToString(); + tb2.Rows[i]["鍛樺伐"] = ds.Tables[0].Rows[0]["鑱屽憳"].ToString(); tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HUnitID"].ToString(); tb2.Rows[i]["璁¢噺鍗曚綅"] = ds.Tables[0].Rows[0]["璁¢噺鍗曚綅"].ToString(); tb2.Rows[i]["鎵规鍙�"] = ds.Tables[0].Rows[0]["鎵规"].ToString(); @@ -155,7 +159,8 @@ //鍛樺伐 ds = oCN.RunProcReturn($"select * from Gy_Employee where HNumber='{tb2.Rows[i]["鍛樺伐缂栫爜"].ToString()}'", "Gy_Employee"); if (ds.Tables[0].Rows.Count > 0) { - tb2.Rows[i]["鍛樺伐缂栫爜"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); + tb2.Rows[i]["HEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString(); + tb2.Rows[i]["鍛樺伐"] = ds.Tables[0].Rows[0]["HName"].ToString(); } else { @@ -319,6 +324,7 @@ var HDate = omdelMian.HDate; var HMainSourceInterID = list[i]["ICMOBillHInterID"].ToString(); var HMainSourceEntryID = list[i]["ICMOBillHEntryID"].ToString(); + var HSeOrderBillNo = list[i]["HSeOrderBillNo"].ToString(); ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); @@ -337,13 +343,15 @@ "HICMOEntrySEQ,HWorkShopID,HSourceID, HYX, HEmpID," + " HMaterID, HMaterName, HMaterModel, HUnitID, HBatchNo," + " HSeOrderBillQty, HPlanQty, HCompleteQty,HPreparatDate," + - "HMainSourceInterID,HMainSourceEntryID,HProdORGID,HICMOInterID_Sec,HICMOEntryID_Sec)values" + + "HMainSourceInterID,HMainSourceEntryID,HProdORGID,HICMOInterID_Sec,HICMOEntryID_Sec" + + ",HSeOrderBillNo)values" + $"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," + $"'{BillType}',GETDATE(),1,'{user}','{HDate}','{HICMOBillNo}','{HOrderType}'," + $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HEmpID == "" ? 0.ToString() : HEmpID)}," + $" {(HMaterID == "" ? 0.ToString() : HMaterID)}, '{HMaterName}', '{HMaterModel}', {(HUnitID == "" ? 0.ToString() : HUnitID)}, '{HBatchNo}'," + $" {(HSeOrderBillQty == "" ? 0.ToString() : HSeOrderBillQty)}, {(HPlanQty == "" ? 0.ToString() : HPlanQty)}, {(HCompleteQty == "" ? 0.ToString() : HCompleteQty)},getdate()," + - $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID}, {HMainSourceInterID},{HMainSourceEntryID})"); + $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID}, {HMainSourceInterID},{HMainSourceEntryID}" + + $",'{HSeOrderBillNo}')"); } int SumDay = 31; //鍔ㄦ�佷袱鏈堜箣宸� DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days; -- Gitblit v1.9.1