From c7b9f1a5f2b78c1105dca5bce2ff46a73a155e00 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期二, 29 六月 2021 15:10:59 +0800
Subject: [PATCH] 新增生成CLOUD生产补料单(源单:生产用料清单)调用方法
---
DLL/Model.dll | 0
Pub_Class.dll | 0
DLL/Pub_Class.dll | 0
CLOUDWEB/WebService1.asmx.cs | 365 ++++++++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 355 insertions(+), 10 deletions(-)
diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 7db5df6..e297784 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -14079,6 +14079,346 @@
#endregion
+ #region 鐢熶骇琛ユ枡鍗� *
+
+ //鐢熸垚鐢熶骇琛ユ枡鍗�
+ [WebMethod]
+ public bool set_SaveMateReplenishOutBill_New(Model.ClsKf_MateReplenishOutBillMain oMain, string sHSourceType, ref string sErrMsg)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ if (oSystemParameter.ShowBill(ref sErrMsg) == false)
+ {
+ sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ return false;
+ }
+ //
+ if (set_SaveMateReplenishOutBill_CLD_New(oMain, sHSourceType, oSystemParameter.omodel, ref sErrMsg) == true)
+ {
+ //"淇濆瓨鎴愬姛锛�";
+ return true;
+ }
+ else
+ {
+ //"淇濆瓨澶辫触锛�";
+ return false;
+ }
+
+ sErrMsg = "淇濆瓨鐢熶骇琛ユ枡鍗曞け璐ワ紒" + sErrMsg;
+ return false;
+ }
+
+ #endregion
+
+ #region 鐢熶骇琛ユ枡CLOUD *New
+
+ [WebMethod]
+ public bool set_SaveMateReplenishOutBill_CLD_New(Model.ClsKf_MateReplenishOutBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
+ {
+ if (sHSourceType == "3720") //鐢熶骇鐢ㄦ枡娓呭崟
+ {
+ if (SaveMateReplenishOutBill_PPBom_CLD(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg))
+ {
+ //"淇濆瓨鎴愬姛锛�";
+ sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+ return true;
+ }
+ else
+ {
+ //"淇濆瓨澶辫触锛�";
+ sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + "锛屽崟鎹甀D锛�" + oMain.HInterID + "锛�" + sErrMsg;
+ return false;
+ }
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + "锛屽崟鎹甀D锛�" + oMain.HInterID + "锛涢敊璇殑婧愬崟绫诲瀷";
+ return false;
+ }
+ }
+
+
+ /// <summary>
+ /// 鐢熶骇琛ユ枡鍗� 锛堟簮鍗曪細鐢熶骇鐢ㄦ枡娓呭崟锛�
+ /// </summary>
+ /// <param name="oMain"></param>
+ /// <param name="sErrMsg"></param>
+ /// <returns></returns>
+ public bool SaveMateReplenishOutBill_PPBom_CLD(Model.ClsKf_MateReplenishOutBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ try
+ {
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ sErrMsg = s;
+ return false;
+ }
+ oMain.HYear = sYear;
+ oMain.HPeriod = sPeriod;
+
+ oCn.BeginTran();
+ //鐢熸垚鍑哄叆搴撳崟鎹�
+ //鎻掑叆瀛愯〃
+ oCn.RunProc("EXEC h_p_Kf_MateReplenishOutBillSub_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + sHSourceType + "'");
+ //鎻掑叆涓昏〃
+ oCn.RunProc("Insert Into Kf_ICStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+ ",HSTOCKORGID,HOWNERID" +
+ ") " +
+ " values('1254','1254'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
+ ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" +
+ ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
+ ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
+ ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() +
+ ") ");
+ //鏇存柊鍏宠仈鏁伴噺
+
+ if (oSystemParameterMain.Kf_MateReplenishOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString());
+ }
+
+ //鏍规嵁TMP琛� 杩斿洖 淇℃伅
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("exec h_p_Kf_GetMateReplenishOutBill_PPBom_CLD_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'," + oMain.HOWNERID.ToString(), "h_p_Kf_GetMateReplenishOutBill_PPBom_CLD_New");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0)
+ {
+ sErrMsg = "鑾峰彇瀛愯〃淇℃伅澶辫触锛�";
+ oCn.RollBack();
+ return false;
+ }
+ else
+ {
+ string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
+ "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
+ "\"Model\": { \"FBILLNO\":\"" + oMain.HBillNo + "\"," +
+ //\"FID\":\"0\",
+ "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," +
+ "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
+ "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\"}," +
+ //\"FStockId0\":{\"FNumber\":\"\"},
+ "\"FPrdOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPrdOrgId"]) + "\"}," +
+ //\"FWorkShopId\":{\"FNumber\":\"\"},
+ "\"FOwnerTypeId0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerTypeId0"]) + "\"," +
+ //\"FOwnerId0\":{\"FNumber\":\"\"},
+ "\"FPickerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPickerId"]) + "\"}," +
+ "\"FSTOCKERID\":{\"FNAME\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKERID"]) + "\"}," +
+ //\"FDescription\":\"\",
+ "\"FCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FCurrId"]) + "\"}," +
+ "\"FIsCrossTrade\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FIsCrossTrade"]) + "\"," +
+ "\"FVmiBusiness\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVmiBusiness"]) + "\"," +
+ //\"FScanBox\":\"\",
+ "\"FEntity\": [ ";
+ string sJson_Entry = "";
+ for (int i = 0; i < Ds.Tables[1].Rows.Count; i++)
+ {
+ if (sJson_Entry != "")
+ {
+ sJson_Entry = sJson_Entry + " , ";
+ }
+ string sJson_BatchNo = "";
+ string sJson_StockPlace = "";
+ 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"]) + "\" , ";
+ }
+ else
+ {
+ sJson_BatchNo = "";
+ }
+
+ //浠撲綅
+ if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "")
+ {
+ sJson_StockPlace = "";
+ }
+ else
+ {
+ sJson_StockPlace = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) + "\"}},";
+ }
+
+ sJson_Entry = sJson_Entry + "{" +
+ //\"FEntryID\":\"0\",
+ "\"FParentMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FParentMaterialId"]) + "\"}," +
+ //\"FConsome\":\"\",
+ "\"FReserveType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReserveType"]) + "\"," +
+ "\"FBaseStockActualQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseStockActualQty"]) + "\"," +
+ "\"FMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMaterialId"]) + "\"}," +
+ "\"FUnitID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUnitID"]) + "\"}," +
+ "\"FAppQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAppQty"]) + "\"," +
+ "\"FActualQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FActualQty"]) + "\"," +
+ "\"FEntryVmiBusiness\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntryVmiBusiness"]) + "\"," +
+ //\"FScrapQty\":\"0\",
+ //\"FOptQueue\":\"\",
+ //\"FOptPlanBillNo\":\"\",
+ //\"FOptPlanBillId\":\"0\",
+ "\"FStockId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockId"]) + "\"}," +
+ //\"FWorkCenterId\":{\"FNUMBER\":\"\"},
+ sJson_StockPlace +
+ //\"FOptDetailId\":\"0\",
+ sJson_BatchNo +
+ "\"FProcessId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProcessId"]) + "\"}," +
+ "\"FBomId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBomId"]) + "\"}," +
+ //\"FFeedReasonId\":{\"FNumber\":\"\"},
+ //\"FEntrtyDescription\":\"\",
+ "\"FStockStatusId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockStatusId"]) + "\"}," +
+ //\"FProduceDate\":\"1900-01-01\",
+ "\"FMtoNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMtoNo"]) + "\"," +
+ "\"FProjectNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProjectNo"]) + "\"," +
+ "\"FMoBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMoBillNo"]) + "\"," +
+ "\"FMoEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMoEntryId"]) + "\"," +
+ "\"FPPBomEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPPBomEntryId"]) + "\"," +
+ "\"FOperId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOperId"]) + "\"," +
+ "\"FOwnerTypeId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOwnerTypeId"]) + "\"," +
+ "\"FStockAppQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockAppQty"]) + "\"," +
+ "\"FStockActualQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockActualQty"]) + "\"," +
+ //\"FSecActualQty\":\"0\",
+ "\"FMoId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMoId"]) + "\"," +
+ "\"FMoEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMoEntrySeq"]) + "\"," +
+ "\"FBaseAppQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseAppQty"]) + "\"," +
+ //\"FStockScrapQty\":\"0\",
+ //\"FSecScrapQty\":\"0\",
+ //\"FBaseScrapQty\":\"0\",
+ "\"FPPBomBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPPBomBillNo"]) + "\"," +
+ "\"FBaseUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseUnitId"]) + "\"}," +
+ "\"FStockUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockUnitId"]) + "\"}," +
+ "\"FSecUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSecUnitId"]) + "\"}," +
+ "\"FEntryWorkShopId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntryWorkShopId"]) + "\"}," +
+ "\"FBaseActualQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseActualQty"]) + "\"," +
+ "\"FAuxPropId\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAuxPropId"]) + "\"}}," +
+ "\"FKeeperTypeId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FKeeperTypeId"]) + "\"," +
+ "\"FKeeperId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FKeeperId"]) + "\"}," +
+ "\"FOwnerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOwnerId"]) + "\"}," +
+ //\"FExpiryDate\":\"1900-01-01\",
+ "\"FEntrySrcInterId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntrySrcInterId"]) + "\"," +
+ "\"FEntrySrcBillType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntrySrcBillType"]) + "\"," +
+ "\"FEntrySrcEnteryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntrySrcEnteryId"]) + "\"," +
+ "\"FEntrySrcBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntrySrcBillNo"]) + "\"," +
+ //\"FPrice\":\"0\",
+ //\"FAmount\":\"0\",
+ "\"FParentOwnerTypeId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FParentOwnerTypeId"]) + "\"," +
+ "\"FParentOwnerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FParentOwnerId"]) + "\"}," +
+ "\"FEntrySrcEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntrySrcEntrySeq"]) + "\"," +
+ //\"FSrcBizBillNo\":\"\",
+ //\"FSrcBizBillType\":{\"FNAME\":\"\"},
+ //\"FSrcBizEntryId\":\"0\",
+ //\"FSrcBizInterId\":\"0\",
+ //\"FSrcBizEntrySeq\":\"0\",
+ //
+ "\"FSNUnitID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSNUnitID"]) + "\"}," +
+ "\"FReqSrc\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReqSrc"]) + "\"," +
+ "\"FReqBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReqBillNo"]) + "\"," +
+ "\"FReqBillId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReqBillId"]) + "\"," +
+ "\"FReqEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReqEntrySeq"]) + "\"," +
+ "\"FReqEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FReqEntryId"]) + "\"," +
+
+ //\"FSerialSubEntity\":[{
+ //\"FDetailID\":\"0\",
+ //\"FSerialNo\":\"\",
+ //\"FSerialId\":{\"FNumber\":\"\"},
+ //\"FSerialNote\":\"\"}]
+
+ "\"FEntity_Link\": [ { " +
+ "\"FEntity_Link_FFlowId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowId"]) + "\"," +
+ "\"FEntity_Link_FFlowLineId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowLineId"]) + "\"," +
+ "\"FEntity_Link_FRuleId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FRuleId"]) + "\"," +
+ "\"FEntity_Link_FSTableName\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSTableName"]) + "\"," +
+ "\"FEntity_Link_FSBillId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSBillId"]) + "\"," +
+ "\"FEntity_Link_FSId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSId"]) + "\"" +
+ " } ]," +
+ " \"FBFLowId\":{\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBFLowId"]) + "\"}}";
+ }
+ string sJson_End = " ] }}";
+ string sJson = sJson_Main + sJson_Entry + sJson_End;
+
+ //浠庨厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
+ if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
+ {
+ sErrMsg = Pub_Class.ClsPub.sExeReturnInfo;
+ return false;
+ }
+
+ //鑾峰彇CLOUD璐﹀彿瀵嗙爜
+ string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName;
+ string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd;
+ DataSet ds11 = get_SaveCLOUDUseNameandPsd(oMain.HInterID);
+ if (ds11 == null || ds11.Tables[0].Rows.Count == 0)
+ {
+ }
+ else
+ {
+ sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]);
+ sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]);
+ }
+
+ //鐢熸垚琛ユ枡鍗�
+ string HReturn;
+ ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
+ string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
+ bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
+ if (bLogin)
+ {
+ var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
+ new object[] { "PRD_FeedMtrl", sJson });
+
+ //鐢熸垚鍗曟嵁鍚庢洿鏂拌嚜瀹氫箟瀛楁
+ oCn.RunProc("exec h_p_Sc_UpDateSelfFildMateReplenishOutBill '" + oMain.HBillNo + "','" + sHSourceType + "'");
+
+ if (oSystemParameterMain.Kf_MateReplenishOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+ var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
+ new object[] { "PRD_FeedMtrl", sJson2 });
+
+ string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+ var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
+ new object[] { "PRD_FeedMtrl", sJson3 });
+
+ HReturn = result.ToString() + "," + result2.ToString() + "," + result3.ToString();
+ }
+ else
+ {
+ HReturn = result.ToString();
+ }
+ if (HReturn.Contains("\"IsSuccess\":false") == true)
+ {
+ sErrMsg = "鐢熸垚鐢熶骇琛ユ枡鍗曞け璐ワ紒" + HReturn + sJson;
+ oCn.RollBack();
+ return false;
+ }
+ else
+ {
+ oCn.Commit();
+ return true;
+ }
+ }
+ else
+ {
+ sErrMsg = "鐢熸垚鐢熶骇琛ユ枡鍗曞け璐ワ紒鐧诲綍澶辫触锛�";
+ oCn.RollBack();
+ return false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ sErrMsg = "鐢熸垚鐢熶骇琛ユ枡鍗曞け璐ワ紒" + e.Message;
+ oCn.RollBack();
+ return false;
+ }
+ }
+
+ #endregion
+
#region 濮斿閫�鏂機LOUD *
//鐢熸垚澶栬喘鍏ュ簱鍗�
@@ -30753,21 +31093,26 @@
//鐢熶骇姹囨姤鍗�
sMulSourceFlag = 1;
}
+ else if (HBillType == "1254" && oSystemParameterMain.Kf_MateReplenishOutBill_MulSourceBill == "Y")
+ {
+ //鐢熶骇琛ユ枡鍗�
+ sMulSourceFlag = 1;
+ }
else if (HBillType == "1207" && oSystemParameterMain.Kf_MoveStockBill_MulSourceBill == "Y")
{
//鐩存帴璋冩嫧鍗�
sMulSourceFlag = 1;
}
- //else if (HBillType == "1250" && oSystemParameterMain.Kf_MoveStockStepOutBill_MulSourceBill == "Y")
- //{
- // //鍒嗘寮忚皟鍑哄崟
- // sMulSourceFlag = 1;
- //}
- //else if (HBillType == "1251" && oSystemParameterMain.Kf_MoveStockStepInBill_MulSourceBill == "Y")
- //{
- // //鍒嗘寮忚皟鍏ュ崟
- // sMulSourceFlag = 1;
- //}
+ else if (HBillType == "1250" && oSystemParameterMain.Kf_MoveStockStepOutBill_MulSourceBill == "Y")
+ {
+ //鍒嗘寮忚皟鍑哄崟
+ sMulSourceFlag = 1;
+ }
+ else if (HBillType == "1251" && oSystemParameterMain.Kf_MoveStockStepInBill_MulSourceBill == "Y")
+ {
+ //鍒嗘寮忚皟鍏ュ崟
+ sMulSourceFlag = 1;
+ }
else if (HBillType == "1245" && oSystemParameterMain.Kf_ProductInBackBill_MulSourceBill == "Y")
{
//鐢熶骇閫�搴撳崟
diff --git a/DLL/Model.dll b/DLL/Model.dll
index 329e4c1..5679ac4 100644
--- a/DLL/Model.dll
+++ b/DLL/Model.dll
Binary files differ
diff --git a/DLL/Pub_Class.dll b/DLL/Pub_Class.dll
index 2be5256..ee62d42 100644
--- a/DLL/Pub_Class.dll
+++ b/DLL/Pub_Class.dll
Binary files differ
diff --git a/Pub_Class.dll b/Pub_Class.dll
index 769501a..2be5256 100644
--- a/Pub_Class.dll
+++ b/Pub_Class.dll
Binary files differ
--
Gitblit v1.9.1