From 578fd119d5f620fc0d1902a55ea2a6386da8a9af Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 07 四月 2026 23:52:47 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 52 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 36 insertions(+), 16 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 1a0405f..aa8957a 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"
@@ -20,6 +20,7 @@
namespace WebAPI.Controllers
{
+
public class WEBSController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -46,6 +47,7 @@
/// <returns></returns>
[Route("WEBSController/GetUser_Json")]
[HttpGet]
+ [AllowAnonymous]
public object GetUser_Json(string HUserNumber, string HPassWord, Int64 HStockOrgID, string HStockOrgName)
{
try
@@ -91,11 +93,23 @@
return objJsonResult;
}
+ if(!oSystemParameter.ShowBill(ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鐧诲綍寮傚父锛乀oken 鐢熸垚寮傚父锛屾棤娉曡幏鍙栧叕鍙镐俊鎭紒";
+ }
+
+ string tokenStr = JWTHelper.GenerateToken(ds.Tables[0].Rows[0]["Czybm"].ToString(), ds.Tables[0].Rows[0]["Czymc"].ToString());
+
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鐧诲綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
- return objJsonResult;
+ JObject jobjJsonResult = JObject.FromObject(objJsonResult);
+ jobjJsonResult["token"] = tokenStr;
+ return jobjJsonResult;
}
}
catch (Exception e)
@@ -1572,14 +1586,16 @@
/// <returns></returns>
[Route("WEBSController/set_UpdatePonderationBillMain_Temp_BarCode_Json")]
[HttpGet]
- public object set_UpdatePonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode, int HQty)
+ public object set_UpdatePonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode, double HQty, long HItemID)
{
try
{
+ //(HBarCode_Pack <> '' and HInterID = { HInterID.ToString() } and HBillType = '{HBillType}' and HBarCode_Pack = '{HBarCode}') or
+ // (HBarCode <> '' and HInterID ={ HInterID.ToString()}
+ //and HBillType = '{HBillType}' and HBarCode = '{HBarCode}')
// 鏍规嵁鎵樻潯鐮佸瓧娈靛拰鏉$爜瀛楁 鍒ゆ柇 鏇存柊鐨勬潯鐮佹暟閲忔槸鍚﹀ぇ浜庢渶澶ф暟閲忔垨灏忎簬0
ds = oCn.RunProcReturn($@"select * from KF_PonderationBillMain_Temp where
- (HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}') or
- (HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}')
+ HItemID = {HItemID}
", "KF_PonderationBillMain_Temp");
if(ds == null || ds.Tables[0].Rows.Count == 0)
@@ -1602,21 +1618,24 @@
return objJsonResult;
}
- if(Double.Parse(ds.Tables[0].Rows[0]["HQtyMust"].ToString()) < HQty)
- {
- // 鏇存柊鐨勬潯鐮佹暟閲忔槸鍚﹀ぇ浜庢渶澶ф暟閲�
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = $"鏇存柊澶辫触锛屾潯鐮佹暟閲弡HQty}澶т簬鏈�澶у彲鎵暟閲弡ds.Tables[0].Rows[0]["HQtyMust"].ToString()}...";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //if(Double.Parse(ds.Tables[0].Rows[0]["HQtyMust"].ToString()) < HQty)
+ //{
+ //// 鏇存柊鐨勬潯鐮佹暟閲忔槸鍚﹀ぇ浜庢渶澶ф暟閲�
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = $"鏇存柊澶辫触锛屾潯鐮佹暟閲弡HQty}澶т簬鏈�澶у彲鎵暟閲弡ds.Tables[0].Rows[0]["HQtyMust"].ToString()}...";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
//鏍规嵁鎵樻潯鐮佸瓧娈垫洿鏂版湰鍗曟潯鐮佸嚭鍏ュ簱缂撳瓨琛ㄦ暟鎹�
- oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode_Pack<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode_Pack='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
//鏍规嵁鏉$爜瀛楁鏇存柊鏈崟鏉$爜鍑哄叆搴撶紦瀛樿〃鏁版嵁
- oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //oCn.RunProc($"Update KF_PonderationBillMain_Temp set HQty = {HQty} where HBarCode<>'' and HInterID={HInterID.ToString()} and HBillType='{HBillType}' and HBarCode='{HBarCode}'", ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //鏍规嵁鏉$爜鑷鍒� 鏇存柊 鏉$爜鍑哄叆搴撶紦瀛樿〃鏁版嵁
+ oCn.RunProc($"exec h_p_KF_PonderationBillMain_Temp_Update {HInterID}, '{HBillType}', '{HBarCode}', {HQty}, {HItemID}", ref DBUtility.ClsPub.sExeReturnInfo);
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -1628,7 +1647,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏇存柊鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄦ潯鐮佽褰曞け璐ワ紒" + e.ToString();
+ objJsonResult.Message = "鏇存柊鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄦ潯鐮佽褰曞け璐ワ紒" + e.Message.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -3015,6 +3034,7 @@
/// <returns></returns>
[Route("WEBSController/set_SavePOStockInBill_Json")]
[HttpPost]
+ [Permission(HModName = "Kf_POStockInBill", Operate = "_Edit")]
public object set_SavePOStockInBill_Json([FromBody] JObject oMain)
{
var _value = oMain["oMain"].ToString();
--
Gitblit v1.9.1