jhz
2023-05-04 8d93e394cab1861b6b5bd3ec0d95fa64f84b5b3e
WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs
@@ -130,7 +130,8 @@
        }
        #endregion
        #region 不良明细良率报表 查询
        #region 车间生产汇报统计表 查询
        [Route("Mes_OrderProcFlowAllReport/StationOutSumReportList")]
        [HttpGet]
        public object StationOutSumReportList(string sWhere)
@@ -166,5 +167,198 @@
            }
        }
        #endregion
        #region 计件工资报表 查询
        [Route("Mes_OrderProcFlowAllReport/EmployeePiecePayReport")]
        [HttpGet]
        public object EmployeePiecePayReport(string sWhere)
        {
            try
            {
                //反序列化传递的值
                ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePayReport " + sWhere + "", "h_p_Sc_EmployeePiecePayReport");
                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 = "1";
                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 计件工资汇总报表 查询
        [Route("Mes_OrderProcFlowAllReport/EmployeePiecePaySumReport")]
        [HttpGet]
        public object EmployeePiecePaySumReport(string sWhere)
        {
            try
            {
                //反序列化传递的值
                ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePaySumReport " + sWhere + "", "h_p_Sc_EmployeePiecePaySumReport");
                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 = "1";
                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 工资汇报日报表 查询
        [Route("Mes_OrderProcFlowAllReport/EmployeePieceWorkReport")]
        [HttpGet]
        public object EmployeePieceWorkReport(string sWhere)
        {
            try
            {
                //反序列化传递的值
                ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePieceWorkReport " + sWhere + "", "h_p_Sc_EmployeePieceWorkReport");
                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 = "1";
                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 生产车间工序报表 查询
        [Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPReport")]
        [HttpGet]
        public object WorkShopProcessWIPReport(string sWhere)
        {
            try
            {
                //反序列化传递的值
                ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPReport");
                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 = "1";
                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 工序在制品报表 查询
        [Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPSumReport")]
        [HttpGet]
        public object WorkShopProcessWIPSumReport(string sWhere)
        {
            try
            {
                //反序列化传递的值
                ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPSumReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPSumReport");
                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 = "1";
                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
    }
}