| | |
| | | int pageSize = limit; |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Mes_ReportMouldStock '" + HDate + "','" + HNumber + "','" + HBarCode + "','" + HSupName + "',"+pageSize+","+pageNum+"", "h_p_Save_SubBarcodeToTmp"); |
| | | ds = oCN.RunProcReturn("exec h_p_Mes_ReportMouldStock '" + HDate + "','" + HNumber + "','" + HBarCode + "','" + HSupName + "',"+pageSize+","+pageNum+"", "h_p_Mes_ReportMouldStock"); |
| | | string aa = ds.Tables[0].Columns[0].ToString(); |
| | | |
| | | foreach (DataColumn col in ds.Tables[4].Columns) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region [器具即时库存明细报表列表] |
| | | #region [器具即时库存汇总报表列表] |
| | | [Route("Sc_MESReportFrom/ReportMouldStockBillSumList")] |
| | | [HttpGet] |
| | | public object ReportMouldStockBillSumList(int page, int limit, string HDate, string HNumber, string HSupName) |
| | |
| | | int pageSize = limit; |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Mes_ReportMouldStockSum '" + HDate + "','" + HNumber + "','" + HSupName + "'," + pageSize + "," + pageNum + "", "h_p_Save_SubBarcodeToTmp"); |
| | | ds = oCN.RunProcReturn("exec h_p_Mes_ReportMouldStockSum '" + HDate + "','" + HNumber + "','" + HSupName + "'," + pageSize + "," + pageNum + "", "h_p_Mes_ReportMouldStockSum"); |
| | | string aa = ds.Tables[0].Columns[0].ToString(); |
| | | |
| | | foreach (DataColumn col in ds.Tables[4].Columns) |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region [器具库存台账明细报表列表] |
| | | [Route("Sc_MESReportFrom/ReportInventoryAccountBillList")] |
| | | [HttpGet] |
| | | public object ReportInventoryAccountBillList(int page, int limit, string HStartDate, string HEndDate,string HSupName) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | int count = 0; |
| | | int pageNum = page; |
| | | int pageSize = limit; |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Mes_ReportInventoryAccount '" + HStartDate + "','" + HEndDate + "','" + HSupName + "'," + pageSize + "," + pageNum + "", "h_p_Mes_ReportInventoryAccount"); |
| | | string aa = ds.Tables[0].Columns[0].ToString(); |
| | | |
| | | foreach (DataColumn col in ds.Tables[1].Columns) |
| | | { |
| | | |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | if (ds.Tables[1].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = ds.Tables[0].Rows.Count; |
| | | objJsonResult.Message = "获取资源绑定数据成功!"; |
| | | objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //序列化DataSet中的时间格式,然后再反序列化回来 |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "暂无资源绑定!"; |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | |