| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 领料统计报表 |
| | | /// <summary> |
| | | /// 领料统计报表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MateOutController/GetKf_MateOutSumReport_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetKf_MateOutSumReport_QiaoYi_Json(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_MateOutSumReport_QiaoYi " + sWhere, "h_p_Kf_MateOutSumReport_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 产线查询 |
| | | [Route("MaterOutEntryReport/Gy_SourceList")] |
| | | [HttpGet] |
| | | public object Gy_SourceList(string HOrgid) |
| | | public object Gy_SourceList(string HOrgid,string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " order by hnumber"); |
| | | string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " "+ sWhere + " order by hnumber"); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "Gy_Source"); |
| | | |