From 862257fe2991fa96e0f20e31bcf00e4f9b1f86a2 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 22 十二月 2025 16:07:44 +0800
Subject: [PATCH] 来料检验单 生产入库检验单 出厂检验单 添加 检验数量 字段,添加 检验值字段
---
WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs | 183 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 182 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
index c183ffc..212630d 100644
--- a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
+++ b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
@@ -262,6 +262,15 @@
string OperationType = sArray[2].ToString();
string user = sArray[3].ToString();
string Value = sArray[4].ToString();
+ string BadReason = null;
+ if(sArray.Length > 4)
+ {
+ BadReason = sArray[5].ToString();
+ }
+ if (String.IsNullOrWhiteSpace(BadReason) == true)
+ {
+ BadReason = "[]";
+ }
bool bResult;
try
{
@@ -325,8 +334,11 @@
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);
+ BillNew.omodel.HCheckQty = mainList[0].HCheckQty;
List<Model.ClsQC_OutCompCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_OutCompCheckBillSub>>(msg3);
+ List<Model.ClsQC_POStockInCheckBillSub_BadReason> badReasonList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_POStockInCheckBillSub_BadReason>>(BadReason);
+
BillNew.DetailColl = new List<Model.ClsQC_OutCompCheckBillSub>();
for (int i = 0; i < subList.ToArray().Length; i++)
@@ -378,6 +390,7 @@
oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);//妫�楠屾柟娉�
oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);//妫�楠屼緷鎹�
oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);//姣旇緝绗�
+ oSub.HInspectValQ = subList[i].HInspectValQ;
BillNew.DetailColl.Add(oSub);
}
@@ -388,6 +401,25 @@
objJsonResult.Message = "鏃犳槑缁嗚淇℃伅!";
objJsonResult.data = null;
return objJsonResult;
+ }
+ }
+
+ for (int i = 0; i < badReasonList.ToArray().Length; i++)
+ {
+ if (i >= 0)//HQty
+ {
+ Model.ClsQC_OutCompCheckBillSub_BadReason oSub = new Model.ClsQC_OutCompCheckBillSub_BadReason();
+ oSub.HInterID = mainList[0].HInterID;
+ oSub.HEntryID = i + 1;
+ oSub.HRemark = ClsPub.isStrNull(subList[i].HRemark);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(badReasonList[i].HCloseMan);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(badReasonList[i].HEntryCloseDate);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(badReasonList[i].HCloseType);
+ oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(mainList[0].HBillNo);
+ oSub.HQty = badReasonList[i].HQty;
+ oSub.HBadReasonID = badReasonList[i].HBadReasonID;
+
+ BillNew.DetailCol1_BadReason.Add(oSub);
}
}
@@ -1275,5 +1307,154 @@
}
}
#endregion
+
+
+ #region 鍑哄巶妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓洪攢鍞鍗曢�氳繃鍗曟嵁鍙�(1401)
+ /// <summary>
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_OutCompCheckBill/get_SeOrderBill_Tmp_ByBiilNo")]
+ [HttpGet]
+ public object get_SeOrderBill_Tmp_ByBiilNo(string HBillNo, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if ( HBillNo.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒 ";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_OutCompCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_GetInfoBySeOrderBill_ByBillNo " + "'鐗╂枡'" + ",'" + HBillNo +"'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoBySeOrderBill_ByBillNo");
+
+ 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 鍑哄巶妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓哄彂璐ч�氱煡鍗曢�氳繃鍗曟嵁鍙�(1401)
+ /// <summary>
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_OutCompCheckBill/get_SeOutStockBill_Tmp_ByBillNo")]
+ [HttpGet]
+ public object get_SeOutStockBill_Tmp_ByBillNo(string HBillNo, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HBillNo.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒 ";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_OutCompCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_GetInfoBySeOutStockBill_ByBillNo " + "'鐗╂枡'" + ",'" + HBillNo + "'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoBySeOutStockBill_ByBillNo");
+
+ 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
}
}
\ No newline at end of file
--
Gitblit v1.9.1