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/LMESController.cs | 167 ++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 139 insertions(+), 28 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index b2e69ba..08cc8c6 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -3039,13 +3039,12 @@
ds = null;
}
return CustomCorrect(ds);
- //return ds.Tables[0].Rows;
}
//澧ㄨタ鍝ョ櫧鏍囩敓鎴�
[Route("LEMS/SaveCirculationCard_Json_MXG")]
[HttpGet]
- public object SaveCirculationCard_Json_MXG(string HBillNo, string HInterID, string HBillNo2, string HBarCode,string HNumber, string HName, string HModel)
+ public object SaveCirculationCard_Json_MXG(string HBillNo, string HInterID, string HBillNo2, string HBarCode,string HNumber, string HName, string HModel,string NBXMH, string HOrgID)
{
DataSet ds;
try
@@ -3055,7 +3054,7 @@
{
HBarCode = " ";
}
- ds = oCN.RunProcReturn("exec Save_Sc_ProcessExchangeBillMainToTmp_MXG '" + HBillNo + "','" + HInterID + "','" + HBillNo2 + "','" + HBarCode + "','" + HNumber + "','" + HName + "','" + HModel + "'", "Save_Sc_ProcessExchangeBillMainToTmp_MXG");
+ ds = oCN.RunProcReturn("exec Save_Sc_ProcessExchangeBillMainToTmp_MXG '" + HBillNo + "','" + HInterID + "','" + HBillNo2 + "','" + HBarCode + "','" + HNumber + "','" + HName + "','" + HModel + "','" + NBXMH + "','" + HOrgID + "'", "Save_Sc_ProcessExchangeBillMainToTmp_MXG");
}
catch (Exception e)
@@ -3193,7 +3192,6 @@
ds = null;
}
return CustomCorrect(ds);
- //return ds.Tables[0].Rows;
}
#endregion
@@ -3252,9 +3250,7 @@
ds = null;
}
return CustomCorrect(ds);
- //return ds.Tables[0].Rows;
}
-
#endregion
@@ -3305,7 +3301,7 @@
[Route("LEMS/SaveToSc_PackUnionBillMain_MXG")]
[HttpGet]
- public object SaveToSc_PackUnionBillMain(string HBillNo, string HRemark, string HProjectNum, string zxQty, string BBM, string LDM, string HMaterNumber, string HBarCode_White,string HOrgID)
+ public object SaveToSc_PackUnionBillMain_MXG(string HBillNo, string HRemark, string HProjectNum, string zxQty, string BBM, string LDM, string HMaterNumber, string HBarCode_White,string HOrgID,string NBXMH)
{
DataSet ds;
DataSet dsHSNum;
@@ -3316,7 +3312,7 @@
{
if (LDM != "鍏朵粬" && BBM != "鍏朵粬")
{
- ds = oCN.RunProcReturn($"exec h_p_MES_HBarCode_White_SMR_MXG {zxQty},'{BBM}','{HMaterNumber}','{HBillNo}'", "h_p_MES_HBarCode_White_SMR_MXG");
+ ds = oCN.RunProcReturn($"exec h_p_MES_HBarCode_White_SMR_MXG {zxQty},'{BBM}','{HMaterNumber}','{HBillNo}','{NBXMH}','{HOrgID}'", "h_p_MES_HBarCode_White_SMR_MXG");
HBarCode_White = ds.Tables[0].Rows[0]["HBarCode_White"].ToString();
}
}
@@ -3547,7 +3543,6 @@
ds = null;
}
return CustomCorrect(ds);
- //return ds.Tables[0].Rows;
}
#endregion
@@ -3645,7 +3640,6 @@
}
#endregion
-
#region 浜х嚎鍖呰鍗曞垪琛ㄦ煡璇�
@@ -3808,6 +3802,48 @@
#endregion
+ #region 鑾峰彇鐧芥爣椤圭洰鍙�
+
+ [Route("LEMS/GetHProject_MXG")]
+ [HttpGet]
+ public object GetHProject_MXG(string HOrgID)
+ {
+ DataSet ds;
+ DataSet dsHSNum;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ ds = oCN.RunProcReturn("select HInterID,HSupBarCodeNumber HName from Sc_PackUnionBillBarCode_temp where HUSEORGID='" + HOrgID + "'", "Sc_PackUnionBillBarCode_temp");
+
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ 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 鏍规嵁ID鍒犻櫎缂撳瓨琛ㄤ腑鎵爜璁板綍-浜х嚎鍖呰鍗�
@@ -3911,7 +3947,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "[0000-1-051]" + ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�";
+ objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -4370,7 +4406,7 @@
{
if (HBillSubType == "SUB")
{
- //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Sub_Check", 1, false, user))
{
objJsonResult.code = "0";
@@ -4552,28 +4588,55 @@
return objJsonResult;
}
}
- //鍙嶅鏍稿崟鎹�
- if (BillOld.AbandonCheck(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_RoutingBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
- {
- //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
- //DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl");
- ////if (DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["Hback"]) != 0)
- ////{
- //// objJsonResult.code = "0";
- //// objJsonResult.count = 1;
- //// objJsonResult.Message = "璇ヤ换鍔″崟宸蹭笅鎺ㄦ祦杞崱锛屼笉鍏佽鍙嶅鏍�" + DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HBackRemark"]);
- //// objJsonResult.data = null;
- //// return objJsonResult;
- ////}
- }
- else
+
+ string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+
+ oCN.RunProc(" Update Gy_RoutingBillMain set HChecker='',HCheckDate=null,HBillStatus=1 Where HInterID=" + HInterID.ToString());
+
+
+ string sql2 = "exec h_p_Gy_RoutingBill_AfterCheckCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql2, "h_p_Gy_RoutingBill_AfterUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
objJsonResult.data = null;
+ oCN.RollBack();
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;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿崟鎹�
+ // if (BillOld.AbandonCheck(HInterID, ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_RoutingBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+ //{
+ //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl");
+ ////if (DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["Hback"]) != 0)
+ ////{
+ //// objJsonResult.code = "0";
+ //// objJsonResult.count = 1;
+ //// objJsonResult.Message = "璇ヤ换鍔″崟宸蹭笅鎺ㄦ祦杞崱锛屼笉鍏佽鍙嶅鏍�" + DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HBackRemark"]);
+ //// objJsonResult.data = null;
+ //// return objJsonResult;
+ ////}
+ //}
+ // else
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 1;
+ // objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
}
oCN.Commit();//鎻愪氦浜嬪姟
@@ -4996,5 +5059,53 @@
}
}
#endregion
+
+ #region 澶氱骇瀹℃牳瀹℃牳鍒楄〃
+ [Route("LEMS/CheckFlowList")]
+ [HttpGet]
+ public json CheckFlowList(string sWhere, string billType, int type, string userid)
+ {
+ DataSet ds;
+ json res = new json();
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn($"exec h_p_Xt_CheckFlowList '','{billType}',{type},'{userid}'", "h_p_Xt_CheckFlowList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn($"exec h_p_Xt_CheckFlowList '{sWhere}','{billType}',{type},'{userid}'", "h_p_Xt_CheckFlowList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = 1;
+ 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
}
}
\ No newline at end of file
--
Gitblit v1.9.1