From 7f8ed8cdc49b33178f34c91edf862f831cd30c9c Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 08 二月 2023 09:18:04 +0800 Subject: [PATCH] 供应商物料;根据登录用户获取默认值 --- WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormImportController.cs | 12 +++++------- 1 files changed, 5 insertions(+), 7 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 3d73e5b..aaa2eef 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" @@ -36,14 +36,13 @@ file.SaveAs(ExcelPath); NpoiHelper np = new NpoiHelper(); - DataSet ExcelDs = np.ReadExcel(ExcelPath, 1); + DataSet ExcelDs = np.ReadExcel(ExcelPath, 1,1,"0"); //鍒犻櫎鏂囦欢 File.Delete(ExcelPath); //鍒涘缓涓存椂琛� DataTable tb2 = new DataTable("dt2"); - DataTable tb3 = new DataTable("dt3"); //娣诲姞鍒楀悕 for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) @@ -71,8 +70,6 @@ } tb2.Rows.Add(row); } - - ExcelDs.Tables.Add(tb2); var error = ""; var ErrorResult = ""; @@ -260,6 +257,7 @@ HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//鑾峰緱涓�涓柊鐨刬d var HICMOBillNo = list[i]["鐢熶骇璁㈠崟鍙�*"].ToString(); var HICMOEntrySEQ = list[i]["鐢熶骇璁㈠崟鏄庣粏琛屽彿*"].ToString(); + var HProdORGID = list[i]["缁勭粐缂栫爜*"].ToString(); var HWorkShopID = list[i]["HWorkShopID"].ToString(); var HSourceID = list[i]["HSourceID"].ToString(); var HYX = list[i]["浼樺厛绾�"].ToString(); @@ -294,13 +292,13 @@ "HICMOEntrySEQ,HWorkShopID,HSourceID, HYX, HEmpID," + " HMaterID, HMaterName, HMaterModel, HUnitID, HBatchNo," + " HSeOrderBillQty, HPlanQty, HCompleteQty,HPreparatDate," + - "HMainSourceInterID,HMainSourceEntryID)values" + + "HMainSourceInterID,HMainSourceEntryID,HProdORGID,HICMOInterID_Sec,HICMOEntryID_Sec)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})"); + $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID}, {HMainSourceInterID},{HMainSourceEntryID})"); } int SumDay = 31; //鍔ㄦ�佷袱鏈堜箣宸� DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days; @@ -378,7 +376,7 @@ if (count != 1) { //鎻掑叆瀛愯〃 - oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HEntryID," + + oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," + "HMasterDate,HQty)" + $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," + $" '{date}', {HQTY})"); -- Gitblit v1.9.1