From 34c78336cae81c8592405b2644da35e9ac91fdca Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期二, 29 十一月 2022 11:25:18 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/条码管理/WEBSController.cs | 510 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 433 insertions(+), 77 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 aa7007f..802969b 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" @@ -60,14 +60,109 @@ #endregion + #region 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭� + + /// <summary> + /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭� + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetKf_ICStockBillQueryList_Json")] + [HttpGet] + public object GetKf_ICStockBillQueryList_Json(string HBillType, string HBillNo, string HSourceBillNo) + { + try + { + ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo); + 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鍒楀璞$殑鍒楀悕 + } + + 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]; + 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 宸蹭笂浼犲垪琛ㄧ晫闈紝鎾ら攢鍔熻兘锛屽垹闄MS琛ㄥ拰鏈湴鍑哄叆搴撳崟璁板綍锛屽苟鏇存柊TEMP琛ㄤ腑鐨勪笂浼犲瓧娈� HRelationInterID=0 + + /// <summary> + /// 宸蹭笂浼犲垪琛ㄧ晫闈紝鎾ら攢鍔熻兘锛屽垹闄MS琛ㄥ拰鏈湴鍑哄叆搴撳崟璁板綍锛屽苟鏇存柊TEMP琛ㄤ腑鐨勪笂浼犲瓧娈� HRelationInterID=0 + /// </summary> + /// <returns></returns> + [Route("WEBSController/DeleteICStockBillAndWMS_Json")] + [HttpGet] + public object DeleteICStockBillAndWMS_Json(Int64 HInterID, string HBillNo, string HBillType) + { + try + { + if (oWebs.DeleteICStockBillAndWMS(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; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎾ら攢鍗曟嵁宸蹭笂浼犺褰曞け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 /// <summary> - /// 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 + /// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� /// </summary> /// <returns></returns> [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] - [HttpPost] + [HttpGet] public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) { try @@ -93,7 +188,86 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍澶辫触锛�" + e.ToString(); + objJsonResult.Message = "鍒犻櫎鎵�閫夎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + /// <summary> + /// 鏍规嵁鍗曟嵁ID,鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 + /// </summary> + /// <returns></returns> + [Route("WEBSController/DeleteBillList_Json")] + [HttpGet] + public object DeleteBillList_Json(long HInterID) + { + try + { + if (oWebs.DeleteBillList(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; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎鎵�閫夊崟鎹潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰曞け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + + #region 鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛紙鏇存柊 HlineStatus =1锛� + + /// <summary> + /// 鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛紙鏇存柊 HlineStatus =1锛� + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")] + [HttpGet] + public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType) + { + try + { + if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -323,8 +497,87 @@ #endregion + #region 鍏朵粬鍑哄簱 鎵弿婧愬崟鏉$爜 + + /// <summary> + /// 鍏朵粬鍑哄簱 鎵弿婧愬崟鏉$爜 + /// </summary> + /// <returns></returns> + [Route("WEBSController/get_SourceBarCode_OtherOut_Json")] + [HttpGet] + public object get_SourceBarCode_OtherOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID) + { + try + { + WebSoBar = oWebs.get_SourceBarCode_OtherOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo); + if (WebSoBar == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = WebSoBar; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #region 鐩存帴璋冩嫧 鎵弿婧愬崟鏉$爜 + /// <summary> + /// 鐩存帴璋冩嫧 鎵弿婧愬崟鏉$爜 + /// </summary> + /// <returns></returns> + [Route("WEBSController/get_SourceBarCode_MoveStock_Json")] + [HttpGet] + public object get_SourceBarCode_MoveStock_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID) + { + try + { + WebSoBar = oWebs.get_SourceBarCode_MoveStock(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, 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 @@ -341,7 +594,7 @@ #endregion - #region 鐗╂枡鏉$爜澶勭悊鏂规硶 + #region 鐗╂枡鏉$爜澶勭悊鏂规硶 鍏朵粬鍑哄簱搴撴ā鍧� /// <summary> /// 鐗╂枡鏉$爜鏂囨湰妗� 鎵爜璋冪敤 @@ -353,7 +606,51 @@ { try { - WebSoBar = oWebs.get_BarCode(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo); + var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo,HMaker); + SourceFlag = true; + WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo); + if (WebSoBar == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = WebSoBar; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 鐗╂枡鏉$爜澶勭悊鏂规硶 璋冩嫧妯″潡 + + /// <summary> + /// 鐗╂枡鏉$爜鏂囨湰妗� 鎵爜璋冪敤 + /// </summary> + /// <returns></returns> + [Route("WEBSController/get_BarCode_MoveStock_Json")] + [HttpGet] + public Object get_BarCode_MoveStock_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle) + { + try + { + WebSoBar = oWebs.get_BarCode_MoveStock(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo); if (WebSoBar == null) { objJsonResult.code = "0"; @@ -392,86 +689,46 @@ /// <returns></returns> [Route("WEBSController/GetBillEntryTmpList_Json")] [HttpGet] - public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID, string sMouldManagerCtl, string sFIFOCtl) + public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID) { try { - string sSimpleMode = "N"; //鏄惁鍚敤鎵爜绠�鏄撴ā寮忥紝鍙樉绀哄凡鎵爜婧愬崟璁板綍(Y,N) - string sReturn = ""; - - //鑾峰彇绯荤粺鍙傛暟 - if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sReturn) == true) + string sMouldManagerCtl = "N"; //鏄惁鍚敤鍣ㄥ叿绠$悊 + string sFIFOCtl = "N"; //鏄惁鍚敤鍏堣繘鍏堝嚭绠$悊 + ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo); + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) { - //鍒ゆ柇鏄惁鍚敤鍣ㄥ叿绠$悊(Y,N) - if (oSystemParameter.omodel.WMS_MouldManagerCtl == "Y") //鍚敤妯℃不鍏风鐞� - { - sMouldManagerCtl = "Y"; - } + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } - //鍒ゆ柇鏄惁鍚敤鍏堣繘鍏堝嚭绠$悊(Y,N)锛屾槸鍚﹀惎鐢ㄦ壂鐮佺畝鏄撴ā寮忥紝鍙樉绀哄凡鎵爜婧愬崟璁板綍(Y,N) - if (HBillType == "1204") //鐢熶骇棰嗘枡鍗� - { - if (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList == "Y") //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗 - { - sFIFOCtl = "Y"; - } - if (oSystemParameter.omodel.Kf_MateOutBill_SimpleMode == "Y") //鐢熶骇棰嗘枡鍗�-鎵爜绠�鏄撴ā寮� - { - sSimpleMode = "Y"; - } - } - else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList == "Y")) //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗 - { - sFIFOCtl = "Y"; - } - else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList == "Y")) //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗 - { - sFIFOCtl = "Y"; - } - else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList == "Y")) //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗 - { - sFIFOCtl = "Y"; - } - else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList == "Y")) //鍒嗘寮忚皟鍑哄崟-鍏堣繘鍏堝嚭鎺у埗 - { - sFIFOCtl = "Y"; - } - - DataSet ds = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_LayUI " + HInterID.ToString() + ",'" + HBillType + "','" + sMouldManagerCtl + "','" + sFIFOCtl + "','" + sSimpleMode + "'", "h_p_WMS_BillEntryTmpList_LayUI"); - - 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鍒楀璞$殑鍒楀悕 - } - - 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; - objJsonResult.list = columnNameList; - return objJsonResult; - } + 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 = 0; - objJsonResult.Message = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涜繑鍥炵墿鏂欐槑缁嗗垪琛ㄦ椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sReturn; - objJsonResult.data = null; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.data = new + { + Materlist = ds.Tables[0], //杩斿洖鐗╂枡鏄庣粏鍒楄〃淇℃伅锛�0锛� + Mouldlist = ds.Tables[1], //杩斿洖妯℃不鍏峰垪琛ㄤ俊鎭紙1锛� + FIFOlist = ds.Tables[2], //杩斿洖鍏堣繘鍏堝嚭鍒楄〃淇℃伅锛�2锛� + BarCodelist = ds.Tables[3], //杩斿洖鏉$爜鏄庣粏鍒楄〃淇℃伅锛�3锛� + ICMOReportlist = ds.Tables[4], //杩斿洖婧愬崟鐢熶骇姹囨姤鍗曟潯鐮佹槑缁嗗垪琛ㄤ俊鎭紙4锛� + BarCodeDetailslist = ds.Tables[5] //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛� + }; + objJsonResult.list = columnNameList; return objJsonResult; } } @@ -616,8 +873,107 @@ #endregion - #region 澶勭悊鏂规硶 + #region 杩斿洖鍗曟嵁鍒楄〃淇℃伅 + /// <summary> + /// 杩斿洖鍗曟嵁鍒楄〃淇℃伅 鏍¢獙妯″紡 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_Json")] + [HttpGet] + public object GetKf_PonderationBillMain_Temp_BillCheck_Json(long HInterID, string HBillType, string sWhere) + { + try + { + ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere); + 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鍒楀璞$殑鍒楀悕 + } + + 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]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 杩斿洖缂撳瓨鍒楄〃淇℃伅 + + /// <summary> + /// 杩斿洖缂撳瓨鍒楄〃淇℃伅 鏍¢獙妯″紡 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json")] + [HttpGet] + public object GetKf_PonderationBillMain_TempList_BillCheck_Json(string HBillType, string HMaker, Int64 HStockOrgID) + { + try + { + ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID); + 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鍒楀璞$殑鍒楀悕 + } + + 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]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑾峰彇缂撳瓨鍒楄〃淇℃伅澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } #endregion -- Gitblit v1.9.1