| | |
| | | #endregion |
| | | |
| | | |
| | | #region æ ¹æ®æ¡ç ï¼è¿åæ¡ç æ¡£æ¡ä¸æ¡ç ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ¡ç ï¼è¿åæ¡ç æ¡£æ¡ä¸æ¡ç ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetBarCode_Json")] |
| | | [HttpGet] |
| | | public object GetBarCode_Json(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill where HBarCode='" + HBarCode + "' order by HStopflag", "h_v_Gy_BarCodeBill"); |
| | | 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.isBool(ds.Tables[0].Rows[0]["HStopflag"])) |
| | | { |
| | | 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 |
| | | |
| | | |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region æ«ç æ¨¡å æ ¹æ®HItemIDå é¤ç¼åå表ä¸å¯¹åºæ¡ç è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®HItemIDå 餿¡ç åºå
¥åºç¼å表ä¸è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_HItemID_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_HItemID_Json(long HInterID, string HBillType, long HItemID) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HItemID=" + HItemID.ToString(), 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> |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
¶ä»åºåºåä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.Message = "å
¶ä»å
¥åºåä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | |
| | | #region éå®åºåº ä¸ä¼ çå |
| | | |
| | | #region éå®åºåº æ°å¢æ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// éå®åºåºæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveSellOutBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveSellOutBill_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getSellOutBillMainByJson(msg1); |
| | | WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain(); |
| | | string sSourceType = lsmain[0].HMainSourceBillType; |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = lsmain[0].HBillType; |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | websLsmain.HWHID = lsmain[0].HWHID; |
| | | websLsmain.HSCWHID = lsmain[0].HSCWHID; |
| | | websLsmain.HSupID = lsmain[0].HSupID; |
| | | websLsmain.HKeeperID = lsmain[0].HKeeperID; |
| | | websLsmain.HSecManagerID = lsmain[0].HSecManagerID; |
| | | websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HManagerID = lsmain[0].HManagerID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HExplanation = lsmain[0].HExplanation; |
| | | websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo; |
| | | websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag; |
| | | websLsmain.HBillSubType = lsmain[0].HBillSubType; |
| | | if (lsmain[0].HMainSourceBillType == "1402") |
| | | { |
| | | websLsmain.HMainSourceBillType = "åè´§éç¥å"; |
| | | } |
| | | else if (lsmain[0].HMainSourceBillType == "1401") |
| | | { |
| | | websLsmain.HMainSourceBillType = "éå®è®¢å"; |
| | | } |
| | | else |
| | | { |
| | | websLsmain.HMainSourceBillType = "æå·¥å½å
¥"; |
| | | } |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HBillerID = lsmain[0].HBillerID; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveSellOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | 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 éå®åºåº æ ¡éªæ¨¡å¼ |
| | | |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åå表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region æ ¹æ®åæ®IDãç©æIDè¿åæ¡ç 临æ¶è¡¨ä¸æ¡ç ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®IDãç©æIDè¿åæ¡ç 临æ¶è¡¨ä¸æ¡ç ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetBarCodeByMaterID_Temp_Json")] |
| | | [HttpGet] |
| | | public object GetBarCodeByMaterID_Temp_Json(Int64 HInterID, string HBillType, Int64 HMaterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeByMaterID_Temp " + HInterID.ToString() + ",'" + HBillType + "'," + HMaterID.ToString(), "h_p_WMS_BarCodeByMaterID_Temp"); |
| | | 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 å·¥åºæµè½¬å¡å表æ¥è¯¢è°ç¨æ¹æ³ |
| | | |
| | | #region åæ®å表è°ç¨æ¹æ³ |
| | | |
| | | /// <summary> |
| | | /// è·åæ¡ç ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetMES_ProcessExchangeBillList_PDA_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetMES_ProcessExchangeBillList_PDA_QiaoYi_Json(string HBillNo, string HNumber, string HName, string HICMOBillNo, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeBillList_PDA_QiaoYi '" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_ProcessExchangeBillList_PDA_QiaoYi"); |
| | | 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/GetMES_ProcessExchangeSubBillList_PDA_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetMES_ProcessExchangeSubBillList_PDA_QiaoYi_Json(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi '" + HInterID+ "'", "h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | 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/GetMES_Sc_ICMOBillList_PDA_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetMES_Sc_ICMOBillList_PDA_QiaoYi_Json(string HBillNo, string HNumber, string HMaterName, string HDeptName, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_Sc_ICMOBillList_PDA_QiaoYi '" + HBillNo + "','" + HNumber + "','" + HMaterName + "','" + HDeptName + "'", "h_p_MES_Sc_ICMOBillList_PDA_QiaoYi"); |
| | | 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/GetMES_Sc_ICMOSubBillList_PDA_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetMES_Sc_ICMOSubBillList_PDA_QiaoYi_Json(string HInterID, string HDATA, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_Sc_ICMOSubBillList_PDA_QiaoYi '" + HInterID + "'", "h_p_MES_Sc_ICMOSubBillList_PDA_QiaoYi"); |
| | | 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å对象çåå |
| | | } |
| | | if (HDATA=="HSPE") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else if (HDATA == "HICM") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[1]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[2]; |
| | | 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 æ¡ç åºå
¥åºè®°å½æ¥è¡¨ |