From cfe575cc5ae76e14cd6e218d5a3d014de67f0b4a Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期二, 26 十一月 2024 13:43:07 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-WEBS --- CLOUDWEB/WebService1.asmx.cs | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 42 insertions(+), 5 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index a046cb6..95da819 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -6,6 +6,7 @@ using System.Web; using System.Web.Services; using System.Data.SqlClient; +using System.Globalization; namespace CLOUDWEB { @@ -52914,8 +52915,11 @@ string HMaterNames = ""; string HMaterModels = ""; string HMaterIDs = "0"; + string HISKFPERIOD = "0";// 淇濊川鏈熷惎鐢ㄦ爣璁� + string HUnitIDs = "0"; + //鏌ヨ鐗╂枡 - ds = oCn.RunProcReturn("select * from Gy_Material with(nolock) where HNumber='" + str[4] + "' and HUSEORGID=" + HOrgIDs, "Gy_Material"); + ds = oCn.RunProcReturn("select HUnitID,HItemID,HName,HModel,case HISKFPERIOD when 1 then '1' else '0' end HISKFPERIOD from Gy_Material a with(nolock) where HNumber='" + str[4] + "' and HUSEORGID=" + HOrgIDs + " order by a.HISKFPERIOD desc", "Gy_Material"); if (ds.Tables[0].Rows.Count == 0) { @@ -52927,7 +52931,40 @@ HMaterIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); HMaterNames = ds.Tables[0].Rows[0]["HName"].ToString(); HMaterModels = ds.Tables[0].Rows[0]["HModel"].ToString(); + HISKFPERIOD = ds.Tables[0].Rows[0]["HISKFPERIOD"].ToString(); + HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); } + + DateTime HDate=DateTime.Now;//鏃ユ湡 + string HProduceDate = "";//鐢熶骇鏃ユ湡 + string HExpiryDate = "";//淇濊川鏈熻嚦 + + if (str.Length == 8 && HISKFPERIOD == "1") + { + if (!string.IsNullOrWhiteSpace(str[7])) + { + try + { + HDate = DateTime.ParseExact(str[7], "yyyyMMdd", CultureInfo.InvariantCulture); + } + catch + { + sErrMsg = "鏉$爜瑙f瀽澶辫触," + str[7] + ",鐢熶骇鏃ユ湡鏍煎紡涓嶆纭�!"; + return false; + } + } + + HProduceDate = HDate.ToString(); + + //if (!DateTime.TryParse(str[8], out HDate)) + //{ + // sErrMsg = "鏉$爜瑙f瀽澶辫触," + str[8] + ",淇濊川鏈熸牸寮忎笉姝g‘!"; + // return false; + //} + //HExpiryDate = HDate.ToString(); + //HISKFPERIOD = 1; + } + string HSupIDs = "0"; //鏌ヨ渚涘簲鍟� ds = oCn.RunProcReturn("select * from Gy_Supplier with(nolock) where HNumber='" + str[2] + "' and HUSEORGID=" + HOrgIDs, "Gy_Supplier"); @@ -52960,7 +52997,7 @@ string HSourceInterIDs = "0"; string HSourceEntryIDs = "0"; - string HUnitIDs = "0"; + //鏌ヨ閲囪喘璁㈠崟 ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a with(nolock) inner join Cg_POOrderBillSub b with(nolock) on a.HInterID = b.HInterID where HBillNo='" + HSourceBillNos + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); if (ds.Tables[0].Rows.Count == 0) @@ -52972,7 +53009,7 @@ { HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); - HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); + //HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); } @@ -53023,7 +53060,7 @@ ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + ",HGiveAwayFlag " + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + - ",HProduceDate,HExpiryDate " + + ",HProduceDate,HExpiryDate,HISKFPERIOD " + ") values (" + "'" + sBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'admin',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() @@ -53032,7 +53069,7 @@ + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterIDs.ToString() + "," + HEntryID.ToString() + "" + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) - + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','','')"); + + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','"+ HProduceDate + "','"+ HExpiryDate + "',"+ HISKFPERIOD + ")"); return true; } -- Gitblit v1.9.1