From 3378439708add2bc40f4d6d77aebc11367e380fd Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 20 四月 2026 15:48:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/条码管理/WEBSController.cs | 3759 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 3,587 insertions(+), 172 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 ceb0757..1760065 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
@@ -72,7 +74,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HBack"])==1)
+ else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HBack"]) == 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -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)
@@ -111,6 +125,8 @@
#endregion
#region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+
+ #region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇 鍒ゆ柇閲戣澏璐﹀彿鏄惁姝g‘
/// <summary>
/// 杩涘叆妯″潡鏃惰繘琛岀敤鎴锋潈闄愬垽鏂�
@@ -184,6 +200,48 @@
return objJsonResult;
}
}
+
+ #endregion
+
+ #region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+
+ /// <summary>
+ /// 杩涘叆妯″潡鏃惰繘琛岀敤鎴锋潈闄愬垽鏂�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/CheckModRight_ERP_Json")]
+ [HttpGet]
+ public object CheckModRight_ERP_Json(string ModRightName, string HUserName)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightName, 3, false, HUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夊搴旀ā鍧楁潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ 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
@@ -381,12 +439,50 @@
{
Int64 HWhID = 0;
HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", ""));
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse");
+ ds = oCn.RunProcReturn("exec h_p_Gy_Warehouse_PDA " + HWhID.ToString() + "," + HStockOrgID.ToString(), "h_p_Gy_Warehouse_PDA");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨搴撴潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇PDA浠撳簱鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetWarehouseList_Json")]
+ [HttpGet]
+ public object GetWarehouseList_Json(string Warehouse, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Gy_WarehouseList_PDA '" + Warehouse + "'," + HStockOrgID.ToString(), "h_p_Gy_WarehouseList_PDA");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍浠撳簱璁板綍锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -423,42 +519,22 @@
{
try
{
- Int64 sHSPID = 0;
- Int64 sHWhID = 0;
- if (HBarCode.Contains(";"))
+ //鏉$爜鏍煎紡='HSP'+浠撳簱鍐呯爜+';'+浠撲綅鍐呯爜
+ if (HBarCode.Contains("HSP") && HBarCode.Contains(";"))
{
- string[] sArray = HBarCode.Replace("HSP", "").Split(';');
- sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
- sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
- }
+ Int64 sHSPID = 0;
+ Int64 sHWhID = 0;
+ if (HBarCode.Contains(";"))
+ {
+ string[] sArray = HBarCode.Replace("HSP", "").Split(';');
+ sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
+ sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
+ }
- if(HWhID==0)
- {
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ if (HWhID == 0)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- }
- else
- {
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -471,9 +547,53 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛锛�";
- objJsonResult.data = ds2.Tables[0];
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds2.Tables[0];
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HBarCode='" + HBarCode + "' and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
}
else
{
@@ -636,6 +756,44 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵儴闂ㄦ潯鐮佹槸鍚︽甯革紝涓斾负闈炵鐢ㄧ姸鎬侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇閮ㄩ棬鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetDepartmentList_Json")]
+ [HttpGet]
+ public object GetDepartmentList_Json(string Department, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Department + "%' or HName like '%" + Department + "%')", "Gy_Department");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍閮ㄩ棬璁板綍锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -952,13 +1110,13 @@
/// <returns></returns>
[Route("WEBSController/GetEquipList_Json")]
[HttpGet]
- public object GetEquipList_Json(string Equip,int HCenterID)
+ public object GetEquipList_Json(string Equip, int HCenterID)
{
try
{
- if (HCenterID !=0)
+ if (HCenterID != 0)
{
- ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName,HCenterID from h_v_Gy_EquipFileBill where HCenterID='"+HCenterID+"' and ( HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%')", "h_v_Gy_EquipFileBill");
+ ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName,HCenterID from h_v_Gy_EquipFileBill where HCenterID='" + HCenterID + "' and ( HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%')", "h_v_Gy_EquipFileBill");
}
else
{
@@ -974,7 +1132,7 @@
}
else
{
- objJsonResult.code = "0";
+ objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
@@ -1290,6 +1448,50 @@
#endregion
+ #region 鎵爜妯″潡 鎵弿婧愬崟 杩涜鎺у埗鍒ゆ柇
+ /// <summary>
+ /// 婧愬崟鍒楄〃淇℃伅锛屾牴鎹崟鎹被鍨嬨�佹簮鍗曠被鍨嬨�佺粍缁嘔D杩斿洖婧愬崟鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetSourceBillList_Control")]
+ [HttpGet]
+ public object GetSourceBillList_Control(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater, string HCustom)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList_Control '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetSourceBillList_Control");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒ゆ柇婧愬崟澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ 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>
@@ -1368,6 +1570,84 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍒犻櫎鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄦ潯鐮佽褰曞け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+
+ #region 鎵爜妯″潡 鏍规嵁鏉$爜鍒犻櫎缂撳瓨鍒楄〃涓搴旀潯鐮佽褰�
+
+ /// <summary>
+ /// 鏍规嵁鏉$爜鏇存柊鏉$爜鍑哄叆搴撶紦瀛樿〃鏁伴噺
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_UpdatePonderationBillMain_Temp_BarCode_Json")]
+ [HttpGet]
+ 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
+ HItemID = {HItemID}
+ ", "KF_PonderationBillMain_Temp");
+
+ if(ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ // 鎵�鎵潯鐮佷笉瀛樺湪
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏇存柊澶辫触锛屾墍鎵潯鐮佷笉瀛樺湪...";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if(HQty < 0)
+ {
+ // 鏇存柊鐨勬潯鐮佹暟閲忓皬浜�0
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏇存柊澶辫触锛屾洿鏂版暟閲忓皬浜�0...";
+ 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<>'' 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;
+ objJsonResult.Message = "鏇存柊鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏇存柊鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄦ潯鐮佽褰曞け璐ワ紒" + e.Message.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -1529,7 +1809,7 @@
try
{
- if(sFIFOCtl == "Y")
+ if (sFIFOCtl == "Y")
{
//鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + HInterID.ToString() + ",'" + HBillType + "'");
@@ -1708,6 +1988,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 缂撳瓨鍒楄〃 缂栬緫鍔熻兘璋冪敤
@@ -1857,7 +2232,7 @@
{
try
{
- ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere+"'", "h_p_Kf_ICStockBillQueryList_New");
+ 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";
@@ -1907,50 +2282,73 @@
[HttpGet]
public object set_DeleteICStockBillAndWMS_Json(Int64 HInterID, string HBillNo, string HBillType, string HMaker, string MvarReportTitle)
{
- try
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
- string WorkList = "鎾ら攢宸蹭笂浼犲崟鎹紝鍗曟嵁鍙凤細" + HBillNo;
- string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
- oCn.BeginTran();
- ds = oCn.RunProcReturn("exec h_p_WMS_ICStockBillAndWMS_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ICStockBillAndWMS_Delete");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ //鎾ら攢鍓嶅垽鏂噾铦朵簯涓崟鎹槸鍚﹀瓨鍦�
+ if (!GetBillQuery_WMS(HInterID, HBillNo, HBillType, HMaker, oSystemParameter.omodel.WMS_CloudMode, oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode, 2, ref sErrMsg))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ try
+ {
+ oCn.BeginTran();
+ ds = oCn.RunProcReturn("exec h_p_WMS_ICStockBillAndWMS_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ICStockBillAndWMS_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
+ {
+ string WorkList = "鎾ら攢宸蹭笂浼犲崟鎹紝鍗曟嵁鍙凤細" + HBillNo;
+ string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
+ //鍐欏叆鏃ュ織
+ 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 = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
{
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 = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.Message = "鎾ら攢鍗曟嵁宸蹭笂浼犺褰曞け璐ワ紒" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
}
- catch (Exception e)
+ else
{
- oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鎾ら攢鍗曟嵁宸蹭笂浼犺褰曞け璐ワ紒" + e.ToString();
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
objJsonResult.data = null;
return objJsonResult;
}
@@ -2090,10 +2488,18 @@
sFIFOCtl = "Y";
}
+ //鍒犻櫎鍓嶅垽鏂噾铦朵簯涓崟鎹槸鍚﹀瓨鍦�
+ if (!GetBillQuery_WMS(HInterID, HBillNo, HBillType, HMaker, oSystemParameter.omodel.WMS_CloudMode, sERPMode, 1, ref sErrMsg))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
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)
@@ -2116,6 +2522,8 @@
}
else
{
+ string WorkList = "鍒犻櫎缂撳瓨鍗曟嵁锛屽崟鎹彿锛�" + HBillNo;
+ string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
//鍐欏叆鏃ュ織
oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
"(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鍒犻櫎')"
@@ -2185,6 +2593,220 @@
}
}
+ #endregion
+
+ #region 閲戣澏浜戝崟鎹煡璇�
+ public bool GetBillQuery_WMS(Int64 HInterID, string HBillNo, string HBillType, string HMaker, string sCloudMode, string sERPMode, Int64 sHType, ref string sErrMsg)
+ {
+ //sCloudMode锛氱郴缁熷弬鏁� 鏄惁涓虹鏈変簯妯″紡(N涓哄叕鏈変簯妯″紡锛孻涓虹鏈変簯妯″紡)锛�
+ //sERPMode锛氱郴缁熷弬鏁� 搴撳瓨鎺у埗-WMS搴撳瓨鎺у埗ERP妯″紡 (WISE銆丆LOUD銆丮ES)锛�
+ //sHType锛氬�� 1 瀵瑰簲缂撳瓨鍒楄〃鍒犻櫎锛涘�� 2 瀵瑰簲宸蹭笂浼犳挙閿�锛�
+
+ //鍏湁浜戞ā寮�
+ if (sCloudMode == "N")
+ {
+ string sFormId = ""; //涓氬姟瀵硅薄琛ㄥ崟Id
+
+ //鐢熶骇姹囨姤鍗�
+ if (HBillType == "3711")
+ {
+ sFormId = "PRD_MORPT";
+ }
+ //閲囪喘鍏ュ簱鍗曘�佸澶栧叆搴撳崟
+ else if (HBillType == "1201" || HBillType == "1210")
+ {
+ sFormId = "STK_InStock";
+ }
+ //鐢熶骇鍏ュ簱鍗�
+ else if (HBillType == "1202")
+ {
+ sFormId = "PRD_INSTOCK";
+ }
+ //鍏朵粬鍏ュ簱鍗�
+ else if (HBillType == "1203")
+ {
+ sFormId = "STK_MISCELLANEOUS";
+ }
+ //鍙楁墭鍔犲伐鍏ュ簱鍗�
+ else if (HBillType == "1212")
+ {
+ sFormId = "STK_OEMInStock";
+ }
+ //棰嗘枡鍑哄簱鍗�
+ else if (HBillType == "1204")
+ {
+ sFormId = "PRD_PickMtrl";
+ }
+ //閿�鍞嚭搴撳崟
+ else if (HBillType == "1205")
+ {
+ sFormId = "SAL_OUTSTOCK";
+ }
+ //鍏朵粬鍑哄簱鍗�
+ else if (HBillType == "1206")
+ {
+ sFormId = "STK_MisDelivery";
+ }
+ //濮斿鍑哄簱鍗�
+ else if (HBillType == "1211")
+ {
+ sFormId = "SUB_PickMtrl";
+ }
+ //鐢熶骇琛ユ枡鍗�
+ else if (HBillType == "1254")
+ {
+ sFormId = "PRD_FeedMtrl";
+ }
+ //濮斿琛ユ枡鍗�
+ else if (HBillType == "1255")
+ {
+ sFormId = "SUB_FEEDMTRL";
+ }
+ //鍙楁墭鍔犲伐鍑哄簱鍗曪紙鍙楁墭鍔犲伐閫�鏂欙級
+ else if (HBillType == "1213")
+ {
+ sFormId = "STK_OEMInStockRETURN";
+ }
+ //鐩存帴璋冩嫧鍗�
+ else if (HBillType == "1207")
+ {
+ sFormId = "STK_TransferDirect";
+ }
+ //鍒嗘寮忚皟鍑哄崟
+ else if (HBillType == "1250")
+ {
+ sFormId = "STK_TRANSFEROUT";
+ }
+ //鍒嗘寮忚皟鍏ュ崟
+ else if (HBillType == "1251")
+ {
+ sFormId = "STK_TRANSFERIN";
+ }
+ //閲囪喘閫�鏂欏崟锛堥噰璐叆搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1239")
+ {
+ sFormId = "PUR_MRB";
+ }
+ //鐢熶骇閫�搴撳崟锛堜骇鍝佸叆搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1245")
+ {
+ sFormId = "PRD_RetStock";
+ }
+ //鍏朵粬鍏ュ簱鍗曪紙绾㈠瓧锛�
+ else if (HBillType == "1248")
+ {
+ sFormId = "";
+ }
+ //濮斿閫�搴撳崟锛堝澶栧叆搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1246")
+ {
+ sFormId = "";
+ }
+ //鐢熶骇閫�鏂欏崟锛堢敓浜ч鏂欏崟绾㈠瓧锛�
+ else if (HBillType == "1244")
+ {
+ sFormId = "PRD_ReturnMtrl";
+ }
+ //閿�鍞��璐у崟锛堥攢鍞嚭搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1247")
+ {
+ sFormId = "SAL_RETURNSTOCK";
+ }
+ //鍏朵粬鍑哄簱鍗曪紙绾㈠瓧锛�
+ else if (HBillType == "1249")
+ {
+ sFormId = "";
+ }
+ //濮斿閫�鏂欏崟锛堝澶栧嚭搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1238")
+ {
+ sFormId = "SUB_RETURNMTRL";
+ }
+
+ //鐧诲綍閲戣澏
+ var loginRet = InvokeHelper.Login();
+ var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+ //鍒ゆ柇鏄惁鐧诲綍鎴愬姛
+ if (isSuccess < 0)
+ {
+ sErrMsg = "榛樿閲戣澏浜戣处鍙风櫥褰曞け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ //鍗曟嵁鏌ヨ
+ var sJson = new
+ {
+ FormId = sFormId,
+ FieldKeys = "FBillNo",
+ FilterString = $@"FBillNo='{HBillNo}'",
+ OrderString = "",
+ TopRowCount = 0,
+ StartRow = 0,
+ Limit = 0
+ }; ;
+ var _result = InvokeHelper.Query(sFormId, JsonConvert.SerializeObject(sJson));
+ var _saveObj = JArray.Parse(_result);
+
+ //鍒ゆ柇杩斿洖鐨勬暟缁勪腑鏈夋棤鏁版嵁锛屾棤鏁版嵁浠h〃娌℃煡璇㈠埌瀵瑰簲鍗曟嵁
+ if (_saveObj.Count == 0)
+ {
+ return true;
+ }
+ else
+ {
+ //sHType = 1瀵瑰簲缂撳瓨鍒楄〃鍒犻櫎
+ if (sHType == 1)
+ {
+ //鍒ゆ柇杩斿洖鐨勬暟缁勬暟鎹腑鏄惁瀛樺湪"false"锛屽瓨鍦ㄤ唬琛ㄩ�掑叆鐨勪笟鍔″璞¤〃鍗旾d涓嶆纭�
+ if (_saveObj[0][0].ToString().Contains("false") == true)
+ {
+ return true;
+ }
+ else
+ {
+ sErrMsg = "鏁版嵁瀛樺湪寮傚父锛屼笉鍏佽鍒犻櫎锛佸崟鎹彿锛�" + HBillNo + " 鍦ㄩ噾铦朵簯涓凡鐢熸垚鍗曟嵁锛岃鍏堝湪閲戣澏浜戦噷鍒犻櫎璇ュ崟鎹紝骞跺湪缂撳瓨鍒楄〃鐨勫凡涓婁紶鐣岄潰鎾ら攢璇ュ崟鎹紝鍐嶅璇ュ崟鎹繘琛岀紪杈戞垨鍒犻櫎鎿嶄綔锛�";
+ return false;
+ }
+ }
+ //sHType = 2瀵瑰簲宸蹭笂浼犳挙閿�
+ else
+ {
+ //鍒ゆ柇杩斿洖鐨勬暟缁勬暟鎹腑鏄惁瀛樺湪"false"锛屽瓨鍦ㄤ唬琛ㄩ�掑叆鐨勪笟鍔″璞¤〃鍗旾d涓嶆纭�
+ if (_saveObj[0][0].ToString().Contains("false") == true)
+ {
+ sErrMsg = "姝ゆā鍧楁殏涓嶆敮鎸佹挙閿�鍔熻兘锛�";
+ return false;
+ }
+ else
+ {
+ sErrMsg = "鎾ら攢鍗曟嵁澶辫触锛屽崟鎹彿锛�" + HBillNo + "锛岄噾铦朵簯閲屾湭鍒犻櫎锛屼笉鍏佽鎾ら攢锛�";
+ return false;
+ }
+ }
+ }
+ }
+ }
+ //绉佹湁浜戞ā寮�
+ else
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_BillQuery " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + sERPMode + "'," + sHType.ToString(), "h_p_WMS_BillQuery");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ sErrMsg = "鍗曟嵁鏌ヨ鍙戠敓閿欒锛�";
+ return false;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ }
#endregion
#endregion
@@ -2378,6 +3000,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1202";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveProductInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2421,6 +3044,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();
@@ -2519,6 +3143,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1201";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SavePOStockInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2678,7 +3303,7 @@
websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
websLsmain.HStockStyle = lsmain[0].HStockStyle;
websLsmain.HBillSubType = lsmain[0].HBillSubType;
- if(lsmain[0].HMainSourceBillType== "1241")
+ if (lsmain[0].HMainSourceBillType == "1241")
{
websLsmain.HMainSourceBillType = "鍏ュ簱鐢宠鍗�";
}
@@ -2744,6 +3369,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1203";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveOtherInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2768,6 +3394,89 @@
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_SaveInceptEntInBill_Json")]
+ [HttpPost]
+ public object set_SaveInceptEntInBill_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.HStockStyle = lsmain[0].HStockStyle;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ if (lsmain[0].HMainSourceBillType == "1130")
+ {
+ 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_SaveInceptEntInBill_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;
}
@@ -2831,6 +3540,10 @@
{
websLsmain.HMainSourceBillType = "鐢熶骇璁㈠崟";
}
+ else if (lsmain[0].HMainSourceBillType == "1256")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇棰嗘枡鐢宠鍗�";
+ }
else
{
websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
@@ -2840,7 +3553,7 @@
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
- if(sSourceType== "3710")
+ if (sSourceType == "3710")
{
sSourceType = "3720";
}
@@ -2898,6 +3611,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1204";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveMateOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3138,6 +3852,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1205";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveSellOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3222,6 +3937,8 @@
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+
if (oWebs.set_SaveEntrustOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
{
objJsonResult.code = "0";
@@ -3275,6 +3992,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1211";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveEntrustOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3413,6 +4131,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1206";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveOtherOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3550,6 +4269,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1254";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3609,6 +4329,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1255";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveEntrustReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3642,6 +4363,64 @@
#endregion
+ #region 鍙楁墭鍔犲伐鍑哄簱 涓婁紶鐢熷崟
+
+ #region 鍙楁墭鍔犲伐鍑哄簱 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鍙楁墭鍔犲伐鍑哄簱鏍¢獙涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveInceptEntOutBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveInceptEntOutBill_BillCheck_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);
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1213";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveInceptEntOutBill_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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
#region 鐩存帴璋冩嫧 涓婁紶鐢熷崟
#region 鐩存帴璋冩嫧 鏂板妯″紡
@@ -3654,13 +4433,144 @@
[HttpPost]
public object set_SaveMoveStockBill_Json([FromBody] JObject oMain)
{
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMoveStockBillMainByJson(msg1);
+ WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
+ 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;
+ if (oSystemParameter.omodel.WMS_CampanyName == "灏忓崼") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
+ {
+ websLsmain.HSupID = lsmain[0].HCusID;
+ }
+ else
+ {
+ 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;
+ websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
+ websLsmain.HShipType = lsmain[0].HShipType;
+ if (lsmain[0].HMainSourceBillType == "1402")
+ {
+ websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1243")
+ {
+ websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "3720")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1604")
+ {
+ websLsmain.HMainSourceBillType = "濮斿鐢ㄦ枡娓呭崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1214")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "3721")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1242")
+ {
+ 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_SaveMoveStockBill(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;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鐩存帴璋冩嫧鍏嶆壂鐗╂枡鏉$爜 鏂板妯″紡
+
+ /// <summary>
+ /// 鐩存帴璋冩嫧鏂板涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMoveStockBill_AutoBarCode_Json")]
+ [HttpPost]
+ public object set_SaveMoveStockBill_AutoBarCode_Json([FromBody] JObject oMain)
+ {
var _value = oMain["oMain"].ToString();
string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string sMainStr = sArray[0].ToString(); //涓昏〃鏁版嵁
+ string sSubStr = sArray[1].ToString(); //瀛愯〃鏁版嵁
try
{
+ //涓昏〃璧嬪��
List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
ListModels oListModels = new ListModels();
- lsmain = oListModels.getMoveStockBillMainByJson(msg1);
+ lsmain = oListModels.getMoveStockBillMainByJson(sMainStr);
WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
string sSourceType = lsmain[0].HMainSourceBillType;
websLsmain.HInterID = lsmain[0].HInterID;
@@ -3683,33 +4593,9 @@
websLsmain.HStockStyle = lsmain[0].HStockStyle;
websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
websLsmain.HShipType = lsmain[0].HShipType;
- if (lsmain[0].HMainSourceBillType == "1402")
- {
- websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "1243")
- {
- websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "3720")
+ if (lsmain[0].HMainSourceBillType == "3720")
{
websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
- }
- else if (lsmain[0].HMainSourceBillType == "1604")
- {
- websLsmain.HMainSourceBillType = "濮斿鐢ㄦ枡娓呭崟";
- }
- else if (lsmain[0].HMainSourceBillType == "1214")
- {
- websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "3721")
- {
- websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "1242")
- {
- websLsmain.HMainSourceBillType = "鍑哄簱鐢宠鍗�";
}
else
{
@@ -3722,21 +4608,55 @@
websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
- if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
+ //瀛愯〃璧嬪��
+ sSubStr = sSubStr.Replace("\\", "");
+ sSubStr = sSubStr.Replace("\n", "");
+ List<Models.ClsKf_ICStockBillSub> sub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillSub>>(sSubStr);
+
+ foreach (var item in sub)
+ {
+ //鏁伴噺涓庢簮鍗曟暟閲忎笉涓�鑷存椂锛屾洿鏂版潯鐮佸嚭鍏ュ簱涓存椂琛� HQty 瀛楁鍊�
+ if (item.HQty != item.HQtyMust)
+ {
+ oCn.RunProc("Update KF_PonderationBillMain_Temp set HQty2=" + item.HQty.ToString() + " where HInterID= " + websLsmain.HInterID.ToString() + " and HBillType='" + websLsmain.HBillType + "' and HSourceInterID= " + item.HSourceInterID.ToString() + " and HSourceEntryID= " + item.HSourceEntryID.ToString());
+ }
+ }
+
+ ds = oCn.RunProcReturn("exec h_p_WMS_AutoBarCode_MoveStockBill " + websLsmain.HInterID.ToString() + ",'" + websLsmain.HBillType + "'," + websLsmain.HWHID.ToString() + ",0," + websLsmain.HSCWHID.ToString() + ",0", "h_p_WMS_AutoBarCode_MoveStockBill");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏嶆壂鐮佸垽鏂彂鐢熼敊璇紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
else
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
- objJsonResult.data = null;
- return objJsonResult;
+ if (oWebs.set_SaveMoveStockBill(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)
@@ -3775,6 +4695,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1207";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveMoveStockBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -4023,6 +4944,66 @@
#endregion
+ #region 鐢熶骇閫�搴� 涓婁紶鐢熷崟
+
+ #region 鐢熶骇閫�搴� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鐢熶骇閫�搴撴牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveProductInBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveProductInBackBill_BillCheck_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);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1245";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveProductInBackBill_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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
#region 閲囪喘閫�鏂� 涓婁紶鐢熷崟
#region 閲囪喘閫�鏂� 鏂板妯″紡
@@ -4069,6 +5050,10 @@
{
websLsmain.HMainSourceBillType = "閫�鏂欓�氱煡鍗�";
}
+ else if (lsmain[0].HMainSourceBillType == "1201")
+ {
+ websLsmain.HMainSourceBillType = "閲囪喘鍏ュ簱鍗�";
+ }
else
{
websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
@@ -4100,6 +5085,62 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "閲囪喘閫�鏂欏崟涓婁紶澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 閲囪喘閫�鏂� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 閲囪喘閫�鏂欐牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SavePOStockInBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SavePOStockInBackBill_BillCheck_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);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1239";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SavePOStockInBackBill_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;
}
@@ -4151,6 +5192,10 @@
{
websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
}
+ else if (lsmain[0].HMainSourceBillType == "1204")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇棰嗘枡鍗�";
+ }
else
{
websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
@@ -4182,6 +5227,62 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鐢熶骇閫�鏂欏崟涓婁紶澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鐢熶骇閫�鏂� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鐢熶骇閫�鏂欐牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMateOutBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveMateOutBackBill_BillCheck_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);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1244";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveMateOutBackBill_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;
}
@@ -4275,6 +5376,686 @@
#endregion
+ #region 閿�鍞��璐� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 閿�鍞��璐ф牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveSellOutBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveSellOutBackBill_BillCheck_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);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1247";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveSellOutBackBill_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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 濮斿閫�鏂� 涓婁紶鐢熷崟
+
+ #region 濮斿閫�鏂� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 濮斿閫�鏂欐牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveEntrustOutBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveEntrustOutBackBill_BillCheck_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);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1238";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveEntrustOutBackBill_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;
+ }
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 妫�楠屽崟 涓婁紶鐢熷崟
+
+ #region 妫�楠屽崟 鍚堟牸鍝�
+
+ /// <summary>
+ /// 妫�楠屽崟鏂板涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveQCPOStockInCheckBill_Json")]
+ [HttpGet]
+ public object set_SaveQCPOStockInCheckBill_Json(Int64 HInterID, string HBillNo, string HSourceBillType, string HSourceBillNo, Int64 HSourceInterID, string sHSourceEntryID, Int64 HFirstCheckEmp, string HMaker)
+ {
+ try
+ {
+ ClsQC_POStockInCheckBillMain oMain = new ClsQC_POStockInCheckBillMain();
+ oMain.HInterID = HInterID;
+ oMain.HBillNo = HBillNo;
+ oMain.HBillType = "7503";
+ oMain.HDate = DateTime.Today;
+ oMain.HMainSourceBillType = HSourceBillType;
+ oMain.HMainSourceBillNo = HSourceBillNo;
+ oMain.HMainSourceInterID = HSourceInterID;
+ oMain.HFirstCheckEmp = HFirstCheckEmp;
+ oMain.HMaker = HMaker;
+
+ if (set_SaveQCPOStockInCheckBill(oMain, HSourceBillType, sHSourceEntryID, 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;
+ }
+ }
+
+ //鐢熸垚妫�楠屽崟
+ public bool set_SaveQCPOStockInCheckBill(Model.ClsQC_POStockInCheckBillMain oMain, string HSourceBillType, string sHSourceEntryID, ref string sErrMsg)
+ {
+ string sRemark = "";
+ string HReturn;
+
+ //涓婁紶鍓嶅垽鏂�
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ DataSet BfDs = oCn.RunProcReturn("exec h_p_QC_BeforeUpload_POStockInCheckBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + HSourceBillType + "','" + sHSourceEntryID + "'," + oMain.HFirstCheckEmp.ToString(), "h_p_QC_BeforeUpload_POStockInCheckBill");
+ if (BfDs == null || BfDs.Tables[0].Rows.Count == 0)
+ {
+ sErrMsg = "涓婁紶鍓嶅垽鏂暟鎹畬鏁存�уけ璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BfDs.Tables[0].Rows[0][0]) == 1)
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + "锛屽崟鎹甀D锛�" + oMain.HInterID + "锛�" + DBUtility.ClsPub.isStrNull(BfDs.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ sRemark = sRemark + " 锛涗笂浼犲墠鍒ゆ柇" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ //杩斿洖鎵�闇�鏁版嵁
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("exec h_p_QC_POStockInCheckBill_CLD " + oMain.HMainSourceInterID.ToString() + ",'" + sHSourceEntryID + "'," + oMain.HFirstCheckEmp.ToString(), "h_p_QC_POStockInCheckBill_CLD");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0)
+ {
+ sErrMsg = "鏍规嵁鏀舵枡閫氱煡鍗曪細" + oMain.HMainSourceBillNo + " 鑾峰彇鏁版嵁澶辫触锛�";
+ return false;
+ }
+ sRemark = sRemark + " 锛涜幏鍙朇LOUD鍗曟嵁API閫掑叆鍊�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ //鑾峰彇鍗曟嵁涓昏〃鎵�闇�鏁版嵁
+ oMain.HSupID = Pub_Class.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
+ oMain.HSTOCKORGID = Pub_Class.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSTOCKORGID"]);
+
+ //鑾峰彇绯荤粺鍙傛暟
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID, ref sErrMsg) == false)
+ {
+ sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ return false;
+ }
+
+ try
+ {
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ sErrMsg = s;
+ return false;
+ }
+ oMain.HYear = sYear;
+ oMain.HPeriod = sPeriod;
+
+ oCn.BeginTran();
+ //鐢熸垚妫�楠屽崟
+ //鍐欏叆涓昏〃
+ oCn.RunProc("Insert Into QC_POStockInCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
+ ",HYear,HPeriod,HRemark,HSTOCKORGID,HSupID,HMaterID" +
+ ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
+ ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
+ ") " +
+ " values('" + oMain.HBillType + "','" + oMain.HBillType + "'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMaker + "',getdate()" +
+ ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "'," + oMain.HSTOCKORGID.ToString() + "," + oMain.HSupID.ToString() + "," + oMain.HMaterID.ToString() +
+ ", " + oMain.HCheckQty.ToString() + "," + oMain.HCheckQty.ToString() + "," + oMain.HRightQty.ToString() + "," + oMain.HBadQty.ToString() + "," + oMain.HFirstCheckEmp.ToString() +
+ ",'" + oMain.HCheckerResult + "','" + oMain.HSteelStoveNo + "','" + oMain.HSteelCompReport + "','" + oMain.HAspect + "','" + oMain.HSize + "'" +
+ ") ");
+
+ //鍐欏叆瀛愯〃
+ for (int i = 0; i < Ds.Tables[1].Rows.Count; i++)
+ {
+ Model.ClsQC_POStockInCheckBillSub oSub = new Model.ClsQC_POStockInCheckBillSub();
+ oSub.HEntryID = i + 1;
+ oSub.HSourceInterID = Pub_Class.ClsPub.isLong(Ds.Tables[1].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = Pub_Class.ClsPub.isLong(Ds.Tables[1].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillNo = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HSourceBillNo"]);
+ oSub.HSourceBillType = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HSourceBillType"]);
+ oSub.HResult = "鍚堟牸";
+ oSub.HProcCheckEmp = oMain.HFirstCheckEmp;
+ oSub.HMaterID = Pub_Class.ClsPub.isLong(Ds.Tables[1].Rows[i]["HMaterID"]);
+ oSub.HInStockQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HInStockQty"]);
+ oSub.HCheckQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HCheckQty"]);
+ oSub.HRightQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HRightQty"]);
+ oSub.HBadQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HBadQty"]);
+
+ oCn.RunProc("Insert Into QC_POStockInCheckBillSub " +
+ "(HInterID,HEntryID,HBillNo_bak,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue" +
+ ",HResult,HProcCheckEmp,HProcCheckTime" +
+ ",HMaterID,HInStockQty,HCheckQty,HRightQty,HBadQty" +
+ ") " +
+ " values(" + oMain.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oMain.HBillNo + "','" + oSub.HRemark + "'" +
+ ", " + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
+ ", " + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "'" +
+ ",'" + oSub.HResult + "'," + oSub.HProcCheckEmp.ToString() + ",getdate()" +
+ ", " + oSub.HMaterID.ToString() + "," + oSub.HInStockQty.ToString() + "," + oSub.HCheckQty.ToString() + "," + oSub.HRightQty.ToString() + "," + oSub.HBadQty.ToString() +
+ ") ");
+ }
+ sRemark = sRemark + " 锛涚敓鎴愭楠屽崟鍗曟嵁" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ //鑾峰彇閲戣澏浜慉PI鎵�闇�閫掑叆鏁版嵁
+ string sJson_MainCustom = ""; //涓昏〃鑷畾涔夊瓧娈�
+ sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
+
+ string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\",\"IsEntryBatchFill\":\"True\",\"Model\":{\"FBillNo\":\"" + oMain.HBillNo + "\"," +
+ //\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FID"]) + "\"," +
+ "\"FBillTypeID\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillTypeID"]) + "\" }," +
+ "\"FBusinessType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBusinessType"]) + "\"," +
+ "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
+ "\"FSourceOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSourceOrgId"]) + "\"}," +
+ "\"FInspectOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectOrgId"]) + "\"}," +
+ "\"FInspectDepId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectDepId"]) + "\"}," +
+ //"\"FInspectGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectGroupId"]) + "\"}," +
+ "\"FInspectorId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectorId"]) + "\"}," +
+ //"\"FDescription\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDescription"]) + "\"," +
+ //"\"FUpScanBox\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FUpScanBox"]) + "\"," +
+ //"\"FDefScanBox\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDefScanBox"]) + "\"," +
+ //"\"FCheckQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FCheckQty"]) + "\"," +
+ //"\"FInspectValScanBox\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectValScanBox"]) + "\"," +
+ "\"FIsSynced\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FIsSynced"]) + "\"," +
+ sJson_MainCustom +
+ "\"FEntity\":[";
+ string sJson_Entry = "";
+ for (int i = 0; i < Ds.Tables[1].Rows.Count; i++)
+ {
+ if (sJson_Entry != "")
+ {
+ sJson_Entry = sJson_Entry + " , ";
+ }
+ string sJson_BatchNo = "";
+ string sJson_StockPlace = "";
+ string sJson_FProduceDate = ""; //鐢熶骇鏃ユ湡
+ string sJson_FExpiryDate = ""; //鏈夋晥鏈熻嚦
+ string sJson_FAUXPROPID = "";
+ string sJson_SubCustom = ""; //瀛愯〃鑷畾涔夊瓧娈�
+
+ //瀛愯〃鑷畾涔夊瓧娈�
+ sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]);
+
+ //鏄惁鍚敤鎵规绠$悊
+ if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1")
+ {
+ sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , ";
+ }
+ else
+ {
+ sJson_BatchNo = "";
+ }
+
+ //鏄惁鍚敤淇濊川鏈熸帶鍒�
+ if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1")
+ {
+ sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\",";
+ sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\",";
+ }
+ else
+ {
+ sJson_FProduceDate = "";
+ sJson_FExpiryDate = "";
+ }
+
+ //鏄惁鍚敤浠撲綅
+ if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "")
+ {
+ sJson_StockPlace = "";
+ }
+ else
+ {
+ sJson_StockPlace = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) + "\"}},";
+ }
+
+ //杈呭姪灞炴��
+ sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},";
+
+ sJson_Entry = sJson_Entry + "{" +
+ //"FEntryID": 0,
+ "\"FMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMaterialId"]) + "\"}," +
+ //"FQCSchemeId": {"FNUMBER": ""},
+ "\"FUnitID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUnitID"]) + "\"}," +
+ "\"FInspectQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInspectQty"]) + "\"," + //妫�楠屾暟閲�
+ "\"FQualifiedQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQualifiedQty"]) + "\"," + //鍚堟牸鏁伴噺
+ "\"FUnqualifiedQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUnqualifiedQty"]) + "\"," + //涓嶅悎鏍兼暟閲�
+ //"FSampleDamageQty": 0,
+ //"FSUnqualifiedQty": 0,
+ "\"FInspectResult\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInspectResult"]) + "\"," + //妫�楠岀粨鏋�
+ "\"FQCStatus\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQCStatus"]) + "\"," + //璐ㄦ鐘舵��
+ //"FBaseSUnqualifiedQty": 0,
+ //"FSampleQty": 0,
+ //"FMemo": "",
+ "\"FIsRelated\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsRelated"]) + "\"," +
+ "\"FSrcBillType0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillType0"]) + "\"," +
+ "\"FSrcBillNo0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillNo0"]) + "\"," +
+ "\"FSrcInterId0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcInterId0"]) + "\"," +
+ "\"FSrcEntryId0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntryId0"]) + "\"," +
+ "\"FSrcEntrySeq0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntrySeq0"]) + "\"," +
+ "\"FBaseUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseUnitId"]) + "\"}," +
+ //"FQCBusinessType": "",
+ //"FBFLowId": {"FNAME": ""},
+ //"FSampleSchemeId": {"FNUMBER": ""},
+ //"FAcceptQty": 0,
+ //"FRejectQty": 0,
+ //"FInspectEndDate": "1900-01-01",
+ "\"FBaseInspectQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseInspectQty"]) + "\"," + //鍩烘湰鍗曚綅妫�楠屾暟閲�
+ "\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSupplierId"]) + "\"}," +
+ //"FCustomerId": {"FNUMBER": ""},
+ //"FProductLineId": {"FNUMBER": ""},
+ //"FPrdLineLocation": {"FLOCATIONCODE": ""},
+ //"FWorkshopId": {"FNUMBER": ""},
+ "\"FStockId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockId"]) + "\"}," +
+ sJson_BatchNo +
+ "\"FInspectTimes\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInspectTimes"]) + "\"," + //妫�楠屾鏁�
+ sJson_StockPlace +
+ //"FConsumeTime": 0,
+ //"FInspectStartDate": "1900-01-01",
+ "\"FTimeUnit\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FTimeUnit"]) + "\"," +
+ //"FBaseSampleDamageQty": 0,
+ //"FBaseUnqualifiedQty": 0,
+ //"FOperNumber": 0,
+ "\"FSampleDamageBearer\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSampleDamageBearer"]) + "\"," +
+ "\"FIsFirstInspect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsFirstInspect"]) + "\"," +
+ "\"FBaseQualifiedQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseQualifiedQty"]) + "\"," + //鍩烘湰鍗曚綅鍚堟牸鏁�
+ "\"FBaseAcceptQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseAcceptQty"]) + "\"," + //鍩烘湰鍗曚綅鎺ユ敹鏁�
+ sJson_FAUXPROPID +
+ //"FPrdUnitId": {"FNumber": ""},
+ //"FBaseReAcceptQty": 0,
+ //"FOperDescription": "",
+ //"FUnitTransHeadQty": 0,
+ //"FUnitTransOperQty": 0,
+ //"FSNUnitID": {"FNumber": ""},
+ //"FBaseWBInspectQty": 0,
+ //"FBaseUnQuaSalQty": 0,
+ //"FSupplierLot": "",
+ sJson_FProduceDate +
+ sJson_FExpiryDate +
+ //"FNewExpiryDate": "1900-01-01",
+ "\"FCurrency\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FCurrency"]) + "\"}," +
+ //"FDiscountQty": 0,
+ "\"FIsSplitRow\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsSplitRow"]) + "\"," +
+ sJson_SubCustom +
+
+ //浣跨敤鍐崇瓥琛ㄤ綋
+ "\"FPolicyDetail\": [ { " +
+ //"FDetailID": 0,
+ "\"FPolicyMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPolicyMaterialId"]) + "\"}," +
+ "\"FPolicyStatus\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPolicyStatus"]) + "\"," +
+ "\"FPolicyQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPolicyQty"]) + "\"," +
+ "\"FBasePolicyQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBasePolicyQty"]) + "\"," +
+ "\"FUsePolicy\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUsePolicy"]) + "\"," +
+ //"FSerialId": { "FNUMBER": ""},
+ "\"FIsCheck\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsCheck"]) + "\"," +
+ "\"FIsDefectProcess\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsDefectProcess"]) + "\"," +
+ "\"FCanSale\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FCanSale"]) + "\"," +
+ "\"FIsMRBReview\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsMRBReview"]) + "\"," +
+ "\"FIsReturn\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsReturn"]) + "\"," +
+ "\"FIsRelatedDefect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsRelatedDefect"]) + "\"" +
+ //"FMRBReviewStatus": "",
+ //"FBoxNumber": "",
+ //"FMemo1": "",
+ //"FPolicyAuxPropId": {"FPOLICYAUXPROPID__FF100005": { "FNumber": ""},"FPOLICYAUXPROPID__FF100002": { "FNumber": ""}}
+ " } ]," +
+
+ //缂洪櫡璁板綍琛ㄤ綋
+ //"\"FDefectDetail\": [ { " +
+ ////"FDetailID": 0,
+ ////"FDSerialId": {"FNUMBER": ""},
+ ////"FDefectTypeId": {"FNUMBER": ""},
+ ////"FDefectQty": 0,
+ ////"FBaseDefectQty1": 0,
+ ////"FDefectReasonId": {"FNUMBER": ""},
+ ////"FDefectLevel": "",
+ ////"FDefectResultId": {"FNUMBER": ""},
+ ////"FDefectMemo": ""
+ //" } ]," +
+
+ //妫�楠岄」鐩〃浣�
+ //"\"FItemDetail\": [ { " +
+ ////"FDetailID": 0,
+ ////"FInspectItemId": { "FNUMBER": ""},
+ ////"FInspectResult1": "",
+ ////"FAnalysisMethod": "",
+ ////"FQualityStdId": { "FNUMBER": ""},
+ ////"FUnitId2": { "FNUMBER": ""},
+ ////"FInspectValQ": 0,
+ ////"FInspectValB": { "FNUMBER": ""},
+ ////"FInspectValT": "",
+ ////"FInspectMethodId": { "FNUMBER": ""},
+ ////"FInspectInstrumentId": { "FNUMBER": ""},
+ ////"FDefectlevel1": "",
+ ////"FDestructInspect": "false",
+ ////"FKeyInspect": "false",
+ ////"FInspectBasisId": { "FNUMBER": ""},
+ ////"FSampleSchemeId1": { "FNUMBER": ""},
+ ////"FItemStatus": "",
+ ////"FCompareSymbol": "",
+ ////"FSampleQty1": 0,
+ ////"FAcceptQty1": 0,
+ ////"FRejectQty1": 0,
+ ////"FSampleDamageQty1": 0,
+ ////"FBaseSampleDamageQty1": 0,
+ ////"FItemMemo": "",
+ ////"FSUnqualifiedQty1": 0,
+ ////"FBaseSUnqualifiedQty1": 0,
+ ////"FTargetVal": "",
+ ////"FInspectVal": "",
+ ////"FUpLimit": "",
+ ////"FDownLimit": "",
+ ////"FUpOffset": "",
+ ////"FDownOffset": "",
+ ////"FInspectValKey": "",
+ ////"FTargetValKey": "",
+ ////"FUpLimitKey": "",
+ ////"FDownLimitKey": "",
+ ////"FUpOffsetKey": "",
+ ////"FDownOffsetKey": "",
+ ////"FTargetValQ": 0,
+ ////"FUpLimitQ": 0,
+ ////"FDownLimitQ": 0,
+ ////"FUpOffsetQ": 0,
+ ////"FDownOffsetQ": 0,
+ ////"FTargetValB": { "FNUMBER": ""},
+ ////"FUpLimitB": { "FNUMBER": ""},
+ ////"FDownLimitB": { "FNUMBER": ""},
+ ////"FUpOffsetB": { "FNUMBER": ""},
+ ////"FDownOffsetB": { "FNUMBER": ""},
+ ////"FTargetValT": "",
+ ////"FUpLimitT": "",
+ ////"FDownLimitT": "",
+ ////"FUpOffsetT": "",
+ ////"FDownOffsetT": "",
+ ////"FValueGrid": [
+ //// {
+ //// "FGridId": 0,
+ //// "FInspectResult2": "",
+ //// "FInspectValueB": { "FNUMBER": ""},
+ //// "FInspectValueT": "",
+ //// "FInspectValue": 0,
+ //// "FVSerialId": { "FNUMBER": ""}
+ //// }
+ ////]
+ //" } ]," +
+
+ //鍙傝�冭〃浣�
+ "\"FReferDetail\": [ { " +
+ //"FDetailID": 0,
+ "\"FSrcBillType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillType"]) + "\"," +
+ "\"FSrcBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillNo"]) + "\"," +
+ "\"FSrcInterId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcInterId"]) + "\"," +
+ "\"FSrcEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntryId"]) + "\"," +
+ "\"FSrcEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntrySeq"]) + "\"," +
+ "\"FOrderType\":{\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderType"]) + "\"}," +
+ "\"FOrderBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderBillNo"]) + "\"," +
+ "\"FOrderId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderId"]) + "\"," +
+ "\"FOrderEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderEntryId"]) + "\"," +
+ "\"FOrderEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderEntrySeq"]) + "\"" +
+ " } ]," +
+
+ //鍏宠仈鍏崇郴琛�
+ "\"FEntity_Link\": [ { " +
+ "\"FEntity_Link_FFlowId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowId"]) + "\"," +
+ "\"FEntity_Link_FFlowLineId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowLineId"]) + "\"," +
+ "\"FEntity_Link_FRuleId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FRuleId"]) + "\"," +
+ "\"FEntity_Link_FSTableName\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSTableName"]) + "\"," +
+ "\"FEntity_Link_FSBillId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSBillId"]) + "\"," +
+ "\"FEntity_Link_FSId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSId"]) + "\"," +
+ "\"FEntity_Link_FBaseAcceptQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBaseAcceptQty"]) + "\"," +
+ "\"FEntity_Link_FBaseAcceptQtyOld\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBaseAcceptQtyOld"]) + "\"," +
+ "\"FEntity_Link_FBaseInspectQtyOld\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBaseInspectQtyOld"]) + "\"," +
+ "\"FEntity_Link_FInspectQtyOld\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FInspectQtyOld"]) + "\"" +
+ " } ] } ";
+ }
+ string sJson_End = " ] }}";
+ string sJson = sJson_Main + sJson_Entry + sJson_End;
+
+ //CLOUD閲戣澏浜戣处鍙峰瘑鐮佺櫥鍏�
+ var loginRet = InvokeHelper.LoginUser(oMain.HMaker);
+ var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+ sRemark = sRemark + " 锛涜幏鍙栭獙璇丆LOUD璐﹀彿瀵嗙爜" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ //鐢熸垚閲戣澏浜戝崟鎹�
+ if (isSuccess == 1)
+ {
+ string result = InvokeHelper.Save("QM_InspectBill", sJson); //淇濆瓨
+ sRemark = sRemark + " 锛涚敓鎴怌LOUD鍗曟嵁" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ HReturn = result.ToString();
+
+ if (HReturn.Contains("\"IsSuccess\":false") == true)
+ {
+ //鍙嶅簭鍒楀寲json鏁版嵁
+ var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn);
+ //鎺ユ敹閲戣澏鎶ラ敊淇℃伅
+ var strErrorMsg = string.Empty;
+ //閬嶅巻鑾峰彇鎶ラ敊淇℃伅
+ foreach (var item in retModel.Result.ResponseStatus.Errors)
+ {
+ strErrorMsg += item.Message + "\r\n";
+ };
+ sErrMsg = "鐢熸垚妫�楠屽崟澶辫触锛侀噾铦朵簯鎻愮ず锛�" + strErrorMsg;
+ LogService.Write("鐢熸垚妫�楠屽崟澶辫触锛�" + HReturn + sJson); //鍐欏叆txt鏂囨湰
+ oCn.RollBack();
+ return false;
+ }
+ else
+ {
+ sRemark = sRemark + sJson;
+ // 鎻愪氦鍜屼繚瀛樺崟鎹�
+ string result1 = string.Empty;
+ string result2 = string.Empty;
+ var fID = JObject.Parse(result)["Result"]["Id"].ToString();
+ var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
+ var json = new
+ {
+ Ids = fID,
+ };
+
+ result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//鎻愪氦
+ result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//瀹℃牳
+ if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ {
+ oCn.RollBack();
+ sErrMsg = $"鏉ユ枡妫�楠屽崟鍙凤細{fBillNo}锛屾彁浜ゅけ璐�" + result;
+ return false;
+ }
+ oCn.Commit();
+ }
+ }
+ else
+ {
+ sErrMsg = "鐢熸垚妫�楠屽崟澶辫触锛侀噾铦朵簯鐧诲綍澶辫触锛�";
+ oCn.RollBack();
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ LogService.Write("鐢熸垚鍥炴粴" + e.Message + sRemark);
+ sErrMsg = "鐢熸垚妫�楠屽崟澶辫触锛�" + e.Message;
+ oCn.RollBack();
+ return false;
+ }
+
+ if (oSystemParameter.omodel.QC_POStockInCheckBill_AutoCheck.ToUpper() == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ try
+ {
+ oCn.BeginTran();
+ //瀹℃牳WMS鍗曟嵁
+ oCn.RunProc("Update QC_POStockInCheckBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString());
+
+ //鎻愪氦銆佸鏍搁噾铦朵簯鍗曟嵁
+ HReturn = "";
+ string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
+ var result2 = InvokeHelper.Submit("QM_InspectBill", sJson2); //鎻愪氦
+ sRemark = sRemark + " 锛涙彁浜LOUD鍗曟嵁" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ var result3 = InvokeHelper.Audit("QM_InspectBill", sJson2); //瀹℃牳
+ sRemark = sRemark + " 锛涘鏍窩LOUD鍗曟嵁" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
+
+ HReturn = result2.ToString() + "," + result3.ToString();
+
+ if (HReturn.Contains("\"IsSuccess\":false") == true)
+ {
+ //鍙嶅簭鍒楀寲json鏁版嵁
+ var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(result3);
+ //鎺ユ敹閲戣澏鎶ラ敊淇℃伅
+ var strErrorMsg = string.Empty;
+ //閬嶅巻鑾峰彇鎶ラ敊淇℃伅
+ foreach (var item in retModel.Result.ResponseStatus.Errors)
+ {
+ strErrorMsg += item.Message + "\r\n";
+ };
+ sErrMsg = "鐢熸垚妫�楠屽崟鎴愬姛锛屽鏍稿崟鎹け璐ワ紒閲戣澏浜戞彁绀猴細" + strErrorMsg;
+ LogService.Write("瀹℃牳鍗曟嵁澶辫触" + sRemark + HReturn);
+ oCn.RollBack();
+ return true;
+ }
+ else
+ {
+ LogService.Write("鐢熸垚骞跺鏍告楠屽崟鎴愬姛锛�" + sRemark);
+ sErrMsg = "鐢熸垚骞跺鏍告楠屽崟鎴愬姛锛佸崟鎹彿涓猴細" + oMain.HBillNo;
+ oCn.Commit();
+ return true;
+ }
+ }
+ catch (Exception e)
+ {
+ LogService.Write("瀹℃牳鍥炴粴" + sRemark + HReturn);
+ sErrMsg = "瀹℃牳妫�楠屽崟澶辫触锛�" + e.Message;
+ oCn.RollBack();
+ return false;
+ }
+ }
+ else
+ {
+ LogService.Write("鐢熸垚妫�楠屽崟鎴愬姛锛�" + sRemark);
+ sErrMsg = "鐢熸垚妫�楠屽崟鎴愬姛锛佸崟鎹彿涓猴細" + oMain.HBillNo;
+ return true;
+ }
+ }
+
+ #endregion
+
#endregion
#region 鐢熶骇缁勬墭鍗� 涓婁紶鐢熷崟
@@ -4316,6 +6097,33 @@
}
}
+ #endregion
+
+ #region 灏忓崼缁勬墭鏉$爜灞曠ず
+ [Route("WEBSController/get_SavePackUnion_xiaowei")]
+ [HttpGet]
+ public object get_SavePackUnion_xiaowei(string HBarCode_Pack)
+ {
+ try
+ {
+
+ DataSet ds = oCn.RunProcReturn($"select * from h_v_get_PackUnionBill where 鏍堟澘鐮�='{HBarCode_Pack}'", "h_v_get_PackUnionBill");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "success";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#endregion
#region 涓婃枡闃查敊鍗� 涓婁紶鐢熷崟
@@ -4542,6 +6350,28 @@
}
else
{
+
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ DataSet dds = oCn.RunProcReturn("Exec h_p_KF_ICInventory_WorkShop_BeforeDelCtrl " + mainList[0].HInterID.ToString(), "h_p_KF_ICInventory_WorkShop_BeforeDelCtrl");
+
+ if (dds == null)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(dds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//鏇存柊杞﹂棿鐗╂枡搴撳瓨
oCn.RunProc("EXEC h_p_WMS_UPDateICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "'");
//鏇存柊杞﹂棿鏉$爜搴撳瓨
@@ -4696,7 +6526,7 @@
lsmain = oListModels.getObjectByJson_Kf_TrolleyPositionBillMain(msg2);
foreach (Model.ClsKf_TrolleyPositionBillMain oItem in lsmain)
- {
+ {
DBUtility.ClsPub.CurUserName = oItem.HMaker;
oItem.HBillType = "10004";
oItem.HBillSubType = "10004";
@@ -4738,7 +6568,7 @@
bool bResult;
if (OperationType == "1")
{
- bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
}
else
{
@@ -4991,6 +6821,48 @@
#endregion
+ #region 鍙楁墭鍔犲伐鍏ュ簱 鎵弿婧愬崟鏉$爜
+
+ /// <summary>
+ /// 鍙楁墭鍔犲伐鍏ュ簱 鎵弿婧愬崟鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/Get_SourceBarCode_InceptEntIn_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_InceptEntIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+ {
+ try
+ {
+ WebSoBar = oWebs.get_SourceBarCode_InceptEntIn(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>
@@ -5007,7 +6879,7 @@
{
if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") //绯荤粺鍙傛暟鏄惁涓虹鏈変簯妯″紡,N涓哄叕鏈変簯妯″紡锛孻涓虹鏈変簯妯″紡
{
- if(HSourceBillType == "1214")
+ if (HSourceBillType == "1214")
{
//閲嶆柊鍚屾鐢熶骇鍙戞枡閫氱煡鍗�
Kf_MateOutRequestBillController obill = new Kf_MateOutRequestBillController();
@@ -5252,6 +7124,52 @@
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;
+ }
+ }
+
+ /// <summary>
+ /// 鐩存帴璋冩嫧鍏嶆壂鐗╂枡鏉$爜妯″潡 鎵弿婧愬崟鏉$爜 20250818
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_SourceBarCode_MoveStock_AutoBarCode_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_MoveStock_AutoBarCode_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HOWNERID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MoveStock_AutoBarCode " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_MoveStock_AutoBarCode");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
}
@@ -5538,7 +7456,7 @@
sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
SourceFlag = true;
}
- else if(oSystemParameter.omodel.WMS_CampanyName == "妫シ" && HSourceBillType == "1241")
+ else if (oSystemParameter.omodel.WMS_CampanyName == "妫シ" && HSourceBillType == "1241")
{
//鑷姩鍖呰绾垮悓姝ラ噾铦剁敓浜у叆搴撶敵璇峰崟
sJXCode = Kf_OtherInBill_SK(sBarCode, HCustom1);
@@ -5593,7 +7511,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- }
+ }
#endregion
@@ -5673,7 +7591,7 @@
{
if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
{
- sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
+ sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
SourceFlag = true;
}
else
@@ -6079,10 +7997,10 @@
#endregion
- #region 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧�
+ #region 鎵弿鍗曟嵁鏉$爜 20251225
/// <summary>
- /// 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧� 鏍¢獙妯″紡
+ /// 鎵弿鍗曟嵁鏉$爜 鏍¢獙妯″紡
/// </summary>
/// <returns></returns>
[Route("WEBSController/get_BillBarCode_BillCheck_Json")]
@@ -6121,7 +8039,7 @@
#endregion
- #region 鎵弿鍗曟嵁鏉$爜 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁 20241216
+ #region 鎵弿鍗曟嵁鏉$爜 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁 20251225
/// <summary>
/// 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁
@@ -6163,7 +8081,7 @@
#endregion
- #region 鎵弿鐗╂枡鏉$爜 鍑哄叆搴撴ā鍧�
+ #region 鎵弿鐗╂枡鏉$爜 20251225
/// <summary>
/// 鐗╂枡鏉$爜鏂囨湰妗� 鏍¢獙鎵爜璋冪敤 鏍¢獙妯″紡
@@ -6171,7 +8089,7 @@
/// <returns></returns>
[Route("WEBSController/get_CheckTypeByBarCode_BillCheck_Json")]
[HttpGet]
- public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID)
+ public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HStockOrgID)
{
//鑾峰彇绯荤粺鍙傛暟
string sErrMsg = "";
@@ -6220,6 +8138,20 @@
}
//鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
if (oSystemParameter.omodel.Kf_OtherInBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //鍙楁墭鍔犲伐鍏ュ簱鍗�
+ else if (HBillType == "1212")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_AutoBarCode.ToUpper() == "Y")
{
sAutoBarCode = "Y";
}
@@ -6308,6 +8240,20 @@
sAutoBarCode = "Y";
}
}
+ //鍙楁墭鍔犲伐鍑哄簱鍗�
+ else if (HBillType == "1213")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
//鐩存帴璋冩嫧鍗�
else if (HBillType == "1207")
{
@@ -6318,6 +8264,76 @@
}
//鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
if (oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //閲囪喘閫�鏂欏崟
+ else if (HBillType == "1239")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //鐢熶骇閫�搴撳崟
+ else if (HBillType == "1245")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //鐢熶骇閫�鏂欏崟
+ else if (HBillType == "1244")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //閿�鍞��璐у崟
+ else if (HBillType == "1247")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //濮斿閫�鏂欏崟
+ else if (HBillType == "1238")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
{
sAutoBarCode = "Y";
}
@@ -6367,11 +8383,19 @@
//鍘熷崟鎹潪鎵爜鐢熸垚锛屾牎楠屾椂鐢熸垚鏉$爜璁板綍
else
{
- WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck_New(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, 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 if (WebSoBar.HRemark == "浠呮彁绀�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 2;
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
objJsonResult.data = null;
return objJsonResult;
@@ -6393,8 +8417,8 @@
objJsonResult.Message = "鏍¢獙妯″紡锛屾壂鎻忔潯鐮佸け璐ワ紒" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
- }
}
+ }
else
{
objJsonResult.code = "0";
@@ -6407,7 +8431,71 @@
#endregion
- #region 杩斿洖鍗曟嵁鍒楄〃淇℃伅 20241114
+ #region 鎵弿鐗╂枡鏉$爜 鍚敤鍏堣繘鍏堝嚭浠呮彁绀烘帶鍒讹紝鏉$爜涓嶅湪鍏堣繘鍏堝嚭鍒楄〃涓厑璁告壂鎻忓啓鍏� 20251225
+
+ /// <summary>
+ /// 鍚敤鍏堣繘鍏堝嚭浠呮彁绀烘帶鍒讹紝鏉$爜涓嶅湪鍏堣繘鍏堝嚭鍒楄〃涓� 瀛樺叆鏉$爜鍑哄叆搴撲复鏃惰〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck_Json")]
+ [HttpGet]
+ public Object get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ string sJXCode = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
+ {
+ sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
+ }
+ else
+ {
+ sJXCode = sBarCode;
+ }
+ try
+ {
+ WebSoBar = oWebs.get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, 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;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 杩斿洖鍗曟嵁鍒楄〃淇℃伅 20251225
/// <summary>
/// 杩斿洖鍗曟嵁鍒楄〃淇℃伅 鏍¢獙妯″紡
@@ -6454,7 +8542,8 @@
objJsonResult.data = new
{
Materlist = ds.Tables[0], //杩斿洖鐗╂枡鏄庣粏鍒楄〃淇℃伅锛�0锛�
- BarCodeDetailslist = ds.Tables[1], //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛�
+ BarCodeDetailslist = ds.Tables[1], //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�1锛�
+ FIFOlist = ds.Tables[2], //杩斿洖鍏堣繘鍏堝嚭鍒楄〃淇℃伅锛�2锛�
};
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -6523,7 +8612,7 @@
#endregion
- #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20241114
+ #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20251225
/// <summary>
/// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
@@ -6579,7 +8668,7 @@
{
//鑾峰彇绯荤粺鍙傛暟
string sErrMsg = "";
- if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
@@ -6617,6 +8706,123 @@
objJsonResult.data = null;
return objJsonResult;
}
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鎵爜妯″潡 閫�鍑哄姛鑳芥寜閽皟鐢� 鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬侊紙鏇存柊 HlineStatus =1锛� 20251225
+
+ /// <summary>
+ /// 鎵爜妯″潡锛岄��鍑烘椂鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬� HlineStatus
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_UPDateFIFOTmp_BillCheck_Json")]
+ [HttpGet]
+ public object set_UPDateFIFOTmp_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ string sFIFOCtl = "N"; //鍏堣繘鍏堝嚭鎺у埗锛�1銆佷笉鎺у埗浠呮樉绀轰笅鏋舵竻鍗� 2銆佷弗鏍兼帶鍒跺厛杩涘厛鍑� 3銆佷粎鎻愮ず鍜屾樉绀轰笅鏋舵竻鍗� 4銆佷笉鏄剧ず涓嬫灦娓呭崟涔熶笉鎺у埗锛�
+
+ #region 绯荤粺鍙傛暟鑾峰彇
+ //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1204"
+ && oSystemParameter.omodel.Kf_MateOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1205"
+ && oSystemParameter.omodel.Kf_SellOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1206"
+ && oSystemParameter.omodel.Kf_OtherOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1211"
+ && oSystemParameter.omodel.Kf_EntrustOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐢熶骇琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1254"
+ && oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1255"
+ && oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍙楁墭鍔犲伐鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1213"
+ && oSystemParameter.omodel.Kf_InceptEntOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1207"
+ && oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ #endregion
+
+ try
+ {
+ if (sFIFOCtl == "Y")
+ {
+ //鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
+ oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp_BillCheck " + 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
@@ -6682,7 +8888,7 @@
#endregion
- #region 鏍¢獙缂撳瓨妯″潡 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰� 20241216
+ #region 鏍¢獙缂撳瓨妯″潡 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰� 20251225
/// <summary>
/// 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰�
@@ -6699,6 +8905,7 @@
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ string sFIFOCtl = "4"; //鍏堣繘鍏堝嚭鎺у埗锛�1銆佷笉鎺у埗浠呮樉绀轰笅鏋舵竻鍗� 2銆佷弗鏍兼帶鍒跺厛杩涘厛鍑� 3銆佷粎鎻愮ず鍜屾樉绀轰笅鏋舵竻鍗� 4銆佷笉鏄剧ず涓嬫灦娓呭崟涔熶笉鎺у埗锛�
#region 绯荤粺鍙傛暟鑾峰彇
//閲囪喘鍏ュ簱鍗�
@@ -6728,6 +8935,15 @@
sSourceBarCodeCtl = "Y";
}
}
+ //鍙楁墭鍔犲伐鍏ュ簱鍗�
+ else if (HBillType == "1212")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
//棰嗘枡鍑哄簱鍗�
else if (HBillType == "1204")
{
@@ -6736,6 +8952,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl;
}
//閿�鍞嚭搴撳崟
else if (HBillType == "1205")
@@ -6745,6 +8963,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl;
}
//鍏朵粬鍑哄簱鍗�
else if (HBillType == "1206")
@@ -6754,6 +8974,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl;
}
//濮斿棰嗘枡鍗�
else if (HBillType == "1211")
@@ -6763,6 +8985,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl;
}
//鐢熶骇琛ユ枡鍗�
else if (HBillType == "1254")
@@ -6772,6 +8996,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl;
}
//濮斿琛ユ枡鍗�
else if (HBillType == "1255")
@@ -6781,12 +9007,72 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl;
+ }
+ //鍙楁墭鍔犲伐鍑哄簱鍗�
+ else if (HBillType == "1213")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl;
}
//鐩存帴璋冩嫧鍗�
else if (HBillType == "1207")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl;
+ }
+ //閲囪喘閫�鏂欏崟
+ else if (HBillType == "1239")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�搴撳崟
+ else if (HBillType == "1245")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�鏂欏崟
+ else if (HBillType == "1244")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閿�鍞��璐у崟
+ else if (HBillType == "1247")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //濮斿閫�鏂欏崟
+ else if (HBillType == "1238")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -6827,6 +9113,12 @@
try
{
oCn.BeginTran();
+ //鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛ㄨ褰�
+ if (sFIFOCtl == "1" || sFIFOCtl == "2" || sFIFOCtl == "3")
+ {
+ oCn.RunProc("Delete from Kf_ICInventory_FIFO_Tmp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ //鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HSubBillType=1", ref DBUtility.ClsPub.sExeReturnInfo);
//鍐欏叆鏃ュ織
oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
@@ -7036,6 +9328,15 @@
sSourceBarCodeCtl = "Y";
}
}
+ //鍙楁墭鍔犲伐鍏ュ簱鍗�
+ else if (HBillType == "1212")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
//棰嗘枡鍑哄簱鍗�
else if (HBillType == "1204")
{
@@ -7090,11 +9391,65 @@
sSourceBarCodeCtl = "Y";
}
}
+ //鍙楁墭鍔犲伐鍑哄簱鍗�
+ else if (HBillType == "1213")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
//鐩存帴璋冩嫧鍗�
else if (HBillType == "1207")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閲囪喘閫�鏂欏崟
+ else if (HBillType == "1239")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�搴撳崟
+ else if (HBillType == "1245")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�鏂欏崟
+ else if (HBillType == "1244")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閿�鍞��璐у崟
+ else if (HBillType == "1247")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //濮斿閫�鏂欏崟
+ else if (HBillType == "1238")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -7222,15 +9577,64 @@
}
}
else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鏍¢獙妯″潡 杩斿洖婧愬崟鍒楄〃淇℃伅
+ /// <summary>
+ /// 婧愬崟鍒楄〃淇℃伅锛屾牴鎹崟鎹被鍨嬨�佺粍缁嘔D杩斿洖婧愬崟鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetCheckBillList_Json")]
+ [HttpGet]
+ public object GetCheckBillList_Json(string HBillType, Int64 HStockOrgID, string HBillNo, string HMater, string HCustom)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_GetCheckBillList '" + HBillType + "'," + HStockOrgID.ToString() + ",'" + HBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetCheckBillList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ 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
@@ -7250,13 +9654,20 @@
{
try
{
- WebS.ClsGy_BarCodeBill_WMS_Model WebSoBarModel = new WebS.ClsGy_BarCodeBill_WMS_Model();
- WebSoBarModel = oWebs.get_PackBarCode_PackUnionBill(HInterID, HBillNo, HBillType, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
- if (WebSoBarModel == null)
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_PackUnionBill");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.Message = "鎵弿鎵樻潯鐮佸彂鐢熼敊璇紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
@@ -7264,8 +9675,8 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = WebSoBarModel;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
}
@@ -7294,6 +9705,52 @@
try
{
ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "'", "h_p_WMS_AddPackBarCode_PackUnionBill_New");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿瀹㈡埛绠憋紙鎵橈級鏉$爜 -鍑礉瑁呯鍗� 20251103
+
+ [Route("WEBSController/Get_PackBarCode_PackUnionBill_New_Json_Cus")]
+ [HttpGet]
+ public object Get_PackBarCode_PackUnionBill_New_Json_Cus(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New_Cus " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HSourceBillNo + "'", "h_p_WMS_AddPackBarCode_PackUnionBill_New_Cus");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -7386,7 +9843,7 @@
string sErrMsg = "";
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
- string sMaterialCtl = "Y"; //缁勬墭鏃舵墭鏉$爜瀵瑰簲鐗╂枡涓庨渶瑕佺粍鎵樼殑鏉$爜瀵瑰簲鐗╂枡瑕佷竴鑷达紙Y涓洪渶涓�鑷达級
+ string sMaterialCtl = "Y"; //缁勬墭鐗╂枡鏄惁涓�鑷存帶鍒讹紙Y涓烘帶鍒讹級
string sSourceBillTypeCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟绫诲瀷鎺у埗锛圷涓烘帶鍒讹級
string sSourceBillNoCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟鎺у埗锛圷涓烘帶鍒讹級
sMaterialCtl = oSystemParameter.omodel.Sc_PackUnionBill_MaterialCtl.ToUpper();
@@ -7396,6 +9853,146 @@
try
{
ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionBill_New '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HMaterNumber_Pack + "','" + sMaterialCtl + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill_New");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴旀潯鐮�--xiaowei 20250630
+
+ /// <summary>
+ /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴旀潯鐮�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_BarCode_PackUnionBill_New_Json_xiaowei")]
+ [HttpGet]
+ public object get_BarCode_PackUnionBill_New_Json_xiaowei(string HBarCode, Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HMaterNumber_Pack, string HMaker, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ string sMaterialCtl = "Y"; //缁勬墭鐗╂枡鏄惁涓�鑷存帶鍒讹紙Y涓烘帶鍒讹級
+ string sSourceBillTypeCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟绫诲瀷鎺у埗锛圷涓烘帶鍒讹級
+ string sSourceBillNoCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟鎺у埗锛圷涓烘帶鍒讹級
+ sMaterialCtl = oSystemParameter.omodel.Sc_PackUnionBill_MaterialCtl.ToUpper();
+ sSourceBillTypeCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillTypeCtl.ToUpper();
+ sSourceBillNoCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillNoCtl.ToUpper();
+
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionBill_New_xiaowei '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HMaterNumber_Pack + "','" + sMaterialCtl + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill_New");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿瀹㈡埛鎵樻潯鐮佸搴旀潯鐮� -鍑礉瑁呯鍗� 20251103
+
+ /// <summary>
+ /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴旀潯鐮�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/Get_BarCode_PackUnionBill_New_Json_Cus")]
+ [HttpGet]
+ public object Get_BarCode_PackUnionBill_New_Json_Cus(string HBarCode, Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HMaterNumber_Pack, string HMaker, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ string sMaterialCtl = "Y"; //缁勬墭鐗╂枡鏄惁涓�鑷存帶鍒讹紙Y涓烘帶鍒讹級
+ string sSourceBillTypeCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟绫诲瀷鎺у埗锛圷涓烘帶鍒讹級
+ string sSourceBillNoCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟鎺у埗锛圷涓烘帶鍒讹級
+ sMaterialCtl = oSystemParameter.omodel.Sc_PackUnionBill_MaterialCtl.ToUpper();
+ sSourceBillTypeCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillTypeCtl.ToUpper();
+ sSourceBillNoCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillNoCtl.ToUpper();
+
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionBill_New_Cus '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HMaterNumber_Pack + "','" + sMaterialCtl + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill_New_Cus");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -7631,6 +10228,29 @@
#endregion
+ #region 鏍规嵁sn鐮佸鎵惧搴旂殑涓鐮�
+ [Route("WEBSController/getMiddleCodeBySn")]
+ [HttpGet]
+ public object getMiddleCodeBySn(string HBarCode, int HStockOrgID)
+ {
+ DataSet dss = oCn.RunProcReturn("select * from Gy_CaseCodeRelation where HBarCode='" + HBarCode + "'", "Gy_CaseCodeRelation");
+
+ if (dss.Tables[0].Rows[0]["HCaseCode"].ToString() == "" || dss == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈壘鍒皊n鐮佹墍瀵瑰簲鐨勪腑绠辩爜";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = dss.Tables[0];
+ return objJsonResult;
+ }
+ #endregion
+
#endregion
@@ -7846,7 +10466,7 @@
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 = "鎴愬姛";
@@ -8417,7 +11037,8 @@
try
{
ds = oCn.RunProcReturn("select * from Gy_BarCodeBill where HBarcode='" + HBarCode + "'", "Gy_BarCodeBill");
- if (ds.Tables[0].Rows.Count == 0) {
+ if (ds.Tables[0].Rows.Count == 0)
+ {
DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
string sErrMsg = "";
oSystemParameter.ShowBill(ref sErrMsg);
@@ -9212,7 +11833,7 @@
try
{
- ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_WorkShop " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "'," + HQty.ToString() + ",'" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "'," + HStockOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + sBatchNoCtl + "','" + sMustQtyCtl + "'", "h_p_WMS_AddBarCode_WorkShop");
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_WorkShop_TestByLLJ " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "'," + HQty.ToString() + ",'" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "'," + HStockOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + sBatchNoCtl + "','" + sMustQtyCtl + "'", "h_p_WMS_AddBarCode_WorkShop");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -9248,14 +11869,14 @@
}
}
else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
- objJsonResult.data = null;
- return objJsonResult;
- }
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
}
+ }
#endregion
@@ -9319,7 +11940,7 @@
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)
{
@@ -9366,7 +11987,7 @@
{
try
{
- ds = oCn.RunProcReturn("select * from h_v_Gy_MouldIsUsed where 灏忚溅鏉$爜='" + HCarBarCode + "'" , "h_v_Gy_MouldIsUsed");
+ 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";
@@ -9460,11 +12081,12 @@
/// <returns></returns>
[Route("WEBSController/GetGy_BarCodeBill_QiaoYi_PDA_Json")]
[HttpGet]
- public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sWhere)
+ public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sBarCode)
{
try
{
- ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sWhere+ "'", "h_p_Gy_BarCodeBillList_QiaoYi");
+ ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sBarCode + "'", "h_p_Gy_BarCodeBillList_QiaoYi");
+ //ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi2 '" + sBarCode + "','" + sBarCodeOutDate + "','" + sCustomerName + "','" + sSellOutBillNo + "'", "h_p_Gy_BarCodeBillList_QiaoYi2");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -9652,6 +12274,70 @@
}
#endregion
+ #region [鏍规嵁鍗曟嵁鍙� 鐗╂枡缂栫爜 鐗╂枡鍚嶇О 鐢熶骇璁㈠崟 宸ュ簭 閮ㄩ棬鑾峰彇 宸ュ簭娴佽浆鍗
+ /// <summary>
+ /// 鑾峰彇鏉$爜淇℃伅 娣诲姞宸ュ簭 閮ㄩ棬鏌ヨ鏉′欢
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetMES_ProcessExchangeBillList_APP_HaiCheng")]
+ [HttpGet]
+ public object GetMES_ProcessExchangeBillList_APP_HaiCheng(string HBillNo, string HNumber, string HName, string HICMOBillNo, string user, string HProcID, string HDeptID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeBillList_APP_HaiCheng " +
+ "@HBillNo = N'" + HBillNo + "', " +
+ "@HNumber = N'" + HNumber + "', " +
+ "@HName = N'" + HName + "', " +
+ "@HICMOBillNo = N'" + HICMOBillNo + "'," +
+ "@HProcID = N'" + HProcID + "', " +
+ "@HDeptID = N'" + HDeptID + "'"
+ , "h_p_MES_ProcessExchangeBillList_PDA_QiaoYi");
+ if ((bool)ds.Tables[1].Rows[0]["returntype"] == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = ds.Tables[1].Rows[0]["mesg"].ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (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>
/// 鏌ョ湅鏄庣粏
@@ -9663,7 +12349,7 @@
{
try
{
- ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi '" + HInterID+ "'", "h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi");
+ ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi '" + HInterID + "'", "h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -9785,7 +12471,7 @@
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
- if (HDATA=="HSPE")
+ if (HDATA == "HSPE")
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -9794,7 +12480,7 @@
objJsonResult.list = columnNameList;
return objJsonResult;
}
- else if (HDATA == "HICM")
+ else if (HDATA == "HICM")
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -9803,7 +12489,7 @@
objJsonResult.list = columnNameList;
return objJsonResult;
}
- else
+ else
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -10300,13 +12986,13 @@
columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
-
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
- return objJsonResult;
+ return objJsonResult;
}
catch (Exception e)
{
@@ -10326,7 +13012,7 @@
/// <returns></returns>
[Route("WEBSController/UpdateKf_ICInvBal")]
[HttpGet]
- public object UpdateKf_ICInvBal( )
+ public object UpdateKf_ICInvBal()
{
try
{
@@ -10362,7 +13048,7 @@
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)
@@ -10521,6 +13207,60 @@
#endregion
+ #region WMS姣忔棩杩愯鐘舵�佸垎鏋愶紙姣忔棩鍒跺崟鏁伴噺锛�
+ [Route("WEBSController/GetKf_WMSDailyRunStateReport_Json")]
+ [HttpGet]
+ public object GetKf_WMSDailyRunStateReport_Json(string sWhere, string user)
+ {
+ try
+ {
+
+ Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+ string HBeginDate = dic["HBeginDate"].ToString();
+ string HEndDate = dic["HEndDate"].ToString();
+
+ List<object> columnNameList = new List<object>();
+
+ ds = oCn.RunProcReturn("exec h_p_Kf_WMSDailyRunStateReport '" + HBeginDate + "','" + HEndDate + "'", "h_p_Kf_WMSDailyRunStateReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ 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 = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#endregion
@@ -10540,7 +13280,7 @@
"and HMaker = '" + HMaker + "' " +
"and HOrgID = " + HStockOrgID;
DataSet ds = oCn.RunProcReturn(sql, "Gy_getCusBarCodeBillMain");
- if(ds!=null && ds.Tables[0].Rows.Count > 0)
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -10591,7 +13331,7 @@
/// <returns></returns>
[Route("WEBSController/Gy_getCusBarCodeBill_rushBarCode")]
[HttpGet]
- public object Gy_getCusBarCodeBill_rushBarCode(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker, Int64 HStockOrgID,string HBarCode_Pre)
+ public object Gy_getCusBarCodeBill_rushBarCode(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker, Int64 HStockOrgID, string HBarCode_Pre)
{
DataSet ds;
try
@@ -10778,7 +13518,7 @@
[HttpGet]
public object Gy_getCusBarCodeBill_submitRushedBarCodeList(Int64 HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
{
-
+
DataSet ds;
try
{
@@ -10957,7 +13697,7 @@
return objJsonResult;
}
//=============================================================================================================================================
-
+
//寮�鍚簨鍔�
oCn.BeginTran();
@@ -11307,7 +14047,7 @@
{
string sql = "exec h_p_Gy_BarCodeConfirmBill_rushBarCode " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HStockOrgID + ",'" + HBarCode + "'";
ds = oCn.RunProcReturn(sql, "h_p_Gy_BarCodeConfirmBill_rushBarCode");
- if(ds==null || ds.Tables[0].Rows.Count == 0)
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -11784,7 +14524,7 @@
#region 妫シ鍏朵粬鍏ュ簱鎵爜
- public string Kf_OtherInBill_SK(string sBarCode,string HCustom1)
+ public string Kf_OtherInBill_SK(string sBarCode, string HCustom1)
{
string HReturnResult;
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
@@ -11837,7 +14577,8 @@
//鐢熶骇杩斾慨鐢宠
model.Add("FBillTypeID", new JObject() { ["FNumber"] = "SCRKSQ004" }); //鍗曟嵁绫诲瀷
}
- else {
+ else
+ {
//鏍囧噯鐢熶骇鍏ュ簱鐢宠鍗�
model.Add("FBillTypeID", new JObject() { ["FNumber"] = "SCRUSQD" }); //鍗曟嵁绫诲瀷
}
@@ -12007,7 +14748,7 @@
return "鍙戠敓寮傚父锛屽叆搴撶敵璇峰崟鍗曞彿:" + ",瀹℃牳澶辫触" + result2;
}
}
- }
+ }
}
}
@@ -12025,7 +14766,7 @@
//鑾峰彇鍏ュ簱鐢宠鍗曞崟鎹彿
string HBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FBILLNO"]);
//鍖呰绾跨敓鎴愮殑鐢熶骇鍏ュ簱鐢宠鍗曞弬涓庤嚜鍔ㄥ鏍�
- if (HBillNo.Substring(0,2) == "RK" )
+ if (HBillNo.Substring(0, 2) == "RK")
{
//鑾峰彇鍏ュ簱鐢宠鍗曞崟鎹姸鎬�
string HBillStatus = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FDOCUMENTSTATUS"]);
@@ -12092,7 +14833,7 @@
//鎵ц鏇存柊璇彞
oCn.RunProc(sql);
}
-
+
}
}
@@ -12106,5 +14847,679 @@
return HReturnResult;
}
#endregion
+
+
+ #region 缁戝畾灏忚溅浠撳簱浠撲綅
+ /// <summary>
+ /// 缁戝畾灏忚溅浠撳簱浠撲綅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/BindCarAndWH")]
+ [HttpGet]
+ public object BindCarAndWH(string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID, int bindsignal)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh " + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker + "'," + HStockOrgID.ToString() + "," + bindsignal, "h_p_bindingCarintoWh");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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 杞Щ妯″潡
+ // 杞Щ妯″潡
+ [Route("WEBSController/CheckHW")]
+ [HttpGet]
+ public object CheckHW(int HWhID, int HSPID, int HWhID2, int HSPID2, string HBarCode, string HCarBarCode1, string HCarBarCode2, string UserID)
+ {
+ try
+ {
+ if (HCarBarCode1 == null) HCarBarCode1 = "";
+ if (HCarBarCode2 == null) HCarBarCode2 = "";
+ string sql = $"exec Transfer_Operation {HWhID},{HSPID},{HWhID2},{HSPID2},'{HBarCode}','{HCarBarCode1}','{HCarBarCode2}','{UserID}'";
+ ds = oCn.RunProcReturn(sql, "Transfer_Operation");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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 鎯犲悍 鐢熶骇棰嗘枡鍗曟牎楠� 鎵弿婧愬崟 鑾峰彇鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗曟湭瀹℃牳 鍗曟嵁
+ [Route("WEBSController/get_BillBarCode_BillCheck_Json_MateOut_HuiKang")]
+ [HttpGet]
+ public Object get_BillBarCode_BillCheck_Json_MateOut_HuiKang(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
+ {
+
+ try
+ {
+ WebSoBar = null;
+ // 1. 鏌ヨ閲戣澏浜戜腑 鎵�鏈夌鍚堢殑鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗�
+ ds = oCn.RunProcReturn($@"
+ select HBillNo, HChecker,HMaker from h_v_Kf_MateOutBillList_K3 where HBillNo like '%{HBillNo}%'
+ ", "h_v_Kf_MateOutBillList_K3");
+
+ List<string> HBillNoList = new List<string>();
+ foreach (DataRow row in ds.Tables[0].Rows)
+ {
+ if (string.IsNullOrWhiteSpace(row["HChecker"].ToString())) {
+ // 2. 鍒ゆ柇鍗曟嵁瀹℃牳鐘舵�侊紝鏌ユ壘鏈瀹℃牳鐨勫崟鎹�
+ WebSoBar = oWebs.get_BillBarCode_BillCheck(row["HBillNo"].ToString(), HBillType, row["HMaker"].ToString(), HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+
+ if (WebSoBar != null)
+ {
+ // 3. 鑾峰彇鍒扮鍚堟潯浠剁殑杩斿洖鍊硷紝绔嬪嵆杩斿洖
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = WebSoBar;
+ return objJsonResult;
+ }
+ }
+ }
+
+
+ // 3. 鎵�鏈夊崟鎹兘琚鏍革紝鎴栬�呮病鏈夌鍚堣姹傜殑鍗曟嵁锛岃繑鍥為敊璇俊鎭�
+ 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 鍑礉 瑁呯鍗曚繚瀛樺悗 鑷姩鐢熸垚浜ч噺姹囨姤鍗�
+
+ [Route("WEBSController/Sc_ICMOBillWorkQtyStatus_Tmp_Save")]
+ [HttpGet]
+ public object Sc_ICMOBillWorkQtyStatus_Tmp_Save(string HInterID)
+ {
+ try
+ {
+
+ string sql = $"exec [h_p_Sc_ICMOBillWorkQtyStatus_Save] {HInterID}";
+ ds = oCn.RunProcReturn(sql, "[h_p_Sc_ICMOBillWorkQtyStatus_Save]");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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 妫�楠屽崟 鎵弿婧愬崟 鏍规嵁鍗曟嵁绫诲瀷 婧愬崟绫诲瀷 婧愬崟鍙� 瑙f瀽骞惰繑鍥炴楠岄」鐩�
+ [Route("WEBSController/get_CheckBillBarCode_Json_CheckItem")]
+ [HttpGet]
+ public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode, string user)
+ {
+ try
+ {
+ string sErrMsg = "";
+ oSystemParameter.ShowBill(ref sErrMsg);
+ // 鍗庤垷瀹㈡埛 宸ュ簭杩涚珯鎺ユ敹鍗� 宸ュ簭濮斿鎺ユ敹鍗� 鐢熶骇璁㈠崟 宸ュ簭娴佽浆鍗�
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷" && HSourceBillType != 3790 && HSourceBillType != 3793 && HSourceBillType != 3710 && HSourceBillType != 3772)
+ {
+ if (!string.IsNullOrWhiteSpace(HBarCode))
+ {
+ HBarCode = HBarCode.Split('-')[0];
+ }
+ }
+
+ // Mode = 1 琛ㄧず 鎵爜妯″紡 Mode = 2 琛ㄧず 閫夊崟妯″紡
+ if (Mode == 1)
+ {
+ //鎵爜妯″紡闇�瑕佽В鏋愭潯鐮佽幏鍙朒InterID鍜孒EntryID
+ ds = oCn.RunProcReturn($@"
+ exec h_p_CheckBillBarCode_AnalysisBarcode
+ @HBillType='{HBillType}',
+ @HSourceBillType='{HSourceBillType}',
+ @HBarCode='{HBarCode}',
+ @user = '{user}'
+ ", "h_p_CheckBillBarCode_AnalysisBarcode");
+
+ if (ds is null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛佹潯鐮佽В鏋愬け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ HInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
+ HEntryID = ds.Tables[0].Rows[0]["HEntryID"].ToString();
+ }
+ // 閫夊崟妯″紡鐩存帴閫掑叆HInterID 鍜� HEntryID 鏍规嵁 鍙栬川妫�鏂规鏉ユ簮 鑾峰彇 妫�楠岄」鐩�
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ //鍗庤垷鍋氭湯浠剁殑鏃跺�� 瑕佺煡閬撴垜杩欎釜鏉$爜 瀵瑰簲鐨勬暟閲忔槸澶氬皯锛屽彧鑳芥妸鏉$爜浼犲叆杩涘幓杩涜鏌ユ壘
+ ds = oCn.RunProcReturn($@"exec h_p_CheckBillBarCode_CheckItem @HBillType='{HBillType}',@HSourceBillType='{HSourceBillType}',
+ @HInterID='{HInterID}',@HEntryID='{HEntryID}',@HBarCode='{HBarCode}'", "h_p_CheckBillBarCode_CheckItem");
+ }
+ else
+ {
+ ds = oCn.RunProcReturn($@"exec h_p_CheckBillBarCode_CheckItem @HBillType='{HBillType}',@HSourceBillType='{HSourceBillType}',
+ @HInterID='{HInterID}',@HEntryID='{HEntryID}'", "h_p_CheckBillBarCode_CheckItem");
+ }
+
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛佹棤缁戝畾璐ㄦ鏂规淇℃伅";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Columns.Contains("HBack") && DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ if (HBillType == 7507) // 鍗曟嵁绫诲瀷鏄湯浠舵楠屽崟 鏌ユ壘鍗曟嵁鏄惁閲嶅锛屾楠屾槸鍚﹀悎鏍硷紝鍗曟嵁閲嶅闇�瑕佽繑鍥炰笉鍚岀殑鐘舵��
+ {
+ var ds2 = oCn.RunProcReturn($"select top 1 * from QC_ProcessCheckBillMain where HMainSourceBillNo = '{HBarCode}' order by HDate desc", "QC_ProcessCheckBillMain");
+ if (ds2.Tables[0].Rows.Count > 0)
+ {
+ if (ds2.Tables[0].Rows[0]["HCheckerResult"].ToString() == "true") // 妫�楠屽悎鏍兼彁绀烘槸鍚﹂渶瑕佹柊澧�
+ {
+ objJsonResult.code = "2"; // 杩斿洖Code涓�2琛ㄧず鍗曟嵁閲嶅锛岄渶瑕佹彁绀烘槸鍚﹂渶瑕佹柊澧炲崟鎹�
+ objJsonResult.count = 1;
+ objJsonResult.Message = "success锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ }
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "success锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛�" + e.Message.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍑礉 瑁呯鍗曟壂鎻忕鏉$爜鏌ヨ鏄惁鍦ㄥ鎴锋潯鐮佹。妗堬紝涓嶅湪灏辫В鏋愪繚瀛樺鎴锋潯鐮佹。妗堣〃
+
+ [Route("WEBSController/GetHBarCode_CusJX")]
+ [HttpGet]
+ public object GetHBarCode_CusJX(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo)
+ {
+ try
+ {
+
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New_CusJX " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HSourceBillNo + "'", "h_p_WMS_AddPackBarCode_PackUnionBill_New_CusJX");
+ 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]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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 = "鎻掑叆瀹㈡埛鏉$爜妗f琛ㄥけ璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 娣诲悍鏍规嵁灏忚溅鏉$爜鎵惧嚭鐩稿簲鐗╂枡
+
+ [Route("WEBSController/GetMaterIDByCarBarCode")]
+ [HttpGet]
+ public object GetMaterIDByCarBarCode(string CarBarCode)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where HQty>=0 and 灏忚溅='" + CarBarCode.ToString() + "'", "GetMaterMesByCarBarCode");
+ 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/AwaitCheckSampleBillList")]
+ [HttpGet]
+ public Object AwaitCheckSampleBillList(string user)
+ {
+ List<object> columnNameList = new List<object>();
+ try
+ {
+ ds = oCn.RunProcReturn($@"
+ exec h_p_AwaitCheckSampleBillList @user={user}
+ ", "h_p_CheckBillBarCode_CheckItem");
+
+ //娣诲姞鍒楀悕
+ 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 = "success锛�";
+ objJsonResult.data = ds.Tables;
+ 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 [瑁呯杩芥函] 鎵弿SN鏉$爜
+ [Route("WEBSController/get_SNBarCode_PackUnionCarryUp")]
+ [HttpGet]
+ public object get_SNBarCode_PackUnionCarryUp(string sHBarCode, int sInterID, string HBillType, string sBillNo, string sHBarCode_Pack, string sMaker, int HStockOrgID)
+ {
+ if (oWebs.get_SNBarCode_PackUnionCarryUp(sHBarCode, sInterID, HBillType, sBillNo, sHBarCode_Pack, sMaker, HStockOrgID, 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;
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 鎵弿绠辨潯鐮�
+ [Route("WEBSController/get_BarCode_PackUnionCarryUp")]
+ [HttpGet]
+ public object get_BarCode_PackUnionCarryUp(int sInterID, string HBillType, string sBillNo, string sHBarCode_Pack, string sMaker, int HStockOrgID)
+ {
+ var oBar = oWebs.get_BarCode_PackUnionCarryUp(sInterID, sBillNo, HBillType, sHBarCode_Pack, sMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ if (oBar == 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 = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = oBar;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 鑾峰彇琛ㄤ綋鐗╂枡淇℃伅
+ [Route("WEBSController/GetBillEntry_TmpList_PackUnionCarryUp")]
+ [HttpGet]
+ public object GetBillEntry_TmpList_PackUnionCarryUp(int sInterID, string HBillType, string sBillNo, int HStockOrgID)
+ {
+ DataSet oDs = oWebs.GetBillEntry_TmpList_PackUnionCarryUp(sInterID, sBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo);
+ if (oDs == null || oDs.Tables[0].Rows.Count == 0)
+ {
+ 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 = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = oDs.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 鍒犻櫎
+ [Route("WEBSController/set_DelPackUnionBill_Temp_Pack")]
+ [HttpGet]
+ public object set_DelPackUnionBill_Temp_Pack(int HInterID)
+ {
+ if (oWebs.DeleteTemp_PackUnionBill(HInterID, 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;
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 涓婁紶鐢熷崟
+ [Route("WEBSController/set_SavePackUnionCarryUpBill")]
+ [HttpPost]
+ public object set_SavePackUnionCarryUpBill(string ModRightNamePackUnionCarryUp, int sInterID,
+ string HBillType, string sBillNo, string sHBarCode_Pack,
+ string sMaker, int HStockOrgID)
+ {
+ if (!oWebs.CheckModRight(ModRightNamePackUnionCarryUp, DBUtility.ClsPub.CurUserName, ref DBUtility.ClsPub.sErrInfo))
+ {
+ // 閴存潈
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閴存潈澶辫触锛岃鐢ㄦ埛鏃犳潈闄愪笂浼犲崟鎹�! "; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if(oWebs.set_SavePackUnionCarryUpBill_New(sInterID, HBillType, sBillNo, sHBarCode_Pack, sMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鐢熸垚鐢熶骇瑁呯杩芥函鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�" + sBillNo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鐢熸垚澶辫触锛佸師鍥�:" + DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 缂栬緫缂撳瓨鍒楄〃鍗曟嵁
+ [Route("WEBSController/TempList_Modify_Pack")]
+ [HttpGet]
+ public object TempList_Modify_Pack(Int64 HInterID, string HBillNo, string HBillType)
+ {
+ if(oWebs.TempList_Modify_Pack(HInterID, HBillNo, 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;
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 鑾峰彇缂撳瓨鍒楄〃
+ [Route("WEBSController/GetSc_PackUnionBill_TempList_Pack")]
+ [HttpGet]
+ public object GetSc_PackUnionBill_TempList(string HBillType, string HMaker, Int64 HStockOrgID)
+ {
+ DataSet oDs = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID);
+ if(oDs == 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 = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = oDs.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [瑁呯杩芥函] 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+ [Route("WEBSController/DeleteTemp_PackUnionBill_Pack")]
+ [HttpGet]
+ public object DeleteTemp_PackUnionBill_Pack(Int64 HInterID)
+ {
+ if(oWebs.DeleteTemp_PackUnionBill(HInterID, 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;
+ }
+ }
+ #endregion
+
+ #endregion
}
}
--
Gitblit v1.9.1