安灯报表报错问题修改
设备点检标准导入,模板验证、数据验证接口开发
已添加2个文件
已修改20个文件
379 ■■■■ 文件已修改
.vs/VueWebApi/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Controllers/BasicSettingController.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Controllers/LoginController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Controllers/ProductionManagementController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Controllers/ReportManagerController.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/BLL/BasicSettingBLL.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/BLL/ReportManagerBLL.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/DAL/AppDeviceManageDAL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/DAL/BasicSettingDAL.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/DAL/DeviceManagerDAL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/DLL/DAL/ReportManagerDAL.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Excel/设备清单.xls 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Logs/2022-11-03.TXT 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/Tools/ImportExcelData.cs 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/bin/VueWebApi.pdb 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/bin/VueWebApi.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/obj/Release/VueWebApi.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/obj/Release/VueWebApi.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VueWebApi/obj/Release/VueWebApi.pdb 补丁 | 查看 | 原始文档 | blame | 历史
.vs/VueWebApi/v16/.suo
Binary files differ
VueWebApi/Controllers/BasicSettingController.cs
@@ -774,5 +774,22 @@
            return TJson.toJson(mes);
        }
        #endregion
        #region[通过车间编码查找设备信息]
        /// <summary>
        /// é€šè¿‡è½¦é—´ç¼–码查找设备信息
        /// </summary>
        /// <param name="wkshpcode">车间编码</param>
        /// <returns></returns>
        [Route(template: "WhkspIsEqpSearch")]
        [HttpGet]
        public HttpResponseMessage WhkspIsEqpSearch(string wkshpcode)
        {
            mes = BasicSettingBLL.WhkspIsEqpSearch(wkshpcode);
            return TJson.toJson(mes);
        }
        #endregion
    }
}
VueWebApi/Controllers/LoginController.cs
@@ -374,7 +374,8 @@
        public HttpResponseMessage LoginAppAnDonMessage(string rid, string usercode, string username, string usertype)
        {
            mes = LoginBLL.LoginAppAnDonMessage(rid, usercode, username, usertype);
            return mes.ResponseMess(mes);
            return TJson.toJson(mes);
            //return mes.ResponseMess(mes);
        }
        #endregion
VueWebApi/Controllers/ProductionManagementController.cs
@@ -709,6 +709,7 @@
        #endregion
        #region[产能规划方案设置查询]
        /// <summary>
        /// äº§èƒ½è§„划方案设置查询
VueWebApi/Controllers/ReportManagerController.cs
@@ -11,7 +11,7 @@
{
    [RoutePrefix(prefix: "api/ReportManager")]
    [ControllerGroup("报表管理", "在线接口")]
    [ChannelActionFilter]
    //[ChannelActionFilter]
    public class ReportManagerController : ApiController
    {
        //定义全局信息返回变量
@@ -467,13 +467,14 @@
        /// <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 calltypecode = null, string calldate = null, string responddate = null)
        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 = "";       //呼叫结束时间
@@ -491,7 +492,7 @@
            }
            int startNum = rows * (page - 1) + 1;  //起始记录rowNum
            int endNum = rows * page;   //结束记录 rowNum
            mes = ReportManagerBLL.AnDonReportSumSearch(wkshopcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate, startNum, endNum, prop, order);
            mes = ReportManagerBLL.AnDonReportSumSearch(wkshopcode, eqpcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate, startNum, endNum, prop, order);
            return TJson.toJson(mes);
        }
        #endregion
@@ -501,13 +502,14 @@
        /// å®‰ç¯æŠ¥è¡¨æ±‡æ€»å¯¼å‡º
        /// </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 calltypecode = null, string calldate = null, string responddate = null)
        public HttpResponseMessage AnDonReportSumExcelSearch(string wkshopcode = null,string eqpcode=null, string calltypecode = null, string calldate = null, string responddate = null)
        {
            string callopendate = "";        //呼叫开始时间
            string callclosedate = "";       //呼叫结束时间
@@ -523,7 +525,7 @@
                respondopendate = responddate.Split('~')[0].ToString();
                respondclosedate = responddate.Split('~')[1].ToString();
            }
            mes = ReportManagerBLL.AnDonReportSumExcelSearch(wkshopcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate);
            mes = ReportManagerBLL.AnDonReportSumExcelSearch(wkshopcode, eqpcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate);
            return TJson.toJson(mes);
        }
        #endregion
