yl
2023-02-16 883bc24b2af63f2b5cadf7576e7892720c7ed9b7
VueWebApi/Controllers/ReportManagerController.cs
@@ -11,7 +11,7 @@
{
    [RoutePrefix(prefix: "api/ReportManager")]
    [ControllerGroup("报表管理", "在线接口")]
    [ChannelActionFilter]
    //[ChannelActionFilter]
    public class ReportManagerController : ApiController
    {
        //定义全局信息返回变量
@@ -89,6 +89,7 @@
        /// <summary>
        /// 班组工资报表记录查询
        /// </summary>
        /// <param name="compute">计算方式(逐道/末道)</param>
        /// <param name="wocode">工单编号</param>
        /// <param name="partcode">产品编码</param>
        /// <param name="partname">产品名称</param>
@@ -104,7 +105,7 @@
        /// <returns></returns>
        [Route(template: "GroupSalaryReportSearch")]
        [HttpGet]
        public HttpResponseMessage GroupSalaryReportSearch(int page, int rows, string prop, string order, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null)
        public HttpResponseMessage GroupSalaryReportSearch(int page, int rows, string prop, string order,string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null)
        {
            string operopendate = "";  //报工开始时间
            string operclosedate = "";    //报工结束时间
@@ -115,7 +116,7 @@
            }
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = ReportManagerBLL.GroupSalaryReportSearch(wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order);
            mes = ReportManagerBLL.GroupSalaryReportSearch(compute,wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
@@ -139,6 +140,7 @@
        /// <summary>
        /// 班组工资报表记录查询
        /// </summary>
        /// <param name="compute">计算方式(逐道/末道)</param>
        /// <param name="wocode">工单编号</param>
        /// <param name="partcode">产品编码</param>
        /// <param name="partname">产品名称</param>
@@ -150,7 +152,7 @@
        /// <returns></returns>
        [Route(template: "GroupSalaryReportExcelSearch")]
        [HttpGet]
        public HttpResponseMessage GroupSalaryReportExcelSearch(string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null)
        public HttpResponseMessage GroupSalaryReportExcelSearch(string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string username = null, string operdate = null)
        {
            string operopendate = "";  //报工开始时间
            string operclosedate = "";    //报工结束时间
@@ -159,7 +161,7 @@
                operopendate = operdate.Split('~')[0].ToString();
                operclosedate = operdate.Split('~')[1].ToString();
            }
            mes = ReportManagerBLL.GroupSalaryReportExcelSearch(wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate);
            mes = ReportManagerBLL.GroupSalaryReportExcelSearch(compute,wocode, partcode, partname, partspec, stepname, groupcode, username, operopendate, operclosedate);
            return TJson.toJson(mes);
        }
        #endregion
@@ -169,6 +171,7 @@
        /// <summary>
        /// 人员工资明细报表
        /// </summary>
        /// <param name="compute">计算方式(逐道/末道)</param>
        /// <param name="wocode">工单编号</param>
        /// <param name="partcode">产品编码</param>
        /// <param name="partname">产品名称</param>
@@ -184,7 +187,7 @@
        /// <returns></returns>
        [Route(template: "PeopleSalaryReportSearch")]
        [HttpGet]
        public HttpResponseMessage PeopleSalaryReportSearch(int page, int rows, string prop, string order, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string reportname = null, string reportdate = null)
        public HttpResponseMessage PeopleSalaryReportSearch(int page, int rows, string prop, string order,string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string reportname = null, string reportdate = null)
        {
            string reportopendate = "";  //报工开始时间
            string reportclosedate = "";    //报工结束时间
@@ -195,7 +198,7 @@
            }
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = ReportManagerBLL.PeopleSalaryReportSearch(wocode, partcode, partname, partspec, stepname, groupcode, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order);
            mes = ReportManagerBLL.PeopleSalaryReportSearch(compute,wocode, partcode, partname, partspec, stepname, groupcode, reportname, reportopendate, reportclosedate, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
@@ -204,6 +207,7 @@
        /// <summary>
        /// 人员工资明细报表导出
        /// </summary>
        /// <param name="compute">计算方式(逐道/末道)</param>
        /// <param name="wocode">工单编号</param>
        /// <param name="partcode">产品编码</param>
        /// <param name="partname">产品名称</param>
@@ -215,7 +219,7 @@
        /// <returns></returns>
        [Route(template: "PeopleSalaryReportExcelSearch")]
        [HttpGet]
        public HttpResponseMessage PeopleSalaryReportExcelSearch(string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string reportname = null, string reportdate = null)
        public HttpResponseMessage PeopleSalaryReportExcelSearch(string compute, string wocode = null, string partcode = null, string partname = null, string partspec = null, string stepname = null, string groupcode = null, string reportname = null, string reportdate = null)
        {
            string reportopendate = "";  //报工开始时间
            string reportclosedate = "";    //报工结束时间
@@ -224,7 +228,7 @@
                reportopendate = reportdate.Split('~')[0].ToString();
                reportclosedate = reportdate.Split('~')[1].ToString();
            }
            mes = ReportManagerBLL.PeopleSalaryReportExcelSearch(wocode, partcode, partname, partspec, stepname, groupcode, reportname, reportopendate, reportclosedate);
            mes = ReportManagerBLL.PeopleSalaryReportExcelSearch(compute,wocode, partcode, partname, partspec, stepname, groupcode, reportname, reportopendate, reportclosedate);
            return TJson.toJson(mes);
        }
        #endregion
@@ -377,5 +381,157 @@
            return TJson.toJson(mes);
        }
        #endregion
        #region[安灯报表明细]
        /// <summary>
        /// 安灯报表明细
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="calltypecode">呼叫类型编码</param>
        /// <param name="calluser">呼叫人员</param>
        /// <param name="calldate">呼叫时间</param>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="eqpname">设备名称</param>
        /// <param name="responduser">响应人员</param>
        /// <param name="responddate">响应时间</param>
        /// <returns></returns>
        [Route(template: "AnDonReportDefinitSearch")]
        [HttpGet]
        public HttpResponseMessage AnDonReportDefinitSearch(int page, int rows, string prop, string order, string wkshopcode = null, string calltypecode = null, string calluser = null, string calldate = null, string eqpcode = null, string eqpname = null, string responduser = null, string responddate = null)
        {
            string callopendate = "";        //呼叫开始时间
            string callclosedate = "";       //呼叫结束时间
            string respondopendate = "";     //响应开始时间
            string respondclosedate = "";    //响应结束时间
            if (calldate != "" && calldate != null)
            {
                callopendate = calldate.Split('~')[0].ToString();
                callclosedate = calldate.Split('~')[1].ToString();
            }
            if (responddate != "" && responddate != null)
            {
                respondopendate = responddate.Split('~')[0].ToString();
                respondclosedate = responddate.Split('~')[1].ToString();
            }
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = ReportManagerBLL.AnDonReportDefinitSearch(wkshopcode, calltypecode, calluser, callopendate, callclosedate, eqpcode, eqpname, responduser,respondopendate, respondclosedate, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
        #region[安灯报表明细导出]
        /// <summary>
        /// 安灯报表明细导出
        /// </summary>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="calltypecode">呼叫类型编码</param>
        /// <param name="calluser">呼叫人员</param>
        /// <param name="calldate">呼叫时间</param>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="eqpname">设备名称</param>
        /// <param name="responduser">响应人员</param>
        /// <param name="responddate">响应时间</param>
        /// <returns></returns>
        [Route(template: "AnDonReportDefinitExcelSearch")]
        [HttpGet]
        public HttpResponseMessage AnDonReportDefinitExcelSearch(string wkshopcode = null, string calltypecode = null, string calluser = null, string calldate = null, string eqpcode = null, string eqpname = null, string responduser = null, string responddate = null)
        {
            string callopendate = "";        //呼叫开始时间
            string callclosedate = "";       //呼叫结束时间
            string respondopendate = "";     //响应开始时间
            string respondclosedate = "";    //响应结束时间
            if (calldate != "" && calldate != null)
            {
                callopendate = calldate.Split('~')[0].ToString();
                callclosedate = calldate.Split('~')[1].ToString();
            }
            if (responddate != "" && responddate != null)
            {
                respondopendate = responddate.Split('~')[0].ToString();
                respondclosedate = responddate.Split('~')[1].ToString();
            }
            mes = ReportManagerBLL.AnDonReportDefinitExcelSearch(wkshopcode, calltypecode, calluser, callopendate, callclosedate, eqpcode, eqpname, responduser, respondopendate, respondclosedate);
            return TJson.toJson(mes);
        }
        #endregion
        #region[安灯报表汇总]
        /// <summary>
        /// 安灯报表汇总
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="rows">每页显示条数</param>
        /// <param name="prop">排序字段</param>
        /// <param name="order">排序规则</param>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="calltypecode">呼叫类型编码</param>
        /// <param name="calldate">呼叫时间</param>
        /// <param name="responddate">响应时间</param>
        /// <returns></returns>
        [Route(template: "AnDonReportSumSearch")]
        [HttpGet]
        public HttpResponseMessage AnDonReportSumSearch(int page, int rows, string prop, string order, string wkshopcode = null,string eqpcode=null, string calltypecode = null, string calldate = null, string responddate = null)
        {
            string callopendate = "";        //呼叫开始时间
            string callclosedate = "";       //呼叫结束时间
            string respondopendate = "";     //响应开始时间
            string respondclosedate = "";    //响应结束时间
            if (calldate != "" && calldate != null)
            {
                callopendate = calldate.Split('~')[0].ToString();
                callclosedate = calldate.Split('~')[1].ToString();
            }
            if (responddate != "" && responddate != null)
            {
                respondopendate = responddate.Split('~')[0].ToString();
                respondclosedate = responddate.Split('~')[1].ToString();
            }
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = ReportManagerBLL.AnDonReportSumSearch(wkshopcode, eqpcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
        #region[安灯报表汇总导出]
        /// <summary>
        /// 安灯报表汇总导出
        /// </summary>
        /// <param name="wkshopcode">车间编码</param>
        /// <param name="eqpcode">设备编码</param>
        /// <param name="calltypecode">呼叫类型编码</param>
        /// <param name="calldate">呼叫时间</param>
        /// <param name="responddate">响应时间</param>
        /// <returns></returns>
        [Route(template: "AnDonReportSumExcelSearch")]
        [HttpGet]
        public HttpResponseMessage AnDonReportSumExcelSearch(string wkshopcode = null,string eqpcode=null, string calltypecode = null, string calldate = null, string responddate = null)
        {
            string callopendate = "";        //呼叫开始时间
            string callclosedate = "";       //呼叫结束时间
            string respondopendate = "";     //响应开始时间
            string respondclosedate = "";    //响应结束时间
            if (calldate != "" && calldate != null)
            {
                callopendate = calldate.Split('~')[0].ToString();
                callclosedate = calldate.Split('~')[1].ToString();
            }
            if (responddate != "" && responddate != null)
            {
                respondopendate = responddate.Split('~')[0].ToString();
                respondclosedate = responddate.Split('~')[1].ToString();
            }
            mes = ReportManagerBLL.AnDonReportSumExcelSearch(wkshopcode, eqpcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate);
            return TJson.toJson(mes);
        }
        #endregion
    }
}