From 4de907c1acf35bc433ca036e48f5ff3b91090d60 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 24 五月 2024 14:26:31 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 808 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 803 insertions(+), 5 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 d0e61c6..5cd01d9 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"
@@ -243,6 +243,59 @@
#endregion
+ #region 鑾峰彇鏈�澶у崟鎹彿
+
+ /// <summary>
+ /// 鑾峰彇鏈�澶у崟鎹彿
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetMaxBillNo_Json")]
+ [HttpGet]
+ public object GetMaxBillNo_Json(string HBillType)
+ {
+ try
+ {
+ string sErrMsg = "";
+ string HBillNo = "";
+ HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+ //----------鍒涘缓铏氳〃------------------------
+ DataTable dt_Main = new DataTable("Json");
+ dt_Main.Columns.Add("HBillNo", typeof(string));
+ //---------鍒涘缓鏂拌------------------------
+ DataRow dr_main = dt_Main.NewRow(); //鍒涘缓鏂拌
+ dt_Main.Rows.Add(dr_main); //灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+ dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+ //杩斿洖鏁版嵁
+ if (HBillNo == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈�澶у崟鎹彿鑾峰彇澶辫触";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇鎴愬姛";
+ objJsonResult.data = dt_Main;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鏈�澶у崟鎹彿澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 鏍规嵁鏉$爜锛岃繑鍥炴潯鐮佹。妗堜腑鏉$爜淇℃伅
@@ -1327,6 +1380,53 @@
}
}
+ /// <summary>
+ /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁绫诲瀷銆佸崟鎹彿銆佹簮鍗曞彿銆佺敤鎴枫�佽嚜瀹氫箟瀛楁鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetKf_ICStockBillList_Json")]
+ [HttpGet]
+ public object GetKf_ICStockBillList_Json(string HBillType, string HBillNo, string HSourceBillNo, string HMaker, Int64 HStockOrgID, string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere+"'", "h_p_Kf_ICStockBillQueryList_New");
+ 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
@@ -2317,8 +2417,85 @@
#endregion
-
#region 鐢熶骇琛ユ枡 涓婁紶鐢熷崟
+
+ #region 鐢熶骇琛ユ枡 鏂板妯″紡
+
+ /// <summary>
+ /// 鐢熶骇琛ユ枡鏂板涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMateReplenishOutBill_Json")]
+ [HttpPost]
+ public object set_SaveMateReplenishOutBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1);
+ WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ if (lsmain[0].HMainSourceBillType == "3720")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+ websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveMateReplenishOutBill_New(websLsmain, sSourceType, 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;
+ }
+ }
+
+ #endregion
#region 鐢熶骇琛ユ枡 鏍¢獙妯″紡
@@ -2376,7 +2553,6 @@
#endregion
#endregion
-
#region 濮斿琛ユ枡 涓婁紶鐢熷崟
@@ -2436,7 +2612,6 @@
#endregion
#endregion
-
#region 鐩存帴璋冩嫧 涓婁紶鐢熷崟
@@ -2513,8 +2688,10 @@
}
websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HBillerID = lsmain[0].HBillerID;
- websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
- websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+ websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+ websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+ websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+ websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
{
@@ -2588,7 +2765,347 @@
#endregion
+ #region 鍒嗘寮忚皟鍑� 涓婁紶鐢熷崟
+ #region 鍒嗘寮忚皟鍑� 鏂板妯″紡
+
+ /// <summary>
+ /// 鍒嗘寮忚皟鍑烘柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMoveStockStepOutBill_Json")]
+ [HttpPost]
+ public object set_SaveMoveStockStepOutBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_MoveStockStepOutBillMain> lsmain = new List<Model.ClsKf_MoveStockStepOutBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMoveStockStepOutBillMainByJson(msg1);
+ WebS.ClsKf_MoveStockStepOutBillMain websLsmain = new WebS.ClsKf_MoveStockStepOutBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ websLsmain.HStockStyle = lsmain[0].HStockStyle;
+ if (lsmain[0].HMainSourceBillType == "1402")
+ {
+ websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1243")
+ {
+ websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+ websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+ websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+ websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+ if (oWebs.set_SaveMoveStockStepOutBill_New(websLsmain, sSourceType, 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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 鍒嗘寮忚皟鍏� 涓婁紶鐢熷崟
+
+ #region 鍒嗘寮忚皟鍏� 鏂板妯″紡
+
+ /// <summary>
+ /// 鍒嗘寮忚皟鍏ユ柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMoveStockStepInBill_Json")]
+ [HttpPost]
+ public object set_SaveMoveStockStepInBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_MoveStockStepInBillMain> lsmain = new List<Model.ClsKf_MoveStockStepInBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMoveStockStepInBillMainByJson(msg1);
+ WebS.ClsKf_MoveStockStepInBillMain websLsmain = new WebS.ClsKf_MoveStockStepInBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ websLsmain.HStockStyle = lsmain[0].HStockStyle;
+ if (lsmain[0].HMainSourceBillType == "1250")
+ {
+ websLsmain.HMainSourceBillType = "鍒嗘寮忚皟鍑哄崟";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+ websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+ websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+ websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+ if (oWebs.set_SaveMoveStockStepInBill_New(websLsmain, sSourceType, 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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 閲囪喘閫�鏂� 涓婁紶鐢熷崟
+
+ #region 閲囪喘閫�鏂� 鏂板妯″紡
+
+ /// <summary>
+ /// 閲囪喘閫�鏂欐柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SavePOStockInBackBill_Json")]
+ [HttpPost]
+ public object set_SavePOStockInBackBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+ WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ if (lsmain[0].HMainSourceBillType == "1102")
+ {
+ websLsmain.HMainSourceBillType = "閲囪喘璁㈠崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1105")
+ {
+ websLsmain.HMainSourceBillType = "閫�鏂欓�氱煡鍗�";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+ websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SavePOStockInBackBill_New(websLsmain, sSourceType, 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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 鐢熶骇閫�鏂� 涓婁紶鐢熷崟
+
+ #region 鐢熶骇閫�鏂� 鏂板妯″紡
+
+ /// <summary>
+ /// 鐢熶骇閫�鏂欐柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMateOutBackBill_Json")]
+ [HttpPost]
+ public object set_SaveMateOutBackBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+ WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ if (lsmain[0].HMainSourceBillType == "3720")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+ websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveMateOutBackBill_New(websLsmain, sSourceType, 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;
+ }
+ }
+
+ #endregion
+
+ #endregion
#region 鐢熶骇缁勬墭鍗� 涓婁紶鐢熷崟
@@ -3014,6 +3531,48 @@
#endregion
+ #region 鐢熶骇琛ユ枡 鎵弿婧愬崟鏉$爜
+
+ /// <summary>
+ /// 鐢熶骇琛ユ枡 鎵弿婧愬崟鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/Get_SourceBarCode_MateReplenishOut_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_MateReplenishOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID)
+ {
+ try
+ {
+ WebSoBar = oWebs.get_SourceBarCode_MateReplenishOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ if (WebSoBar == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = WebSoBar;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 鐩存帴璋冩嫧 鎵弿婧愬崟鏉$爜
/// <summary>
@@ -3111,6 +3670,90 @@
try
{
WebSoBar = oWebs.get_SourceBarCode_MoveStockStepIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockInOrgID, HStockOutOrgID, ref DBUtility.ClsPub.sErrInfo);
+ if (WebSoBar == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = WebSoBar;
+ 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/Get_SourceBarCode_POStockInBack_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_POStockInBack_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+ {
+ try
+ {
+ WebSoBar = oWebs.get_SourceBarCode_POStockInBack(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ if (WebSoBar == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = WebSoBar;
+ 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/Get_SourceBarCode_MateOutBack_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_MateOutBack_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+ {
+ try
+ {
+ WebSoBar = oWebs.get_SourceBarCode_MateOutBack(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
if (WebSoBar == null)
{
objJsonResult.code = "0";
@@ -4799,6 +5442,161 @@
#endregion
+ #region 鍑洪棬纭鍗曟ā鍧楄皟鐢ㄦ柟娉� 20240308
+
+ #region 鎵弿鍗曟嵁鍙锋潯鐮佽皟鐢�
+
+ /// <summary>
+ /// 鎵弿鍗曟嵁鍙锋潯鐮�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/Get_SourceBarCode_OutDoorCheck_Json")]
+ [HttpGet]
+ public object Get_SourceBarCode_OutDoorCheck_Json(string HBarCode, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OutDoorCheck '" + HBarCode + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSourceBarCode_OutDoorCheck");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鍙锋潯鐮佸垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
+ {
+ 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;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鍙锋潯鐮佸け璐ワ紒" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ 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/set_SaveOutDoorCheckBill_Json")]
+ [HttpPost]
+ public object set_SaveOutDoorCheckBill_Json([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsXs_OutDoorCheckBillMain> lsmain = new List<Model.ClsXs_OutDoorCheckBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getOutDoorCheckBillMainByJson(msg1);
+ ClsXs_OutDoorCheckBillMain oMain = new ClsXs_OutDoorCheckBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ oMain.HInterID = lsmain[0].HInterID;
+ oMain.HBillNo = lsmain[0].HBillNo;
+ oMain.HBillType = lsmain[0].HBillType;
+ oMain.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
+ oMain.HMainSourceBillType = lsmain[0].HMainSourceBillType;
+ oMain.HMainSourceInterID = lsmain[0].HMainSourceInterID;
+ oMain.HMainSourceEntryID = lsmain[0].HMainSourceEntryID;
+ oMain.HMainSourceBillNo = lsmain[0].HMainSourceBillNo;
+ oMain.HExplanation = lsmain[0].HExplanation;
+ oMain.HRemark = lsmain[0].HRemark;
+ oMain.HMaker = lsmain[0].HMaker;
+ oMain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oMain.HYear = sYear;
+ oMain.HPeriod = sPeriod;
+ }
+
+ oCn.BeginTran();
+ //鐢熸垚鍑洪棬纭鍗曪紙鍙渶鐢熸垚涓昏〃鏁版嵁锛�
+ //鎻掑叆涓昏〃
+ oCn.RunProc("Insert Into Xs_OutDoorCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HBillStatus,HRemark,HMaker,HMakeDate" +
+ ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
+ ",HExplanation,HSTOCKORGID" +
+ ") " +
+ " values('" + oMain.HBillType + "','" + oMain.HBillType + "'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "'" +
+ ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
+ ",'" + oMain.HMainSourceBillType + "'," + oMain.HMainSourceInterID.ToString() + "," + oMain.HMainSourceEntryID.ToString() + ",'" + oMain.HMainSourceBillNo + "'" +
+ ",'" + oMain.HExplanation + "'," + oMain.HSTOCKORGID.ToString() +
+ ") ");
+
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("Update Xs_OutDoorCheckBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString());
+
+ oCn.Commit();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鐢熸垚骞跺鏍稿嚭闂ㄧ‘璁ゅ崟鎴愬姛锛佸崟鎹彿涓猴細" + oMain.HBillNo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑洪棬纭鍗曚笂浼犲け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+
#region 澶勭悊鏂规硶
--
Gitblit v1.9.1