From f95cc9aa0dae0ab3b7ec8b213c8be18ca47bfac2 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 07 十一月 2025 11:16:47 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs | 599 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 519 insertions(+), 80 deletions(-)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
index 3d8cb37..02486bb 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
@@ -1,6 +1,7 @@
锘縰sing Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
+using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -84,6 +85,16 @@
{
List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_FirstPieceCheckBill_Query", 3, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
string sql1 = "select * from h_v_QC_FirstPieceCheckBillMainList where 1 = 1 ";
string sql = sql1 + sWhere + " ";
ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList");
@@ -126,6 +137,61 @@
}
#endregion
+ #region 棣栦欢妫�楠屽崟鍒嗛〉鍒楄〃
+ [Route("QC_FirstPieceCheckBillMain/QC_FirstPieceCheckBillMainListPage")]
+ [HttpGet]
+ public json QC_FirstPieceCheckBillMainListPage(string sWhere, string user, int page, int size)
+ {
+ DataSet ds;
+ json res = new json();
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_FirstPieceCheckBill_Query", 3, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ sWhere = sWhere.Replace("'", "''");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_FirstPieceCheckBillMainList " + page + "," + size + ",''", "h_p_QC_FirstPieceCheckBillMainList");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_FirstPieceCheckBillMainList " + page + "," + size + ",'" + sWhere + "'", "h_p_QC_FirstPieceCheckBillMainList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ res.code = CodeConstant.SUCCEED;
+ res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ res.Message = "Sucess锛�";
+ res.list = columnNameList;
+ res.data = ds.Tables[0];
+ return res;
+ }
+ catch (Exception e)
+ {
+ res.code = CodeConstant.FAIL;
+ res.count = CountConstant.FAIL;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
+ return res;
+ }
+ }
+ #endregion
+
#region 棣栦欢妫�楠屽崟缂栬緫鑾峰彇鏁版嵁
[Route("QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit")]
[HttpGet]
@@ -136,7 +202,7 @@
List<object> columnNameList = new List<object>();
string sql1 = "select * from h_v_QC_FirstPieceCheckBill_Edit where 1 = 1 ";
- string sql = sql1 + sWhere + " order by hmainid desc";
+ string sql = sql1 + sWhere + " order by hmainid desc,hsubid asc";
ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBill_Edit");
//娣诲姞鍒楀悕
@@ -212,6 +278,9 @@
msg2 = "[" + msg2.ToString() + "]";
List<Model.ClsQC_FirstPieceCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillMain>>(msg2);
DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill();
+
+
+
//鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
string s = "";
int sYear = 0;
@@ -242,6 +311,7 @@
BillNew.omodel.HProcExchEntryID = ClsPub.isLong(mainList[0].HProcExchEntryID);
BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
+ BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID);
BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
BillNew.omodel.HLastResult = ClsPub.isBool(mainList[0].HLastResult);
@@ -256,6 +326,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 = mainList[0].HRemarkSN;
List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3);
BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>();
for (int i = 0; i < subList.ToArray().Length; i++)
@@ -302,6 +373,13 @@
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.HQualityStdID = DBUtility.ClsPub.isLong(subList[i].HQualityStdID);//
+ oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);//
+ oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);//
+ oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);//
+
+
BillNew.DetailColl.Add(oSub);
}
else
@@ -313,7 +391,11 @@
return objJsonResult;
}
}
-
+
+
+
+
+
//淇濆瓨瀹屾瘯鍚庡鐞�
if (OperationType.Equals("1") || OperationType.Equals("2"))
{
@@ -321,6 +403,24 @@
}
else
{
+ if (BillOld.ShowBill(mainList[0].HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
bResult = BillNew.ModifyBill(BillNew.omodel.HInterID, ref ClsPub.sExeReturnInfo);
}
//鎻愮ず
@@ -328,7 +428,6 @@
{
objJsonResult.code = "1";
objJsonResult.count = 1;
- //objJsonResult.Message = "鍗曟嵁瀛樼洏瀹屾瘯!鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim();
objJsonResult.Message = ClsPub.sExeReturnInfo+"鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim();
objJsonResult.data = null;
return objJsonResult;
@@ -431,7 +530,7 @@
}
#endregion
-
+ #region 杩斿洖妫�楠屽�煎垪琛�
/// <summary>
///杩斿洖妫�楠屽�煎垪琛�
/// </summary>
@@ -486,6 +585,7 @@
return objJsonResult;
}
}
+ #endregion
#region 棣栦欢妫�楠屽崟缁存姢 瀹℃牳 鍙嶅鏍� 鍏抽棴 鍙嶅叧闂� 浣滃簾 鍙嶄綔搴�
/// <summary>
@@ -702,52 +802,49 @@
objJsonResult.data = null;
return objJsonResult;
}
-
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
ClsPub.CurUserName = user;
- BillOld.MvarItemKey = "QC_FirstPieceCheckBillMain";
- oCN.BeginTran();//寮�濮嬩簨鍔�
+ DAL.ClsQC_FirstPieceCheckBill oBill = new DAL.ClsQC_FirstPieceCheckBill();
- //Type 1 鍏抽棴 2 鍙嶅叧闂�
- if (Type == 1)
+ BillOld.MvarItemKey = "QC_FirstPieceCheckBillMain";
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
{
- //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴
- DataSet ds;
- string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ if (oBill.omodel.HDeleteMan.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴锛�";
objJsonResult.data = null;
return objJsonResult;
}
- if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ if (oBill.omodel.HChecker.Trim() == "")
{
- if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (Type == 1) //鍏抽棴鍒ゆ柇
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴锛�";
objJsonResult.data = null;
return objJsonResult;
}
-
-
- if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ }
+ if (Type == 2) //鍙嶅叧闂垽鏂�
+ {
+ if (oBill.omodel.HCloseMan.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴!";
- objJsonResult.data = null;
- return objJsonResult;
- }
- //鍏抽棴鍗曟嵁
- if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸弽鍏抽棴锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -755,48 +852,101 @@
}
else
{
- //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂�
- DataSet ds;
- string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
- if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
- {
- if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸啀鍙嶅叧闂�!";
- objJsonResult.data = null;
- return objJsonResult;
- }
- //鍙嶅叧闂崟鎹�
- if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
}
- oCN.Commit();//鎻愪氦浜嬪姟
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎵ц鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult; ;
+ //杩涜闇�瑕佽繘琛岀殑鍏抽棴/鍙嶅叧闂搷浣�
+ if (Type == 1) //鍏抽棴鎻愪氦
+ {
+ //鍏抽棴鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_QC_FirstPieceCheckBill_BeforeCloseCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_QC_FirstPieceCheckBill_BeforeCloseCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:鍏抽棴鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //鍏抽棴鎻愪氦
+ if (oBill.CloseBill(lngBillKey, oBill.omodel.HBillNo, "h_p_QC_FirstPieceCheckBill_AfterCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (Type == 2) //鍙嶅叧闂彁浜�
+ {
+ //鍙嶅叧闂墠鎺у埗=========================================
+ string sql1 = "exec h_p_QC_FirstPieceCheckBill_BeforeUnCloseCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_QC_FirstPieceCheckBill_BeforeUnCloseCtrl ");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:鍙嶅叧闂墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+
+ //鍙嶅叧闂彁浜�
+ if (oBill.CancelClose(lngBillKey, oBill.omodel.HBillNo, "h_p_QC_FirstPieceCheckBill_AfterUnCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ return objJsonResult;
}
catch (Exception e)
@@ -946,9 +1096,7 @@
}
#endregion
-
-
-
+ # region 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘
/// <summary>
/// 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘
/// </summary>
@@ -979,11 +1127,30 @@
return objJsonResult;
}
+ var s = "";
+ if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙垹闄�
+ if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
//寮�濮嬩簨鐗�
oCN.BeginTran();
- var ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
+ var ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
+
//鍒犻櫎鍓嶆帶鍒�
DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_QC_FirstPieceCheckBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_QC_FirstPieceCheckBill_BeforeDelCtrl");
if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
@@ -1053,6 +1220,7 @@
return objJsonResult;
}
}
+ #endregion
#region 棣栦欢妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忚繘绔欏崟
[Route("QC_FirstPieceCheckBill/get_StationInBill")]
@@ -1110,10 +1278,10 @@
}
#endregion
- #region 棣栦欢/宸ュ簭 妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忔祦杞崱
- [Route("CheckBill/get_ProcessExchangeBill")]
+ #region 棣栦欢妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忚繘绔欏崟 閫氳繃鍗曟嵁鍙疯幏鍙�
+ [Route("QC_FirstPieceCheckBill/get_StationInBill_ByHBillNo")]
[HttpGet]
- public object get_ProcessExchangeBill(string HInterID, string user)
+ public object get_StationInBill_ByHBillNo(string HBillNo, string user)
{
try
{
@@ -1126,13 +1294,125 @@
switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
{
case "宸ュ簭":
- sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'宸ュ簭','" + HInterID + "'";
+ sql = "exec h_p_QC_FirstPiece_GetStationInBillList_ByHBillNo " + "'宸ュ簭','" + HBillNo + "'";
break;
case "鐗╂枡":
- sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'鐗╂枡','" + HInterID + "'";
+ sql = "exec h_p_QC_FirstPiece_GetStationInBillList_ByHBillNo " + "'鐗╂枡','" + HBillNo + "'";
break;
case "宸ヨ壓璺嚎":
- sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'宸ヨ壓璺嚎','" + HInterID + "'";
+ sql = "exec h_p_QC_FirstPiece_GetStationInBillList_ByHBillNo " + "'宸ヨ壓璺嚎','" + HBillNo + "'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetStationInBillList");
+
+ //娣诲姞鍒楀悕
+ 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 = "Sucess锛�";
+ 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 棣栦欢/宸ュ簭 妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忔祦杞崱
+ [Route("CheckBill/get_ProcessExchangeBill")]
+ [HttpGet]
+ public object get_ProcessExchangeBill(string HInterID, string HEntryID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
+ {
+ case "宸ュ簭":
+ sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'宸ュ簭','" + HInterID + "','" + HEntryID + "'";
+ break;
+ case "鐗╂枡":
+ sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'鐗╂枡','" + HInterID + "','" + HEntryID + "'";
+ break;
+ case "宸ヨ壓璺嚎":
+ sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList " + "'宸ヨ壓璺嚎','" + HInterID + "','" + HEntryID + "'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetProcessExchangeBillList");
+
+ //娣诲姞鍒楀悕
+ 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 = "Sucess锛�";
+ 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 棣栦欢/宸ュ簭 妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忔祦杞崱 鏍规嵁鍗曟嵁鍙锋煡璇�
+ [Route("CheckBill/get_ProcessExchangeBill_ByBillNo")]
+ [HttpGet]
+ public object get_ProcessExchangeBill_ByBillNo(string HBillNo, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
+ {
+ case "宸ュ簭":
+ sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList_ByBillNo " + "'宸ュ簭','" + HBillNo + "'";
+ break;
+ case "鐗╂枡":
+ sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList_ByBillNo " + "'鐗╂枡','" + HBillNo + "'";
+ break;
+ case "宸ヨ壓璺嚎":
+ sql = "exec h_p_QC_FirstPiece_GetProcessExchangeBillList_ByBillNo " + "'宸ヨ壓璺嚎','" + HBillNo + "'";
break;
}
@@ -1276,5 +1556,164 @@
}
#endregion
+ #region 棣栦欢妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓虹敓浜ц鍗�
+ [Route("QC_FirstPieceCheckBill/get_ICMOBill")]
+ [HttpGet]
+ public object get_ICMOBill(string HICMOInterID, string HICMOEntryID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_FirstPiece_GetICMOBillList " + "'鐗╂枡','" + HICMOInterID + "','" + HICMOEntryID + "'";
+ break;
+ case "宸ヨ壓璺嚎":
+ sql = "exec h_p_QC_FirstPiece_GetICMOBillList " + "'宸ヨ壓璺嚎','" + HICMOInterID + "','" + HICMOEntryID + "'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetICMOBillList");
+
+ //娣诲姞鍒楀悕
+ 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 = "Sucess锛�";
+ 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 棣栦欢妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓虹敓浜ц鍗� 閫氳繃鍗曟嵁鍙峰甫鍑�
+ [Route("QC_FirstPieceCheckBill/get_ICMOBill_ByBillNo")]
+ [HttpGet]
+ public object get_ICMOBill_ByBillNo(string HBillNo, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_FirstPiece_GetICMOBillList_ByBillNo " + "'鐗╂枡','" + HBillNo + "'";
+ break;
+ case "宸ヨ壓璺嚎":
+ sql = "exec h_p_QC_FirstPiece_GetICMOBillList_ByBillNo " + "'宸ヨ壓璺嚎','" + HBillNo + "'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetICMOBillList_ByBillNo");
+
+ //娣诲姞鍒楀悕
+ 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 = "Sucess锛�";
+ 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 宸℃妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓虹敓浜ц鍗�
+ [Route("QC_PatrolProcCheckBill/get_ICMOBill")]
+ [HttpGet]
+ public object get_ICMOBill_PatrolProcCheck(string HICMOInterID, string HICMOEntryID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sReturn = "";
+ string sql = "";
+ if (oSystemParameter.ShowBill(ref sReturn))
+ {
+ switch (oSystemParameter.omodel.QC_PatrolProcCheckBill_QCSchemeSource)
+ {
+ case "鐗╂枡":
+ sql = "exec h_p_QC_PatrolProcCheck_GetICMOBillList " + "'鐗╂枡','" + HICMOInterID + "','" + HICMOEntryID + "'";
+ break;
+ case "宸ヨ壓璺嚎":
+ sql = "exec h_p_QC_PatrolProcCheck_GetICMOBillList " + "'宸ヨ壓璺嚎','" + HICMOInterID + "','" + HICMOEntryID + "'";
+ break;
+ }
+
+ }
+
+ ds = oCN.RunProcReturn(sql, "h_p_QC_PatrolProcCheck_GetICMOBillList");
+
+ //娣诲姞鍒楀悕
+ 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 = "Sucess锛�";
+ 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