From 6d59df4048f9b6540e4716319d9184b17093fe47 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 06 一月 2025 16:23:07 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/条码管理/WEBSController.cs | 284 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 243 insertions(+), 41 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 7d730ae..5fddb32 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"
@@ -1345,6 +1345,9 @@
{
try
{
+ //鏍规嵁鎵樻潯鐮佸瓧娈靛垹闄ゆ湰鍗曟潯鐮佸嚭鍏ュ簱缂撳瓨琛ㄦ暟鎹�
+ oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode_Pack<>'' and HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode_Pack='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ //鏍规嵁鏉$爜瀛楁鍒犻櫎鏈崟鏉$爜鍑哄叆搴撶紦瀛樿〃鏁版嵁
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode<>'' and HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -2399,15 +2402,12 @@
{
var _value = oMain["oMain"].ToString();
string msg1 = _value.ToString();
- string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- string sMainStr = sArray[0].ToString(); //鍗曟嵁鏁版嵁
- string HSourceBarCodeCtl = sArray[1].ToString(); //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
try
{
List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>();
ListModels oListModels = new ListModels();
- lsmain = oListModels.getOtherInBillMainByJson(sMainStr);
+ lsmain = oListModels.getOtherInBillMainByJson(msg1);
WebAPI.WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain();
@@ -2416,45 +2416,21 @@
websLsmain.HBillType = "1203";
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
- //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
- if (HSourceBarCodeCtl == "Y")
+ if (oWebs.set_SaveOtherInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
{
- if (oWebs.set_SaveOtherInBill_CLD_BillCheck_Verify(websLsmain, ref DBUtility.ClsPub.sErrInfo))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
- objJsonResult.data = null;
- return objJsonResult;
- }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
}
- //鍘熷崟鎹潪鎵爜鐢熸垚
else
{
- if (oWebs.set_SaveOtherInBill_CLD_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
- objJsonResult.data = null;
- return objJsonResult;
- }
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
}
}
catch (Exception e)
@@ -2922,6 +2898,61 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍏朵粬鍑哄簱鍗曚笂浼犲け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鍏朵粬鍑哄簱 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鍏朵粬鍑哄簱鏍¢獙涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveOtherOutBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveOtherOutBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+
+ try
+ {
+ List<Model.ClsKf_OtherOutBillMain> lsmain = new List<Model.ClsKf_OtherOutBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getOtherOutBillMainByJson(msg1);
+
+ WebAPI.WebS.ClsKf_OtherOutBillMain websLsmain = new WebS.ClsKf_OtherOutBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1206";
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveOtherOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏朵粬鍑哄簱鏍¢獙澶辫触锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -4487,8 +4518,6 @@
string sJXCode = "";
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
- LogService.Write("妫シ鎵爜鍙傛暟鍊硷紝瀹㈡埛锛�" + oSystemParameter.omodel.WMS_CampanyName + " ,婧愬崟绫诲瀷锛�" + HSourceBillType);
-
if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
{
sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
@@ -8885,6 +8914,179 @@
}
}
#endregion
+
+ #region 閿�鍞嚭搴撹拷婧褰曟姤琛�
+ /// <summary>
+ /// 鑾峰彇閿�鍞嚭搴撹拷婧褰�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetKf_SellOutBarTraceReport_Json")]
+ [HttpGet]
+ public object GetKf_SellOutBarTraceReport_Json(DateTime HBeginDate, DateTime HEndDate, string HBarCode, Int64 HStockOrgID, string HWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Kf_SellOutBarTraceReport '" + HBeginDate.ToShortDateString() + "','" + HEndDate.ToShortDateString() + "','" + HBarCode + "'," + HStockOrgID.ToString() + ",'" + HWhere + "'", "h_p_Kf_SellOutBarTraceReport");
+
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ閿�鍞嚭搴撹拷婧褰曚俊鎭け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 浠撳簱鍑哄叆搴撴姤琛�
+
+
+ #region 鑾峰彇鍗曟嵁绫诲瀷淇℃伅
+ /// <summary>
+ /// 鑾峰彇鍗曟嵁绫诲瀷淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetICStockBill_BillType_Json")]
+ [HttpGet]
+ public object GetICStockBill_BillType_Json()
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_KF_StockInOutReport_BillType ", "h_p_KF_StockInOutReport_BillType");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁绫诲瀷淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 浠撳簱鍑哄叆搴撴槑缁嗘姤琛�
+ /// <summary>
+ /// 浠撳簱鍑哄叆搴撴槑缁嗘姤琛�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetKF_StockInOutEntryReport_Json")]
+ [HttpGet]
+ public object GetKF_StockInOutEntryReport_Json(string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_KF_StockInOutEntryReport " + sWhere, "h_p_KF_StockInOutEntryReport");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ浠撳簱鍑哄叆搴撴槑缁嗘姤琛ㄥけ璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 浠撳簱鍑哄叆搴撹褰曟姤琛�
+ /// <summary>
+ /// 浠撳簱鍑哄叆搴撹褰曟姤琛�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetKF_StockInOutRecordReport_Json")]
+ [HttpGet]
+ public object GetKF_StockInOutRecordReport_Json(string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_KF_StockInOutRecordReport " + sWhere, "h_p_KF_StockInOutRecordReport");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ浠撳簱鍑哄叆搴撹褰曚俊鎭け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+
#endregion
#region 瀹㈡埛鏉$爜鎵弿璁板綍鍗�
--
Gitblit v1.9.1