From 1a3d8206fbd346b8e5d3248486b358c832bce132 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 24 九月 2025 13:02:17 +0800
Subject: [PATCH] 斯莫尔钉钉同步:修改
---
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 271 +++++++++++++++++++++++++++++++----------------------
1 files changed, 157 insertions(+), 114 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 4885568..6d98f0a 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -15,6 +15,7 @@
{
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
DataSet ds;
#region 宸ュ簭鍗曞搧涓嶈壇閲囬泦 鐢ㄦ埛鏌ヨ鍏宠仈瀛楁
@@ -29,7 +30,7 @@
{
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-038]Sucess锛�";
objJsonResult.data = new DataTable();
return objJsonResult;
}
@@ -38,7 +39,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -46,7 +47,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -170,6 +171,7 @@
long HMainSourceEntryID = mainList[0].HICMOEntryID;
string HMainSourceBillNo = mainList[0].HICMOBillNo;
+ //鍒ゆ柇鐢熶骇璐ㄩ噺姹囨姤鍗曟槸鍚﹀瓨鍦�
ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain WITH(NOLOCK) where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Sc_QualityReportBillMain");
if (ds.Tables[0].Rows.Count != 0) {
objJsonResult.code = "0";
@@ -183,14 +185,31 @@
if (ds.Tables[0].Rows.Count == 0)//鏂板
{
- //涓昏〃
- oCN.RunProc(@"Insert Into Sc_QualityReportBillMain
-(HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate
-,HYear,HPeriod,HRemark,HMaker,HMakeDate
-,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
+ if (HResult== "寰憰鍝�")
+ {
+ //涓昏〃
+ oCN.RunProc(@"Insert Into Sc_QualityReportBillMain
+ (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate
+ ,HYear,HPeriod,HRemark,HMaker,HMakeDate
+ ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
+ values('3717','3717-1',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
+ "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
+ ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') ");
+ //閲嶆柊缁橦Result璧嬪��
+ HResult = "";
+ }
+ else
+ {
+ //涓昏〃
+ oCN.RunProc(@"Insert Into Sc_QualityReportBillMain
+ (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate
+ ,HYear,HPeriod,HRemark,HMaker,HMakeDate
+ ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
values('3717','3717',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
- "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
- ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') ");
+ "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
+ ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') ");
+ }
+
}
@@ -289,9 +308,11 @@
//淇敼鏉$爜琛ㄧ殑鐘舵��
oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'");
+ LogService.Write("绫诲瀷:" + oSub.HBadTypeID + ",鍒跺崟浜�:" + oSub.HMaker + ",鍒跺崟鏃ユ湡:" + oSub.HMakeDate);
//淇敼鍑虹珯鍗曠殑 涓嶈壇 鎶ュ簾鏁伴噺
- if (HResult == "涓嶈壇" && (oSub.HBadTypeID == 3 || oSub.HBadTypeID == 4 || oSub.HBadTypeID == 6))
+ if (HResult == "涓嶈壇")
{
+ LogService.Write("绫诲瀷:" + oSub.HBadTypeID);
//宸ュ簾
if (oSub.HBadTypeID == 3)
{
@@ -305,7 +326,6 @@
{
oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HBackWorkQty+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid);
}
-
}
else if (HResult == "鎶ュ簾")
{
@@ -332,7 +352,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -343,16 +363,33 @@
HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString();
}
- //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚︽槸寮�宸�
- ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp");
- if (ds.Tables[0].Rows.Count == 0)
+
+
+ //瀹㈡埛鍒跺畾
+ string sErr = "";
+ if (oSystemParameter.ShowBill(ref sErr))
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍗″彿:" + HBarCode + ",娴佽浆鍗℃湭寮�宸�!";
- objJsonResult.data = null;
- return objJsonResult;
+ if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�")
+ {
+
+ //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚︽槸寮�宸�
+ ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp");
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚﹀ⅷ瑗垮摜鐨�
+ ds = oCN.RunProcReturn("select HPRDORGID from Sc_ProcessExchangeBillMain with(nolock) where HBillNo = '" + HBarCode + "' ", "Sc_ProcessExchangeBillMain");
+ if (ds.Tables[0].Rows[0]["HPRDORGID"].ToString() != "7667152")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3791-2-018]鍗″彿:" + HBarCode + ",娴佽浆鍗℃湭寮�宸�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
}
+
ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomList '" + HBarCode + "'," + HProcID, "h_p_Gy_BarCodeBillBomList");
if (ds.Tables[0].Rows.Count == 0)
@@ -363,7 +400,7 @@
{
objJsonResult.code = "2";
objJsonResult.count = 2;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = dataSet.Tables[0];
return objJsonResult;
}
@@ -371,7 +408,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "閰嶄欢娓呭崟鏌ユ棤鏁版嵁锛�,鍙兘鏄綋鍓嶇敤鎴峰伐搴忎笉姝g‘鎴栬�呮祦杞崱杈撳叆閿欒!";
+ objJsonResult.Message = "[3791-2-019]閰嶄欢娓呭崟鏌ユ棤鏁版嵁锛�,鍙兘鏄綋鍓嶇敤鎴峰伐搴忎笉姝g‘鎴栬�呮祦杞崱杈撳叆閿欒!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -380,7 +417,7 @@
{
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds.Tables[0];
}
@@ -391,7 +428,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -420,7 +457,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犱繚瀛樻潈闄�!";
+ objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -430,10 +467,11 @@
List<Model.Sc_AssemblyBill_BindSourceTemp> tempList = new List<Model.Sc_AssemblyBill_BindSourceTemp>();
tempList = JsonConvert.DeserializeObject<List<Model.Sc_AssemblyBill_BindSourceTemp>>(msg1);
- if (tempList.Count == 0) {
+ if (msg1 != "[]" && tempList.Count == 0)
+ {
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犻厤浠舵暟鎹�!";
+ objJsonResult.Message = "[3791-2-026]鏃犻厤浠舵暟鎹�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -464,7 +502,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨鎴愬姛!";
+ objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛!";
objJsonResult.data = null;
return objJsonResult;
@@ -474,7 +512,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-051]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -500,7 +538,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犱繚瀛樻潈闄�!";
+ objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -514,13 +552,13 @@
List<Model.ClsSc_AssemblyBillSub> sub = new List<Model.ClsSc_AssemblyBillSub>();
sub = JsonConvert.DeserializeObject<List<Model.ClsSc_AssemblyBillSub>>(sSubStr);
-
+ //鏉$爜涓婇亾宸ュ簭鏄惁杩囩珯
ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
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;
}
@@ -528,11 +566,12 @@
{
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;
}
+ //鍒ゆ柇鏉$爜鏄惁宸茬粡鍑虹珯
ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 浜у搧鏉$爜='" + omodel.HBarCode_P + "' and HProcExchInterID="+ omodel .HProcExchInterID+ " and HProcExchEntryID="+ omodel.HProcExchEntryID + " and HProcID="+ omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
if (ds.Tables[0].Rows.Count > 0)
@@ -540,7 +579,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜:" + omodel.HBarCode_P + ",宸插瓨鍦�!";
+ objJsonResult.Message = "[0000-2-039]鏉$爜:" + omodel.HBarCode_P + ",宸插瓨鍦�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -559,7 +598,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "閰嶄欢浠g爜:" + HMaterNamePJ + ",鏁伴噺涓�0!";
+ objJsonResult.Message = "[3791-2-020]閰嶄欢浠g爜:" + HMaterNamePJ + ",鏁伴噺涓�0!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -675,11 +714,13 @@
int HTemporaryAreaID = 0;//鏆傛斁鍖�
int HShiftsID = 0;
+ //鑾峰彇褰撳墠鐝
DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo");
if (set.Tables[0].Rows.Count > 0)
{
HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString());
}
+ //鍒ゆ柇褰撳ぉ褰撳墠鐨勬祦杞崱鏄惁鏈夊嚭绔欏崟
ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain a WITH(NOLOCK) left join Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain");
if (ds.Tables[0].Rows.Count == 0)
@@ -732,7 +773,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍑虹珯鏁伴噺瓒呰繃娴佽浆鍗℃暟閲�!";
+ objJsonResult.Message = "[3791-2-028]鍑虹珯鏁伴噺瓒呰繃娴佽浆鍗℃暟閲�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -741,7 +782,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨鎴愬姛!";
+ objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛!";
objJsonResult.data = null;
return objJsonResult;
@@ -751,7 +792,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-051]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -808,7 +849,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -840,7 +881,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -855,7 +896,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜鏍煎紡涓嶆纭�!";
+ objJsonResult.Message = "[0000-2-036]鏉$爜鏍煎紡涓嶆纭�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -884,7 +925,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -904,7 +945,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -914,7 +955,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�";
+ objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -922,7 +963,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -931,7 +972,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -954,7 +995,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紝涓嶈兘鐢熸垚鏉$爜锛�";
+ objJsonResult.Message = "[0000-2-019]鏉″舰鐮佷笉鑳戒负绌猴紝涓嶈兘鐢熸垚鏉$爜锛�";
return objJsonResult;
}
@@ -1025,7 +1066,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1034,7 +1075,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1053,7 +1094,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1063,7 +1104,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "SN鐮佹煡鏃犳暟鎹紒";
+ objJsonResult.Message = "[3791-2-023]SN鐮佹煡鏃犳暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1072,7 +1113,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜鐨勭姸鎬佷负:"+ ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�";
+ objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1083,7 +1124,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "閰嶄欢鏉$爜鍒ゆ柇澶辫触锛�";
+ objJsonResult.Message = "[3791-2-024]閰嶄欢鏉$爜鍒ゆ柇澶辫触锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1091,14 +1132,14 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.isStrNull(dataSet.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.Message = "[0000-1-010]" + DBUtility.ClsPub.isStrNull(dataSet.Tables[0].Rows[0]["HBackRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -1107,7 +1148,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1126,7 +1167,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1134,13 +1175,14 @@
ds = oCN.RunProcReturn("select * from gy_czygl WITH(NOLOCK) where czymc='" + user + "'", "gy_czygl");
string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString();
+ //鏌ヨ娴佽浆鍗℃墍鏈夊伐搴忎俊鎭�
ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange WITH(NOLOCK) where 鏉$爜='" + HBarCode + "' ", "h_v_Gy_BarCodeBillHICOMProcessExchange");
if (ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�";
+ objJsonResult.Message = "[0000-1-045]鏉$爜鏌ユ棤鏁版嵁锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1156,7 +1198,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
+ objJsonResult.Message = "[3791-2-017]褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1164,14 +1206,14 @@
if (ds.Tables[0].Rows[0]["HStatus"].ToString() != "姝e父") {
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜鐘舵�佷负"+ ds.Tables[0].Rows[0]["HStatus"].ToString() + "!";
+ objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐘舵�佷负" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "!";
objJsonResult.data = null;
return objJsonResult;
}
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -1180,7 +1222,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1199,7 +1241,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1208,7 +1250,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds;
return objJsonResult;
}
@@ -1217,7 +1259,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1236,7 +1278,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1245,7 +1287,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -1254,7 +1296,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1273,7 +1315,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+ objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1284,7 +1326,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�";
objJsonResult.data = null;
}
string HProcExchInterID = ds.Tables[0].Rows[0]["HProcExchInterID"].ToString();
@@ -1317,7 +1359,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1326,7 +1368,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1345,7 +1387,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+ objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1358,7 +1400,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�";
objJsonResult.data = null;
}
@@ -1387,7 +1429,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1396,7 +1438,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1415,7 +1457,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1429,7 +1471,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�";
+ objJsonResult.Message = "[0000-2-020]鏉$爜鏌ユ棤鏁版嵁锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1446,7 +1488,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
+ objJsonResult.Message = "[3791-2-017]褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1455,7 +1497,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜鐘舵�佷负" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "!";
+ objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐘舵�佷负" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1463,7 +1505,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "";
+ objJsonResult.Message = "[0000-1-037]";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -1472,7 +1514,7 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1539,7 +1581,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1559,7 +1601,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -1568,7 +1610,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1595,7 +1637,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犱繚瀛樻潈闄�!";
+ objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1608,7 +1650,7 @@
Model.Sc_AssemblyBill_BindSourceTemp temp = new Model.Sc_AssemblyBill_BindSourceTemp();
temp = JsonConvert.DeserializeObject<Model.Sc_AssemblyBill_BindSourceTemp>(sSubStr);
-
+ //宸ュ簭杩斾慨璁板綍鍗� 閰嶄欢琛�
ds = oCN.RunProcReturn("select * from Sc_SourceLineRepairBillSub_Mater where HInterID=" + model.HInterID+ " order by HEntryID desc", "Sc_SourceLineRepairBillSub_Mater");
oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub_Mater
@@ -1622,7 +1664,7 @@
oCN.RunProc("update Sc_AssemblyBillSub set HBarCode='" + temp.HBarCode + "' where HInterID=" + temp.HInterID + " and HEntryID=" + temp.HEntryID);
//oCN.RunProc("exec h_p_AssemblyBill_Temp '" + temp.HProcExchBillNo + "'," + model.HProcess + "," + temp.HMaterID + ",'" + temp.HBatchNo + "'");
}
- else if (HResult == "NG"|| HResult == "OK") {
+ else if (HResult == "NG"|| HResult == "OK") {
Model.ClsSc_SourceLineRepairBillMain model = new Model.ClsSc_SourceLineRepairBillMain();
model = JsonConvert.DeserializeObject<Model.ClsSc_SourceLineRepairBillMain>(sMainStr);
@@ -1671,7 +1713,7 @@
if (dataSet.Tables[0].Rows.Count > 0)
{
string HOutInterID = dataSet.Tables[0].Rows[0][0].ToString();
- //鏂帿灏旂殑鎯呭喌 鍒� 宸ュ簾鏂欏簾 杩斿伐
+ //鏂帿灏旂殑鎯呭喌 鍒� 宸ュ簾 鏂欏簾 杩斿伐
//宸ュ簾
if (subLsit[0].HBadTypeID == 3)
{
@@ -1691,7 +1733,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨澶辫触,褰撳墠娴佽浆鍗″綋鍓嶅伐搴忕殑鍑虹珯鍗曟病鏈変笉鑹暟閲�!";
+ objJsonResult.Message = "[3748-2-005]淇濆瓨澶辫触,褰撳墠娴佽浆鍗″綋鍓嶅伐搴忕殑鍑虹珯鍗曟病鏈変笉鑹暟閲�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1701,7 +1743,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨澶辫触,鏃犵粨鏋滐紒";
+ objJsonResult.Message = "[0000-1-051]淇濆瓨澶辫触,鏃犵粨鏋滐紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1711,7 +1753,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-050]Sucess锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1720,7 +1762,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-051]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1739,7 +1781,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+ objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1749,7 +1791,7 @@
if (ds.Tables[0].Rows.Count == 0) {
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+ objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�";
objJsonResult.data = null;
}
@@ -1788,7 +1830,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-010]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1860,7 +1902,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1870,7 +1912,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
@@ -1878,7 +1920,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1948,7 +1990,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -1958,7 +2000,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1988,7 +2030,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -1998,7 +2040,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -2028,7 +2070,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -2038,7 +2080,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -2068,7 +2110,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -2077,7 +2119,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -2107,7 +2149,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -2117,7 +2159,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -2134,6 +2176,7 @@
List<object> columnNameList = new List<object>();
+ //鏌ヨ閰嶄欢娓呭崟淇℃伅
string sql = @"exec h_p_GZ_BarCodeBillList '" + HMaterNumber + "','" + HBatchNo + "','" + sWhere + "'";
ds = oCN.RunProcReturn(sql, "h_p_GZ_BarCodeBillList");
@@ -2147,7 +2190,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -2157,7 +2200,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -2187,7 +2230,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -2197,7 +2240,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
--
Gitblit v1.9.1