From 81c2a1c9635bdfb714d9a04b4bb08be6e060e99c Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 16 十二月 2024 09:49:06 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/条码管理/WEBSController.cs | 514 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 468 insertions(+), 46 deletions(-)
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index d4eaa9c..5cf6641 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -35,9 +35,6 @@
string ComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
- WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain();
-
-
#region 鍏敤鏂规硶
#region 璐﹀彿鐧诲叆
@@ -1075,6 +1072,90 @@
#region 鎵爜妯″潡璋冪敤鏂规硶
+ #region 鍏朵粬鍏ュ簱 鑾峰彇鍏ュ簱绫诲瀷
+
+ /// <summary>
+ /// 鑾峰彇鍏ュ簱绫诲瀷
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetStockInStyle_Json")]
+ [HttpGet]
+ public Object GetStockInStyle_Json()
+ {
+ try
+ {
+ ds = oWebs.get_StockInStyle();
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ涓嶅埌鍏ュ簱绫诲瀷淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍏ュ簱绫诲瀷淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鍏朵粬鍑哄簱 鑾峰彇鍑哄簱绫诲瀷
+
+ /// <summary>
+ /// 鑾峰彇鍑哄簱绫诲瀷
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetStockOutStyle_Json")]
+ [HttpGet]
+ public Object GetStockOutStyle_Json()
+ {
+ try
+ {
+ ds = oWebs.get_StockOutStyle();
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ涓嶅埌鍑哄簱绫诲瀷淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍑哄簱绫诲瀷淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 鐩存帴璋冩嫧 鑾峰彇璋冩嫧鍑鸿揣绫诲瀷
/// <summary>
@@ -1399,6 +1480,50 @@
}
#endregion
+
+
+ #region 鎵爜妯″潡 瀹㈡埛銆佷紶绁ㄣ�佹潯鐮侀獙璇佽皟鐢�
+
+ /// <summary>
+ /// 鎵爜妯″潡 瀹㈡埛銆佷紶绁ㄣ�佹潯鐮侀獙璇佽皟鐢�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetCheakBarCodeAndCP_Json")]
+ [HttpGet]
+ public object GetCheakBarCodeAndCP_Json(long HCusID, string HCP, string HBarCode)
+ {
+ try
+ {
+ HBarCode = HBarCode.Trim();
+ if (oWebs.Get_CheakBarCodeAndCP(HCusID, HCP, HBarCode, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹㈡埛銆佷紶绁ㄣ�佹潯鐮侀獙璇佸け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#endregion
@@ -1898,15 +2023,6 @@
if (oWebs.set_SaveICMOReportBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
{
- string sReturn = "";
- if (oSystemParameter.ShowBill(ref sReturn) == true)
- {
- if (oSystemParameter.omodel.MES_StationOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
- {
- Cj_StationOutBillController cj_StationOutBillController = new Cj_StationOutBillController();
- object objResult = cj_StationOutBillController.set_CheckBill(lsmain[0].HInterID.ToString(), lsmain[0].HMaker, "3791");
- }
- }
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
@@ -2274,6 +2390,88 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍏朵粬鍏ュ簱鍗曚笂浼犲け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鍏朵粬鍏ュ簱 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鍏朵粬鍏ュ簱鏍¢獙涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveOtherInBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveOtherInBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string sMainStr = sArray[0].ToString(); //鍗曟嵁鏁版嵁
+ string HSourceBarCodeCtl = sArray[1].ToString(); //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+
+ try
+ {
+ List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getOtherInBillMainByJson(sMainStr);
+
+ WebAPI.WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1203";
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
+ if (HSourceBarCodeCtl == "Y")
+ {
+ if (oWebs.set_SaveOtherInBill_CLD_BillCheck_Verify(websLsmain, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //鍘熷崟鎹潪鎵爜鐢熸垚
+ else
+ {
+ if (oWebs.set_SaveOtherInBill_CLD_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏朵粬鍏ュ簱鏍¢獙澶辫触锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -4299,13 +4497,16 @@
string sJXCode = "";
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
+ LogService.Write("妫シ鎵爜鍙傛暟鍊硷紝瀹㈡埛锛�" + oSystemParameter.omodel.WMS_CampanyName + " ,婧愬崟绫诲瀷锛�" + HSourceBillType);
+
if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
{
sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
SourceFlag = true;
}
- else if(oSystemParameter.omodel.WMS_CampanyName == "娣诲悍" && HSourceBillType == "1241")
+ else if(oSystemParameter.omodel.WMS_CampanyName == "妫シ" && HSourceBillType == "1241")
{
+ LogService.Write("妫シ鍏朵粬鍏ュ簱鎵爜鏉$爜璁板綍锛�" + sBarCode);
DataSet ds;
string sql = "select HBarCode,HSourceInterID,HSourceEntryID,HSourceBillNo from Gy_BarCodeBill with(nolock) where HBarCode = '" + sBarCode + "'";
string HDataBaseName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName");//鑾峰彇閲戣澏鏁版嵁搴撳悕绉�
@@ -4316,6 +4517,7 @@
//鍒ゆ柇鏉$爜淇℃伅鏄惁鍦ㄦ潯鐮佹。妗堜腑
if (ds == null || ds.Tables[0].Rows.Count < 1)
{
+ LogService.Write("鍏朵粬鍏ュ簱锛屾潯鐮佹。妗堜腑涓嶅瓨鍦ㄦ鏉$爜缂栧彿锛�" + sBarCode);
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鏉$爜妗f涓笉瀛樺湪姝ゆ潯鐮佺紪鍙凤細" + sBarCode;
@@ -4328,7 +4530,7 @@
HSourceBillNo_TB = 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_TB + "'", HDataBaseName);
+ sql = string.Format(@"select * from {0}..TFKO_t_Cust100009 with(nolock) where FBILLNO = '" + HSourceBillNo_TB + "'", HDataBaseName);
LogService.Write("鍏朵粬鍏ュ簱鏌ヨ鍏ュ簱鐢宠鍗曟槸鍚﹀瓨鍦細" + sql);
@@ -4337,6 +4539,9 @@
if (ds == null || ds.Tables[0].Rows.Count < 1)
{
sql = "exec h_p_Kf_StockInRequestBillToErp '" + HSourceInterID + "','" + HSourceBillNo_TB + "'";
+
+ LogService.Write("鍏朵粬鍏ュ簱鑾峰彇婧愬崟淇℃伅锛�" + sql);
+
ds = oCn.RunProcReturn(sql, "h_p_Kf_StockInRequestBillToErp");
if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -4353,23 +4558,23 @@
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("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_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", new JObject() { ["FSTAFFNUMBER"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["宸ュ彿"]) }); //宸ュ彿 ???蹇呭~ FSTAFFNUMBER
+ 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_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_Base1", new JObject() { ["FNumber"] = 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]["绠遍噸"])); //绠遍噸
@@ -4377,7 +4582,7 @@
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_Assistant", new JObject() { ["FNumber"] = 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]["鏈�澶х鍙�"])); //鏈�澶х鍙�
@@ -4390,32 +4595,31 @@
//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_WB", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["缃戝埆"]) }); //缃戝埆1 ???
JArray Fentity = new JArray();
foreach (DataRow item in ds.Tables[0].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("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("FSecUNITID", new JObject() { ["FNumber"] = item["搴撳瓨杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 搴撳瓨杈呭崟浣�
FentityModel.Add("FSecQTY", item["搴撳瓨杈呭崟浣嶅疄鏀舵暟閲�"].ToString()); //瀹炴敹鏁伴噺锛堝簱瀛樿緟鍗曚綅锛�
- FentityModel.Add("FOWNERTYPEID", item["璐т富绫诲瀷"].ToString()); //璐т富绫诲瀷
+ FentityModel.Add("FOWNERTYPEID", item["璐т富绫诲瀷"].ToString()); //璐т富绫诲瀷 ???鏁板��
FentityModel.Add("FOWNERID", new JObject() { ["FNumber"] = item["璐т富浠g爜"].ToString() }); // 璐т富浠g爜
- FentityModel.Add("FKEEPERTYPEID", item["淇濈鑰呯被鍨�"].ToString()); //淇濈鑰呯被鍨�
+ 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("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_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_paez_Qty", item["姣涢噸"].ToString()); //姣涢噸 ???涓嶈兘灏忎簬绛変簬0
FentityModel.Add("F_TFKO_Text1", item["绠¤壊"].ToString()); //绠¤壊
FentityModel.Add("F_TFKO_Text2", item["鎹诲悜"].ToString()); //鎹诲悜
FentityModel.Add("FBoxcode", item["绠卞彿"].ToString()); //绠卞彿
@@ -4423,7 +4627,8 @@
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()); //绠卞彿
+ FentityModel.Add("F_paez_Text2", item["绠卞彿"].ToString()); //绠卞彿 ???涓嶈兘涓烘暟瀛�
+ FentityModel.Add("FLOT", new JObject() { ["FNumber"] = item["鎵瑰彿"].ToString() }); // 杈呰閲忓崟浣嶄唬鐮�
//JArray Fentity2 = new JArray();
@@ -4464,19 +4669,23 @@
//浠庨厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
{
- oCn.RollBack();
+ //oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍏ュ簱鐢宠鍗曞悓姝ヨ幏鍙栫櫥褰曡处鍙峰瘑鐮佸け璐ワ紒";
objJsonResult.data = null;
return objJsonResult;
}
-
+ LogService.Write("鍏朵粬鍏ュ簱,鍗冲皢鐧诲綍閲戣澏");
var loginRet = InvokeHelper.Login();
+ LogService.Write("鍏朵粬鍏ュ簱,鐧诲綍閲戣澏缁撴灉1锛�" + loginRet);
+ LogService.Write("鍏朵粬鍏ュ簱,鐧诲綍閲戣澏缁撴灉2锛�" + JObject.Parse(loginRet)["LoginResultType"].Value<int>());
+
var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
if (isSuccess == 0)
{
- oCn.RollBack();
+ LogService.Write("鍏朵粬鍏ュ簱,鐧诲綍閲戣澏澶辫触锛�");
+ //oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鐧诲綍閲戣澏澶辫触锛�";
@@ -4489,15 +4698,15 @@
if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
{
- LogService.Write(JsonConvert.SerializeObject(jsonRoot));
- oCn.RollBack();
+ LogService.Write("鍏ュ簱鐢宠鍗曞悓姝ラ噾铦朵簯澶辫触锛�" + JsonConvert.SerializeObject(jsonRoot));
+ //oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍏ュ簱鐢宠鍗曞悓姝ラ噾铦朵簯澶辫触锛佸崟鍙�:" + HSourceBillNo_TB + result + jsonRoot;
objJsonResult.data = null;
return objJsonResult;
}
-
+ LogService.Write("鍏ュ簱鐢宠鍗曞悓姝ラ噾铦朵簯鎴愬姛锛�" + JsonConvert.SerializeObject(jsonRoot));
//鎻愪氦瀹℃牳
string result1 = string.Empty;
string result2 = string.Empty;
@@ -4514,7 +4723,7 @@
if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
{
- oCn.RollBack();
+ //oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍏ュ簱鐢宠鍗曞崟鍙�:" + ",鎻愪氦澶辫触" + result1;
@@ -4524,7 +4733,7 @@
if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
{
- oCn.RollBack();
+ //oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍏ュ簱鐢宠鍗曞崟鍙�:" + ",瀹℃牳澶辫触" + result2;
@@ -4534,8 +4743,16 @@
}
}
}
+
+ //鏇存柊鏉$爜婧愬崟id淇℃伅
+ sql = string.Format($@"update a set HSourceInterID = isnull(b.FID,0),HSourceEntryID = isnull(c.FEntryID,0) from Gy_BarCodeBill a left join AIS20220609121235..TFKO_t_Cust100009 b on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'");
+ //鎵ц鏇存柊璇彞
+ oCn.RunProc(sql);
+
}
}
+
+ sJXCode = sBarCode;
}
else
{
@@ -4879,7 +5096,15 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = null;
+ objJsonResult.data = new
+ {
+ Materlist = ds.Tables[0], //杩斿洖鐗╂枡鏄庣粏鍒楄〃淇℃伅锛�0锛�
+ Mouldlist = ds.Tables[1], //杩斿洖妯℃不鍏峰垪琛ㄤ俊鎭紙1锛�
+ FIFOlist = ds.Tables[2], //杩斿洖鍏堣繘鍏堝嚭鍒楄〃淇℃伅锛�2锛�
+ BarCodelist = ds.Tables[3], //杩斿洖鏉$爜鏄庣粏鍒楄〃淇℃伅锛�3锛�
+ ICMOReportlist = ds.Tables[4], //杩斿洖婧愬崟鐢熶骇姹囨姤鍗曟潯鐮佹槑缁嗗垪琛ㄤ俊鎭紙4锛�
+ BarCodeDetailslist = ds.Tables[5] //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛�
+ };
return objJsonResult;
}
else
@@ -5076,11 +5301,99 @@
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+
+ #region 绯荤粺鍙傛暟鑾峰彇
+ //閲囪喘鍏ュ簱鍗�
+ if (HBillType == "1201")
{
- //閿�鍞嚭搴撳崟
- sSourceBarCodeCtl = "Y";
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
}
+ //鐢熶骇鍏ュ簱鍗�
+ if (HBillType == "1202")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鍏朵粬鍏ュ簱鍗�
+ if (HBillType == "1203")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //棰嗘枡鍑哄簱鍗�
+ else if (HBillType == "1204")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閿�鍞嚭搴撳崟
+ else if (HBillType == "1205")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鍏朵粬鍑哄簱鍗�
+ else if (HBillType == "1206")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //濮斿棰嗘枡鍗�
+ else if (HBillType == "1211")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇琛ユ枡鍗�
+ else if (HBillType == "1254")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //濮斿琛ユ枡鍗�
+ else if (HBillType == "1255")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐩存帴璋冩嫧鍗�
+ else if (HBillType == "1207")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ #endregion
if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
{
@@ -5156,6 +5469,71 @@
#endregion
+ #region 杩斿洖鍗曟嵁鍒楄〃淇℃伅 20241114
+
+ /// <summary>
+ /// 杩斿洖鍗曟嵁鍒楄〃淇℃伅 鏍¢獙妯″紡
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_New_Json")]
+ [HttpGet]
+ public object GetKf_PonderationBillMain_Temp_BillCheck_New_Json(long HInterID, string HBillType, string sWhere, string HSourceBarCodeCtl)
+ {
+ try
+ {
+ //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
+ if (HSourceBarCodeCtl == "Y")
+ {
+ ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_Verify " + HInterID.ToString() + ",'" + HBillType + "','" + sWhere + "'", "h_p_KF_PonderationBillMain_TempList_Verify");
+ }
+ //鍘熷崟鎹潪鎵爜鐢熸垚
+ else
+ {
+ ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_BillCheck " + HInterID.ToString() + ",'" + HBillType + "','" + sWhere + "'", "h_p_KF_PonderationBillMain_TempList_BillCheck");
+ }
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = new
+ {
+ Materlist = ds.Tables[0], //杩斿洖鐗╂枡鏄庣粏鍒楄〃淇℃伅锛�0锛�
+ BarCodeDetailslist = ds.Tables[1], //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛�
+ };
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 杩斿洖鍗曟嵁鍒楄〃淇℃伅
/// <summary>
@@ -5207,6 +5585,50 @@
#endregion
+ #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20241114
+
+ /// <summary>
+ /// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_DeleteBarCodeByEntryID_BillCheck_New_Json")]
+ [HttpGet]
+ public object set_DeleteBarCodeByEntryID_BillCheck_New_Json(long HInterID, string HBillType, long HSourceInterID, long HSourceEntryID, string HSourceBarCodeCtl)
+ {
+ //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
+ if (HSourceBarCodeCtl == "Y")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏍¢獙鏉$爜锛屾棤闇�鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍘熷崟鎹潪鎵爜鐢熸垚
+ else
+ {
+ try
+ {
+ oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鎵�閫夎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ #endregion
+
#region 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
/// <summary>
--
Gitblit v1.9.1