├── home-ui ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── static │ │ ├── img │ │ │ ├── 2.png │ │ │ ├── 品牌.PNG │ │ │ ├── img.png │ │ │ ├── logo.png │ │ │ ├── 品牌文化.png │ │ │ ├── qrcode.png │ │ │ ├── wallhaven-012k14.jpg │ │ │ ├── wallhaven-0jepq4.jpg │ │ │ ├── wallhaven-z4ompn.jpg │ │ │ ├── TouchKeyboardThemeLight001.jpg │ │ │ ├── aa424c1549976a7abccf447bfd4c341.jpg │ │ │ └── bf246f63c2dcd3f39d60ea5033bba37.jpg │ │ ├── hjzs │ │ │ ├── 健身房.jpg │ │ │ ├── 服务台.jpg │ │ │ ├── 养老院大堂.jpg │ │ │ ├── 居住环境1.jpg │ │ │ ├── 居住环境2.jpg │ │ │ ├── 居住环境3.jpg │ │ │ ├── 居住环境4.jpg │ │ │ ├── 院内环境1.jpg │ │ │ ├── 院内环境2.jpg │ │ │ ├── 院内环境3.jpg │ │ │ └── 院内环境4.jpg │ │ ├── fwnr │ │ │ ├── 健康检查.jpg │ │ │ ├── 安全管理.jpg │ │ │ ├── 心理支持.jpg │ │ │ ├── 文娱活动.jpg │ │ │ ├── 生活照料.jpg │ │ │ ├── 社工服务.jpg │ │ │ ├── 老年大学.jpg │ │ │ └── 营养膳食.jpg │ │ └── baidumap.html │ └── index.html ├── src │ ├── assets │ │ ├── css │ │ │ └── global.css │ │ ├── img.png │ │ ├── logo.png │ │ └── img │ │ │ └── TouchKeyboardThemeLight001.jpg │ ├── App.vue │ ├── views │ │ ├── User │ │ │ ├── index.vue │ │ │ ├── payment.vue │ │ │ ├── dist │ │ │ │ └── drugList.vue │ │ │ ├── dialog │ │ │ │ └── dialogFood.vue │ │ │ ├── Journalist.vue │ │ │ ├── BX │ │ │ │ ├── Query.vue │ │ │ │ └── Apply.vue │ │ │ ├── User │ │ │ │ └── HealthPunch.vue │ │ │ └── visual.vue │ │ ├── Guest │ │ │ ├── news.vue │ │ │ ├── learnonline.vue │ │ │ ├── examination.vue │ │ │ ├── generateCodevVisitors.vue │ │ │ ├── release.vue │ │ │ ├── learn.vue │ │ │ └── about.vue │ │ └── Admin │ │ │ └── online │ │ │ └── index.vue │ ├── store │ │ └── index.js │ ├── utils │ │ ├── auth.js │ │ ├── cookie.js │ │ └── request.js │ ├── main.js │ ├── registerServiceWorker.js │ └── router │ │ └── index.js ├── babel.config.js ├── .gitignore ├── README.md ├── jsconfig.json ├── vue.config.js └── package.json ├── img.png ├── img_1.png ├── src ├── main │ ├── resources │ │ ├── config │ │ │ └── cron.setting │ │ ├── static │ │ │ └── qrcode.png │ │ ├── mapper │ │ │ ├── BxMapper.xml │ │ │ ├── PersonnelFoodsMapper.xml │ │ │ ├── PersonnelDrugMapper.xml │ │ │ ├── LeaveMapper.xml │ │ │ ├── InfoCenterMapper.xml │ │ │ └── PersonMapper.xml │ │ ├── log4j.properties │ │ └── application.yml │ └── java │ │ └── com │ │ └── example │ │ └── nursinghomeapplication │ │ ├── controller │ │ ├── dto │ │ │ ├── FileVO.java │ │ │ ├── UserAddressDto.java │ │ │ └── AliPay.java │ │ ├── BaseController.java │ │ ├── demoController.java │ │ ├── guest │ │ │ └── IndexShowController.java │ │ ├── PersonController.java │ │ ├── UtilController.java │ │ ├── ServerController.java │ │ └── FileController.java │ │ ├── mapper │ │ ├── NewTypeMapper.java │ │ ├── HealthpunchMapper.java │ │ ├── drug │ │ │ ├── DrugListMapper.java │ │ │ └── PersonnelDrugMapper.java │ │ ├── food │ │ │ ├── FoodListMapper.java │ │ │ └── PersonnelFoodsMapper.java │ │ ├── guest │ │ │ ├── VisitorsMapper.java │ │ │ ├── ContentMapper.java │ │ │ └── NIndexIntroduceMapper.java │ │ ├── configInfo │ │ │ ├── ConfigTypeMapper.java │ │ │ └── ListInfoMapper.java │ │ ├── home │ │ │ └── LeaveAndMessageMapper.java │ │ ├── UserMapper.java │ │ ├── BxMapper.java │ │ ├── LeaveMapper.java │ │ ├── personnel │ │ │ └── PersonMapper.java │ │ ├── InfoCenterMapper.java │ │ └── vo │ │ │ └── LeaveUser.java │ │ ├── util │ │ ├── GenerateUuid.java │ │ ├── Md5Password.java │ │ ├── requestStatus.java │ │ ├── DosUtil.java │ │ ├── Result.java │ │ ├── service │ │ │ └── Vo │ │ │ │ ├── Sys.java │ │ │ │ └── Jvm.java │ │ └── oter │ │ │ └── Constants.java │ │ ├── config │ │ ├── UserLoginToken.java │ │ ├── PassToken.java │ │ ├── ex │ │ │ └── CustomException.java │ │ ├── MybatisPlusConfig.java │ │ ├── WebConfig.java │ │ ├── AuthInterceptor.java │ │ └── CORSFilter.java │ │ ├── entity │ │ ├── home │ │ │ └── LeaveAndMessage.java │ │ ├── guest │ │ │ ├── NIndexIntroduce.java │ │ │ ├── Content.java │ │ │ └── Visitors.java │ │ ├── NewsType.java │ │ ├── config │ │ │ └── ConfigType.java │ │ ├── configInfoEntity │ │ │ └── ListInfo.java │ │ ├── drug │ │ │ ├── PersonnelDrug.java │ │ │ └── DrugList.java │ │ ├── food │ │ │ ├── PersonnelFoods.java │ │ │ └── FoodList.java │ │ ├── BX │ │ │ └── ReportForRepair.java │ │ ├── News.java │ │ ├── user │ │ │ └── User.java │ │ ├── Healthpunch.java │ │ ├── Leave.java │ │ ├── personnel │ │ │ └── PersonUser.java │ │ └── BaseEntity.java │ │ ├── service │ │ ├── ex │ │ │ ├── LimitExceededException.java │ │ │ ├── ServiceException.java │ │ │ ├── UpdateException.java │ │ │ ├── CartNotFoundException.java │ │ │ ├── ProductNotFoundException.java │ │ │ └── AddressNotFoundException.java │ │ ├── InfoCenterService.java │ │ └── impl │ │ │ ├── UtilServiceImpl.java │ │ │ └── ContentServiceImpl.java │ │ ├── pojo │ │ ├── JsonEntity.java │ │ └── Payload.java │ │ ├── SEnum │ │ └── ShortMessage.java │ │ └── NursingHomeApplication.java └── test │ └── java │ └── com │ └── example │ └── nursinghomeapplication │ ├── NursingHomeApplicationTests.java │ ├── MainTest.java │ ├── service │ └── impl │ │ ├── PersonServiceImplTest.java │ │ └── UserServiceImplTest.java │ ├── Pulsar.java │ ├── test.java │ ├── iotest.java │ └── sendvoice.java ├── files ├── 36158b8e636c4eb4957e98d405f44152_12 ├── 7f078b5243cc428c8e800ee48a781e55_122 ├── 88255ba09c204ec2860fd0fa459b4556_122 ├── a66f4a78ab5146afa426dfcdb1660a79_66 ├── bb7b79c31af4467ca39fa736516f1a96_122 ├── bc681a2b5e75425d8e98d51795ad2988_12 ├── d88cec670b0e40be82638ca4c475b0a7_121 ├── 07b594f8277d43939eba3606fdfa6d2b_1wqw ├── 0ba50330e947416a9e57acb2b5037d94_1wqw ├── 11465116f6a14234b4a9fee8f44ccc92_1111 ├── 297fe2a2ea5347768e08efcb0e44a0d5_1212 ├── 68f0fa08a4c24f738593d837a7e20b2f_1212 ├── 79d404a7a93244afa66a364a5ddb52f8_qqqqq ├── 9c78d7ec4c77484985412634fb9875e2_2112 ├── b4e99a532b9c43e0a44124b7ebcc5def_qqqqq ├── ce4819f89b0d4f6c87304fc5d929e5c1_ 派大星 ├── d9bb2b4a7a7644ee93220de6494fa1cc_1212 ├── 04acbd26d959497aad939aa93eb3efa8_121221 ├── 1642d2be91924c6bb1b4477f962e344e_cat.jpg ├── 33c485c6fce8479b8ee752dea5332bb0_admin111 ├── cc7c76e9549940f6bf7e712aa1a39564_visitor ├── 3f83d35b95bd47fcb5b0767058deefbd_qrcode.png ├── a74df77fe82f4ad6ac4a97aa8f7d2ae4_养老院系统.docx ├── c611c9208b44427084be3c89ec328f8a_养老院系统.docx ├── cde8f8b7ee1e40ab81a777d82d586794_gxiao.jpeg ├── edb907f3177b419f8617212f389cfd3f_养老院系统.docx ├── 7cd823b6c1b849e98778ecd2bbfd6492_qqqqqdaaaaaaa ├── 6b81aa4b1e074e5faaa195bd881d11c7_111111111111111 ├── b5faa5943e9d4e868fa6e2e957d03071_线路画像使用说明书.docx └── 12c809c741cf4be39839af884a0c7f15_技术部门员工周评表-郭帆.doc ├── .gitignore └── readme.md /home-ui/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /home-ui/src/assets/css/global.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | -------------------------------------------------------------------------------- /img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/img.png -------------------------------------------------------------------------------- /img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/img_1.png -------------------------------------------------------------------------------- /src/main/resources/config/cron.setting: -------------------------------------------------------------------------------- 1 | com.gf.driving_school.system.util.CronDelImage.del = */10 * * * * * 2 | -------------------------------------------------------------------------------- /home-ui/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /home-ui/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /home-ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/favicon.ico -------------------------------------------------------------------------------- /home-ui/src/assets/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/src/assets/img.png -------------------------------------------------------------------------------- /home-ui/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/src/assets/logo.png -------------------------------------------------------------------------------- /home-ui/public/static/img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/2.png -------------------------------------------------------------------------------- /home-ui/public/static/img/品牌.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/品牌.PNG -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/健身房.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/健身房.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/服务台.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/服务台.jpg -------------------------------------------------------------------------------- /home-ui/public/static/img/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/img.png -------------------------------------------------------------------------------- /home-ui/public/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/logo.png -------------------------------------------------------------------------------- /home-ui/public/static/img/品牌文化.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/品牌文化.png -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/健康检查.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/健康检查.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/安全管理.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/安全管理.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/心理支持.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/心理支持.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/文娱活动.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/文娱活动.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/生活照料.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/生活照料.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/社工服务.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/社工服务.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/老年大学.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/老年大学.jpg -------------------------------------------------------------------------------- /home-ui/public/static/fwnr/营养膳食.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/fwnr/营养膳食.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/养老院大堂.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/养老院大堂.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/居住环境1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/居住环境1.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/居住环境2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/居住环境2.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/居住环境3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/居住环境3.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/居住环境4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/居住环境4.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/院内环境1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/院内环境1.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/院内环境2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/院内环境2.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/院内环境3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/院内环境3.jpg -------------------------------------------------------------------------------- /home-ui/public/static/hjzs/院内环境4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/hjzs/院内环境4.jpg -------------------------------------------------------------------------------- /home-ui/public/static/img/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/qrcode.png -------------------------------------------------------------------------------- /src/main/resources/static/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/src/main/resources/static/qrcode.png -------------------------------------------------------------------------------- /files/36158b8e636c4eb4957e98d405f44152_12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/36158b8e636c4eb4957e98d405f44152_12 -------------------------------------------------------------------------------- /files/7f078b5243cc428c8e800ee48a781e55_122: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/7f078b5243cc428c8e800ee48a781e55_122 -------------------------------------------------------------------------------- /files/88255ba09c204ec2860fd0fa459b4556_122: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/88255ba09c204ec2860fd0fa459b4556_122 -------------------------------------------------------------------------------- /files/a66f4a78ab5146afa426dfcdb1660a79_66: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/a66f4a78ab5146afa426dfcdb1660a79_66 -------------------------------------------------------------------------------- /files/bb7b79c31af4467ca39fa736516f1a96_122: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/bb7b79c31af4467ca39fa736516f1a96_122 -------------------------------------------------------------------------------- /files/bc681a2b5e75425d8e98d51795ad2988_12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/bc681a2b5e75425d8e98d51795ad2988_12 -------------------------------------------------------------------------------- /files/d88cec670b0e40be82638ca4c475b0a7_121: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/d88cec670b0e40be82638ca4c475b0a7_121 -------------------------------------------------------------------------------- /files/07b594f8277d43939eba3606fdfa6d2b_1wqw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/07b594f8277d43939eba3606fdfa6d2b_1wqw -------------------------------------------------------------------------------- /files/0ba50330e947416a9e57acb2b5037d94_1wqw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/0ba50330e947416a9e57acb2b5037d94_1wqw -------------------------------------------------------------------------------- /files/11465116f6a14234b4a9fee8f44ccc92_1111: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/11465116f6a14234b4a9fee8f44ccc92_1111 -------------------------------------------------------------------------------- /files/297fe2a2ea5347768e08efcb0e44a0d5_1212: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/297fe2a2ea5347768e08efcb0e44a0d5_1212 -------------------------------------------------------------------------------- /files/68f0fa08a4c24f738593d837a7e20b2f_1212: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/68f0fa08a4c24f738593d837a7e20b2f_1212 -------------------------------------------------------------------------------- /files/79d404a7a93244afa66a364a5ddb52f8_qqqqq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/79d404a7a93244afa66a364a5ddb52f8_qqqqq -------------------------------------------------------------------------------- /files/9c78d7ec4c77484985412634fb9875e2_2112: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/9c78d7ec4c77484985412634fb9875e2_2112 -------------------------------------------------------------------------------- /files/b4e99a532b9c43e0a44124b7ebcc5def_qqqqq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/b4e99a532b9c43e0a44124b7ebcc5def_qqqqq -------------------------------------------------------------------------------- /files/ce4819f89b0d4f6c87304fc5d929e5c1_ 派大星: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/ce4819f89b0d4f6c87304fc5d929e5c1_ 派大星 -------------------------------------------------------------------------------- /files/d9bb2b4a7a7644ee93220de6494fa1cc_1212: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/d9bb2b4a7a7644ee93220de6494fa1cc_1212 -------------------------------------------------------------------------------- /files/04acbd26d959497aad939aa93eb3efa8_121221: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/04acbd26d959497aad939aa93eb3efa8_121221 -------------------------------------------------------------------------------- /files/1642d2be91924c6bb1b4477f962e344e_cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/1642d2be91924c6bb1b4477f962e344e_cat.jpg -------------------------------------------------------------------------------- /files/33c485c6fce8479b8ee752dea5332bb0_admin111: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/33c485c6fce8479b8ee752dea5332bb0_admin111 -------------------------------------------------------------------------------- /files/cc7c76e9549940f6bf7e712aa1a39564_visitor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/cc7c76e9549940f6bf7e712aa1a39564_visitor -------------------------------------------------------------------------------- /home-ui/public/static/img/wallhaven-012k14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/wallhaven-012k14.jpg -------------------------------------------------------------------------------- /home-ui/public/static/img/wallhaven-0jepq4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/wallhaven-0jepq4.jpg -------------------------------------------------------------------------------- /home-ui/public/static/img/wallhaven-z4ompn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/wallhaven-z4ompn.jpg -------------------------------------------------------------------------------- /files/3f83d35b95bd47fcb5b0767058deefbd_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/3f83d35b95bd47fcb5b0767058deefbd_qrcode.png -------------------------------------------------------------------------------- /files/a74df77fe82f4ad6ac4a97aa8f7d2ae4_养老院系统.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/a74df77fe82f4ad6ac4a97aa8f7d2ae4_养老院系统.docx -------------------------------------------------------------------------------- /files/c611c9208b44427084be3c89ec328f8a_养老院系统.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/c611c9208b44427084be3c89ec328f8a_养老院系统.docx -------------------------------------------------------------------------------- /files/cde8f8b7ee1e40ab81a777d82d586794_gxiao.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/cde8f8b7ee1e40ab81a777d82d586794_gxiao.jpeg -------------------------------------------------------------------------------- /files/edb907f3177b419f8617212f389cfd3f_养老院系统.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/edb907f3177b419f8617212f389cfd3f_养老院系统.docx -------------------------------------------------------------------------------- /files/7cd823b6c1b849e98778ecd2bbfd6492_qqqqqdaaaaaaa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/7cd823b6c1b849e98778ecd2bbfd6492_qqqqqdaaaaaaa -------------------------------------------------------------------------------- /files/6b81aa4b1e074e5faaa195bd881d11c7_111111111111111: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/6b81aa4b1e074e5faaa195bd881d11c7_111111111111111 -------------------------------------------------------------------------------- /files/b5faa5943e9d4e868fa6e2e957d03071_线路画像使用说明书.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/b5faa5943e9d4e868fa6e2e957d03071_线路画像使用说明书.docx -------------------------------------------------------------------------------- /home-ui/src/assets/img/TouchKeyboardThemeLight001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/src/assets/img/TouchKeyboardThemeLight001.jpg -------------------------------------------------------------------------------- /files/12c809c741cf4be39839af884a0c7f15_技术部门员工周评表-郭帆.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/files/12c809c741cf4be39839af884a0c7f15_技术部门员工周评表-郭帆.doc -------------------------------------------------------------------------------- /home-ui/public/static/img/TouchKeyboardThemeLight001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/TouchKeyboardThemeLight001.jpg -------------------------------------------------------------------------------- /home-ui/src/views/User/index.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 12 | -------------------------------------------------------------------------------- /home-ui/public/static/img/aa424c1549976a7abccf447bfd4c341.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/aa424c1549976a7abccf447bfd4c341.jpg -------------------------------------------------------------------------------- /home-ui/public/static/img/bf246f63c2dcd3f39d60ea5033bba37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JisuanjiBiSheXueJie/springbootVue-beadhouse/HEAD/home-ui/public/static/img/bf246f63c2dcd3f39d60ea5033bba37.jpg -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/dto/FileVO.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class FileVO { 7 | private String filekey; 8 | } 9 | -------------------------------------------------------------------------------- /home-ui/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: { 5 | }, 6 | getters: { 7 | }, 8 | mutations: { 9 | }, 10 | actions: { 11 | }, 12 | modules: { 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/dto/UserAddressDto.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserAddressDto { 7 | private String address; 8 | private Integer count; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/dto/AliPay.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class AliPay { 7 | 8 | private String subject; 9 | private String traceNo; 10 | private String totalAmount; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/NewTypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.NewsType; 5 | 6 | public interface NewTypeMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/HealthpunchMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.Healthpunch; 5 | 6 | public interface HealthpunchMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/drug/DrugListMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.drug; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.drug.DrugList; 5 | 6 | public interface DrugListMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/food/FoodListMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.food; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.food.FoodList; 5 | 6 | public interface FoodListMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/guest/VisitorsMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.guest; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.guest.Visitors; 5 | 6 | public interface VisitorsMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /home-ui/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /home-ui/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'User-Token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/configInfo/ConfigTypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.configInfo; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.config.ConfigType; 5 | 6 | public interface ConfigTypeMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/configInfo/ListInfoMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.configInfo; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.configInfoEntity.ListInfo; 5 | 6 | public interface ListInfoMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/home/LeaveAndMessageMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.home; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.home.LeaveAndMessage; 5 | 6 | public interface LeaveAndMessageMapper extends BaseMapper { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/NursingHomeApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class NursingHomeApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /home-ui/README.md: -------------------------------------------------------------------------------- 1 | # nursing-home-ui 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Customize configuration 19 | See [Configuration Reference](https://cli.vuejs.org/config/). 20 | -------------------------------------------------------------------------------- /home-ui/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /home-ui/vue.config.js: -------------------------------------------------------------------------------- 1 | // 跨域配置 2 | module.exports = { 3 | devServer: { //记住,别写错了devServer//设置本地默认端口 选填 4 | port: 80, 5 | proxy: { //设置代理,必须填 6 | '/api': { //设置拦截器 拦截器格式 斜杠+拦截器名字,名字可以自己定 7 | target: 'http://localhost:9000', //代理的目标地址 8 | changeOrigin: true, //是否设置同源,输入是的 9 | pathRewrite: { //路径重写 10 | '/api': '' //选择忽略拦截器里面的单词 11 | } 12 | } 13 | }, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/GenerateUuid.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util; 2 | 3 | import cn.hutool.core.util.IdUtil; 4 | 5 | /** 6 | * \* Created with IntelliJ IDEA. 7 | * \* @author 用户: 28159 8 | * \* 日期: 2022/3/7 9 | * \* 时间: 21:22 10 | * \* 乌漆嘛黑码神保佑没有bug: 11 | * \ 12 | */ 13 | public class GenerateUuid { 14 | public String getUuid(){ 15 | return IdUtil.randomUUID(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /home-ui/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store' 5 | import ElementPlus from 'element-plus' 6 | import zhCn from 'element-plus/es/locale/lang/zh-cn' 7 | import 'element-plus/dist/index.css' 8 | import naiveUi from 'naive-ui' 9 | 10 | createApp(App).use(store).use(ElementPlus, { 11 | locale: zhCn,size: "small" 12 | }).use(router).use(naiveUi).mount('#app') 13 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/guest/ContentMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.guest; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.guest.Content; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author guofan 12 | * @since 2021-12-02 13 | */ 14 | public interface ContentMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.user.User; 5 | 6 | /** 7 | * \* Created with IntelliJ IDEA. 8 | * \* @author 用户: 28159 9 | * \* 日期: 2022/3/6 10 | * \* 时间: 12:24 11 | * \* 乌漆嘛黑码神保佑没有bug: 12 | * \ 13 | */ 14 | public interface UserMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/BxMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.BX.ReportForRepair; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | @Mapper 10 | public interface BxMapper extends BaseMapper { 11 | List> getBxList(); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/guest/NIndexIntroduceMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.guest; 2 | 3 | import java.util.List; 4 | 5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 6 | import com.example.nursinghomeapplication.entity.guest.NIndexIntroduce; 7 | 8 | /** 9 | * 主页分院说明Mapper接口 10 | * 11 | * @author ruoyi 12 | * @date 2022-05-01 13 | */ 14 | public interface NIndexIntroduceMapper extends BaseMapper 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /home-ui/src/views/User/payment.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 29 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/UserLoginToken.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * @author 28159 10 | */ 11 | @Target({ElementType.METHOD, ElementType.TYPE}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface UserLoginToken { 14 | boolean required() default true; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/LeaveMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.Leave; 5 | import com.example.nursinghomeapplication.mapper.vo.LeaveUser; 6 | import org.apache.ibatis.annotations.Mapper; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | @Mapper 11 | public interface LeaveMapper extends BaseMapper { 12 | List getAllForUser(); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/drug/PersonnelDrugMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.drug; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.drug.PersonnelDrug; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | @Mapper 10 | public interface PersonnelDrugMapper extends BaseMapper { 11 | public List> getDetails(Integer personId); 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/home/LeaveAndMessage.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.home; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.ToString; 7 | 8 | @Data 9 | @ToString 10 | @TableName(value = "n_leave_message") 11 | public class LeaveAndMessage extends BaseEntity { 12 | private String name; 13 | private String phone; 14 | private String mess; 15 | private Integer isContact; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/food/PersonnelFoodsMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.food; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.food.PersonnelFoods; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface PersonnelFoodsMapper extends BaseMapper { 10 | /** 11 | * 根据客户id获取食品信息 12 | * @param id 13 | * @return 14 | */ 15 | public List> getFoodList(Integer id); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/guest/NIndexIntroduce.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.guest; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | @Data 10 | @ToString 11 | @EqualsAndHashCode 12 | @TableName(value = "n_index_introduce") 13 | public class NIndexIntroduce extends BaseEntity { 14 | private String name; 15 | private String body; 16 | private String type; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/ex/LimitExceededException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.ex; 2 | 3 | public class LimitExceededException extends SecurityException{ 4 | public LimitExceededException() { 5 | super(); 6 | } 7 | 8 | public LimitExceededException(String s) { 9 | super(s); 10 | } 11 | 12 | public LimitExceededException(String message, Throwable cause) { 13 | super(message, cause); 14 | } 15 | 16 | public LimitExceededException(Throwable cause) { 17 | super(cause); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/PassToken.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/6 12 | * \* 时间: 11:02 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \ 15 | */ 16 | @Target({ElementType.METHOD, ElementType.TYPE}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface PassToken { 19 | boolean required() default true; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/NewsType.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.ToString; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/10 12 | * \* 时间: 11:31 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \新闻类型 15 | */ 16 | @Data 17 | @ToString 18 | @EqualsAndHashCode 19 | @TableName(value = "n_news_type") 20 | public class NewsType extends BaseEntity { 21 | private Integer typeId; 22 | private String typeName; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/Md5Password.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util; 2 | 3 | import org.springframework.util.DigestUtils; 4 | 5 | /** 6 | * \* Created with IntelliJ IDEA. 7 | * \* @author 用户: 28159 8 | * \* 日期: 2022/3/6 9 | * \* 时间: 16:46 10 | * \* 乌漆嘛黑码神保佑没有bug: 11 | * \ 12 | */ 13 | public class Md5Password { 14 | public String getMD5Password(String password, String salt) { 15 | for (int i = 0; i < 3; i++) { 16 | 17 | password = DigestUtils.md5DigestAsHex((salt + password + salt).getBytes()).toUpperCase(); 18 | } 19 | return password; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/personnel/PersonMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.personnel; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.personnel.PersonUser; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | @Mapper 10 | public interface PersonMapper extends BaseMapper { 11 | List> getPersonFoodsById(Integer id); 12 | List> getPersonDrudsById(Integer id); 13 | List> getPersonnelUser(Integer id); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/config/ConfigType.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.config; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.ToString; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/15 12 | * \* 时间: 16:33 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \ 15 | */ 16 | @Data 17 | @ToString 18 | @EqualsAndHashCode 19 | @TableName(value = " n_config") 20 | public class ConfigType { 21 | private Integer id; 22 | private Integer nowRemainNum; 23 | private Integer maxRemainNum; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/guest/Content.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.guest; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import com.fasterxml.jackson.annotation.JsonFormat; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.ToString; 9 | 10 | @TableName(value = "n_content") 11 | @Data 12 | @ToString 13 | @EqualsAndHashCode 14 | public class Content extends BaseEntity { 15 | private String title; 16 | private String content; 17 | private String body; 18 | @JsonFormat(pattern = "yyy-MM-dd", timezone = "GMT+8") 19 | private Integer hotNum; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/requestStatus.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util; 2 | 3 | /** 4 | * @author 28159 5 | */ 6 | 7 | public enum requestStatus { 8 | //成功 9 | Request_Success(200, "获取数据Ok"), 10 | Request_Redirect(300,"服务器接受到数据并将其重定向"), 11 | Request_Unauthorized(401,"(未授权)请求要求身份验证。"), 12 | Request_NotFount(404,"服务器找不到请求的网页"); 13 | private Integer code; 14 | private String message; 15 | 16 | requestStatus(int code, String message) { 17 | this.message = message; 18 | this.code = code; 19 | } 20 | 21 | public Integer getCode() { 22 | return code; 23 | } 24 | 25 | public String getMessage() { 26 | return message; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/configInfoEntity/ListInfo.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.configInfoEntity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.ToString; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/11 12 | * \* 时间: 9:33 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \宿舍信息表 15 | */ 16 | @Data 17 | @ToString 18 | @EqualsAndHashCode 19 | @TableName(value = "n_listinfo") 20 | public class ListInfo { 21 | private Integer id; 22 | private Integer ssNameId; 23 | private String ssName; 24 | private Integer ssFloorNum; 25 | private Integer ssHouses; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/BaseController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller; 2 | 3 | 4 | import com.example.nursinghomeapplication.util.JsonResult; 5 | import org.springframework.web.bind.annotation.ExceptionHandler; 6 | 7 | import javax.sql.rowset.serial.SerialException; 8 | 9 | /** 10 | * @author 28159 11 | */ //控制层的基类 12 | public class BaseController { 13 | //操作成功的状态码 14 | public static final int OK = 200; 15 | //找不到的状态码 16 | public static final int notFound = 404; 17 | @ExceptionHandler(SerialException.class) //统一处理抛出的异常 18 | public JsonResult handleException(Throwable e) { 19 | JsonResult result = new JsonResult<>(e); 20 | return result; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/drug/PersonnelDrug.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.drug; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/3/15 13 | * \* 时间: 17:42 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \客户用药 16 | */ 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_personnel_drug") 21 | public class PersonnelDrug extends BaseEntity { 22 | private Integer personnelId; 23 | private String drugId; 24 | private String dose; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/food/PersonnelFoods.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.food; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/3/15 13 | * \* 时间: 17:42 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \客户用药 16 | */ 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_personnel_food") 21 | public class PersonnelFoods extends BaseEntity { 22 | private Integer personnelId; 23 | private String foodsId; 24 | private String dose; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/ex/ServiceException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.ex; 2 | 3 | public class ServiceException extends RuntimeException{ 4 | public ServiceException() { 5 | super(); 6 | } 7 | 8 | public ServiceException(String message) { 9 | super(message); 10 | } 11 | 12 | public ServiceException(String message, Throwable cause) { 13 | super(message, cause); 14 | } 15 | 16 | public ServiceException(Throwable cause) { 17 | super(cause); 18 | } 19 | 20 | protected ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 21 | super(message, cause, enableSuppression, writableStackTrace); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/InfoCenterMapper.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.example.nursinghomeapplication.entity.News; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * @author 28159 12 | */ 13 | @Mapper 14 | public interface InfoCenterMapper extends BaseMapper { 15 | /** 16 | * 获取全部新闻非停用状态 17 | * 18 | * @return 19 | */ 20 | public List getNews(); 21 | 22 | /** 23 | * 获取全部新闻非删除状态 24 | * @return 25 | */ 26 | public List> getNewsIsAdmin(); 27 | 28 | //获取数据库版本号 29 | public String getVersion(); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/food/FoodList.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.food; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/3/16 13 | * \* 时间: 10:36 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \食品列表 16 | */ 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_foods") 21 | public class FoodList extends BaseEntity { 22 | private String uuid; 23 | private String name; 24 | private String dose; 25 | private String role; 26 | private String warning; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/drug/DrugList.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.drug; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/3/15 13 | * \* 时间: 17:40 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \ 药物列表 16 | */ 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_drug") 21 | public class DrugList extends BaseEntity { 22 | private String uuid; 23 | private String name; 24 | private String dose; 25 | private String role; 26 | private String warning; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/ex/UpdateException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.ex; 2 | 3 | //用户在更新数据产生的未知异常 4 | public class UpdateException extends ServiceException { 5 | public UpdateException() { 6 | super(); 7 | } 8 | 9 | public UpdateException(String message) { 10 | super(message); 11 | } 12 | 13 | public UpdateException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | public UpdateException(Throwable cause) { 18 | super(cause); 19 | } 20 | 21 | protected UpdateException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 22 | super(message, cause, enableSuppression, writableStackTrace); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/resources/mapper/BxMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/BX/ReportForRepair.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.BX; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* 用户: 28159 12 | * \* Date: 2022/3/5 13 | * \* Time: 23:08 14 | * \* Description: 15 | * \报修表集成工具类 16 | */ 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_bx") 21 | public class ReportForRepair extends BaseEntity { 22 | private Integer userId; 23 | private String bxTitle; 24 | private String bxAddresses; 25 | private String bxBody; 26 | private String errorReason; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/News.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.ToString; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/10 12 | * \* 时间: 11:29 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \新闻表 15 | */ 16 | @Data 17 | @ToString 18 | @EqualsAndHashCode 19 | @TableName(value = "n_news") 20 | public class News extends BaseEntity { 21 | private String title; 22 | private String body; 23 | private String type; 24 | private Integer hotNum; 25 | private String content; 26 | private String fileName; 27 | private String isDelete; 28 | private Integer species; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/ex/CartNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.ex; 2 | 3 | /** 购物车数据不存在的异常 */ 4 | public class CartNotFoundException extends ServiceException { 5 | public CartNotFoundException() { 6 | super(); 7 | } 8 | 9 | public CartNotFoundException(String message) { 10 | super(message); 11 | } 12 | 13 | public CartNotFoundException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | public CartNotFoundException(Throwable cause) { 18 | super(cause); 19 | } 20 | 21 | protected CartNotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 22 | super(message, cause, enableSuppression, writableStackTrace); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/ex/ProductNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.ex; 2 | 3 | /** 商品数据不存在的异常 */ 4 | public class ProductNotFoundException extends ServiceException { 5 | public ProductNotFoundException() { 6 | super(); 7 | } 8 | 9 | public ProductNotFoundException(String message) { 10 | super(message); 11 | } 12 | 13 | public ProductNotFoundException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | public ProductNotFoundException(Throwable cause) { 18 | super(cause); 19 | } 20 | 21 | protected ProductNotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 22 | super(message, cause, enableSuppression, writableStackTrace); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/ex/AddressNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.ex; 2 | 3 | /** 收货地址数据不存在的异常 */ 4 | public class AddressNotFoundException extends ServiceException { 5 | public AddressNotFoundException() { 6 | super(); 7 | } 8 | 9 | public AddressNotFoundException(String message) { 10 | super(message); 11 | } 12 | 13 | public AddressNotFoundException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | public AddressNotFoundException(Throwable cause) { 18 | super(cause); 19 | } 20 | 21 | protected AddressNotFoundException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 22 | super(message, cause, enableSuppression, writableStackTrace); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/demoController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller; 2 | 3 | import cn.hutool.core.img.ImgUtil; 4 | import cn.hutool.core.io.FileUtil; 5 | import com.example.nursinghomeapplication.util.JsonResult; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import java.awt.*; 11 | 12 | /** 13 | * \* Created with IntelliJ IDEA. 14 | * \* @author 用户: 28159 15 | * \* 日期: 2022/3/21 16 | * \* 时间: 12:44 17 | * \* 乌漆嘛黑码神保佑没有bug: 18 | * \ 19 | */ 20 | @RestController 21 | @RequestMapping("/demo") 22 | public class demoController extends BaseController{ 23 | // @PostMapping() 24 | // public JsonResult getStart(){ 25 | // 26 | // 27 | // } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/guest/Visitors.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.guest; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import com.fasterxml.jackson.annotation.JsonFormat; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.ToString; 9 | 10 | import java.util.Date; 11 | 12 | @Data 13 | @ToString 14 | @EqualsAndHashCode 15 | @TableName(value = "n_visitors") 16 | public class Visitors extends BaseEntity { 17 | private String name; 18 | private String phone; 19 | private String email; 20 | 21 | @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss", timezone = "GMT+8") 22 | private Date startTime; 23 | @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss", timezone = "GMT+8") 24 | private Date endTime; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/user/User.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.user; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.example.nursinghomeapplication.entity.BaseEntity; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/3/5 13 | * \* 时间: 23:23 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \这是一个用户的实体类集成工具实体类免写一些字段 16 | */ 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_user") 21 | public class User extends BaseEntity { 22 | private String account; 23 | private String password; 24 | private Integer admin; 25 | private String salt; 26 | private String name; 27 | private String uuid; 28 | private String phone; 29 | private String address; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/Healthpunch.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.ToString; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/5 12 | * \* 时间: 23:17 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \健康打卡表 15 | */ 16 | @SuppressWarnings("SpellCheckingInspection") 17 | @Data 18 | @ToString 19 | @EqualsAndHashCode 20 | @TableName(value = "n_healthpunch") 21 | public class Healthpunch extends BaseEntity { 22 | private Integer userId; 23 | private Double temperature; 24 | private Integer adverse; 25 | private String personId; 26 | private Integer pulse; 27 | private Integer maxBloodPre; 28 | private Integer minBloodPre; 29 | private Integer breathingRate; 30 | } 31 | -------------------------------------------------------------------------------- /home-ui/src/views/User/dist/drugList.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 34 | 35 | 37 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/MainTest.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.example.nursinghomeapplication.util.Md5Password; 5 | 6 | import java.util.UUID; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/4/12 12 | * \* 时间: 12:04 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \ 15 | */ 16 | public class MainTest { 17 | //来一个主方法 18 | public static void main(String[] args) { 19 | Md5Password md5Password = new Md5Password(); 20 | String s = UUID.randomUUID().toString().toUpperCase(); 21 | System.out.println(s); 22 | String md5Password1 = md5Password.getMD5Password("admin222", s); 23 | System.out.println(md5Password1); 24 | // for (int i = 1; i < 97; i++) { 25 | // System.out.println("sum (p"+i+" * MULTIPLY_POWER) p"+i+","); 26 | // } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/pojo/JsonEntity.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.pojo; 2 | 3 | /** 4 | * \* Created with IntelliJ IDEA. 5 | * \* @author 用户: 28159 6 | * \* 日期: 2022/3/9 7 | * \* 时间: 17:00 8 | * \* 乌漆嘛黑码神保佑没有bug: 9 | * \ 10 | */ 11 | public class JsonEntity { 12 | private Integer code; 13 | /** 14 | * 返回内容 15 | */ 16 | public String msg; 17 | 18 | /** 19 | * 数据对象 20 | */ 21 | public String data; 22 | 23 | public Integer getCode() { 24 | return code; 25 | } 26 | 27 | public void setCode(Integer code) { 28 | this.code = code; 29 | } 30 | 31 | public String getMsg() { 32 | return msg; 33 | } 34 | 35 | public void setMsg(String msg) { 36 | this.msg = msg; 37 | } 38 | 39 | public String getData() { 40 | return data; 41 | } 42 | 43 | public void setData(String data) { 44 | this.data = data; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/ex/CustomException.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config.ex; 2 | 3 | /** 4 | * \* Created with IntelliJ IDEA. 5 | * \* @author 用户: 28159 6 | * \* 日期: 2022/3/11 7 | * \* 时间: 11:41 8 | * \* 乌漆嘛黑码神保佑没有bug: 9 | * \ 10 | */ 11 | 12 | /** 13 | * token没找到的话抛出异常 14 | */ 15 | public class CustomException extends RuntimeException { 16 | public CustomException() { 17 | super(); 18 | } 19 | 20 | public CustomException(String message) { 21 | super(message); 22 | } 23 | 24 | public CustomException(String message, Throwable cause) { 25 | super(message, cause); 26 | } 27 | 28 | public CustomException(Throwable cause) { 29 | super(cause); 30 | } 31 | 32 | protected CustomException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 33 | super(message, cause, enableSuppression, writableStackTrace); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/news.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PersonnelFoodsMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/mapper/vo/LeaveUser.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.mapper.vo; 2 | 3 | import com.example.nursinghomeapplication.entity.Leave; 4 | import com.example.nursinghomeapplication.entity.user.User; 5 | import com.fasterxml.jackson.annotation.JsonFormat; 6 | import lombok.Data; 7 | 8 | /** 9 | * \* Created with IntelliJ IDEA. 10 | * \* @author 用户: 28159 11 | * \* 日期: 2022/3/17 12 | * \* 时间: 15:23 13 | * \* 乌漆嘛黑码神保佑没有bug: 14 | * \ 15 | */ 16 | @Data 17 | public class LeaveUser { 18 | private Integer id; 19 | private String account; 20 | private String name; 21 | private String phone; 22 | private String title; 23 | @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss", timezone = "GMT+8") 24 | private String startTime; 25 | @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss", timezone = "GMT+8") 26 | private String endTime; 27 | private String address; 28 | private String identity; 29 | private String body; 30 | private Integer status; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PersonnelDrugMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/Leave.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fasterxml.jackson.annotation.JsonFormat; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.ToString; 8 | 9 | import java.util.Date; 10 | 11 | /** 12 | * \* Created with IntelliJ IDEA. 13 | * \* @author 用户: 28159 14 | * \* 日期: 2022/3/5 15 | * \* 时间: 23:20 16 | * \* 乌漆嘛黑码神保佑没有bug: 17 | * \请假表 18 | */ 19 | @Data 20 | @ToString 21 | @EqualsAndHashCode 22 | @TableName(value = "n_leave") 23 | public class Leave extends BaseEntity { 24 | private Integer userId; 25 | private String title; 26 | private String addresses; 27 | private String identity; 28 | private String body; 29 | private String errorReason; 30 | @JsonFormat(pattern = "yyy-MM-dd", timezone = "GMT+8") 31 | private Date startTime; 32 | @JsonFormat(pattern = "yyy-MM-dd", timezone = "GMT+8") 33 | private Date endTime; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config; 2 | 3 | import com.baomidou.mybatisplus.annotation.DbType; 4 | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; 5 | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; 6 | import org.mybatis.spring.annotation.MapperScan; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | /** 11 | * mybatis-plus 分页插件 12 | * @author 28159 13 | */ 14 | @Configuration 15 | @MapperScan("com.example.nursinghomeapplication.mapper") 16 | public class MybatisPlusConfig { 17 | 18 | /** 19 | * 分页插件 20 | */ 21 | @Bean 22 | public MybatisPlusInterceptor mybatisPlusInterceptor() { 23 | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); 24 | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); 25 | return interceptor; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/personnel/PersonUser.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity.personnel; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import com.example.nursinghomeapplication.entity.BaseEntity; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.ToString; 9 | 10 | /** 11 | * \* Created with IntelliJ IDEA. 12 | * \* @author 用户: 28159 13 | * \* 日期: 2022/3/15 14 | * \* 时间: 14:20 15 | * \* 乌漆嘛黑码神保佑没有bug: 16 | * \客户表 17 | */ 18 | @Data 19 | @ToString 20 | @EqualsAndHashCode 21 | @TableName(value = "n_personnel") 22 | public class PersonUser extends BaseEntity { 23 | private Integer userId; 24 | @TableField(exist = false) 25 | private String userName; 26 | private String name; 27 | private String uuid; 28 | private String address; 29 | private String phone; 30 | private String familyPhone1; 31 | private String familyPhone2; 32 | private String warning; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/mapper/LeaveMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 29 | 30 | -------------------------------------------------------------------------------- /home-ui/src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready () { 8 | console.log( 9 | 'App is being served from cache by a service worker.\n' + 10 | 'For more details, visit https://goo.gl/AFskqB' 11 | ) 12 | }, 13 | registered () { 14 | console.log('Service worker has been registered.') 15 | }, 16 | cached () { 17 | console.log('Content has been cached for offline use.') 18 | }, 19 | updatefound () { 20 | console.log('New content is downloading.') 21 | }, 22 | updated () { 23 | console.log('New content is available; please refresh.') 24 | }, 25 | offline () { 26 | console.log('No internet connection found. App is running in offline mode.') 27 | }, 28 | error (error) { 29 | console.error('Error during service worker registration:', error) 30 | } 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ### set log levels ### 2 | log4j.rootLogger=info , error , D , E 3 | ### ?????? ### 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.Target=System.out 6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 7 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n 8 | ### ??????? ### 9 | log4j.appender.D=org.apache.log4j.DailyRollingFileAppender 10 | log4j.appender.D.File=D:/io/output/driving/log111.log 11 | log4j.appender.D.Append=true 12 | log4j.appender.D.Threshold=DEBUG 13 | log4j.appender.D.layout=org.apache.log4j.PatternLayout 14 | log4j.appender.D.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n 15 | ### ??????????? ### 16 | log4j.appender.E=org.apache.log4j.DailyRollingFileAppender 17 | log4j.appender.E.File=D:/io/output/driving/log112.log 18 | log4j.appender.E.Append=true 19 | log4j.appender.E.Threshold=ERROR 20 | log4j.appender.E.layout=org.apache.log4j.PatternLayout 21 | log4j.appender.E.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n 22 | -------------------------------------------------------------------------------- /home-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nursing-home-ui", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "@element-plus/icons-vue": "^1.1.1", 11 | "@vicons/ionicons5": "^0.12.0", 12 | "axios": "^0.26.0", 13 | "core-js": "^3.8.3", 14 | "dayjs": "^1.11.2", 15 | "echarts": "^5.3.1", 16 | "element-plus": "^2.1.10", 17 | "js-cookie": "^3.0.1", 18 | "jsonwebtoken": "^8.5.1", 19 | "register-service-worker": "^1.7.2", 20 | "vue": "^3.2.13", 21 | "vue-router": "^4.0.3", 22 | "vuex": "^4.0.0", 23 | "wangeditor": "^4.7.12" 24 | }, 25 | "devDependencies": { 26 | "@vue/cli-plugin-babel": "~5.0.0", 27 | "@vue/cli-plugin-pwa": "~5.0.0", 28 | "@vue/cli-plugin-router": "~5.0.0", 29 | "@vue/cli-plugin-vuex": "~5.0.0", 30 | "@vue/cli-service": "~5.0.0", 31 | "naive-ui": "^2.27.0", 32 | "stylus": "^0.55.0", 33 | "stylus-loader": "^6.1.0" 34 | }, 35 | "browserslist": [ 36 | "> 1%", 37 | "last 2 versions", 38 | "not dead", 39 | "not ie 11" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/entity/BaseEntity.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.IdType; 5 | import com.baomidou.mybatisplus.annotation.TableField; 6 | import com.baomidou.mybatisplus.annotation.TableId; 7 | import com.fasterxml.jackson.annotation.JsonFormat; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.ToString; 11 | 12 | import java.util.Date; 13 | 14 | /** 15 | * 公共的实体类用于继承 16 | * 17 | * @author 28159 18 | */ 19 | @Data 20 | @ToString 21 | @EqualsAndHashCode 22 | public class BaseEntity { 23 | @TableId(value = "id", type = IdType.AUTO) 24 | private Integer id; 25 | private Integer status; 26 | private String createUser; 27 | @TableField(fill = FieldFill.INSERT) 28 | @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss", timezone = "GMT+8") 29 | private Date createTime; 30 | private String modifiedUser; 31 | @TableField(fill = FieldFill.INSERT_UPDATE) 32 | @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss", timezone = "GMT+8") 33 | private Date modifiedTime; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /home-ui/src/utils/cookie.js: -------------------------------------------------------------------------------- 1 | export function getCookie(cname) { 2 | var name = cname + "="; 3 | console.log(document.cookie); 4 | var ca = document.cookie.split(';'); 5 | for (var i = 0; i < ca.length; i++) { 6 | var c = ca[i]; 7 | while (c.charAt(0) == ' ') c = c.substring(1); 8 | if (c.indexOf(name) != -1) { 9 | return c.substring(name.length, c.length); 10 | } 11 | } 12 | return ""; 13 | } 14 | 15 | //设置cookie 16 | export function setCookie(cname, cvalue, exdays) { 17 | var d = new Date(); 18 | d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 19 | var expires = "expires=" + d.toUTCString(); 20 | document.cookie = cname + "=" + cvalue + "; " + expires; 21 | } 22 | 23 | //清除cookie 24 | export function clearCookie() { 25 | setCookie("imgCodeToken", "", -1); 26 | } 27 | 28 | export function checkCookie() { 29 | var user = this.getCookie("username"); 30 | if (user != "") { 31 | alert("Welcome again " + user); 32 | } else { 33 | user = prompt("Please enter your name:", ""); 34 | if (user != "" && user != null) { 35 | this.setCookie("username", user, 365); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/DosUtil.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util; 2 | 3 | import cn.hutool.core.util.RuntimeUtil; 4 | import com.example.nursinghomeapplication.mapper.InfoCenterMapper; 5 | import org.springframework.stereotype.Component; 6 | 7 | import javax.annotation.Resource; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/4/10 13 | * \* 时间: 19:06 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \ 16 | */ 17 | public class DosUtil { 18 | public String getIp(String data) { 19 | String dos = "ping " + data + " -l 1 -n 1"; 20 | String str = RuntimeUtil.execForStr(dos); 21 | return splitCmdReturn(str); 22 | } 23 | public String splitCmdReturn(String data) { 24 | // 从"正在 Ping redisServer [127.0.0.1] 具有 1 字节的数据:\r\n来自 127.0.0.1 的回复: 字节=1 时间<1ms TTL=64\r\n\r\n127.0.0.1 的 Ping 统计信息:\r\n 数据包: 已发送 = 1,已接收 = 1,丢失 = 0 (0% 丢失),\r\n往返行程的估计时间(以毫秒为单位):\r\n 最短 = 0ms,最长 = 0ms,平均 = 0ms\r\n" 25 | //正则表达式获取ip 26 | String[] split = data.split("\\["); 27 | String[] split1 = split[1].split("]"); 28 | String[] split2 = split1[0].split(" "); 29 | return split2[0]; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/service/impl/PersonServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.impl; 2 | 3 | import com.example.nursinghomeapplication.entity.drug.DrugList; 4 | import com.example.nursinghomeapplication.entity.personnel.PersonUser; 5 | import com.example.nursinghomeapplication.service.PersonService; 6 | import org.junit.jupiter.api.Test; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import javax.annotation.Resource; 10 | 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | import static org.junit.jupiter.api.Assertions.*; 15 | 16 | @SpringBootTest 17 | class PersonServiceImplTest { 18 | @Resource 19 | PersonService personService; 20 | @Test 21 | void getPersonDrug(){ 22 | List> personDrug = personService.getPersonDrug(1); 23 | System.out.println(personDrug); 24 | } 25 | @Test 26 | void getPerFoodsById(){ 27 | List> perFoodsById = personService.getPerFoodsById(1); 28 | System.out.println(perFoodsById); 29 | } 30 | 31 | @Test 32 | void getPersonnelUser() { 33 | List personUserList = personService.getPersonnelUser(1); 34 | System.out.println(personUserList); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | #redis的配置文件 3 | redis: 4 | database: 1 # Redis数据库索引(默认为0) 5 | host: 47.102.202.189 # Redis服务器地址 6 | port: 6379 # Redis服务器连接端口 7 | password: # Redis服务器连接密码(默认为空) 8 | jedis: 9 | pool: 10 | max-active: -1 # 连接池最大连接数(使用负值表示没有限制) 默认 8 11 | max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 12 | max-idle: 8 # 连接池中的最大空闲连接 默认 8 13 | min-idle: 0 # 连接池中的最小空闲连接 默认 0 14 | #文件上传的最大值以及request请求的最大值 15 | servlet: 16 | multipart: 17 | max-file-size: 10MB 18 | max-request-size: 15MB 19 | enabled: true 20 | #mysql的驱动配置 21 | datasource: 22 | driver-class-name: com.mysql.cj.jdbc.Driver 23 | url: jdbc:mysql://127.0.0.1:3306/nursing-home 24 | username: root 25 | password: 12345678 26 | #jpa的配置文件 27 | jpa: 28 | database-platform: org.hibernate.dialect.MySQL5Dialect 29 | show-sql: true 30 | properties: 31 | hibernate: 32 | hbm2ddl: 33 | auto: update 34 | mybatis-plus: 35 | configuration: 36 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 37 | mapper-locations: classpath:/mapper/*.xml 38 | #端口号 39 | server: 40 | port: 9000 41 | token: 42 | # 令牌有效期(默认120分钟) 43 | expireTime: 12000 44 | user: 45 | #哪个值的时候是admin用户 46 | adminUser: 1 47 | ip: "localhost" 48 | nodeIp: 80 49 | #扫码二维码的前端页面 50 | codePath: "/generateCodevVisitors" 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/Result.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util; 2 | 3 | public class Result { 4 | private String code; 5 | private String msg; 6 | private T data; 7 | 8 | public String getCode() { 9 | return code; 10 | } 11 | 12 | public void setCode(String code) { 13 | this.code = code; 14 | } 15 | 16 | public String getMsg() { 17 | return msg; 18 | } 19 | 20 | public void setMsg(String msg) { 21 | this.msg = msg; 22 | } 23 | 24 | public T getData() { 25 | return data; 26 | } 27 | 28 | public void setData(T data) { 29 | this.data = data; 30 | } 31 | 32 | public Result() { 33 | } 34 | 35 | public Result(T data) { 36 | this.data = data; 37 | } 38 | 39 | public static Result success() { 40 | Result result = new Result<>(); 41 | result.setCode("0"); 42 | result.setMsg("成功"); 43 | return result; 44 | } 45 | 46 | public static Result success(T data) { 47 | Result result = new Result<>(data); 48 | result.setCode("0"); 49 | result.setMsg("成功"); 50 | return result; 51 | } 52 | 53 | public static Result error(String code, String msg) { 54 | Result result = new Result(); 55 | result.setCode(code); 56 | result.setMsg(msg); 57 | return result; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/Pulsar.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | import org.apache.pulsar.client.api.*; 4 | import org.apache.pulsar.client.impl.auth.AuthenticationToken; 5 | import org.apache.pulsar.client.impl.conf.ClientConfigurationData; 6 | 7 | import java.util.HashMap; 8 | 9 | /** 10 | * \* Created with IntelliJ IDEA. 11 | * \* @author 用户: 28159 12 | * \* 日期: 2022/4/10 13 | * \* 时间: 13:20 14 | * \* 乌漆嘛黑码神保佑没有bug: 15 | * \ 16 | */ 17 | public class Pulsar { 18 | private PulsarClient client; 19 | public void Pulsar() throws PulsarClientException { 20 | client = PulsarClient.builder() 21 | .serviceUrl("pulsar://100.118.1.12:32230,100.118.1.13:30376") 22 | .build(); 23 | ConsumerBuilder consumerBuilder = client.newConsumer(); 24 | consumerBuilder.topic("my-topic"); 25 | consumerBuilder.subscriptionName("my-subscription"); 26 | consumerBuilder.subscriptionType(SubscriptionType.Exclusive); 27 | consumerBuilder.subscribe(); 28 | } 29 | public void Close() throws PulsarClientException { 30 | client.close(); 31 | } 32 | public PulsarClient getPulsarClient(){ 33 | return client; 34 | } 35 | } 36 | class main { 37 | //来个主方法 38 | public static void main(String[] args) throws PulsarClientException { //主方法 39 | Pulsar pulsar = new Pulsar(); 40 | pulsar.Pulsar(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/service/impl/UserServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 7 | import com.example.nursinghomeapplication.entity.user.User; 8 | import com.example.nursinghomeapplication.mapper.UserMapper; 9 | import org.junit.jupiter.api.Test; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | import javax.annotation.Resource; 12 | import java.util.HashMap; 13 | 14 | @SpringBootTest 15 | class UserServiceImplTest { 16 | @Resource 17 | UserMapper userMapper; 18 | @Test 19 | void selectPage(){ 20 | LambdaQueryWrapper userLambdaQueryWrapper = Wrappers.lambdaQuery(); 21 | Page userPage = new Page<>(1 , 10); 22 | IPage userIPage = userMapper.selectPage(userPage , userLambdaQueryWrapper); 23 | // userIPage.getRecords() 24 | System.out.println("总页数: "+userIPage.getPages()); 25 | System.out.println("总记录数: "+userIPage.getTotal()); 26 | userIPage.getRecords().forEach(System.out::println); 27 | } 28 | @Test 29 | void test(){ 30 | HashMap data = new HashMap<>(); 31 | System.out.println(data.get("current").toString().isEmpty()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /home-ui/src/views/User/dialog/dialogFood.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 51 | 52 | 55 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/WebConfig.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config; 2 | 3 | 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 7 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 9 | 10 | /** 11 | * @author 28159 12 | */ 13 | @Configuration 14 | public class WebConfig implements WebMvcConfigurer { 15 | 16 | @Override 17 | public void addInterceptors(InterceptorRegistry registry) { 18 | 19 | registry.addInterceptor(authInterceptor()) 20 | .addPathPatterns("/**") 21 | .excludePathPatterns("/util/getCaptacha","/user/login","/user/adminLogin", "/files/**", "/guest/**","/info/getInitViewDrug","/guest/saveLeaveAndMessage","/info/getNewsById/**","/info/getIndexIntroduceByType/**"); 22 | } 23 | 24 | @Override 25 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 26 | //配置拦截器访问静态资源 27 | registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/"); 28 | registry.addResourceHandler("/favicon.ico").addResourceLocations("classpath:/META-INF/resources/"); 29 | registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); 30 | } 31 | 32 | @Bean 33 | public AuthInterceptor authInterceptor() { 34 | return new AuthInterceptor(); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/service/Vo/Sys.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util.service.Vo; 2 | 3 | /** 4 | * 系统相关信息 5 | * 6 | * @author ruoyi 7 | */ 8 | public class Sys 9 | { 10 | /** 11 | * 服务器名称 12 | */ 13 | private String computerName; 14 | 15 | /** 16 | * 服务器Ip 17 | */ 18 | private String computerIp; 19 | 20 | /** 21 | * 项目路径 22 | */ 23 | private String userDir; 24 | 25 | /** 26 | * 操作系统 27 | */ 28 | private String osName; 29 | 30 | /** 31 | * 系统架构 32 | */ 33 | private String osArch; 34 | 35 | public String getComputerName() 36 | { 37 | return computerName; 38 | } 39 | 40 | public void setComputerName(String computerName) 41 | { 42 | this.computerName = computerName; 43 | } 44 | 45 | public String getComputerIp() 46 | { 47 | return computerIp; 48 | } 49 | 50 | public void setComputerIp(String computerIp) 51 | { 52 | this.computerIp = computerIp; 53 | } 54 | 55 | public String getUserDir() 56 | { 57 | return userDir; 58 | } 59 | 60 | public void setUserDir(String userDir) 61 | { 62 | this.userDir = userDir; 63 | } 64 | 65 | public String getOsName() 66 | { 67 | return osName; 68 | } 69 | 70 | public void setOsName(String osName) 71 | { 72 | this.osName = osName; 73 | } 74 | 75 | public String getOsArch() 76 | { 77 | return osArch; 78 | } 79 | 80 | public void setOsArch(String osArch) 81 | { 82 | this.osArch = osArch; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/AuthInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import com.auth0.jwt.JWT; 5 | import com.example.nursinghomeapplication.config.ex.CustomException; 6 | import com.example.nursinghomeapplication.entity.user.User; 7 | import com.example.nursinghomeapplication.mapper.UserMapper; 8 | import com.example.nursinghomeapplication.service.impl.UtilServiceImpl; 9 | import org.springframework.web.servlet.HandlerInterceptor; 10 | 11 | import javax.annotation.Resource; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | 15 | public class AuthInterceptor implements HandlerInterceptor { 16 | 17 | @Resource 18 | private UserMapper userMapper; 19 | @Resource 20 | UtilServiceImpl utilService; 21 | @Override 22 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { 23 | 24 | String token = request.getHeader("token"); 25 | if (StrUtil.isBlank(token)) { 26 | throw new CustomException( "未获取到token, 请重新登录"); 27 | } 28 | String JWTresultId =""; 29 | try { 30 | JWTresultId = JWT.decode(token).getClaim("account").asString(); 31 | } catch (Exception e) { 32 | throw new CustomException( "token不合法"); 33 | } 34 | String userId = utilService.getValueForRedisByKey(token); 35 | User result = userMapper.selectById(userId); 36 | if (result == null || !result.getAccount().equals(JWTresultId)) { 37 | throw new CustomException( "token不合法"); 38 | } 39 | return true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/mapper/InfoCenterMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 28 | 49 | 52 | 53 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/learnonline.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 42 | 43 | 77 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/test.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | import cn.hutool.core.img.ImgUtil; 4 | import cn.hutool.core.io.FileUtil; 5 | import cn.hutool.core.util.RandomUtil; 6 | import io.netty.util.internal.StringUtil; 7 | import org.junit.jupiter.api.Test; 8 | 9 | import java.awt.*; 10 | import java.io.File; 11 | import java.util.ArrayList; 12 | import java.util.HashMap; 13 | import java.util.Map; 14 | import java.util.Random; 15 | 16 | /** 17 | * \* Created with IntelliJ IDEA. 18 | * \* @author 用户: 28159 19 | * \* 日期: 2022/3/21 20 | * \* 时间: 12:56 21 | * \* 乌漆嘛黑码神保佑没有bug: 22 | * \ 23 | */ 24 | public class test { 25 | Integer x=0; 26 | Integer y=0; 27 | @Test 28 | void main() { 29 | File input = FileUtil.file("D:/io/input/main.jpg"); 30 | Font font = new Font("黑体", Font.BOLD, 100); 31 | String str="你好这个世界"; 32 | ArrayList listx = new ArrayList<>(); 33 | ArrayList listy = new ArrayList<>(); 34 | String[] split = str.split(""); 35 | for (String s : split) { 36 | Integer x = getWx(); 37 | Integer y = getY(); 38 | listx.add(x); 39 | listy.add(y); 40 | ImgUtil.pressText(input,input,s,Color.BLACK,font,x,y,1); 41 | } 42 | System.out.println(listx); 43 | System.out.println(listy); 44 | } 45 | Integer getWx(){ 46 | return x=RandomUtil.randomInt(x+100, 200+x); 47 | } 48 | Integer getY(){ 49 | return y=RandomUtil.randomInt(10,100); 50 | } 51 | @Test 52 | void aa(){ 53 | Map map = new HashMap<>(); 54 | map.put("like","aa"); 55 | System.out.println(StringUtil.isNullOrEmpty(map.get("like").toString())); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/config/CORSFilter.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.config; 2 | 3 | import com.example.nursinghomeapplication.util.service.TokenService; 4 | import org.springframework.stereotype.Component; 5 | 6 | import javax.annotation.Resource; 7 | import javax.servlet.*; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import java.io.IOException; 11 | 12 | /** 13 | * \* Created with IntelliJ IDEA. 14 | * \* @author 用户: 28159 15 | * \* 日期: 2022/3/6 16 | * \* 时间: 16:05 17 | * \* 乌漆嘛黑码神保佑没有bug: 18 | * \跨域问题配置无实际意义含义 19 | */ 20 | @Component 21 | 22 | public class CORSFilter implements Filter { 23 | @Resource 24 | TokenService tokenService; 25 | @Override 26 | 27 | public void init(FilterConfig filterConfig) throws ServletException { 28 | 29 | } 30 | 31 | @Override 32 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 33 | HttpServletRequest request = (HttpServletRequest) servletRequest; 34 | 35 | HttpServletResponse response = (HttpServletResponse) servletResponse; 36 | 37 | response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); 38 | 39 | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); 40 | 41 | response.setHeader("Access-Control-Max-Age", "3600"); 42 | 43 | response.setHeader("Access-Control-Allow-Headers", "x-requested-with"); 44 | //是否支持cookie跨域 45 | response.setHeader("Access-Control-Allow-Credentials", "true"); 46 | 47 | filterChain.doFilter(servletRequest, servletResponse); 48 | 49 | } 50 | 51 | @Override 52 | 53 | public void destroy() { 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /home-ui/src/utils/request.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import router from "../router"; 3 | import {getToken} from "@/utils/auth"; 4 | 5 | const request = axios.create({ 6 | baseURL: "/api", 7 | timeout: 5000 8 | }) 9 | 10 | // 请求白名单,如果请求在白名单里面,将不会被拦截校验权限 11 | const whiteUrls = ["/user/login","/user/adminLogin","/guest/index","/guest/getFoodList","/info/getInitViewDrug","/info/getNewsById"] 12 | // request 拦截器 13 | // 可以自请求发送前对请求做一些处理 14 | // 比如统一加token,对请求参数统一加密 15 | request.interceptors.request.use(config => { 16 | let result = config.url.split("/"); 17 | let data=""; 18 | if (result.length >= 3) { 19 | data="/"+result[1]+"/"+result[2]; 20 | } 21 | console.log(data); 22 | config.headers['Content-Type'] = 'application/json;charset=utf-8'; 23 | let token = getToken(); 24 | if (token != null) { 25 | if (!whiteUrls.includes(config.url)) { // 校验请求白名单 26 | config.headers['token'] = token; 27 | } 28 | }else if(whiteUrls.includes(config.url)){ 29 | return config; 30 | }else if(whiteUrls.includes(data)){ 31 | return config; 32 | } 33 | else { 34 | router.push("/guest/index") 35 | } 36 | return config 37 | }, error => { 38 | return Promise.reject(error) 39 | }); 40 | 41 | // response 拦截器 42 | // 可以在接口响应后统一处理结果 43 | request.interceptors.response.use( 44 | response => { 45 | let res = response.data; 46 | // 如果是返回的文件 47 | if (response.config.responseType === 'blob') { 48 | return res 49 | } 50 | // 兼容服务端返回的字符串数据 51 | if (typeof res === 'string') { 52 | res = res ? JSON.parse(res) : res 53 | } 54 | return res; 55 | }, 56 | error => { 57 | console.log('err' + error) // for debug 58 | return Promise.reject(error) 59 | } 60 | ) 61 | 62 | 63 | export default request 64 | 65 | -------------------------------------------------------------------------------- /home-ui/src/views/User/Journalist.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 66 | 67 | 73 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/examination.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 53 | 54 | 63 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PersonMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 25 | 47 | 59 | 60 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/pojo/Payload.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.pojo; 2 | 3 | /** 4 | * \* Created with IntelliJ IDEA. 5 | * \* @author 用户: 28159 6 | * \* 日期: 2022/3/9 7 | * \* 时间: 14:35 8 | * \* 乌漆嘛黑码神保佑没有bug: 9 | * \ 10 | */ 11 | 12 | import java.util.ArrayList; 13 | import java.util.Date; 14 | import java.util.List; 15 | import java.util.Map; 16 | 17 | public class Payload { 18 | //发布者 19 | private String issuer; 20 | //主题 21 | private String subject; 22 | //签名的观众 也可以理解谁接受签名的 23 | private List audience; 24 | //发布时间 25 | private Date issuedAt; 26 | //过期时间 27 | private Date expiresAt; 28 | //开始使用时间 29 | private Date notBefore; 30 | private Map claims; 31 | 32 | public String getIssuer() { 33 | return issuer; 34 | } 35 | 36 | public void setIssuer(String issuer) { 37 | this.issuer = issuer; 38 | } 39 | 40 | public String getSubject() { 41 | return subject; 42 | } 43 | 44 | public void setSubject(String subject) { 45 | this.subject = subject; 46 | } 47 | 48 | public List getAudience() { 49 | return audience; 50 | } 51 | 52 | public void setAudience(List audience) { 53 | this.audience = audience; 54 | } 55 | 56 | public Date getIssuedAt() { 57 | return issuedAt; 58 | } 59 | 60 | public void setIssuedAt(Date issuedAt) { 61 | this.issuedAt = issuedAt; 62 | } 63 | 64 | public Date getExpiresAt() { 65 | return expiresAt; 66 | } 67 | 68 | public void setExpiresAt(Date expiresAt) { 69 | this.expiresAt = expiresAt; 70 | } 71 | 72 | public Date getNotBefore() { 73 | return notBefore; 74 | } 75 | 76 | public void setNotBefore(Date notBefore) { 77 | this.notBefore = notBefore; 78 | } 79 | 80 | public Map getClaims() { 81 | return claims; 82 | } 83 | 84 | public void setClaims(Map claims) { 85 | this.claims = claims; 86 | } 87 | 88 | public void setAudience(String... audienceStr) { 89 | List audiences = new ArrayList(); 90 | for (String string : audienceStr) { 91 | audiences.add(string); 92 | } 93 | this.audience = audiences; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/SEnum/ShortMessage.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.SEnum; 2 | 3 | import java.text.MessageFormat; 4 | 5 | public class ShortMessage { 6 | public static String buildSmsTemplateContent(String content, Object[] args) { 7 | return MessageFormat.format(content, args); 8 | } 9 | 10 | public static String buildSmsContent(ShortMessageEnum shortMessageEnum, Object[] args) { 11 | return MessageFormat.format(shortMessageEnum.getBody(), args); 12 | } 13 | 14 | public static String buildSmsContentmod(String context, Object[] args) { 15 | return MessageFormat.format(context, args); 16 | } 17 | 18 | /** 19 | * 实际业务中的短信模板 20 | */ 21 | public enum ShortMessageEnum { 22 | /*** 23 | * 模板 24 | */ 25 | SM01("养老院管理系统", "您的验证码是:[", "${code},", "]若遗忘密码或非本人操作要打主页客服电话哦,切记啊宝打死不要给别人说啊"); 26 | 27 | String title; 28 | String h2title; 29 | String code; 30 | String body; 31 | 32 | ShortMessageEnum(String title, String h2title, String code, String body) { 33 | this.title = title; 34 | this.h2title=h2title; 35 | this.code = code; 36 | this.body = body; 37 | } 38 | 39 | public String getH2title() { 40 | return h2title; 41 | } 42 | 43 | public void setH2title(String h2title) { 44 | this.h2title = h2title; 45 | } 46 | 47 | public String getCode() { 48 | return code; 49 | } 50 | 51 | public void setCode(String code) { 52 | this.code = code; 53 | } 54 | 55 | public String getTitle() { 56 | return title; 57 | } 58 | 59 | public void setTitle(String title) { 60 | this.title = title; 61 | } 62 | 63 | 64 | public String getBody() { 65 | return body; 66 | } 67 | 68 | public void setBody(String body) { 69 | this.body = body; 70 | } 71 | 72 | @Override 73 | public String toString() { 74 | return "ShortMessageEnum{" + 75 | "title='" + title + '\'' + 76 | ", h2title='" + h2title + '\'' + 77 | ", code='" + code + '\'' + 78 | ", body='" + body + '\'' + 79 | '}'; 80 | } 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /home-ui/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 爱心养老院 9 | 46 | 47 | 48 | 51 |
52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/guest/IndexShowController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller.guest; 2 | 3 | 4 | import com.example.nursinghomeapplication.controller.BaseController; 5 | import com.example.nursinghomeapplication.entity.News; 6 | import com.example.nursinghomeapplication.entity.food.FoodList; 7 | import com.example.nursinghomeapplication.entity.guest.Content; 8 | import com.example.nursinghomeapplication.entity.guest.Visitors; 9 | import com.example.nursinghomeapplication.entity.home.LeaveAndMessage; 10 | import com.example.nursinghomeapplication.service.IContentService; 11 | import com.example.nursinghomeapplication.util.JsonResult; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import javax.annotation.Resource; 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | /** 19 | *

20 | * 前端控制器 21 | *

22 | * 23 | * @author guofan 24 | * @since 2021-12-02 25 | */ 26 | @RestController 27 | @RequestMapping("/guest") 28 | public class IndexShowController extends BaseController { 29 | @Resource 30 | private IContentService contentService; 31 | 32 | /** 33 | * 获取主页新闻内容 34 | * 35 | * @param type 36 | * @return 37 | */ 38 | @PostMapping("/index/{type}") 39 | public JsonResult> fingByType(@PathVariable("type") Integer type) { 40 | if (type == null) { 41 | return new JsonResult<>(notFound); 42 | } 43 | List result = contentService.message(type); 44 | return new JsonResult<>(OK, result); 45 | } 46 | 47 | @GetMapping("/getFoodList") 48 | public JsonResult> getFoodList() { 49 | List data = contentService.getFoodList(); 50 | return new JsonResult>(OK, data); 51 | } 52 | 53 | //插入留言 54 | @PostMapping("/saveLeaveAndMessage") 55 | public JsonResult saveLeaveAndMessage(@RequestBody LeaveAndMessage leaveAndMessage) { 56 | leaveAndMessage.setCreateUser("guest"); 57 | contentService.saveLeaveAndMessage(leaveAndMessage); 58 | return new JsonResult<>(OK); 59 | } 60 | 61 | //插入访客记录 62 | @PostMapping("/saveVisitor") 63 | public JsonResult saveVisitor(@RequestBody Visitors visitors) { 64 | visitors.setCreateUser("guest"); 65 | contentService.saveVisitor(visitors); 66 | return new JsonResult<>(OK); 67 | } 68 | 69 | //获取访客记录 70 | @PostMapping("/getVisitor") 71 | public JsonResult getVisitor(@RequestBody Map data) { 72 | return new JsonResult<>(OK, contentService.getVisitor(data)); 73 | } 74 | //删除访客记录 75 | @PostMapping("/updateVisitor") 76 | public JsonResult deleteVisitor(@RequestBody Visitors visitors) { 77 | contentService.updateVisitor(visitors); 78 | return new JsonResult<>(OK); 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/NursingHomeApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * @author 28159 9 | * 启动类 10 | */ 11 | @SpringBootApplication 12 | @MapperScan("com.example.nursinghomeapplication.mapper") 13 | public class NursingHomeApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(NursingHomeApplication.class, args); 17 | System.out.println(" ,--, \n" + 18 | ",---.'| \n" + 19 | "| | : ,--, \n" + 20 | ": : | ,--, ,--.'| ,---, ,---, \n" + 21 | "| ' : ,---. ,--.'| | | : ,---. ,---.'| ,---.'| \n" + 22 | "; ; ' ' ,'\\ .---. | |, .--.--. : : ' ' ,'\\ | | : | | : \n" + 23 | "' | |__ / / | /. ./| ,---. `--'_ / / ' | ' | / / | ,--.--. | | | ,---. | | | \n" + 24 | "| | :.'. ; ,. :.-' . ' | / \\ ,' ,'| | : /`./ ' | | . ; ,. :/ \\ ,--.__| | / \\ ,--.__| | \n" + 25 | "' : ' | |: /___/ \\: |/ / | ' | | | : ;_ | | : ' | |: .--. .-. | / ,' |/ / |/ ,' | \n" + 26 | "| | ./' | .; . \\ ' . ' / | | | : \\ \\ `. ' : |__' | .; :\\__\\/: . .. ' / . ' / . ' / | \n" + 27 | "; : ; | : |\\ \\ ' ; /| ' : |__ `----. \\ | | '.'| : |,\" .--.; |' ; |: ' ; /' ; |: | \n" + 28 | "| ,/ \\ \\ / \\ \\ ' | / | | | '.'|/ /`--' / ; : ;\\ \\ // / ,. || | '/ ' | / | | '/ ' \n" + 29 | "'---' `----' \\ \\ | : | ; : '--'. / | , / `----'; : .' | : :| : | : :| \n" + 30 | " '---\" \\ \\ / | , / `--'---' ---`-' | , .-./\\ \\ / \\ \\ / \\ \\ / \n" + 31 | " `----' ---`-' `--`---' `----' `----' `----' "); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/service/Vo/Jvm.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util.service.Vo; 2 | 3 | import com.example.nursinghomeapplication.util.service.Arith; 4 | import com.example.nursinghomeapplication.util.service.DateUtils; 5 | 6 | import java.lang.management.ManagementFactory; 7 | 8 | /** 9 | * JVM相关信息 10 | * 11 | * @author ruoyi 12 | */ 13 | public class Jvm 14 | { 15 | /** 16 | * 当前JVM占用的内存总数(M) 17 | */ 18 | private double total; 19 | 20 | /** 21 | * JVM最大可用内存总数(M) 22 | */ 23 | private double max; 24 | 25 | /** 26 | * JVM空闲内存(M) 27 | */ 28 | private double free; 29 | 30 | /** 31 | * JDK版本 32 | */ 33 | private String version; 34 | 35 | /** 36 | * JDK路径 37 | */ 38 | private String home; 39 | 40 | public double getTotal() 41 | { 42 | return Arith.div(total, (1024 * 1024), 2); 43 | } 44 | 45 | public void setTotal(double total) 46 | { 47 | this.total = total; 48 | } 49 | 50 | public double getMax() 51 | { 52 | return Arith.div(max, (1024 * 1024), 2); 53 | } 54 | 55 | public void setMax(double max) 56 | { 57 | this.max = max; 58 | } 59 | 60 | public double getFree() 61 | { 62 | return Arith.div(free, (1024 * 1024), 2); 63 | } 64 | 65 | public void setFree(double free) 66 | { 67 | this.free = free; 68 | } 69 | 70 | public double getUsed() 71 | { 72 | return Arith.div(total - free, (1024 * 1024), 2); 73 | } 74 | 75 | public double getUsage() 76 | { 77 | return Arith.mul(Arith.div(total - free, total, 4), 100); 78 | } 79 | 80 | /** 81 | * 获取JDK名称 82 | */ 83 | public String getName() 84 | { 85 | return ManagementFactory.getRuntimeMXBean().getVmName(); 86 | } 87 | 88 | public String getVersion() 89 | { 90 | return version; 91 | } 92 | 93 | public void setVersion(String version) 94 | { 95 | this.version = version; 96 | } 97 | 98 | public String getHome() 99 | { 100 | return home; 101 | } 102 | 103 | public void setHome(String home) 104 | { 105 | this.home = home; 106 | } 107 | 108 | /** 109 | * JDK启动时间 110 | */ 111 | public String getStartTime() 112 | { 113 | return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate()); 114 | } 115 | 116 | /** 117 | * JDK运行时间 118 | */ 119 | public String getRunTime() 120 | { 121 | return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate()); 122 | } 123 | 124 | /** 125 | * 运行参数 126 | */ 127 | public String getInputArgs() 128 | { 129 | return ManagementFactory.getRuntimeMXBean().getInputArguments().toString(); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## 养老院管理系统 前后端分离项目 2 | 3 | ### 后端技术:springboot+mybatis-plus+redis+mysql 4 | 5 | ### 前端:vue3.0+elementui-plus 6 | 7 | 1. 【人员管理】 用户管理 客户管理 8 | 2. 【药品食品管理】 药品管理 食品管理 9 | 3. 【报修管理】 10 | 4. 【外出管理】外出管理 访客管理 11 | 5. 【留言管理】 12 | 6. 【新闻管理】新闻发布 新闻编辑 分院信息管理 13 | 7. 【系统管理】系统设置 系统监控 14 | 8. 【服务大厅】人员管理 请假调休管理 15 | 9. 【人员管理】每日健康打卡 药品信息 个人健康信息图表可视化 16 | 10. 【故障管理】报修申请 进度查询 17 | 11. 【个人中心】个人信息维护 18 | 12. 【消息中心】公告消息查看 19 | 13. 【系统首页介绍】养老院介绍 服务内容展示 环境展示 品牌介绍 留言板 20 | 21 | ![2022年10月29日10时:58分:59秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日10时:58分:59秒) 22 | ![2022年10月29日10时:59分:12秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日10时:59分:12秒) 23 | ![2022年10月29日10时:59分:23秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日10时:59分:23秒) 24 | ![2022年10月29日10时:59分:38秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日10时:59分:38秒) 25 | ![2022年10月29日11时:01分:33秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:01分:33秒) 26 | ![2022年10月29日11时:01分:52秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:01分:52秒) 27 | ![2022年10月29日11时:02分:16秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:02分:16秒) 28 | ![2022年10月29日11时:02分:28秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:02分:28秒) 29 | ![2022年10月29日11时:02分:39秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:02分:39秒) 30 | ![2022年10月29日11时:02分:54秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:02分:54秒) 31 | ![2022年10月29日11时:03分:09秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:03分:09秒) 32 | ![2022年10月29日11时:03分:19秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:03分:19秒) 33 | ![2022年10月29日11时:03分:54秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:03分:54秒) 34 | ![2022年10月29日11时:04分:12秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:04分:12秒) 35 | ![2022年10月29日11时:04分:23秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:04分:23秒) 36 | ![2022年10月29日11时:04分:42秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:04分:42秒) 37 | ![2022年10月29日11时:05分:13秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:05分:13秒) 38 | ![2022年10月29日11时:05分:26秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:05分:26秒) 39 | ![2022年10月29日11时:06分:03秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:06分:03秒) 40 | ![2022年10月29日11时:06分:22秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:06分:22秒) 41 | ![2022年10月29日11时:06分:36秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:06分:36秒) 42 | ![2022年10月29日11时:06分:52秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:06分:52秒) 43 | ![2022年10月29日11时:07分:12秒](https://cyymacbookpro.oss-cn-shanghai.aliyuncs.com/Macbookpro/2022年10月29日11时:07分:12秒) 44 | -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/iotest.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | import java.io.*; 4 | 5 | public class iotest { 6 | public static void main(String[] args) { 7 | File InFile = new File("D:\\io\\pv\\part-r-00000"); 8 | try { 9 | InputStream inputStream = new FileInputStream(InFile); 10 | //逐行读取文件 11 | BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); 12 | StringBuilder stringBuilder = new StringBuilder(); 13 | String line; 14 | while ((line = bufferedReader.readLine()) != null) { 15 | stringBuilder.append(line); 16 | } 17 | System.out.println(stringBuilder); 18 | inputStream.close(); 19 | } catch (FileNotFoundException e) { 20 | throw new RuntimeException(e); 21 | } catch (IOException e) { 22 | throw new RuntimeException(e); 23 | } 24 | } 25 | 26 | private static void division(File targetFile, long cutSize) { 27 | if (targetFile == null) return; 28 | //计算总分割的次数 29 | int num = targetFile.length() % cutSize == 0 ? 30 | (int) (targetFile.length() / cutSize) : (int) (targetFile.length() / cutSize + 1); 31 | 32 | try { 33 | //构造输入流 34 | BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(targetFile)); 35 | //输出流 36 | BufferedOutputStream bufferedOutputStream = null; 37 | int len = -1;//每次实际读取长度 38 | byte[] bytes = null;//每次要读取的字节数 39 | int count = 0;//每次文件要读的次数 40 | //循环次数为生成文件的个数 41 | for (int i = 0; i < num; i++) { 42 | bufferedOutputStream = new BufferedOutputStream(new FileOutputStream("D:\\1xue\\text\\my\\" + (i + 1) + "_temp_" + targetFile.getName())); 43 | 44 | if (cutSize <= 1024) { 45 | bytes = new byte[(int) cutSize]; 46 | count = 1; 47 | } else { 48 | bytes = new byte[1024]; 49 | count = (int) cutSize / 1024; 50 | } 51 | while (count > 0 && (len = bufferedInputStream.read()) != -1) { 52 | bufferedOutputStream.write(bytes, 0, len); 53 | bufferedOutputStream.flush(); 54 | count--; 55 | } 56 | if (cutSize % 1024 != 0) { 57 | bytes = new byte[(int) cutSize % 1024]; 58 | len = bufferedInputStream.read(); 59 | bufferedOutputStream.write(bytes, 0, len); 60 | bufferedOutputStream.flush(); 61 | bufferedOutputStream.close(); 62 | } 63 | } 64 | bufferedInputStream.close(); 65 | } catch (FileNotFoundException e) { 66 | throw new RuntimeException(e); 67 | } catch (IOException e) { 68 | throw new RuntimeException(e); 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/test/java/com/example/nursinghomeapplication/sendvoice.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication; 2 | 3 | /** 4 | * \* Created with IntelliJ IDEA. 5 | * \* @author 用户: 28159 6 | * \* 日期: 2022/4/6 7 | * \* 时间: 9:00 8 | * \* 乌漆嘛黑码神保佑没有bug: 9 | * \ 10 | */ 11 | import java.io.IOException; 12 | 13 | import org.apache.commons.httpclient.HttpClient; 14 | import org.apache.commons.httpclient.HttpException; 15 | import org.apache.commons.httpclient.NameValuePair; 16 | import org.apache.commons.httpclient.methods.PostMethod; 17 | 18 | import org.dom4j.Document; 19 | import org.dom4j.DocumentException; 20 | import org.dom4j.DocumentHelper; 21 | import org.dom4j.Element; 22 | 23 | 24 | 25 | //接口类型:互亿无线语音通知接口。 26 | //账户注册:请通过该地址开通账户http://user.ihuyi.com/register.html 27 | //注意事项: 28 | //(1)调试期间,请仔细阅读接口文档; 29 | //(2)请使用APIID(查看APIID请登录用户中心->语音通知->帐户及签名设置->APIID)及 APIkey来调用接口; 30 | //(3)该代码仅供接入互亿无线语音通知接口参考使用,客户可根据实际需要自行编写; 31 | 32 | public class sendvoice { 33 | 34 | private static String Url = "http://api.vm.ihuyi.com/webservice/voice.php?method=Submit"; 35 | 36 | public static void main(String [] args) { 37 | 38 | HttpClient client = new HttpClient(); 39 | PostMethod method = new PostMethod(Url); 40 | 41 | //client.getParams().setContentCharset("GBK"); 42 | client.getParams().setContentCharset("UTF-8"); 43 | method.setRequestHeader("ContentType","application/x-www-form-urlencoded;charset=UTF-8"); 44 | 45 | NameValuePair[] data = {//提交短信 46 | new NameValuePair("account", "VM72158349"),//用户名是登录用户中心->语音通知->帐户参数设置->APIID 47 | new NameValuePair("password", "78492f3b3cfc455a06bf3b7e5b653cd9"),//查看密码请登录用户中心->语音通知->帐户参数设置->APIKEY 48 | new NameValuePair("mobile", "15290698853"),//手机号码 49 | new NameValuePair("content", "您的订单号是:0648。已由顺风快递发出,请注意查收。"), 50 | }; 51 | 52 | method.setRequestBody(data); 53 | 54 | try { 55 | client.executeMethod(method); 56 | 57 | String SubmitResult = method.getResponseBodyAsString(); 58 | 59 | //System.out.println(SubmitResult); 60 | 61 | Document doc = DocumentHelper.parseText(SubmitResult); 62 | Element root = doc.getRootElement(); 63 | 64 | String code = root.elementText("code"); 65 | String msg = root.elementText("msg"); 66 | String voiceid = root.elementText("voiceid"); 67 | 68 | System.out.println(code); 69 | System.out.println(msg); 70 | System.out.println(voiceid); 71 | 72 | if("2".equals(code)){ 73 | System.out.println("短信提交成功"); 74 | } 75 | 76 | } catch (HttpException e) { 77 | // TODO Auto-generated catch block 78 | e.printStackTrace(); 79 | } catch (IOException e) { 80 | // TODO Auto-generated catch block 81 | e.printStackTrace(); 82 | } catch (DocumentException e) { 83 | // TODO Auto-generated catch block 84 | e.printStackTrace(); 85 | } 86 | 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /home-ui/src/views/User/BX/Query.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 100 | 101 | 103 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/PersonController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller; 2 | 3 | import com.example.nursinghomeapplication.entity.config.ConfigType; 4 | import com.example.nursinghomeapplication.entity.personnel.PersonUser; 5 | import com.example.nursinghomeapplication.entity.user.User; 6 | import com.example.nursinghomeapplication.service.PersonService; 7 | import com.example.nursinghomeapplication.service.UserService; 8 | import com.example.nursinghomeapplication.util.JsonResult; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.annotation.Resource; 12 | import javax.servlet.http.HttpServletRequest; 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | /** 17 | * \* Created with IntelliJ IDEA. 18 | * \* @author 用户: 28159 19 | * \* 日期: 2022/3/15 20 | * \* 时间: 14:32 21 | * \* 乌漆嘛黑码神保佑没有bug: 22 | * \客户管理控制 23 | */ 24 | @RestController 25 | @RequestMapping("/person") 26 | public class PersonController extends BaseController { 27 | @Resource 28 | PersonService personService; 29 | @Resource 30 | UserService userService; 31 | 32 | /** 33 | * 根据当前用户获取全部客户信息 34 | * 35 | * @return 客户集合 36 | */ 37 | @GetMapping("/getPersonListByUser") 38 | public JsonResult> getPersonListByUser(HttpServletRequest request) { 39 | User user = userService.getUser(request); 40 | return new JsonResult<>(OK, personService.getPersonList(user.getId())); 41 | } 42 | 43 | /** 44 | * 根据客户id获取药物信息 45 | * 46 | * @param id 47 | * @return 48 | */ 49 | @GetMapping("/getPersonnelDrug/{id}") 50 | public JsonResult getPersonnelDrug(@PathVariable Integer id) { 51 | return new JsonResult<>(OK, personService.getPersonDrug(id)); 52 | } 53 | 54 | @GetMapping("/getPerFoodsById/{id}") 55 | public JsonResult getPerFoodsById(@PathVariable Integer id) { 56 | return new JsonResult<>(OK, personService.getPerFoodsById(id)); 57 | } 58 | 59 | @GetMapping("/getPersonnelUser/{id}") 60 | public JsonResult getPersonnelUser(@PathVariable Integer id) { 61 | return new JsonResult<>(OK, personService.getPersonnelUser(id)); 62 | } 63 | 64 | @PostMapping("/getPersonPage") 65 | public JsonResult getPersonList(@RequestBody Map data) { 66 | return new JsonResult<>(OK, personService.getPersonPage(data)); 67 | } 68 | 69 | @GetMapping("/getPersonMessById/{id}") 70 | public JsonResult getPersonMessById(@PathVariable Integer id) { 71 | return new JsonResult<>(OK, personService.getPersonMessById(id)); 72 | } 73 | 74 | @PostMapping("/delPersonById/{id}") 75 | public JsonResult delPersonById(@PathVariable Integer id, HttpServletRequest request) { 76 | PersonUser personUser = new PersonUser(); 77 | personUser.setModifiedUser(userService.getUser(request).getName()); 78 | personUser.setId(id); 79 | return new JsonResult<>(OK, personService.delPersonById(personUser)); 80 | } 81 | 82 | //添加客户 83 | @PostMapping("/addPerson") 84 | public JsonResult addPerson(@RequestBody PersonUser personUser, HttpServletRequest request) { 85 | if (personUser.getId() == null) { 86 | personUser.setCreateUser(userService.getUser(request).getName()); 87 | } else { 88 | personUser.setModifiedUser(userService.getUser(request).getName()); 89 | } 90 | return new JsonResult<>(OK, personService.addPerson(personUser)); 91 | } 92 | //根据id获取客户信息 93 | @PostMapping("/getPersonById/{id}") 94 | public JsonResult getPersonById(@PathVariable Integer id) { 95 | return new JsonResult<>(OK, personService.getPersonById(id)); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/generateCodevVisitors.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 77 | 78 | 116 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/InfoCenterService.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service; 2 | 3 | 4 | import com.example.nursinghomeapplication.entity.BX.ReportForRepair; 5 | import com.example.nursinghomeapplication.entity.Healthpunch; 6 | import com.example.nursinghomeapplication.entity.Leave; 7 | import com.example.nursinghomeapplication.entity.News; 8 | import com.example.nursinghomeapplication.entity.NewsType; 9 | import com.example.nursinghomeapplication.entity.configInfoEntity.ListInfo; 10 | import com.example.nursinghomeapplication.entity.drug.DrugList; 11 | import com.example.nursinghomeapplication.entity.drug.PersonnelDrug; 12 | import com.example.nursinghomeapplication.entity.food.FoodList; 13 | import com.example.nursinghomeapplication.entity.food.PersonnelFoods; 14 | import com.example.nursinghomeapplication.entity.guest.NIndexIntroduce; 15 | import com.example.nursinghomeapplication.entity.home.LeaveAndMessage; 16 | import com.example.nursinghomeapplication.entity.user.User; 17 | import com.example.nursinghomeapplication.mapper.vo.LeaveUser; 18 | 19 | import java.util.List; 20 | import java.util.Map; 21 | 22 | public interface InfoCenterService { 23 | List getNewsList(); 24 | 25 | boolean uploadBx(ReportForRepair reportForRepair); 26 | 27 | List getSSListInfo(); 28 | 29 | List getBxApply(User user); 30 | 31 | ReportForRepair findDetailedById(String id); 32 | 33 | void updateBx(ReportForRepair report); 34 | 35 | //请假申请 36 | void AskForLeave(Leave leave); 37 | 38 | //根据id获取内容 39 | News getNewsById(Integer id); 40 | 41 | boolean setNewsToRead(Integer id); 42 | 43 | List getDrugList(); 44 | 45 | List getAllUser(); 46 | 47 | List getBxList(); 48 | 49 | List getListByName(String name); 50 | 51 | ReportForRepair getErrorReasonById(Integer id); 52 | 53 | List getAllLeaveForUser(); 54 | 55 | boolean setLeaveStatusById(Leave leave); 56 | 57 | Leave getLeaveErrorReasonById(Integer id); 58 | 59 | List getNewsType(); 60 | 61 | boolean insertNews(News news); 62 | 63 | Map getNewsIsAdmin(Map data); 64 | 65 | boolean changeNews(News news); 66 | 67 | //插入分院发布信息 68 | boolean insertnIndexIntroduce(NIndexIntroduce nIndexIntroduce); 69 | 70 | //获取分院发布信息 71 | MapgetIndexIntroduce(Map data); 72 | 73 | NIndexIntroduce getIndexIntroduceById(Integer id); 74 | 75 | NIndexIntroduce getIndexIntroduceByType(String type); 76 | 77 | Map getHealthpunchList(Map data); 78 | 79 | List getHealthpunchById(Integer id,String startTime,String endTime,boolean isUpdate); 80 | 81 | Map getInitViewDrugPage(Map data); 82 | 83 | boolean addDrug(DrugList drugList); 84 | boolean updateMedlicine(DrugList drugList); 85 | 86 | DrugList findMedlicineById(Integer id); 87 | 88 | Map getInitViewFoodListPage(Map data); 89 | 90 | boolean addFood(FoodList foodList); 91 | boolean updateFood(FoodList foodList); 92 | 93 | FoodList findFoodById(Integer id); 94 | 95 | boolean updateHealthpunch(Healthpunch healthpunch); 96 | 97 | boolean changeIndexIntroduce(NIndexIntroduce nIndexIntroduce); 98 | 99 | Map getMessageList(Map data); 100 | 101 | boolean updateMessage(LeaveAndMessage leaveAndMessage); 102 | 103 | List getLeaveList(Leave leave); 104 | 105 | List getDrugTypeList(); 106 | 107 | boolean updatePersonnelDrug(PersonnelDrug personnelDrug); 108 | 109 | List getFoodTypeList(); 110 | 111 | boolean updatePersonnelFood(PersonnelFoods personnelFoods); 112 | } 113 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/util/oter/Constants.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.util.oter; 2 | 3 | 4 | 5 | import io.jsonwebtoken.Claims; 6 | /** 7 | * 通用常量信息 8 | * 9 | * @author ruoyi 10 | */ 11 | public class Constants 12 | { 13 | /** 14 | * UTF-8 字符集 15 | */ 16 | public static final String UTF8 = "UTF-8"; 17 | 18 | /** 19 | * GBK 字符集 20 | */ 21 | public static final String GBK = "GBK"; 22 | 23 | /** 24 | * http请求 25 | */ 26 | public static final String HTTP = "http://"; 27 | 28 | /** 29 | * https请求 30 | */ 31 | public static final String HTTPS = "https://"; 32 | 33 | /** 34 | * 通用成功标识 35 | */ 36 | public static final String SUCCESS = "0"; 37 | 38 | /** 39 | * 通用失败标识 40 | */ 41 | public static final String FAIL = "1"; 42 | 43 | /** 44 | * 登录成功 45 | */ 46 | public static final String LOGIN_SUCCESS = "Success"; 47 | 48 | /** 49 | * 注销 50 | */ 51 | public static final String LOGOUT = "Logout"; 52 | 53 | /** 54 | * 注册 55 | */ 56 | public static final String REGISTER = "Register"; 57 | 58 | /** 59 | * 登录失败 60 | */ 61 | public static final String LOGIN_FAIL = "Error"; 62 | 63 | /** 64 | * 验证码 redis key 65 | */ 66 | public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; 67 | 68 | /** 69 | * 登录用户 redis key 70 | */ 71 | public static final String LOGIN_TOKEN_KEY = "login_tokens:"; 72 | 73 | /** 74 | * 防重提交 redis key 75 | */ 76 | public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; 77 | 78 | /** 79 | * 限流 redis key 80 | */ 81 | public static final String RATE_LIMIT_KEY = "rate_limit:"; 82 | 83 | /** 84 | * 验证码有效期(分钟) 85 | */ 86 | public static final Integer CAPTCHA_EXPIRATION = 2; 87 | 88 | /** 89 | * 令牌 90 | */ 91 | public static final String TOKEN = "token"; 92 | 93 | /** 94 | * 令牌前缀 95 | */ 96 | public static final String TOKEN_PREFIX = "Bearer "; 97 | 98 | /** 99 | * 令牌前缀 100 | */ 101 | public static final String LOGIN_USER_KEY = "login_user_key"; 102 | 103 | /** 104 | * 用户ID 105 | */ 106 | public static final String JWT_USERID = "userid"; 107 | 108 | /** 109 | * 用户名称 110 | */ 111 | public static final String JWT_USERNAME = Claims.SUBJECT; 112 | 113 | /** 114 | * 用户头像 115 | */ 116 | public static final String JWT_AVATAR = "avatar"; 117 | 118 | /** 119 | * 创建时间 120 | */ 121 | public static final String JWT_CREATED = "created"; 122 | 123 | /** 124 | * 用户权限 125 | */ 126 | public static final String JWT_AUTHORITIES = "authorities"; 127 | 128 | /** 129 | * 参数管理 cache key 130 | */ 131 | public static final String SYS_CONFIG_KEY = "sys_config:"; 132 | 133 | /** 134 | * 字典管理 cache key 135 | */ 136 | public static final String SYS_DICT_KEY = "sys_dict:"; 137 | 138 | /** 139 | * 资源映射路径 前缀 140 | */ 141 | public static final String RESOURCE_PREFIX = "/profile"; 142 | 143 | /** 144 | * RMI 远程方法调用 145 | */ 146 | public static final String LOOKUP_RMI = "rmi:"; 147 | 148 | /** 149 | * LDAP 远程方法调用 150 | */ 151 | public static final String LOOKUP_LDAP = "ldap:"; 152 | 153 | /** 154 | * LDAPS 远程方法调用 155 | */ 156 | public static final String LOOKUP_LDAPS = "ldaps:"; 157 | 158 | /** 159 | * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) 160 | */ 161 | public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" }; 162 | 163 | /** 164 | * 定时任务违规的字符 165 | */ 166 | public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", 167 | "org.springframework", "org.apache", "com.ruoyi.common.utils.file" }; 168 | } 169 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/UtilController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import com.example.nursinghomeapplication.entity.user.User; 5 | import com.example.nursinghomeapplication.service.UserService; 6 | import com.example.nursinghomeapplication.service.UtilService; 7 | import com.example.nursinghomeapplication.util.Captcha; 8 | import com.example.nursinghomeapplication.util.JsonResult; 9 | import io.netty.util.internal.StringUtil; 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import javax.annotation.Resource; 16 | import javax.servlet.http.HttpServletRequest; 17 | import java.util.Date; 18 | import java.util.HashMap; 19 | import java.util.Map; 20 | 21 | /** 22 | * \* Created with IntelliJ IDEA. 23 | * \* @author 用户: 28159 24 | * \* 日期: 2022/3/6 25 | * \* 时间: 18:29 26 | * \* 乌漆嘛黑码神保佑没有bug: 27 | * \ 28 | */ 29 | @RestController 30 | @RequestMapping("/util") 31 | public class UtilController extends BaseController { 32 | 33 | private static final Logger log = LoggerFactory.getLogger(UtilController.class); 34 | @Autowired 35 | Captcha captcha; 36 | @Autowired 37 | UtilService utilService; 38 | @Resource 39 | UserService userService; 40 | 41 | /** 42 | * 获取验证码 43 | * 44 | * @return 一个map集合里面存储了验证码的uuid值以及图片的imageBase64 数据 45 | */ 46 | @PostMapping("/getCaptacha") 47 | public JsonResult> getCaptacha() { 48 | Map result = captcha.etCaptcha(); 49 | if (result != null) { 50 | utilService.getCaptacha((String) result.get("code"), (String) result.get("uuid")); 51 | } 52 | result.put("code", "不许你偷看验证码"); 53 | return new JsonResult<>(OK, result); 54 | } 55 | 56 | /** 57 | * 短信验证码 58 | * 59 | * @param request 当前操作用户 60 | * @return 验证码的唯一uuid 61 | */ 62 | @PostMapping("/getVerificationCode") 63 | public JsonResult> getVerificationCode(HttpServletRequest request) { 64 | User user = userService.getUser(request); 65 | /** 66 | * 验证码接口暂时没有 67 | */ 68 | log.info("入参为手机号码为:{},uuid为{}", user.getPhone(), user.getUuid()); 69 | String code = utilService.setVerificationCode(); 70 | Map result = new HashMap<>(); 71 | result.put("uuid", code); 72 | return new JsonResult<>(OK, result); 73 | } 74 | 75 | /** 76 | * 根据前台传回的验证码信息,以及getVerificationCode返回的uuid来进行判断 77 | * 78 | * @param query 验证码的json 79 | * @return 状态码 80 | */ 81 | @PostMapping("/JudgeVerificationCode") 82 | public JsonResult JudgeVerificationCode(@RequestBody Map query) { 83 | try { 84 | if (StringUtil.isNullOrEmpty(query.get("uuid")) && StringUtil.isNullOrEmpty(query.get("salt"))) { 85 | return new JsonResult<>(notFound, "操作异常"); 86 | } 87 | } catch (Exception e) { 88 | return new JsonResult<>(notFound, "操作异常"); 89 | } 90 | /** 91 | * 验证码接口暂时没有 92 | */ 93 | log.info("前台传回入参[uuid:{},验证码:{}]", query.get(0), query.get(1)); 94 | Boolean result = utilService.JudgeVerificationCode(query.get("uuid"), query.get("salt")); 95 | if (!result) { 96 | return new JsonResult<>(notFound, "验证码错误"); 97 | } 98 | return new JsonResult<>(OK); 99 | } 100 | 101 | @PostMapping("/generateCode/{name}") 102 | public JsonResult generateCode(@PathVariable("name") String name) { 103 | //格式化日期 104 | HashMap result = new HashMap<>(); 105 | result.put("code", utilService.generateCode(name)); 106 | return new JsonResult<>(OK,result); 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /home-ui/src/views/User/User/HealthPunch.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 112 | 113 | 127 | -------------------------------------------------------------------------------- /home-ui/src/views/User/BX/Apply.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 131 | 132 | 138 | -------------------------------------------------------------------------------- /home-ui/public/static/baidumap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 百度地图API自定义地图 8 | 9 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 115 | 116 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/release.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 98 | 99 | 139 | -------------------------------------------------------------------------------- /home-ui/src/views/Admin/online/index.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 110 | 111 | 140 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/impl/UtilServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.impl; 2 | 3 | import cn.hutool.core.io.FileUtil; 4 | import cn.hutool.core.util.IdUtil; 5 | import cn.hutool.extra.qrcode.QrCodeUtil; 6 | import com.example.nursinghomeapplication.SEnum.ShortMessage; 7 | import com.example.nursinghomeapplication.service.UtilService; 8 | import com.example.nursinghomeapplication.util.GenerateCode; 9 | import com.example.nursinghomeapplication.util.GenerateUuid; 10 | import com.example.nursinghomeapplication.util.oter.Constants; 11 | import io.netty.util.internal.StringUtil; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.beans.factory.annotation.Value; 15 | import org.springframework.data.redis.core.RedisTemplate; 16 | import org.springframework.data.redis.core.ValueOperations; 17 | import org.springframework.stereotype.Service; 18 | 19 | import javax.annotation.Resource; 20 | import java.util.ArrayList; 21 | import java.util.Collection; 22 | import java.util.List; 23 | import java.util.concurrent.TimeUnit; 24 | 25 | /** 26 | * \* Created with IntelliJ IDEA. 27 | * \* @author 用户: 28159 28 | * \* 日期: 2022/3/6 29 | * \* 时间: 15:09 30 | * \* 乌漆嘛黑码神保佑没有bug: 31 | * \用户控制层 32 | */ 33 | @Service 34 | public class UtilServiceImpl implements UtilService { 35 | 36 | private static final Logger log = LoggerFactory.getLogger(UtilService.class); 37 | @Resource 38 | RedisTemplate redisTemplate; 39 | @Value("${user.nodeIp}") 40 | private String port; 41 | 42 | @Value("${user.ip}") 43 | private String ip; 44 | @Value("${user.codePath}") 45 | private String codePath; 46 | 47 | @Override 48 | public void getCaptacha(String result, String ip) { 49 | redisTemplate.opsForValue().set(ip, result, 120L, TimeUnit.SECONDS); 50 | } 51 | 52 | /** 53 | * 获取验证码的uuid从redis里面查找,获取成功后并将其kay从数据中删除 54 | * 55 | * @param uuid 验证码的key 56 | * @return 验证码 57 | */ 58 | @Override 59 | public String pdCaptacha(String uuid) { 60 | String code = getValueForRedisByKey(uuid); 61 | log.info("成功获取到验证码{},删除key{}", code, uuid); 62 | redisTemplate.delete(uuid); 63 | return code; 64 | } 65 | 66 | @Override 67 | public boolean setRedisKeyValue(String key, String vlaue, Long LengthTime) { 68 | if (StringUtil.isNullOrEmpty(key) && StringUtil.isNullOrEmpty(vlaue)) { 69 | return false; 70 | } 71 | redisTemplate.opsForValue().set(key, vlaue, LengthTime, TimeUnit.SECONDS); 72 | return true; 73 | } 74 | 75 | @Override 76 | public String getValueForRedisByKey(String key) { 77 | if (StringUtil.isNullOrEmpty(key)) { 78 | return null; 79 | } 80 | return (String) redisTemplate.opsForValue().get(key); 81 | } 82 | 83 | @Override 84 | public String setVerificationCode() { 85 | GenerateCode generateCode = new GenerateCode(); 86 | String code = generateCode.getVerificationCode(); 87 | log.info("生成验证码:[{}]", code); 88 | String uuid = new GenerateUuid().getUuid(); 89 | log.info("存入redis key为:{},value为:{}", uuid, code); 90 | /** 91 | * 阿里云短信接口 92 | */ 93 | this.setRedisKeyValue(uuid, code, 120L); 94 | ShortMessage shortMessage = new ShortMessage(); 95 | ShortMessage.ShortMessageEnum.SM01.setCode(code); 96 | log.info("{}", ShortMessage.ShortMessageEnum.SM01); 97 | return uuid; 98 | } 99 | 100 | @Override 101 | public boolean JudgeVerificationCode(String uuid, String code) { 102 | String key = this.getValueForRedisByKey(uuid); 103 | if (!StringUtil.isNullOrEmpty(key)) { 104 | if (key.equals(code)) { 105 | return true; 106 | } 107 | } 108 | return false; 109 | } 110 | 111 | @Override 112 | public List getList(String key) { 113 | //获取redis中所有的key的值 114 | ValueOperations valueOperations = redisTemplate.opsForValue(); 115 | Object o = valueOperations.get("*"); 116 | return redisTemplate.getClientList(); 117 | } 118 | 119 | @Override 120 | public String generateCode(String name) { 121 | String url = "http://" + ip + ":" + port +codePath+"?name=" + name; 122 | // 定义文件的唯一标识(前缀) 123 | String uuid = IdUtil.fastSimpleUUID(); 124 | String rootFilePath = System.getProperty("user.dir") + "/files/" + uuid + "_" + name; // 获取上传的路径 125 | // 生成指定url对应的二维码到文件,宽和高都是300像素 126 | QrCodeUtil.generate(url, 300, 300, FileUtil.file(rootFilePath)); 127 | return uuid; 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/learn.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 110 | 111 | 143 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/ServerController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller; 2 | 3 | /** 4 | * \* Created with IntelliJ IDEA. 5 | * \* @author 用户: 28159 6 | * \* 日期: 2022/4/10 7 | * \* 时间: 17:37 8 | * \* 乌漆嘛黑码神保佑没有bug: 9 | * \ 10 | */ 11 | 12 | import com.example.nursinghomeapplication.mapper.InfoCenterMapper; 13 | import com.example.nursinghomeapplication.util.DosUtil; 14 | import com.example.nursinghomeapplication.util.JsonResult; 15 | import com.example.nursinghomeapplication.util.StringUtils; 16 | import com.example.nursinghomeapplication.util.service.Server; 17 | import org.apache.ibatis.annotations.Delete; 18 | import org.slf4j.Logger; 19 | import org.slf4j.LoggerFactory; 20 | import org.springframework.beans.factory.annotation.Autowired; 21 | import org.springframework.beans.factory.annotation.Value; 22 | import org.springframework.data.redis.core.RedisCallback; 23 | import org.springframework.data.redis.core.RedisTemplate; 24 | import org.springframework.web.bind.annotation.*; 25 | 26 | import javax.annotation.Resource; 27 | import java.util.*; 28 | 29 | /** 30 | * 服务器监控 31 | * 32 | * @author ruoyi 33 | */ 34 | @RestController 35 | @RequestMapping("/monitor") 36 | public class ServerController extends BaseController { 37 | 38 | /** 39 | * log4j 40 | */ 41 | private static final Logger log = LoggerFactory.getLogger(ServerController.class); 42 | @Value("${spring.datasource.url}") 43 | private String DatabaseUrl; 44 | //数据库用户名 45 | @Value("${spring.datasource.username}") 46 | private String DatabaseUsername; 47 | //数据库密码 48 | @Value("${spring.datasource.password}") 49 | private String DatabasePassword; 50 | //获取Redis的url 51 | @Value("${spring.redis.host}") 52 | private String RedisHost; 53 | //获取Redis的端口 54 | @Value("${spring.redis.port}") 55 | private String RedisPort; 56 | //获取Redis的密码 57 | @Value("${spring.redis.password}") 58 | private String RedisPassword; 59 | 60 | @Resource 61 | private InfoCenterMapper infoCenterMapper; 62 | 63 | @Autowired 64 | private RedisTemplate redisTemplate; 65 | 66 | //获取服务器列表 67 | @GetMapping("/server") 68 | public JsonResult getServerList() throws Exception { 69 | Server server = new Server(); 70 | server.copyTo(); 71 | return new JsonResult(OK, server); 72 | } 73 | 74 | /** 75 | * 服务器监控 76 | */ 77 | @GetMapping("/getDatabaseMess") 78 | public JsonResult getDatabaseMess() throws Exception { 79 | HashMap result = new HashMap<>(); 80 | DosUtil dosUtil = new DosUtil(); 81 | String[] split = DatabaseUrl.split("//")[1].split("/"); 82 | String databaseName = split[1]; 83 | String DatabaseUrl = split[0].split(":")[0]; 84 | String DatabasePort = split[0].split(":")[1]; 85 | log.info("获取数据库信息"); 86 | result.put("database", dosUtil.getIp(DatabaseUrl)); 87 | result.put("databaseUsername", DatabaseUsername); 88 | result.put("databaseName", databaseName); 89 | result.put("databasePort", DatabasePort); 90 | result.put("databasePassword", DatabasePassword); 91 | result.put("redisHost", dosUtil.getIp(RedisHost)); 92 | result.put("redisPort", RedisPort); 93 | result.put("redisPassword", RedisPassword); 94 | //获取数据库信息 95 | result.put("databaseVersion", infoCenterMapper.getVersion()); 96 | return new JsonResult(OK, result); 97 | } 98 | 99 | @GetMapping("/cache") 100 | public JsonResult getInfo() throws Exception { 101 | Properties info = (Properties) redisTemplate.execute((RedisCallback) connection -> connection.info()); 102 | Properties commandStats = (Properties) redisTemplate.execute((RedisCallback) connection -> connection.info("commandstats")); 103 | Object dbSize = redisTemplate.execute((RedisCallback) connection -> connection.dbSize()); 104 | 105 | Map result = new HashMap<>(3); 106 | result.put("info", info); 107 | result.put("dbSize", dbSize); 108 | 109 | List> pieList = new ArrayList<>(); 110 | commandStats.stringPropertyNames().forEach(key -> { 111 | Map data = new HashMap<>(2); 112 | String property = commandStats.getProperty(key); 113 | data.put("name", StringUtils.removeStart(key, "cmdstat_")); 114 | data.put("value", StringUtils.substringBetween(property, "calls=", ",usec")); 115 | pieList.add(data); 116 | }); 117 | result.put("commandStats", pieList); 118 | return new JsonResult(OK, result); 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/service/impl/ContentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.service.impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 | import com.example.nursinghomeapplication.entity.News; 7 | import com.example.nursinghomeapplication.entity.food.FoodList; 8 | import com.example.nursinghomeapplication.entity.guest.Content; 9 | import com.example.nursinghomeapplication.entity.guest.Visitors; 10 | import com.example.nursinghomeapplication.entity.home.LeaveAndMessage; 11 | import com.example.nursinghomeapplication.mapper.InfoCenterMapper; 12 | import com.example.nursinghomeapplication.mapper.food.FoodListMapper; 13 | import com.example.nursinghomeapplication.mapper.guest.ContentMapper; 14 | import com.example.nursinghomeapplication.mapper.guest.VisitorsMapper; 15 | import com.example.nursinghomeapplication.mapper.home.LeaveAndMessageMapper; 16 | import com.example.nursinghomeapplication.service.IContentService; 17 | import com.example.nursinghomeapplication.service.ex.CartNotFoundException; 18 | import io.netty.util.internal.StringUtil; 19 | import org.slf4j.Logger; 20 | import org.slf4j.LoggerFactory; 21 | import org.springframework.stereotype.Service; 22 | 23 | import javax.annotation.Resource; 24 | import java.util.HashMap; 25 | import java.util.List; 26 | import java.util.Map; 27 | 28 | /** 29 | *

30 | * 服务实现类 31 | *

32 | * 33 | * @author guofan 34 | * @since 2021-12-02 35 | */ 36 | @Service // 注册为服务 37 | public class ContentServiceImpl implements IContentService { 38 | 39 | private static final Logger log = LoggerFactory.getLogger(IContentService.class); 40 | @Resource 41 | ContentMapper contentMapper; 42 | @Resource 43 | FoodListMapper foodListMapper; 44 | 45 | @Resource 46 | LeaveAndMessageMapper leaveAndMessageMapper; 47 | @Resource 48 | InfoCenterMapper infoCenterMapper; 49 | 50 | @Resource 51 | VisitorsMapper visitorsMapper; 52 | 53 | @Override 54 | public List message(Integer type) { 55 | QueryWrapper wrapper = new QueryWrapper<>(); 56 | if (type == 1) { 57 | wrapper.eq("hot_num", type); 58 | } else { 59 | wrapper.ne("hot_num", 0); 60 | } 61 | wrapper.eq("status", 1); 62 | wrapper.eq("is_delete", 1); 63 | wrapper.eq("species", 0); 64 | List list = infoCenterMapper.selectList(wrapper); 65 | if (list == null) { 66 | log.info("未找到任何值"); 67 | throw new CartNotFoundException("未找到任何值"); 68 | } 69 | return list; 70 | } 71 | 72 | @Override 73 | public List getFoodList() { 74 | QueryWrapper queryWrapper = new QueryWrapper<>(); 75 | queryWrapper.eq("status", 1); 76 | return foodListMapper.selectList(queryWrapper); 77 | } 78 | 79 | @Override 80 | public boolean saveLeaveAndMessage(LeaveAndMessage leaveAndMessage) { 81 | return leaveAndMessageMapper.insert(leaveAndMessage) > 0; 82 | } 83 | 84 | @Override 85 | public boolean saveVisitor(Visitors visitors) { 86 | return visitorsMapper.insert(visitors) > 0; 87 | } 88 | 89 | @Override 90 | public Map getVisitor(Map data) { 91 | // return visitorsMapper.selectList(new QueryWrapper().eq("status",1)); 92 | Integer current = 1; 93 | Integer size = 10; 94 | try { 95 | current = data.get("current") == null ? current : (Integer) data.get("current"); 96 | size = data.get("size") == null ? size : (Integer) data.get("size"); 97 | } catch (Exception e) { 98 | e.printStackTrace(); 99 | } 100 | QueryWrapper wrapper = new QueryWrapper<>(); 101 | try { 102 | if (!StringUtil.isNullOrEmpty(data.get("like").toString())) { 103 | wrapper.like("name", data.get("like")); 104 | } 105 | } catch (Exception e) { 106 | log.info("没有like条件,现在为初始化页面时间"); 107 | } 108 | wrapper.eq("status", 1); 109 | Page userPage = new Page<>(current, size); 110 | IPage userIPage = visitorsMapper.selectPage(userPage, wrapper); 111 | Map map = new HashMap<>(); 112 | List list = userIPage.getRecords(); 113 | map.put("list", userIPage.getRecords()); 114 | map.put("pages", userIPage.getPages()); 115 | map.put("total", userIPage.getTotal()); 116 | return map; 117 | } 118 | 119 | @Override 120 | public boolean updateVisitor(Visitors visitors) { 121 | return visitorsMapper.updateById(visitors) > 0; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /home-ui/src/views/Guest/about.vue: -------------------------------------------------------------------------------- 1 | 81 | 82 | 122 | 123 | 132 | -------------------------------------------------------------------------------- /home-ui/src/views/User/visual.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 192 | 193 | 202 | -------------------------------------------------------------------------------- /src/main/java/com/example/nursinghomeapplication/controller/FileController.java: -------------------------------------------------------------------------------- 1 | package com.example.nursinghomeapplication.controller; 2 | 3 | import cn.hutool.core.io.FileUtil; 4 | import cn.hutool.core.util.IdUtil; 5 | import cn.hutool.core.util.StrUtil; 6 | import cn.hutool.json.JSON; 7 | import cn.hutool.json.JSONArray; 8 | import cn.hutool.json.JSONObject; 9 | import cn.hutool.poi.word.WordUtil; 10 | import com.example.nursinghomeapplication.entity.News; 11 | import com.example.nursinghomeapplication.util.JsonResult; 12 | import com.example.nursinghomeapplication.util.Result; 13 | import com.example.nursinghomeapplication.util.WordToHtml; 14 | import org.apache.poi.hwpf.extractor.WordExtractor; 15 | import org.apache.poi.ooxml.POIXMLDocument; 16 | import org.apache.poi.ooxml.extractor.POIXMLTextExtractor; 17 | import org.apache.poi.openxml4j.opc.OPCPackage; 18 | import org.apache.poi.xwpf.extractor.XWPFWordExtractor; 19 | import org.springframework.beans.factory.annotation.Value; 20 | import org.springframework.web.bind.annotation.*; 21 | import org.springframework.web.multipart.MultipartFile; 22 | 23 | import javax.servlet.http.HttpServletResponse; 24 | import java.io.FileInputStream; 25 | import java.io.IOException; 26 | import java.io.OutputStream; 27 | import java.net.URLEncoder; 28 | import java.util.HashMap; 29 | import java.util.List; 30 | 31 | @RestController 32 | @RequestMapping("/files") 33 | public class FileController extends BaseController { 34 | @Value("${server.port}") 35 | private String port; 36 | 37 | @Value("${user.ip}") 38 | private String ip; 39 | 40 | 41 | /** 42 | * 上传接口 43 | * 44 | * @param file 45 | * @return 46 | * @throws IOException 47 | */ 48 | @PostMapping("/upload") 49 | public Result upload(MultipartFile file) throws IOException { 50 | String originalFilename = file.getOriginalFilename(); // 获取源文件的名称 51 | // 定义文件的唯一标识(前缀) 52 | String flag = IdUtil.fastSimpleUUID(); 53 | String rootFilePath = System.getProperty("user.dir") + "/files/" + flag + "_" + originalFilename; // 获取上传的路径 54 | FileUtil.writeBytes(file.getBytes(), rootFilePath); // 把文件写入到上传的路径 55 | return Result.success(flag); // 返回结果 url 56 | } 57 | 58 | /** 59 | * 富文本文件上传接口 60 | * 61 | * @param file 62 | * @return 63 | * @throws IOException 64 | */ 65 | //file读取文件-->放入本地-->uuid--> 66 | @PostMapping("/editor/upload") 67 | public JSON editorUpload(MultipartFile file) throws IOException { 68 | String originalFilename = file.getOriginalFilename(); // 获取源文件的名称 69 | // 定义文件的唯一标识(前缀) 70 | String flag = IdUtil.fastSimpleUUID(); 71 | String rootFilePath = System.getProperty("user.dir") + "/files/" + flag + "_" + originalFilename; // 获取上传的路径 72 | FileUtil.writeBytes(file.getBytes(), rootFilePath); // 把文件写入到上传的路径 73 | String url = "http://" + ip + ":" + port + "/files/" + flag; 74 | JSONObject json = new JSONObject(); 75 | json.set("errno", 0); 76 | JSONArray arr = new JSONArray(); 77 | JSONObject data = new JSONObject(); 78 | arr.add(data); 79 | data.set("url", url); 80 | json.set("data", arr); 81 | return json; // 返回结果 url 82 | } 83 | 84 | /** 85 | * 下载接口 86 | * 87 | * @param flag 88 | * @param response 89 | */ 90 | @GetMapping("/{flag}") 91 | public void getFiles(@PathVariable String flag, HttpServletResponse response) { 92 | OutputStream os; // 新建一个输出流对象 93 | String basePath = System.getProperty("user.dir") + "/files/"; // 定于文件上传的根路径 94 | List fileNames = FileUtil.listFileNames(basePath); // 获取所有的文件名称 95 | String fileName = fileNames.stream().filter(name -> name.contains(flag)).findAny().orElse(""); // 找到跟参数一致的文件 96 | try { 97 | if (StrUtil.isNotEmpty(fileName)) { 98 | response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); 99 | response.setContentType("application/octet-stream"); 100 | byte[] bytes = FileUtil.readBytes(basePath + fileName); // 通过文件的路径读取文件字节流 101 | os = response.getOutputStream(); // 通过输出流返回文件 102 | os.write(bytes); 103 | os.flush(); 104 | os.close(); 105 | } 106 | } catch (Exception e) { 107 | System.out.println("文件下载失败"); 108 | } 109 | } 110 | 111 | //获取word文档 112 | @PostMapping("/word/{flag}") 113 | public JsonResult getWord(@PathVariable String flag) { 114 | String basePath = System.getProperty("user.dir") + "/files/"; // 定于文件上传的根路径 115 | List fileNames = FileUtil.listFileNames(basePath); // 获取所有的文件名称 116 | String fileName = fileNames.stream().filter(name -> name.contains(flag)).findAny().orElse(""); 117 | String buffer= ""; 118 | try { 119 | if (StrUtil.isNotEmpty(fileName)) { 120 | if (fileName.endsWith(".doc")) { 121 | FileInputStream is = new FileInputStream(basePath+ fileName); 122 | WordExtractor ex = new WordExtractor(is); 123 | buffer = ex.getText(); 124 | is.close(); 125 | } else if (fileName.endsWith("docx")) { 126 | OPCPackage opcPackage = POIXMLDocument.openPackage(basePath+ fileName); 127 | POIXMLTextExtractor extractor = new XWPFWordExtractor(opcPackage); 128 | buffer = extractor.getText(); 129 | opcPackage.close(); 130 | }else if( fileName.endsWith("text")){ 131 | 132 | } 133 | else { 134 | return new JsonResult(500,"⽂件不是word⽂件"); 135 | } 136 | HashMap result = new HashMap<>(); 137 | result.put("body", new WordToHtml().wordToHtml(buffer)); 138 | return new JsonResult(OK,result); 139 | } 140 | } catch (Exception e) { 141 | System.err.println("文件下载失败"); 142 | } 143 | return null; 144 | } 145 | 146 | } 147 | -------------------------------------------------------------------------------- /home-ui/src/router/index.js: -------------------------------------------------------------------------------- 1 | import {createRouter, createWebHistory} from 'vue-router' 2 | import UserLayout from "../layout/UserLayout.vue"; 3 | import UserBxApply from "../views/User/BX/Apply"; 4 | import UserBxQuery from "../views/User/BX/Query"; 5 | import login from "../views/User/login"; 6 | import AdminLayout from "@/layout/AdminLayout"; 7 | import GuestLayout from "@/layout/GuestLayout"; 8 | 9 | const routes = [ 10 | { 11 | path: '/generateCodevVisitors', 12 | name: 'generateCodevVisitors', 13 | component: () => import("@/views/Guest/generateCodevVisitors"), 14 | }, 15 | { 16 | path: '/guest', 17 | name: 'guest', 18 | component: GuestLayout, 19 | redirect: "/guest/index", 20 | children: [ 21 | { 22 | path: '/guest/index', 23 | name: 'guestIndex', 24 | component: () => import("@/views/Guest/index"), 25 | }, 26 | { 27 | path: 'release', 28 | name: 'release', 29 | component: () => import("@/views/Guest/release"), 30 | }, 31 | { 32 | path: 'learn', 33 | name: 'learn', 34 | component: () => import("@/views/Guest/learn"), 35 | }, 36 | { 37 | path: 'examination', 38 | name: 'examination', 39 | component: () => import("@/views/Guest/examination"), 40 | }, 41 | { 42 | path: 'about', 43 | name: 'about', 44 | component: () => import("@/views/Guest/about"), 45 | }, 46 | { 47 | path: 'learnonline', 48 | name: 'learnonline', 49 | component: () => import("@/views/Guest/learnonline"), 50 | }, 51 | { 52 | path: 'news', 53 | name: 'indexNews', 54 | component: () => import("@/views/Guest/news"), 55 | }, 56 | { 57 | path: '/ContactUs', 58 | name: 'ContactUs', 59 | component: () => import("@/views/Guest/ContactUs") 60 | } 61 | ] 62 | }, 63 | { 64 | path: '/', 65 | name: 'home', 66 | component: UserLayout, 67 | }, 68 | { 69 | path: '/User/Login', 70 | name: 'Login', 71 | component: login, 72 | }, 73 | // { 74 | // path: '/admin', 75 | // name: 'admin', 76 | // component: AdminLayout 77 | // } 78 | { 79 | path: '/admin', 80 | name: 'AdminLayout', 81 | component: AdminLayout, 82 | redirect: "/admin/index", 83 | children: [ 84 | { 85 | path: '/admin/index', 86 | name: 'index', 87 | component: () => import("@/views/Admin/index") 88 | }, 89 | { 90 | path: '/admin/usermanagement', 91 | name: 'usermanagement', 92 | component: () => import("@/views/Admin/usermanagement") 93 | }, 94 | { 95 | path: '/admin/bxManage', 96 | name: 'bxManage', 97 | component: () => import("@/views/Admin/bxManage") 98 | }, 99 | { 100 | path: '/admin/leave', 101 | name: 'leave', 102 | component: () => import("@/views/Admin/leave") 103 | }, 104 | { 105 | path: '/admin/visitor', 106 | name: 'visitor', 107 | component: () => import("@/views/Admin/visitor") 108 | }, 109 | { 110 | path: '/admin/kehu/index', 111 | name: 'kehu', 112 | component: () => import("@/views/Admin/kehu/index") 113 | }, 114 | { 115 | path: '/admin/news/index', 116 | name: 'news', 117 | component: () => import("@/views/Admin/news/index") 118 | }, 119 | { 120 | path: '/admin/news/management', 121 | name: 'management', 122 | component: () => import("@/views/Admin/news/management") 123 | }, 124 | { 125 | path: '/admin/news/IndexIntroduce', 126 | name: 'IndexIntroduce', 127 | component: () => import("@/views/Admin/news/IndexIntroduce") 128 | }, 129 | { 130 | path: '/admin/monitor/index', 131 | name: 'monitor', 132 | component: () => import("@/views/Admin/monitor/index.vue") 133 | }, 134 | { 135 | path: '/admin/health/index', 136 | name: 'health', 137 | component: () => import("@/views/Admin/health/index.vue") 138 | }, 139 | { 140 | path: '/admin/setting/index', 141 | name: 'setting', 142 | component: () => import("@/views/Admin/setting/index.vue") 143 | }, 144 | { 145 | path: '/admin/online/index', 146 | name: 'online', 147 | component: () => import("@/views/Admin/online/index.vue") 148 | }, 149 | { 150 | path: '/admin/FoodAndMedicine/foodManagement', 151 | name: 'foodManagement', 152 | component: () => import("@/views/Admin/FoodAndMedicine/foodManagement.vue") 153 | }, 154 | { 155 | path: '/admin/FoodAndMedicine/medlicineManagement', 156 | name: 'medlicineManagement', 157 | component: () => import("@/views/Admin/FoodAndMedicine/medlicineManagement.vue") 158 | }, 159 | { 160 | path: '/admin/MessageManagement', 161 | name: 'MessageManagement', 162 | component: () => import("@/views/Admin/MessageManagement.vue") 163 | } 164 | ] 165 | }, 166 | ] 167 | 168 | const router = createRouter({ 169 | history: createWebHistory(process.env.BASE_URL), 170 | routes 171 | }) 172 | 173 | export default router 174 | --------------------------------------------------------------------------------