| | |
| | | List<Model.ClsKf_MateOutBillMain> lsmain = new List<Model.ClsKf_MateOutBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getMateOutBillMainByJson(msg1); |
| | | lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | string sSourceBillType = lsmain[0].HBillType;//源单类型 |
| | | |
| | | WebAPI.WebS.ClsKf_MateOutBillMain websLsmain = new WebS.ClsKf_MateOutBillMain(); |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region (生产订单维度)客户订单报表 |
| | | [Route("MaterOutEntryReport/sc_ICOMReportList")] |
| | | [HttpGet] |
| | | public object sc_ICOMReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql = "exec h_p_sc_ICOMReport '"+ sWhere + "'"; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_p_sc_ICOMReport"); |
| | | |
| | | DataTable dt = ds.Tables[0]; |
| | | |
| | | //获取列名 |
| | | 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 = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = dt; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 客户订单明细报表 |
| | | [Route("MaterOutEntryReport/Sc_ICOMProBarCodeReport")] |
| | | [HttpGet] |
| | | public object Sc_ICOMProBarCodeReport(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql = "select * from h_v_sc_ICOMProBarCodeReport where 1=1 " + sWhere; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_v_sc_ICOMProBarCodeReport"); |
| | | |
| | | DataTable dt = ds.Tables[0]; |
| | | |
| | | //获取列名 |
| | | 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 = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = dt; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |