From 7ef4979eae3e9f15c70aad2022a5015faeffb1c2 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 06 一月 2026 13:05:04 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 101 +++++++++++++++++++++++++++++++-------------------
1 files changed, 63 insertions(+), 38 deletions(-)
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 1136c31..579811a 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -505,42 +505,22 @@
{
try
{
- Int64 sHSPID = 0;
- Int64 sHWhID = 0;
- if (HBarCode.Contains(";"))
+ //鏉$爜鏍煎紡='HSP'+浠撳簱鍐呯爜+';'+浠撲綅鍐呯爜
+ if (HBarCode.Contains("HSP") && HBarCode.Contains(";"))
{
- string[] sArray = HBarCode.Replace("HSP", "").Split(';');
- sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
- sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
- }
+ Int64 sHSPID = 0;
+ Int64 sHWhID = 0;
+ if (HBarCode.Contains(";"))
+ {
+ string[] sArray = HBarCode.Replace("HSP", "").Split(';');
+ sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
+ sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
+ }
- if (HWhID == 0)
- {
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ if (HWhID == 0)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- }
- else
- {
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -553,9 +533,53 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛锛�";
- objJsonResult.data = ds2.Tables[0];
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds2.Tables[0];
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HBarCode='" + HBarCode + "' and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
}
else
{
@@ -13564,7 +13588,7 @@
#region 妫�楠屽崟 鎵弿婧愬崟 鏍规嵁鍗曟嵁绫诲瀷 婧愬崟绫诲瀷 婧愬崟鍙� 瑙f瀽骞惰繑鍥炴楠岄」鐩�
[Route("WEBSController/get_CheckBillBarCode_Json_CheckItem")]
[HttpGet]
- public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode)
+ public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode,string user)
{
try
{
@@ -13576,7 +13600,8 @@
exec h_p_CheckBillBarCode_AnalysisBarcode
@HBillType={HBillType},
@HSourceBillType={HSourceBillType},
- @HBarCode={HBarCode}
+ @HBarCode={HBarCode},
+ @user = '{user}'
", "h_p_CheckBillBarCode_AnalysisBarcode");
if (ds.Tables[0].Rows.Count == 0)
@@ -13675,8 +13700,7 @@
#endregion
#region 娣诲悍鏍规嵁灏忚溅鏉$爜鎵惧嚭鐩稿簲鐗╂枡
- #endregion
-
+
[Route("WEBSController/GetMaterIDByCarBarCode")]
[HttpGet]
public object GetMaterIDByCarBarCode(string CarBarCode)
@@ -13719,5 +13743,6 @@
return objJsonResult;
}
}
+ #endregion
}
}
--
Gitblit v1.9.1