From 2bf6de5d4748d28f7f3a098af25503d6a0c619d1 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 19 十一月 2025 11:16:03 +0800
Subject: [PATCH] 多码合一
---
WebAPI/Controllers/QC_POStockInCheckBillController.cs | 234 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 231 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/QC_POStockInCheckBillController.cs b/WebAPI/Controllers/QC_POStockInCheckBillController.cs
index a639dbf..7bbf6dd 100644
--- a/WebAPI/Controllers/QC_POStockInCheckBillController.cs
+++ b/WebAPI/Controllers/QC_POStockInCheckBillController.cs
@@ -21,7 +21,7 @@
public WebServer webserver = new WebServer();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
public DAL.ClsQC_POStockInCheckBill BillOld = new DAL.ClsQC_POStockInCheckBill();
-
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
//DataSet ds;
@@ -103,6 +103,229 @@
}
}
#endregion
+
+ #region 鏉ユ枡妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓虹敓浜ц鍗�(1102)
+ /// <summary>
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_POStockInCheckBill/get_POOrderList_Tmp")]
+ [HttpGet]
+ public object get_POOrderList_Tmp(int HInterID, int HEntryID, string HBillType)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HInterID == 0 || HBillType.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒HInterID锛�" + HInterID + "锛汬EntryID锛�" + HEntryID + "锛汬BillType锛�" + HBillType + "锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_POStockInCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_GetInfoByPOOrderBill " + "'鐗╂枡'" + "," + HInterID + "," + HEntryID + "," + HBillType;
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByPOOrderBill");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃煡璇㈠埌鏁版嵁锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ 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 鏉ユ枡妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓烘敹鏂欓�氱煡鍗�(1103)
+ /// <summary>
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_POStockInCheckBill/get_POInStockBill_Tmp")]
+ [HttpGet]
+ public object get_POInStockBill_Tmp(int HInterID, int HEntryID, string HBillType)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HInterID == 0 || HBillType.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒HInterID锛�" + HInterID + "锛汬EntryID锛�" + HEntryID + "锛汬BillType锛�" + HBillType + "锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_POStockInCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_GetInfoByPOInStockBill " + "'鐗╂枡'" + "," + HInterID + "," + HEntryID + "," + HBillType;
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByPOInStockBill");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃煡璇㈠埌鏁版嵁锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ 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 鏉ユ枡妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓洪噰璐叆搴撳崟(1201)
+ /// <summary>
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_POStockInCheckBill/get_Kf_POStockInBill_Tmp")]
+ [HttpGet]
+ public object get_Kf_POStockInBill_Tmp(int HInterID, int HEntryID, string HBillType)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HInterID == 0 || HBillType.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒HInterID锛�" + HInterID + "锛汬EntryID锛�" + HEntryID + "锛汬BillType锛�" + HBillType + "锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_POStockInCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_GetInfoByKfPOStockInBill " + "'鐗╂枡'" + "," + HInterID + "," + HEntryID + "," + HBillType;
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByKfPOStockInBill");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃煡璇㈠埌鏁版嵁锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ 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>
@@ -812,7 +1035,7 @@
BillNew.omodel.HBatchNo = ClsPub.isStrNull(mainList[0].HBatchNo);
BillNew.omodel.HTakeSampleCheckBillID = ClsPub.isLong(mainList[0].HTakeSampleCheckBillID);
BillNew.omodel.HTakeSampleCheckBillNo = ClsPub.isStrNull(mainList[0].HTakeSampleCheckBillNo);
-
+ BillNew.omodel.HRemarkSN = ClsPub.isStrNull(mainList[0].HRemarkSN);
List<Model.ClsQC_POStockInCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_POStockInCheckBillSub>>(msg3);
BillNew.DetailColl = new List<Model.ClsQC_POStockInCheckBillSub>();
@@ -820,6 +1043,7 @@
{
if (i >= 0)//HQty
{
+ LogService.Write(subList[i]);
Model.ClsQC_POStockInCheckBillSub oSub = new Model.ClsQC_POStockInCheckBillSub();
oSub.HEntryID = i + 1;
oSub.HRemark = ClsPub.isStrNull(subList[i].HRemark);
@@ -860,6 +1084,10 @@
oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect);
oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID);
oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult);
+ oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);
+ oSub.HQualityStdID = DBUtility.ClsPub.isLong(subList[i].HQualityStdID);
+ oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);
+ oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);
BillNew.DetailColl.Add(oSub);
}
else
@@ -874,7 +1102,7 @@
-
+
//淇濆瓨瀹屾瘯鍚庡鐞�
if (OperationType.Equals("1") || OperationType.Equals("2"))
--
Gitblit v1.9.1