| | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region 染厂产量报表 |
| | | [Route("ProdProcessSumReport/ProdProcessSumReport_DyeColor_third")] |
| | | [HttpGet] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 烘干定型出站 |
| | | [Route("ProdProcessSumReport/Kf_DryFinalizeOutReport")] |
| | | [HttpGet] |
| | | public object Kf_DryFinalizeOutReport(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_DryFinalizeOutReport where 1=1 "+sWhere, "h_v_Kf_DryFinalizeOutReport"); |
| | | |
| | | //获取列名 |
| | | 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 = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 上浆定型出站 |
| | | [Route("ProdProcessSumReport/Kf_SizingFinalizeOutReport")] |
| | | [HttpGet] |
| | | public object Kf_SizingFinalizeOutReport(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_SizingFinalizeOutReport where 1=1 " + sWhere, "h_v_Kf_SizingFinalizeOutReport"); |
| | | |
| | | //获取列名 |
| | | 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 = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 刷毛出站 |
| | | [Route("ProdProcessSumReport/Kf_BrushingOutReport")] |
| | | [HttpGet] |
| | | public object Kf_BrushingOutReport(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_BrushingOutReport where 1=1 " + sWhere, "h_v_Kf_BrushingOutReport"); |
| | | |
| | | //获取列名 |
| | | 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 = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 色坯烫光出站 |
| | | [Route("ProdProcessSumReport/Kf_ColorBlankLustringOutReport")] |
| | | [HttpGet] |
| | | public object Kf_ColorBlankLustringOutReport(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_ColorBlankLustringOutReport where 1=1 " + sWhere, "h_v_Kf_ColorBlankLustringOutReport"); |
| | | |
| | | //获取列名 |
| | | 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 = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 压水出站 毛尖出站 |
| | | [Route("ProdProcessSumReport/Kf_PressurizedWaterOutReport")] |
| | | [HttpGet] |
| | | public object Kf_PressurizedWaterOutReport(string sWhere,string HBillType) |
| | | { |
| | | try |
| | | { |
| | | switch (HBillType) |
| | | { |
| | | case "Kf_PressurizedWaterOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_PressurizedWaterOutReport where 1=1 " + sWhere, "h_v_Kf_PressurizedWaterOutReport"); |
| | | break; |
| | | case "Kf_HairtipReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_HairtipReport where 1=1 " + sWhere, "h_v_Kf_HairtipReport"); |
| | | break; |
| | | case "Kf_DigitalSprayPaintingReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_DigitalSprayPaintingReport where 1=1 " + sWhere, "h_v_Kf_DigitalSprayPaintingReport"); |
| | | break; |
| | | case "Kf_ShrinkBrushReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_ShrinkBrushReport where 1=1 " + sWhere, "h_v_Kf_ShrinkBrushReport"); |
| | | break; |
| | | case "Kf_FinalizeTheDesignOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_FinalizeTheDesignOutReport where 1=1 " + sWhere, "h_v_Kf_FinalizeTheDesignOutReport"); |
| | | break; |
| | | case "Kf_LustringOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_LustringOutReport where 1=1 " + sWhere, "h_v_Kf_LustringOutReport"); |
| | | break; |
| | | case "Kf_ShrinkBrushOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_ShrinkBrushOutReport where 1=1 " + sWhere, "h_v_Kf_ShrinkBrushOutReport"); |
| | | break; |
| | | case "Kf_FinalizeOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_FinalizeOutReport where 1=1 " + sWhere, "h_v_Kf_FinalizeOutReport"); |
| | | break; |
| | | case "Kf_LustringReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_LustringReport where 1=1 " + sWhere, "h_v_Kf_LustringReport"); |
| | | break; |
| | | case "Kf_ShrinkBrushTeReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_ShrinkBrushTeReport where 1=1 " + sWhere, "h_v_Kf_ShrinkBrushTeReport"); |
| | | break; |
| | | case "Kf_EmbossingOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_EmbossingOutReport where 1=1 " + sWhere, "h_v_Kf_EmbossingOutReport"); |
| | | break; |
| | | case "Kf_StereoscopicFlowerOutReport": |
| | | ds = oCN.RunProcReturn($"select * from h_v_Kf_StereoscopicFlowerOutReport where 1=1 " + sWhere, "h_v_Kf_StereoscopicFlowerOutReport"); |
| | | break; |
| | | } |
| | | |
| | | |
| | | //获取列名 |
| | | 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 = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #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/sc_ICOMReportList")] |
| | | [HttpGet] |
| | | public object sc_ICOMReportList(string sWhere) |
| | | public object sc_ICOMReportList(string sWhere,string HBeginDate,string HEndDate) |
| | | { |
| | | try |
| | | { |
| | | string sql = "exec h_p_sc_ICOMReport '"+ sWhere + "'"; |
| | | string sql = "exec h_p_sc_ICOMReport '"+ sWhere + "','"+ HBeginDate + "','"+ HEndDate + "'"; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_p_sc_ICOMReport"); |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 生产入库报表 |
| | | [Route("MaterOutEntryReport/sc_ICOMRKBanReport")] |
| | | [HttpGet] |
| | | public object sc_ICOMRKBanReport(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql = "select * from h_v_sc_ICOMRKBanReport where 1=1 " + sWhere + " order by 日期 "; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_v_sc_ICOMRKBanReport"); |
| | | |
| | | 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 生产日记报表 |
| | | public class DayRkReport { |
| | | public string HBeginDate { get; set; } |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 产线查询 |
| | | [Route("MaterOutEntryReport/Gy_SourceList")] |
| | | #region 半成品报表 |
| | | public class SemiFinishedProductsReport |
| | | { |
| | | public string HBeginDate { get; set; } |
| | | public string HEndDate { get; set; } |
| | | public string HMaterNumber { get; set; } |
| | | public string HCustomerName { get; set; } |
| | | public string HProductName { get; set; } |
| | | } |
| | | [Route("MaterOutEntryReport/SemiFinishedProductsReportList")] |
| | | [HttpGet] |
| | | public object Gy_SourceList(string HOrgid) |
| | | public object SemiFinishedProductsReportList(string sWhere, int num) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " order by hnumber"); |
| | | SemiFinishedProductsReport DayRkReportList = JsonConvert.DeserializeObject<SemiFinishedProductsReport>(sWhere); |
| | | |
| | | string sql = $"exec h_p_sc_SemiFinishedProductsReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" + |
| | | $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport"); |
| | | |
| | | DataTable dt = null; |
| | | if (num == 1) |
| | | { |
| | | dt = ds.Tables[0]; |
| | | } |
| | | else if (num == 2) |
| | | { |
| | | dt = ds.Tables[1]; |
| | | } |
| | | |
| | | //获取列名 |
| | | List<object> columnNameList = new List<object>(); |
| | | if (num == 1) |
| | | { |
| | | //添加列名 |
| | | 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列对象的列名 |
| | | } |
| | | } |
| | | else if (num == 2) |
| | | { |
| | | //添加列名 |
| | | 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列对象的列名 |
| | | } |
| | | } |
| | | |
| | | 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/Gy_SourceList")] |
| | | [HttpGet] |
| | | public object Gy_SourceList(string HOrgid,string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " "+ sWhere + " order by hnumber"); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "Gy_Source"); |
| | | |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PlanShifts where HDate='" + hdate + "'", "Gy_PlanShifts"); |
| | | ds = oCN.RunProcReturn("select * from Gy_PlanShifts where HDate='" + hdate + "' and HSourceID="+ TagId, "Gy_PlanShifts"); |
| | | string sql = ""; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |