├── README.md ├── src ├── main │ ├── resources │ │ ├── config.properties │ │ ├── rebel-remote.xml │ │ ├── wx.properties │ │ ├── jdbc.properties │ │ ├── rebel.xml │ │ ├── spring-tx.xml │ │ ├── log4j.properties │ │ ├── spring-dao.xml │ │ ├── spring-db.xml │ │ ├── spring-mvc.xml │ │ └── applicationContext.xml │ ├── webapp │ │ ├── img │ │ │ ├── logo.png │ │ │ ├── test.jpg │ │ │ ├── logo2.png │ │ │ ├── logobg.png │ │ │ ├── logowx.png │ │ │ ├── topimg.png │ │ │ ├── bg-login.png │ │ │ ├── logo123.png │ │ │ └── repairman.png │ │ ├── css │ │ │ ├── style.css │ │ │ ├── main.css │ │ │ ├── bootstrap-multiselect.css │ │ │ └── messenger.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── music │ │ │ └── notifymusic.wav │ │ ├── layui │ │ │ ├── font │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.ttf │ │ │ │ └── iconfont.woff │ │ │ ├── images │ │ │ │ └── face │ │ │ │ │ ├── 0.gif │ │ │ │ │ ├── 1.gif │ │ │ │ │ ├── 10.gif │ │ │ │ │ ├── 11.gif │ │ │ │ │ ├── 12.gif │ │ │ │ │ ├── 13.gif │ │ │ │ │ ├── 14.gif │ │ │ │ │ ├── 15.gif │ │ │ │ │ ├── 16.gif │ │ │ │ │ ├── 17.gif │ │ │ │ │ ├── 18.gif │ │ │ │ │ ├── 19.gif │ │ │ │ │ ├── 2.gif │ │ │ │ │ ├── 20.gif │ │ │ │ │ ├── 21.gif │ │ │ │ │ ├── 22.gif │ │ │ │ │ ├── 23.gif │ │ │ │ │ ├── 24.gif │ │ │ │ │ ├── 25.gif │ │ │ │ │ ├── 26.gif │ │ │ │ │ ├── 27.gif │ │ │ │ │ ├── 28.gif │ │ │ │ │ ├── 29.gif │ │ │ │ │ ├── 3.gif │ │ │ │ │ ├── 30.gif │ │ │ │ │ ├── 31.gif │ │ │ │ │ ├── 32.gif │ │ │ │ │ ├── 33.gif │ │ │ │ │ ├── 34.gif │ │ │ │ │ ├── 35.gif │ │ │ │ │ ├── 36.gif │ │ │ │ │ ├── 37.gif │ │ │ │ │ ├── 38.gif │ │ │ │ │ ├── 39.gif │ │ │ │ │ ├── 4.gif │ │ │ │ │ ├── 40.gif │ │ │ │ │ ├── 41.gif │ │ │ │ │ ├── 42.gif │ │ │ │ │ ├── 43.gif │ │ │ │ │ ├── 44.gif │ │ │ │ │ ├── 45.gif │ │ │ │ │ ├── 46.gif │ │ │ │ │ ├── 47.gif │ │ │ │ │ ├── 48.gif │ │ │ │ │ ├── 49.gif │ │ │ │ │ ├── 5.gif │ │ │ │ │ ├── 50.gif │ │ │ │ │ ├── 51.gif │ │ │ │ │ ├── 52.gif │ │ │ │ │ ├── 53.gif │ │ │ │ │ ├── 54.gif │ │ │ │ │ ├── 55.gif │ │ │ │ │ ├── 56.gif │ │ │ │ │ ├── 57.gif │ │ │ │ │ ├── 58.gif │ │ │ │ │ ├── 59.gif │ │ │ │ │ ├── 6.gif │ │ │ │ │ ├── 60.gif │ │ │ │ │ ├── 61.gif │ │ │ │ │ ├── 62.gif │ │ │ │ │ ├── 63.gif │ │ │ │ │ ├── 64.gif │ │ │ │ │ ├── 65.gif │ │ │ │ │ ├── 66.gif │ │ │ │ │ ├── 67.gif │ │ │ │ │ ├── 68.gif │ │ │ │ │ ├── 69.gif │ │ │ │ │ ├── 7.gif │ │ │ │ │ ├── 70.gif │ │ │ │ │ ├── 71.gif │ │ │ │ │ ├── 8.gif │ │ │ │ │ └── 9.gif │ │ │ ├── css │ │ │ │ └── modules │ │ │ │ │ ├── layer │ │ │ │ │ └── default │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ └── code.css │ │ │ └── lay │ │ │ │ └── modules │ │ │ │ ├── code.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── flow.js │ │ │ │ ├── util.js │ │ │ │ ├── tree.js │ │ │ │ ├── carousel.js │ │ │ │ └── laypage.js │ │ ├── WEB-INF │ │ │ ├── lib │ │ │ │ ├── wx-tools-2.1.3.jar │ │ │ │ ├── aliyun-java-sdk-core-3.3.1.jar │ │ │ │ └── aliyun-java-sdk-dysmsapi-1.0.0.jar │ │ │ ├── error │ │ │ │ ├── error.html │ │ │ │ └── errorLogin.jsp │ │ │ ├── authentication.jsp │ │ │ ├── web.xml │ │ │ └── jsp │ │ │ │ ├── admin │ │ │ │ ├── WxOnlineRepairMsgManager.jsp │ │ │ │ ├── AdminMsgManager.jsp │ │ │ │ └── flatMsgManager.jsp │ │ │ │ ├── wx │ │ │ │ ├── repair_progress.jsp │ │ │ │ └── bindWxSystem.jsp │ │ │ │ └── repairman │ │ │ │ └── repairmanAcceptance.jsp │ │ ├── common │ │ │ ├── head.jsp │ │ │ ├── foot.jsp │ │ │ ├── menu.jsp │ │ │ └── css.jsp │ │ ├── js │ │ │ ├── flatMsgManager.js │ │ │ ├── repair_msg_detail.js │ │ │ ├── base.js │ │ │ ├── bindWxSystem.js │ │ │ ├── stuMsgManager.js │ │ │ ├── adminMsgManager.js │ │ │ └── app.js │ │ └── static │ │ │ ├── acceptanceSuccess.html │ │ │ ├── submitSuccess.html │ │ │ ├── success.html │ │ │ └── wxbinderror.html │ └── java │ │ └── org │ │ └── tysf │ │ └── gt │ │ ├── service │ │ ├── ISimageService.java │ │ ├── IFlatService.java │ │ ├── IRepairLogService.java │ │ ├── IRepairAreaService.java │ │ ├── IRepairProjectService.java │ │ ├── impl │ │ │ ├── SimageServiceImpl.java │ │ │ ├── FlatServiceImpl.java │ │ │ ├── RepairLogServiceImpl.java │ │ │ ├── RepairAreaServiceImpl.java │ │ │ ├── RepairProjectServiceImpl.java │ │ │ ├── AdministratorServiceImpl.java │ │ │ ├── StuMsgServiceImpl.java │ │ │ ├── RepairmanServiceImpl.java │ │ │ ├── WxOnlineRepairMsgServiceImpl.java │ │ │ └── WebSocketTest.java │ │ ├── IAdministratoraService.java │ │ ├── IStuMsgService.java │ │ ├── IRepairmanService.java │ │ └── IWxOnlineRepairMsgService.java │ │ ├── dao │ │ ├── ISimageDao.java │ │ ├── IRepairLogDao.java │ │ ├── IRepairAreaDao.java │ │ ├── IFlatDao.java │ │ ├── IAdministratorDao.java │ │ ├── IRepairProjectDao.java │ │ ├── IStudentMsgDao.java │ │ ├── IRepairmanDao.java │ │ └── IWxOnlineRepairMsgDao.java │ │ ├── utils │ │ ├── UUIDUtils.java │ │ ├── GsonUtils.java │ │ ├── AdminIdentifyUtils.java │ │ ├── RepairmanIdentityUtils.java │ │ ├── MD5Utils.java │ │ └── SmsUtils.java │ │ ├── pojo │ │ ├── Greeting.java │ │ ├── Page.java │ │ ├── HelloMessage.java │ │ ├── TemplateContent.java │ │ ├── RepairArea.java │ │ ├── Flat.java │ │ ├── RepairLog.java │ │ ├── RepairProject.java │ │ ├── TemplateData.java │ │ ├── Administrator.java │ │ ├── Repairman.java │ │ ├── SImage.java │ │ └── StudentMsg.java │ │ ├── api │ │ ├── AddressApi.java │ │ └── WxRepairMsgApi.java │ │ ├── mapper │ │ ├── FlatMsgMapper.xml │ │ ├── SImageMapper.xml │ │ ├── RepairAreaMapper.xml │ │ ├── RepairLogMapper.xml │ │ ├── AdministratorMapper.xml │ │ ├── RepairProjectMapper.xml │ │ ├── ReparimanMapper.xml │ │ └── StudentMsgMapper.xml │ │ ├── interceptor │ │ └── LoginInterceptor.java │ │ ├── wechat │ │ ├── hanlder │ │ │ ├── SubscribeHanlder.java │ │ │ └── ClickHanlder.java │ │ └── controller │ │ │ └── WxInitContoller.java │ │ └── admin │ │ └── controller │ │ ├── ShowImageController.java │ │ ├── FlatController.java │ │ ├── RepariAreaManagerContoller.java │ │ ├── UploadController.java │ │ ├── StuMsgManagerController.java │ │ └── RepairProjectManagerController.java └── test │ └── java │ └── org │ └── tysf │ └── gt │ └── junit │ └── RepairManJunit.java ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties └── .gitignore /README.md: -------------------------------------------------------------------------------- 1 | # repair 2 | 太原师范学院报修系统 3 | -------------------------------------------------------------------------------- /src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/webapp/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/logo.png -------------------------------------------------------------------------------- /src/main/webapp/img/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/test.jpg -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /src/main/webapp/css/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/css/style.css -------------------------------------------------------------------------------- /src/main/webapp/img/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/logo2.png -------------------------------------------------------------------------------- /src/main/webapp/img/logobg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/logobg.png -------------------------------------------------------------------------------- /src/main/webapp/img/logowx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/logowx.png -------------------------------------------------------------------------------- /src/main/webapp/img/topimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/topimg.png -------------------------------------------------------------------------------- /src/main/webapp/img/bg-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/bg-login.png -------------------------------------------------------------------------------- /src/main/webapp/img/logo123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/logo123.png -------------------------------------------------------------------------------- /src/main/webapp/img/repairman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/img/repairman.png -------------------------------------------------------------------------------- /src/main/webapp/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/webapp/music/notifymusic.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/music/notifymusic.wav -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/rebel-remote.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | repairManager 4 | 5 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/wx-tools-2.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/WEB-INF/lib/wx-tools-2.1.3.jar -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip 2 | -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/aliyun-java-sdk-core-3.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-core-3.3.1.jar -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/lib/aliyun-java-sdk-dysmsapi-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-dysmsapi-1.0.0.jar -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/warrenwuz/repair/HEAD/src/main/webapp/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/wx.properties: -------------------------------------------------------------------------------- 1 | wx.appId=wx569821408b1f3a92 2 | wx.appSecret=254a891bf31b357ab51844bcde630f7a 3 | wx.token=gt 4 | wx.aesKey= 5 | wx.mchId= 6 | wx.address=http://gongting.tunnel.qydev.com -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/ISimageService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import org.tysf.gt.pojo.SImage; 4 | 5 | public interface ISimageService { 6 | public void addSImage(SImage sImage);//添加图片 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://39.106.165.177:3306/repairmanager?useUnicode=true&characterEncoding=UTF-8&useSSL=false 3 | jdbc.username=root 4 | jdbc.password=Wuzhe1206. -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/error/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 | 会话已失效,点击重新登陆 9 | 10 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/ISimageDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import org.tysf.gt.pojo.SImage; 4 | 5 | /** 6 | * 报修上传图片 7 | * @author wuzhe 8 | * 9 | */ 10 | public interface ISimageDao { 11 | public void addSImage(SImage sImage);//添加图片 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IFlatService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.Flat; 6 | 7 | public interface IFlatService { 8 | public List queryFlatAll();//查询所有公寓 9 | public void addFlat(Flat flat);//添加公寓 10 | public void modifyFlat(Flat flat);//修改公寓信息 11 | } 12 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/authentication.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/utils/UUIDUtils.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.utils; 2 | 3 | import java.util.UUID; 4 | /** 5 | * 生成UUID的工具类 6 | * @author wuzhe 7 | * 8 | */ 9 | public class UUIDUtils { 10 | public static String getUUID(){ 11 | String uuid=UUID.randomUUID().toString().replaceAll("-", ""); 12 | return uuid; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/webapp/css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f5f5f5; 3 | } 4 | 5 | #main-content { 6 | max-width: 940px; 7 | padding: 2em 3em; 8 | margin: 0 auto 20px; 9 | background-color: #fff; 10 | border: 1px solid #e5e5e5; 11 | -webkit-border-radius: 5px; 12 | -moz-border-radius: 5px; 13 | border-radius: 5px; 14 | } -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | public class Greeting { 4 | private String content; 5 | 6 | public Greeting() { 7 | } 8 | 9 | public Greeting(String content) { 10 | this.content = content; 11 | } 12 | 13 | public String getContent() { 14 | return content; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IRepairLogDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.RepairLog; 6 | 7 | public interface IRepairLogDao { 8 | //通过维修ID查找维修日志 9 | public List queryRepairLogByWpid(String wpid); 10 | //添加维修日志 11 | public void addRepairLog(RepairLog repairLog); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IRepairLogService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.RepairLog; 6 | 7 | public interface IRepairLogService { 8 | //通过维修ID查找维修日志 9 | public List queryRepairLogByWpid(String wpid); 10 | //添加维修日志 11 | public void addRepairLog(RepairLog repairLog); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IRepairAreaDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.RepairArea; 6 | 7 | public interface IRepairAreaDao { 8 | 9 | public List queryRepairArea(); 10 | 11 | public int addRepairAreaGetRaid(String raname); 12 | 13 | public void modifyRepairArea(RepairArea repairArea); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IFlatDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.Flat; 6 | 7 | /** 8 | * 公寓 9 | * 10 | * @author wuzhe 11 | * 12 | */ 13 | public interface IFlatDao { 14 | public List queryFlatAll();// 查询所有公寓 15 | 16 | public void addFlat(Flat flat);//添加公寓 17 | 18 | public void modifyFlat(Flat flat);//修改公寓信息 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IRepairAreaService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.RepairArea; 6 | 7 | public interface IRepairAreaService { 8 | 9 | public List queryRepairArea(); 10 | 11 | public int addRepairAreaGetRaid(String raname); 12 | 13 | public void modifyRepairArea(RepairArea repairArea); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/utils/GsonUtils.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.utils; 2 | 3 | import com.google.gson.Gson; 4 | //JSON格式化工具类 5 | public class GsonUtils { 6 | private static final Gson gson=new Gson(); 7 | public static E getObject(String json,Class e){ 8 | return gson.fromJson(json, e); 9 | } 10 | public static String getJsonStr(Object object){ 11 | return gson.toJson(object); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/utils/AdminIdentifyUtils.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.utils; 2 | 3 | import org.tysf.gt.api.AddressApi; 4 | 5 | public class AdminIdentifyUtils { 6 | //编写员工的工号 7 | public static String getAdminIdentify(int count){ 8 | String identify="0000"+(count+1); 9 | System.out.println(identify); 10 | return AddressApi.SCHOOLCODE+identify.substring(identify.length()-4); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/Page.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 分页实体类 7 | * @author wuzhe 8 | * 9 | */ 10 | public class Page implements Serializable{ 11 | 12 | /** 13 | * 14 | */ 15 | private static final long serialVersionUID = 1L; 16 | /* private int currentPage=1;//当前页 17 | private int pageSize;//每页大小 18 | private int pageTotal;//总页数 19 | */ 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/HelloMessage.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | public class HelloMessage { 4 | private String name; 5 | 6 | public HelloMessage() { 7 | } 8 | 9 | public HelloMessage(String name) { 10 | this.name = name; 11 | } 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | 17 | public void setName(String name) { 18 | this.name = name; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IRepairProjectService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.RepairProject; 6 | 7 | public interface IRepairProjectService { 8 | 9 | public List queryRepairProject(); 10 | 11 | public List queryRepairProjectByRaid(int raid); 12 | 13 | public int repairProjectAddGetRpid(RepairProject repairProject); 14 | 15 | public void repairProjectModify(RepairProject repairProject); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/utils/RepairmanIdentityUtils.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.utils; 2 | 3 | import org.tysf.gt.api.AddressApi; 4 | 5 | public class RepairmanIdentityUtils { 6 | //编写员工的工号 7 | public static String getRepairmaIdentify(int count){ 8 | String identify="00000"+(count+1); 9 | System.out.println(identify); 10 | return AddressApi.SCHOOLCODE+identify.substring(identify.length()-5); 11 | } 12 | public static void main(String[] args) { 13 | 14 | System.out.println( getRepairmaIdentify(5)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/SimageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import javax.annotation.Resource; 4 | 5 | import org.springframework.stereotype.Service; 6 | import org.tysf.gt.dao.ISimageDao; 7 | import org.tysf.gt.pojo.SImage; 8 | import org.tysf.gt.service.ISimageService; 9 | 10 | @Service 11 | public class SimageServiceImpl implements ISimageService { 12 | @Resource 13 | private ISimageDao simageDao; 14 | 15 | @Override 16 | public void addSImage(SImage sImage) { 17 | simageDao.addSImage(sImage); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IAdministratoraService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.Administrator; 6 | 7 | public interface IAdministratoraService { 8 | 9 | public List queryAdmin(); 10 | 11 | public Administrator queryAdminByIdAndPassword(Administrator administrator); 12 | 13 | public void addAdministrator(Administrator administrator); 14 | 15 | public void modifyAdministratorNameAndPassword(Administrator administrator); 16 | 17 | public void modifyAdministratorTel(Administrator administrator); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/webapp/common/head.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 |
3 | 4 | 5 | 14 |
-------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IAdministratorDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | import java.util.List; 3 | 4 | import org.tysf.gt.pojo.Administrator; 5 | public interface IAdministratorDao { 6 | //查找全部的管理人员 7 | public List queryAdmin(); 8 | //通过管理员ID和密码查找管理员 9 | public Administrator queryAdminByIdAndPassword(Administrator administrator); 10 | //添加管理人员信息 11 | public void addAdministrator(Administrator administrator); 12 | //更新管理员名字并更新密码(因为密码是由管理员的工号和名字得来的,更新了管理名字密码必须更新) 13 | public void modifyAdministratorNameAndPassword(Administrator administrator); 14 | //更新管理员电话 15 | public void modifyAdministratorTel(Administrator administrator); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IRepairProjectDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.RepairProject; 6 | 7 | public interface IRepairProjectDao { 8 | 9 | public List queryRepairProject(); 10 | 11 | public List queryRepairProjectByRaid(int raid); 12 | 13 | public int repairProjectAddGetRpid(RepairProject repairProject); 14 | 15 | public void repairProjectModify(RepairProject repairProject); 16 | //通过维修工人工号查找维修范围 17 | public List queryProjectByRmid(String rmid); 18 | //查找维修工人还有选择的维修范围 19 | public List queryUnSelectRepairProject(String rmid); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/error/errorLogin.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | Insert title here 11 | 12 | 13 |
会话已失效,点击重新登陆
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/rebel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/FlatServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | 4 | import java.util.List; 5 | 6 | import javax.annotation.Resource; 7 | 8 | import org.springframework.stereotype.Service; 9 | import org.tysf.gt.dao.IFlatDao; 10 | import org.tysf.gt.pojo.Flat; 11 | import org.tysf.gt.service.IFlatService; 12 | @Service 13 | public class FlatServiceImpl implements IFlatService{ 14 | @Resource 15 | IFlatDao flatDao; 16 | @Override 17 | public List queryFlatAll() { 18 | return flatDao.queryFlatAll(); 19 | } 20 | @Override 21 | public void addFlat(Flat flat) { 22 | flatDao.addFlat(flat); 23 | } 24 | @Override 25 | public void modifyFlat(Flat flat) { 26 | flatDao.modifyFlat(flat); 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IStuMsgService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.StudentMsg; 6 | 7 | /** 8 | * 学生信息逻辑接口 9 | * @author wuzhe 10 | * 11 | */ 12 | public interface IStuMsgService { 13 | public List queryStudentMsg();//查询学生信息 14 | public void modifyStuMsg(StudentMsg studentMsg);//修改学生信息 15 | public void addstuMsgManager(StudentMsg studentMsg);//添加学生信息 16 | public String queryStuidByopenid(String openid);//查询学生是否绑定了公众号 17 | public StudentMsg bindWxSystem(StudentMsg studentMsg);//绑定系统 18 | public void updateOpenidByStuid(StudentMsg studentMsg);//添加openid值 19 | public StudentMsg queryStudentMsgByOpenid(String openid);//通过微信公众号唯一标识查找学生信息 20 | public void unbindByOpenid(String openid);//解除绑定 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/api/AddressApi.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.api; 2 | 3 | import java.io.FileNotFoundException; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.util.Properties; 7 | 8 | /** 9 | * 外网地址 10 | * @author wuzhe 11 | * 12 | */ 13 | public class AddressApi { 14 | public static String Address=null; 15 | public static final String SCHOOLCODE="10119";//学校代码 16 | static{ 17 | Properties p = new Properties(); 18 | try { 19 | InputStream in=AddressApi.class.getResourceAsStream("/wx.properties"); 20 | p.load(in); 21 | Address=p.getProperty("wx.address"); 22 | } catch (FileNotFoundException e) { 23 | System.out.println(e.getMessage()); 24 | } catch (IOException e) { 25 | System.out.println(e.getMessage()); 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IStudentMsgDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.tysf.gt.pojo.StudentMsg; 6 | 7 | public interface IStudentMsgDao { 8 | public List queryStudentMsg();// 查询学生信息 9 | 10 | public void modifyStuMsg(StudentMsg studentMsg);// 修改学生信息 11 | 12 | public void addstuMsgManager(StudentMsg studentMsg);// 添加学生信息 13 | 14 | public String queryStuidByopenid(String openid);// 查询学生是否绑定了公众号 15 | 16 | public StudentMsg queryStudentMsgByStuidAndPassword(StudentMsg studentMsg);// 密码和学号进行匹配验证用户 17 | 18 | public void updateOpenidByStuid(StudentMsg studentMsg);// 添加openid值 19 | 20 | public StudentMsg queryStudentMsgByOpenid(String openid);// 通过微信公众号唯一标识查找学生信息 21 | 22 | public void unbindByOpenid(String openid);//解除绑定 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/TemplateContent.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | public class TemplateContent { 4 | private String value; 5 | private String color; 6 | public TemplateContent() { 7 | super(); 8 | // TODO Auto-generated constructor stub 9 | } 10 | 11 | public TemplateContent(String value) { 12 | super(); 13 | this.value = value; 14 | } 15 | 16 | public TemplateContent(String value, String color) { 17 | super(); 18 | this.value = value; 19 | this.color = color; 20 | } 21 | public String getValue() { 22 | return value; 23 | } 24 | public void setValue(String value) { 25 | this.value = value; 26 | } 27 | public String getColor() { 28 | return color; 29 | } 30 | public void setColor(String color) { 31 | this.color = color; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IRepairmanDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.tysf.gt.pojo.Repairman; 7 | 8 | public interface IRepairmanDao { 9 | public void addRepairman(Repairman repairman); 10 | 11 | public List queryRepariman(); 12 | 13 | public void addRepairProjectByRmid(Map params); 14 | 15 | public void modifyRepairmanNameAndPassword(Repairman repairman); 16 | 17 | public void modifyRepairmanTel(Repairman repairman); 18 | //查找用户是否绑定了该系统 19 | public String queryRmidByopenid(String openid); 20 | //工号和密码登录系统 21 | public Repairman bindWxRepairmanSystem(Repairman repairman); 22 | //添加/更新openid 23 | public void updateOpenidByRmid(Repairman repairman); 24 | //解除绑定 25 | public void unbindByOpenid(String openid); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/RepairArea.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | /** 4 | * 保修区域实体类 5 | * 6 | * @author wuzhe 7 | * 8 | */ 9 | public class RepairArea { 10 | private int raid; 11 | private String raname; 12 | 13 | public RepairArea() { 14 | super(); 15 | } 16 | 17 | public RepairArea(int raid, String raname) { 18 | super(); 19 | this.raid = raid; 20 | this.raname = raname; 21 | } 22 | 23 | public int getRaid() { 24 | return raid; 25 | } 26 | 27 | public void setRaid(int raid) { 28 | this.raid = raid; 29 | } 30 | 31 | public String getRaname() { 32 | return raname; 33 | } 34 | 35 | public void setRaname(String raname) { 36 | this.raname = raname; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return "RepairArea [raid=" + raid + ", raname=" + raname + "]"; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/FlatMsgMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | insert into flat(fid,fname)values(#{fid},#{fname}) 13 | 14 | 15 | update flat set fname=#{fname} where fid=#{fid} 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/RepairLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.tysf.gt.dao.IRepairLogDao; 9 | import org.tysf.gt.dao.IStudentMsgDao; 10 | import org.tysf.gt.pojo.RepairLog; 11 | import org.tysf.gt.service.IRepairLogService; 12 | @Service 13 | public class RepairLogServiceImpl implements IRepairLogService { 14 | @Resource 15 | private IRepairLogDao repairLogDao; 16 | @Resource 17 | private IStudentMsgDao studentMSgDao; 18 | 19 | @Override 20 | public List queryRepairLogByWpid(String wpid) { 21 | return repairLogDao.queryRepairLogByWpid(wpid); 22 | } 23 | 24 | @Override 25 | public void addRepairLog(RepairLog repairLog) { 26 | repairLogDao.addRepairLog(repairLog); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/RepairAreaServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.tysf.gt.dao.IRepairAreaDao; 9 | import org.tysf.gt.pojo.RepairArea; 10 | import org.tysf.gt.service.IRepairAreaService; 11 | @Service 12 | public class RepairAreaServiceImpl implements IRepairAreaService { 13 | @Resource 14 | private IRepairAreaDao repairAreaDao; 15 | @Override 16 | public List queryRepairArea() { 17 | return repairAreaDao.queryRepairArea(); 18 | } 19 | @Override 20 | public int addRepairAreaGetRaid(String raname) { 21 | return repairAreaDao.addRepairAreaGetRaid(raname); 22 | } 23 | @Override 24 | public void modifyRepairArea(RepairArea repairArea) { 25 | repairAreaDao.modifyRepairArea(repairArea); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/Flat.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | /** 4 | * 公寓实体类 5 | * 6 | * @author wuzhe 7 | * 8 | */ 9 | public class Flat { 10 | private int fid; 11 | private String fname; 12 | 13 | public Flat() { 14 | super(); 15 | // TODO Auto-generated constructor stub 16 | } 17 | public Flat(int fid) { 18 | super(); 19 | this.fid = fid; 20 | 21 | } 22 | public Flat(int fid, String fname) { 23 | super(); 24 | this.fid = fid; 25 | this.fname = fname; 26 | } 27 | 28 | public int getFid() { 29 | return fid; 30 | } 31 | 32 | public void setFid(int fid) { 33 | this.fid = fid; 34 | } 35 | 36 | public String getFname() { 37 | return fname; 38 | } 39 | 40 | public void setFname(String fname) { 41 | this.fname = fname; 42 | } 43 | 44 | @Override 45 | public String toString() { 46 | return "Flat [fid=" + fid + ", fname=" + fname + "]"; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/SImageMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | insert into simage(simageid,simagepath,timestamp,imagetype) values(#{simageid},#{simagepath},#{timestamp},#{imagetype}) 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/RepairAreaMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | insert into repairarea(raname) values(#{raname}) 13 | 14 | 15 | update repairarea set raname=#{raname} where raid=#{raid} 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/RepairLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | insert into repair_log(repair_log,wpid) values(#{repairLog},#{wpid}) 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IRepairmanService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.tysf.gt.pojo.RepairProject; 7 | import org.tysf.gt.pojo.Repairman; 8 | 9 | public interface IRepairmanService { 10 | public void addRepairman(Repairman repairman); 11 | public List queryRepariman(); 12 | //通过维修工人的工号设置维修范围 13 | public void addRepairProjectByRmid(Map params); 14 | public List queryProjectByRmid(String rmid); 15 | public List queryUnSelectRepairProject(String rmid); 16 | public void modifyRepairmanNameAndPassword(Repairman repairman); 17 | public void modifyRepairmanTel(Repairman repairman); 18 | public String queryRmidByopenid(String openid);//查找用户是否绑定了系统 19 | public Repairman bindWxRepairmanSystem(Repairman repairman);//工号和密码登录系统 20 | public void updateOpenidByRmid(Repairman repairman);//添加openid 21 | public void unbindByOpenid(String openid);//解除绑定 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/webapp/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/webapp/js/flatMsgManager.js: -------------------------------------------------------------------------------- 1 | $().ready(function() { 2 | $("#Addflat").click(function(){ 3 | $("#fid").val(""); 4 | $("#fname").val(""); 5 | $("#submit").val(""); 6 | $("#fid").removeAttr("disabled"); 7 | $("#myModal").modal('show'); 8 | 9 | }) 10 | $(".modifyFlat").click(function(){ 11 | //首先找到点击按钮的父辈tbody 再查询其下的子辈元素类名为raname的td 获取他的文本值 12 | var tbody=$(this).parents(".FlatItem"); 13 | var fid=tbody.children(".fid").html(); 14 | var fname=tbody.children(".fname").html(); 15 | $("#fid").val(fid).attr("disabled","disabled"); 16 | $("#fname").val(fname); 17 | $("#submit").val("modify"); 18 | $("#myModal").modal('show'); 19 | }) 20 | $("#submit").click(function(){ 21 | if($(this).val()=="modify"){ 22 | $("#fid").removeAttr("disabled"); 23 | $("#FlatMsg").attr("action","/repairManager/admin/modifyFlat.do"); 24 | $("#FlatMsg").submit(); 25 | } 26 | else{ 27 | $("#FlatMsg").attr("action","/repairManager/admin/addFlat.do"); 28 | $("#FlatMsg").submit(); 29 | } 30 | 31 | }) 32 | 33 | }) -------------------------------------------------------------------------------- /src/main/webapp/common/foot.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 7 | 10 | 11 | 12 | 14 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/RepairProjectServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.tysf.gt.dao.IRepairProjectDao; 9 | import org.tysf.gt.pojo.RepairProject; 10 | import org.tysf.gt.service.IRepairProjectService; 11 | @Service 12 | public class RepairProjectServiceImpl implements IRepairProjectService { 13 | @Resource 14 | private IRepairProjectDao repairProjectDao; 15 | @Override 16 | public List queryRepairProject() { 17 | return repairProjectDao.queryRepairProject(); 18 | } 19 | @Override 20 | public List queryRepairProjectByRaid(int raid) { 21 | return repairProjectDao.queryRepairProjectByRaid(raid); 22 | } 23 | @Override 24 | public int repairProjectAddGetRpid(RepairProject repairProject) { 25 | return repairProjectDao.repairProjectAddGetRpid(repairProject); 26 | } 27 | @Override 28 | public void repairProjectModify(RepairProject repairProject) { 29 | repairProjectDao.repairProjectModify(repairProject); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/RepairLog.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | import java.sql.Timestamp; 4 | 5 | /** 6 | * 维修日志 7 | * @author wuzhe 8 | * 9 | */ 10 | public class RepairLog { 11 | private int id;//自动增长ID 12 | private String repairLog;//日志记录 13 | private Timestamp logDate;//日志日期 14 | private String wpid;//产生日志的维修订单 15 | 16 | public RepairLog() { 17 | super(); 18 | // TODO Auto-generated constructor stub 19 | } 20 | public RepairLog(String repairLog, String wpid) { 21 | super(); 22 | this.repairLog = repairLog; 23 | this.wpid = wpid; 24 | } 25 | public int getId() { 26 | return id; 27 | } 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | public String getRepairLog() { 32 | return repairLog; 33 | } 34 | public void setRepairLog(String repairLog) { 35 | this.repairLog = repairLog; 36 | } 37 | public Timestamp getLogDate() { 38 | return logDate; 39 | } 40 | public void setLogDate(Timestamp logDate) { 41 | this.logDate = logDate; 42 | } 43 | public String getWpid() { 44 | return wpid; 45 | } 46 | public void setWpid(String wpid) { 47 | this.wpid = wpid; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/test/java/org/tysf/gt/junit/RepairManJunit.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.junit; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | import org.springframework.test.context.ContextConfiguration; 10 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 11 | import org.tysf.gt.pojo.RepairProject; 12 | import org.tysf.gt.pojo.Repairman; 13 | import org.tysf.gt.service.IRepairmanService; 14 | 15 | @RunWith(SpringJUnit4ClassRunner.class) 16 | @ContextConfiguration(locations = { "classpath:applicationContext.xml" }) 17 | public class RepairManJunit { 18 | @Resource 19 | private IRepairmanService repairmanServie; 20 | @Test 21 | public void queryRepairmanService(){ 22 | /* List queryRepariman = repairmanServie.queryRepariman(); 23 | System.out.println(queryRepariman.size()); 24 | for(Repairman repairman:queryRepariman){ 25 | System.out.println(repairman); 26 | }*/ 27 | List queryProjectByRmid = repairmanServie.queryProjectByRmid("231311"); 28 | System.out.println(queryProjectByRmid.size()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/utils/MD5Utils.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.utils; 2 | 3 | import java.security.MessageDigest; 4 | import java.security.NoSuchAlgorithmException; 5 | 6 | public class MD5Utils { 7 | public static String md5Password(String password) { 8 | 9 | try { 10 | // 得到一个信息摘要器 11 | MessageDigest digest = MessageDigest.getInstance("md5"); 12 | byte[] result = digest.digest(password.getBytes()); 13 | StringBuffer buffer = new StringBuffer(); 14 | // 把没一个byte 做一个与运算 0xff; 15 | for (byte b : result) { 16 | // 与运算 17 | int number = b & 0xff;// 加盐 18 | String str = Integer.toHexString(number); 19 | if (str.length() == 1) { 20 | buffer.append("0"); 21 | } 22 | buffer.append(str); 23 | } 24 | 25 | // 标准的md5加密后的结果 26 | return buffer.toString(); 27 | } catch (NoSuchAlgorithmException e) { 28 | e.printStackTrace(); 29 | return ""; 30 | } 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.interceptor; 2 | 3 | import javax.annotation.Resource; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpServletResponse; 6 | import javax.servlet.http.HttpSession; 7 | 8 | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 9 | import org.tysf.gt.service.IWxOnlineRepairMsgService; 10 | /** 11 | * 登陆拦截器 12 | * @author wuzhe 13 | * 14 | */ 15 | public class LoginInterceptor extends HandlerInterceptorAdapter { 16 | @Resource 17 | private IWxOnlineRepairMsgService wxOnlineRepairMsgService; 18 | @Override 19 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) 20 | throws Exception { 21 | HttpSession session=request.getSession(); 22 | String admin = (String)session.getAttribute("admin"); 23 | if(admin==null||"".equals(admin)){ 24 | request.getRequestDispatcher("/index.jsp").forward(request, response); 25 | return false; 26 | } 27 | /** 28 | * 利用拦截每次对未读消息进行渲染 29 | */ 30 | int count=wxOnlineRepairMsgService.queryCountUnCheck(); 31 | session.setAttribute("unCheckcount", count); 32 | return true; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/IWxOnlineRepairMsgService.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.tysf.gt.pojo.WxOnlineRepairMsg; 7 | 8 | public interface IWxOnlineRepairMsgService { 9 | public void addWxOnlineRepairMsg(WxOnlineRepairMsg wxOnlineRepairMsg); 10 | public void addSImagesByWpid(Mapparams); 11 | public List queryWxOnlineRepairMsg(int status); 12 | public int queryCountUnCheck();//查询没有审核的数量 13 | public WxOnlineRepairMsg queryrepairMsgDetailByWpid(String wpid);//查询报修细节 14 | public void dispatchWxOnlineRepairMsg(WxOnlineRepairMsg wxOnlineRepairMsg);//派工详情 15 | public int queryWxOnlineRepairMsgStatus(String wpid);//查询保修单的状态 16 | public String queryRepairmanForFree();//查找空闲的维修工人 17 | public WxOnlineRepairMsg queryrepairmanAcceptanceByWpid(String wpid);//查找维修工人受理的信息 18 | public void updateStatusByWpid(String wpid);//更新报修单的状态 19 | public List queryrepairmanRecode(String rmid);//查找维修记录 20 | public void addCompleteRemarkAndStatusByWpid(WxOnlineRepairMsg wxOnlineRepairMsg);//提交完工(完工备注和更新保修单状态) 21 | public void checkAndAcceptance(String wpid);//验收报修单 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/spring-tx.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/webapp/common/menu.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/AdministratorServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Service; 8 | import org.tysf.gt.dao.IAdministratorDao; 9 | import org.tysf.gt.pojo.Administrator; 10 | import org.tysf.gt.service.IAdministratoraService; 11 | 12 | @Service 13 | public class AdministratorServiceImpl implements IAdministratoraService { 14 | @Resource 15 | private IAdministratorDao administratorDao; 16 | 17 | @Override 18 | public List queryAdmin() { 19 | return administratorDao.queryAdmin(); 20 | } 21 | 22 | @Override 23 | public Administrator queryAdminByIdAndPassword(Administrator administrator) { 24 | return administratorDao.queryAdminByIdAndPassword(administrator); 25 | } 26 | 27 | @Override 28 | public void addAdministrator(Administrator administrator) { 29 | administratorDao.addAdministrator(administrator); 30 | } 31 | 32 | @Override 33 | public void modifyAdministratorNameAndPassword(Administrator administrator) { 34 | administratorDao.modifyAdministratorNameAndPassword(administrator); 35 | } 36 | 37 | @Override 38 | public void modifyAdministratorTel(Administrator administrator) { 39 | administratorDao.modifyAdministratorTel(administrator); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/wechat/hanlder/SubscribeHanlder.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.wechat.hanlder; 2 | 3 | import java.util.Map; 4 | 5 | import org.springframework.stereotype.Repository; 6 | import org.tysf.gt.api.AddressApi; 7 | 8 | import com.soecode.wxtools.api.IService; 9 | import com.soecode.wxtools.api.WxMessageHandler; 10 | import com.soecode.wxtools.bean.WxXmlMessage; 11 | import com.soecode.wxtools.bean.WxXmlOutMessage; 12 | import com.soecode.wxtools.exception.WxErrorException; 13 | /** 14 | * 关注的推送内容 15 | * @author wuzhe 16 | * 17 | */ 18 | @Repository 19 | public class SubscribeHanlder implements WxMessageHandler { 20 | @Override 21 | public WxXmlOutMessage handle(WxXmlMessage wxMessage, Map context, IService iService) 22 | throws WxErrorException { 23 | WxXmlOutMessage wxXmlOutMessage=WxXmlOutMessage.TEXT().content("欢迎关注太原师范学院\n在线报修公众平台\n学生绑定点击绑定系统\n用户名为学号\n密码为姓名首字母大写+学号 \n例如弓婷大美女:GTDMV" 24 | +"\n维修人员绑定点击绑定系统\n用户名为工号\n密码为姓名首字母大写+学号 \n例如弓婷大美女:GTDMV").toUser(wxMessage.getFromUserName()) 25 | .fromUser(wxMessage.getToUserName()).build(); 26 | return wxXmlOutMessage; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | #\u5B9A\u4E49LOG\u8F93\u51FA\u7EA7\u522B 2 | log4j.rootLogger=INFO,Console,File 3 | #\u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u76EE\u7684\u5730\u4E3A\u63A7\u5236\u53F0 4 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 5 | log4j.appender.Console.Target=System.out 6 | #\u53EF\u4EE5\u7075\u6D3B\u5730\u6307\u5B9A\u65E5\u5FD7\u8F93\u51FA\u683C\u5F0F\uFF0C\u4E0B\u9762\u4E00\u884C\u662F\u6307\u5B9A\u5177\u4F53\u7684\u683C\u5F0F 7 | log4j.appender.Console.layout = org.apache.log4j.PatternLayout 8 | log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n 9 | 10 | #\u6587\u4EF6\u5927\u5C0F\u5230\u8FBE\u6307\u5B9A\u5C3A\u5BF8\u7684\u65F6\u5019\u4EA7\u751F\u4E00\u4E2A\u65B0\u7684\u6587\u4EF6 11 | log4j.appender.File = org.apache.log4j.RollingFileAppender 12 | #\u6307\u5B9A\u8F93\u51FA\u76EE\u5F55 13 | log4j.appender.File.File = logs/ssm.log 14 | #\u5B9A\u4E49\u6587\u4EF6\u6700\u5927\u5927\u5C0F 15 | log4j.appender.File.MaxFileSize = 10MB 16 | # \u8F93\u51FA\u6240\u4EE5\u65E5\u5FD7\uFF0C\u5982\u679C\u6362\u6210DEBUG\u8868\u793A\u8F93\u51FADEBUG\u4EE5\u4E0A\u7EA7\u522B\u65E5\u5FD7 17 | log4j.appender.File.Threshold = ALL 18 | log4j.appender.File.layout = org.apache.log4j.PatternLayout 19 | log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/dao/IWxOnlineRepairMsgDao.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.dao; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | import org.tysf.gt.pojo.WxOnlineRepairMsg; 8 | 9 | public interface IWxOnlineRepairMsgDao { 10 | //添加保修信息 11 | public void addWxOnlineRepairMsg(WxOnlineRepairMsg wxOnlineRepairMsg); 12 | //如果上传了图片,则为报修单添加图片 13 | public void addSImagesByWpid(Map params); 14 | //查找保修信息 15 | public List queryWxOnlineRepairMsg(@Param("status")int status); 16 | //查询没有审核的数量 17 | public int queryCountUnCheck(); 18 | //查询报修细节 19 | public WxOnlineRepairMsg queryrepairMsgDetailByWpid(String wpid); 20 | //派工 21 | public void addWxOnlineRepairmanAndRemark(WxOnlineRepairMsg wxOnlineRepairMsg); 22 | //查询报修单的状态 23 | public int queryWxOnlineRepairMsgStatus(String wpid); 24 | //查找空闲师傅 25 | public String queryRepairmanForFree(); 26 | //查找维修师傅受理信息 27 | public WxOnlineRepairMsg queryrepairmanAcceptanceByWpid(String wpid); 28 | //更新报修单状态 29 | public void updateStatusByWpid(String wpid); 30 | //查找维修记录 31 | public List queryrepairmanRecode(String rmid); 32 | //提交完工(完工备注和更新保修单状态) 33 | public void addCompleteRemarkAndStatusByWpid(WxOnlineRepairMsg wxOnlineRepairMsg); 34 | //验收订单 35 | public void checkAndAcceptance(String wpid); 36 | 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/webapp/static/acceptanceSuccess.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 提交成功 8 | 10 | 11 | 12 | 19 | 20 | 21 |
22 |
23 |
24 |
25 |

受理成功

26 |

请尽快为同学维修

27 |
28 |
29 |

30 | 确定 31 |

32 |
33 |
34 | 37 |
38 |
39 |
40 | 41 | -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap-multiselect.css: -------------------------------------------------------------------------------- 1 | span.multiselect-native-select{position:relative}span.multiselect-native-select select{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px -1px -1px -3px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;left:50%;top:30px}.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li.multiselect-group label{margin:0;padding:3px 20px 3px 20px;height:100%;font-weight:700}.multiselect-container>li.multiselect-group-clickable label{cursor:pointer}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0} 2 | -------------------------------------------------------------------------------- /src/main/webapp/static/submitSuccess.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 提交成功 8 | 10 | 11 | 12 | 19 | 20 | 21 |
22 |
23 |
24 |
25 |

提交成功

26 |

我们会尽快安排维修师傅进行维修

27 |
28 |
29 |

30 | 确定 31 |

32 |
33 |
34 | 37 |
38 |
39 |
40 | 41 | -------------------------------------------------------------------------------- /src/main/webapp/static/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 绑定成功 8 | 10 | 11 | 12 | 19 | 20 | 21 |
22 |
23 |
24 |
25 |

绑定成功

26 |

你可以随时接受到太原师范学院在线保修平台发布的消息,也可以在在线报修

27 |
28 |
29 |

30 | 确定 31 |

32 |
33 |
34 | 37 |
38 |
39 |
40 | 41 | -------------------------------------------------------------------------------- /src/main/webapp/static/wxbinderror.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 提示消息 8 | 10 | 11 | 12 | 19 | 20 | 21 |
22 |
23 |
24 |
25 |

你已经绑定平台

26 |

你可以随时接受到太原师范学院在线保修平台发布的消息,也可以在在线报修

27 |
28 |
29 |

30 | 确定 31 |

32 |
33 |
34 | 37 |
38 |
39 |
40 | 41 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/RepairProject.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | /** 4 | * 报修项目实体类 5 | * 6 | * @author wuzhe 7 | * 8 | */ 9 | public class RepairProject { 10 | private int rpid; 11 | private String rpname; 12 | private RepairArea repairArea;// 报修区域 13 | 14 | public RepairProject() { 15 | super(); 16 | // TODO Auto-generated constructor stub 17 | } 18 | 19 | public RepairProject(int rpid) { 20 | super(); 21 | this.rpid = rpid; 22 | } 23 | 24 | public RepairProject(String rpname, RepairArea repairArea) { 25 | super(); 26 | this.rpname = rpname; 27 | this.repairArea = repairArea; 28 | } 29 | 30 | public RepairProject(int rpid, String rpname, RepairArea repairArea) { 31 | super(); 32 | this.rpid = rpid; 33 | this.rpname = rpname; 34 | this.repairArea = repairArea; 35 | } 36 | 37 | public int getRpid() { 38 | return rpid; 39 | } 40 | 41 | public void setRpid(int rpid) { 42 | this.rpid = rpid; 43 | } 44 | 45 | public String getRpname() { 46 | return rpname; 47 | } 48 | 49 | public void setRpname(String rpname) { 50 | this.rpname = rpname; 51 | } 52 | 53 | public RepairArea getRepairArea() { 54 | return repairArea; 55 | } 56 | 57 | public void setRepairArea(RepairArea repairArea) { 58 | this.repairArea = repairArea; 59 | } 60 | 61 | @Override 62 | public String toString() { 63 | return "RepairProject [rpid=" + rpid + ", rpname=" + rpname + ", repairArea=" + repairArea + "]"; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/webapp/common/css.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 3 | 4 | 5 | 6 | 太原师范学院在线报修系统 7 | 8 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/webapp/js/repair_msg_detail.js: -------------------------------------------------------------------------------- 1 | $().ready(function() { 2 | $.ajax({ 3 | type : 'post', 4 | url : '/repairManager/admin/queryRepairmaForJson.do', 5 | success : function(data) { 6 | $.each($.parseJSON(data), function(i, val) {// 这个使用parseJSON是因为传过来的data需要转换成json对象 7 | $("#rmid").append( 8 | "") 10 | }) 11 | } 12 | }) 13 | $("#DispatchingType").change(function() { 14 | $("#repairman").toggle();//显示审核模态框 15 | }) 16 | $("#sumbit").click(function() { 17 | var DispatchingTypeValue = $("#DispatchingType").val(); 18 | var remark = $("#remark").val(); 19 | if (DispatchingTypeValue == 1) { 20 | if ($("#rmid").val() == '') { 21 | alert("请选择派工人员") 22 | return; 23 | } 24 | } 25 | console.log($("#dispatchingForm").serializeJSON()) 26 | $.ajax({ 27 | contentType : "application/x-www-form-urlencoded", 28 | type : 'POST', 29 | url : '/repairManager/admin/dispatchingRepairMsg.do', 30 | data : $("#dispatchingForm").serializeJSON(), 31 | success : function() { 32 | layer.msg("提交成功") 33 | $("#myModal").modal("hide"); 34 | } 35 | }) 36 | }) 37 | $("#checkResult").change(function() { 38 | var checkResult = $("#checkResult").val(); 39 | if (checkResult == 1) { 40 | $("#DispatchingTypeDiv").show(); 41 | $("#remarklabel").html("审核备注"); 42 | } 43 | if (checkResult == 2) { 44 | console.log(2) 45 | $("#DispatchingTypeDiv").hide(); 46 | $("#remarklabel").html("驳回理由"); 47 | } 48 | }) 49 | }) -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/admin/controller/ShowImageController.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.admin.controller; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.io.OutputStream; 8 | 9 | import javax.servlet.http.HttpServletResponse; 10 | import javax.servlet.http.HttpSession; 11 | 12 | import org.springframework.stereotype.Controller; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | 15 | /** 16 | * 显示图片 17 | * 18 | * @author wuzhe 19 | * 20 | */ 21 | @Controller 22 | @RequestMapping("admin") 23 | public class ShowImageController { 24 | /** 25 | * 图片显示类 26 | * 27 | * @param id 28 | */ 29 | @RequestMapping("showImage.do") 30 | public void showImage(String id, HttpSession session, HttpServletResponse response) { 31 | String path = session.getServletContext().getRealPath("onlineRepairImage"); 32 | File file = new File(path, id); 33 | response.setCharacterEncoding("utf-8"); 34 | response.setContentType("image/*"); 35 | InputStream in = null; 36 | OutputStream out = null; 37 | try { 38 | in = new FileInputStream(file); 39 | out = response.getOutputStream(); 40 | int length = 0; 41 | byte[] b = new byte[1024]; 42 | while ((length = in.read(b)) > 0) { 43 | out.write(b, 0, length); 44 | } 45 | } catch (IOException e) { 46 | // TODO Auto-generated catch block 47 | e.printStackTrace(); 48 | } finally { 49 | try { 50 | if (in != null) { 51 | in.close(); 52 | } 53 | if (out != null) { 54 | out.close(); 55 | } 56 | } catch (IOException e) { 57 | // TODO Auto-generated catch block 58 | e.printStackTrace(); 59 | } 60 | 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/StuMsgServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | import java.util.List; 3 | 4 | import javax.annotation.Resource; 5 | 6 | import org.springframework.stereotype.Service; 7 | import org.tysf.gt.dao.IStudentMsgDao; 8 | import org.tysf.gt.pojo.StudentMsg; 9 | import org.tysf.gt.service.IStuMsgService; 10 | import org.tysf.gt.utils.MD5Utils; 11 | @Service 12 | public class StuMsgServiceImpl implements IStuMsgService{ 13 | @Resource 14 | private IStudentMsgDao studentMsgDao; 15 | @Override 16 | public List queryStudentMsg() { 17 | return studentMsgDao.queryStudentMsg(); 18 | } 19 | @Override 20 | public void modifyStuMsg(StudentMsg studentMsg) { 21 | studentMsgDao.modifyStuMsg(studentMsg); 22 | } 23 | @Override 24 | public void addstuMsgManager(StudentMsg studentMsg) { 25 | studentMsgDao.addstuMsgManager(studentMsg); 26 | 27 | } 28 | @Override 29 | public String queryStuidByopenid(String openid) { 30 | return studentMsgDao.queryStuidByopenid(openid); 31 | } 32 | //判断用户是否已经绑定过微信公众号 33 | @Override 34 | public StudentMsg bindWxSystem(StudentMsg studentMsg) { 35 | studentMsg.setPassword(MD5Utils.md5Password(studentMsg.getPassword())); 36 | return studentMsgDao.queryStudentMsgByStuidAndPassword(studentMsg); 37 | } 38 | @Override 39 | public void updateOpenidByStuid(StudentMsg studentMsg) { 40 | studentMsgDao.updateOpenidByStuid(studentMsg); 41 | } 42 | @Override 43 | public StudentMsg queryStudentMsgByOpenid(String openid) { 44 | return studentMsgDao.queryStudentMsgByOpenid(openid); 45 | } 46 | @Override 47 | public void unbindByOpenid(String openid) {//解除绑定 48 | studentMsgDao.unbindByOpenid(openid);//解除绑定 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/TemplateData.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | public class TemplateData { 4 | private TemplateContent first; 5 | private TemplateContent keyword1; 6 | private TemplateContent keyword2; 7 | private TemplateContent keyword3; 8 | private TemplateContent remark; 9 | public TemplateData(TemplateContent first, TemplateContent keyword1, TemplateContent keyword2, 10 | TemplateContent keyword3, TemplateContent remark) { 11 | super(); 12 | this.first = first; 13 | this.keyword1 = keyword1; 14 | this.keyword2 = keyword2; 15 | this.keyword3 = keyword3; 16 | this.remark = remark; 17 | } 18 | 19 | public TemplateContent getFirst() { 20 | return first; 21 | } 22 | 23 | public void setFirst(TemplateContent first) { 24 | this.first = first; 25 | } 26 | 27 | public TemplateContent getKeyword1() { 28 | return keyword1; 29 | } 30 | 31 | public void setKeyword1(TemplateContent keyword1) { 32 | this.keyword1 = keyword1; 33 | } 34 | 35 | public TemplateContent getKeyword2() { 36 | return keyword2; 37 | } 38 | 39 | public void setKeyword2(TemplateContent keyword2) { 40 | this.keyword2 = keyword2; 41 | } 42 | 43 | public TemplateContent getKeyword3() { 44 | return keyword3; 45 | } 46 | 47 | public void setKeyword3(TemplateContent keyword3) { 48 | this.keyword3 = keyword3; 49 | } 50 | 51 | public TemplateContent getRemark() { 52 | return remark; 53 | } 54 | 55 | public void setRemark(TemplateContent remark) { 56 | this.remark = remark; 57 | } 58 | 59 | @Override 60 | public String toString() { 61 | return "TemplateData [first=" + first + ", keyword1=" + keyword1 + ", keyword2=" + keyword2 + ", keyword3=" 62 | + keyword3 + ", remark=" + remark + "]"; 63 | } 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/AdministratorMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 18 | 19 | insert into admin(adminid,adminname,admintel,adminpassword,authorization) 20 | values(#{adminid},#{adminname},#{admintel},#{adminpassword},1) 21 | 22 | 23 | update admin set adminname=#{adminname},adminpassword=#{adminpassword} 24 | where adminid=#{adminid} 25 | 26 | 27 | update admin set admintel=#{admintel} where adminid=#{adminid} 28 | 29 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TysfHelper 4 | 5 | index.jsp 6 | 7 | 8 | contextConfigLocation 9 | classpath:applicationContext.xml 10 | 11 | 12 | org.springframework.web.context.ContextLoaderListener 13 | 14 | 15 | encodingFilter 16 | org.springframework.web.filter.CharacterEncodingFilter 17 | true 18 | 19 | encoding 20 | UTF-8 21 | 22 | 23 | 24 | encodingFilter 25 | /* 26 | 27 | 28 | SpringMVC 29 | org.springframework.web.servlet.DispatcherServlet 30 | 31 | contextConfigLocation 32 | classpath:spring-mvc.xml 33 | 34 | 1 35 | true 36 | 37 | 38 | SpringMVC 39 | *.do 40 | 41 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/Administrator.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | public class Administrator { 4 | private String adminid; 5 | private String adminname; 6 | private String admintel; 7 | private String adminpassword; 8 | private int authorization; 9 | 10 | public Administrator() { 11 | super(); 12 | // TODO Auto-generated constructor stub 13 | } 14 | 15 | public Administrator(String adminid) { 16 | super(); 17 | this.adminid = adminid; 18 | } 19 | 20 | public Administrator(String adminid, String adminname, String admintel, String adminpassword, 21 | int authorization) { 22 | super(); 23 | this.adminid = adminid; 24 | this.adminname = adminname; 25 | this.admintel = admintel; 26 | this.adminpassword = adminpassword; 27 | this.authorization = authorization; 28 | } 29 | 30 | public String getAdminid() { 31 | return adminid; 32 | } 33 | 34 | public void setAdminid(String adminid) { 35 | this.adminid = adminid; 36 | } 37 | 38 | public String getAdminname() { 39 | return adminname; 40 | } 41 | 42 | public void setAdminname(String adminname) { 43 | this.adminname = adminname; 44 | } 45 | 46 | public String getAdmintel() { 47 | return admintel; 48 | } 49 | 50 | public void setAdmintel(String admintel) { 51 | this.admintel = admintel; 52 | } 53 | 54 | public String getAdminpassword() { 55 | return adminpassword; 56 | } 57 | 58 | public void setAdminpassword(String adminpassword) { 59 | this.adminpassword = adminpassword; 60 | } 61 | 62 | public int getAuthorization() { 63 | return authorization; 64 | } 65 | 66 | public void setAuthorization(int authorization) { 67 | this.authorization = authorization; 68 | } 69 | 70 | @Override 71 | public String toString() { 72 | return "Administrator [adminid=" + adminid + ", adminname=" + adminname + ", admintel=" + admintel 73 | + ", adminpassword=" + adminpassword + ", authorization=" + authorization + "]"; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/admin/controller/FlatController.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.admin.controller; 2 | import java.io.IOException; 3 | import java.io.PrintWriter; 4 | import java.util.List; 5 | 6 | import javax.annotation.Resource; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.servlet.ModelAndView; 12 | import org.tysf.gt.pojo.Flat; 13 | import org.tysf.gt.service.IFlatService; 14 | import org.tysf.gt.utils.GsonUtils; 15 | /** 16 | * 公寓信息管理 17 | * @author wuzhe 18 | * 19 | */ 20 | @Controller 21 | @RequestMapping("admin/") 22 | public class FlatController { 23 | @Resource 24 | private IFlatService flatService; 25 | @RequestMapping("showFlatMsg.do") 26 | public ModelAndView queryFlat(){ 27 | ModelAndView mv=new ModelAndView(); 28 | List list = flatService.queryFlatAll(); 29 | mv.addObject("list", list); 30 | mv.setViewName("admin/flatMsgManager"); 31 | return mv; 32 | } 33 | @RequestMapping("addFlat.do") 34 | public String addFlat(String fid,String fname){ 35 | Flat flat=new Flat(Integer.parseInt(fid), fname); 36 | flatService.addFlat(flat); 37 | return "redirect:/admin/showFlatMsg.do"; 38 | 39 | } 40 | @RequestMapping("modifyFlat.do") 41 | public String modifyFlat(String fid,String fname){ 42 | System.out.println(fid+fname); 43 | Flat flat=new Flat(Integer.parseInt(fid), fname); 44 | flatService.modifyFlat(flat); 45 | return "redirect:/admin/showFlatMsg.do"; 46 | } 47 | @RequestMapping("queryAllFlatJson") 48 | public void queryFlatJson(HttpServletResponse response){ 49 | List list = flatService.queryFlatAll(); 50 | String json = GsonUtils.getJsonStr(list); 51 | PrintWriter writer=null; 52 | try { 53 | response.setCharacterEncoding("utf-8"); 54 | writer= response.getWriter(); 55 | writer.println(json); 56 | } catch (IOException e) { 57 | // TODO Auto-generated catch block 58 | e.printStackTrace(); 59 | }finally { 60 | 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/admin/controller/RepariAreaManagerContoller.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.admin.controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.List; 6 | 7 | import javax.annotation.Resource; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.tysf.gt.pojo.RepairArea; 13 | import org.tysf.gt.service.IRepairAreaService; 14 | import org.tysf.gt.utils.GsonUtils; 15 | 16 | @Controller 17 | @RequestMapping("/") 18 | public class RepariAreaManagerContoller { 19 | @Resource 20 | private IRepairAreaService repairAreaService; 21 | 22 | @RequestMapping("admin/repariAreaAdd.do") 23 | public void addRepairArea(String raname, HttpServletResponse response) { 24 | int raid = repairAreaService.addRepairAreaGetRaid(raname); 25 | PrintWriter writer = null; 26 | try { 27 | writer = response.getWriter(); 28 | writer.write(raid); 29 | } catch (IOException e) { 30 | // TODO Auto-generated catch block 31 | e.printStackTrace(); 32 | } finally { 33 | writer.close(); 34 | } 35 | 36 | } 37 | 38 | @RequestMapping("admin/repariAreaModify.do") 39 | public String modifyRepairArea(int raid, String raname, HttpServletResponse response) { 40 | RepairArea repairArea = new RepairArea(raid, raname); 41 | repairAreaService.modifyRepairArea(repairArea); 42 | return "redirect:/admin/repairManager.do"; 43 | } 44 | 45 | /** 46 | * 查找报修区域 并将报修区域转换成Json格式传到前台 47 | */ 48 | @RequestMapping("queryRepairAreaJson.do") 49 | public void queryRepairAreaJson(HttpServletResponse response) { 50 | List repairAreaList = repairAreaService.queryRepairArea(); 51 | String json = GsonUtils.getJsonStr(repairAreaList); 52 | response.setCharacterEncoding("utf-8"); 53 | PrintWriter writer = null; 54 | try { 55 | writer = response.getWriter(); 56 | writer.write(json); 57 | } catch (IOException e) { 58 | // TODO Auto-generated catch block 59 | e.printStackTrace(); 60 | }finally{ 61 | writer.close(); 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/admin/WxOnlineRepairMsgManager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 5 | 6 | 7 | 8 | 13 | <%@ include file="/common/css.jsp"%> 14 | 15 |
16 | <%@ include file="/common/head.jsp"%> 17 | 18 | <%@ include file="/common/menu.jsp"%> 19 | 20 |
21 | 22 |
23 |
24 | 最新报修 25 |
26 |
27 | 36 |
37 |
38 |
39 |
40 | 41 | <%@ include file="/common/foot.jsp"%> 42 | 43 |
44 | 46 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/RepairProjectMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 18 | 19 | insert into repairproject(rpname,raid) values(#{rpname},#{repairArea.raid}) 20 | 21 | 22 | update repairproject set rpname=#{rpname},raid=#{repairArea.raid} where rpid=#{rpid} 23 | 24 | 28 | 34 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/Repairman.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 维修人员实体类 7 | * @author wuzhe 8 | * 9 | */ 10 | public class Repairman { 11 | private String rmid;//工号 12 | private String rmname;//姓名 13 | private String rmtel;//电话 14 | private String rmpassword;//密码 15 | private List repairProject;//负责维修项目 16 | private String rmopenid;//绑定微信的唯一标识 17 | public Repairman() { 18 | super(); 19 | // TODO Auto-generated constructor stub 20 | } 21 | 22 | public Repairman(String rmid) { 23 | super(); 24 | this.rmid = rmid; 25 | } 26 | 27 | public Repairman(String rmid, String rmname, String rmtel, String rmpassword, List repairProject, 28 | String openid) { 29 | super(); 30 | this.rmid = rmid; 31 | this.rmname = rmname; 32 | this.rmtel = rmtel; 33 | this.rmpassword = rmpassword; 34 | this.repairProject = repairProject; 35 | this.rmopenid = openid; 36 | } 37 | 38 | public String getRmid() { 39 | return rmid; 40 | } 41 | public void setRmid(String rmid) { 42 | this.rmid = rmid; 43 | } 44 | public String getRmname() { 45 | return rmname; 46 | } 47 | public void setRmname(String rmname) { 48 | this.rmname = rmname; 49 | } 50 | public String getRmtel() { 51 | return rmtel; 52 | } 53 | public void setRmtel(String rmtel) { 54 | this.rmtel = rmtel; 55 | } 56 | public String getRmpassword() { 57 | return rmpassword; 58 | } 59 | public void setRmpassword(String rmpassword) { 60 | this.rmpassword =rmpassword; 61 | } 62 | public List getRepairProject() { 63 | return repairProject; 64 | } 65 | public void setRepairProject(List repairProject) { 66 | this.repairProject = repairProject; 67 | } 68 | 69 | public String getOpenid() { 70 | return rmopenid; 71 | } 72 | 73 | public void setOpenid(String openid) { 74 | this.rmopenid = openid; 75 | } 76 | 77 | @Override 78 | public String toString() { 79 | return "Repairman [rmid=" + rmid + ", rmname=" + rmname + ", rmtel=" + rmtel + ", rmpassword=" + rmpassword 80 | + ", repairProject=" + repairProject + ", rmopenid=" + rmopenid + "]"; 81 | } 82 | 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/RepairmanServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import javax.annotation.Resource; 7 | 8 | import org.springframework.stereotype.Service; 9 | import org.tysf.gt.dao.IRepairProjectDao; 10 | import org.tysf.gt.dao.IRepairmanDao; 11 | import org.tysf.gt.pojo.RepairProject; 12 | import org.tysf.gt.pojo.Repairman; 13 | import org.tysf.gt.service.IRepairmanService; 14 | @Service 15 | public class RepairmanServiceImpl implements IRepairmanService{ 16 | @Resource 17 | private IRepairmanDao repairmanDao; 18 | @Resource 19 | private IRepairProjectDao repairProjectDao; 20 | @Override 21 | public void addRepairman(Repairman repairman) { 22 | repairmanDao.addRepairman(repairman); 23 | } 24 | @Override 25 | public List queryRepariman() { 26 | return repairmanDao.queryRepariman(); 27 | } 28 | @Override 29 | public void addRepairProjectByRmid(Map params) { 30 | repairmanDao.addRepairProjectByRmid(params); 31 | 32 | } 33 | @Override 34 | public List queryProjectByRmid(String rmid) { 35 | return repairProjectDao.queryProjectByRmid(rmid); 36 | } 37 | @Override 38 | public List queryUnSelectRepairProject(String rmid) { 39 | return repairProjectDao.queryUnSelectRepairProject(rmid); 40 | } 41 | @Override 42 | public void modifyRepairmanNameAndPassword(Repairman repairman) { 43 | repairmanDao.modifyRepairmanNameAndPassword(repairman); 44 | } 45 | @Override 46 | public void modifyRepairmanTel(Repairman repairman) { 47 | repairmanDao.modifyRepairmanTel(repairman); 48 | } 49 | @Override 50 | public String queryRmidByopenid(String openid) { 51 | return repairmanDao.queryRmidByopenid(openid); 52 | } 53 | @Override 54 | public Repairman bindWxRepairmanSystem(Repairman repairman) { 55 | return repairmanDao.bindWxRepairmanSystem(repairman); 56 | } 57 | @Override 58 | public void updateOpenidByRmid(Repairman repairman) { 59 | repairmanDao.updateOpenidByRmid(repairman); 60 | 61 | } 62 | @Override 63 | public void unbindByOpenid(String openid) { 64 | repairmanDao.unbindByOpenid(openid); 65 | 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/SImage.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | import java.sql.Timestamp; 4 | 5 | /** 6 | * 报修上传故障照片 7 | * @author wuzhe 8 | * 9 | */ 10 | public class SImage { 11 | private String simageid;//上传照片的编号(使用UUID) 12 | private String simagepath;//上传照片的保存路径 13 | private Timestamp timestamp;//上传照片的时间 14 | private String wpid;//微信报修单流水号(使用UUID) 15 | private int imagetype;//照片类型(0为报修照片1为完工照片) 16 | public SImage() { 17 | super(); 18 | // TODO Auto-generated constructor stub 19 | } 20 | 21 | public SImage(String simageid, String simagepath, Timestamp timestamp) { 22 | super(); 23 | this.simageid = simageid; 24 | this.simagepath = simagepath; 25 | this.timestamp = timestamp; 26 | } 27 | 28 | public SImage(String simageid, String simagepath, Timestamp timestamp, String wpid) { 29 | super(); 30 | this.simageid = simageid; 31 | this.simagepath = simagepath; 32 | this.timestamp = timestamp; 33 | this.wpid = wpid; 34 | } 35 | 36 | public SImage(String simageid, String simagepath, Timestamp timestamp, String wpid, int imagetype) { 37 | super(); 38 | this.simageid = simageid; 39 | this.simagepath = simagepath; 40 | this.timestamp = timestamp; 41 | this.wpid = wpid; 42 | this.imagetype = imagetype; 43 | } 44 | 45 | public String getSimageid() { 46 | return simageid; 47 | } 48 | public void setSimageid(String simageid) { 49 | this.simageid = simageid; 50 | } 51 | public String getSimagepath() { 52 | return simagepath; 53 | } 54 | public void setSimagepath(String simagepath) { 55 | this.simagepath = simagepath; 56 | } 57 | public Timestamp getTimestamp() { 58 | return timestamp; 59 | } 60 | public void setTimestamp(Timestamp timestamp) { 61 | this.timestamp = timestamp; 62 | } 63 | public String getWpid() { 64 | return wpid; 65 | } 66 | public void setWpid(String wpid) { 67 | this.wpid = wpid; 68 | } 69 | 70 | public int getImagetype() { 71 | return imagetype; 72 | } 73 | 74 | public void setImagetype(int imagetype) { 75 | this.imagetype = imagetype; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | return "Simage [simageid=" + simageid + ", simagepath=" + simagepath + ", timestamp=" + timestamp + ", wpid=" 81 | + wpid + "]"; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/pojo/StudentMsg.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.pojo; 2 | 3 | /** 4 | * 学生信息 5 | * 6 | * @author wuzhe 7 | * 8 | */ 9 | public class StudentMsg { 10 | private String stuid; 11 | private String sname; 12 | private Flat flat; 13 | private String dormitory;// 学生宿舍号 14 | private String tel;// 学生电话 15 | private String password;//学生密码 16 | private String openid;//微信公众号对于用户的唯一标识 17 | public StudentMsg() { 18 | super(); 19 | // TODO Auto-generated constructor stub 20 | } 21 | 22 | public StudentMsg(String stuid, String sname,String dormitory, String tel, String password) { 23 | super(); 24 | this.stuid = stuid; 25 | this.sname = sname; 26 | this.dormitory = dormitory; 27 | this.tel = tel; 28 | this.password = password; 29 | } 30 | 31 | public StudentMsg(String stuid) { 32 | this.stuid = stuid; 33 | } 34 | 35 | public String getStuid() { 36 | return stuid; 37 | } 38 | 39 | public void setStuid(String stuid) { 40 | this.stuid = stuid; 41 | } 42 | 43 | public String getSname() { 44 | return sname; 45 | } 46 | 47 | public void setSname(String sname) { 48 | this.sname = sname; 49 | } 50 | 51 | public String getDormitory() { 52 | return dormitory; 53 | } 54 | 55 | public void setDormitory(String dormitory) { 56 | this.dormitory = dormitory; 57 | } 58 | 59 | public String getTel() { 60 | return tel; 61 | } 62 | 63 | public void setTel(String tel) { 64 | this.tel = tel; 65 | } 66 | 67 | public Flat getFlat() { 68 | return flat; 69 | } 70 | 71 | public void setFlat(Flat flat) { 72 | this.flat = flat; 73 | } 74 | 75 | public String getPassword() { 76 | return password; 77 | } 78 | 79 | public void setPassword(String password) { 80 | this.password = password; 81 | } 82 | 83 | 84 | 85 | public String getOpenid() { 86 | return openid; 87 | } 88 | 89 | public void setOpenid(String openid) { 90 | this.openid = openid; 91 | } 92 | 93 | @Override 94 | public String toString() { 95 | return "StudentMsg [stuid=" + stuid + ", sname=" + sname + ", flat=" + flat + ", dormitory=" + dormitory 96 | + ", tel=" + tel + ", password=" + password + ", openid=" + openid + "]"; 97 | } 98 | 99 | 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/mapper/ReparimanMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | insert 18 | repairman(rmid,rmname,rmtel,rmpassword) 19 | values(#{rmid},#{rmname},#{rmtel},#{rmpassword}) 20 | 21 | 25 | 26 | insert 27 | repairman_repairproject(rpid,rmid)values(#{rpid},#{rmid}) 28 | 29 | 30 | update repairman set rmname=#{rmname},rmpassword=#{rmpassword} 31 | where rmid=#{rmid} 32 | 33 | 34 | update repairman set rmtel=#{rmtel} 35 | where rmid=#{rmid} 36 | 37 | 40 | 43 | 44 | update repairman set rmopenid=#{rmopenid} where rmid=#{rmid} 45 | 46 | 47 | update repairman set rmopenid='' where rmopenid=#{rmopenid} 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/admin/controller/UploadController.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.admin.controller; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.io.PrintWriter; 6 | import java.sql.Timestamp; 7 | 8 | import javax.annotation.Resource; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | import javax.servlet.http.HttpSession; 12 | 13 | import org.springframework.stereotype.Controller; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.multipart.MultipartFile; 16 | import org.tysf.gt.pojo.SImage; 17 | import org.tysf.gt.service.ISimageService; 18 | import org.tysf.gt.utils.GsonUtils; 19 | import org.tysf.gt.utils.UUIDUtils; 20 | 21 | /** 22 | * 上传图片接口 23 | * 24 | * @author wuzhe 25 | * 26 | */ 27 | @Controller 28 | @RequestMapping("upload") 29 | public class UploadController { 30 | @Resource 31 | private ISimageService simageService; 32 | /** 33 | * 上传图片(这里需要注意的是MultipartFile的名字必须与fileVal的名字一致) 34 | * @throws IOException 35 | * @throws IllegalStateException 36 | */ 37 | @RequestMapping("uploadImage.do") 38 | public void uploadImage(MultipartFile image, HttpServletRequest request, HttpServletResponse response) throws IllegalStateException, IOException { 39 | PrintWriter out = null; 40 | HttpSession session = request.getSession(); 41 | // 获取容器路径 42 | String filePath = session.getServletContext().getRealPath("/onlineRepairImage"); 43 | File parent=new File(filePath); 44 | if(!parent.exists()){ 45 | parent.mkdir(); 46 | } 47 | // 获取文件姓名 48 | String fileName = image.getOriginalFilename(); 49 | // 去除后缀名名字 50 | String realFileName = fileName.substring(0, fileName.lastIndexOf(".")); 51 | // 建立一个附件的唯一标识 52 | String simageid = UUIDUtils.getUUID(); 53 | // 获得保存路径的文件名 54 | String savefileName = fileName.replace(realFileName, simageid); 55 | // 建立文件 56 | File filedest = new File(parent, savefileName); 57 | // 上传到本地 58 | image.transferTo(filedest); 59 | // 建立时间戳 60 | Timestamp timestamp = new Timestamp(System.currentTimeMillis()); 61 | SImage simage=new SImage(simageid, savefileName, timestamp); 62 | simageService.addSImage(simage); 63 | out = response.getWriter(); 64 | out.write(GsonUtils.getJsonStr(simageid));//使用weui.js 的upload返回值必须采用json形式 65 | 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,o,a="layui-fixbar",r="layui-fixbar-top",n=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['
    ',e.bar1?'
  • '+c[0]+"
  • ":"",e.bar2?'
  • '+c[1]+"
  • ":"",'
  • '+c[2]+"
  • ","
"].join("")),s=g.find("."+r),u=function(){var t=n.scrollTop();t>=e.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&g.css(e.css),l.append(g),u(),g.find("li").on("click",function(){var i=t(this),o=i.attr("lay-type");"top"===o&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,o)}),n.on("scroll",function(){clearTimeout(o),o=setTimeout(function(){u()},100)}))},countdown:function(e,t,i){var o=this,a="function"==typeof t,r=new Date(e).getTime(),n=new Date(!t||a?(new Date).getTime():t).getTime(),l=r-n,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var g=setTimeout(function(){o.countdown(e,n+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,g),l<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,o=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>6912e5?(a=new Date(e),o[0][0]=i.digit(a.getFullYear(),4),o[0][1]=i.digit(a.getMonth()+1),o[0][2]=i.digit(a.getDate()),t||(o[1][0]=i.digit(a.getHours()),o[1][1]=i.digit(a.getMinutes()),o[1][2]=i.digit(a.getSeconds())),o[0].join("-")+" "+o[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var o=e.length;o 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | update studentmsg set fid=#{flat.fid}, tel=#{tel},dormitory=#{dormitory} 21 | where stuid=#{stuid} 22 | 23 | 24 | insert into studentmsg (stuid,sname,fid,dormitory,tel,password) values 25 | (#{stuid},#{sname},#{flat.fid},#{dormitory},#{tel},#{password}) 26 | 27 | 30 | 33 | 34 | update studentmsg set openid=#{openid} where stuid=#{stuid} 35 | 36 | 39 | 40 | update studentmsg set openid='' where openid=#{openid} 41 | 42 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/api/WxRepairMsgApi.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.api; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | import javax.annotation.Resource; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | import org.springframework.stereotype.Controller; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestMethod; 15 | import org.springframework.web.bind.annotation.RequestParam; 16 | import org.tysf.gt.pojo.WxOnlineRepairMsg; 17 | import org.tysf.gt.service.IRepairmanService; 18 | import org.tysf.gt.service.IWxOnlineRepairMsgService; 19 | import org.tysf.gt.utils.GsonUtils; 20 | 21 | import com.github.pagehelper.PageHelper; 22 | import com.github.pagehelper.PageInfo; 23 | 24 | /** 25 | * 这个维修信息的查询APi 26 | * 由于会在微信端对微信信息进行查询、所有统一方法进行维修信息的统一查询 27 | * @author wuzhe 28 | * 29 | */ 30 | @Controller 31 | @RequestMapping("api") 32 | public class WxRepairMsgApi { 33 | @Resource 34 | private IWxOnlineRepairMsgService wxOnlineRepairMsgService; 35 | @Resource 36 | private IRepairmanService repairmanService; 37 | /*** 38 | * 维修师傅维修记录查询 39 | * 40 | * @param openid 41 | * @param pageNumber 42 | * @param pageSize 43 | * @return 44 | */ 45 | @RequestMapping(value = "repairmanRecode.do", method = RequestMethod.POST) 46 | public void repairmanRecode(String openid, @RequestParam(defaultValue = "1") Integer pageNumber, 47 | @RequestParam(defaultValue = "10") Integer pageSize, HttpServletResponse response) { 48 | PageHelper.startPage(pageNumber, pageSize); 49 | String rmid=repairmanService.queryRmidByopenid(openid); 50 | List wxOnlineRepairMsgs = wxOnlineRepairMsgService.queryrepairmanRecode(rmid); 51 | PageInfo page = new PageInfo(wxOnlineRepairMsgs); 52 | Map data = new HashMap(); 53 | data.put("LastPage", page.isIsLastPage()); 54 | data.put("msg", wxOnlineRepairMsgs); 55 | PrintWriter writer = null; 56 | try { 57 | response.setCharacterEncoding("utf-8"); 58 | writer = response.getWriter(); 59 | String result = GsonUtils.getJsonStr(data); 60 | writer.write(result); 61 | } catch (IOException e) { 62 | // TODO Auto-generated catch block 63 | e.printStackTrace(); 64 | } finally { 65 | writer.close(); 66 | } 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/webapp/js/base.js: -------------------------------------------------------------------------------- 1 | //WebScoket的开启方法 2 | $().ready(function(){ 3 | var index=0; 4 | var confirm=null;//维修通知单提醒 5 | var websocket = null; 6 | var host = window.location.host;//获取主机地址 7 | console.log(host) 8 | //判断当前浏览器是否支持WebSocket 9 | if ('WebSocket' in window) { 10 | websocket = new WebSocket("ws://"+host+"/repairManager/websocket.do"); 11 | } 12 | else { 13 | alert('当前浏览器 Not support websocket') 14 | } 15 | 16 | //连接发生错误的回调方法 17 | websocket.onerror = function () { 18 | }; 19 | 20 | //连接成功建立的回调方法 21 | websocket.onopen = function () { 22 | } 23 | 24 | //接收到消息的回调方法 25 | websocket.onmessage = function (event) { 26 | index=index+1; 27 | if(confirm!=null){ 28 | confirm.close(); 29 | } 30 | $("#notifymusic")[0].play(); 31 | confirm=layer.open({ 32 | title: '新的报修订单' 33 | ,content: '你有'+index+'条维修通知单等待查看', 34 | btn:['查看', '取消'], 35 | btnAlign: 'c', 36 | offset: 'lt', 37 | skin:'layui-layer-lan' 38 | ,yes:function(index, layero){ 39 | $(window).attr("location","/repairManager/admin/wxOnLineRepairMsgManager.do") 40 | }, 41 | btn2:function(index,layero){ 42 | layer.msg("请及时查看") 43 | layer.close(index) 44 | }, 45 | anim:6 46 | }); 47 | } 48 | 49 | //连接关闭的回调方法 50 | websocket.onclose = function () { 51 | setMessageInnerHTML("WebSocket连接关闭"); 52 | } 53 | 54 | //监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。 55 | window.onbeforeunload = function () { 56 | websocket.onclose;//关闭 57 | } 58 | $("#test").click(function(){ 59 | $("#notifymusic")[0].play();//播放提示音 60 | }); 61 | layui.use(['element', 'layer'], function () { 62 | var element = layui.element; 63 | var layer = layui.layer 64 | layer.photos({ 65 | photos: '#layer-photos-demo' 66 | ,anim: 0 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数) 67 | }); 68 | }); 69 | 70 | }) 71 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/wx/repair_progress.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | 15 | 维修进度 16 | 52 | 53 | 54 |
55 |
56 |
57 |

58 | 维修进度 59 |

60 |
61 |
62 |
63 | 64 |
65 |
    66 | 67 | 68 |
  • 69 |
    70 |

    ${fn:substring(repairLog.logDate,0,19)}

    71 |

    72 | ${repairLog.repairLog} 73 |

    74 |
  • 75 |
    76 | 77 |
78 |
79 | 80 | 81 | 82 |
83 |
84 | 88 |
89 |
90 | 91 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/service/impl/WxOnlineRepairMsgServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.service.impl; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import javax.annotation.Resource; 7 | 8 | import org.springframework.stereotype.Service; 9 | import org.tysf.gt.dao.IWxOnlineRepairMsgDao; 10 | import org.tysf.gt.pojo.WxOnlineRepairMsg; 11 | import org.tysf.gt.service.IWxOnlineRepairMsgService; 12 | @Service 13 | public class WxOnlineRepairMsgServiceImpl implements IWxOnlineRepairMsgService { 14 | @Resource 15 | private IWxOnlineRepairMsgDao wxOnlineRepairMsgDao; 16 | @Override 17 | public void addWxOnlineRepairMsg(WxOnlineRepairMsg wxOnlineRepairMsg) { 18 | wxOnlineRepairMsgDao.addWxOnlineRepairMsg(wxOnlineRepairMsg); 19 | } 20 | @Override 21 | public void addSImagesByWpid(Map params) { 22 | wxOnlineRepairMsgDao.addSImagesByWpid(params); 23 | } 24 | @Override 25 | public int queryCountUnCheck() { 26 | return wxOnlineRepairMsgDao.queryCountUnCheck(); 27 | } 28 | @Override 29 | public List queryWxOnlineRepairMsg(int status) { 30 | return wxOnlineRepairMsgDao.queryWxOnlineRepairMsg(status); 31 | } 32 | @Override 33 | public WxOnlineRepairMsg queryrepairMsgDetailByWpid(String wpid) { 34 | return wxOnlineRepairMsgDao.queryrepairMsgDetailByWpid(wpid); 35 | } 36 | @Override 37 | public void dispatchWxOnlineRepairMsg(WxOnlineRepairMsg wxOnlineRepairMsg) { 38 | wxOnlineRepairMsgDao.addWxOnlineRepairmanAndRemark(wxOnlineRepairMsg); 39 | } 40 | @Override 41 | public int queryWxOnlineRepairMsgStatus(String wpid) { 42 | return wxOnlineRepairMsgDao.queryWxOnlineRepairMsgStatus(wpid); 43 | } 44 | @Override 45 | public String queryRepairmanForFree() { 46 | return wxOnlineRepairMsgDao.queryRepairmanForFree(); 47 | } 48 | @Override 49 | public WxOnlineRepairMsg queryrepairmanAcceptanceByWpid(String wpid) { 50 | return wxOnlineRepairMsgDao.queryrepairmanAcceptanceByWpid(wpid); 51 | } 52 | @Override 53 | public void updateStatusByWpid(String wpid) { 54 | wxOnlineRepairMsgDao.updateStatusByWpid(wpid); 55 | } 56 | @Override 57 | public List queryrepairmanRecode(String rmid) { 58 | return wxOnlineRepairMsgDao.queryrepairmanRecode(rmid); 59 | } 60 | @Override 61 | public void addCompleteRemarkAndStatusByWpid(WxOnlineRepairMsg wxOnlineRepairMsg) { 62 | wxOnlineRepairMsgDao.addCompleteRemarkAndStatusByWpid(wxOnlineRepairMsg); 63 | } 64 | @Override 65 | public void checkAndAcceptance(String wpid) { 66 | wxOnlineRepairMsgDao.checkAndAcceptance(wpid); 67 | 68 | } 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/spring-db.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |         helperDialect=mysql 38 |         reasonable=true 39 |         supportMethodsArguments=true 40 |         params=count=countSql 41 |         autoRuntimeDialect=true 42 |        43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
    '),s=o(["
  • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/admin/controller/StuMsgManagerController.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.admin.controller; 2 | import java.io.IOException; 3 | import java.io.PrintWriter; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import javax.annotation.Resource; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.servlet.ModelAndView; 15 | import org.tysf.gt.pojo.Flat; 16 | import org.tysf.gt.pojo.StudentMsg; 17 | import org.tysf.gt.service.IStuMsgService; 18 | import org.tysf.gt.utils.HanyuPinyinHelper; 19 | import org.tysf.gt.utils.MD5Utils; 20 | /** 21 | * 学生信息管理 22 | * @author wuzhe 23 | * 24 | */ 25 | @Controller 26 | @RequestMapping("admin/") 27 | public class StuMsgManagerController { 28 | @Resource 29 | private IStuMsgService stuMsgService; 30 | @RequestMapping(value="stuMsgManager.do",method=RequestMethod.GET) 31 | //管理学生主页面 32 | public ModelAndView initstuMsgManager() throws IOException { 33 | ModelAndView mv = new ModelAndView(); 34 | List stuMsgList = stuMsgService.queryStudentMsg(); 35 | mv.addObject("stuMsgList", stuMsgList); 36 | mv.setViewName("admin/stuMsgManager"); 37 | return mv; 38 | } 39 | @RequestMapping(value="addStuMsg.do",method=RequestMethod.POST) 40 | //添加学生信息 41 | public String addstuMsgManager(@RequestParam Mapparam){ 42 | StudentMsg studentMsg=new StudentMsg(); 43 | studentMsg.setStuid(param.get("stuid")); 44 | studentMsg.setSname(param.get("sname")); 45 | studentMsg.setFlat(new Flat(Integer.parseInt(param.get("fid")))); 46 | studentMsg.setDormitory(param.get("dormitory")); 47 | studentMsg.setTel(param.get("tel")); 48 | String password=HanyuPinyinHelper.getFirstLettersUp(param.get("sname"))+param.get("stuid"); 49 | System.out.println("password="+password); 50 | password=MD5Utils.md5Password(password); 51 | studentMsg.setPassword(password); 52 | stuMsgService.addstuMsgManager(studentMsg); 53 | return "redirect:/admin/stuMsgManager.do"; 54 | } 55 | 56 | //修改学生信息 57 | @RequestMapping(value="modifyStuMsg.do",method=RequestMethod.POST) 58 | public void modifyStuMsg(@RequestParam Mapparam,HttpServletResponse response){ 59 | StudentMsg studentMsg=new StudentMsg(); 60 | studentMsg.setStuid(param.get("stuid")); 61 | studentMsg.setFlat(new Flat(Integer.parseInt(param.get("fid")))); 62 | studentMsg.setDormitory(param.get("dormitory")); 63 | studentMsg.setTel(param.get("tel")); 64 | stuMsgService.modifyStuMsg(studentMsg); 65 | PrintWriter writer =null; 66 | try { 67 | writer = response.getWriter(); 68 | writer.write("1"); 69 | } catch (IOException e) { 70 | // TODO Auto-generated catch block 71 | e.printStackTrace(); 72 | }finally{ 73 | writer.close(); 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/resources/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 19 | 20 | 21 | text/html;charset=UTF-8 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/wechat/controller/WxInitContoller.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.wechat.controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.annotation.Resource; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | 14 | import com.soecode.wxtools.api.IService; 15 | import com.soecode.wxtools.api.WxConsts; 16 | import com.soecode.wxtools.api.WxMessageHandler; 17 | import com.soecode.wxtools.api.WxMessageRouter; 18 | import com.soecode.wxtools.bean.WxMenu; 19 | import com.soecode.wxtools.bean.WxXmlMessage; 20 | import com.soecode.wxtools.bean.WxXmlOutMessage; 21 | import com.soecode.wxtools.util.xml.XStreamTransformer; 22 | 23 | @Controller 24 | @RequestMapping("/wx.do") 25 | public class WxInitContoller { 26 | @Resource 27 | private IService iService; 28 | @Resource 29 | private WxMenu menu; 30 | @Resource 31 | private WxMessageHandler clickHanlder; 32 | /*@Autowired 33 | @Qualifier("sHanlder")*/ 34 | @Resource 35 | private WxMessageHandler subscribeHanlder; 36 | 37 | @RequestMapping(method = RequestMethod.GET) 38 | public void WxMain(HttpServletRequest request, HttpServletResponse response) throws IOException { 39 | // 验证服务器的有效性 40 | PrintWriter out = response.getWriter(); 41 | String signature = request.getParameter("signature"); 42 | String timestamp = request.getParameter("timestamp"); 43 | String nonce = request.getParameter("nonce"); 44 | String echostr = request.getParameter("echostr"); 45 | if (iService.checkSignature(signature, timestamp, nonce, echostr)) { 46 | out.print(echostr); 47 | } 48 | } 49 | 50 | @RequestMapping(method = RequestMethod.POST) 51 | public void WxHanlder(HttpServletRequest request, HttpServletResponse response) throws IOException { 52 | request.setCharacterEncoding("UTF-8"); 53 | response.setCharacterEncoding("UTF-8"); 54 | // 返回消息给微信服务器 55 | PrintWriter out = response.getWriter(); 56 | // 创建一个路由器 57 | WxMessageRouter router = new WxMessageRouter(iService); 58 | try { 59 | iService.createMenu(menu, false); 60 | // 微信服务器推送过来的是XML格式。 61 | WxXmlMessage wx = XStreamTransformer.fromXml(WxXmlMessage.class, request.getInputStream()); 62 | System.out.println("消息:\n " + wx.toString()); 63 | // 添加规则;这里的规则是指所有消息都交给DemoHandler处理 64 | // 注意!!每一个规则,必须由end()或者next()结束。不然不会生效。 65 | // end()是指消息进入该规则后不再进入其他规则。 而next()是指消息进入了一个规则后,如果满足其他规则也能进入,处理。 66 | // 把消息传递给路由器进行处理 67 | router.rule().event(WxConsts.EVT_SUBSCRIBE).handler(subscribeHanlder).end().rule().event(WxConsts.EVT_CLICK).handler(clickHanlder).end(); 68 | WxXmlOutMessage xmlOutMsg = router.route(wx); 69 | if (xmlOutMsg != null) 70 | out.print(xmlOutMsg.toXml());// 因为是明文,所以不用加密,直接返回给用户。 71 | } catch (Exception e) { 72 | e.printStackTrace(); 73 | } finally { 74 | out.close(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/admin/AdminMsgManager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 12 | <%@ include file="/common/css.jsp"%> 13 | 14 |
    15 | <%@ include file="/common/head.jsp"%> 16 | 17 | <%@ include file="/common/menu.jsp"%> 18 | 19 |
    20 | 21 |
    22 |
    23 | 管理员管理 24 |
    25 | 28 | 31 |
    32 |
    33 |
    34 |
    35 |
    36 | 37 | <%@ include file="/common/foot.jsp"%> 38 | 39 |
    40 | 41 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/utils/SmsUtils.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | import com.aliyuncs.DefaultAcsClient; 7 | import com.aliyuncs.IAcsClient; 8 | import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsRequest; 9 | import com.aliyuncs.dysmsapi.model.v20170525.QuerySendDetailsResponse; 10 | import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest; 11 | import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; 12 | import com.aliyuncs.exceptions.ClientException; 13 | import com.aliyuncs.profile.DefaultProfile; 14 | import com.aliyuncs.profile.IClientProfile; 15 | 16 | public class SmsUtils { 17 | // 产品名称:云通信短信API产品,开发者无需替换 18 | static final String product = "Dysmsapi"; 19 | // 产品域名,开发者无需替换 20 | static final String domain = "dysmsapi.aliyuncs.com"; 21 | // TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找) 22 | static final String accessKeyId = "xxxxx"; 23 | static final String accessKeySecret = "xxxxx"; 24 | 25 | public static SendSmsResponse sendSms(String tel,String rmname) throws ClientException { 26 | // 可自助调整超时时间 27 | System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); 28 | System.setProperty("sun.net.client.defaultReadTimeout", "10000"); 29 | // 初始化acsClient,暂不支持region化 30 | IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret); 31 | DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain); 32 | IAcsClient acsClient = new DefaultAcsClient(profile); 33 | // 组装请求对象-具体描述见控制台-文档部分内容 34 | SendSmsRequest request = new SendSmsRequest(); 35 | // 必填:待发送手机号 36 | request.setPhoneNumbers(tel); 37 | // 必填:短信签名-可在短信控制台中找到 38 | request.setSignName("吴哲"); 39 | // 必填:短信模板-可在短信控制台中找到 40 | request.setTemplateCode("SMS_125018493"); 41 | // 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 42 | request.setTemplateParam("{\"rmname\":\""+rmname+"\"}"); 43 | // 选填-上行短信扩展码(无特殊需求用户请忽略此字段) 44 | // request.setSmsUpExtendCode("90997"); 45 | // 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者 46 | request.setOutId("ok"); 47 | // hint 此处可能会抛出异常,注意catch 48 | SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); 49 | return sendSmsResponse; 50 | } 51 | 52 | public static QuerySendDetailsResponse querySendDetails(String bizId) throws ClientException { 53 | // 可自助调整超时时间 54 | System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); 55 | System.setProperty("sun.net.client.defaultReadTimeout", "10000"); 56 | // 初始化acsClient,暂不支持region化 57 | IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret); 58 | DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain); 59 | IAcsClient acsClient = new DefaultAcsClient(profile); 60 | // 组装请求对象 61 | QuerySendDetailsRequest request = new QuerySendDetailsRequest(); 62 | // 必填-号码 63 | request.setPhoneNumber("15000000000"); 64 | // 可选-流水号 65 | request.setBizId(bizId); 66 | // 必填-发送日期 支持30天内记录查询,格式yyyyMMdd 67 | SimpleDateFormat ft = new SimpleDateFormat("yyyyMMdd"); 68 | request.setSendDate(ft.format(new Date())); 69 | // 必填-页大小 70 | request.setPageSize(10L); 71 | // 必填-当前页码从1开始计数 72 | request.setCurrentPage(1L); 73 | // hint 此处可能会抛出异常,注意catch 74 | QuerySendDetailsResponse querySendDetailsResponse = acsClient.getAcsResponse(request); 75 | return querySendDetailsResponse; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/webapp/js/bindWxSystem.js: -------------------------------------------------------------------------------- 1 | $().ready(function() { 2 | /*****防止下端的页脚弹出****/ 3 | var h = $(window).height(); 4 | $(window).resize(function() { 5 | if ($(window).height() < h) { 6 | $('.footer').hide(); 7 | } 8 | if ($(window).height() >= h) { 9 | $('.footer').show(); 10 | } 11 | }); 12 | /*****防止下端的页脚弹出****/ 13 | /*****weui导航栏****/ 14 | weui.tab('#tab',{ 15 | defaultIndex: 0, 16 | onChange: function(index){ 17 | $("#submit").val(index); 18 | } 19 | }); 20 | /*****weui导航栏****/ 21 | /*****学生绑定事件****/ 22 | $("#submit").click(function() { 23 | var submitValue=$(this).val(); 24 | console.log(submitValue) 25 | if(submitValue==0){ 26 | if ($("#stuid").val() == ""|| $("#password").val() == "") { 27 | weui.alert("学号或密码不能为空"); 28 | } else { 29 | $.ajax({ 30 | type : "POST", 31 | url : "/repairManager/wx/bindWxSystem.do", 32 | data : $("#bindWxStudentForm").serialize(), 33 | success : function(data) { 34 | if (data == "0") {//绑定成功 35 | $(window).attr('location','/repairManager/static/success.html'); 36 | } else {//绑定失败 37 | if (data == 1) {//1.绑定的学号和密码错误 38 | weui.alert("学号或密码错误"); 39 | } else { 40 | /*****已经在其他微信号上绑定过微信****/ 41 | weui.confirm('你已经在其他微信绑定过平台,是否要覆盖原绑定',function() {//点击确认执行的方法 42 | /*****更新绑定微信号****/ 43 | $.ajax({ 44 | type:"POST", 45 | url:"/repairManager/wx/updateWxSystem.do", 46 | data:$("#bindWxStudentForm").serialize(), 47 | success:function(data) {//更新成功 48 | $(window).attr('location','/repairManager/static/success.html'); 49 | } 50 | }) 51 | /*****更新绑定微信号****/ 52 | }); 53 | /*****已经在其他微信号上绑定过微信****/ 54 | } 55 | } 56 | 57 | } 58 | }) 59 | } 60 | }else{ 61 | if ($("#rmid").val() == ""|| $("#rmpassword").val() == "") { 62 | weui.alert("工号或密码不能为空"); 63 | }else{ 64 | console.log($("#bindWxRepairmanForm").serialize()) 65 | $.ajax({ 66 | type : "POST", 67 | url : "/repairManager/wx/bindWxRepairmanSystem.do", 68 | data : $("#bindWxRepairmanForm").serialize(), 69 | success : function(data) { 70 | if (data == "0") {//绑定成功 71 | $(window).attr('location','/repairManager/static/success.html'); 72 | } else {//绑定失败 73 | if (data == 1) {//1.绑定的工号和密码错误 74 | weui.alert("工号或密码错误"); 75 | } else { 76 | /*****已经在其他微信号上绑定过微信****/ 77 | weui.confirm('你已经在其他微信绑定过平台,是否要覆盖原绑定',function() {//点击确认执行的方法 78 | /*****更新绑定微信号****/ 79 | $.ajax({ 80 | type:"POST", 81 | url:"/repairManager/wx/updateWxRepairmanSystem.do", 82 | data:$("#bindWxRepairmanForm").serialize(), 83 | success:function(data) {//更新成功 84 | $(window).attr('location','/repairManager/static/success.html'); 85 | } 86 | }) 87 | /*****更新绑定微信号****/ 88 | }); 89 | /*****已经在其他微信号上绑定过微信****/ 90 | } 91 | } 92 | } 93 | }) 94 | } 95 | } 96 | }) 97 | 98 | }) 99 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/admin/flatMsgManager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 12 | <%@ include file="/common/css.jsp"%> 13 | 14 |
    15 | <%@ include file="/common/head.jsp"%> 16 | 17 | <%@ include file="/common/menu.jsp"%> 18 | 19 |
    20 | 21 |
    22 |
    23 | 公寓管理 24 | 26 |
    27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 |
    编号公寓名称操作
    ${flat.fid}${flat.fname} 42 | 44 |
    49 |
    50 | 51 | <%@ include file="/common/foot.jsp"%> 52 | 53 |
    54 |
    55 | 56 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/repairman/repairmanAcceptance.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 报修单详情 17 | 18 | 27 | 28 |
    29 |
    30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 |
    报修时间${fn:substring(msg.timestamp, 0, 19)}
    报修地点${msg.studentMsg.flat.fname}/${msg.studentMsg.dormitory}宿舍
    报修项目${msg.repairProject.repairArea.raname}/${msg.repairProject.rpname}
    报修人${msg.studentMsg.sname}
    报修电话${msg.tel}
    报修描述${msg.projectdetail}
    派工备注${msg.remark}
    故障照片 67 | 68 | 70 | 71 |
    74 |
    75 | 76 | 77 | 提交完工 78 | 79 | 80 |
    81 | 82 | 83 | 97 | 98 | -------------------------------------------------------------------------------- /src/main/webapp/css/messenger.css: -------------------------------------------------------------------------------- 1 | /* line 4, ../../src/sass/messenger.sass */ 2 | ul.messenger { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | /* line 8, ../../src/sass/messenger.sass */ 7 | ul.messenger > li { 8 | list-style: none; 9 | margin: 0; 10 | padding: 0; 11 | } 12 | /* line 14, ../../src/sass/messenger.sass */ 13 | ul.messenger.messenger-empty { 14 | display: none; 15 | } 16 | /* line 17, ../../src/sass/messenger.sass */ 17 | ul.messenger .messenger-message { 18 | overflow: hidden; 19 | *zoom: 1; 20 | } 21 | /* line 20, ../../src/sass/messenger.sass */ 22 | ul.messenger .messenger-message.messenger-hidden { 23 | display: none; 24 | } 25 | /* line 23, ../../src/sass/messenger.sass */ 26 | ul.messenger .messenger-message .messenger-phrase, ul.messenger .messenger-message .messenger-actions a { 27 | padding-right: 5px; 28 | } 29 | /* line 26, ../../src/sass/messenger.sass */ 30 | ul.messenger .messenger-message .messenger-actions { 31 | float: right; 32 | } 33 | /* line 29, ../../src/sass/messenger.sass */ 34 | ul.messenger .messenger-message .messenger-actions a { 35 | cursor: pointer; 36 | text-decoration: underline; 37 | } 38 | /* line 33, ../../src/sass/messenger.sass */ 39 | ul.messenger .messenger-message ul, ul.messenger .messenger-message ol { 40 | margin: 10px 18px 0; 41 | } 42 | /* line 36, ../../src/sass/messenger.sass */ 43 | ul.messenger.messenger-fixed { 44 | position: fixed; 45 | z-index: 10000; 46 | } 47 | /* line 40, ../../src/sass/messenger.sass */ 48 | ul.messenger.messenger-fixed .messenger-message { 49 | min-width: 0; 50 | -moz-box-sizing: border-box; 51 | -webkit-box-sizing: border-box; 52 | box-sizing: border-box; 53 | } 54 | /* line 45, ../../src/sass/messenger.sass */ 55 | ul.messenger.messenger-fixed .message .messenger-actions { 56 | float: left; 57 | } 58 | /* line 48, ../../src/sass/messenger.sass */ 59 | ul.messenger.messenger-fixed.messenger-on-top { 60 | top: 20px; 61 | } 62 | /* line 51, ../../src/sass/messenger.sass */ 63 | ul.messenger.messenger-fixed.messenger-on-bottom { 64 | bottom: 20px; 65 | } 66 | /* line 54, ../../src/sass/messenger.sass */ 67 | ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom { 68 | left: 50%; 69 | width: 800px; 70 | margin-left: -400px; 71 | } 72 | @media (max-width: 960px) { 73 | /* line 54, ../../src/sass/messenger.sass */ 74 | ul.messenger.messenger-fixed.messenger-on-top, ul.messenger.messenger-fixed.messenger-on-bottom { 75 | left: 10%; 76 | width: 80%; 77 | margin-left: 0px; 78 | } 79 | } 80 | /* line 64, ../../src/sass/messenger.sass */ 81 | ul.messenger.messenger-fixed.messenger-on-top.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-right { 82 | right: 20px; 83 | left: auto; 84 | } 85 | /* line 68, ../../src/sass/messenger.sass */ 86 | ul.messenger.messenger-fixed.messenger-on-top.messenger-on-left, ul.messenger.messenger-fixed.messenger-on-bottom.messenger-on-left { 87 | left: 20px; 88 | margin-left: 0px; 89 | } 90 | /* line 72, ../../src/sass/messenger.sass */ 91 | ul.messenger.messenger-fixed.messenger-on-right, ul.messenger.messenger-fixed.messenger-on-left { 92 | width: 350px; 93 | } 94 | /* line 75, ../../src/sass/messenger.sass */ 95 | ul.messenger.messenger-fixed.messenger-on-right .messenger-actions, ul.messenger.messenger-fixed.messenger-on-left .messenger-actions { 96 | float: left; 97 | } 98 | /* line 78, ../../src/sass/messenger.sass */ 99 | ul.messenger .messenger-spinner { 100 | display: none; 101 | } 102 | /* line 81, ../../src/sass/messenger.sass */ 103 | ul.messenger .messenger-clickable { 104 | cursor: pointer; 105 | } 106 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
      ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
    "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a webSocketSet = new CopyOnWriteArraySet(); 26 | //public static ConcurrentMapwebSocketMap=new ConcurrentHashMap(); 27 | //与某个客户端的连接会话,需要通过它来给客户端发送数据 28 | private Session session; 29 | 30 | /** 31 | * 连接建立成功调用的方法 32 | * 33 | * @param session 可选的参数。session为与某个客户端的连接会话,需要通过它来给客户端发送数据 34 | */ 35 | @OnOpen 36 | public void onOpen(Session session) { 37 | this.session = session; 38 | webSocketSet.add(this); //加入set中 39 | System.out.println(this); 40 | addOnlineCount(); //在线数加1 41 | System.out.println("有新连接加入!当前在线人数为" + getOnlineCount()); 42 | 43 | } 44 | 45 | /** 46 | * 连接关闭调用的方法 47 | */ 48 | @OnClose 49 | public void onClose() { 50 | webSocketSet.remove(this); //从set中删除 51 | subOnlineCount(); //在线数减1 52 | System.out.println("有一连接关闭!当前在线人数为" + getOnlineCount()); 53 | } 54 | 55 | /** 56 | * 收到客户端消息后调用的方法 57 | * 58 | * @param message 客户端发送过来的消息 59 | * @param session 可选的参数 60 | */ 61 | @OnMessage 62 | public void onMessage(String message, Session session) { 63 | System.out.println("来自客户端的消息:" + message); 64 | //群发消息 65 | for (WebSocketTest item : webSocketSet) { 66 | try { 67 | item.sendMessage(message); 68 | } catch (IOException e) { 69 | e.printStackTrace(); 70 | continue; 71 | } 72 | } 73 | } 74 | 75 | /** 76 | * 发生错误时调用 77 | * 78 | * @param session 79 | * @param error 80 | */ 81 | @OnError 82 | public void onError(Session session, Throwable error) { 83 | System.out.println("发生错误"); 84 | error.printStackTrace(); 85 | } 86 | 87 | /** 88 | * 这个方法与上面几个方法不一样。没有用注解,是根据自己需要添加的方法。 89 | * 90 | * @param message 91 | * @throws IOException 92 | */ 93 | public void sendMessage(String message) throws IOException { 94 | this.session.getBasicRemote().sendText(message); 95 | 96 | } 97 | 98 | public static synchronized int getOnlineCount() { 99 | return onlineCount; 100 | } 101 | 102 | public static synchronized void addOnlineCount() { 103 | WebSocketTest.onlineCount++; 104 | } 105 | 106 | public static synchronized void subOnlineCount() { 107 | WebSocketTest.onlineCount--; 108 | } 109 | 110 | 111 | public static void sendMsg(String msg) { 112 | for (WebSocketTest item : webSocketSet) { 113 | try { 114 | item.sendMessage(msg); 115 | } catch (IOException e) { 116 | e.printStackTrace(); 117 | continue; 118 | } 119 | } 120 | } 121 | 122 | 123 | } 124 | -------------------------------------------------------------------------------- /src/main/webapp/js/stuMsgManager.js: -------------------------------------------------------------------------------- 1 | $().ready(function() { 2 | // 通过异步请求加载需要选择的公寓 3 | $.ajax({ 4 | type : "post", 5 | url : "/repairManager/admin/queryAllFlatJson.do", 6 | success : function(data) { 7 | $.each($.parseJSON(data), function(i, val) {// 这个使用parseJSON是因为传过来的data需要转换成json对象 8 | $("#flat").append("") 9 | }) 10 | } 11 | }) 12 | //修改学生信息 13 | $(".modifystuMsg").click(function() { 14 | //首先找到点击按钮的父辈tbody 再查询其下的子辈元素类名为stuid的td 获取他的文本值 15 | var tbody=$(this).parents(".stuMsgItem"); 16 | var stuid=tbody.children(".stuid").html();//学号 17 | var sname=tbody.children(".sname").html();//姓名 18 | var fname=tbody.children(".fname").html();//公寓名 19 | var dormitory=tbody.children(".dormitory").html();//宿舍号 20 | var tel=tbody.children(".tel").html();//电话号码 21 | $("#stuid").val(stuid).attr("disabled","disabled");// 因为学生的学号和姓名不能更改 22 | $("#sname").val(sname).attr("disabled","disabled"); 23 | $("#flat").find("option").each(function() { 24 | if ($(this).html() == fname) { // 判断option的html值和td中的值 25 | $(this).attr("selected","selected"); // 相等,则设置为默认选择 26 | } 27 | }); 28 | $("#dormitory").val(dormitory); 29 | $("#tel").val(tel); 30 | $("#submit").val("modify");// 设置按钮的value为修改。因为添加和修改公用一个模态框,通过value值区分 31 | $("#myModal").modal('show');// 完成后显示模态框 32 | }); 33 | //添加学生信息 34 | $("#addStuMsgBtn").click(function() { 35 | $("#flat").find("option:selected").removeAttr( 36 | "selected");// 移除默认选择框 37 | // 将所有的input设置为空字符串 38 | $("#stuid").val("").attr("disabled",null); 39 | $("#sname").val("").attr("disabled",null); 40 | $("#dormitory").val(""); 41 | $("#tel").val(""); 42 | $("#submit").val(""); 43 | $("#myModal").modal('show'); 44 | }); 45 | //提交/修改学生信息 46 | $("#submit").click(function() { 47 | var stuid=$("#stuid").val();//学生学号 48 | var sname=$("#sname").val(); 49 | var fid = $("#flat").val();// 公寓ID 50 | var fname = $("#flat").find("option:selected").html(); 51 | var dormitory = $("#dormitory").val();// 宿舍号 52 | var tel = $("#tel").val();// 电话号 53 | var btnValue = $(this).val();// 提交按钮的值 54 | if(stuid==null||stuid==""||sname==null||sname==""||fid==""||fid==null||dormitory==""||dormitory==null||tel==""||tel==null){ 55 | alert("有必填项未填") 56 | }else{ 57 | if (btnValue == "modify") {// 如果为修改则触发修改按钮 58 | var stuid = $("#stuid").val(); 59 | var data = { 60 | stuid : stuid, 61 | fid : fid, 62 | dormitory : dormitory, 63 | tel : tel 64 | } 65 | $.ajax({ 66 | async : true, 67 | type : "POST", 68 | data : data, 69 | url : "/repairManager/admin/modifyStuMsg.do", 70 | success : function() { 71 | alert("修改数据成功") 72 | //将所有数据封装在一个数组里面进行赋值 73 | var param = [fname,dormitory,tel ]; 74 | //寻找到那个修改的tr 通过stuid 75 | $("#"+stuid).find("td").each(function(index) { 76 | if(index>=2&&index<5){ 77 | $(this).html(param[index-2]); 78 | } 79 | }); 80 | $("#myModal").modal('hide'); 81 | }, 82 | error : function() { 83 | alert("修改数据失败") 84 | } 85 | }); 86 | } else { 87 | $("#addStuMsgForm").submit(); 88 | } 89 | } 90 | }) 91 | }) 92 | -------------------------------------------------------------------------------- /src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/wx/bindWxSystem.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | 绑定系统 14 | 15 | 16 |
    17 | 18 |
    19 | 20 |
    21 |
    学生
    22 |
    维修人员
    23 |
    24 | 25 | 26 |
    27 |
    28 | 29 |
    30 |
    31 | 32 | 33 |
    34 |
    35 |
    36 |
    37 | 38 |
    39 |
    40 | 41 |
    42 |
    43 | 45 |
    46 |
    47 |
    48 |
    49 | 50 |
    51 |
    52 | 54 |
    55 |
    56 |
    57 |
    58 |
    59 |
    60 |
    61 |
    62 | 63 |
    64 |
    65 | 66 |
    67 |
    68 | 70 |
    71 |
    72 |
    73 |
    74 | 75 |
    76 |
    77 | 79 |
    80 |
    81 |
    82 |
    83 |
    84 |
    85 | 87 | 93 |
    94 |
    95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/main/webapp/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.6 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/wechat/hanlder/ClickHanlder.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.wechat.hanlder; 2 | 3 | import java.util.Map; 4 | 5 | import javax.annotation.Resource; 6 | 7 | import org.springframework.stereotype.Repository; 8 | import org.tysf.gt.api.AddressApi; 9 | import org.tysf.gt.service.IRepairmanService; 10 | import org.tysf.gt.service.IStuMsgService; 11 | 12 | import com.soecode.wxtools.api.IService; 13 | import com.soecode.wxtools.api.WxMessageHandler; 14 | import com.soecode.wxtools.bean.WxXmlMessage; 15 | import com.soecode.wxtools.bean.WxXmlOutMessage; 16 | import com.soecode.wxtools.exception.WxErrorException; 17 | 18 | @Repository 19 | public class ClickHanlder implements WxMessageHandler { 20 | @Resource 21 | private IStuMsgService stuService; 22 | @Resource 23 | private IRepairmanService repairmanService; 24 | // 主机地址 25 | private static final String address = AddressApi.Address; 26 | 27 | @Override 28 | public WxXmlOutMessage handle(WxXmlMessage wxMessage, Map context, IService iService) 29 | throws WxErrorException { 30 | String openid = wxMessage.getFromUserName(); 31 | String linkStr = ""; 32 | WxXmlOutMessage xmlOutMsg = null; 33 | String eventKey = wxMessage.getEventKey(); 34 | if (judgeIdentity(eventKey)) {//判断是学生点击还是维修师傅点击 35 | if (judgeWxStudentAuthorization(openid)) {//判断学生是否绑定系统 36 | String text = matchesKey(eventKey, openid); 37 | xmlOutMsg = WxXmlOutMessage.TEXT().content(text).toUser(wxMessage.getFromUserName()) 38 | .fromUser(wxMessage.getToUserName()).build(); 39 | return xmlOutMsg; 40 | } else { 41 | linkStr += "点击绑定系统"; 43 | xmlOutMsg = WxXmlOutMessage.TEXT().content("你还未绑定系统" + linkStr).toUser(wxMessage.getFromUserName()) 44 | .fromUser(wxMessage.getToUserName()).build(); 45 | return xmlOutMsg; 46 | } 47 | } else { 48 | if (judgeWxRepairmanAuthorization(openid)) { 49 | String text = matchesKey(eventKey, openid); 50 | xmlOutMsg = WxXmlOutMessage.TEXT().content(text).toUser(wxMessage.getFromUserName()) 51 | .fromUser(wxMessage.getToUserName()).build(); 52 | return xmlOutMsg; 53 | } else { 54 | linkStr += "点击绑定系统"; 56 | xmlOutMsg = WxXmlOutMessage.TEXT().content("你还未绑定系统" + linkStr).toUser(wxMessage.getFromUserName()) 57 | .fromUser(wxMessage.getToUserName()).build(); 58 | return xmlOutMsg; 59 | } 60 | } 61 | 62 | } 63 | 64 | /** 65 | * 用户身份判断 判断用户学生的身份,是否已经绑定系统 其次判断用户维修员是否绑定系统 66 | * 67 | * @param openid 68 | * @return 69 | */ 70 | public boolean judgeWxStudentAuthorization(String openid) { 71 | String stuid = stuService.queryStuidByopenid(openid); 72 | if (stuid != null) { 73 | return true; 74 | } 75 | return false; 76 | } 77 | 78 | /** 79 | * 用户身份判断 判断用户维修人员的身份,是否已经绑定系统 其次判断用户维修员是否绑定系统 80 | * 81 | * @param openid 82 | * @return 83 | */ 84 | public boolean judgeWxRepairmanAuthorization(String openid) { 85 | String rmid = repairmanService.queryRmidByopenid(openid); 86 | if (rmid != null) { 87 | return true; 88 | } 89 | return false; 90 | } 91 | 92 | /** 93 | * 匹配点击菜单的用户身份 94 | */ 95 | public boolean judgeIdentity(String eventKey) { 96 | System.out.println(eventKey); 97 | if (eventKey.toCharArray()[6] == '1') { 98 | return true; 99 | } 100 | return false; 101 | } 102 | 103 | /** 104 | * 匹配事件key 105 | */ 106 | public String matchesKey(String eventKey, String openid) { 107 | String text = ""; 108 | if ("Button11".equals(eventKey)) { 109 | text = "在线报修"; 110 | } else if ("Button12".equals(eventKey)) { 111 | stuService.unbindByOpenid(openid);//解除绑定 112 | text = "成功解除绑定"; 113 | } else if ("Button21".equals(eventKey)) { 114 | text = "点击查看维修记录"; 115 | } else if ("Button22".equals(eventKey)) { 116 | repairmanService.unbindByOpenid(openid);//解除绑定 117 | text = "成功解除绑定"; 118 | } 119 | return text; 120 | 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /src/main/webapp/js/adminMsgManager.js: -------------------------------------------------------------------------------- 1 | $().ready(function() { 2 | var adminArray=null; 3 | $('#table').bootstrapTable({ 4 | url : '/repairManager/admin/queryAdminGetJson.do', 5 | toolbar: '#toolbar', 6 | pagination : true, 7 | cache: false, // 是否使用缓冲 8 | queryParamsType:'', 9 | sidePagination:'client', 10 | pageNumber:1, // 初始化加载第一页,默认第一页 11 | pageSize: 10, // 每页的记录行数(*) 12 | pageList: [10, 25, 50, 100], // 可供选择的每页的行数(*) 13 | uniqueId:'adminid', 14 | clickToSelect: true, 15 | columns : [ 16 | { 17 | field : 'adminid', 18 | title : '工号', 19 | }, { 20 | field : 'adminname', 21 | title : '姓名', 22 | editable:{ 23 | type: 'text', 24 | title: '姓名', 25 | validate: function (v) { 26 | if (!v) return '姓名不能为空'; 27 | } 28 | } 29 | }, { 30 | field : 'admintel', 31 | title : '电话', 32 | editable:true 33 | }, { 34 | field : 'authorization', 35 | title : '身份', 36 | formatter:authorizationFtt 37 | }], 38 | onEditableSave: function (field, row, oldValue, $el) { 39 | $.ajax({ 40 | type:'POST', 41 | url:'/repairManager/admin/modifyAdministrator.do', 42 | contentType:'application/x-www-form-urlencoded', 43 | data:{ 44 | field:field, 45 | adminid:row.adminid, 46 | adminname:row.adminname, 47 | admintel:row.admintel 48 | } 49 | }) 50 | } 51 | }); 52 | $("#btn_add").click(function(){ 53 | $("#myModal").modal('show'); 54 | }) 55 | $("#submit").click(function(){ 56 | var adminname=$("#adminname").val(); 57 | var admintel=$("#admintel").val(); 58 | if(adminname==""||admintel==""){ 59 | alert("输入的信息不能为空") 60 | return; 61 | } 62 | var count=$("#table").bootstrapTable("getData").length-1; 63 | $.ajax({ 64 | url:'/repairManager/admin/addAdministrator.do', 65 | method:'post', 66 | contentType:'application/x-www-form-urlencoded', 67 | data:{ 68 | count:count, 69 | adminname:adminname, 70 | admintel:admintel 71 | }, 72 | success:function(data){ 73 | $("#myModal").modal('hide'); 74 | $("#table").bootstrapTable("insertRow",{ 75 | index:count+1, 76 | row:{ 77 | adminid:data, 78 | adminname:adminname, 79 | admintel:admintel, 80 | authorization:1 81 | } 82 | }) 83 | 84 | } 85 | }) 86 | }) 87 | $("#queryUnCheckBtn").click(function(){ 88 | // 直接使用refresh 如果出现多条分页记录 点下一页的时候会将数据清空 89 | $('#table').bootstrapTable("refreshOptions",{ 90 | queryParams:function(params){ 91 | var query = $.extend(true,params,{status:0}); 92 | return query; 93 | } 94 | }); 95 | }) 96 | $("#newRepair").click(function(){ 97 | $('#table').bootstrapTable("refreshOptions",{ 98 | queryParams:function(params){ 99 | var query = $.extend(true,params,{status:-1}); 100 | return query; 101 | } 102 | }); 103 | }) 104 | }) 105 | /** ************************************保修状态的判断*********************************** */ 106 | function authorizationFtt(value,row,index){ 107 | if(value==0){ 108 | return '超级管理员' 109 | }else if(value==1){ 110 | return '管理员' 111 | } 112 | } 113 | /** ************************************时间格式化处理*********************************** */ 114 | function dateFtt(fmt,date) 115 | { // author: meizz 116 | var o = { 117 | "M+" : date.getMonth()+1, // 月份 118 | "d+" : date.getDate(), // 日 119 | "h+" : date.getHours(), // 小时 120 | "m+" : date.getMinutes(), // 分 121 | "s+" : date.getSeconds(), // 秒 122 | "q+" : Math.floor((date.getMonth()+3)/3), // 季度 123 | "S" : date.getMilliseconds() // 毫秒 124 | }; 125 | if(/(y+)/.test(fmt)) 126 | fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); 127 | for(var k in o) 128 | if(new RegExp("("+ k +")").test(fmt)) 129 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 130 | return fmt; 131 | } 132 | -------------------------------------------------------------------------------- /src/main/java/org/tysf/gt/admin/controller/RepairProjectManagerController.java: -------------------------------------------------------------------------------- 1 | package org.tysf.gt.admin.controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.List; 6 | 7 | import javax.annotation.Resource; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | /** 13 | * 维修项目管理 14 | * @author wuzhe 15 | * 16 | */ 17 | import org.springframework.web.servlet.ModelAndView; 18 | import org.tysf.gt.pojo.RepairArea; 19 | import org.tysf.gt.pojo.RepairProject; 20 | import org.tysf.gt.service.IRepairAreaService; 21 | import org.tysf.gt.service.IRepairProjectService; 22 | import org.tysf.gt.utils.GsonUtils; 23 | 24 | @Controller 25 | @RequestMapping("/") 26 | 27 | public class RepairProjectManagerController { 28 | @Resource 29 | private IRepairProjectService repairProjectService; 30 | @Resource 31 | private IRepairAreaService repairAreaService; 32 | 33 | @RequestMapping("admin/repairManager.do") 34 | public ModelAndView initRepairManager() { 35 | ModelAndView mv = new ModelAndView(); 36 | List repairProjectList = repairProjectService.queryRepairProject(); 37 | List repairAreaList = repairAreaService.queryRepairArea(); 38 | mv.addObject("repairProjectList", repairProjectList); 39 | mv.addObject("repairAreaList", repairAreaList); 40 | mv.setViewName("admin/RepairProjectManager"); 41 | return mv; 42 | } 43 | //根据报修区域ID查找报修项目 44 | @RequestMapping("/queryRepairProjectByRaid.do") 45 | public void queryRepairProjectByRaid(int raid, HttpServletResponse response) { 46 | List repairProjectList = repairProjectService.queryRepairProjectByRaid(raid); 47 | String json = GsonUtils.getJsonStr(repairProjectList); 48 | response.setCharacterEncoding("utf-8"); 49 | PrintWriter writer = null; 50 | try { 51 | writer = response.getWriter(); 52 | writer.write(json); 53 | } catch (IOException e) { 54 | // TODO Auto-generated catch block 55 | e.printStackTrace(); 56 | } finally { 57 | writer.close(); 58 | } 59 | } 60 | //添加报修项目 61 | @RequestMapping("admin/repariProjectAdd.do") 62 | public void repairProjectAddGetRpid(String rpname,int raid,HttpServletResponse response){ 63 | RepairArea area=new RepairArea(); 64 | area.setRaid(raid); 65 | RepairProject repairProject=new RepairProject(rpname,area); 66 | int rpid=repairProjectService.repairProjectAddGetRpid(repairProject); 67 | PrintWriter writer=null; 68 | try { 69 | writer=response.getWriter(); 70 | writer.write(rpid); 71 | } catch (IOException e) { 72 | // TODO Auto-generated catch block 73 | e.printStackTrace(); 74 | }finally{ 75 | writer.close(); 76 | } 77 | } 78 | //修改报修项目 79 | @RequestMapping("admin/repairProjectModify.do") 80 | public String repairProjectModify(String rpid,String repairArea,String rpname){ 81 | System.out.println(rpid+repairArea+rpname); 82 | RepairArea area=new RepairArea(); 83 | area.setRaid(Integer.parseInt(repairArea)); 84 | RepairProject repairProject=new RepairProject(Integer.parseInt(rpid), rpname, area); 85 | repairProjectService.repairProjectModify(repairProject); 86 | return "redirect:/admin/repairManager.do"; 87 | } 88 | //查询报修项目 89 | @RequestMapping("repairProjectByRmidForJson.do") 90 | public void repairProjectByRmidForJson(String rmid,HttpServletResponse response){ 91 | List repairProjectList = repairProjectService.queryRepairProjectByRaid(1); 92 | String json = GsonUtils.getJsonStr(repairProjectList); 93 | response.setCharacterEncoding("utf-8"); 94 | PrintWriter writer = null; 95 | try { 96 | writer = response.getWriter(); 97 | writer.write(json); 98 | System.out.println(json); 99 | } catch (IOException e) { 100 | // TODO Auto-generated catch block 101 | e.printStackTrace(); 102 | } finally { 103 | writer.close(); 104 | } 105 | } 106 | @RequestMapping("repairProjectForJson.do") 107 | public void repairProjectForJson(HttpServletResponse response){ 108 | List repairProjectList = repairProjectService.queryRepairProject(); 109 | String json = GsonUtils.getJsonStr(repairProjectList); 110 | response.setCharacterEncoding("utf-8"); 111 | PrintWriter writer = null; 112 | try { 113 | writer = response.getWriter(); 114 | writer.write(json); 115 | System.out.println(json); 116 | } catch (IOException e) { 117 | // TODO Auto-generated catch block 118 | e.printStackTrace(); 119 | } finally { 120 | writer.close(); 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/main/webapp/js/app.js: -------------------------------------------------------------------------------- 1 | $().ready(function() { 2 | $('#table').bootstrapTable({ 3 | url : '/repairManager/admin/queryWxOnileRepairMsg.do', 4 | pagination : true, 5 | cache: false, //是否使用缓冲 6 | queryParamsType:'', 7 | sidePagination:'server', 8 | pageNumber:1, //初始化加载第一页,默认第一页 9 | pageSize: 10, //每页的记录行数(*) 10 | pageList: [10, 25, 50, 100], //可供选择的每页的行数(*) 11 | uniqueId:'wpid', 12 | columns : [ 13 | { 14 | field : 'timestamp', 15 | title : '报修时间', 16 | width:'15%', 17 | formatter:function(value,row,index){ 18 | var date = new Date(value); 19 | return dateFtt('yyyy-MM-dd hh:mm:ss',date); 20 | } 21 | }, { 22 | field : 'studentMsg.flat.fname', 23 | title : '报修地点', 24 | width:'20%', 25 | formatter:function(value,row,index){ 26 | return value+'/'+row.studentMsg.dormitory+'宿舍' 27 | } 28 | }, { 29 | field : 'repairProject.repairArea.raname', 30 | title : '报修类别', 31 | width:'18%', 32 | formatter:function(value,row,index){ 33 | return value+'/'+row.repairProject.rpname 34 | } 35 | }, { 36 | field : 'projectdetail', 37 | title : '描述', 38 | width:'12%', 39 | cellStyle:function(value){ 40 | return {title:value}; 41 | }, 42 | class:'projectdetail', 43 | }, { 44 | field : 'studentMsg.sname', 45 | title : '报修人', 46 | width:'10%', 47 | }, { 48 | field : 'tel', 49 | title : '报修电话', 50 | width:'10%', 51 | }, { 52 | field : 'status', 53 | title : '状态', 54 | formatter:statusFtt, 55 | width:'10%', 56 | },{ 57 | field:'wpid', 58 | title:'详情', 59 | width:'5%', 60 | formatter:function(value,row,index){ 61 | return "" 62 | } 63 | } ], 64 | onLoadSuccess:function(value){ 65 | /** 66 | * 加载数据完成后,对描述的td进行加title属性 67 | */ 68 | $("#table").find("td[class='projectdetail']").each(function(i,val){ 69 | $(this).attr("title",$(this).html()) 70 | }) 71 | } 72 | }); 73 | /*** 74 | * 切换状态的菜单按钮 75 | */ 76 | $(".queryStatus").click(function(){ 77 | $(".active").removeClass("active"); 78 | var statusText=$(this).children("a").children("i").html(); 79 | var param=null; 80 | console.log(statusText) 81 | if(statusText=="待审核"){ 82 | param={status:0} 83 | }else if(statusText=="正在派工"){ 84 | param={status:1} 85 | }else if(statusText=="正在维修"){ 86 | param={status:2} 87 | }else if(statusText=="已完工"){ 88 | param={status:3} 89 | }else if(statusText=="已验收"){ 90 | param={status:4} 91 | }else if(statusText=="全部"){ 92 | param={status:-1} 93 | } 94 | console.log(param) 95 | $('#table').bootstrapTable("refreshOptions",{ 96 | queryParams:function(params){ 97 | var query = $.extend(true,params,param); 98 | return query; 99 | } 100 | }); 101 | $(this).addClass("active") 102 | }); 103 | $("#newRepair").click(function(){ 104 | $('#table').bootstrapTable("refreshOptions",{ 105 | queryParams:function(params){ 106 | var query = $.extend(true,params,{status:-1}); 107 | return query; 108 | } 109 | }); 110 | }) 111 | }) 112 | /**************************************保修状态的判断************************************/ 113 | function statusFtt(value,row,index){ 114 | if(value==0){ 115 | return '未审核' 116 | }else if(value==1){ 117 | return '正在派工' 118 | }else if(value==2){ 119 | return '正在维修' 120 | }else if(value==3){ 121 | return '已完工' 122 | }else if(value==4){ 123 | return '已验收' 124 | } 125 | } 126 | /**************************************时间格式化处理************************************/ 127 | function dateFtt(fmt,date) 128 | { //author: meizz 129 | var o = { 130 | "M+" : date.getMonth()+1, //月份 131 | "d+" : date.getDate(), //日 132 | "h+" : date.getHours(), //小时 133 | "m+" : date.getMinutes(), //分 134 | "s+" : date.getSeconds(), //秒 135 | "q+" : Math.floor((date.getMonth()+3)/3), //季度 136 | "S" : date.getMilliseconds() //毫秒 137 | }; 138 | if(/(y+)/.test(fmt)) 139 | fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); 140 | for(var k in o) 141 | if(new RegExp("("+ k +")").test(fmt)) 142 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 143 | return fmt; 144 | } 145 | --------------------------------------------------------------------------------