| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | //} |
| | | #endregion |
| | | |
| | | |
| | | #region 工序流转卡列表显示器具清单信息 |
| | | [Route("Sc_ProcessExchangeBillList/QJQD")] |
| | | [HttpGet] |
| | | public object QJQD(Int64 HProcExchHinteID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | //得到信息 |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuerySub_Mould where hmainid= " + HProcExchHinteID , "h_v_Sc_ProcessExchangeBillQuerySub_Mould"); |
| | | //写入信息 |
| | | //if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "未查询到出站单明细信息!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region[返回生产任务单明细行] |
| | | /// <summary> |
| | | /// 返回生产任务单明细行 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region[编辑时获取表体数据(工艺参数)] |
| | | [Route("Sc_ProcessExchangeBill/GetProcessExchangeBillSubTech")] |
| | | [HttpGet] |
| | | public object GetProcessExchangeBillSubTech(string HInterID) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"exec h_p_Sc_GetProcessExchangeBillSubTech "); |
| | | ds = oCN.RunProcReturn(sql + HInterID, "h_p_Sc_GetProcessExchangeBillSubTech"); |
| | | |
| | | //添加列名 |
| | | 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.list = columnNameList; |
| | | 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 |
| | | } |
| | | } |