From 53f3d3031a40a881b00398fc166703e7000965c2 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 05 九月 2025 16:14:11 +0800
Subject: [PATCH] 增加白标基础信息配置表方法,增加条码拆码方法,物料表增加字段HBarCodePrintName
---
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 255 ++++++++++++++++++++++++++++++++++++--------------
1 files changed, 182 insertions(+), 73 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 6d98f0a..e4ae986 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -553,7 +553,7 @@
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");
+ ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_p_Sc_SNBarcodeProcCtrl_S");
if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
{
objJsonResult.code = "0";
@@ -611,26 +611,44 @@
{
Int64 HInterID1 = DBUtility.ClsPub.CreateBillID("3727", ref DBUtility.ClsPub.sExeReturnInfo);
string HBillNo1 = DBUtility.ClsPub.CreateBillCode("3727", ref DBUtility.ClsPub.sExeReturnInfo, true);
- //淇濆瓨鐢熶骇缁勮鍗曚富琛�
- string sql = $@"Insert Into Sc_AssemblyBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate
-,HBillNo,HBillStatus,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo
-,HICMOInterID,HICMOBillNo,HBarCode_P,HMaterID,HUnitID,HAssemblyStatus,HProdOrgID)
-values('{DateTime.Now.Year}','{DateTime.Now.Month}','3727','3727',{HInterID1},getdate()
-,'{HBillNo1}','1','{user}',getdate(),{omodel.HProcExchInterID.ToString()},{omodel.HProcExchEntryID.ToString()},'{omodel.HProcExchBillNo.ToString()}'
-,{omodel.HICMOInterID.ToString()},'{omodel.HICMOBillNo.ToString()}','{omodel.HBarCode_P.ToString()}',{omodel.HMaterID},0,'姹囨姤',{omodel.HProdOrgID})";
+ string prefix = omodel.HBarCode_P.Substring(0, 10); // 浠庣储寮�0寮�濮嬶紝鎴彇10涓瓧绗� 鍒ゆ柇姣忎釜椤圭洰鐨凮鏄熷湀閰嶄欢鏁伴噺
+
+ //淇濆瓨鐢熶骇缁勮鍗曚富琛�
+ string sql = $@"Insert Into Sc_AssemblyBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate
+ ,HBillNo,HBillStatus,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo
+ ,HICMOInterID,HICMOBillNo,HBarCode_P,HMaterID,HUnitID,HAssemblyStatus,HProdOrgID)
+ values('{DateTime.Now.Year}','{DateTime.Now.Month}','3727','3727',{HInterID1},getdate()
+ ,'{HBillNo1}','1','{user}',getdate(),{omodel.HProcExchInterID.ToString()},{omodel.HProcExchEntryID.ToString()},'{omodel.HProcExchBillNo.ToString()}'
+ ,{omodel.HICMOInterID.ToString()},'{omodel.HICMOBillNo.ToString()}','{omodel.HBarCode_P.ToString()}',{omodel.HMaterID},0,'姹囨姤',{omodel.HProdOrgID})";
oCN.RunProc(sql);
-
- for (int i = 0; i < sub.Count; i++)
- {
- //瀛愯〃瀛樺偍
- string sq2 = $@"Insert Into Sc_AssemblyBillSub(HInterID,HBillNo_bak,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo
-,HSourceBillType,HMaterID,HSourceID,HEquipID,HUnitID,HQty
-,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_P,HSNNumber)
-values({HInterID1},'{HBillNo1}',{(i + 1)},0,0,''
-,'',{sub[i].HMaterID},0,0,0,1
-,0,0,getdate(),'{sub[i].HBarCode}','{omodel.HBarCode_P}','') ";
- oCN.RunProc(sq2);
+ if (prefix == "#0TE911124") {
+ for (int i = 0; i < sub.Count; i++)
+ {
+ //瀛愯〃瀛樺偍
+ string sq2 = $@"Insert Into Sc_AssemblyBillSub(HInterID,HBillNo_bak,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo
+ ,HSourceBillType,HMaterID,HSourceID,HEquipID,HUnitID,HQty
+ ,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_P,HSNNumber)
+ values({HInterID1},'{HBillNo1}',{(i + 1)},0,0,''
+ ,'',{sub[i].HMaterID},0,0,0,3
+ ,0,0,getdate(),'{sub[i].HBarCode}','{omodel.HBarCode_P}','') ";
+ oCN.RunProc(sq2);
+ }
}
+ else
+ {
+ for (int i = 0; i < sub.Count; i++)
+ {
+ //瀛愯〃瀛樺偍
+ string sq2 = $@"Insert Into Sc_AssemblyBillSub(HInterID,HBillNo_bak,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo
+ ,HSourceBillType,HMaterID,HSourceID,HEquipID,HUnitID,HQty
+ ,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_P,HSNNumber)
+ values({HInterID1},'{HBillNo1}',{(i + 1)},0,0,''
+ ,'',{sub[i].HMaterID},0,0,0,1
+ ,0,0,getdate(),'{sub[i].HBarCode}','{omodel.HBarCode_P}','') ";
+ oCN.RunProc(sq2);
+ }
+ }
+
}
}
@@ -755,7 +773,7 @@
ds = oCN.RunProcReturn("select * from Sc_StationOutBillSub_SN WITH(NOLOCK) where HInterID='" + omodel.HInterID + "' order by HEntryID desc", "Sc_StationOutBillSub_SN");
oCN.RunProc($@"insert into Sc_StationOutBillSub_SN(HInterID,HBillNo_bak,HEntryID,HBarCode,HBarCodeQty,HMakeTime,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney)
-values({HInterID}, '{HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{omodel.HBarCode_P}', 1, GETDATE(), '', " + HProcExchInterID + ","+ HProcExchEntryID + ", '"+ HProcExchBillNo + "', '', 0, 0)");
+ values({HInterID}, '{HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{omodel.HBarCode_P}', 1, GETDATE(), '', " + HProcExchInterID + ","+ HProcExchEntryID + ", '"+ HProcExchBillNo + "', '', 0, 0)");
//鎶婃潯鐮佸啓鍏ユ棩蹇楅噷闈�
LogService.CustomWriteLog("鏉$爜:" + omodel.HBarCode_P + ",宸ュ簭:"+ HProcID + ",鍑虹珯鏃堕棿:" + DateTime.Now, "TM" + DateTime.Now.ToString("yyyy-MM-dd"));
@@ -765,9 +783,9 @@
ds = oCN.RunProcReturn($@"select (b.HQty -sum(isnull(ou.HQty,0))-sum(isnull(ou.HBadCount,0))) HQty from Sc_ProcessExchangeBillSub b WITH(NOLOCK)
-left join Sc_StationOutBillMain ou WITH(NOLOCK) on b.HInterID=ou.HProcExchInterID and b.HEntryID=ou.HProcExchEntryID
-where b.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
-group by b.HInterID,b.HEntryID,b.HQty", "Sc_ProcessExchangeBill_Out");
+ left join Sc_StationOutBillMain ou WITH(NOLOCK) on b.HInterID=ou.HProcExchInterID and b.HEntryID=ou.HProcExchEntryID
+ where b.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
+ group by b.HInterID,b.HEntryID,b.HQty", "Sc_ProcessExchangeBill_Out");
if (double.Parse(ds.Tables[0].Rows[0][0].ToString()) < 0) {
oCN.RollBack();
@@ -806,6 +824,7 @@
{
try
{
+ string str1 = "";
ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill");
//鍒ゆ柇鏉$爜鏄惁瀛樺湪鏉$爜妗f
@@ -829,21 +848,21 @@
//鍒ゆ柇闀垮害鏄惁涓�29浣� 鏃犲皹杞﹂棿
if (HBarCode.Length == 29)
{
- string str1 = HBarCode.Substring(18, 8);
+ str1 = HBarCode.Substring(18, 8);
DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
if (dataSet.Tables[0].Rows.Count == 0)
{
str1 = HBarCode.Substring(23, 3);
dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
if (dataSet.Tables[0].Rows.Count == 0)
{
@@ -867,30 +886,61 @@
return get_HBardBillSave(HProcExchBillNo, HBarCode);
}
}
- //鍒ゆ柇闀垮害鏄惁涓�50浣� 15杞﹂棿
+ //鍒ゆ柇闀垮害鏄惁涓�50浣� 15杞﹂棿 鍜� O6椤圭洰
else if (HBarCode.Length == 50)
{
- string str1 = HBarCode.Substring(42, 8);
-
- DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
-
- if (dataSet.Tables[0].Rows.Count == 0)
+ string prefix = HBarCode.Substring(0, 10); // 浠庣储寮�0寮�濮嬶紝鎴彇10涓瓧绗�
+ if (prefix == "#0TE911124")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
- objJsonResult.data = null;
- return objJsonResult;
+ str1 = HBarCode.Substring(41, 3);
+ LogService.Write($"鏉$爜鍓嶇紑" + str1);
+
+ DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+
+ if (dataSet.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ ClsPub.CurUserName = user;
+ //鏉$爜鐢熸垚
+ return get_HBardBillSave(HProcExchBillNo, HBarCode);
+ }
}
else
{
- ClsPub.CurUserName = user;
- //鏉$爜鐢熸垚
- return get_HBardBillSave(HProcExchBillNo, HBarCode);
+
+ str1 = HBarCode.Substring(42, 8);
+ LogService.Write($"鏉$爜鍓嶇紑1.1" + str1);
+ DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+
+ if (dataSet.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ ClsPub.CurUserName = user;
+ //鏉$爜鐢熸垚
+ return get_HBardBillSave(HProcExchBillNo, HBarCode);
+ }
}
+
}
else
{
@@ -901,25 +951,26 @@
return objJsonResult;
}
}
- else {
+ else
+ {
//鍒ゆ柇闀垮害鏄惁涓�29浣� 鏃犲皹杞﹂棿
if (HBarCode.Length == 29)
{
- string str1 = HBarCode.Substring(18, 8);
+ str1 = HBarCode.Substring(18, 8);
DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
if (dataSet.Tables[0].Rows.Count == 0)
{
str1 = HBarCode.Substring(23, 3);
dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
if (dataSet.Tables[0].Rows.Count == 0)
{
@@ -931,24 +982,47 @@
}
}
}
- //鍒ゆ柇闀垮害鏄惁涓�50浣� 15杞﹂棿
+ //鍒ゆ柇闀垮害鏄惁涓�50浣� 15杞﹂棿 鍜� O6椤圭洰
else if (HBarCode.Length == 50)
{
- string str1 = HBarCode.Substring(42, 8);
-
- DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
-
- if (dataSet.Tables[0].Rows.Count == 0)
+ string prefix = HBarCode.Substring(0, 10); // 浠庣储寮�0寮�濮嬶紝鎴彇10涓瓧绗�
+ if (prefix == "#0TE911124")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
- objJsonResult.data = null;
- return objJsonResult;
+ str1 = HBarCode.Substring(41, 3);
+ LogService.Write($"鏉$爜鍓嶇紑" + str1);
+ DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+
+ if (dataSet.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else
+ {
+ str1 = HBarCode.Substring(42, 8);
+
+ DataSet dataSet = oCN.RunProcReturn(@"select m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+
+ if (dataSet.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
}
if (ds.Tables[0].Rows[0]["HStatus"].ToString() != "")
@@ -983,10 +1057,10 @@
{
//鏌ヨ娴佽浆鍗℃暟鎹�
DataSet dataSet = oCN.RunProcReturn(@"select a.HPRDORGID, m.HModel 鐗╂枡瑙勬牸,m.HName 鍚嶇墿鏂欑О,a.HBillNo,a.HInterID,a.HMaterID,m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜,a.HUnitID,u.HNumber 鍗曚綅浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
-left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
-left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
-left join Gy_Unit u WITH(NOLOCK) on a.HUnitID=u.HItemID
-where HBillNo='" + HProcExchBillNo + "'", "Sc_ProcessExchangeBillMain");
+ left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+ left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID
+ left join Gy_Unit u WITH(NOLOCK) on a.HUnitID=u.HItemID
+ where HBillNo='" + HProcExchBillNo + "'", "Sc_ProcessExchangeBillMain");
string HMaterNumber = dataSet.Tables[0].Rows[0]["鐗╂枡浠g爜"].ToString();
string HOrgNumber = dataSet.Tables[0].Rows[0]["缁勭粐浠g爜"].ToString();
@@ -2327,5 +2401,40 @@
}
#endregion
+ #region 宸ュ簭鍗曞搧杩囩珯 鏌ヨ褰撳墠娴佽浆鍗℃槸鍚︽湁宸叉湁鍑虹珯鍗� 鑾峰彇id 鍗曟嵁鍙�
+ [Route("Cj_SingleStation/SingleItemTransit_CZD")]
+ [HttpGet]
+ public object SingleItemTransit_CZD(string sWhere)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ ds = oCN.RunProcReturn(sWhere, "WindowPrint");
+
+ //娣诲姞鍒楀悕
+ 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 = "[0000-1-037]Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1