From 940d473ece4a67f5aa555a8cf031eba11cd63d56 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期二, 20 八月 2024 16:46:03 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 50 ++++++++++++++++++++++++++++++++++++++------------
1 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 94b9d8a..1ec1af4 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -736,7 +736,7 @@
{
if (HBarCode.Length == 29)
{
- string str1 = HBarCode.Substring(23, 3);
+ string 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
@@ -745,11 +745,27 @@
if (dataSet.Tables[0].Rows.Count == 0)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
- objJsonResult.data = null;
- return objJsonResult;
+ 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");
+
+ if (dataSet.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ ClsPub.CurUserName = user;
+ //鏉$爜鐢熸垚
+ return get_HBardBillSave(HProcExchBillNo, HBarCode);
+ }
}
else {
ClsPub.CurUserName = user;
@@ -768,7 +784,7 @@
}
else {
- string str1 = HBarCode.Substring(23, 3);
+ string 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
@@ -777,11 +793,21 @@
if (dataSet.Tables[0].Rows.Count == 0)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
- objJsonResult.data = null;
- return objJsonResult;
+ 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");
+
+ if (dataSet.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
if (ds.Tables[0].Rows[0]["HStatus"].ToString() != "")
--
Gitblit v1.9.1