| | |
| | | public string sWhere = ""; |
| | | public WebServer webserver = new WebServer(); |
| | | public DataSet ds = new DataSet(); |
| | | private json objjson = new json(); |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | |
| | | |
| | | WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain(); |
| | | |
| | | |
| | | #region å
¬ç¨æ¹æ³ |
| | | |
| | | #region è·åæå¤§åæ®IDãåæ®å· |
| | | |
| | | /// <summary> |
| | | /// è·åæå¤§åæ®IDãåæ®å· |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetMaxBillNoAndID_Json")] |
| | | [HttpGet] |
| | | public object GetMaxBillNoAndID_Json(string HBillType) |
| | | { |
| | | try |
| | | { |
| | | string sErrMsg = ""; |
| | | Int64 HInterID = 0; |
| | | string HBillNo = ""; |
| | | HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true); |
| | | |
| | | //----------å建è表------------------------ |
| | | DataTable dt_Main = new DataTable("Json"); |
| | | dt_Main.Columns.Add("HBillNo", typeof(string)); |
| | | dt_Main.Columns.Add("HInterID", typeof(int)); |
| | | //---------å建æ°è¡------------------------ |
| | | DataRow dr_main = dt_Main.NewRow(); //å建æ°è¡ |
| | | dt_Main.Rows.Add(dr_main); //å°æ°è¡å å
¥å°è¡¨ä¸ |
| | | dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo); |
| | | dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID); |
| | | //è¿åæ°æ® |
| | | if (HBillNo == "" || HInterID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æå¤§åæ®IDãåæ®å·è·å失败"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åæå"; |
| | | objJsonResult.data = dt_Main; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åæå¤§åæ®IDãåæ®å·å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region åºç¡èµæ |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿åä»åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetWarehouse_Json")] |
| | | [HttpGet] |
| | | public object GetWarehouse_Json(string HBarCode, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | 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"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ä»ä½èµæ |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿åä»ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetStockPlace_Json")] |
| | | [HttpGet] |
| | | public object GetStockPlace_Json(string HBarCode, Int64 HWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | 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) |
| | | { |
| | | 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) |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¿åä»ä½ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åä»ä½åè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetStockPlaceList_Json")] |
| | | [HttpGet] |
| | | public object GetStockPlaceList_Json(string StockPlace, Int64 HWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | //çé¢ä¸æªéæ©ä»åº æ ä»ä½éæ©å表çé¢è¾å
¥è¿æ»¤æ¡ä»¶ |
| | | if (HWhID == 0) |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "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 |
| | | { |
| | | 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 HUSEORGID=" + HStockOrgID.ToString() + " and HWHID=" + HWhID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "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 HUSEORGID = " + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "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; |
| | | } |
| | | } |
| | | } |
| | | 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/GetEmployee_Json")] |
| | | [HttpGet] |
| | | public object GetEmployee_Json(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | Int64 HEmpID = 0; |
| | | HEmpID = DBUtility.ClsPub.isLong(HBarCode); |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Employee with(nolock) where HStopflag=0 and HItemID=" + HEmpID.ToString(), "Gy_Employee"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region é¨é¨èµæ |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿åé¨é¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetDepartment_Json")] |
| | | [HttpGet] |
| | | public object GetDepartment_Json(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | Int64 HDepID = 0; |
| | | HDepID = DBUtility.ClsPub.isLong(HBarCode.Replace("HDE", "")); |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HItemID=" + HDepID.ToString(), "Gy_Department"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ä¾åºåèµæ |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿åä¾åºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetSupplier_Json")] |
| | | [HttpGet] |
| | | public object GetSupplier_Json(Int64 HSupID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString(), "Gy_Supplier"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 客æ·èµæ |
| | | |
| | | /// <summary> |
| | | /// æ«ç è¿å客æ·ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetCustomer_Json")] |
| | | [HttpGet] |
| | | public object GetCustomer_Json(Int64 HCusID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString(), "Gy_Customer"); |
| | | 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> |
| | | /// è·å客æ·åè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetCustomerList_Json")] |
| | | [HttpGet] |
| | | public object GetCustomerList_Json(string Customer, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Customer + "%' or HName like '%" + Customer + "%')", "Gy_Customer"); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç 模åè°ç¨æ¹æ³ |
| | | |
| | | #region æ ¹æ®åæ®ç±»åè·ååæ®åç±»å |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®ç±»åè·ååæ®åç±»å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetBillSubType_Json")] |
| | | [HttpGet] |
| | | public Object GetBillSubType_Json(string HBillType, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.get_BillSubType(HBillType, HStockOrgID); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç æ¨¡å æ ¹æ®æ¡ç å é¤ç¼åå表ä¸å¯¹åºæ¡ç è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ç å 餿¡ç åºå
¥åºç¼å表ä¸è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode<>'' and HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | 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> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, 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 æ«ææ¨¡å éåºåè½æé®è°ç¨ å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° 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 = "æ´æ°å
è¿å
åºä¸´æ¶è¡¨HlineStatuså¼å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ç¼åå表模åè°ç¨ |
| | | |
| | | #region ç¼åå表 ç¼è¾åè½è°ç¨ |
| | | |
| | | /// <summary> |
| | | /// ç¼ååè¡¨éæ©ç¼è¾æ¶ï¼å¤ææéåæ®æ¯å¦å·²åå¨ä¸ä¼ è®°å½ï¼å¯ç¨å
è¿å
åºåè½çï¼åå¡«å
è¿å
åºä¸´æ¶è¡¨ç¶æï¼æ´æ° HlineStatus =0ï¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/TempList_Modify_Json")] |
| | | [HttpGet] |
| | | public object TempList_Modify_Json(long HInterID, string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.TempList_Modify(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | 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 |
| | | |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | #region æ¡ç åºå
¥åºç¼åå表模å å é¤ç¼ååè¡¨åæ® |
| | | |
| | | /// <summary> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// å é¤ç¼ååè¡¨åæ® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) |
| | | public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å 餿éè¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.Message = "å 餿¡ç åºå
¥åºç¼ååè¡¨åæ®å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®ID,å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// æ ¹æ®åæ®ID,å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ ï¼åè½åä¸é¢æ ¹æ®IDå é¤ç¼åè®°å½æ¹æ³ï¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/DeleteBillList_Json")] |
| | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | |
| | | #region æäº¤çåå¤çæ¹æ³ |
| | | |
| | | #region ç产å
¥åº ä¸ä¼ çå |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region éè´å
¥åº ä¸ä¼ çå |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region å
¶ä»å
¥åº ä¸ä¼ çå |
| | | |
| | | #region å
¶ä»å
¥åº æ°å¢æ¨¡å¼ |
| | | |
| | | /// <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) |
| | | [Route("WEBSController/set_SaveOtherInBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveOtherInBill_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getOtherInBillMainByJson(msg1); |
| | | WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain(); |
| | | 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== "1241") |
| | | { |
| | | 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_SaveOtherInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°å
è¿å
åºä¸´æ¶è¡¨HlineStatuså¼å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.Message = "å
¶ä»åºåºåä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æäº¤çåå¤çæ¹æ³ |
| | | #endregion |
| | | |
| | | |
| | | #region éå®åºåº ä¸ä¼ çå |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region ç´æ¥è°æ¨ ä¸ä¼ çå |
| | | |
| | | #region æ¢æè°æ¨å |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¼ çææ¢æè°æ¨å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveMoveStockBill_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object set_SaveMoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_SaveMoveStockBill_HuanTuo(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, 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; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çææ¢æè°æ¨å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region çäº§ç»æå ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¼ çæçäº§ç»æå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SavePackUnionBill_Json")] |
| | | [HttpGet] |
| | | public object set_SavePackUnionBill_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_SavePackUnionBill_Add(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, 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; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çæçäº§ç»æå失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ç产å
¥åº æ«ææºåæ¡ç |
| | | #region éè´å
¥åº æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// ç产å
¥åº æ«ææºåæ¡ç |
| | | /// éè´å
¥åº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_PoStockIn_Json")] |
| | | [Route("WEBSController/Get_SourceBarCode_POStockIn_Json")] |
| | | [HttpGet] |
| | | public object Get_SourceBarCode_PoStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID,Int64 HAccessFlag, WebS.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public object get_SourceBarCode_POStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo); |
| | | WebSoBar = oWebs.get_SourceBarCode_POStockIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å
¶ä»å
¥åº æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// å
¶ä»å
¥åº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_OtherIn_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_OtherIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_OtherIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | |
| | | #region çäº§é¢æ æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// 颿åºåº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_MateOut_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MateOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | |
| | | #region å§å¤åºåº æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// å§å¤åºåº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_EntrustOut_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_EntrustOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_EntrustOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | |
| | | #region 忥å¼è°åº æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// 忥å¼è°åº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_MoveStockStepOut_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MoveStockStepOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockInOrgID, Int64 HStockOutOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MoveStockStepOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockInOrgID, HStockOutOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 忥å¼è°å
¥ æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// 忥å¼è°å
¥ æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_MoveStockStepIn_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MoveStockStepIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockInOrgID, Int64 HStockOutOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MoveStockStepIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockInOrgID, HStockOutOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ç©ææ¡ç å¤çæ¹æ³ å
¶ä»åºåºåºæ¨¡å |
| | | #region ç©ææ¡ç å¤çæ¹æ³ åºå
¥åºæ¨¡å |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç ææ¬æ¡ æ«ç è°ç¨ |
| | |
| | | } |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo); |
| | | string HCustom1 = "", HCustom2 = ""; |
| | | WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | /// ç©ææ¡ç ææ¬æ¡ æ«ç è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_BarCode_MoveStock_PD")] |
| | | //[Route("WEBSController/get_BarCode_MoveStock_PD")] |
| | | //[HttpGet] |
| | | //public Object get_BarCode_MoveStock_PD(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) |
| | | //{ |
| | | // string sErrMsg = ""; |
| | | // string sJXCode = ""; |
| | | // if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | // { |
| | | // if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | // { |
| | | // sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker); |
| | | // SourceFlag = true; |
| | | // } |
| | | // else |
| | | // { |
| | | // sJXCode = sBarCode; |
| | | // } |
| | | // try |
| | | // { |
| | | // WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, 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"; |
| | | // 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 æ«ç 模åè°ç¨æ¹æ³ |
| | | |
| | | #region ä»ç¼åå表页é¢è¿åä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// ä»ç¼åå表页é¢è¿åä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetSourceBill_Temp_Json")] |
| | | [HttpGet] |
| | | public Object get_BarCode_MoveStock_PD(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) |
| | | public object GetSourceBill_Temp_Json(Int64 HInterID, string HBillType) |
| | | { |
| | | string sErrMsg = ""; |
| | | string sJXCode = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | try |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker); |
| | | SourceFlag = true; |
| | | } |
| | | else |
| | | { |
| | | sJXCode = sBarCode; |
| | | } |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, 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"; |
| | | 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) |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.Message = "è¿åç¼ååè¡¨åæ®ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region åæ®æ°å¢æ¨¡å è·ååæ®å表信æ¯å¤çæ¹æ³ |
| | | |
| | |
| | | string sMouldManagerCtl = "N"; //æ¯å¦å¯ç¨å¨å
·ç®¡ç |
| | | string sFIFOCtl = "N"; //æ¯å¦å¯ç¨å
è¿å
åºç®¡ç |
| | | ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å æ¨¡æ²»å
·å表åå |
| | | List<object> MouldcolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[1].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | MouldcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å å
è¿å
åºå表åå |
| | | List<object> FIFOcolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[2].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | FIFOcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å æ¡ç æç»å表åå |
| | | List<object> BarCodecolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[3].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | BarCodecolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | //æ·»å æºåçäº§æ±æ¥åæ¡ç æç»å表åå |
| | | List<object> ICMOReportcolumnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[4].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | ICMOReportcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | BarCodeDetailslist = ds.Tables[5] //è¿åå½åææ«ææ¡ç æç»ä¿¡æ¯ï¼5ï¼ |
| | | }; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.list = MouldcolumnNameList; |
| | | objJsonResult.list = FIFOcolumnNameList; |
| | | objJsonResult.list = BarCodecolumnNameList; |
| | | objJsonResult.list = ICMOReportcolumnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | |
| | | string sJXCode = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | string sSourceBarCodeCtl = "N"; //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | //éå®åºåºå |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker); |
| | |
| | | } |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | //ååæ®ä¸ºæ«ç çæï¼æ ¡éªæ¶ä¸çææ¡ç è®°å½ï¼åªå¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ |
| | | if (sSourceBarCodeCtl == "Y") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, 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; |
| | | } |
| | | } |
| | | //å忮鿫ç çæï¼æ ¡éªæ¶çææ¡ç è®°å½ |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, 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) |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere); |
| | | if (ds == null) |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region è¿åç¼ååè¡¨ä¿¡æ¯ |
| | | #region æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DeleteBarCodeByEntryID_BillCheck_Json")] |
| | | [HttpGet] |
| | | public object set_DeleteBarCodeByEntryID_BillCheck_Json(long HInterID, string HBillType, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, Int64 HStockOrgID) |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true) |
| | | { |
| | | string sSourceBarCodeCtl = "N"; //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | //éå®åºåºå |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | |
| | | //ååæ®ä¸ºæ«ç çæï¼å¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ |
| | | if (sSourceBarCodeCtl == "Y") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ¡éªæ¡ç ï¼å é¤åè½ä¸å¯ç¨ï¼ "; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å忮鿫ç çæ |
| | | else |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HMaterID=" + HMaterID.ToString() + " and HAuxPropID=" + HAuxPropID.ToString() + " and HMTONo='" + HMTONo + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | 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 ç¼å模å è¿åç¼ååè¡¨ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// è¿åç¼ååè¡¨ä¿¡æ¯ æ ¡éªæ¨¡å¼ |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID); |
| | | if (ds == null) |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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 ç¼åæ¨¡å æ ¹æ®åæ®ID,å é¤ä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®ID,å é¤ä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/DeleteBillList_BillCheck_Json")] |
| | | [HttpGet] |
| | | public object DeleteBillList_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID) |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true) |
| | | { |
| | | string sSourceBarCodeCtl = "N"; //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | //éå®åºåºå |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | |
| | | //ååæ®ä¸ºæ«ç çæï¼å¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ï¼å 餿¡ç åºå
¥åºæ ¡éªç¼åè®°å½ |
| | | if (sSourceBarCodeCtl == "Y") |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp_Verify where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | 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 |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | 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> |
| | | /// å·²ä¸ä¼ å表çé¢ï¼æ¤éåè½ï¼å é¤WMSè¡¨åæ¬å°åºå
¥åºåè®°å½ï¼å¹¶æ´æ°TEMP表ä¸çä¸ä¼ åæ®µ HRelationInterID=0 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/DeleteICStockBillAndWMS_BillCheck_Json")] |
| | | [HttpGet] |
| | | public object DeleteICStockBillAndWMS_BillCheck_Json(Int64 HInterID, string HBillNo, string HBillType, Int64 HStockOrgID) |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true) |
| | | { |
| | | string sSourceBarCodeCtl = "N"; //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | //éå®åºåºå |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | |
| | | //ååæ®ä¸ºæ«ç çæï¼å¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ |
| | | if (sSourceBarCodeCtl == "Y") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ¡éªæ¡ç ï¼æ¤éåè½ä¸å¯ç¨ï¼ "; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å忮鿫ç çæ |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region çäº§ç»æåæ¨¡åè°ç¨æ¹æ³ |
| | | |
| | | #region çäº§ç»æåæ¨¡å æ«æææ¡ç |
| | | |
| | | /// <summary> |
| | | /// çäº§ç»æåæ¨¡å æ«æææ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_PackBarCode_PackUnionBill_Json")] |
| | | [HttpGet] |
| | | public object get_PackBarCode_PackUnionBill_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | 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) |
| | | { |
| | | 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 = WebSoBarModel; |
| | | 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_PackUnionBill_Json")] |
| | | [HttpGet] |
| | | public object get_BarCode_PackUnionBill_Json(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.get_BarCode_PackUnionBill(HBarCode, HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, 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; |
| | | } |
| | | } |
| | | 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/GetBillEntry_Tmp_Pack_Json")] |
| | | [HttpGet] |
| | | public object GetBillEntry_Tmp_Pack_Json(long HInterID, string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.GetBillEntry_Tmp_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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/set_DelPackUnionBill_Temp_Pack_Json")] |
| | | [HttpGet] |
| | | public object set_DelPackUnionBill_Temp_Pack_Json(Int64 HInterID, string HBarCode, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPackUnionBill_Temp_Pack(HInterID, HBarCode, 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 ç»æç¼åå表模åè°ç¨æ¹æ³ |
| | | |
| | | #region è¿åç»æç¼ååè¡¨ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// è¿åç»æç¼ååè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetSc_PackUnionBill_TempList_Json")] |
| | | [HttpGet] |
| | | public object GetSc_PackUnionBill_TempList_Json(string HBillType, string HMaker, long HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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/DeleteTemp_PackUnionBill_Json")] |
| | | [HttpGet] |
| | | public object DeleteTemp_PackUnionBill_Json(Int64 HInterID) |
| | | { |
| | | try |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤ç¼åä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region å ææ¨¡åè°ç¨æ¹æ³ |
| | | |
| | | #region å ææ¨¡å æ«æææ¡ç |
| | | |
| | | /// <summary> |
| | | /// å ææ¨¡å æ«æææ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_PackBarCode_DeletePackUnionBill_Json")] |
| | | [HttpGet] |
| | | public object Get_PackBarCode_DeletePackUnionBill_Json(string HBarCode_Pack, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æææ¡ç å¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æææ¡ç 失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å ææ¨¡åï¼è·åææ¡ç ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å ææ¨¡å ä¸ä¼ å é¤ç»æåä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¼ å é¤ç»æåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetDeletePackUnionBill_Json")] |
| | | [HttpGet] |
| | | public object GetDeletePackUnionBill_Json(long HInterID, string HBillType, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("exec h_p_WMS_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillType + "','" + HMaker + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | 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 |
| | | |
| | | |
| | | #region æ¢æè°æ¨å模åè°ç¨æ¹æ³ |
| | | |
| | | #region æ¢æè°æ¨åæ¨¡å æ«æè°å
¥ææ¡ç |
| | | |
| | | /// <summary> |
| | | /// æ¢æè°æ¨åæ¨¡å æ«æè°å
¥ææ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_BarCodePack_In_MoveStockBill_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object get_BarCodePack_In_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBarCode_Pack, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_BarCodePack_In_MoveStockBill_HuanTuo(HInterID, HBillNo, HBarCode_Pack, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æè°å
¥ææ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region æ¢æè°æ¨åæ¨¡å æ«æè°åºæ¡ç |
| | | |
| | | /// <summary> |
| | | /// æ¢æè°æ¨åæ¨¡å æ«æè°åºæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_BarCode_MoveStockBill_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object get_BarCode_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HBarCode_Pack, Int64 HPackUnionInterID_In, Int64 HWhID, Int64 HSPID, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.get_BarCode_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HBarCode, HBarCode_Pack, HPackUnionInterID_In, HWhID, HSPID, HMaker, 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; |
| | | } |
| | | } |
| | | 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/GetBillEntry_Temp_MoveStockBill_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object GetBillEntry_Temp_MoveStockBill_HuanTuo_Json(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.GetBillEntry_Temp_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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/set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBarCode, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo(HInterID, HBarCode, 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/GetKF_MoveStockBill_TempList_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object GetKF_MoveStockBill_TempList_HuanTuo_Json(Int64 HInterID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo"); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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/GetPonderationBillMain_TempList_HuanTuo_Json")] |
| | | [HttpGet] |
| | | public object GetPonderationBillMain_TempList_HuanTuo_Json(string HBillType, string HMaker, long HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #region æ¥è¡¨æ°æ®è·åæ¹æ³ |
| | | |
| | | #region æ¡ç åºå
¥åºè®°å½æ¥è¡¨ |
| | | |
| | | #region è·ååæ®ç±»åä¿¡æ¯ |
| | | /// <summary> |
| | | /// è·ååæ®ç±»åä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetBarCodeReport_BillType_Json")] |
| | | [HttpGet] |
| | | public object GetBarCodeReport_BillType_Json() |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeReport_BillType ", "h_p_WMS_BarCodeReport_BillType"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·ååæ®ç±»åä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è·åæ¡ç åºå
¥åºè®°å½ |
| | | /// <summary> |
| | | /// è·åæ¡ç åºå
¥åºè®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_BarCodeOutInReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_BarCodeOutInReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_BarCodeOutInReport_New " + sWhere, "h_p_Kf_BarCodeOutInReport_New"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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 |
| | | |
| | | #region æ¡ç åºåæ¥è¯¢æ¥è¡¨ |
| | | |
| | | #region è·åæ¡ç åºåä¿¡æ¯ |
| | | /// <summary> |
| | | /// è·åæ¡ç åºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_BarCodeICInventoryReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_BarCodeICInventoryReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeICInventoryReport " + sWhere, "h_p_WMS_BarCodeICInventoryReport"); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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 |
| | | |
| | | #region WMSç©æåºå
¥åºè®°å½æ¥è¡¨ |
| | | |
| | | #region è·åWMSç©æåºå
¥åºè®°å½ |
| | | /// <summary> |
| | | /// è·åWMSç©æåºå
¥åºè®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_MaterOutInReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_MaterOutInReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_MaterOutInReport " + sWhere, "h_p_WMS_MaterOutInReport"); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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 = "æ¥è¯¢WMSç©æåºå
¥åºè®°å½ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region WMSç©æåºåæ¥è¯¢æ¥è¡¨ |
| | | |
| | | #region è·åWMSç©æåºåä¿¡æ¯ |
| | | /// <summary> |
| | | /// è·åWMSç©æåºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_MaterICInventoryReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_MaterICInventoryReport_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_MaterICInventoryReport " + sWhere, "h_p_WMS_MaterICInventoryReport"); |
| | | 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)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | 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 = "æ¥è¯¢WMSç©æåºåä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |