From 05a948b400c16e2c4b20546075dfeebcaf229561 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 08 十二月 2023 15:29:00 +0800
Subject: [PATCH] 特批申请单下推收款单
---
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 107 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 98 insertions(+), 9 deletions(-)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
index 985440c..54ddf54 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
@@ -23,6 +23,57 @@
//鑾峰彇绯荤粺鍙傛暟
Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ //#region 宸ュ簭妫�楠屽崟鍒楄〃
+ //[Route("QC_ProcessCheckBill/QC_ProcessCheckBillList")]
+ //[HttpGet]
+ //public object QC_ProcessCheckBillList(string sWhere, string user)
+ //{
+ // try
+ // {
+ // List<object> columnNameList = new List<object>();
+
+ // string sql1 = "select * from h_v_QC_ProcessCheckBill where 1 = 1 ";
+ // string sql = sql1 + sWhere + " order by hmainid desc";
+ // ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBill");
+
+ // //娣诲姞鍒楀悕
+ // 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鍒楀璞$殑鍒楀悕
+ // }
+
+ // if (ds.Tables[0].Rows.Count > 0)
+ // {
+ // objJsonResult.code = "1";
+ // objJsonResult.count = 1;
+ // objJsonResult.Message = "Sucess锛�";
+ // objJsonResult.list = columnNameList;
+ // objJsonResult.data = ds.Tables[0];
+ // return objJsonResult;
+ // }
+ // else
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹�";
+ // objJsonResult.list = columnNameList;
+ // objJsonResult.data = ds.Tables[0];
+ // return objJsonResult;
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "Exception锛�" + e.ToString();
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ //}
+ //#endregion
+
#region 宸ュ簭妫�楠屽崟鍒楄〃
[Route("QC_ProcessCheckBill/QC_ProcessCheckBillList")]
[HttpGet]
@@ -61,7 +112,7 @@
objJsonResult.list = columnNameList;
objJsonResult.data = ds.Tables[0];
return objJsonResult;
- }
+ }
}
catch (Exception e)
{
@@ -72,7 +123,7 @@
return objJsonResult;
}
}
- #endregion
+ #endregion
/// <summary>
/// 杩斿洖宸ュ簭妫�楠屽崟鍒楄〃
@@ -693,18 +744,55 @@
{
try
{
- if (HInterID == 0 || HBillType.Equals(""))
+ List<object> columnNameList = new List<object>();
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒HInterID锛�" + HInterID + "锛汬EntryID锛�" + HEntryID + "锛汬BillType锛�" + HBillType + "锛�";
- objJsonResult.data = null;
- return objJsonResult;
+ switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
+ {
+ case "宸ュ簭":
+ sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'宸ュ簭'," + HInterID + "," + HEntryID + "," + HBillType;
+ break;
+ case "鐗╂枡":
+ sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'鐗╂枡'," + HInterID + "," + HEntryID + "," + HBillType;
+ break;
+ case "宸ヨ壓璺嚎":
+ sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'宸ヨ壓璺嚎'," + HInterID + "," + HEntryID + "," + HBillType;
+ break;
+ }
+
+ }
+ ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByICMOStatusBill");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+
}
else
{
- ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
}
+
+ //if (HInterID == 0 || HBillType.Equals(""))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒HInterID锛�" + HInterID + "锛汬EntryID锛�" + HEntryID + "锛汬BillType锛�" + HBillType + "锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //else
+ //{
+ // ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
+ //}
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -719,6 +807,7 @@
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
}
--
Gitblit v1.9.1