From 0a0d8bdfc13d6b780aa37b3b08e702fc96e6b892 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 29 四月 2025 16:28:42 +0800
Subject: [PATCH] 翻译
---
WebAPI/Controllers/LMESController.cs | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 262 insertions(+), 33 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index d7a837b..fd1247a 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -323,7 +323,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.Message = "[0000-1-045]娌℃湁杩斿洖浠讳綍璁板綍锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -331,7 +331,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.Message = "[0000-1-037]鑾峰彇淇℃伅鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -340,7 +340,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -371,7 +371,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.Message = "[0000-1-045]娌℃湁杩斿洖浠讳綍璁板綍锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -379,7 +379,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.Message = "[0000-1-050]鑾峰彇淇℃伅鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -669,6 +669,51 @@
//return ds.Tables[0].Rows;
}
+ //澧ㄨタ鍝ョ櫧鏍囨煡璇�
+ [Route("MES/MES_BarcodeWhiteLabelReport")]
+ [HttpGet]
+ public object MES_BarcodeWhiteLabelReport(string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("SELECT top 1000 * FROM h_v_MES_BarcodeWhiteLabelReport where 1=1 " + sWhere, "h_v_MES_BarcodeWhiteLabelReport");
+
+ }
+ catch (Exception e)
+ {
+ 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)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ HBarCode = " ";
+ }
+ ds = oCN.RunProcReturn("exec Save_Sc_ProcessExchangeBillMainToTmp_MXG '" + HBillNo + "','" + HInterID + "','" + HBillNo2 + "','" + HBarCode + "','" + HNumber + "','" + HName + "','" + HModel + "'", "Save_Sc_ProcessExchangeBillMainToTmp_MXG");
+
+ }
+ catch (Exception e)
+ {
+ ds = null;
+ }
+ return CustomCorrect(ds);
+ //return ds.Tables[0].Rows;
+ }
+
/// <summary>
/// 鎵瓙浠舵潯鐮佹柟娉曪紙浜х嚎鍖呰鍗曘�佷骇绾跨粍瑁呰拷婧崟锛�--鏍规嵁瀛愪欢鏉$爜淇濆瓨鍒皌emp琛�
///鍙傛暟锛歴tring sql銆�
@@ -693,14 +738,46 @@
ds1 = oCN.RunProcReturn("select * from KF_PonderationBillMain_Temp where HSourceBillNo = '" + SubBarcode + "' and HBillType = '" + HBillType + "'", "KF_PonderationBillMain_Temp");
if (ds1.Tables[0].Rows.Count > 0)
{
- return CustomError("璇ュ瓙浠舵潯鐮佸凡瀛樺湪");
+ return CustomError("[0000-2-039]璇ュ瓙浠舵潯鐮佸凡瀛樺湪");
}
if (HBarCode == null || HBarCode.Equals(""))
{
HBarCode = " ";
}
ds = oCN.RunProcReturn("exec h_p_Save_SubBarcodeToTmp '" + HBillNo + "','" + SubBarcode + "','" + HInterID + "','" + HBillNo2 + "','" + HBillType + "','" + sMaker + "','" + HBarCode + "','" + HNumber + "','" + HName + "','" + HModel + "'", "h_p_Save_SubBarcodeToTmp");
+ LogService.Write("ID:" + HInterID + ",娴佽浆鍗″彿:" + HBillNo + ",鍗曟嵁鍙�:" + HBillNo2 + ",鏉$爜:" + SubBarcode + ",鎵樻潯鐮�:" + HBarCode);
}
+
+ }
+ catch (Exception e)
+ {
+ ds = null;
+ }
+ return CustomCorrect(ds);
+ //return ds.Tables[0].Rows;
+ }
+
+
+ [Route("LEMS/SaveSubBarcode_Json_MXG")]
+ [HttpGet]
+ public object SaveSubBarcode_Json_MXG(string HBillNo, string SubBarcode, string HInterID, string HBillNo2,
+ string HBillType, string sMaker, string HBarCode, string HNumber, string HName, string HModel)
+ {
+ DataSet ds1;
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds1 = oCN.RunProcReturn("select * from KF_PonderationBillMain_Temp where HSourceBillNo = '" + SubBarcode + "' and HBillType = '" + HBillType + "'", "KF_PonderationBillMain_Temp");
+ if (ds1.Tables[0].Rows.Count > 0)
+ {
+ return CustomError("璇ュ瓙浠舵潯鐮佸凡瀛樺湪");
+ }
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ HBarCode = " ";
+ }
+ ds = oCN.RunProcReturn("exec h_p_Save_SubBarcodeToTmp '" + HBillNo + "','" + SubBarcode + "','" + HInterID + "','" + HBillNo2 + "','" + HBillType + "','" + sMaker + "','" + HBarCode + "','" + HNumber + "','" + HName + "','" + HModel + "'", "h_p_Save_SubBarcodeToTmp");
}
catch (Exception e)
@@ -811,14 +888,21 @@
/// </summary>
[Route("LEMS/SaveToSc_PackUnionBillMain")]
[HttpGet]
- public object SaveToSc_PackUnionBillMain(string HBillNo, string HRemark,string HProjectNum,string HBarCode_White)
+ public object SaveToSc_PackUnionBillMain(string HBillNo, string HRemark,string HProjectNum,string zxQty, string BBM, string LDM, string HMaterNumber)
{
DataSet ds;
DataSet dsHSNum;
try
{
- //椤圭洰鍙疯幏鍙栨祦姘村彿
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string HBarCode_White = "";
+ if (LDM != "鍏朵粬" && BBM != "鍏朵粬" )
+ {
+ ds = oCN.RunProcReturn($"exec h_p_MES_HBarCode_White_SMR {zxQty},'{BBM}','{HMaterNumber}','{HBillNo}'", "h_p_MES_HBarCode_White_SMR");
+ HBarCode_White = ds.Tables[0].Rows[0]["HBarCode_White"].ToString();
+ }
+
+ //椤圭洰鍙疯幏鍙栨祦姘村彿
dsHSNum = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HProjectNum + "'", "h_p_WMS_GetMaxNo");
oCN.RunProc("exec h_p_WMS_SetMaxNo '" + HProjectNum + "'");
int HSNum = ClsPub.isInt(dsHSNum.Tables[0].Rows[0][0]) + 1;
@@ -826,7 +910,7 @@
string HSNum2 = GetNewCodeByNum(HSNum,1,2);
if (HBillNo == null || HBillNo.Equals(""))
{
- return CustomError("娴佽浆鍗″彿涓嶈兘涓虹┖锛�");
+ return CustomError("[0000-1-057]娴佽浆鍗″彿涓嶈兘涓虹┖锛�");
}
else
{
@@ -837,13 +921,58 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "寮傚父锛�"+e.ToString();
+ objJsonResult.Message = "[0000-1-051]寮傚父锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
return CustomCorrect(ds);
//return ds.Tables[0].Rows;
}
+
+
+ [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)
+ {
+ DataSet ds;
+ DataSet dsHSNum;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //HBarCode_White = "";
+ //if (LDM != "鍏朵粬" && BBM != "鍏朵粬")
+ //{
+ // ds = oCN.RunProcReturn($"exec h_p_MES_HBarCode_White_SMR {zxQty},'{BBM}','{HMaterNumber}','{HBillNo}'", "h_p_MES_HBarCode_White_SMR");
+ // HBarCode_White = ds.Tables[0].Rows[0]["HBarCode_White"].ToString();
+ //}
+
+ //椤圭洰鍙疯幏鍙栨祦姘村彿
+ dsHSNum = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HProjectNum + "'", "h_p_WMS_GetMaxNo");
+ oCN.RunProc("exec h_p_WMS_SetMaxNo '" + HProjectNum + "'");
+ int HSNum = ClsPub.isInt(dsHSNum.Tables[0].Rows[0][0]) + 1;
+ //璋冪敤杩涘埗杞崲鏂规硶鎶婃祦姘村彿杞崲鎴愭祦姘村彿2
+ string HSNum2 = GetNewCodeByNum(HSNum, 1, 2);
+ if (HBillNo == null || HBillNo.Equals(""))
+ {
+ return CustomError("娴佽浆鍗″彿涓嶈兘涓虹┖锛�");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillMain_MXG '" + HBillNo + "','" + HRemark + "'," + HSNum + ",'" + HSNum2 + "','" + HBarCode_White + "'", "h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillMain_MXG");
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "寮傚父锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ return CustomCorrect(ds);
+ //return ds.Tables[0].Rows;
+ }
+
/// <summary>
/// 鎻愪氦-瀛愯〃鏂规硶锛堜骇绾垮寘瑁呭崟锛�--鏍规嵁瀛愪欢鏉$爜浠巘emp琛ㄤ繚瀛樺埌瀛愯〃
@@ -874,6 +1003,41 @@
}
return CustomCorrect(ds);
//return ds.Tables[0].Rows;
+ }
+
+ //鏇存柊娌℃湁鍙嶅啓鐨勬暟鎹�
+ [Route("LEMS/SaveToSc_PackUnionBillSub_Back")]
+ [HttpGet]
+ public object SaveToSc_PackUnionBillSub_Back(string HInterID, string HRemark)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ return CustomError("[0000-2-058]鏇存柊澶辫触HitemID涓虹┖锛�");
+ }
+ else
+ {
+ oCN.RunProc("exec h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillSub_Back '" + HInterID + "','" + HRemark + "'");
+ }
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-2-059]鏇存柊鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-2-058]" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
}
/// <summary>
@@ -1055,7 +1219,7 @@
+ HEndDate + "','" + HWorkLineName + "','" + HBarCodeDate + "','" + HSTOCKORGID + "'," + HOWNERID + ",'"
+ HSeOrderBillNo + "','" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "','" + HAuxPropID + "','" + HMTONo + "')"
);
- ds = oCn.RunProcReturn("select HBarCode from Gy_BarCodeBill where HSourceBillNo = '" + sHBarcodeNo + "' order by HMakeDate desc", "Gy_BarCodeBill");
+ ds = oCn.RunProcReturn("select top 10 HBarCode from Gy_BarCodeBill where HSourceBillNo = '" + sHBarcodeNo + "' order by HMakeDate desc", "Gy_BarCodeBill");
}
catch (Exception e)
{
@@ -1115,7 +1279,7 @@
oCN.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID = " + HInterID);
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.Message = "[0000-1-008]鍒犻櫎鎴愬姛锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1123,7 +1287,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.Message = "[0000-1-007]鍒犻櫎澶辫触锛�";
objJsonResult.data = e.ToString();
return objJsonResult;
}
@@ -1241,7 +1405,7 @@
oCn.RunProc("Delete TOP(1) from KF_PonderationBillMain_Temp where HInterID = " + sHInterID + " and HSourceBillNo = '" + HSourceBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo);
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.Message = "[0000-1-008]鍒犻櫎鎴愬姛锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1249,7 +1413,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.Message = "[0000-1-007]鍒犻櫎澶辫触锛�";
objJsonResult.data = e.ToString();
return objJsonResult;
}
@@ -1280,7 +1444,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜鐨勭姸鎬佷负:"+ ds.Tables[0].Rows[0]["HReasult"].ToString() + "锛�";
+ objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HReasult"].ToString() + "锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1297,7 +1461,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "寮傚父锛�";
+ objJsonResult.Message = "[0000-1-010]寮傚父锛�";
objJsonResult.data = e.ToString();
return objJsonResult;
}
@@ -1306,28 +1470,28 @@
//鍒ゆ柇鏉$爜涔嬪墠鐨勫伐搴忔槸鍚﹀嚭绔�
[Route("LEMS/SNBarcodeProcCtrl")]
[HttpGet]
- public object SNBarcodeProcCtrl(string SubBarcode,string HProcExchBillNo)
+ public object SNBarcodeProcCtrl(string SubBarcode,string HProcExchBillNo,string HMixedBox, string HBillNo)
{
DataSet ds;
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- ds = oCN.RunProcReturn(" select * from Gy_BarCodeBill where HSourceBillNo='" + HProcExchBillNo + "' and HBarCode='" + SubBarcode + "'", "Gy_BarCodeBill");
- if (ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏌ユ棤鏁版嵁,鏉$爜:" + SubBarcode + "涓嶅睘浜庡綋鍓嶆祦杞崱:" + HProcExchBillNo + "!";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //ds = oCN.RunProcReturn(" select * from Gy_BarCodeBill where HSourceBillNo='" + HProcExchBillNo + "' and HBarCode='" + SubBarcode + "'", "Gy_BarCodeBill");
+ //if (ds.Tables[0].Rows.Count == 0)
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏌ユ棤鏁版嵁,鏉$爜:" + SubBarcode + "涓嶅睘浜庡綋鍓嶆祦杞崱:" + HProcExchBillNo + "!";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
ds = oCN.RunProcReturn(@"exec h_p_Sc_SNBarcodeProcCtrl '" + SubBarcode + "'", "h_p_Sc_SNBarcodeProcCtrl");
if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏌ユ棤鏁版嵁!";
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1335,8 +1499,74 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�";
+ objJsonResult.Message = "[0000-1-051]"+ ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�";
objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn(@"exec h_p_Sc_SNBarcodeMixedBox '" + SubBarcode + "','" + HProcExchBillNo + "','"+ HMixedBox + "','"+ HBillNo + "'", "h_p_Sc_SNBarcodeMixedBox");
+
+ if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "2")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-051]" + ds.Tables[0].Rows[0]["HBackRemark"].ToString();
+ return objJsonResult;
+ }
+ else {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = null;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-010]寮傚父锛�";
+ objJsonResult.data = e.ToString();
+ return objJsonResult;
+ }
+ }
+
+
+ //09椤圭洰鍒ゆ柇閰嶄欢鏉$爜 妯″叿绌村彿鏄惁鍖归厤
+ [Route("LEMS/h_p_CJ_SNBarCodeBillMouldBathSelect")]
+ [HttpGet]
+ public object h_p_CJ_SNBarCodeBillMouldBathSelect(string SubBarcode, string HProcExchBillNo, string HBillType)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ ds = oCN.RunProcReturn(@"exec h_p_CJ_SNBarCodeBillMouldBathSelect '" + SubBarcode + "','" + HProcExchBillNo + "','" + HBillType + "'", "h_p_Sc_SNBarcodeMixedBox");
+
+ if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "2")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-051]" + ds.Tables[0].Rows[0]["HBackRemark"].ToString();
return objJsonResult;
}
else
@@ -1352,12 +1582,11 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "寮傚父锛�";
+ objJsonResult.Message = "[0000-1-010]寮傚父锛�";
objJsonResult.data = e.ToString();
return objJsonResult;
}
}
-
//鍒ゆ柇鎬荤殑鍖呰鏁伴噺鏄惁瓒呰繃娴佽浆鍗℃暟閲�
[Route("LEMS/h_p_Sc_ProductionLinePackaging_Checkqty")]
@@ -1381,7 +1610,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = Convert.ToString(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.Message = "[0000-1-051]" + Convert.ToString(ds.Tables[0].Rows[0]["HBackRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
@@ -1390,7 +1619,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "寮傚父锛�";
+ objJsonResult.Message = "[0000-1-010]寮傚父锛�";
objJsonResult.data = e.ToString();
return objJsonResult;
}
--
Gitblit v1.9.1