From 05a1bcf2d3fb7033b09a0cb7f99dc0514eacf537 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期五, 08 八月 2025 12:31:01 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 723 +++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 638 insertions(+), 85 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 9bcbd83..3f6dcb5 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"
@@ -1453,28 +1453,107 @@
{
try
{
- if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, 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;
- }
+ //鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
+ oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + HInterID.ToString() + ",'" + HBillType + "'");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
}
catch (Exception e)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鍑哄簱鎵爜妯″潡锛岄��鍑烘椂鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬� HlineStatus 20250722
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_New_Json")]
+ [HttpGet]
+ public object set_DelPonderationBillMain_Temp_FIFO_New_Json(long HInterID, string HBillType, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ string sERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode; //搴撳瓨鎺у埗-WMS搴撳瓨鎺у埗ERP妯″紡 (WISE銆丆LOUD銆丮ES)
+ string sFIFOCtl = "N"; //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級
+
+ //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1206" && (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_OtherOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍒嗘寮忚皟鍑哄崟-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐢熶骇琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1255" && (oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+
+ try
+ {
+ if(sFIFOCtl == "Y")
+ {
+ //鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
+ oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + HInterID.ToString() + ",'" + HBillType + "'");
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
objJsonResult.data = null;
return objJsonResult;
}
@@ -1629,6 +1708,101 @@
#endregion
+ #region 鏍峰搧閿�鍞嚭搴撶紦瀛樺垪琛ㄧ晫闈紝杩斿洖缂撳瓨鍒楄〃淇℃伅
+
+ /// <summary>
+ /// 缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetKf_PonderationBillMain_TempList_New_Json_YPSellOut")]
+ [HttpGet]
+ public object GetKf_PonderationBillMain_TempList_New_Json_YPSellOut(string HBillType, string HMaker, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New_YPSellOut '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New_YPSellOut");
+
+ 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 鏍峰搧閿�鍞嚭搴撶紦瀛樺垪琛ㄧ晫闈紝杩斿洖宸蹭笂浼犲垪琛ㄤ俊鎭�
+ [Route("WEBSController/GetKf_ICStockBillList_Json_YPSellOut")]
+ [HttpGet]
+ public object GetKf_ICStockBillList_Json_YPSellOut(string HBillType, string HBillNo, string HSourceBillNo, string HMaker, Int64 HStockOrgID, string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New_YPSellOut '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere + "'", "h_p_Kf_ICStockBillQueryList_New_YPSellOut");
+ 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 缂撳瓨鍒楄〃 缂栬緫鍔熻兘璋冪敤
@@ -1956,27 +2130,114 @@
}
/// <summary>
- /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+ /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁锛屽垹闄ゆ椂鍒ゆ柇鍗曟嵁鏄惁寮傚父锛屽啓鍏ユ棩蹇� 20250722
/// </summary>
/// <returns></returns>
[Route("WEBSController/set_DelPonderationBillMain_Temp_Json")]
[HttpGet]
- public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType)
+ public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID, string MvarReportTitle)
{
- try
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
- oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛";
- objJsonResult.data = null;
- return objJsonResult;
+ string sERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode; //搴撳瓨鎺у埗-WMS搴撳瓨鎺у埗ERP妯″紡 (WISE銆丆LOUD銆丮ES)
+ string sFIFOCtl = "N"; //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級
+
+ //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1206" && (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_OtherOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍒嗘寮忚皟鍑哄崟-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐢熶骇琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ else if (HBillType == "1255" && (oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOList.ToUpper() == "Y"))
+ {
+ sFIFOCtl = "Y";
+ }
+
+ try
+ {
+ string WorkList = "鍒犻櫎缂撳瓨鍗曟嵁锛屽崟鎹彿锛�" + HBillNo;
+ string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
+ oCn.BeginTran();
+ ds = oCn.RunProcReturn("exec h_p_WMS_PonderationBillMain_Temp_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + sFIFOCtl + "','" + sERPMode + "'", "h_p_WMS_PonderationBillMain_Temp_Delete");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎缂撳瓨鍗曟嵁澶辫触锛屽垹闄ょ紦瀛樺崟鎹垽鏂敊璇紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0; //澶辫触锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ //鍐欏叆鏃ュ織
+ oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+ "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鍒犻櫎')"
+ );
+ oCn.Commit();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + 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;
+ }
}
- catch (Exception e)
+ else
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄥ崟鎹け璐ワ紒" + e.ToString();
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
objJsonResult.data = null;
return objJsonResult;
}
@@ -2849,6 +3110,105 @@
#endregion
+ #region 閿�鍞嚭搴� 鏂板妯″紡锛堟牱鍝侀攢鍞嚭搴擄級
+
+ /// <summary>
+ /// 閿�鍞嚭搴撴柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveSellOutBill_Json_YP")]
+ [HttpPost]
+ public object set_SaveSellOutBill_Json_YP([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getSellOutBillMainByJson(msg1);
+ WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain();
+ 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 == "1402")
+ {
+ websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1401")
+ {
+ 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_SaveSellOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
+ {
+ oCn.BeginTran();
+ try
+ {
+ string sql_reWriteTaxData = "exec h_p_Kf_SellOutBill_withOutSourceBill_ReWriteTax " + lsmain[0].HInterID + "," + lsmain[0].HIsTaxRate + "," + lsmain[0].HIsTaxRate_upper;
+ oCn.RunProc(sql_reWriteTaxData);
+ oCn.Commit();
+ }
+ catch (Exception e3)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閿�鍞嚭搴撳崟涓婁紶鎴愬姛锛侊紒绋庣巼璁$畻澶辫触锛侊紒" + e3.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ 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 閿�鍞嚭搴� 鏍¢獙妯″紡
/// <summary>
@@ -2956,6 +3316,8 @@
websLsmain.HBillerID = lsmain[0].HBillerID;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+
if (oWebs.set_SaveEntrustOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
{
@@ -4409,7 +4771,7 @@
/// 灏忚溅閿佸畾鍗曟柊澧炰笂浼�
/// </summary>
/// <returns></returns>
- [Route("WEBSController/set_SaveTrolleyPositionBill_Json2")]
+ [Route("WEBSController/set_SaveTrolleyPositionBill_Json")]
[HttpPost]
public object set_SaveTrolleyPositionBill_Json([FromBody] JObject msg)
{
@@ -5913,6 +6275,7 @@
string sJXCode = "";
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
+ string sAutoBarCode = "N"; //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
#region 绯荤粺鍙傛暟鑾峰彇
@@ -5920,90 +6283,140 @@
if (HBillType == "1201")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_POStockInBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//鐢熶骇鍏ュ簱鍗�
- if (HBillType == "1202")
+ else if (HBillType == "1202")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_ProductInBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
}
//鍏朵粬鍏ュ簱鍗�
- if (HBillType == "1203")
+ else if (HBillType == "1203")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_OtherInBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//棰嗘枡鍑哄簱鍗�
else if (HBillType == "1204")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_MateOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//閿�鍞嚭搴撳崟
else if (HBillType == "1205")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_SellOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//鍏朵粬鍑哄簱鍗�
else if (HBillType == "1206")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_OtherOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//濮斿棰嗘枡鍗�
else if (HBillType == "1211")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//鐢熶骇琛ユ枡鍗�
else if (HBillType == "1254")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//濮斿琛ユ枡鍗�
else if (HBillType == "1255")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
//鐩存帴璋冩嫧鍗�
else if (HBillType == "1207")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
}
}
#endregion
@@ -6018,8 +6431,17 @@
}
try
{
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (sAutoBarCode == "Y")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏嶆壂鐗╂枡鏉$爜妯″紡锛屾棤闇�鎵弿鐗╂枡鏉$爜锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//鍘熷崟鎹负鎵爜鐢熸垚锛屾牎楠屾椂涓嶇敓鎴愭潯鐮佽褰曪紝鍙鍘熸壂鎻忕殑鏉$爜杩涜鏍稿
- if (sSourceBarCodeCtl == "Y")
+ else if (sSourceBarCodeCtl == "Y")
{
WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
if (WebSoBar == null)
@@ -6257,7 +6679,7 @@
if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
//閿�鍞嚭搴撳崟
sSourceBarCodeCtl = "Y";
@@ -6380,25 +6802,25 @@
if (HBillType == "1201")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
}
//鐢熶骇鍏ュ簱鍗�
- if (HBillType == "1202")
+ else if (HBillType == "1202")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
}
//鍏朵粬鍏ュ簱鍗�
- if (HBillType == "1203")
+ else if (HBillType == "1203")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6407,7 +6829,7 @@
else if (HBillType == "1204")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6416,7 +6838,7 @@
else if (HBillType == "1205")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6425,7 +6847,7 @@
else if (HBillType == "1206")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6434,7 +6856,7 @@
else if (HBillType == "1211")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6443,7 +6865,7 @@
else if (HBillType == "1254")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6452,7 +6874,7 @@
else if (HBillType == "1255")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6461,7 +6883,7 @@
else if (HBillType == "1207")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6552,7 +6974,7 @@
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
//閿�鍞嚭搴撳崟
sSourceBarCodeCtl = "Y";
@@ -6688,25 +7110,25 @@
if (HBillType == "1201")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
}
//鐢熶骇鍏ュ簱鍗�
- if (HBillType == "1202")
+ else if (HBillType == "1202")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
}
//鍏朵粬鍏ュ簱鍗�
- if (HBillType == "1203")
+ else if (HBillType == "1203")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6715,7 +7137,7 @@
else if (HBillType == "1204")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6724,7 +7146,7 @@
else if (HBillType == "1205")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6733,7 +7155,7 @@
else if (HBillType == "1206")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6742,7 +7164,7 @@
else if (HBillType == "1211")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6751,7 +7173,7 @@
else if (HBillType == "1254")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6760,7 +7182,7 @@
else if (HBillType == "1255")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6769,7 +7191,7 @@
else if (HBillType == "1207")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+ if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6849,7 +7271,7 @@
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
- if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+ if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
//閿�鍞嚭搴撳崟
sSourceBarCodeCtl = "Y";
@@ -7518,28 +7940,18 @@
{
try
{
- string WorkList = "鍗曟嵁鍙凤細"+@HBillNo+ "锛屽搴旂锛堟墭锛夋潯鐮侊細" + @HBarCode_Pack+ "锛屾媶绠憋紙鎷嗘墭锛夋垚鍔燂紒";
- string SystemName = "WMS-鎷嗙锛堟媶鎵橈級妯″潡";
- oCn.BeginTran();
- //鍒犻櫎缁勬墭鍗曡褰�
- oCn.RunProc("Delete from Sc_PackUnionBillMain where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
- oCn.RunProc("Delete from Sc_PackUnionBillSub where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
- //鍥炲~鏉$爜妗f鎵樻潯鐮佹暟閲�
- oCn.RunProc("Update Gy_BarCodeBill Set HQty=0 where HBarCodeType='鎵樼洏鏉$爜' and HBarCode='" + HBarCode_Pack+"'", ref DBUtility.ClsPub.sExeReturnInfo);
- //鍐欏叆鏃ュ織
- oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
- "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鎷嗙锛堟媶鎵橈級')"
- );
- oCn.Commit();
+ string HIPAddress = ""; //IP
+ string HModCaption = "WMS-鎷嗙锛堟媶鎵橈級妯″潡"; //妯″潡鍚�
+ ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + ComputerName + "','" + HIPAddress + "','" + HModCaption + "'", "h_p_Sc_PackUnionBill_Delete_New");
+
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鏉$爜锛�" + HBarCode_Pack + " 鎷嗙锛堟媶鎵橈級鎴愬姛";
+ objJsonResult.Message = "鎴愬姛";
objJsonResult.data = null;
return objJsonResult;
}
catch (Exception e)
{
- oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鎷嗙锛堟媶鎵橈級澶辫触锛�" + e.ToString();
@@ -8796,7 +9208,7 @@
#endregion
- #region 涓婃灦銆佷笅鏋跺崟妯″潡璋冪敤鏂规硶 20250520
+ #region 涓婃灦銆佷笅鏋跺崟銆佸皬杞﹂攣瀹氭ā鍧楄皟鐢ㄦ柟娉� 20250520
#region 涓嬫灦鍗曟壂鐮佹ā鍧� 鎵弿婧愬崟鏉$爜璋冪敤鏂规硶
/// <summary>
@@ -8987,6 +9399,147 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鏌ヨ杞﹂棿鐗╂枡搴撳瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 涓嬫灦鍗曟ā鍧楋紝鎵簮鍗曟潯鐮佹煡璇㈢墿鏂欏簱瀛樹俊鎭�
+
+ /// <summary>
+ /// 鑾峰彇鍗曟嵁鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/MaterialLowerBill_MaterInv")]
+ [HttpGet]
+ public object MaterialLowerBill_MaterInv(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Kf_MaterialInventory " + HInterID + "," + HBillType + "," + HStockOrgID, "h_p_Kf_MaterialInventory");
+ 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 灏忚溅鎵爜缁戝畾鏃讹紝鍒ゆ柇鍏舵槸鍚﹀凡缁戝畾搴撲綅淇℃伅
+ [Route("WEBSController/CarIsused")]
+ [HttpGet]
+ public object CarIsused(string HCarBarCode)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from h_v_Gy_MouldIsUsed where 灏忚溅鏉$爜='" + HCarBarCode + "'" , "h_v_Gy_MouldIsUsed");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "灏忚溅鏉$爜锛�" + HCarBarCode + "锛屼笉鍦ㄧ郴缁熶腑锛岃鏍稿锛�";
+ 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 = "1";
+ 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 = "鏌ヨ灏忚溅鍦ㄥ簱鐘舵�佸け璐rr锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 灏忚溅缁戝畾鏈哄彴鏃讹紝鍒ゆ柇鎵�鎵満鍙帮紙璁惧锛夋潯鐮佹槸鍚﹀瓨鍦ㄤ簬璁惧妗f
+ [Route("WEBSController/IsExistEquip")]
+ [HttpGet]
+ public object IsExistEquip(string HEquipBarCode)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from h_v_Gy_EquipIsExist where 鏈哄彴鏉$爜='" + HEquipBarCode + "'", "h_v_Gy_EquipIsExist");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈哄彴鏉$爜锛�" + HEquipBarCode + "锛屼笉鍦ㄧ郴缁熶腑锛岃鏍稿锛�";
+ 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 = "1";
+ 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 = "鏌ヨ鏈哄彴淇℃伅澶辫触err锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -11534,7 +12087,7 @@
string sJXCode = "";
if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
- if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck.ToUpper() == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
{
result1 = InvokeHelper.Submit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//鎻愪氦
result2 = InvokeHelper.Audit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//瀹℃牳
--
Gitblit v1.9.1