From 940d473ece4a67f5aa555a8cf031eba11cd63d56 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期二, 20 八月 2024 16:46:03 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/OtherInStockController.cs | 477 ++++++++++++++++++++++++++++------------------------------
1 files changed, 230 insertions(+), 247 deletions(-)
diff --git a/WebAPI/Controllers/OtherInStockController.cs b/WebAPI/Controllers/OtherInStockController.cs
index 2bba4cc..3a2e60f 100644
--- a/WebAPI/Controllers/OtherInStockController.cs
+++ b/WebAPI/Controllers/OtherInStockController.cs
@@ -78,265 +78,248 @@
string sErrMsg = "";
bool bResult;
- //鑾峰彇绯荤粺鍙傛暟
- if (oSystemParameter.ShowBill(ref sErrMsg) == true)
- {
- if (oSystemParameter.omodel.WMS_CampanyName == "妫シ") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
- {
- DataSet ds;
- string sql = "select HBarCode,HSourceInterID,HSourceEntryID,HSourceBillNo from Gy_BarCodeBill with(nolock) where HBarCode = '" + sCode + "'";
- string HDataBaseName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName");//鑾峰彇閲戣澏鏁版嵁搴撳悕绉�
- string HSourceBillNo = "";
- Int64 HSourceInterID = 0;
+ ////鑾峰彇绯荤粺鍙傛暟
+ //if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+ //{
+ // if (oSystemParameter.omodel.WMS_CampanyName == "妫シ" && sSourceType == "1241") //瀹㈡埛涓烘.妤凤紝骞朵笖涓哄叾浠栧叆搴撳崟妯″潡鏃惰繘鍏ュ垽鏂�
+ // {
+ // DataSet ds;
+ // string sql = "select HBarCode,HSourceInterID,HSourceEntryID,HSourceBillNo from Gy_BarCodeBill with(nolock) where HBarCode = '" + sCode + "'";
+ // string HDataBaseName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName");//鑾峰彇閲戣澏鏁版嵁搴撳悕绉�
+ // string HSourceBillNo = "";
+ // Int64 HSourceInterID = 0;
- ds = oCn.RunProcReturn(sql, "Gy_BarCodeBill");
- //鍒ゆ柇鏉$爜淇℃伅鏄惁鍦ㄦ潯鐮佹。妗堜腑
- if (ds == null || ds.Tables[0].Rows.Count < 1)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜妗f涓笉瀛樺湪鏉$爜缂栧彿锛�" + sCode;
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- //鑾峰彇鍏ュ簱鐢宠鍗曞崟鍙�/涓籌D
- HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"]);
- HSourceInterID = DBUtility.ClsPub.isInt(ds.Tables[0].Rows[0]["HSourceInterID"]);
- //鏍规嵁鍏ュ簱鐢宠鍗曞崟鍙峰垽鏂崟鎹俊鎭槸鍚﹀凡缁忓悓姝ュ埌閲戣澏
- sql = string.Format(@"select * from FROM {0}..T_STK_MISCELLANEOUS with(nolock) where FBILLNO = '" + HSourceBillNo + "'", HDataBaseName);
- ds = oCn.RunProcReturn(sql, "T_STK_MISCELLANEOUS");
- //鍏ュ簱鐢宠鍗曟病鏈夊悓姝ュ埌閲戣澏鍒欒繘琛屽悓姝�
- if (ds == null || ds.Tables[0].Rows.Count < 1)
- {
- sql = "exec h_p_Kf_StockInRequestBillToErp " + HSourceInterID + "," + HSourceBillNo;
- ds = oCn.RunProcReturn(sql, "h_p_Kf_StockInRequestBillToErp");
+ // ds = oCn.RunProcReturn(sql, "Gy_BarCodeBill");
+ // //鍒ゆ柇鏉$爜淇℃伅鏄惁鍦ㄦ潯鐮佹。妗堜腑
+ // if (ds == null || ds.Tables[0].Rows.Count < 1)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏉$爜妗f涓笉瀛樺湪姝ゆ潯鐮佺紪鍙凤細" + sCode;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // else
+ // {
+ // //鑾峰彇鍏ュ簱鐢宠鍗曞崟鍙�/涓籌D
+ // HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"]);
+ // HSourceInterID = DBUtility.ClsPub.isInt(ds.Tables[0].Rows[0]["HSourceInterID"]);
+ // //鏍规嵁鍏ュ簱鐢宠鍗曞崟鍙峰垽鏂崟鎹俊鎭槸鍚﹀凡缁忓悓姝ュ埌閲戣澏
+ // sql = string.Format(@"select * from FROM {0}..TFKO_t_Cust100009 with(nolock) where FBILLNO = '" + HSourceBillNo + "'", HDataBaseName);
+ // ds = oCn.RunProcReturn(sql, "TFKO_t_Cust100009");
+ // //鍏ュ簱鐢宠鍗曟病鏈夊悓姝ュ埌閲戣澏鍒欒繘琛屽悓姝�
+ // if (ds == null || ds.Tables[0].Rows.Count < 1)
+ // {
+ // sql = "exec h_p_Kf_StockInRequestBillToErp " + HSourceInterID + "," + HSourceBillNo;
+ // ds = oCn.RunProcReturn(sql, "h_p_Kf_StockInRequestBillToErp");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "webapi鍏ュ簱鐢宠鍗曞悓姝ワ紝鑾峰彇淇℃伅澶辫触";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- JObject model = new JObject();
- model.Add("FBillType", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FBillType"]) }); //鍗曟嵁绫诲瀷
- model.Add("FDate", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏃ユ湡"])); //鍗曟嵁鏃ユ湡
- model.Add("FStockOrgId", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["搴撳瓨缁勭粐浠g爜"]) }); //搴撳瓨缁勭粐浠g爜
- model.Add("FBillNo", HSourceBillNo); //鍗曟嵁鍙�
- model.Add("FStockDirect", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["搴撳瓨鏂瑰悜"])); //搴撳瓨鏂瑰悜
- model.Add("FDEPTID", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["閮ㄩ棬浠g爜"]) }); //鐢熶骇杞﹂棿
- model.Add("F_paez_Text", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鍏ュ簱鐮佸崟"])); //鍏ュ簱鐮佸崟
- model.Add("F_paez_Integer2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛掑瓙鏁�"])); //绛掑瓙鏁�
- model.Add("F_paez_Integer1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛掔鍙暟"])); //绛掔鍙暟
- model.Add("F_paez_Integer3", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["瀹氶暱"])); //瀹氶暱
- model.Add("F_paez_BaseProperty4", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛掗噸"])); //绛掗噸
- model.Add("F_paez_Base", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["宸ュ彿"])); //宸ュ彿
- model.Add("F_paez_Combo", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鐝浠g爜"])); //鐝
- model.Add("F_paez_BaseProperty1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎵瑰彿"])); //鎵瑰彿
- model.Add("F_paez_Integer", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠辨暟"])); //绠辨暟
- model.Add("F_paez_Decimal2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎬婚噸"])); //鎬婚噸
- model.Add("F_paez_BaseProperty2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎴愬搧缂栫爜"])); //鎴愬搧缂栫爜
- model.Add("F_paez_BaseProperty5", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鍝佸悕"])); //鍝佸悕
- model.Add("F_paez_Base1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绾垮彿"])); //绾垮彿
+ // if (ds == null || ds.Tables[0].Rows.Count == 0)
+ // {
+ // oCn.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "webapi鍏ュ簱鐢宠鍗曞悓姝ワ紝鑾峰彇淇℃伅澶辫触";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // else
+ // {
+ // JObject model = new JObject();
+ // //model.Add("FBillType", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FBillType"]) }); //鍗曟嵁绫诲瀷
+ // model.Add("FDate", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏃ユ湡"])); //鍗曟嵁鏃ユ湡
+ // model.Add("FStockOrgId", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["搴撳瓨缁勭粐浠g爜"]) }); //搴撳瓨缁勭粐浠g爜
+ // model.Add("FBillNo", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鍗曟嵁鍙�"])); //鍗曟嵁鍙�
+ // model.Add("FStockDirect", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["搴撳瓨鏂瑰悜"])); //搴撳瓨鏂瑰悜
+ // model.Add("FDEPTID", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["閮ㄩ棬浠g爜"]) }); //鐢熶骇杞﹂棿
+ // model.Add("F_paez_Text", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鍏ュ簱鐮佸崟"])); //鍏ュ簱鐮佸崟
+ // model.Add("F_paez_Integer2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛掑瓙鏁�"])); //绛掑瓙鏁�
+ // model.Add("F_paez_Integer1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛掔鍙暟"])); //绛掔鍙暟
+ // model.Add("F_paez_Integer3", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["瀹氶暱"])); //瀹氶暱
+ // //model.Add("F_paez_BaseProperty4", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛掗噸"])); //绛掗噸
+ // model.Add("F_paez_Base", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["宸ュ彿"])); //宸ュ彿
+ // model.Add("F_paez_Combo", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鐝浠g爜"])); //鐝
+ // //model.Add("F_paez_BaseProperty1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎵瑰彿"])); //鎵瑰彿
+ // model.Add("F_paez_Integer", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠辨暟"])); //绠辨暟
+ // model.Add("F_paez_Decimal2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎬婚噸"])); //鎬婚噸
+ // //model.Add("F_paez_BaseProperty2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎴愬搧缂栫爜"])); //鎴愬搧缂栫爜
+ // //model.Add("F_paez_BaseProperty5", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鍝佸悕"])); //鍝佸悕
+ // model.Add("F_paez_Base1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绾垮彿"])); //绾垮彿
- model.Add("F_paez_BaseProperty", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏈哄彴"])); //鏈哄彴
- model.Add("F_paez_Decimal", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠遍噸"])); //绠遍噸
- //model.Add("F_WJUK_Text", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏉ユ簮"])); //鏉ユ簮
- model.Add("FDEPTID1", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["閮ㄩ棬浠g爜"]) });//閮ㄩ棬
- model.Add("F_paez_BaseProperty6", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎹诲悜"])); //鎹诲悜
- model.Add("F_paez_BaseProperty7", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠¤壊"])); //绠¤壊
- model.Add("F_paez_Assistant", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛夌骇"])); //绛夌骇
- model.Add("F_paez_Text11", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏈�灏忕鍙�"])); //鏈�灏忕鍙�
- //model.Add("F_paez_Text3", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏂囨湰"])); //鏂囨湰
- model.Add("F_paez_Text4", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏈�澶х鍙�"])); //鏈�澶х鍙�
- //model.Add("F_paez_PrintTimes", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎵撳嵃娆℃暟"])); //鎵撳嵃娆℃暟
- //model.Add("F_paez_Text5", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绾垮彿"])); //鏉$爜鎵撳嵃
- model.Add("F_paez_BaseProperty10", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["閮ㄩ棬浠g爜"]) }); //鐢熶骇閮ㄩ棬
- model.Add("F_paez_Combo1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏄惁鍐呭璐�"])); //鏄惁鍐呭璐�
- model.Add("F_paez_Combo2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["浜у搧绫诲瀷"])); //浜у搧绫诲瀷
- model.Add("F_paez_Combo3", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["婊$増鐘舵��"])); //婊$増鐘舵��
- model.Add("F_paez_BaseProperty11", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["瑙勬牸鍨嬪彿"])); //瑙勬牸鍨嬪彿
- model.Add("F_paez_BaseProperty12", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["缃戝埆"])); //缃戝埆
- model.Add("F_TFKO_Text4", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠卞彿鍓嶇紑"])); //绠卞彿鍓嶇紑
- model.Add("F_paez_WB", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["缃戝埆"])); //缃戝埆1
+ // //model.Add("F_paez_BaseProperty", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏈哄彴"])); //鏈哄彴
+ // model.Add("F_paez_Decimal", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠遍噸"])); //绠遍噸
+ // //model.Add("F_WJUK_Text", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏉ユ簮"])); //鏉ユ簮
+ // model.Add("FDEPTID1", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["閮ㄩ棬浠g爜"]) });//閮ㄩ棬
+ // //model.Add("F_paez_BaseProperty6", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎹诲悜"])); //鎹诲悜
+ // //model.Add("F_paez_BaseProperty7", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠¤壊"])); //绠¤壊
+ // model.Add("F_paez_Assistant", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绛夌骇"])); //绛夌骇
+ // model.Add("F_paez_Text11", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏈�灏忕鍙�"])); //鏈�灏忕鍙�
+ // //model.Add("F_paez_Text3", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏂囨湰"])); //鏂囨湰
+ // model.Add("F_paez_Text4", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏈�澶х鍙�"])); //鏈�澶х鍙�
+ // //model.Add("F_paez_PrintTimes", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鎵撳嵃娆℃暟"])); //鎵撳嵃娆℃暟
+ // //model.Add("F_paez_Text5", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绾垮彿"])); //鏉$爜鎵撳嵃
+ // //model.Add("F_paez_BaseProperty10", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["閮ㄩ棬浠g爜"]) }); //鐢熶骇閮ㄩ棬
+ // model.Add("F_paez_Combo1", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["鏄惁鍐呭璐�"])); //鏄惁鍐呭璐�
+ // model.Add("F_paez_Combo2", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["浜у搧绫诲瀷"])); //浜у搧绫诲瀷
+ // model.Add("F_paez_Combo3", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["婊$増鐘舵��"])); //婊$増鐘舵��
+ // //model.Add("F_paez_BaseProperty11", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["瑙勬牸鍨嬪彿"])); //瑙勬牸鍨嬪彿
+ // //model.Add("F_paez_BaseProperty12", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["缃戝埆"])); //缃戝埆
+ // //model.Add("F_TFKO_Text4", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["绠卞彿鍓嶇紑"])); //绠卞彿鍓嶇紑
+ // model.Add("F_paez_WB", Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["缃戝埆"])); //缃戝埆1
- JArray Fentity = new JArray();
- foreach (DataRow item in ds.Tables[1].Rows)
- {
- JObject FentityModel = new JObject();
- FentityModel.Add("FSrcEntryId", item["FSRCENTRYID"].ToString());// 婧愬崟鍒嗗綍鍐呯爜銆�
- FentityModel.Add("FIsNew", item["FIsNew"].ToString());// 婧愬崟绫诲瀷
- FentityModel.Add("FMaterialId", new JObject() { ["FNumber"] = item["FMaterialId"].ToString() }); // 鐗╂枡缂栫爜
- FentityModel.Add("FREPORTTYPE", new JObject() { ["FNumber"] = item["FREPORTTYPE"].ToString() }); // 鐢熶骇姹囨姤绫诲瀷
- FentityModel.Add("FProductType", item["FPRODUCTTYPE"].ToString());// 浜у搧绫诲瀷
- FentityModel.Add("FUNITID", new JObject() { ["FNumber"] = item["FUNITID"].ToString() });//鍗曚綅
- FentityModel.Add("FWORKSHIPID", new JObject() { ["FNumber"] = item["FWORKSHOPID"].ToString() });//鐢熶骇杞﹂棿
- FentityModel.Add("FMTONO", item["FMTONO"].ToString());// 璁″垝璺熻釜鍙�
- FentityModel.Add("FCheckProduct", item["FCheckProduct"].ToString());// 浜у搧妫�楠�
- FentityModel.Add("FISENTRUST", item["FISENTRUST"].ToString());// 缁勭粐濮旀墭鍔犲伐
- FentityModel.Add("FSrcBillType", item["FSRCBILLTYPE"].ToString());// 婧愬崟绫诲瀷
- FentityModel.Add("FMOBILLNO", item["FMOBILLNO"].ToString());// 鐢熶骇璁㈠崟
- FentityModel.Add("FSrcBillNo", item["FSrcBillNo"].ToString());// 婧愬崟缂栧彿
- FentityModel.Add("FMoEntrySeq", item["FMoEntrySeq"].ToString());//鐢熶骇璁㈠崟琛屽彿
- FentityModel.Add("FPROJECTNO", item["FPROJECTNO"].ToString());// 椤圭洰缂栧彿
- FentityModel.Add("FSTDMANHOUR", item["FSTDMANHOUR"].ToString());// 鍗曚綅鏍囧噯宸ユ椂
- FentityModel.Add("FHRPREPARETIME", item["FHRPREPARETIME"].ToString());// 浜哄憳鍑嗗宸ユ椂
- FentityModel.Add("FMACPREPARETIME", item["FMACPREPARETIME"].ToString());// 鏈哄櫒鍑嗗宸ユ椂
- FentityModel.Add("FSrcInterId", item["FSrcInterId"].ToString());// 婧愬崟鍐呯爜
- FentityModel.Add("FSrcEntrySeq", item["FSrcEntrySeq"].ToString());// 婧愬崟琛屽彿
- FentityModel.Add("FMoId", item["FMoId"].ToString());//鐢熶骇璁㈠崟鍐呯爜
- FentityModel.Add("FMoEntryId", item["FMoEntryId"].ToString());//鐢熶骇璁㈠崟鍒嗗綍鍙�
- FentityModel.Add("FBaseUnitID", new JObject() { ["FNumber"] = item["FBaseUnitID"].ToString() });//鍗曚綅
- FentityModel.Add("FSTOCKINORGID", new JObject() { ["FNumber"] = item["FSTOCKINORGID"].ToString() });//鍏ュ簱缁勭粐
- FentityModel.Add("FOwnerTypeId", item["FOwnerTypeId"].ToString());// 璐т富绫诲瀷
- FentityModel.Add("FOwnerId", new JObject() { ["FNumber"] = item["FOwnerId"].ToString() });// 璐т富
- FentityModel.Add("FSTOCKID", new JObject() { ["FNumber"] = item["FSTOCKID"].ToString() });//浠撳簱
- FentityModel.Add("FCostRate", item["FCOSTRATE"].ToString());// 鎴愭湰鏉冮噸
- FentityModel.Add("FSNUNITID", new JObject() { ["FNumber"] = item["FSNUNITID"].ToString() });//搴忓垪鍙峰崟浣�
- FentityModel.Add("FISBACKFLUSH", item["FISBACKFLUSH"].ToString());// 鍊掑啿棰嗘枡
- FentityModel.Add("FMOMAINENTRYID", item["FMOMAINENTRYID"].ToString());// 鐢熶骇璁㈠崟涓讳骇鍝佸垎褰�
- FentityModel.Add("FQAIP", item["FQAIP"].ToString());//绱ф�ユ斁琛�
- FentityModel.Add("FREQSRC", item["FREQSRC"].ToString());//闇�姹傛潵婧�
- FentityModel.Add("FREQBILLNO", item["FREQBILLNO"].ToString());//闇�姹傚崟鎹�
- FentityModel.Add("FREQBILLID", item["FREQBILLID"].ToString());// 闇�姹傚崟鎹唴鐮�
- FentityModel.Add("FREQENTRYSEQ", item["FREQENTRYSEQ"].ToString());//闇�姹傚崟鎹鍙�
- FentityModel.Add("FREQENTRYID", item["FREQENTRYID"].ToString());// 闇�姹傚崟鎹垎褰曞唴鐮�
- FentityModel.Add("FBASEQUAQTY", item["FBASEQUAQTY"].ToString());// 鍩烘湰鍗曚綅鍚堟牸鏁伴噺
- FentityModel.Add("FQUAQTY", item["FQUAQTY"].ToString());//鍚堟牸鏁伴噺
- FentityModel.Add("FFailQty", item["FFailQty"].ToString());//涓嶅悎鏍兼暟閲�
- FentityModel.Add("FScrapQty", item["FScrapQty"].ToString());//鎶ュ簾鏁伴噺
- FentityModel.Add("FBASEFINISHQTY", item["FBASEFINISHQTY"].ToString());//鍩烘湰鍗曚綅瀹屾垚鏁伴噺
- FentityModel.Add("FFINISHQTY", item["FFINISHQTY"].ToString());//瀹屾垚鏁伴噺
- FentityModel.Add("FLot", new JObject() { ["FNumber"] = item["FLot"].ToString() });//鎵瑰彿
- FentityModel.Add("FBOMID", new JObject() { ["FNumber"] = item["FBOMID"].ToString() });// BOM鐗堟湰
+ // JArray Fentity = new JArray();
+ // foreach (DataRow item in ds.Tables[1].Rows)
+ // {
+ // JObject FentityModel = new JObject();
+ // FentityModel.Add("FMATERIALID", new JObject() { ["FNumber"] = item["鐗╂枡浠g爜"].ToString() }); // 鐗╂枡浠g爜
+ // FentityModel.Add("FUnitID", new JObject() { ["FNumber"] = item["璁¢噺鍗曚綅浠g爜"].ToString() }); // 鍗曚綅浠g爜
+ // FentityModel.Add("FQty", item["鍑�閲�"].ToString()); //鍑�閲�
+ // FentityModel.Add("FBASEUNITID", new JObject() { ["FNumber"] = item["鍩烘湰璁¢噺鍗曚綅浠g爜"].ToString() }); // 鍩烘湰鍗曚綅浠g爜
+ // FentityModel.Add("FBASEQTY", item["瀹炴敹鏁伴噺"].ToString()); //瀹炴敹鏁伴噺
+ // FentityModel.Add("FSecUNITID", new JObject() { ["FNumber"] = item["搴撳瓨杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 搴撳瓨杈呰閲忓崟浣嶄唬鐮�
+ // FentityModel.Add("FSecQTY", item["搴撳瓨杈呭崟浣嶅疄鏀舵暟閲�"].ToString()); //瀹炴敹鏁伴噺锛堝簱瀛樿緟鍗曚綅锛�
+ // FentityModel.Add("FOWNERTYPEID", item["璐т富绫诲瀷"].ToString()); //璐т富绫诲瀷
+ // FentityModel.Add("FOWNERID", new JObject() { ["FNumber"] = item["璐т富浠g爜"].ToString() }); // 璐т富浠g爜
+ // FentityModel.Add("FKEEPERTYPEID", item["淇濈鑰呯被鍨�"].ToString()); //淇濈鑰呯被鍨�
+ // FentityModel.Add("FKEEPERID", new JObject() { ["FNumber"] = item["淇濈鑰呬唬鐮�"].ToString() }); // 淇濈鑰呬唬鐮�
+ // FentityModel.Add("FAuxPropId", new JObject() { ["FAUXPROPID__FF100003"] = new JObject() { ["FNumber"] = item["杈呭姪灞炴�т唬鐮�"].ToString() } } ); // 杈呭姪灞炴��
+ // FentityModel.Add("FExtAuxUnitId", new JObject() { ["FNumber"] = item["杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 杈呰閲忓崟浣嶄唬鐮�
+ // FentityModel.Add("FExtAuxUnitQty", item["绠辨暟"].ToString()); //绠辨暟
+ // FentityModel.Add("F_TFKO_Assistant", new JObject() { ["FNumber"] = item["缃戝埆浠g爜"].ToString() }); // 缃戝埆
+ // FentityModel.Add("F_TFKO_Assistant1", new JObject() { ["FNumber"] = item["瀛斿瀷浠g爜"].ToString() }); // 瀛斿瀷
+ // FentityModel.Add("F_TFKO_Assistant2", new JObject() { ["FNumber"] = item["鑹叉辰浠g爜"].ToString() }); // 鑹叉辰
+ // FentityModel.Add("F_TFKO_Assistant3", new JObject() { ["FNumber"] = item["绾ゅ害浠g爜"].ToString() }); // 绾ゅ害
+ // FentityModel.Add("F_paez_Qty", item["姣涢噸"].ToString()); //姣涢噸
+ // FentityModel.Add("F_TFKO_Text1", item["绠¤壊"].ToString()); //绠¤壊
+ // FentityModel.Add("F_TFKO_Text2", item["鎹诲悜"].ToString()); //鎹诲悜
+ // FentityModel.Add("FBoxcode", item["绠卞彿"].ToString()); //绠卞彿
+ // FentityModel.Add("F_PAEZ_SQSL", item["鐢宠鍗曟暟閲�"].ToString()); //鐢宠鍗曟暟閲�
+ // FentityModel.Add("F_paez_Integer4", item["绛掑瓙鏁�"].ToString()); //绛掑瓙鏁�
+ // FentityModel.Add("F_paez_BaseQty", item["瀹炲彂鏁伴噺"].ToString()); //瀹炲彂鏁伴噺
+ // FentityModel.Add("F_paez_Qty1", item["瀹炴敹鏁伴噺"].ToString()); //瀹炴敹鏁伴噺
+ // FentityModel.Add("F_paez_Text2", item["绠卞彿"].ToString()); //绠卞彿
- JArray Fentity2 = new JArray();
- JObject FentityModel2 = new JObject();
- FentityModel2.Add("FEntity_Link_FFlowId", item["FEntity_Link_FFlowId"].ToString());
- FentityModel2.Add("FEntity_Link_FFlowLineId", item["FEntity_Link_FFlowLineId"].ToString());
- FentityModel2.Add("FEntity_Link_FRuleId", item["FEntity_Link_FRuleId"].ToString());
- FentityModel2.Add("FEntity_Link_FSTableName", item["FEntity_Link_FSTableName"].ToString());
- FentityModel2.Add("FEntity_Link_FSBillId", item["FEntity_Link_FSBillId"].ToString());
- FentityModel2.Add("FEntity_Link_FSId", item["FEntity_Link_FSId"].ToString());
- Fentity2.Add(FentityModel2);
- FentityModel.Add("FEntity_Link", Fentity2);
- FentityModel.Add("FBFLowId", new JObject() { ["FID"] = item["FBFLOWID"].ToString() });
- Fentity.Add(FentityModel);
- }
- model.Add("FEntity", Fentity); //鏄庣粏淇℃伅
- JObject jsonRoot = new JObject()
- {
- ["Creator"] = "",
- ["NeedUpDateFields"] = new JArray(),
- ["NeedReturnFields"] = new JArray(),
- //["IsDeleteEntry"] = "true",
- //["SubSystemId"] = "",
- //["IsVerifyBaseDataField"] = "false",
- ["IsDeleteEntry"] = "true",
- ["SubSystemId"] = "",
- ["IsVerifyBaseDataField"] = "true",
- ["IsEntryBatchFill"] = "false",
- ["ValidateFlag"] = "true",
- ["NumberSearch"] = "true",
- ["IsAutoAdjustField"] = "false",
- ["InterationFlags"] = "",
- ["IgnoreInterationFlag"] = "",
- //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
- ["Model"] = model
- };
- //浠庨厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
- if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
- {
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍏ュ簱鐢宠鍗曞悓姝ヨ幏鍙栫櫥褰曡处鍙峰瘑鐮佸け璐ワ紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // //JArray Fentity2 = new JArray();
+ // //JObject FentityModel2 = new JObject();
+ // //FentityModel2.Add("FEntity_Link_FFlowId", item["FEntity_Link_FFlowId"].ToString());
+ // //FentityModel2.Add("FEntity_Link_FFlowLineId", item["FEntity_Link_FFlowLineId"].ToString());
+ // //FentityModel2.Add("FEntity_Link_FRuleId", item["FEntity_Link_FRuleId"].ToString());
+ // //FentityModel2.Add("FEntity_Link_FSTableName", item["FEntity_Link_FSTableName"].ToString());
+ // //FentityModel2.Add("FEntity_Link_FSBillId", item["FEntity_Link_FSBillId"].ToString());
+ // //FentityModel2.Add("FEntity_Link_FSId", item["FEntity_Link_FSId"].ToString());
+ // //Fentity2.Add(FentityModel2);
+ // //FentityModel.Add("FEntity_Link", Fentity2);
+ // //FentityModel.Add("FBFLowId", new JObject() { ["FID"] = item["FBFLOWID"].ToString() });
+ // Fentity.Add(FentityModel);
+ // }
+ // model.Add("FEntity", Fentity); //鏄庣粏淇℃伅
+ // JObject jsonRoot = new JObject()
+ // {
+ // ["Creator"] = "",
+ // ["NeedUpDateFields"] = new JArray(),
+ // ["NeedReturnFields"] = new JArray(),
+ // //["IsDeleteEntry"] = "true",
+ // //["SubSystemId"] = "",
+ // //["IsVerifyBaseDataField"] = "false",
+ // ["IsDeleteEntry"] = "true",
+ // ["SubSystemId"] = "",
+ // ["IsVerifyBaseDataField"] = "true",
+ // ["IsEntryBatchFill"] = "false",
+ // ["ValidateFlag"] = "true",
+ // ["NumberSearch"] = "true",
+ // ["IsAutoAdjustField"] = "false",
+ // ["InterationFlags"] = "",
+ // ["IgnoreInterationFlag"] = "",
+ // //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
+ // ["Model"] = model
+ // };
- var loginRet = InvokeHelper.Login();
- var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
- if (isSuccess == 0)
- {
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鐧诲綍閲戣澏澶辫触锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- string result = InvokeHelper.Save("PRD_MORPT", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
+ // //浠庨厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
+ // if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
+ // {
+ // oCn.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍏ュ簱鐢宠鍗曞悓姝ヨ幏鍙栫櫥褰曡处鍙峰瘑鐮佸け璐ワ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
- if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
- {
- LogService.Write(JsonConvert.SerializeObject(jsonRoot));
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍏ュ簱鐢宠鍗曞悓姝ラ噾铦朵簯澶辫触锛佸崟鍙�:" + HSourceBillNo + result + jsonRoot;
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // var loginRet = InvokeHelper.Login();
+ // var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+ // if (isSuccess == 0)
+ // {
+ // oCn.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鐧诲綍閲戣澏澶辫触锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // else
+ // {
+ // string result = InvokeHelper.Save("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
- //鎻愪氦瀹℃牳
- 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,
- };
- if (oSystemParameter.omodel.Sc_ICMOReportBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
- {
- result1 = InvokeHelper.Submit("PRD_MORPT", JsonConvert.SerializeObject(json));//鎻愪氦
- result2 = InvokeHelper.Audit("PRD_MORPT", JsonConvert.SerializeObject(json));//瀹℃牳
+ // if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ // {
+ // LogService.Write(JsonConvert.SerializeObject(jsonRoot));
+ // oCn.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍏ュ簱鐢宠鍗曞悓姝ラ噾铦朵簯澶辫触锛佸崟鍙�:" + HSourceBillNo + result + jsonRoot;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
- if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
- {
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍏ュ簱鐢宠鍗曞崟鍙�:" + ",鎻愪氦澶辫触" + result1;
- 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,
+ // };
+ // if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ // {
+ // result1 = InvokeHelper.Submit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//鎻愪氦
+ // result2 = InvokeHelper.Audit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//瀹℃牳
- if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
- {
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍏ュ簱鐢宠鍗曞崟鍙�:" + ",瀹℃牳澶辫触" + result2;
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
- }
- }
- }
- }
- }
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ // {
+ // oCn.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍏ュ簱鐢宠鍗曞崟鍙�:" + ",鎻愪氦澶辫触" + result1;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+
+ // if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ // {
+ // oCn.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍏ュ簱鐢宠鍗曞崟鍙�:" + ",瀹℃牳澶辫触" + result2;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ //}
+ //else
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
string sExpressNumber = "";
WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
--
Gitblit v1.9.1