資源描述:
《初學(xué)者的java項(xiàng)目》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、云南農(nóng)機(jī)監(jiān)理系統(tǒng)解析1.框架1.1此系統(tǒng)是基于軟件工程中常提到的”MVC”模式開發(fā)-----------學(xué)習(xí)軟件開發(fā)公共包,MD5等Ireport4.0.2設(shè)計(jì)的報(bào)表,需編譯公共類,公共使用的方法和類。Jdk的包,javaEE的包,外部應(yīng)用的包數(shù)據(jù)訪問(wèn)包,這里只是接口控制類,JS直接訪問(wèn)的類Service繼承類,所有方法項(xiàng)目中所有要使用的接口Model實(shí)體類數(shù)據(jù)訪問(wèn)包,實(shí)現(xiàn)類項(xiàng)目數(shù)據(jù)庫(kù),sql語(yǔ)句MySQL日志文件Servlet文件,調(diào)用規(guī)則Service文件,所有的接口注入Hibernate文件,注入Dao類Desktop.jsp存放外部
2、引用的數(shù)據(jù)包包含.jasper和.jrxml兩種文件項(xiàng)目中使用到的所有Js登錄界面的JSDesktop界面的Js項(xiàng)目用到的圖片,圖標(biāo)界面框架,一些用到的JSCSS,Indext.jsp,report.jsp美化的錯(cuò)誤頁(yè)面,還加個(gè)標(biāo)記工作日志otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasr
3、ecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecret
4、ary,Ministersand實(shí)體類(Model)Service接口DaoImplDao數(shù)據(jù)訪問(wèn)ServiceImpl控制類(Controller)界面JS(View)GFEDCBA圖1-1整體的MVC模式走一下報(bào)表流程:A:界面JS(View)部分代碼如下:{text:"打印測(cè)試",handler:function(){Ext.Ajax.request({url:"main/report.html?action=getDrivingLicenceReport",success:function(){newExt.Window({titl
5、e:"報(bào)表測(cè)試",height:600,width:700,html:''}).show();}});}}B:控制類(Controller)部分代碼:publicvoidgetDrivingLicenceReport(HttpServletRequestrequest,HttpServletResponseresponse)throwsExc
6、eption{request.setCharacterEncoding("utf-8");response.setContentType("application/json;charset=utf-8");inttype=1;HashMapparams=newHashMap();if(request.getParameter("type")!=null&&!"".equals(request.getParameter("type").trim())){type=Integer.valueOf(request.getParameter("ty
7、pe"));}Stringid=request.getParameter("id").trim();StringpeopleInfoId=request.getParameter("peopleInfoId").trim();StringdrivingLicenceTypeId=request.getParameter("drivingLicenceTypeId").trim();StringdrivingLicenceId=request.getParameter("drivingLicenceId").trim();if(type==1
8、){Listlist=otherstaffoftheCentre.Duringthewar,Zhuwastransferr