From 46ba7627ce1b83cc54a55a1b3e9a0dc22fc0613d Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期三, 19 六月 2024 19:52:51 +0800 Subject: [PATCH] 斯莫尔条码解析 --- CLOUDWEB/WebService1.asmx.cs | 485 +++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 370 insertions(+), 115 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index 55e1b66..817dc91 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -141,7 +141,7 @@ { DataSet ds; SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_StockCheckItem"+ sWhere, "Gy_StockCheckItem"); + ds = oCN.RunProcReturn("select HItemID,HNumber,HName from Gy_StockCheckItem" + sWhere, "Gy_StockCheckItem"); if (ds == null && ds.Tables[0].Rows.Count == 0) { sErr = "娌℃湁杩斿洖浠讳綍鏁版嵁锛�"; @@ -2794,7 +2794,7 @@ return false; } } - if (dal.AddNew_Mould(oMain.HInterID,oMain.HMouldID,oMain.HBillType,oMain.HWhID,oMain.HSCWHID,oMain.HStockPlaceID,oMain.HOutStockPlaceID,oMain.HBarCode,oMain.HMaker,oMain.HOWNERID,oMain.HStockOrgID,oMain.HBillNo,oMain.HOtherOrgID)) + if (dal.AddNew_Mould(oMain.HInterID, oMain.HMouldID, oMain.HBillType, oMain.HWhID, oMain.HSCWHID, oMain.HStockPlaceID, oMain.HOutStockPlaceID, oMain.HBarCode, oMain.HMaker, oMain.HOWNERID, oMain.HStockOrgID, oMain.HBillNo, oMain.HOtherOrgID)) { //sErrMsg = "淇濆瓨鎴愬姛锛�"; return true; @@ -4719,7 +4719,7 @@ " \"FBASEFINISHQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBASEFINISHQTY"]) + "," + " \"FFINISHQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FFINISHQTY"]) + "," + " \"FInStockType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInStockType"]) + "\"," + - sJson_StockPlace + + sJson_StockPlace + sJson_EntryCustom + sJson_SubCustom + @@ -5247,7 +5247,7 @@ } if (oSystemParameter.omodel.Sc_ICMOReportBill_ERPMode.ToUpper() == "CLOUD") //鍒ゆ柇鍚屾妯″紡鏄噾铦禖LOUD { - if (set_SaveICMOProductReportBill_CLD_Layui(oMain, workcode,HSourceID, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) + if (set_SaveICMOProductReportBill_CLD_Layui(oMain, workcode, HSourceID, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) { //"淇濆瓨鎴愬姛锛�"; return true; @@ -5269,7 +5269,7 @@ //鐢熸垚鐢熶骇姹囨姤鍗� [WebMethod] - public bool set_SaveICMOProductReportBill_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain,string workcode,int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + public bool set_SaveICMOProductReportBill_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) { //if (sHSourceType == "3710") //婧愬崟锛氱敓浜ц鍗� //{ @@ -5299,12 +5299,12 @@ /// <param name="oMain"></param> /// <param name="sErrMsg"></param> /// <returns></returns> - public bool SaveICMOProductReportBill_ICMO_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain,string workcode,int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + public bool SaveICMOProductReportBill_ICMO_CLD_Layui(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //寤虹珛涓�涓� 浜嬪姟锛� try { - + //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞� string s = ""; int sYear = 0; @@ -5370,7 +5370,7 @@ ") "); //鏇存柊鐢熶骇鐘舵�佷复鏃惰〃(褰撴棩瀹屽伐鏁伴噺)HDateFinishQty h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty - oCn.RunProc("exec h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty '"+ workcode + "','" + HSourceID + "','" + oMain.HMainSourceInterID + "','"+oMain.HMainSourceEntryID + "'"); + oCn.RunProc("exec h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty '" + workcode + "','" + HSourceID + "','" + oMain.HMainSourceInterID + "','" + oMain.HMainSourceEntryID + "'"); //string sql1 = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set // HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); //oCn.RunProc(sql1); @@ -5378,8 +5378,8 @@ //鏇存柊鍏宠仈鏁伴噺 oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOToICMOReport_Add " + oMain.HInterID.ToString()); - - + + if (oSystemParameterMain.Sc_ICMOReportBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳 { //瀹℃牳鍗曟嵁 @@ -5562,11 +5562,11 @@ bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052); string msgReport = dbId + ';' + sCLOUDUseName + ';' + sCLOUDPsd + ';' + 2052; - + //LogService.Write($"{Pub_Class.ClsPub.sCLOUDUrl}銆亄dbId}銆亄sCLOUDUseName}銆亄sCLOUDPsd}"); LogService.Write(sJson); - + @@ -5608,7 +5608,7 @@ } else { - sErrMsg = "鐢熸垚鐢熶骇姹囨姤鍗曞け璐ワ紒鐧诲綍澶辫触锛�"+ msgReport; + sErrMsg = "鐢熸垚鐢熶骇姹囨姤鍗曞け璐ワ紒鐧诲綍澶辫触锛�" + msgReport; oCn.RollBack(); return false; } @@ -5628,7 +5628,7 @@ //鐢熸垚鐢熶骇姹囨姤鍗� [WebMethod] - public bool set_SaveICMOProductReportBill_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType,string HProcID, ref string sErrMsg) + public bool set_SaveICMOProductReportBill_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, string HProcID, ref string sErrMsg) { Log.LogInfo(workcode.ToString()); //璁板綍鎻愪氦鏁版嵁 //鑾峰彇绯荤粺鍙傛暟 @@ -5667,7 +5667,7 @@ //鐢熸垚鐢熶骇姹囨姤鍗� [WebMethod] - public bool set_SaveICMOProductReportBill_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType,string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + public bool set_SaveICMOProductReportBill_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) { //if (sHSourceType == "3710") //婧愬崟锛氱敓浜ц鍗� //{ @@ -5697,7 +5697,7 @@ /// <param name="oMain"></param> /// <param name="sErrMsg"></param> /// <returns></returns> - public bool SaveICMOProductReportBill_ICMO_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType,string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + public bool SaveICMOProductReportBill_ICMO_CLD_LayuiYqn(Model.ClsSc_ICMOReportBillMain oMain, string workcode, int HSourceID, string sHSourceType, string HProcID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //寤虹珛涓�涓� 浜嬪姟锛� try @@ -5737,14 +5737,14 @@ //鏍规嵁鍗曞彿銆佽祫婧怚D銆佽鍗曚富ID銆佽鍗曞瓙ID銆佸埗鍗曚汉杩囨护浜ч噺姹囨姤鎶ユ鐢宠鎻愪氦鏁版嵁 string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set - HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HProcID='"+ HProcID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); + HICMOReportInterID ='" + oMain.HInterID + "', HICMOReportBillNo='" + oMain.HBillNo + "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + workcode + "' and a.HSourceID='" + HSourceID + "' and HProcID='" + HProcID + "' and HICMOInterID='" + oMain.HMainSourceInterID + "' and a.HICMOEntryID='" + oMain.HMainSourceEntryID + "' and a.HMaker='" + oMain.HMaker + "' and HRelationInterID='0'"); oCn.RunProc(sql); //鏍规嵁鐢熶骇璁㈠崟鍙锋煡璇㈢敓浜ц鍗曡〃锛屾嬁鍒扮粍缁囥�佽溅闂� DataSet ds0 = oCn.RunProcReturn("select HPRDORGID,HDeptID from Sc_ICMOBillMain with(nolock) where HBillNo='" + workcode + "'", "Sc_ICMOBillMain"); //鏌ヨ浜ч噺姹囨姤涓存椂琛� DataSet ds = oCn.RunProcReturn("select top 1 * from Sc_ICMOBillWorkQtyStatus_Tmp with(nolock) where HICMOReportInterID='" + oMain.HInterID + "' and HICMOReportBillNo='" + oMain.HBillNo + "' and HProcID='" + HProcID + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); - + if (ds.Tables[0].Rows.Count <= 0) { @@ -5767,14 +5767,14 @@ ",HPlanQty,HInStockQty,HSumTimes,HExplanation,HRemark" + ",HInnerBillNo,HMaker,HMakeDate,HSupID,HMarker" + ") " + - " values('" + oMain.HYear.ToString() + "','"+ oMain.HPeriod.ToString() + "','3714','3714','"+ oMain.HInterID.ToString() + "'" + - ", convert(varchar(10),getdate(),120),'"+oMain.HBillNo+"','2','0','0'" + - ", '"+oMain.HMainSourceInterID+"','','" + oMain.HDeptID.ToString() + "','','"+ ds.Tables[0].Rows[0]["HGroupID"].ToString() +"'" + + " values('" + oMain.HYear.ToString() + "','" + oMain.HPeriod.ToString() + "','3714','3714','" + oMain.HInterID.ToString() + "'" + + ", convert(varchar(10),getdate(),120),'" + oMain.HBillNo + "','2','0','0'" + + ", '" + oMain.HMainSourceInterID + "','','" + oMain.HDeptID.ToString() + "','','" + ds.Tables[0].Rows[0]["HGroupID"].ToString() + "'" + ", '','" + ds.Tables[0].Rows[0]["HMaterID"].ToString() + "','','0',''" + ", '" + ds.Tables[0].Rows[0]["HPlanQty"].ToString() + "','0','0','鍚屾erp鐢熶骇姹囨姤鍗�','鎶ュ伐鍙板悓姝ュ伐搴忔眹鎶ュ崟'" + - ",'','" +oMain.HMaker+ "','" + oMain.HDate + "','0',''" + + ",'','" + oMain.HMaker + "','" + oMain.HDate + "','0',''" + ") "); - + //鏇存柊鐢熶骇鐘舵�佷复鏃惰〃(褰撴棩瀹屽伐鏁伴噺)HDateFinishQty h_p_JIT_Sc_ICMOBillStatus_Tmp_Qty //oCn.RunProc("exec h_p_JIT_Sc_ICMOBillStatus_Tmp_QtyYqn '" + workcode + "','" + HSourceID + "','"+HProcID+"','" + oMain.HMainSourceInterID + "','" + oMain.HMainSourceEntryID + "'"); @@ -6023,7 +6023,7 @@ } catch (Exception e) { - sErrMsg = "鐢熸垚鐢熶骇姹囨姤鍗曞け璐rro锛�" + e.Message+e.StackTrace; + sErrMsg = "鐢熸垚鐢熶骇姹囨姤鍗曞け璐rro锛�" + e.Message + e.StackTrace; oCn.RollBack(); return false; } @@ -9149,7 +9149,7 @@ //杈呭姪灞炴�� sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; - + //璋冨叆浠撲綅 if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcStockLocId"]) == "") { @@ -9924,7 +9924,7 @@ } //鏄惁鍚敤淇濊川鏈熸帶鍒� - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") { sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; @@ -12248,7 +12248,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; sJson_DestBatchNo = " \"FDESTLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FDESTLOT"]) + "\"}, \"FDESTLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FDESTLOT"]) + "\" , "; @@ -12277,7 +12277,7 @@ //杈呭姪灞炴�� sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; - + //璋冨嚭浠撲綅 if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcStockLocId"]) == "") { @@ -14943,7 +14943,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; } @@ -15352,7 +15352,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; } @@ -15362,7 +15362,7 @@ } //鏄惁鍚敤淇濊川鏈熸帶鍒� - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") { sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; @@ -17485,7 +17485,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; } @@ -19332,7 +19332,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -21654,7 +21654,7 @@ var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", new object[] { "PRD_PickMtrl", sJson3 }); - HReturn =result3.ToString(); + HReturn = result3.ToString(); if (HReturn.Contains("\"IsSuccess\":false") == true) { @@ -23267,7 +23267,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; } @@ -23299,7 +23299,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -25773,7 +25773,7 @@ //杈呭姪灞炴�� sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; - + //鏄惁鍚敤淇濊川鏈熸帶鍒� if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") { @@ -27357,7 +27357,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; } @@ -27389,7 +27389,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -27763,7 +27763,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; } @@ -27795,7 +27795,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -29267,7 +29267,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -29663,7 +29663,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; //鎵瑰彿 } @@ -29695,7 +29695,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -31249,7 +31249,7 @@ } - + /// <summary> /// 浜у搧鍏ュ簱鍗� @@ -31966,7 +31966,7 @@ { //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID, ref sErrMsg) == false) { sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return false; @@ -34622,7 +34622,7 @@ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); //鏄惁鍚敤鎵规绠$悊 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") { sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , " + //鎵瑰彿 " \"FReceiveLot\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReceiveLot"]) + "\"}, \"FReceiveLot_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReceiveLot"]) + "\" , "; //鏀惰揣鎵瑰彿 @@ -34633,7 +34633,7 @@ } //鏄惁鍚敤淇濊川鏈熸帶鍒� - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") { sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; @@ -34655,7 +34655,7 @@ } //浠撲綅 - if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") + if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") { sJson_StockPlace = ""; } @@ -36263,8 +36263,8 @@ sErrMsg = "鐢熸垚骞跺鏍稿叾浠栧叆搴撳崟鎴愬姛锛佸崟鎹彿涓猴細" + oMain.HBillNo; oCn.Commit(); return true; - } } + } catch (Exception e) { LogService.Write("瀹℃牳鍥炴粴" + sRemark); @@ -36447,7 +36447,7 @@ //杈呭姪灞炴�� sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; - + //鏄惁鍚敤淇濊川鏈熸帶鍒� if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") { @@ -37284,22 +37284,22 @@ // //if (oSystemParameter.omodel.Kf_OtherInBill_ERPMode.ToUpper() == "CLOUD") //鍒ゆ柇鍚屾妯″紡鏄噾铦禖LOUD //{ - //涓婁紶鍓嶅繀濉」鍒ゆ柇 - //if (oMain.HDeptID == 0) - //{ - // sErrMsg = "閮ㄩ棬娌℃湁閫夋嫨锛�"; - // return false; - //} - if (set_SaveMouldProdInBill_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) - { - //"淇濆瓨鎴愬姛锛�"; - return true; - } - else - { - //"淇濆瓨澶辫触锛�"; - return false; - } + //涓婁紶鍓嶅繀濉」鍒ゆ柇 + //if (oMain.HDeptID == 0) + //{ + // sErrMsg = "閮ㄩ棬娌℃湁閫夋嫨锛�"; + // return false; + //} + if (set_SaveMouldProdInBill_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true) + { + //"淇濆瓨鎴愬姛锛�"; + return true; + } + else + { + //"淇濆瓨澶辫触锛�"; + return false; + } //} sErrMsg = "淇濆瓨鍣ㄥ叿閲囪喘鍏ュ簱鍗曞け璐ワ紒" + sErrMsg; @@ -37338,8 +37338,8 @@ //鐢熸垚鍑哄叆搴撳崟鎹� //鎻掑叆瀛愯〃 //鎻掑叆涓昏〃 - oCn.RunProc("EXEC h_p_Kf_MouldProdInBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','"+oMain.HBillType+"'"); - + oCn.RunProc("EXEC h_p_Kf_MouldProdInBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'"); + //鎻掑叆涓昏〃 oCn.RunProc("Insert Into Sc_MouldStockBillMain " + "(HBillType,HBillSubType,HInterID,HDate,HBillNo" + @@ -43351,7 +43351,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) { sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return false; @@ -43536,12 +43536,12 @@ if (dal.omodel_View.HSourceInterID != 0 && oSystemParameter.omodel.WMS_CampanyName == "鍗氭棩绉戞妧" && HBillType != "1202" && HBillType != "1205") { - if(dal.omodel_View.HinitQty==0) + if (dal.omodel_View.HinitQty == 0) { sErrMsg = "宸叉壂鎻忔暟閲忕瓑浜庢垨澶т簬婧愬崟鏁伴噺锛屼笉鍏佽鎵爜锛�"; return false; } - else if(dal.omodel_View.HQty > dal.omodel_View.HinitQty) + else if (dal.omodel_View.HQty > dal.omodel_View.HinitQty) { dal.omodel_View.HQty = dal.omodel_View.HinitQty; } @@ -43775,7 +43775,7 @@ //鍏堣繘鍏堝嚭鎺у埗 if ((HBillType == "1204" && oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y") //绯荤粺鍙傛暟 鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗 || (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y") //绯荤粺鍙傛暟 閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗 - ) + ) { DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + model.HBatchNo + "','" + model.HBarCode + "'," + model.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) @@ -44211,7 +44211,7 @@ } } } - else if(oSystemParameter.omodel.WMS_CampanyName == "鍥涚淮灏�") + else if (oSystemParameter.omodel.WMS_CampanyName == "鍥涚淮灏�") { DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); if (dal.GetInfoByBarCode_View(sBarCode2)) @@ -44306,7 +44306,7 @@ //鏃犺繑鍥炴暟鎹垯涓虹墿鏂欐潯鐮� if (Dss == null || Dss.Tables[0].Rows.Count == 0) { - if (oSystemParameter.omodel.WMS_CampanyName == "鍗氭棩绉戞妧" || oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏅鸿" + if (oSystemParameter.omodel.WMS_CampanyName == "鍗氭棩绉戞妧" || oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏅鸿" || oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�" || oSystemParameter.omodel.WMS_CampanyName == "濂ラ偊" || oSystemParameter.omodel.WMS_CampanyName == "鍗撳姏") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤 { @@ -44863,10 +44863,10 @@ } catch (Exception e) { - sErrMsg = e.Message+";"+e.StackTrace; + sErrMsg = e.Message + ";" + e.StackTrace; return null; } - + } #endregion @@ -45915,7 +45915,7 @@ //灏嗘暣鎵樻潯鐮佸搴旂殑鏉$爜缂栧彿鎷兼垚涓�涓插瓧绗︿覆 for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) { - sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"])+"'"; + sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]) + "'"; } sBarCode_New = sBarCode_New.Remove(0, 1); //鍘绘帀瀛楃涓茬涓�涓瓧绗� @@ -46069,7 +46069,7 @@ "from Gy_BarCodeBill with(nolock) where HBarCode in (" + sBarCode_New + ")" ); return true; - } + } else { sErrMsg = "鏃犳晥鏉$爜"; @@ -46102,7 +46102,7 @@ string sFIFOCtl = "N"; //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級 string sMulSourceCtl = "N"; //鏄惁鍚敤澶氭簮鍗曟壂鐮佹ā寮忥紙'Y'涓哄惎鐢級 int sWHSPCtl = 0; //鐣岄潰浠撳簱涓虹┖鏃讹紝鍊煎彉涓�1 - string sBarCode = sHBarCode_Pack.Substring(0, sHBarCode_Pack.Length-2);//鎴帀鏉$爜鍚庝袱浣嶅瓧绗︿覆 + string sBarCode = sHBarCode_Pack.Substring(0, sHBarCode_Pack.Length - 2);//鎴帀鏉$爜鍚庝袱浣嶅瓧绗︿覆 double sRelQty = 0; //鏍规嵁鍗曟嵁绫诲瀷锛岃幏鍙栧搴斿崟鎹郴缁熷弬鏁板�� @@ -46443,7 +46443,7 @@ " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + ",HAuxPropID," + oMain.HProcID.ToString() + "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" + "," + oMain.HQtyMust.ToString() + ",HQty," + oMain.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" + - ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() +"," + oMain.HSourceEntryID.ToString() +",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + + ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','','" + oMain.HSubBillType + "'" + ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + @@ -46774,7 +46774,7 @@ public bool Get_CheckTypeByMouldBarCode(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, bool HRedBlueFlag, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, ref string sErrMsg) { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddMouldBarCode_New '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWhID.ToString() + "," + HSCSPID.ToString() +",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddMouldBarCode_New"); + DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddMouldBarCode_New '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWhID.ToString() + "," + HSCSPID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddMouldBarCode_New"); if (ds == null || ds.Tables[0].Rows.Count == 0) { sErrMsg = "灏嗘ā娌诲叿淇℃伅鍐欏叆妯℃不鍏峰嚭鍏ュ簱涓存椂琛ㄥけ璐ワ紒"; @@ -47749,7 +47749,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曟椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -47836,7 +47836,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曟椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -47926,7 +47926,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曟椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -48104,7 +48104,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HOWNERID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曟椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -48306,7 +48306,7 @@ return null; } //澶氭簮鍗曟ā寮� - if (oSystemParameter.omodel.Kf_MoveStockStepInBill_MulSourceBill.ToUpper() == "Y") + if (oSystemParameter.omodel.Kf_MoveStockStepInBill_MulSourceBill.ToUpper() == "Y") { sMulSourceFlag = 1; } @@ -48368,13 +48368,13 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) { sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; } - if(HBillType == "1205" && oSystemParameter.omodel.WMS_CampanyName == "妫シ") + if (HBillType == "1205" && oSystemParameter.omodel.WMS_CampanyName == "妫シ") { oBar = get_CheckTypeByBarCode_New(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HCustom1, HScanStyle, ref sErrMsg); if (oBar == null) @@ -49491,7 +49491,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) { sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -49511,7 +49511,7 @@ { NewBarCode = sBarCode.Split(Convert.ToChar("#")); sBarCode = NewBarCode[0]; - if(HQty==0) + if (HQty == 0) { HQty = DBUtility.ClsPub.isDoule(NewBarCode[1]); } @@ -49564,7 +49564,7 @@ //鍒ゆ柇鏉$爜绫诲瀷鏄惁涓烘墭鐩樻潯鐮侊紝濡傛灉鏄墭鐩樻潯鐮佸垯鍒嗚В骞舵ā鎷熸壂鐮� if (dal.omodel_View.HBarCodeType == "鎵樼洏鏉$爜") { - if(oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") { //鍒嗚В鎵樼洏鏉$爜寰楀埌鏄庣粏鏉$爜淇℃伅鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃 DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode"); @@ -49684,6 +49684,261 @@ } else { + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + { + if (!dal.GetInfoByBarCode_View(sBarCode)) + { + //鏉$爜瑙f瀽 + string[] str = sBarCode.Split('@'); + + if (str[0] != "SRM") + { + sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮佹槸鍚︽纭�!"; + return null; + } + + int HOrgIDs = 0; + //鏌ヨ缁勭粐 + DataSet ds = oCn.RunProcReturn("select * from Xt_ORGANIZATIONS where HNumber='" + str[1] + "' ", "Xt_ORGANIZATIONS"); + if (ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮佺粍缁囨槸鍚︽纭�!"; + return null; + } + else + { + HOrgIDs = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString()); + } + + string HMaterNames = ""; + string HMaterModels = ""; + string HMaterIDs = "0"; + //鏌ヨ鐗╂枡 + ds = oCn.RunProcReturn("select * from Gy_Material where HNumber='" + str[4] + "' and HUSEORGID=" + HOrgIDs, "Gy_Material"); + + + if (ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮佺墿鏂欐槸鍚︽纭�!"; + return null; + } + else + { + HMaterIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); + HMaterNames = ds.Tables[0].Rows[0]["HName"].ToString(); + HMaterModels = ds.Tables[0].Rows[0]["HModel"].ToString(); + + } + string HSupIDs = "0"; + //鏌ヨ渚涘簲鍟� + ds = oCn.RunProcReturn("select * from Gy_Supplier where HNumber='" + str[2] + "' and HUSEORGID=" + HOrgIDs, "Gy_Supplier"); + if (ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮佷緵搴斿晢鏄惁姝g‘!"; + return null; + } + else + { + HSupIDs = ds.Tables[0].Rows[0]["HItemID"].ToString(); + } + + string HSourceInterIDs = "0"; + string HSourceEntryIDs = "0"; + string HSourceBillNos = "0"; + string HUnitIDs = "0"; + //鏌ヨ閲囪喘璁㈠崟 + ds = oCn.RunProcReturn(@"select a.HInterID,b.HEntryID,a.HBillNo,b.HUnitID from Cg_POOrderBillMain a +inner join Cg_POOrderBillSub b on a.HInterID = b.HInterID where HBillNo='" + str[3] + "' and b.HMaterID=" + HMaterIDs, "Cg_POOrderBillMain"); + if (ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮侀噰璐鍗曟槸鍚︽纭�!"; + return null; + } + else + { + HSourceInterIDs = ds.Tables[0].Rows[0]["HInterID"].ToString(); + HSourceEntryIDs = ds.Tables[0].Rows[0]["HEntryID"].ToString(); + HSourceBillNos = ds.Tables[0].Rows[0]["HBillNo"].ToString(); + HUnitIDs = ds.Tables[0].Rows[0]["HUnitID"].ToString(); + } + + string HInnerBillNos = ""; + //鏌ヨ鍐呴儴閲囪喘璁㈠崟鍙� + ds = oCn.RunProcReturn(@" select * from h_v_IF_POInStockList where 閲囪喘璁㈠崟鍙�= '" + str[3] + "' ", "h_v_IF_POInStockList"); + if (ds.Tables[0].Rows.Count == 0) + { + //HInnerBillNos = "9624"; + sErrMsg = "鏉$爜瑙f瀽澶辫触,璇风‘璁ゆ潯鐮佸唴閮ㄩ噰璐鍗曞彿鏄惁姝g‘!"; + return null; + } + else + { + HInnerBillNos = ds.Tables[0].Rows[0]["鍐呴儴閲囪喘璁㈠崟鍙�"].ToString(); + } + + if (HQty == 0) + { + HQty = double.Parse(str[6]); + } + + + //鏃ユ湡鑾峰彇鏂瑰紡 + string sDate = DateTime.Now.ToString(); + string HWei = "0"; //灏炬暟 + string HBarCodeType = "鎵规鏉$爜"; + Int64 HMaterID = int.Parse(HMaterIDs); + Int64 HAuxPropID = 0; + Int64 HUnitID = int.Parse(HUnitIDs); + double HQty2 = HQty; + string HBatchNo2 = str[5]; + Int64 HSupID = int.Parse(HSupIDs); + Int64 HGroupID = 0; + int HPrintQty = 0; + Int64 HSourceInterID = int.Parse(HSourceInterIDs); + Int64 HSourceEntryID = int.Parse(HSourceEntryIDs); + HSourceBillNo = HSourceBillNos; + //HSourceBillType = "1102"; + Int64 HBarcodeNo = 0; //鎵樺彿 + Int64 HBarcodeQtys = 0; //鎬绘墭鏁� + Int64 HDeptID = 0; + //Int64 HWhID = 0; + //Int64 HSPID = 0; + string HRemark = "鏉$爜瑙f瀽"; + string HMaterName = HMaterNames; + string HMaterModel = HMaterModels; + string HPinfan = ""; + string HMTONo = ""; + Int64 HCusID = 0; + string HCusType = ""; + DateTime HEndDate = DateTime.Now; + string HWorkLineName = ""; + string HSeOrderBillNo = ""; + string HInnerBillNo = HInnerBillNos; + bool HGiveAwayFlag = false; + Int64 HEntryID = 1; + Int64 HInterIDs = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo); + int HOrgID = HOrgIDs; + + + oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + + ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + + ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + + ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + + ",HGiveAwayFlag " + + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + + ",HProduceDate,HExpiryDate " + + ") values (" + + "'" + sBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() + + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" + + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" + + ", " + 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 + "','','')"); + + + } + + if (dal.GetInfoByBarCode_View(sBarCode)) + { + HQty = dal.omodel_View.HQty; + + if (dal.omodel_View.HStopflag) + { + sErrMsg = "鏉$爜宸茶绂佺敤锛屼笉鍏佽鎵弿锛�"; + return null; + } + else + { + //鍒ゆ柇鏉$爜绫诲瀷鏄惁涓烘墭鐩樻潯鐮侊紝濡傛灉鏄墭鐩樻潯鐮佸垯鍒嗚В骞舵ā鎷熸壂鐮� + if (dal.omodel_View.HBarCodeType == "鎵樼洏鏉$爜") + { + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + { + //鍒嗚В鎵樼洏鏉$爜寰楀埌鏄庣粏鏉$爜淇℃伅鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃 + DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode"); + if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0) + { + sErrMsg = "鍒嗚В鎵樼洏鏉$爜鍙戠敓閿欒锛�"; + return null; + } + else + { + if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1) + { + sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]); + return null; + } + else + { + for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) + { + dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); + dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeType"]); + dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HMaterID"]); + dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HAuxPropID"]); + dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBatchNo"]); + dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[i]["HQty"]); + dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceInterID"]); + dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[i]["HSourceEntryID"]); + dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HSourceBillNo"]); + dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HMTONo"]); + + //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛� + oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); + if (oBar == null) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忓け璐ワ紒" + dal.omodel_View.HBarCode + sErrMsg; + return null; + } + SourceFlag = true; + } + } + return oBar; + } + } + else + { + //灏嗘墭鏉$爜淇℃伅鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃 + oBar = get_SavePonderationBillMain_Temp_PackBarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, 0, 0, SourceFlag, HSourceBillType, HStockOrgID, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); + if (oBar == null) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg; + return null; + } + else + { + return oBar; + } + } + } + else + //鏉$爜绫诲瀷涓嶄负鎵樼洏鏉$爜 + { + //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛� + oBar = get_SavePonderationBillMain_Temp_BarCode(dal.omodel_View, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, SourceFlag, HSourceBillType, HStockOrgID, HCustom1, HCustom2, oSystemParameter.omodel, ref sErrMsg); + if (oBar == null) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg; + return null; + } + else + { + return oBar; + } + } + } + } + else + { + sErrMsg = "鏉$爜妗f涓笉瀛樺湪璇ユ潯鐮侊紝璇风‘璁ゆ潯鐮佹槸鍚︽纭垨鏄惁宸茶鍒犻櫎锛�"; + return null; + } + } + if (dal.GetInfoByBarCode_View(sBarCode)) { if (dal.omodel_View.HStopflag) @@ -50017,7 +50272,7 @@ sWhName = DBUtility.ClsPub.isStrNull(DsWMS.Tables[0].Rows[0]["HWhName"]); sSPName = DBUtility.ClsPub.isStrNull(DsWMS.Tables[0].Rows[0]["HSPName"]); - if(sWMSQty<=0) + if (sWMSQty <= 0) { sErrMsg = "鎵�鎵弿鐗╂枡鏉$爜锛�" + omodel_View.HBarCode + " 锛屽湪浠撳簱[ " + sWhName + " ]銆佷粨浣峓 " + sSPName + " ]涓紝鏃犳潯鐮佸簱瀛橈紒"; return null; @@ -50189,7 +50444,7 @@ } else { - if(DBUtility.ClsPub.isDoule(DsInQty.Tables[0].Rows[0]["HQty"])==0) + if (DBUtility.ClsPub.isDoule(DsInQty.Tables[0].Rows[0]["HQty"]) == 0) { sErrMsg = "鎵�鎵弿鐗╂枡鏉$爜锛� " + omodel_View.HBarCode + " 锛屽凡琚叾浠栧崟鎹壂鎻忎笂浼狅紝涓嶅厑璁稿啀娆℃壂鐮侊紒"; return null; @@ -50308,7 +50563,7 @@ oMain.HSourceEntryID = DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[i]["HSourceEntryID"]); oMain.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillNo"]); oMain.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillType"]); - if (omodel_View.HProduceDate<Convert.ToDateTime("1950-01-01")) + if (omodel_View.HProduceDate < Convert.ToDateTime("1950-01-01")) { oMain.HBeginDate = ""; } @@ -50316,14 +50571,14 @@ { oMain.HBeginDate = omodel_View.HProduceDate.ToShortDateString(); } - if (omodel_View.HExpiryDate<Convert.ToDateTime("1950-01-01")) + if (omodel_View.HExpiryDate < Convert.ToDateTime("1950-01-01")) { oMain.HEndDate = ""; } else { oMain.HEndDate = omodel_View.HExpiryDate.ToShortDateString(); - } + } oMain.HSTOCKORGID = HStockOrgID; oMain.HOWNERID = HStockOrgID; oMain.HCusBarCode = HCustom1; @@ -50342,7 +50597,7 @@ ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','','" + oMain.HSubBillType + "'" + - ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + "," + (oMain.HBeginDate == "" ? "NULL": "'"+ oMain.HBeginDate + "'" ) + + ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + "," + (oMain.HBeginDate == "" ? "NULL" : "'" + oMain.HBeginDate + "'") + "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")"); if (sRemQty <= 0) @@ -50402,7 +50657,7 @@ { if (DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[0][0]) == 1) { - if(SourceFlag == false) + if (SourceFlag == false) { sErrMsg = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[0]["HRemark"]); oCn.RollBack(); @@ -50413,7 +50668,7 @@ { omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[0]["HSourceBillNo"]); omodel_View.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[0]["HSourceBillType"]); - if(omodel_View.HSourceBillNo!="") + if (omodel_View.HSourceBillNo != "") { Int64 HAccessFlag = 1; //鏄惁鐗╂枡鏉$爜甯﹀嚭婧愬崟淇℃伅鏍囧織锛�0涓虹洿鎺ユ壂婧愬崟鏉$爜锛�1涓虹墿鏂欐潯鐮佸甫鍑烘簮鍗曚俊鎭級 oBar = get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, omodel_View.HSourceBillNo, omodel_View.HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref sErrMsg); @@ -50499,7 +50754,7 @@ DataSet DsERP = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetERPICInventory " + HInterID.ToString() + ",'" + HBillType + "','" + HMaterNumber + "'," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_GetERPICInventory"); if (DsERP == null || DsERP.Tables[0].Rows.Count == 0) { - HRemark = HRemark+ "瀵瑰簲鐗╂枡浠g爜锛�" + HMaterNumber + "銆佹壒鍙凤細" + omodel_View.HBatchNo + " 锛屾棤閲戣澏搴撳瓨锛�"; + HRemark = HRemark + "瀵瑰簲鐗╂枡浠g爜锛�" + HMaterNumber + "銆佹壒鍙凤細" + omodel_View.HBatchNo + " 锛屾棤閲戣澏搴撳瓨锛�"; } else { @@ -50513,7 +50768,7 @@ } } } - if(HRemark!="") + if (HRemark != "") { sErrMsg = "鎵�鎵弿鎵樻潯鐮侊細" + omodel_View.HBarCode + "锛�" + HRemark; oCn.RollBack(); @@ -50840,7 +51095,7 @@ { //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HStockOutOrgID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HStockOutOrgID, ref sErrMsg) == false) { sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -51647,7 +51902,7 @@ //灏嗘暣鎵樻潯鐮佸搴旂殑鏉$爜缂栧彿鎷兼垚涓�涓插瓧绗︿覆 for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) { - sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"])+"'"; + sBarCode_New = sBarCode_New + ",'" + DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]) + "'"; } sBarCode_New = sBarCode_New.Remove(0, 1); //鍘绘帀瀛楃涓茬涓�涓瓧绗� @@ -52330,7 +52585,7 @@ //鑾峰彇绯荤粺鍙傛暟 Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); - if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == false) + if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涜繑鍥炵墿鏂欐槑缁嗗垪琛ㄦ椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; return null; @@ -52785,13 +53040,13 @@ #region 鐢熶骇鍒犳墭鍗曟ā鍧� 鎻愪氦 [WebMethod] - public bool set_DeletePackUnionBill(Int64 HInterID, string HBillNo, string HBarCode_Pack, string HMaker, string HComputerName, string HIPAddress,string HModCaption, ref string sErrMsg) + public bool set_DeletePackUnionBill(Int64 HInterID, string HBillNo, string HBarCode_Pack, string HMaker, string HComputerName, string HIPAddress, string HModCaption, ref string sErrMsg) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); try { oCn.BeginTran(); - DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + HComputerName + "','" + HIPAddress + "','" + HModCaption + "'" , "h_p_Sc_PackUnionBill_Delete"); + DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + HComputerName + "','" + HIPAddress + "','" + HModCaption + "'", "h_p_Sc_PackUnionBill_Delete"); oCn.Commit(); return true; } @@ -52943,7 +53198,7 @@ } //鍚屼粨搴撲粨浣嶆崲鎵� - if (sStatus==1) + if (sStatus == 1) { try { @@ -54038,12 +54293,12 @@ //鏁伴噺 //鍙瓨鍦ㄤ竴琛屾暟鎹椂锛屾暟閲�=鏉$爜鍙壂鏁伴噺 - if (ds1.Tables[0].Rows.Count==1) + if (ds1.Tables[0].Rows.Count == 1) { oMain.HQty = sRelQty; } //瀛樺湪澶氳鐩稿悓鐗╂枡锛屾潯鐮佸墿浣欐暟閲�<鎵�閫夎婧愬崟鍓╀綑鍙壂鏁伴噺 鎴� 鎵�閫夎婧愬崟涓烘渶鍚庝竴鏉℃暟鎹椂 锛屾暟閲�=鏉$爜鍓╀綑鏁伴噺 - else if (sRemQty <= 0 || (i == ds1.Tables[0].Rows.Count-1 && sRemQty > 0)) + else if (sRemQty <= 0 || (i == ds1.Tables[0].Rows.Count - 1 && sRemQty > 0)) { oMain.HQty = sRemQty + omodel_View.HSourceQty; } @@ -54665,7 +54920,7 @@ return null; } - if (sBarCode.Trim()=="") + if (sBarCode.Trim() == "") { sErrMsg = "鏉$爜涓嶈兘涓虹┖锛岃鎵弿鏉$爜锛�"; return null; @@ -55058,7 +55313,7 @@ string sBarBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["BarCodeType"]); //鍒ゆ柇鏉$爜绫诲瀷涓� 鍩虹璧勬枡鏉$爜 鎴� 婧愬崟鏉$爜 - if(sBarBillType == "婧愬崟鏉$爜") + if (sBarBillType == "婧愬崟鏉$爜") { oBar = get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref sErrMsg); if (oBar == null) @@ -55097,7 +55352,7 @@ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //鑾峰彇绯荤粺鍙傛暟 - string sErrMsg=""; + string sErrMsg = ""; Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); if (oSystemParameter.ShowBill(ref sErrMsg) == false) { @@ -55510,7 +55765,7 @@ //鍣ㄥ叿涓�閿壂鐮佹ā寮忥紝鏍规嵁鏉$爜鍓嶇紑璧� 涓嶅悓鏂规硶锛堜粨搴撱�佷粨浣嶃�侀儴闂級锛堟簮鍗曘�佺墿鏂欐潯鐮侊級 [WebMethod] // sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, SCWhID, HStockInOrgID, HStockOutOrgID - public Model.ClsKf_ICStockBill_Mould get_CheckTypeByBarCode_Mould(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, string HExpressNumber,Int64 SCWhID, Int64 HStockInOrgID,Int64 HStockOutOrgID, ref string sErrMsg) + public Model.ClsKf_ICStockBill_Mould get_CheckTypeByBarCode_Mould(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HOWNERID, string HExpressNumber, Int64 SCWhID, Int64 HStockInOrgID, Int64 HStockOutOrgID, ref string sErrMsg) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); Model.ClsKf_ICStockBill_Mould oBar = new Model.ClsKf_ICStockBill_Mould(); @@ -55535,7 +55790,7 @@ if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N") { //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛� - if (set_SavePonderationBillMain_Temp_BarCode_Mould(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber,SCWhID, HStockInOrgID, HStockOutOrgID, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) + if (set_SavePonderationBillMain_Temp_BarCode_Mould(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, SCWhID, HStockInOrgID, HStockOutOrgID, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg)) { oBar.HSourceBillType = sHSourceBillType; oBar.HSourceBillNo = sHSourceBillNo; -- Gitblit v1.9.1