From 8106da5b9d9b0b598960dea5437913105db72ae2 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期一, 26 六月 2023 09:10:45 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sc_ProcessMangementController.cs | 672 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 362 insertions(+), 310 deletions(-)
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index c0181c0..700d925 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -190,6 +190,8 @@
}
}
+ #endregion
+
#region 鏂帿灏� 鏈亾宸ュ簭姹囨姤鍒楄〃 姹囨姤 鍏ュ簱
/// <summary>
/// 鐢熸垚 鐢熶骇姹囨姤鍗�
@@ -410,7 +412,7 @@
string OrganizationNUM = oCN.RunProcReturn("select HNumber from Xt_ORGANIZATIONS where HItemID=" + OrganizationID, "Xt_ORGANIZATIONS").Tables[0].Rows[0]["HNumber"].ToString();
//鏍规嵁宸ュ簭姹囨姤鍗曚富ID鑾峰彇宸ュ簭姹囨姤鍏ュ簱鍗曠殑鏁版嵁
DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
- if(ds.Tables[0].Rows.Count <= 0)
+ if (ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -419,10 +421,10 @@
return objJsonResult;
}
DataRow dr = ds.Tables[0].Rows[0];
-
+
//淇濆瓨
oCN.BeginTran();
- DataSet DsTable = oCN.RunProcReturn($"select * from Sc_ICMOReportBillMain where HBillNo='{HBillNo}'" , "Sc_ICMOReportBillMain");
+ DataSet DsTable = oCN.RunProcReturn($"select * from Sc_ICMOReportBillMain where HBillNo='{HBillNo}'", "Sc_ICMOReportBillMain");
if (DsTable.Tables[0].Rows.Count > 0)
{
objJsonResult.code = "0";
@@ -431,18 +433,18 @@
objJsonResult.data = null;
return objJsonResult;
}
- //鐢熶骇姹囨姤鍗曚富琛�
- oCN.RunProc("Insert Into Sc_ICMOReportBillMain " +
- "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
- ",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" +
- ",HGroupID,HDeptID,HDeptNumber" +
- ",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" +
- ") " +
- " values('3711','3711'," + HInterID.ToString() + ",'" + BillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
- ",DATENAME(YEAR,GETDATE()),0,'','" + dr["HEmpID"].ToString() + "','" + dr["鎿嶄綔鍛樹唬鐮�"].ToString() +
- "','" + dr["HGroupID"].ToString() + "',0,''" +
- ",'" + BillNo.ToString() + "'," + InterID.ToString() + ", 0,'3791'" +
- ") ");
+ //鐢熶骇姹囨姤鍗曚富琛�
+ oCN.RunProc("Insert Into Sc_ICMOReportBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
+ ",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" +
+ ",HGroupID,HDeptID,HDeptNumber" +
+ ",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" +
+ ") " +
+ " values('3711','3711'," + HInterID.ToString() + ",'" + BillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
+ ",DATENAME(YEAR,GETDATE()),0,'','" + dr["HEmpID"].ToString() + "','" + dr["鎿嶄綔鍛樹唬鐮�"].ToString() +
+ "','" + dr["HGroupID"].ToString() + "',0,''" +
+ ",'" + BillNo.ToString() + "'," + InterID.ToString() + ", 0,'3791'" +
+ ") ");
//鐢熶骇姹囨姤鍗曞瓙琛�
oCN.RunProc("Insert into Sc_ICMOReportBillSub " +
" (HInterID,HEntryID,HMaterID,HMaterNumber" +
@@ -483,7 +485,7 @@
model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡1
model.Add("FHZYMESFLAG", "鏄�");// 鏄惁涓篗ES鍚屾
model.Add("FBillNo", BillNo);
-
+
JArray Fentity = new JArray();
foreach (DataRow item in ds.Tables[0].Rows)
@@ -550,7 +552,7 @@
//["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
["Model"] = model
};
-
+
string result = InvokeHelper.Save("PRD_MORPT", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
//鍒ゆ柇淇濆瓨鏄惁鎴愬姛
if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
@@ -584,7 +586,7 @@
return objJsonResult;
}
- oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo+"'");
+ oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'");
oCN.Commit();
objJsonResult.code = "0";
@@ -626,7 +628,7 @@
//DataRow dr = ds.Tables[0].Rows[0];
//鍒ゆ柇鍏ュ簱鐨勫悎鏍兼暟閲忔槸鍚︿负0
- var DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HBillNo='"+ BillNo + "' ", "Sc_StationOutBillMain").Tables[0];
+ var DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HBillNo='" + BillNo + "' ", "Sc_StationOutBillMain").Tables[0];
if (double.Parse(DTable.Rows[0]["HQty"].ToString()) == 0)
{
@@ -684,6 +686,16 @@
//
//DataSet ds1 = oCN.RunProcReturn("select * from h_v_TOERPProcduct_LastProc where HLastProc = '鏄�' and hbillno='" + BillNo.ToString() + "'", "h_v_TOERPProcduct_LastProc");
DataSet ds1 = oCN.RunProcReturn("exec h_p_TOERPProcduct_LastProc '" + BillNo + "'", "h_p_TOERPProcduct_LastProc");
+
+ if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈壘鍒板搴旂殑鏈湴鎴栭噾铦朵簯鐢熶骇姹囨姤鍗曡褰�;1.鏈煡璇㈠埌瀵瑰簲鐨勭敓浜ф眹鎶ュ崟锛�2.璇风‘淇濆綋鍓嶅伐搴忔槸鏈亾宸ュ簭3.姹囨姤鍗曞搴旂殑鍏ュ簱鏁伴噺宸叉弧 璇峰湪閲戣澏浜戞煡鐪嬪叆搴撹褰曪紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DataRow dr1 = ds1.Tables[0].Rows[0];
if (double.Parse(dr1[0].ToString()) <= 0)
{
@@ -693,6 +705,48 @@
objJsonResult.data = null;
return objJsonResult;
}
+
+
+ string sErr = "";
+ if (oSystemParameter.ShowBill(ref sErr))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
+ {
+
+ //鍒ゆ柇閲戣澏浜戞槸鍚﹀凡缁忔湁鍏ュ簱鐨勬暟鎹�
+ ds = oCN.RunProcReturn($@"select * from AIS20220308151944..T_PRD_INSTOCK where FBILLNO='{BillNo}'", "T_PRD_INSTOCK");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍑虹珯鍗曞彿宸插叆搴�,璇蜂笉瑕侀噸鏂板叆搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇閲戣澏浜戠敓浜ф眹鎶ュ崟 鏁伴噺 鏄惁 澶т簬 鏈亾鍑虹珯鏁伴噺
+ ds = oCN.RunProcReturn($@"select sum(FFinishQty)-sum(FSTOCKINQUASELQTY)-(select HQty from Sc_StationOutBillMain where HBillNo='{BillNo}')
+ from AIS20220308151944..T_PRD_MORPT rpt3
+ left join AIS20220308151944..T_PRD_MORPTENTRY rpt2 on rpt3.FID = rpt2.FID
+ left join AIS20220308151944..T_PRD_MORPTENTRY_A rpt1 on rpt2.FID = rpt1.FID
+ where F_bsv_Text=(select HProcExchBillNo from Sc_StationOutBillMain where HBillNo='{BillNo}')", "SumCount");
+
+ if (double.Parse(ds.Tables[0].Rows[0][0].ToString()) < 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閲戣澏浜戞眹鎶ユ暟閲忓皬浜庢湰鍦板嚭绔欐暟閲�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+
+
+
+
JObject model = new JObject();
model.Add("FBillType", new JObject() { ["FNumber"] = "SCRKD01_SYS" }); //鍗曟嵁绫诲瀷
@@ -725,7 +779,7 @@
FentityModel.Add("FBaseRealQty", item["鏁伴噺"].ToString());//
FentityModel.Add("FOwnerTypeId", "BD_OwnerOrg");//
FentityModel.Add("FOwnerId", new JObject() { ["FNumber"] = item["HPrdOrgNumber"].ToString() });//
- string sErr = "";
+
if (oSystemParameter.ShowBill(ref sErr))
{
if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
@@ -763,18 +817,18 @@
FentityModel.Add("F_bsv_Base1", new JObject() { ["FNumber"] = item["HBZBS"].ToString() });//
FentityModel.Add("F_BSV_TEXT", item["HLZKH"].ToString());//
FentityModel.Add("F_BSV_TEXT1", item["HWYID"].ToString());//
- //鎵瑰彿
- //FFLOWID FFLOWLINEID FRULEID FSTABLENAME
- //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY
- //涓氬姟娴佺▼鍥撅細FEntity_Link_FFlowId
- //鎺ㄨ繘璺嚎锛欶Entity_Link_FFlowLineId
- //杞崲瑙勫垯锛欶Entity_Link_FRuleId
- //婧愬崟琛ㄥ唴鐮侊細FEntity_Link_FSTableId
- //婧愬崟琛細FEntity_Link_FSTableName
- //婧愬崟鍐呯爜锛欶Entity_Link_FSBillId
- //婧愬崟鍒嗗綍鍐呯爜锛欶Entity_Link_FSId
- //鍘熷鎼哄甫閲忥細FEntity_Link_FBaseQuaQtyOld
- //淇敼鎼哄甫閲忥細FEntity_Link_FBaseQuaQty
+ //鎵瑰彿
+ //FFLOWID FFLOWLINEID FRULEID FSTABLENAME
+ //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY
+ //涓氬姟娴佺▼鍥撅細FEntity_Link_FFlowId
+ //鎺ㄨ繘璺嚎锛欶Entity_Link_FFlowLineId
+ //杞崲瑙勫垯锛欶Entity_Link_FRuleId
+ //婧愬崟琛ㄥ唴鐮侊細FEntity_Link_FSTableId
+ //婧愬崟琛細FEntity_Link_FSTableName
+ //婧愬崟鍐呯爜锛欶Entity_Link_FSBillId
+ //婧愬崟鍒嗗綍鍐呯爜锛欶Entity_Link_FSId
+ //鍘熷鎼哄甫閲忥細FEntity_Link_FBaseQuaQtyOld
+ //淇敼鎼哄甫閲忥細FEntity_Link_FBaseQuaQty
@@ -782,7 +836,7 @@
JObject FentityModel2 = new JObject();
FentityModel2.Add("FEntity_Link_FFlowId", "f6e6eec3-5267-4f02-8593-b633da508a72");
FentityModel2.Add("FEntity_Link_FFlowLineId", "5");
- FentityModel2.Add("FEntity_Link_FRuleId", "PRD_MORPT2INSTOCK");
+ FentityModel2.Add("FEntity_Link_FRuleId", "PRD_MORPT2INSTOCK");
FentityModel2.Add("FEntity_Link_FSTableName", "T_PRD_MORPTENTRY");
FentityModel2.Add("FEntity_Link_FSTableId", "0");
FentityModel2.Add("FEntity_Link_FSBillId", item["HSourceInterID"].ToString());
@@ -900,7 +954,7 @@
//DataRow dr = ds.Tables[0].Rows[0];
//鍒ゆ柇鏈鎶ュ簾鎬绘暟閲忔槸鍚︿负0
- var DTable = oCN.RunProcReturn("select sum(HWasterQty) HWasterQty from Sc_StationOutBillMain where HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
+ var DTable = oCN.RunProcReturn("select isnull(sum(HWasterQty),0) HWasterQty from Sc_StationOutBillMain where HProcExchBillNo='" + BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
if (double.Parse(DTable.Rows[0]["HWasterQty"].ToString()) == 0)
{
@@ -1125,7 +1179,7 @@
return objJsonResult;
}
- //oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'");
+ //oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'");
oCN.Commit();
oCN.RunProc("update sc_stationoutbillmain set HBFFlag =1 where HProcExchBillNo = '" + BillNo + "'");
@@ -1147,259 +1201,6 @@
}
- ///// <summary>
- ///// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
- ///// </summary>
- ///// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param>
- ///// <returns></returns>
- //[Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
- //[HttpGet]
- //public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
- // double HCheckQty, double HRightQty, double HBadQty,
- // string HCheckResult, string HSupNumber,
- // string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
- // Int64 HSourceEntryID, string HSourceBillNo, string user,
- // Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
- // Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
- // Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
- //{
- // try
- // {
- // //鑾峰彇鐢熶骇姹囨姤鍗曟渶澶nterID鍜屽崟鎹彿
- // //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
- // //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
-
- // DataSet ds1 = oCN.RunProcReturn("select * from MES_AccessoriesList where HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
- // string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFileName"]);
- // string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFilePath"]);
-
-
-
- // string path = HFilePath;
- // FileInfo fi = new FileInfo(path);
- // long len = fi.Length;
- // byte[] buffer = new byte[len];
- // FileStream fs = new FileStream(path, FileMode.Open);
- // fs.Read(buffer, 0, (int)len);
- // //鏂囦欢IO娴�
- // string a = Convert.ToBase64String(buffer);
-
-
- // //淇濆瓨
- // oCN.BeginTran();
- // //鐢熶骇姹囨姤鍗曚富琛�
- // oCN.RunProc("Insert Into QC_POStockInCheckBillMain " +
- // "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
- // ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
- // ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
- // ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
- // ") " +
- // " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
- // ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
- // ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
- // ",'" + HCheckResult.ToString() + "','', '','',''" +
- // ") ");
- // //鐢熶骇姹囨姤鍗曞瓙琛�
- // oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
- // " (HInterID,HEntryID,HCloseMan,HCloseType" +
- // ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
- // ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
- // "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
- // ") values("
- // + HInterID.ToString() + ",1,'',''" +
- // ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
- // ",0,0,0,0,''" +
- // ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
- // ") ");
- // //鍚屾閲戣澏
- // //璁块棶閲戣澏
- // var loginRet = InvokeHelper.Login();
- // var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
- // if (isSuccess == 0)
- // {
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鎿嶄綔澶辫触,閲戣澏璐﹀彿鐧诲綍寮傚父銆�" + loginRet;
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
-
-
- // JObject model = new JObject();
- // model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //鍗曟嵁绫诲瀷 鏉ユ枡妫�楠屽崟JYD001_SYS
- // model.Add("FBusinessType", "1"); //涓氬姟绫诲瀷
- // model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡
- // model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //璐ㄦ缁勭粐
- // model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //鏉ユ簮缁勭粐
- // model.Add("FISSYNCED", "false");// 鏄惁宸插悓姝�
- // model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));// 鎶ユ鏃ユ湡
- // model.Add("FBillNo", HBillNo);
-
- // JArray Fentity = new JArray();
- // JObject FentityModel = new JObject();
- // FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });// 鐗╂枡鍐呯爜
- // FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//璁¢噺鍗曚綅鍐呯爜
- // FentityModel.Add("FInspectQty", HCheckQty.ToString());// 妫�楠屾暟閲�
- // FentityModel.Add("FQualifiedQty", HRightQty.ToString());// 鍚堟牸鏁伴噺
- // FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());// 涓嶅悎鏍兼暟閲�
- // FentityModel.Add("FInspectResult", HCheckResult.ToString());// 妫�楠岀粨鏋�
- // FentityModel.Add("FQCStatus", "1");// 璐ㄦ鐘舵��
- // FentityModel.Add("FIsRelated", false);// 涓嶈壇鍝佸叧鑱旀爣蹇�
- // FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");// 婧愬崟绫诲瀷
- // FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//鍩烘湰鍗曚綅
- // FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//鍩烘湰鍗曚綅妫�楠屾暟閲�
- // FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); // 渚涘簲鍟�
- // //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // 浠撳簱
- // FentityModel.Add("FInspectTimes","1"); // 妫�楠屾鏁�
- // FentityModel.Add("FTimeUnit","24");//鏃堕棿鍗曚綅
- // FentityModel.Add("FSAMPLEDAMAGEBEARER","2");//鏍锋湰鐮村潖鎵挎媴鏂�
- // FentityModel.Add("FISFIRSTINSPECT", false);//棣栨
- // FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//鍩烘湰鍗曚綅鍚堟牸鏁�
- // FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//鍩烘湰鍗曚綅鎺ユ敹鏁�
- // FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//甯佸埆
- // FentityModel.Add("FIsSplitRow ", false);// 鏄惁鎷嗗垎琛�
-
- // JArray Fentity2 = new JArray();
- // JObject FentityModel2 = new JObject();
- // FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });// 鐗╂枡鍐呯爜
- // FentityModel2.Add("FPolicyStatus", "1"); //鐘舵��
- // FentityModel2.Add("FPolicyQty", HRightQty.ToString()); //鏁伴噺
- // FentityModel2.Add("FBasePolicyQty", HRightQty.ToString()); //鍩烘湰鍗曚綅鏁伴噺
- // FentityModel2.Add("FUsePolicy", HUseResult.ToString()); //浣跨敤鍐崇瓥
- // FentityModel2.Add("FIsCheck", false); //鏄惁鎶芥
- // FentityModel2.Add("FIsDefectProcess", false); //涓嶈壇澶勭悊
- // FentityModel2.Add("FCanSale", false); //鍙攢鍞�
- // FentityModel2.Add("FIsMRBReview", false); //MRP璇勫
- // FentityModel2.Add("FIsReturn", true); //鍒ら��
- // FentityModel2.Add("FIsRelatedDefect", false); //涓嶈壇鍝佸叧鑱旀爣蹇�
- // Fentity2.Add(FentityModel2);
- // FentityModel.Add("FPolicyDetail", Fentity2);
-
-
-
- // JArray Fentity3 = new JArray();
- // JObject FentityModel3 = new JObject();
- // FentityModel3.Add("FDetailID", "0");//
- // FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill"); //婧愬崟绫诲瀷
- // FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString()); //鏀舵枡閫氱煡鍗曞崟鍙�
- // FentityModel3.Add("FSrcInterId", HSLInterID.ToString()); //鏀舵枡閫氱煡鍗曚富ID
- // FentityModel3.Add("FSrcEntryId",HSLEntryID.ToString()); //鏀舵枡閫氱煡鍗曞瓙ID
- // FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString()); //婧愬崟琛屽彿
- // FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" }); // 璁㈠崟绫诲瀷
- // FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString()); //璁㈠崟鍗曞彿
- // FentityModel3.Add("FOrderId", HSourceInterID.ToString()); //璁㈠崟涓籌D
- // FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString()); //璁㈠崟瀛怚D
- // FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString()); //璁㈠崟琛屽彿
- // Fentity3.Add(FentityModel3);
- // FentityModel.Add("FReferDetail", Fentity3);
-
-
- // JArray Fentity4 = new JArray();
- // JObject FentityModel4 = new JObject();
- // FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect"); //鍗曟嵁杞崲瑙勫垯
- // FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY"); //鏀舵枡閫氱煡鍗曞瓙琛�
- // FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString()); //鏀舵枡閫氱煡鍗曚富鍐呯爜
- // FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString()); //鏀舵枡閫氱煡鍗曞瓙鍐呯爜
- // FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString()); //
- // FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString()); //
- // FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString()); //
- // FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString()); //
- // Fentity4.Add(FentityModel4);
- // FentityModel.Add("FEntity_Link", Fentity4);
-
-
-
- // Fentity.Add(FentityModel);
- // model.Add("FEntity", Fentity); //鏄庣粏淇℃伅
- // JObject jsonRoot = new JObject()
- // {
- // ["Creator"] = "",
- // ["NeedUpDateFields"] = new JArray(),
- // ["NeedReturnFields"] = new JArray(),
- // ["IsDeleteEntry"] = "false",
- // ["SubSystemId"] = "",
- // ["IsVerifyBaseDataField"] = "false",
- // //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
- // ["Model"] = model
- // };
-
- // string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
- // //鍒ゆ柇淇濆瓨鏄惁鎴愬姛
- // if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
- // {
- // LogService.Write("鏉ユ枡妫�楠屽崟淇濆瓨閿欒jsonRoot:" + jsonRoot);
- // oCN.RollBack();
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍚屾閲戣澏浜戝け璐ワ紒鍗曞彿:{HBillNo.ToString()}" + jsonRoot;
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
- // //鎻愪氦瀹℃牳
- // string result1 = string.Empty;
- // string result2 = string.Empty;
- // var fID = JObject.Parse(result)["Result"]["Id"].ToString();
- // var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
- // var json = new
- // {
- // Ids = fID,
- // };
-
- // K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
-
-
-
- // result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
- // result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
- // if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
- // {
-
-
-
- // oCN.RollBack();
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍙凤細{fBillNo}锛屾彁浜ゅけ璐�" + result;
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
- // else
- // {
- // string jsonStr = "{" +
- // " \"FileName\":\"" + HFileName + "\"," +
- // " \"FormId\":\"QM_InspectBill\"," +
- // " \"IsLast\":\"true\"," +
- // " \"InterId\":\"" + HInterID + "\"," +
- // " \"BillNO\":\"" + HBillNo + "\"," +
- // " \"AliasFileName\":\"test\"," +
- // " \"SendByte\":\"" + a + "\"," +
- // "}";
-
- // var ret = client.AttachmentUpload(jsonStr);
- // }
-
- // oCN.Commit();
- // objJsonResult.code = "0";
- // objJsonResult.count = 1;
- // objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- // objJsonResult.data = 1;
- // return objJsonResult;
- // }
- // catch (Exception e)
- // {
- // oCN.RollBack();
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "Exception锛�" + e.ToString();
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
- //}
- //#endregion
-
-
-
-
/// <summary>
/// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
/// </summary>
@@ -1414,36 +1215,287 @@
Int64 HSourceEntryID, string HSourceBillNo, string user,
Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
- Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg)
+ Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
{
- WebS2.WebService1 oWebs1 = new WebS2.WebService1();
-
-
- //oWebs1.Url = "http://localhost:9099/WebService1.asmx";
- //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
- if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty
- , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID
- , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID
- , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID
- , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID
- , ref sErrMsg))
+ try
{
+ //鑾峰彇鐢熶骇姹囨姤鍗曟渶澶nterID鍜屽崟鎹彿
+ //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
+ //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
+
+ DataSet ds1 = oCN.RunProcReturn("select * from MES_AccessoriesList where HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
+ string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFileName"]);
+ string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFilePath"]);
+
+ string path = HFilePath;
+ FileInfo fi = new FileInfo(path);
+ long len = fi.Length;
+ byte[] buffer = new byte[len];
+ FileStream fs = new FileStream(path, FileMode.Open);
+ fs.Read(buffer, 0, (int)len);
+ //鏂囦欢IO娴�
+ string a = Convert.ToBase64String(buffer);
+
+
+ //淇濆瓨
+ oCN.BeginTran();
+ //鐢熶骇姹囨姤鍗曚富琛�
+ oCN.RunProc("Insert Into QC_POStockInCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
+ ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
+ ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
+ ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
+ ") " +
+ " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
+ ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
+ ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
+ ",'" + HCheckResult.ToString() + "','', '','',''" +
+ ") ");
+ //鐢熶骇姹囨姤鍗曞瓙琛�
+ oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HCloseType" +
+ ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
+ "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
+ ") values("
+ + HInterID.ToString() + ",1,'',''" +
+ ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
+ ",0,0,0,0,''" +
+ ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
+ ") ");
+ //鍚屾閲戣澏
+ //璁块棶閲戣澏
+ var loginRet = InvokeHelper.Login();
+ var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+ if (isSuccess == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎿嶄綔澶辫触,閲戣澏璐﹀彿鐧诲綍寮傚父銆�" + loginRet;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ JObject model = new JObject();
+ model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //鍗曟嵁绫诲瀷 鏉ユ枡妫�楠屽崟JYD001_SYS
+ model.Add("FBusinessType", "1"); //涓氬姟绫诲瀷
+ model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡
+ model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //璐ㄦ缁勭粐
+ model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //鏉ユ簮缁勭粐
+ model.Add("FISSYNCED", "false");// 鏄惁宸插悓姝�
+ model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));// 鎶ユ鏃ユ湡
+ model.Add("FBillNo", HBillNo);
+
+ JArray Fentity = new JArray();
+ JObject FentityModel = new JObject();
+ FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });// 鐗╂枡鍐呯爜
+ FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//璁¢噺鍗曚綅鍐呯爜
+ FentityModel.Add("FInspectQty", HCheckQty.ToString());// 妫�楠屾暟閲�
+ FentityModel.Add("FQualifiedQty", HRightQty.ToString());// 鍚堟牸鏁伴噺
+ FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());// 涓嶅悎鏍兼暟閲�
+ FentityModel.Add("FInspectResult", HCheckResult.ToString());// 妫�楠岀粨鏋�
+ FentityModel.Add("FQCStatus", "1");// 璐ㄦ鐘舵��
+ FentityModel.Add("FIsRelated", false);// 涓嶈壇鍝佸叧鑱旀爣蹇�
+ FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");// 婧愬崟绫诲瀷
+ FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//鍩烘湰鍗曚綅
+ FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//鍩烘湰鍗曚綅妫�楠屾暟閲�
+ FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); // 渚涘簲鍟�
+ //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // 浠撳簱
+ FentityModel.Add("FInspectTimes", "1"); // 妫�楠屾鏁�
+ FentityModel.Add("FTimeUnit", "24");//鏃堕棿鍗曚綅
+ FentityModel.Add("FSAMPLEDAMAGEBEARER", "2");//鏍锋湰鐮村潖鎵挎媴鏂�
+ FentityModel.Add("FISFIRSTINSPECT", false);//棣栨
+ FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//鍩烘湰鍗曚綅鍚堟牸鏁�
+ FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//鍩烘湰鍗曚綅鎺ユ敹鏁�
+ FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//甯佸埆
+ FentityModel.Add("FIsSplitRow ", false);// 鏄惁鎷嗗垎琛�
+
+ JArray Fentity2 = new JArray();
+ JObject FentityModel2 = new JObject();
+ FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });// 鐗╂枡鍐呯爜
+ FentityModel2.Add("FPolicyStatus", "1"); //鐘舵��
+ FentityModel2.Add("FPolicyQty", HRightQty.ToString()); //鏁伴噺
+ FentityModel2.Add("FBasePolicyQty", HRightQty.ToString()); //鍩烘湰鍗曚綅鏁伴噺
+ FentityModel2.Add("FUsePolicy", HUseResult.ToString()); //浣跨敤鍐崇瓥
+ FentityModel2.Add("FIsCheck", false); //鏄惁鎶芥
+ FentityModel2.Add("FIsDefectProcess", false); //涓嶈壇澶勭悊
+ FentityModel2.Add("FCanSale", false); //鍙攢鍞�
+ FentityModel2.Add("FIsMRBReview", false); //MRP璇勫
+ FentityModel2.Add("FIsReturn", true); //鍒ら��
+ FentityModel2.Add("FIsRelatedDefect", false); //涓嶈壇鍝佸叧鑱旀爣蹇�
+ Fentity2.Add(FentityModel2);
+ FentityModel.Add("FPolicyDetail", Fentity2);
+
+
+
+ JArray Fentity3 = new JArray();
+ JObject FentityModel3 = new JObject();
+ FentityModel3.Add("FDetailID", "0");//
+ FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill"); //婧愬崟绫诲瀷
+ FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString()); //鏀舵枡閫氱煡鍗曞崟鍙�
+ FentityModel3.Add("FSrcInterId", HSLInterID.ToString()); //鏀舵枡閫氱煡鍗曚富ID
+ FentityModel3.Add("FSrcEntryId", HSLEntryID.ToString()); //鏀舵枡閫氱煡鍗曞瓙ID
+ FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString()); //婧愬崟琛屽彿
+ FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" }); // 璁㈠崟绫诲瀷
+ FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString()); //璁㈠崟鍗曞彿
+ FentityModel3.Add("FOrderId", HSourceInterID.ToString()); //璁㈠崟涓籌D
+ FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString()); //璁㈠崟瀛怚D
+ FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString()); //璁㈠崟琛屽彿
+ Fentity3.Add(FentityModel3);
+ FentityModel.Add("FReferDetail", Fentity3);
+
+
+ JArray Fentity4 = new JArray();
+ JObject FentityModel4 = new JObject();
+ FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect"); //鍗曟嵁杞崲瑙勫垯
+ FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY"); //鏀舵枡閫氱煡鍗曞瓙琛�
+ FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString()); //鏀舵枡閫氱煡鍗曚富鍐呯爜
+ FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString()); //鏀舵枡閫氱煡鍗曞瓙鍐呯爜
+ FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString()); //
+ FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString()); //
+ FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString()); //
+ FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString()); //
+ Fentity4.Add(FentityModel4);
+ FentityModel.Add("FEntity_Link", Fentity4);
+
+
+
+ Fentity.Add(FentityModel);
+ model.Add("FEntity", Fentity); //鏄庣粏淇℃伅
+ JObject jsonRoot = new JObject()
+ {
+ ["Creator"] = "",
+ ["NeedUpDateFields"] = new JArray(),
+ ["NeedReturnFields"] = new JArray(),
+ ["IsDeleteEntry"] = "false",
+ ["SubSystemId"] = "",
+ ["IsVerifyBaseDataField"] = "false",
+ //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
+ ["Model"] = model
+ };
+
+ string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
+ //鍒ゆ柇淇濆瓨鏄惁鎴愬姛
+ if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ {
+ LogService.Write("鏉ユ枡妫�楠屽崟淇濆瓨閿欒jsonRoot:" + jsonRoot);
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍚屾閲戣澏浜戝け璐ワ紒鍗曞彿:{HBillNo.ToString()}" + jsonRoot;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鎻愪氦瀹℃牳
+ string result1 = string.Empty;
+ string result2 = string.Empty;
+ var fID = JObject.Parse(result)["Result"]["Id"].ToString();
+ var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
+ var json = new
+ {
+ Ids = fID,
+ };
+
+ K3CloudApiClient client = new K3CloudApiClient("http://47.96.97.237/k3cloud");
+ // K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
+
+
+
+ result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
+ result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
+ if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = $"鏉ユ枡妫�楠屽崟鍙凤細{fBillNo}锛屾彁浜ゅけ璐�" + result;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string jsonStr = "{" +
+ " \"FileName\":\"" + HFileName + "\"," +
+ " \"FormId\":\"QM_InspectBill\"," +
+ " \"IsLast\":\"true\"," +
+ " \"InterId\":\"" + HInterID + "\"," +
+ " \"BillNO\":\"" + HBillNo + "\"," +
+ " \"AliasFileName\":\"test\"," +
+ " \"SendByte\":\"" + a + "\"," +
+ "}";
+
+ var ret = client.AttachmentUpload(jsonStr);
+ }
+
+ oCN.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�";
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�";
- objJsonResult.data = sErrMsg;
- return objJsonResult;
- }
}
- #endregion
+
+
+
+
+
+
+ ///// <summary>
+ ///// 鐢熸垚閲戣澏浜戞潵鏂欐楠屽崟
+ ///// </summary>
+ ///// <param name="InterID">宸ュ簭姹囨姤鍗曚富ID</param>
+ ///// <returns></returns>
+ //[Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
+ //[HttpGet]
+ //public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
+ // double HCheckQty, double HRightQty, double HBadQty,
+ // string HCheckResult, string HSupNumber,
+ // string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
+ // Int64 HSourceEntryID, string HSourceBillNo, string user,
+ // Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
+ // Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
+ // Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg)
+ //{
+ // WebS.WebService1 oWebs1 = new WebS.WebService1();
+
+
+ // //oWebs1.Url = "http://localhost:9099/WebService1.asmx";
+ // //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
+ // if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty
+ // , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID
+ // , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID
+ // , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID
+ // , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID
+ // , ref sErrMsg))
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 1;
+ // objJsonResult.Message = "鐢熸垚鍗曟嵁鎴愬姛锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // else
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鐢熸垚鍗曟嵁澶辫触锛�";
+ // objJsonResult.data = sErrMsg;
+ // return objJsonResult;
+ // }
+ //}
+
+
--
Gitblit v1.9.1