基于WEB的煤矿生产调度管理信息系统研究与实现.pdf
分类号分类号TD745TD745密密级级 公公开开 U D CU D C 单位代码单位代码 1042410424 学学 位位 论论 文文 基于基于基于 基于 WEBWEBWEB WEB 的煤矿生产调度管理信息系统的煤矿生产调度管理信息系统的煤矿生产调度管理信息系统 的煤矿生产调度管理信息系统 研究与实现研究与实现研究与实现 研究与实现 卢卢 鹏鹏 申请学位级别申请学位级别硕士学位硕士学位专业专业名名称称矿产普查与勘探矿产普查与勘探 指导教师姓名指导教师姓名韩韩 作作 振振职职称称教教授授 山山 东东 科科 技技 大大 学学 二零零七年五月二零零七年五月 论文题目论文题目论文题目 论文题目 基于基于基于 基于 WEBWEBWEB WEB 的煤矿生产调度管理信息系的煤矿生产调度管理信息系的煤矿生产调度管理信息系 的煤矿生产调度管理信息系 统统统 统 研究与实现研究与实现研究与实现 研究与实现 作者姓名作者姓名作者姓名 作者姓名 卢卢鹏鹏入学时间入学时间入学时间 入学时间 200420042004 2004 年年 9 9 9 9 月月 专业名称专业名称专业名称 专业名称 矿产普查与勘探矿产普查与勘探 研究方向研究方向研究方向 研究方向 遥感与地理信息系遥感与地理信息系 统统 指导教师指导教师指导教师 指导教师 韩作振韩作振职职职 职 称称称 称 教教授授 毛善君毛善君副副教教授授 论文提交日期论文提交日期论文提交日期 论文提交日期 200720072007 2007 年年 月月 论文答辩日期论文答辩日期论文答辩日期 论文答辩日期 200720072007 2007 年年 月月 日日 授予学位日期授予学位日期授予学位日期 授予学位日期 R R R R ESEARCHESEARCHESEARCH ESEARCH ANDANDAND AND IMPLEMENTIMPLEMENTIMPLEMENT IMPLEMENT ONONON ON INATIONINATIONINATION INATION SYSTEMSYSTEMSYSTEM SYSTEM FORFORFOR FOR COALCOALCOAL COAL PRODUCTIONPRODUCTIONPRODUCTION PRODUCTION ATTEMPERINGATTEMPERINGATTEMPERING ATTEMPERING MANAGEMENTMANAGEMENTMANAGEMENT MANAGEMENT BASEDBASEDBASED BASED ONONON ON WEBWEBWEB WEB A A A A DissertationDissertationDissertation Dissertation tedtedted ted ininin in fulfillmentfulfillmentfulfillment fulfillment ofofof of thethethe the requirementsrequirementsrequirements requirements ofofof of thethethe the degreedegreedegree degree ofofof of MASTER OF ENGINEERING fromfromfrom from ShandongShandongShandong Shandong UniversityUniversityUniversity University ofofof of ScienceScienceScience Science andandand and TechnologyTechnologyTechnology Technology b b b b y y y y LuLuLu Lu PengPengPeng Peng SupervisorSupervisorSupervisor Supervisor ProfessorProfessorProfessor Professor HanHanHan Han ZuozhenZuozhenZuozhen Zuozhen CollegeCollegeCollege College ofofof of Geo-InationGeo-InationGeo-Ination Geo-Ination ScienceScienceScience Science andandand and EngineeringEngineeringEngineering Engineering MayMayMay May 200720072007 2007 声声明明 本人呈交给山东科技大学的这篇硕士学位论文,除了所列参考文献和世所本人呈交给山东科技大学的这篇硕士学位论文,除了所列参考文献和世所 公认的文献外,全部是本人在导师指导下的研究成果。该论文资料尚没有呈交公认的文献外,全部是本人在导师指导下的研究成果。该论文资料尚没有呈交 于其它任何学术机关作鉴定。于其它任何学术机关作鉴定。 硕士生签名硕士生签名 日日期期 AFFIRMATION I I I I declaredeclaredeclare declare thatthatthat that thisthisthis this dissertation,dissertation,dissertation, dissertation, tedtedted ted ininin in fulfillmentfulfillmentfulfillment fulfillment ofofof of thethethe the requirementsrequirementsrequirements requirements forforfor for thethethe the awardawardaward award ofofof of MasterMasterMaster Master ofofof of PhilosophyPhilosophyPhilosophy Philosophy ininin in ShandongShandongShandong Shandong UniversityUniversityUniversity University ofofof of ScienceScienceScience Science andandand and Technology,Technology,Technology, Technology, is is is is whollywhollywholly wholly mymymy my ownownown own workworkwork work unlessunlessunless unless referencedreferencedreferenced referenced ofofof of acknowledge.acknowledge.acknowledge. acknowledge. TheTheThe The documentdocumentdocument document hashashas has notnotnot not beenbeenbeen been tedtedted ted forforfor for qualificationqualificationqualification qualification atatat at anyanyany any otherotherother other academicacademicacademic academic institute.institute.institute. institute. SignatureSignatureSignature Signature DateDateDate Date 山东科技大学硕士学位论文摘要 I 摘摘要要 随着信息技术产业的兴起,信息系统的研究与开发已经受到社会各界的广泛重视, 相应的网络平台经历了终端/主机方式到客户机/服务器方式的演变,对数据的搜集、存 储、处理与传播也由集中式走向分布式,从封闭式走向开放式。 煤矿安全生产是煤炭经济可持续发展的基础和保证,煤矿调度管理在煤矿生产中起 着组织、指挥和预测的作用。因此加强煤矿的信息化建设,建立煤矿调度管理信息系统, 合理有效地管理煤矿调度信息,对煤矿安全生产具有深远的意义。有鉴于此,本文在介 绍国内外生产调度管理现状的基础上,系统总结了国内当前煤矿生产调度过程中存在的 问题,并提出相应的解决方案。归纳起来,主要有以下几点 (1)分析和对比当前 B/S 和 C/S 系统体系结构的优缺点,提出系统 B/S 结构的设计 思路。 (2)运用 WEBGIS 和 Web Service 技术相结合的设计思想开发煤矿生产调度管理信 息系统,实现分布式的数据管理。 (3)研究华表在 B/S 结构中的使用,并利用它对煤矿生产指标等进行统计分析,形 成生产调度日报和统计报表。 (4)通过对 WEBGIS 技术和其构造方法的研究,提出 ActiveX 方法实现 WEBGIS,通 过嵌入客户端图形控件实现对矢量图形文件的客户端操作。 关键词关键词信息系统,调度管理,B/S,WEBGIS 山东科技大学硕士学位论文摘要 II AbstractAbstractAbstract Abstract With the rise of the ination technology industry Research and development R try { ValidateAccessSecurity.ValidateCustomerSecuritysoapCredentials; SqlParameter sqlparaWhereclause new SqlParameter“whereclause“,SqlDbType.VarChar,250; sqlparaWhereclause.Valuewhereclause; string sql“select counta.ID from DD_ProduAccident a “whereclause; countSqlHelper.cuteScalarstrConn,CommandType.Text,sql.ToString; SqlParameter sqlparaPageSizenew SqlParameter“PageSize“,SqlDbType.Int,4; sqlparaPageSize.ValuepageSize; SqlParameter sqlparaPageCurrentnew SqlParameter“PageCurrent“,SqlDbType.Int,4; sqlparaPageCurrent.ValuePageCurrent; SqlParameter sqlparaFdShownew SqlParameter“FdShow“,SqlDbType.VarChar,4000; sqlparaFdShow.Value““; SqlParameter sqlparaFdOrdernew SqlParameter“FdOrder“,SqlDbType.VarChar,1000; sqlparaFdOrder.ValuefieldOrder; SqlParameter[] sqlparamsnew SqlParameter[]{sqlparaWhereclause,sqlparaPageSize,sqlparaPageCurrent, sqlparaFdShow,sqlparaFdOrder}; dsDD_ProduAccidentSqlHelper.cuteDatasetstrConn,CommandType.StoredProcedure, “DD_ProduAccident_proc“,sqlparams; System.Data.DataColumn[] colnew DataColumn[1]{dsDD_ProduAccident.Tables[0].Columns[“ID“]}; dsDD_ProduAccident.Tables[0].PrimaryKeycol; } 山东科技大学硕士学位论文系统详细设计 36 catchException ex { throw new Exception“LongKouBusi.Bussiness-DiaoDu_JL- ini_DD_ProduAccident“ex.Message; } return dsDD_ProduAccident; } 在以上方法中 , soapCredentials 是定义的一个 soapheader 的一个变量; 将 soapCredentials 从 Web services 客户端发送到 Web services,Web services 验证后,如果 合法,再把请求结果返回客户端。fileOrder,PageSize,PageOrder 是为了分页显示所设 计的参数,whereclause 是查询条件,客户端把这些参数传递到 Web Services的参数中, 经此方法计算以后, 返回到一个业务实体 DataSet 中, 把这个 DataSet 传递到客户端页面 , 并绑定到相应的控件上,从而显示我们所要查询的数据。 (2)更新新增、修改、删除 仍以“生产事故记录”为例,在 WEB 服务中对属性数据进行更新,包括数据的新 增、修改和删除的操作。以下为执行数据更新操作时 Web Service 中执行的方法 //修改生产事故记录 [WebDescription“修改生产事故记录“] [SoapHeader“soapCredentials“, DirectionSoapHeaderDirection.In] public void update_DD_ProduAccidentDataSet ds { ValidateAccessSecurity.ValidateCustomerSecuritysoapCredentials; this.sqlConnection new System.Data.SqlClient.SqlConnection; this.sqlConnection.ConnectionStringstrConn; this.sqlConnection.Open; SqlTransactionmyTrans this.sqlConnection.BeginTransaction; this.sqlInsertCommand new System.Data.SqlClient.SqlCommand; this.sqlInsertCommand.TransactionmyTrans; this.sqlUpdateCommand new System.Data.SqlClient.SqlCommand; this.sqlUpdateCommand.TransactionmyTrans; this.sqlDeleteCommand new System.Data.SqlClient.SqlCommand; this.sqlDeleteCommand.TransactionmyTrans; 山东科技大学硕士学位论文系统详细设计 37 try { // // sqlInsertCommand // this.sqlInsertCommand.CommandText “INSERT INTO DD_ProduAccidentDate, Loc, Type, StartTime, EndTime, CauseAndResult, InfectionTime,InfectOutPut, ReportEmp, NoteMan,DepNo,SGName,SGXZ,SSJE VALUES Date, Loc, Type, StartTime, EndTime, CauseAndResult,InfectionTime, InfectOutPut, ReportEmp,NoteMan, DepNo,SGName,SGXZ,SSJE“; this.sqlInsertCommand.Connection this.sqlConnection; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Date“, System.Data.SqlDbType.DateTime, 8, “Date“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Loc“, System.Data.SqlDbType.VarChar, 50, “Loc“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Type“, System.Data.SqlDbType.VarChar, 10, “Type“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“StartTime“, System.Data.SqlDbType.DateTime, 8, “StartTime“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“EndTime“, System.Data.SqlDbType.DateTime, 8, “EndTime“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“CauseAndResult“, System.Data.SqlDbType.VarChar, 2000, “CauseAndResult“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“InfectionTime“, System.Data.SqlDbType.VarChar, 30, “InfectionTime“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“InfectOutPut“, System.Data.SqlDbType.Float, 8, “InfectOutPut“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“ReportEmp“, System.Data.SqlDbType.VarChar, 10, “ReportEmp“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“NoteMan“, System.Data.SqlDbType.VarChar, 10, “NoteMan“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“DepNo“, System.Data.SqlDbType.VarChar, 10, “DepNo“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“SGName“,System.Data.SqlDbType.VarChar,50, “SGName“; 山东科技大学硕士学位论文系统详细设计 38 this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“SGXZ“, System.Data.SqlDbType.VarChar, 20, “SGXZ“; this.sqlInsertCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“SSJE“, System.Data.SqlDbType.Float, 8, “SSJE“; // // sqlUpdateCommand // this.sqlUpdateCommand.CommandText “UPDATE DD_ProduAccident SET Date Date, Loc Loc, Type Type, StartTime StartTime, EndTime EndTime, CauseAndResult CauseAndResult, InfectionTimeInfectionTime, InfectOutPut InfectOutPut, ReportEmp ReportEmp,NoteManNoteMan, DepNo DepNo,SGNameSGName,SGXZSGXZ,SSJESSJE WHERE ID Original_ID“; this.sqlUpdateCommand.Connection this.sqlConnection; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Date“, System.Data.SqlDbType.DateTime, 8, “Date“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Loc“, System.Data.SqlDbType.VarChar, 50, “Loc“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Type“, System.Data.SqlDbType.VarChar, 10, “Type“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“StartTime“, System.Data.SqlDbType.DateTime, 8, “StartTime“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“EndTime“, System.Data.SqlDbType.DateTime, 8, “EndTime“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“CauseAndResult“, System.Data.SqlDbType.VarChar, 2000, “CauseAndResult“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“InfectionTime“, System.Data.SqlDbType.VarChar, 30, “InfectionTime“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“InfectOutPut“,System.Data.SqlDbType.Float,8, “InfectOutPut“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“ReportEmp“, System.Data.SqlDbType.VarChar, 10, “ReportEmp“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“NoteMan“,System.Data.SqlDbType.VarChar,10, “NoteMan“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“DepNo“, System.Data.SqlDbType.VarChar, 10, “DepNo“; 山东科技大学硕士学位论文系统详细设计 39 该方法主要执行对数据的新增(sqlInsertCommand) 、修改(sqlUpdateCommand)、 删除(sqlDeleteCommand)的功能。方法中接收的参数是一个 DataSet,SqlHelper 方法 对接收到的数据集进行处理,从而得到我们想要的数据。 this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“SGName“, System.Data.SqlDbType.VarChar, 50, “SGName“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“SGXZ“, System.Data.SqlDbType.VarChar, 20, “SGXZ“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“SSJE“, System.Data.SqlDbType.Float, 8, “SSJE“; this.sqlUpdateCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Original_ID“, System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection., false, System.Byte0, System.Byte0, “ID“, System.Data.DataRowVersion.Original, null; // // sqlDeleteCommand // this.sqlDeleteCommand.CommandText “DELETE FROM DD_ProduAccident WHERE ID Original_ID“; this.sqlDeleteCommand.Connection this.sqlConnection; this.sqlDeleteCommand.Parameters.Addnew System.Data.SqlClient.SqlParameter“Original_ID“, System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection., false, System.Byte0, System.Byte0, “ID“, System.Data.DataRowVersion.Original, null; SqlHelper.UpdateDatasetthis.sqlInsertCommand,this.sqlDeleteCommand,this.sqlUpdateC ommand,ds,ds.Tables[0].TableName; myTrans.Commit; } catchException ex { myTrans.Rollback; throw new Exception“LongKouBusi.Bussiness-DiaoDu_JL-update_DD_ProduAccident“ex.Message; } finally { this.sqlConnection.Close; } } 山东科技大学硕士学位论文系统详细设计 40 (3)Web Service 中报表的数据关系 在这里主要介绍报表中的生产调度日报。 煤矿生产调度日报包括每天全矿及各生产工作面煤炭的生产计划、实际产量、月累 计计划、累计产量、每日产量对比、月累计对比、掘进计划、实际掘进进尺、煤炭销售 及库存情况以及主井提升斗数等信息,对煤炭生产起着非常重要的指导作用。 根据山东龙矿集团的要求,我们可以根据每天录入的生产、掘进、销售的数据直接 在线生成可打印的报表。数据分别从主副井提升台帐、掘进开拓进尺台帐、煤炭销售、 采煤循环图中取得。数据关系如下 P全矿月计划直接从生产技术的采煤月度计划取值。 P全矿当日计划P全矿月计划/计划天数。 P全矿当日实际P主井提升P副井提升-P减选矸石量。 P当日对比P全矿当日实际-P全矿当日计划。 P月累计计划P全矿当日计划*截至到日报生成日期天数。 P月累计实际日期在生成报表之前所有的P全矿当日实际之和。 P月累计对比P月累计实际-P月累计计划。 P工作面月计划直接从生产技术的采煤月度计划取值。 P工作面日计划P工作面月计划/计划天数。 P工作面日实际P昨日中班产量P昨日晚班产量P今日早班产量。 其中(P班次产量P每刀产量*刀数) P工作面日对比P工作面日实际-P工作面日计划。 P工作面月累计计划P工作面日计划*截至到日报生成日期天数。 P工作面月累计实际日期在生成报表之前所有的P工作面日实际之和。 P工作面月累计对比 P工作面月累计实际- P工作面月累计计划。 P掘进煤P全矿产量-P各工作面产量和。 L各单位总进尺月计划直接从生产技术的掘进月度计划取值。 L各单位总进尺日计划L各单位总进尺月计划/计划天数。 L各单位总进尺日实际L昨日中班L昨日晚班L今日早班。 L各单位总进尺日对比 L各单位总进尺日实际- L各单位总进尺日计划。 L各单位总进尺月累计计划 L各单位总进尺日计划*截至到日报生成日期天数。 L各单位总进尺月累计实际日期在生成报表之前所有的L各单位总进尺日实际之和。 山东科技大学硕士学位论文系统详细设计 41 L各单位总进尺月累计对比 L各单位总进尺月累计实际- L各单位总进尺月累计计划。 L全矿进尺各单位进尺之和。 (开拓进尺单独列出来) S当日直接从煤炭销售台帐取值。 S月累计日期在生成报表之前所有的S当日之和。 K当日直接从煤炭销售台帐取值。 K月累计日期在生成报表之前所有的K当日之和。 其中 P 为原煤产量;L 为进尺;S 为煤炭销售;K 为煤炭库存量。 数据关系都在 Web Service 中实现,下面以得到当日煤炭产量实际值为例,对Web Service 的设计进行说明 //得到单位原煤产量当日实际和当月累计实际,年累计 private double[] GetDWSJstring date,string workface,string depno { try { double[] returnstrnew double[3]; DateTime dtDateTime.Parsedate; //当月第一天 string dydt.Year.ToString“-“dt.Month.ToString“-1“; //当年第一天 string dndt.Year.ToString“-1-1“; string Sql“select“ “select suma.reamersum*a.reameroutput from dd_output a where a.[date]“date“ and a.dutytime早班 and a.Loc“workface“ as zsj,“ “select suma.reamersum*a.reameroutput from dd_output a where a.[date]dateaddday,- 1,“date“ and a.dutytime晚班 and a.Loc“workface“ as ysj,“ “select suma.reamersum*a.reameroutput from dd_output a where a.[date]dateaddday,- 1,“date“ and a.dutytime中班 and a.Loc“workface“ as zhsj“; SqlDataReader drSqlHelper.cuteReaderstrConn,CommandType.Text,Sql; dr.Read; double zsj0.0; double ysj0.0; double zhsj0.0; ifdr[“zsj“].ToString““ zsjdouble.Parsedr[“zsj“].ToString; 山东科技大学硕士学位论文系统详细设计 42 在上面的方法中,把时间、工作面和单位作为参数传递到函数中,根据数据关系从 而得到当日、当月和当年的原煤产量实际值,并把求出的值存到一个 double 型的数组中 为外部程序使用,为生成生产调度日报提供数据。 4.34.34.3 4.3 页面表示层设计页面表示层设计页面表示层设计 页面表示层设计 对页面进行设计的时候遵循页面友好、直观易用的原则,采用.net 的 CodeBehind 技 术以及 JavaScript 技术进行设计。 ifdr[“zhsj“].ToString““ zhsjdouble.Parsedr