VueWebApi/DLL/BLL/BasicSettingBLL.cs
@@ -285,5 +285,15 @@
            return BasicSettingDAL.AnDengResponUserDeleteSeave(id, ando_cogfigid);
        }
        #endregion
        #region[通过车间编码查找设备信息]
        public static ToMessage WhkspIsEqpSearch(string wkshpcode)
        {
            return BasicSettingDAL.WhkspIsEqpSearch(wkshpcode);
        }
        #endregion
    }
}
VueWebApi/DLL/BLL/ReportManagerBLL.cs
@@ -115,16 +115,16 @@
        #region[安灯报表汇总]
        public static ToMessage AnDonReportSumSearch(string wkshopcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate, int startNum, int endNum, string prop, string order)
        public static ToMessage AnDonReportSumSearch(string wkshopcode,string eqpcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate, int startNum, int endNum, string prop, string order)
        {
            return ReportManagerDAL.AnDonReportSumSearch(wkshopcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate, startNum, endNum, prop, order);
            return ReportManagerDAL.AnDonReportSumSearch(wkshopcode, eqpcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate, startNum, endNum, prop, order);
        }
        #endregion
        #region[安灯报表汇总导出]
        public static ToMessage AnDonReportSumExcelSearch(string wkshopcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate)
        public static ToMessage AnDonReportSumExcelSearch(string wkshopcode,string eqpcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate)
        {
            return ReportManagerDAL.AnDonReportSumExcelSearch(wkshopcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate);
            return ReportManagerDAL.AnDonReportSumExcelSearch(wkshopcode, eqpcode, calltypecode, callopendate, callclosedate, respondopendate, respondclosedate);
        }
        #endregion
    }
VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
@@ -383,8 +383,8 @@
            var dynamicParams = new DynamicParameters();
            try
            {
                //获取当前扫码设备是否申请维修记录
                sql = @"select *  from TEqp_RepairRequest where eqp_code=@eqpcode and status='REPA' or status='COMP'";
                //获取当前扫码设备是否存在已申请或已维修状态数据
                sql = @"select *  from TEqp_RepairRequest where eqp_code=@eqpcode and status<>'CONFIR'";
                dynamicParams.Add("@eqpcode", eqpcode);
                var data0 = DapperHelper.selectdata(sql, dynamicParams);
                if (data0.Rows.Count > 0)
VueWebApi/DLL/DAL/BasicSettingDAL.cs
@@ -2084,5 +2084,33 @@
            return mes;
        }
        #endregion
        #region[通过车间编码查找设备信息]
        public static ToMessage WhkspIsEqpSearch(string wkshpcode)
        {
            string sql = "";
            var dynamicParams = new DynamicParameters();
            try
            {
                //获取设备下拉框数据
                sql = @"select code as eqp_code,name as eqp_name
                            from TEqpInfo where wksp_code=@wkshpcode and enable='Y' ";
                dynamicParams.Add("@wkshpcode", wkshpcode);
                var data = DapperHelper.selectdata(sql, dynamicParams);
                mes.code = "200";
                mes.Message = "查询成功!";
                mes.data = data;
            }
            catch (Exception e)
            {
                mes.code = "300";
                mes.count = 0;
                mes.Message = e.Message;
                mes.data = null;
            }
            return mes;
        }
        #endregion
    }
}
VueWebApi/DLL/DAL/DeviceManagerDAL.cs
@@ -2438,7 +2438,7 @@
                //获取设备维修数据
                sql = @"select A.failure_descript,A.is_shutdown,A.repair_content,A.repair_part from TEqp_Repair A
                        left join TEqp_RepairRequest B on A.source_wo=B.docu_code
                        where A.repair_code='SBWX221010016'";
                        where A.repair_code=@repair_code";
                dynamicParams.Add("@repair_code", repair_code);
                var data1 = DapperHelper.selectdata(sql, dynamicParams);
                DeviceRepair repair = new DeviceRepair();
@@ -2449,7 +2449,7 @@
                //获取设备维修图片数据
                sql = @"select M.img1url,M.img2url from TEqp_Repair A
                        left join TEqp_RepairImage M on A.repair_code=M.source_wo
                        where A.repair_code='SBWX221010016' and M.wo_type='COMP'";
                        where A.repair_code=@repair_code and M.wo_type='COMP'";
                dynamicParams.Add("@repair_code", repair_code);
                var data3 = DapperHelper.selectdata(sql, dynamicParams);
                repair.repairimage = data3;
