From 5c5c866d0c4d4759d213c70802ef4ba960a6c263 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 05 三月 2026 10:46:34 +0800
Subject: [PATCH] 单品过站优化,检验单根据单据号获取源单信息如果客户是华舟 传入对应的条码
---
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 61 +++++++++++++++++-------------
1 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 88a8f8f..ff5b7d1 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -57,7 +57,7 @@
#region 宸ュ簭鍗曞搧涓嶈壇閲囬泦 鎵爜鏌ヨ
[Route("Cj_SingleStation/HBardCodeList")]
[HttpGet]
- public object HBardCodeList(string HBarCode, string user)
+ public object HBardCodeList(string HBarCode,int HProcID, string user)
{
try
{
@@ -71,36 +71,34 @@
return objJsonResult;
}
- 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");
+ ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange WITH(NOLOCK) where 鏉$爜='" + HBarCode + "' and HProcID='"+ HProcID + "' ", "h_v_Gy_BarCodeBillHICOMProcessExchange");
if (ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�";
+ objJsonResult.Message = "鏉$爜璺熷綋鍓嶅伐搴忔煡鏃犳暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
- int num = 0;
- for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
- {
- if (ds.Tables[0].Rows[i]["HProcID"].ToString() == HProcID)
- {
- num = 1;
- }
- }
- if (num == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //int num = 0;
+ //for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ //{
+ // if (ds.Tables[0].Rows[i]["HProcID"].ToString() == HProcID)
+ // {
+ // num = 1;
+ // }
+ //}
+ //if (num == 0)
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
if (ds.Tables[0].Rows[0]["HStatus"].ToString() != "姝e父")
{
@@ -308,7 +306,13 @@
//淇敼鏉$爜琛ㄧ殑鐘舵��
oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'");
- LogService.Write("绫诲瀷:" + oSub.HBadTypeID + ",鍒跺崟浜�:" + oSub.HMaker + ",鍒跺崟鏃ユ湡:" + oSub.HMakeDate);
+ //鏌ヨ褰撳墠鏉$爜瀵瑰簲鐨勫嚭绔欏崟id
+ ds= oCN.RunProcReturn("select * from Sc_StationOutBillSub_SN where HBarCode='" + oSub.HBarCode + "' and HSourceEntryID='" + oSub.HProcExchEntryID + "'", "Sc_StationOutBillSub_SN");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ linterid= ds.Tables[0].Rows[0]["HInterID"].ToString();
+ }
+ LogService.Write("绫诲瀷:" + oSub.HBadTypeID + ",鍒跺崟浜�:" + oSub.HMaker + ",鍒跺崟鏃ユ湡:" + oSub.HMakeDate + ",宸ュ簭:" + oSub.HProcID + ",娴佽浆鍗�:"+ oSub.HProcExchBillNo + ",鍑虹珯鍗昳d:"+ linterid);
//淇敼鍑虹珯鍗曠殑 涓嶈壇 鎶ュ簾鏁伴噺
if (HResult == "涓嶈壇")
{
@@ -372,8 +376,9 @@
if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�")
{
- //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚︽槸寮�宸�
- ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp");
+ //鍒ゆ柇褰撳墠娴佽浆鍗� 褰撳墠宸ュ簭鏄惁鏄紑宸�
+ ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0' and HProcID='"+ HProcID + "'", "Sc_ICMOBillStatus_Tmp");
+ //鏌ヤ笉鍒拌瘉鏄庢病鏈夊紑宸ヨ繘鍏ヤ笅涓�鍙ユ煡璇�
if (ds.Tables[0].Rows.Count == 0)
{
//鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚﹀ⅷ瑗垮摜鐨�
@@ -391,11 +396,15 @@
}
- ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomList '" + HBarCode + "'," + HProcID, "h_p_Gy_BarCodeBillBomList");
+ //2026 0228鏂帿灏� 涓ら亾宸ュ簭瑕佸悎骞舵姇鏂� 鑷姩鍒嗛厤 鑰佺殑 h_p_Gy_BarCodeBillBomList 鐢ㄤ簬绮惧噯鏌ヨ 鏂扮殑 h_p_Gy_BarCodeBillBomList2 鐢ㄤ簬鏌ヨ鍑鸿鍏ㄩ儴鐨勪笂鏂�
+ //ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomList '" + HBarCode + "'," + HProcID, "h_p_Gy_BarCodeBillBomList");
+ ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomList2 '" + HBarCode + "'," + HProcID, "h_p_Gy_BarCodeBillBomList2");
if (ds.Tables[0].Rows.Count == 0)
{
- DataSet dataSet = oCN.RunProcReturn(@"exec h_p_Sc_ProcessExchangeBillList '" + HBarCode + "'," + HProcID, "h_p_Sc_ProcessExchangeBillList");
+ //2026 0228鏂帿灏� 涓ら亾宸ュ簭瑕佸悎骞舵姇鏂� 鑷姩鍒嗛厤 鑰佺殑 h_p_Sc_ProcessExchangeBillList 鐢ㄤ簬绮惧噯鏌ヨ 鏂扮殑 h_p_Sc_ProcessExchangeBillList2 鐢ㄤ簬鏌ヨ鍑鸿鍏ㄩ儴鐨勪笂鏂�
+ //DataSet dataSet = oCN.RunProcReturn(@"exec h_p_Sc_ProcessExchangeBillList '" + HBarCode + "'," + HProcID, "h_p_Sc_ProcessExchangeBillList");
+ DataSet dataSet = oCN.RunProcReturn(@"exec h_p_Sc_ProcessExchangeBillList2 '" + HBarCode + "'," + HProcID, "h_p_Sc_ProcessExchangeBillList2");
if (dataSet.Tables[0].Rows.Count > 0)
{
objJsonResult.code = "2";
--
Gitblit v1.9.1