From 15cd183e1954f46567f2cfc62eccd31672fa5e7f Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期三, 11 八月 2021 14:46:37 +0800
Subject: [PATCH] 新增即时库存查询功能、扫码详情删除功能
---
WebAPI/Controllers/WebAPIController.cs | 129 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 129 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index a17dc09..4223703 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -289,6 +289,135 @@
}
}
+ /// <summary>
+ /// 鑾峰彇鎵爜璇︽儏鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetWMSBarCodeDetailsList")]
+ [HttpGet]
+ public object GetWMSBarCodeDetailsList(int HInterID, string HBillType, int HMaterID, int HAuxPropID, string HMTONo, string HBatchNo, int HSourceInterID, int HSourceEntryID, string sWhere)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ //ds = oCN.RunProcReturn("Select * from h_v_KF_PonderationBillMain_Temp_Sum where HInterID=" + HInterID + " and HBillType='" + HBillType + "' Order by HItemID ", "h_v_KF_PonderationBillMain_Temp_Sum");
+ ds = oCN.RunProcReturn("Select HMTONo,HBatchNo,HBarCode,HWHID,HStockPlaceID,HSCWHID,HOutStockPlaceID,sum(HQty) HQty from KF_PonderationBillMain_Temp Where HQty<>0 and HInterID=" + HInterID.ToString() +
+ " and HBillType='" + HBillType + "'" +
+ " and HMaterID=" + HMaterID +
+ " and HAuxPropID=" + HAuxPropID +
+ " and HMTONo='" + HMTONo + "'" +
+ //" and HWHID=" + HWhID +
+ //" and HStockPlaceID=" + HSPID +
+ //" and HSCWHID=" + HSCWhID +
+ //" and HOutStockPlaceID=" + HSCSPID +
+ " and (HBatchNo='" + HBatchNo + "' or '" + HBatchNo + "' ='')" +
+ " and HSourceInterID=" + HSourceInterID +
+ " and HSourceEntryID=" + HSourceEntryID +
+ sWhere +
+ " Group by HBatchNo,HMTONo,HBarCode,HWHID,HStockPlaceID,HSCWHID,HOutStockPlaceID", "KF_PonderationBillMain_Temp", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+ /// <summary>
+ /// 鎵爜璇︽儏涓垹闄ょ紦瀛樿〃涓壂鐮佽褰�
+ /// </summary>
+ /// <param name="HInterID"></param>
+ /// <param name="HMaterID">鐗╂枡ID</param>
+ /// <param name="HAuxPropID">杈呭姪灞炴�D</param>
+ /// <param name="HMTONo"></param>
+ /// <param name="HBillType">鍗曟嵁绫诲瀷</param>
+ /// <param name="HSourceInterID">婧愬崟涓籌D</param>
+ /// <param name="HSourceEntryID">婧愬崟瀛怚D</param>
+ /// <returns>object</returns>
+ [Route("Web/DelCacheList")]
+ [HttpGet]
+ public object DelCacheList(int HInterID, int HMaterID, int HAuxPropID, string HMTONo, string HBillType, int HSourceInterID, int HSourceEntryID)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ //oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HitemID = " + sHitemID);
+ oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HMaterID= " + HMaterID.ToString() + " and HAuxPropID= " + HAuxPropID.ToString() + " and HMTONo='" + HMTONo + "' and HBillType='" + HBillType + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.data = e.ToString();
+ return objJsonResult;
+ }
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇鍗虫椂搴撳瓨wise
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/Get_ICInventoryByMaterIDList")]
+ [HttpGet]
+ public object Get_ICInventoryByMaterIDList(string HBarCode, long HWHID, long HSPID, long HOWNERID, string sWhere)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("exec h_p_KF_ICInventoryByMaterIDList_wise '" + HBarCode + "'," + HWHID + "," + HSPID + "," + HOWNERID + ",'" + sWhere + "'", "ICInventoryByMaterIDList");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
#region 鍩虹璧勬枡
/// <summary>
--
Gitblit v1.9.1