| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åé¨é¨åè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetDepartmentList_Json")] |
| | | [HttpGet] |
| | | public object GetDepartmentList_Json(string Department, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Department + "%' or HName like '%" + Department + "%')", "Gy_Department"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½é¨é¨è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | 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 ä¾åºåèµæ |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ ¹æ®åæ®å· ç©æç¼ç ç©æåç§° ç产订å å·¥åº é¨é¨è·å å·¥åºæµè½¬å¡] |
| | | /// <summary> |
| | | /// è·åæ¡ç ä¿¡æ¯ æ·»å å·¥åº é¨é¨æ¥è¯¢æ¡ä»¶ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetMES_ProcessExchangeBillList_APP_HaiCheng")] |
| | | [HttpGet] |
| | | public object GetMES_ProcessExchangeBillList_APP_HaiCheng(string HBillNo, string HNumber, string HName, string HICMOBillNo, string user, string HProcID, string HDeptID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeBillList_APP_HaiCheng " + |
| | | "@HBillNo = N'" + HBillNo + "', " + |
| | | "@HNumber = N'" + HNumber + "', " + |
| | | "@HName = N'" + HName + "', " + |
| | | "@HICMOBillNo = N'" + HICMOBillNo + "'," + |
| | | "@HProcID = N'" + HProcID + "', " + |
| | | "@HDeptID = N'" + HDeptID + "'" |
| | | , "h_p_MES_ProcessExchangeBillList_PDA_QiaoYi"); |
| | | if((bool)ds.Tables[1].Rows[0]["returntype"] == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ds.Tables[1].Rows[0]["mesg"].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | }else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°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> |
| | | /// æ¥çæç» |