VueWebApi/DLL/DAL/ReportManagerDAL.cs
@@ -1004,7 +1004,7 @@
            {
                if (wkshopcode != "" && wkshopcode != null)
                {
                    search += "and A.wkshp_code=@style ";
                    search += "and A.wkshp_code=@wkshopcode ";
                    dynamicParams.Add("@wkshopcode", wkshopcode);
                }
                if (calltypecode != "" && calltypecode != null)
@@ -1049,7 +1049,7 @@
                {
                    search = "and 1=1 ";
                }
                search = search.Substring(3);//截取索引2后面的字符
                //search = search.Substring(3);//截取索引2后面的字符
                // --------------查询指定数据--------------
                var total = 0; //总条数
                var sql = @"select A.wkshp_code,T.org_name as wkshp_name,A.eqp_code,E.name as eqp_name,Y.name as typename,
@@ -1058,7 +1058,7 @@
                                    + CAST(CAST(datediff(second,A.start_date,A.resp_date) % 86400 / 3600 AS INT) AS VARCHAR) + '小时'
                                    + CAST(CAST(datediff(second,A.start_date,A.resp_date) % 3600 / 60 AS INT) AS VARCHAR) + '分'
                                    + CAST(CAST(datediff(second,A.start_date,A.resp_date) % 60 AS INT) AS VARCHAR) + '秒' AS respondcont,
                            (case when A.resp_user is null then '待响应' else '以响应' end) as status
                            (case when A.resp_user is null then '待响应' else '已响应' end) as status
                            from TAnDon_Task_Info A
                            left join TOrganization T on A.wkshp_code=T.org_code
                            left join TEqpInfo E on A.eqp_code=E.code
@@ -1090,7 +1090,7 @@
            {
                if (wkshopcode != "" && wkshopcode != null)
                {
                    search += "and A.wkshp_code=@style ";
                    search += "and A.wkshp_code=@wkshopcode ";
                    dynamicParams.Add("@wkshopcode", wkshopcode);
                }
                if (calltypecode != "" && calltypecode != null)
@@ -1135,7 +1135,7 @@
                {
                    search = "and 1=1 ";
                }
                search = search.Substring(3);//截取索引2后面的字符
                //search = search.Substring(3);//截取索引2后面的字符
                // --------------查询指定数据--------------
                var total = 0; //总条数
                var sql = @"select A.wkshp_code as è½¦é—´ç¼–码,T.org_name as è½¦é—´åç§°,A.eqp_code as è®¾å¤‡ç¼–码,E.name as è®¾å¤‡åç§°,Y.name as å‘¼å«ç±»åž‹,
@@ -1144,7 +1144,7 @@
                                    + CAST(CAST(datediff(second,A.start_date,A.resp_date) % 86400 / 3600 AS INT) AS VARCHAR) + '小时'
                                    + CAST(CAST(datediff(second,A.start_date,A.resp_date) % 3600 / 60 AS INT) AS VARCHAR) + '分'
                                    + CAST(CAST(datediff(second,A.start_date,A.resp_date) % 60 AS INT) AS VARCHAR) + '秒' AS å“åº”æ—¶é•¿,
                            (case when A.resp_user is null then '待响应' else '以响应' end) as çŠ¶æ€
                            (case when A.resp_user is null then '待响应' else '已响应' end) as çŠ¶æ€
                            from TAnDon_Task_Info A
                            left join TOrganization T on A.wkshp_code=T.org_code
                            left join TEqpInfo E on A.eqp_code=E.code
@@ -1171,7 +1171,7 @@
        #region[安灯报表汇总]
        public static ToMessage AnDonReportSumSearch(string wkshopcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate, int startNum, int endNum, string prop, string order)
        public static ToMessage AnDonReportSumSearch(string wkshopcode,string eqpcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate, int startNum, int endNum, string prop, string order)
        {
            var dynamicParams = new DynamicParameters();
            string search = "";
@@ -1179,8 +1179,13 @@
            {
                if (wkshopcode != "" && wkshopcode != null)
                {
                    search += "and A.wkshp_code=@style ";
                    search += "and A.wkshp_code=@wkshopcode ";
                    dynamicParams.Add("@wkshopcode", wkshopcode);
                }
                if (eqpcode != "" && eqpcode != null)
                {
                    search += "and A.eqp_code=@eqpcode ";
                    dynamicParams.Add("@eqpcode", eqpcode);
                }
                if (calltypecode != "" && calltypecode != null)
                {
@@ -1204,17 +1209,18 @@
                {
                    search = "and 1=1 ";
                }
                search = search.Substring(3);//截取索引2后面的字符
                //search = search.Substring(3);//截取索引2后面的字符
                // --------------查询指定数据--------------
                var total = 0; //总条数
                var sql = @"select T.org_name as wkshp_name,Y.name as calltypename,
                var sql = @"select top 100 percent T.org_name as wkshp_name,A.eqp_code,E.name as eqp_name,Y.name as calltypename,
                            (select count(*) callcount  from TAnDon_Task_Info AA where AA.wkshp_code=A.wkshp_code and AA.type=A.type) as callcount,
                            (select count(*) repondcount  from TAnDon_Task_Info BB where BB.wkshp_code=A.wkshp_code and BB.type=A.type and BB.status='CLOSED') as repondcount,
                            (select CAST(DATEDIFF(ss, start_date,resp_date)/60 as INT)  from TAnDon_Task_Info CC where CC.wkshp_code=A.wkshp_code and CC.type=A.type and CC.status='CLOSED') as repondtime
                             (select ISNULL(SUM(CAST(DATEDIFF(ss, CC.start_date,CC.resp_date)/60 as INT)),0) from TAnDon_Task_Info CC where CC.wkshp_code=A.wkshp_code and CC.eqp_code=A.eqp_code and CC.type=A.type) as repondtime
                            from TAnDon_Task_Info A
                            left join TOrganization T on A.wkshp_code=T.org_code
                            left join TAnDonType Y on A.type=Y.code
                            where T.description='W' "+search+" group by A.wkshp_code,T.org_name,A.type,Y.name ";
                             left join TEqpInfo E on A.eqp_code=E.code
                             where T.description='W' " + search+" group by A.wkshp_code,T.org_name,A.type,Y.name,A.eqp_code,E.name order by T.org_name,A.eqp_code ";
                var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
                mes.code = "200";
                mes.Message = "查询成功!";
@@ -1233,7 +1239,7 @@
        #endregion
        #region[安灯报表汇总导出]
        public static ToMessage AnDonReportSumExcelSearch(string wkshopcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate)
        public static ToMessage AnDonReportSumExcelSearch(string wkshopcode,string eqpcode, string calltypecode, string callopendate, string callclosedate, string respondopendate, string respondclosedate)
        {
            var dynamicParams = new DynamicParameters();
            string search = "";
@@ -1241,8 +1247,13 @@
            {
                if (wkshopcode != "" && wkshopcode != null)
                {
                    search += "and A.wkshp_code=@style ";
                    search += "and A.wkshp_code=@wkshopcode ";
                    dynamicParams.Add("@wkshopcode", wkshopcode);
                }
                if (eqpcode != "" && eqpcode != null)
                {
                    search += "and A.eqp_code=@eqpcode ";
                    dynamicParams.Add("@eqpcode", eqpcode);
                }
                if (calltypecode != "" && calltypecode != null)
                {
@@ -1266,17 +1277,18 @@
                {
                    search = "and 1=1 ";
                }
                search = search.Substring(3);//截取索引2后面的字符
                //search = search.Substring(3);//截取索引2后面的字符
                // --------------查询指定数据--------------
                var total = 0; //总条数
                var sql = @"select T.org_name as ç”Ÿäº§è½¦é—´,Y.name as å‘¼å«ç±»åž‹,
                            (select count(*) callcount  from TAnDon_Task_Info AA where AA.wkshp_code=A.wkshp_code and AA.type=A.type) as å‘¼å«æ¬¡æ•°,
                            (select count(*) repondcount  from TAnDon_Task_Info BB where BB.wkshp_code=A.wkshp_code and BB.type=A.type and BB.status='CLOSED') as å“åº”次数,
                            (select CAST(DATEDIFF(ss, start_date,resp_date)/60 as INT)  from TAnDon_Task_Info CC where CC.wkshp_code=A.wkshp_code and CC.type=A.type and CC.status='CLOSED') as å“åº”æ—¶é•¿(分)
                var sql = @"select top 100 percent T.org_name as ç”Ÿäº§è½¦é—´,E.name as è®¾å¤‡åç§°,Y.name as å‘¼å«ç±»åž‹,
                             (select count(*) callcount  from TAnDon_Task_Info AA where AA.wkshp_code=A.wkshp_code and AA.eqp_code=A.eqp_code and AA.type=A.type) as æ€»å‘¼å«æ¬¡æ•°,
                             (select count(*) repondcount  from TAnDon_Task_Info BB where BB.wkshp_code=A.wkshp_code and BB.eqp_code=A.eqp_code and BB.type=A.type and BB.status='CLOSED') as æ€»å“åº”次数,
                             (select ISNULL(SUM(CAST(DATEDIFF(ss, CC.start_date,CC.resp_date)/60 as INT)),0) from TAnDon_Task_Info CC where CC.wkshp_code=A.wkshp_code and CC.eqp_code=A.eqp_code and CC.type=A.type) æ€»å“åº”æ—¶é•¿
                            from TAnDon_Task_Info A
                            left join TOrganization T on A.wkshp_code=T.org_code
                            left join TAnDonType Y on A.type=Y.code
                            where T.description='W' " + search + " group by A.wkshp_code,T.org_name,A.type,Y.name ";
                             left join TEqpInfo E on A.eqp_code=E.code
                             where T.description='W' " + search+" group by A.wkshp_code,T.org_name,A.type,Y.name,A.eqp_code,E.name order by T.org_name,A.eqp_code ";
                DataTable data = DapperHelper.selectdata(sql, dynamicParams);
                data.TableName = "Table"; //设置DataTable的名称
                string msg = DownLoad.DataTableToExcel(data, "安灯汇总报表");
VueWebApi/Excel/É豸Çåµ¥.xls
Binary files differ
VueWebApi/Logs/2022-11-03.TXT
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
 ã€æ—¶é—´ã€‘:2022-11-03 13:14:22,716
 ã€çº§åˆ«ã€‘:ERROR
 ã€ç±»åã€‘:日志记录
 ã€çº¿ç¨‹ID】: 10
 ã€æ–‡ä»¶åœ°å€ã€‘:D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\Tools\LogHelper.cs ç¬¬25行
 ã€æ—¥å¿—内容】:
消息类型:SqlException
消息内容:“1”附近有语法错误。
“1”附近有语法错误。
引发异常路径:/api/ReportManager/AnDonReportDefinitSearch
引发异常的方法:OnError
引发异常源:.Net SqlClient Data Provider   åœ¨ System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   åœ¨ System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   åœ¨ System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   åœ¨ System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   åœ¨ System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   åœ¨ System.Data.SqlClient.SqlDataReader.get_MetaData()
   åœ¨ System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   åœ¨ System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   åœ¨ System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   åœ¨ System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   åœ¨ System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   åœ¨ System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   åœ¨ System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   åœ¨ Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior)
   åœ¨ Dapper.SqlMapper.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   åœ¨ Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   åœ¨ VueWebApi.Tools.DapperHelper.GetPageList[T](String sql, Object parm, String orderBy, String sort, Int32 pageIndex, Int32 pageSize, Int32& total) ä½ç½® D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\Tools\DapperHelper.cs:行号 160
 ã€æ—¥è®°è¯¦ç»†ã€‘:
---------------------------------------------------------------------------------------------------------------
VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -729,16 +729,16 @@
      <publishTime>12/24/2021 15:38:29</publishTime>
    </File>
    <File Include="bin/VueWebApi.dll">
      <publishTime>11/01/2022 18:10:08</publishTime>
      <publishTime>11/03/2022 16:32:20</publishTime>
    </File>
    <File Include="bin/VueWebApi.dll.config">
      <publishTime>06/15/2022 15:31:43</publishTime>
    </File>
    <File Include="bin/VueWebApi.pdb">
      <publishTime>11/01/2022 18:10:08</publishTime>
      <publishTime>11/03/2022 16:32:20</publishTime>
    </File>
    <File Include="bin/VueWebApi.xml">
      <publishTime>11/01/2022 18:10:08</publishTime>
      <publishTime>11/03/2022 16:32:20</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>02/08/2013 16:42:28</publishTime>
@@ -1545,7 +1545,7 @@
      <publishTime>06/10/2022 08:20:24</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>11/01/2022 18:10:09</publishTime>
      <publishTime>11/03/2022 16:32:27</publishTime>
    </File>
  </ItemGroup>
</Project>
VueWebApi/Tools/ImportExcelData.cs
@@ -761,53 +761,101 @@
            code = "";
            List<DataTable> excelTable = new List<DataTable>();
            excelTable = ImportExcel.ExcelToTableList(FileCode);
            if (excelTable.Count != 2)
            if (excelTable.Count != 4)
            {
                code = "300";
                Message = "导入模板不符合规范,请检查sheet数";
                return Message;
            }
            else if (excelTable[0].Columns.Count != 6)
            else if (excelTable[0].Columns.Count != 5)
            {
                code = "300";
                Message = "设备点检项目模板不符合规范,请检查列名字段数";
                Message = "设备点检标准页签模板不符合规范,请检查列名字段数";
                return Message;
            }
            else if (excelTable[1].Columns.Count != 8)
            {
                code = "300";
                Message = "设备点检部位页签模板不符合规范,请检查列名字段数";
                return Message;
            }
            else if (excelTable[0].Columns[0].ColumnName != "序号")
            {
                code = "300";
                Message = "设备点检项目模板不符合规范:表头信息不符合规范,第1列应为{序号}";
                Message = "设备点检标准页签模板:表头信息不符合规范,第1列应为{序号}";
                return Message;
            }
            else if (excelTable[0].Columns[1].ColumnName != "点检项目编号(唯一)")
            else if (excelTable[0].Columns[1].ColumnName != "设备点检标准编号(唯一)")
            {
                code = "300";
                Message = "设备点检项目模板不符合规范:表头信息不符合规范,第2列应为{点检项目编号(唯一)}";
                Message = "设备点检标准页签模板:表头信息不符合规范,第2列应为{设备点检标准编号(唯一)}";
                return Message;
            }
            else if (excelTable[0].Columns[2].ColumnName != "点检项目名称")
            else if (excelTable[0].Columns[2].ColumnName != "设备点检标准名称")
            {
                code = "300";
                Message = "设备点检项目模板不符合规范:表头信息不符合规范,第3列应为{点检项目名称}";
                Message = "设备点检标准页签模板:表头信息不符合规范,第3列应为{设备点检标准名称}";
                return Message;
            }
            else if (excelTable[0].Columns[3].ColumnName != "点检周期")
            else if (excelTable[0].Columns[3].ColumnName != "点检管控")
            {
                code = "300";
                Message = "设备点检项目模板不符合规范:表头信息不符合规范,第4列应为{点检周期}";
                Message = "设备点检标准页签模板:表头信息不符合规范,第4列应为{点检管控}";
                return Message;
            }
            else if (excelTable[0].Columns[4].ColumnName != "是否扫码")
            else if (excelTable[0].Columns[4].ColumnName != "标准描述")
            {
                code = "300";
                Message = "设备点检项目模板不符合规范:表头信息不符合规范,第4列应为{是否扫码}";
                Message = "设备点检标准页签模板:表头信息不符合规范,第5列应为{标准描述}";
                return Message;
            }
            else if (excelTable[0].Columns[5].ColumnName != "点检项目要求")
            else if (excelTable[1].Columns[0].ColumnName != "序号")
            {
                code = "300";
                Message = "设备点检项目模板不符合规范:表头信息不符合规范,第4列应为{点检项目要求}";
                Message = "设备点检部位页签模板:表头信息不符合规范,第1列应为{序号}";
                return Message;
            }
            else if (excelTable[1].Columns[1].ColumnName != "点检项序号")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第2列应为{点检项序号}";
                return Message;
            }
            else if (excelTable[1].Columns[2].ColumnName != "设备点检标准编号(唯一)")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第3列应为{设备点检标准编号(唯一)}";
                return Message;
            }
            else if (excelTable[1].Columns[3].ColumnName != "设备点检部位编号(唯一)")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第4列应为{设备点检部位编号(唯一)}";
                return Message;
            }
            else if (excelTable[1].Columns[4].ColumnName != "设备点检部位名称")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第5列应为{设备点检部位名称}";
                return Message;
            }
            else if (excelTable[1].Columns[5].ColumnName != "点检部位要求")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第6列应为{点检部位要求}";
                return Message;
            }
            else if (excelTable[1].Columns[6].ColumnName != "选择扫码")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第7列应为{选择扫码}";
                return Message;
            }
            else if (excelTable[1].Columns[7].ColumnName != "点检周期")
            {
                code = "300";
                Message = "设备点检部位页签模板:表头信息不符合规范,第8列应为{点检周期}";
                return Message;
            }
            else
@@ -2363,9 +2411,106 @@
            StuCode = "";
            count = 0;
            string sql = "";
            var dynamicParams = new DynamicParameters();
            DataTable dt;
            List<ExcelErro> list = new List<ExcelErro>();
            List<DataTable> excelTable = new List<DataTable>();
            list = ImportExcel.ExcelToTableListErro(FileCode);    //验证Excel数据必填字段是否为空、唯一字段是否重复
            excelTable = ImportExcel.ExcelToTableList(FileCode);  //获取Excel数据
            //当前Excel数据中点检标准页签中,设备点检标准编号(唯一是否有重复)
            DataTable distinct = excelTable[0].DefaultView.ToTable(true, "设备点检标准编号(唯一)");
            if (distinct.Rows.Count != excelTable[0].Rows.Count)
            {
                ExcelErro erro = new ExcelErro();
                erro.RoeNumber = "/";
                erro.ErrorField = "{设备点检标准编号(唯一)}";
                erro.ErrorCont = "设备点检标准页签模板:{设备点检标准编号(唯一)}有重复";
                list.Add(erro);
            }
            //设备点检标准表是否已存在点检标准
            for (int j = 0; j < excelTable[0].Rows.Count; j++)
            {
                if (excelTable[0].Rows[j][1].ToString().Trim() != null && excelTable[0].Rows[j][1].ToString().Trim() != "")
                {
                    sql = @"select *  from TEqpchk_Main where code=@code";
                    dynamicParams.Add("@code", excelTable[0].Rows[j][1].ToString().Trim());
                    dt = DapperHelper.selectdata(sql, dynamicParams);
                    if (dt.Rows.Count > 0)
                    {
                        ExcelErro erro = new ExcelErro();
                        erro.RoeNumber = "/";
                        erro.ErrorField = "{设备点检标准编号(唯一)}";
                        erro.ErrorCont = "设备点检标准表:{设备点检标准编号(唯一)}字段" + excelTable[0].Rows[j][1].ToString().Trim() + "在数据表中已存在";
                        list.Add(erro);
                    }
                    //通过设备点检标准页签模板中的标准编码查询设备点检部位页签模板中对应的数据信息
                    DataTable ds = excelTable[1].AsEnumerable().Where<DataRow>(C => C["设备点检标准编号(唯一)"].ToString() == excelTable[0].Rows[j][1].ToString().Trim()).CopyToDataTable();
                    if (ds.Rows.Count > 0)
                    {
                        //判断点检标准查询点检部位数据是否有重复
                        DataTable distinct1 = ds.DefaultView.ToTable(true, "设备点检部位编号(唯一)");
                        if (distinct1.Rows.Count != ds.Rows.Count)
                        {
                            ExcelErro erro = new ExcelErro();
                            erro.RoeNumber = "/";
                            erro.ErrorField = "{设备点检部位编号(唯一)}";
                            erro.ErrorCont = "设备点检部位页签模板:{设备点检标准编号(唯一)}:"+ excelTable[0].Rows[j][1].ToString().Trim() + " å¯¹åº”{设备点检部位编号(唯一)}有重复";
                            list.Add(erro);
                        }
                    }
                }
            }
            //当前Excel数据中点检部位页签中,设备点检部位编号(唯一)在设备点检部位表中是否存在
            for (int k = 0; k < excelTable[1].Rows.Count; k++)
            {
                if (excelTable[1].Rows[k][3].ToString().Trim() != null && excelTable[1].Rows[k][3].ToString().Trim() != "")
                {
                    sql = @"select *  from TEqpchk_Item where code=@code";
                    dynamicParams.Add("@code", excelTable[1].Rows[k][3].ToString().Trim());
                    dt = DapperHelper.selectdata(sql, dynamicParams);
                    if (dt.Rows.Count<0)
                    {
                        ExcelErro erro = new ExcelErro();
                        erro.RoeNumber = "/";
                        erro.ErrorField = "{设备点检部位编号(唯一)}";
                        erro.ErrorCont = "设备点检部位表:{设备点检部位编号(唯一)}字段" + excelTable[1].Rows[k][2].ToString().Trim() + "在数据表中不存在";
                        list.Add(erro);
                    }
                }
            }
            //判断子表外键不存在于主表主键中的数据
            var dt3 = from r in excelTable[1].AsEnumerable()
                      where !(
                          from rr in excelTable[0].AsEnumerable()
                          select rr.Field<string>("设备点检标准编号(唯一)")
                      ).Contains(r.Field<string>("设备点检标准编号(唯一)"))
                      select r;
            List<DataRow> listRow = dt3.ToList();
            if (listRow.Count > 0)
            {
                ExcelErro erro = new ExcelErro();
                erro.RoeNumber = "/";
                erro.ErrorField = "{设备点检标准编号(唯一)}";
                erro.ErrorCont = "设备点检部位页签模板:{设备点检标准编号(唯一)}字段中有值在设备点检标准页签模板:{设备点检标准编号(唯一)}中不存在";
                list.Add(erro);
            }
            if (list.Count > 0)
            {
                int index = 0;
                foreach (ExcelErro item in list)
                {
                    index++;
                    item.Seq = index.ToString();
                }
                StuCode = "301";
                message = "数据验证失败";
            }
            else
            {
                StuCode = "200";
                message = "数据验证成功";
                count = excelTable[0].Rows.Count + excelTable[1].Rows.Count;
            }
            return list;
        }
        #endregion
VueWebApi/bin/VueWebApi.pdb
Binary files differ
VueWebApi/bin/VueWebApi.xml
@@ -715,7 +715,7 @@
            <param name="responddate">响应时间</param>
            <returns></returns>
        </member>
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumSearch(System.Int32,System.Int32,System.String,System.String,System.String,System.String,System.String,System.String)">
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumSearch(System.Int32,System.Int32,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
            <summary>
            å®‰ç¯æŠ¥è¡¨æ±‡æ€»
            </summary>
@@ -724,16 +724,18 @@
            <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>
        </member>
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumExcelSearch(System.String,System.String,System.String,System.String)">
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumExcelSearch(System.String,System.String,System.String,System.String,System.String)">
            <summary>
            å®‰ç¯æŠ¥è¡¨æ±‡æ€»å¯¼å‡º
            </summary>
            <param name="wkshopcode">车间编码</param>
            <param name="eqpcode">设备编码</param>
            <param name="calltypecode">呼叫类型编码</param>
            <param name="calldate">呼叫时间</param>
            <param name="responddate">响应时间</param>
@@ -1203,6 +1205,13 @@
            <param name="ando_cogfigid">主id</param>
            <returns></returns>
        </member>
        <member name="M:VueWebApi.Controllers.BasicSettingController.WhkspIsEqpSearch(System.String)">
            <summary>
            é€šè¿‡è½¦é—´ç¼–码查找设备信息
            </summary>
            <param name="wkshpcode">车间编码</param>
            <returns></returns>
        </member>
        <member name="M:VueWebApi.Controllers.DeviceManagerController.DeviceTypeSearch(System.Int32,System.Int32,System.String,System.String)">
            <summary>
            è®¾å¤‡ç±»åž‹æŸ¥è¯¢
VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb
Binary files differ
VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.xml
@@ -715,7 +715,7 @@
            <param name="responddate">响应时间</param>
            <returns></returns>
        </member>
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumSearch(System.Int32,System.Int32,System.String,System.String,System.String,System.String,System.String,System.String)">
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumSearch(System.Int32,System.Int32,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
            <summary>
            å®‰ç¯æŠ¥è¡¨æ±‡æ€»
            </summary>
@@ -724,16 +724,18 @@
            <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>
        </member>
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumExcelSearch(System.String,System.String,System.String,System.String)">
        <member name="M:VueWebApi.Controllers.ReportManagerController.AnDonReportSumExcelSearch(System.String,System.String,System.String,System.String,System.String)">
            <summary>
            å®‰ç¯æŠ¥è¡¨æ±‡æ€»å¯¼å‡º
            </summary>
            <param name="wkshopcode">车间编码</param>
            <param name="eqpcode">设备编码</param>
            <param name="calltypecode">呼叫类型编码</param>
            <param name="calldate">呼叫时间</param>
            <param name="responddate">响应时间</param>
@@ -1203,6 +1205,13 @@
            <param name="ando_cogfigid">主id</param>
            <returns></returns>
        </member>
        <member name="M:VueWebApi.Controllers.BasicSettingController.WhkspIsEqpSearch(System.String)">
            <summary>
            é€šè¿‡è½¦é—´ç¼–码查找设备信息
            </summary>
            <param name="wkshpcode">车间编码</param>
            <returns></returns>
        </member>
        <member name="M:VueWebApi.Controllers.DeviceManagerController.DeviceTypeSearch(System.Int32,System.Int32,System.String,System.String)">
            <summary>
            è®¾å¤‡ç±»åž‹æŸ¥è¯¢
VueWebApi/obj/Release/VueWebApi.csproj.AssemblyReference.cache
Binary files differ
VueWebApi/obj/Release/VueWebApi.csproj.FileListAbsolute.txt
@@ -564,6 +564,7 @@
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.resources.dll
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.Deployment.resources.dll
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.Razor.resources.dll
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.AssemblyReference.cache
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.CoreCompileInputs.cache
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.CopyComplete
D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.dll
VueWebApi/obj/Release/VueWebApi.pdb
Binary files differ