Advertisement

Java SSM毕业项目实战-养老服务管理系统

阅读量:

主要技术实现: 文末源码联系

以下是对原文的同义改写

以下是对原文的同义改写

视频演示:

Java毕业设计SSM养老服务管理系统

主要模块设计:

管理员功能:

  1. 用户管理:针对登录系统的用户的各项信息(包括账号、密码等),实施增删改查操作;
  2. 角色管理:对登录系统的相关角色信息实施增删改操作;
  3. 查询统计:针对老人的信息数据及来访人员信息数据实施增删改查操作;针对出入登记数据实施增删查操作;
  4. 数据备份:将 PgSQL 数据库中的数据归档至指定磁盘。

普通用户功能:

老人信息管理:包括记录老人的基本信息如添加修改删除等操作;
基本健康信息:用于存储老人的基本健康数据;
老人健康档案:主要负责存储详细健康数据同时也会存入数据库;
老人的入住登记:每位入住养老院的老人都需要填写入住申请表并提供相关身份证明;
外出登记:对于外出人员需进行详细的记录包括随行人员及具体的外出时间和返回时间;
退住登记:当决定不再居住于养老院时需按照规定流程办理退住手续;
接待管理: incoming visitors 需要进行预约并完成一系列接待程序;
查看附近的医院:系统会自动调用地图并显示附近所有医院的位置及服务内容。

人事功能:

  1. 员工信息管理主要涉及增删改查四项基本操作;
  2. 在发生人员调动时(即将某人从一个部门调往另一个部门),相关部门需做好人员调动记录;
  3. 对于养老院的员工来说,请假必须经过审批流程方可生效;
  4. 当某位养老院工作人员决定离职时(即离开单位), HR部门需及时完成其个人资料档案存档工作。

系统主要实现如下:

用户登录,输入账号密码进行登录

管理员界面:目前系统功能如下

普通用户界面如下

人事管理界面

部分代码如下

复制代码
 <!DOCTYPE html>

    
 <html>
    
 <head>
    
     <meta charset="utf-8">
    
     <title>加载天地图</title>
    
     <link rel="stylesheet" type="text/css" href="css/ol.css"/>
    
     <script src="js/ol.js" type="text/javascript" charset="utf-8"></script>
    
     <script src="js/jquery-3.2.1.min.js" type="text/javascript"
    
         charset="utf-8"></script>
    
     <!-- 引入bootstrap框架 -->
    
     <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
    
     <script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    
     <style type="text/css">
    
     body, html, div, li, iframe, p, img {
    
         border: none;
    
         padding: 0;
    
         margin: 0;
    
     }
    
  
    
     #top {
    
         width: 100%;
    
         height: 30px;
    
         padding: 5px 0px;
    
         font-size: 14px;
    
         font-family: "微软雅黑";
    
         left: 10px;
    
         /* background-color: red; */
    
     }
    
  
    
     #map {
    
         width: 100%;
    
         height: 600px;
    
         /* background-color: pink; */
    
         position: relative;
    
     }
    
  
    
     #menu {
    
         float: left;
    
         position: absolute;
    
         bottom: 10px;
    
         z-index: 2000;
    
     }
    
  
    
     .tooltip-inner {
    
         white-space: nowrap;
    
     }
    
  
    
     #mouse-position {
    
         color: Red;
    
         float: right;
    
         font-size: 16px;
    
         font-family: "微软雅黑";
    
         margin: 0px 15px;
    
     }
    
  
    
     .ol-popup {
    
         position: absolute;
    
         background-color: white;
    
         -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
    
         filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
    
         padding: 15px;
    
         border-radius: 10px;
    
         border: 1px solid #cccccc;
    
         bottom: 12px;
    
         left: -50px;
    
     }
    
  
    
     .ol-popup:after, .ol-popup:before {
    
         top: 100%;
    
         border: solid transparent;
    
         content: " ";
    
         height: 0;
    
         width: 0;
    
         position: absolute;
    
         pointer-events: none;
    
     }
    
  
    
     .ol-popup:after {
    
         border-top-color: white;
    
         border-width: 10px;
    
         left: 48px;
    
         margin-left: -10px;
    
     }
    
  
    
     .ol-popup:before {
    
         border-top-color: #cccccc;
    
         border-width: 11px;
    
         left: 48px;
    
         margin-left: -11px;
    
     }
    
  
    
     .ol-popup-closer {
    
         text-decoration: none;
    
         position: absolute;
    
         top: 2px;
    
         right: 8px;
    
     }
    
  
    
     .ol-popup-closer:after {
    
         content: "✖";
    
     }
    
  
    
     #popup-content {
    
         font-size: 14px;
    
         font-family: "微软雅黑";
    
     }
    
  
    
     #popup-content .markerInfo {
    
         font-weight: bold;
    
     }
    
     </style>
    
 </head>
    
 <body>
    
 <div id="top">
    
     <div id="mouse-position" class="custom-mouse-position"></div>
    
 </div>
    
 <div id="map">
    
     <!-- Popup -->
    
     <div id="popup" class="ol-popup" style="z-index: 9999;">
    
     <a href="#" id="popup-closer" class="ol-popup-closer"></a>
    
     <div id="popup-content"></div>
    
     </div>
    
     <div id="menu">
    
     <button id="zoom-out">单击缩小</button>
    
     <button id="zoom-in">单击放大</button>
    
     <button id="panto">平移到【郑州】</button>
    
     <button id="restore">复位【养老院】</button>
    
     <button id="guiji">到最近的医院路线</button>
    
     </div>
    
 </div>
    
  
    
 <script type="text/javascript">
    
     //天地图路网
    
     var tian_di_tu_road_layer = new ol.layer.Tile(
    
     {
    
         title: "天地图路网",
    
         source: new ol.source.XYZ(
    
             {
    
                 //全球矢量地图服务(经纬度)
    
                 url: "http://t4.tianditu.com/DataServer?T=vec_c&x={x}&y={y}&l={z}&tk=dc81010625c37967fc20c78a9bb54eea",
    
                 //url:"http://t7.tianditu.com/vec_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=dc81010625c37967fc20c78a9bb54eea"
    
             })
    
     });
    
  
    
     //天地图注记
    
     var tian_di_tu_annotation = new ol.layer.Tile({
    
     title: "天地图文字标注",
    
     source: new ol.source.XYZ({
    
         //全球矢量注记服务(经纬度)
    
         url: 'http://t3.tianditu.com/DataServer?T=cva_c&x={x}&y={y}&l={z}&tk=dc81010625c37967fc20c78a9bb54eea',
    
         //url:"http://t7.tianditu.com/cva_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=dc81010625c37967fc20c78a9bb54eea"
    
     })
    
     });
    
  
    
     //天地图卫星影像
    
     var tian_di_tu_satellite_layer = new ol.layer.Tile({
    
     title: "天地图卫星影像",
    
     source: new ol.source.XYZ({
    
         url: 'http://t3.tianditu.com/DataServer?T=img_c&x={x}&y={y}&l={z}&tk=dc81010625c37967fc20c78a9bb54eea'
    
  
    
     })
    
     });
    
  
    
  
    
     var map = new ol.Map({
    
     target: 'map', //地图标签id
    
     layers: [tian_di_tu_satellite_layer, tian_di_tu_annotation],
    
     view: new ol.View({
    
         projection: ol.proj.get('EPSG:3857'),
    
         center: [12650371.1770, 13900298.1274], //地图中心点位置*/
    
         /*center: [113.6400, 77.0927],*/
    
         //center: old_home,
    
         zoom: 13, //地图初始显示级别
    
         minZoom: 1, //最小级别
    
         maxZoom: 18, //最大级别
    
         //rotation: Math.PI / 6 //设置旋转角度
    
     })
    
     });
    
  
    
  
    
     //为map添加鼠标移动事件监听,当指向标注时改变鼠标光标状态
    
     map.on('pointermove', function (e) {
    
     var pixel = map.getEventPixel(e.originalEvent);
    
     var hit = map.hasFeatureAtPixel(pixel);
    
     map.getTargetElement().style.cursor = hit ? 'pointer' : '';
    
     });
    
  
    
     //地图视图的初始参数
    
     var view = map.getView();
    
     var zoom = view.getZoom();
    
     var center = view.getCenter();
    
     var rotation = view.getRotation();
    
  
    
     //单击缩小按钮功能
    
     document.getElementById("zoom-out").onclick = function () {
    
     var view = map.getView(); //获取地图视图
    
     var zoom = view.getZoom(); //获取当前缩放级数
    
     view.setZoom(zoom - 1); //地图缩小一级
    
     };
    
     //单击放大按钮功能
    
     document.getElementById('zoom-in').onclick = function () {
    
     var view = map.getView(); //获取地图视图
    
     var zoom = view.getZoom(); //获得当前缩放级数
    
     view.setZoom(zoom + 1); //地图放大一级
    
     };
    
     //平移功能
    
     document.getElementById('panto').onclick = function () {
    
     var view = map.getView(); //获取地图视图
    
     var zz = [12650343.4100, 13900117.3550]
    
    /* var zz = [113.6288452, 77.0668022]*/
    
     view.setCenter(zz); //平移地图
    
     };
    
     //复位功能(复位到初始状态)
    
     document.getElementById('restore').onclick = function () {
    
     view.setCenter(center); //初始中心点
    
     view.setRotation(rotation); //初始旋转角度
    
     view.setZoom(zoom); //初始缩放级数
    
     };
    
  
    
     //为内置的缩放控件与旋转控件添加tooltip提示信息
    
     $('.ol-zoom-in, .ol-zoom-out').tooltip({
    
     placement: 'right' //tooltip在右侧显示
    
     });
    
     $('.ol-rotate-reset, .ol-attribution button[title]').tooltip({
    
     placement: 'left' //tooltip在左侧显示
    
     });
    
  
    
     //添加坐标
    
     var mousePositionControl = new ol.control.MousePosition({
    
     coordinateFormat: ol.coordinate.createStringXY(7),
    
     projection: 'EPSG:4326',
    
     //projection: 'EPSG:3857',
    
     className: 'custom-mouse-position',
    
     target: document.getElementById('mouse-position'),
    
     undefinedHTML: '&nbsp;'
    
     });
    
  
    
     map.addControl(mousePositionControl);
    
  
    
     var oldhome = ol.proj.fromLonLat([113.6400, 77.0927]);
    
  
    
     //标注点的信息对象
    
     var featuerInfo = {
    
     //地理位置
    
     geo: oldhome,
    
     //属性信息
    
     att: {
    
         //标题
    
         title: "ZZNU养老院", //标注信息的标题内容
    
         //超链接
    
         titleURL: "http://www.zznu.edu.cn/", //标注详细信息链接
    
         //文本内容
    
         text: "惠济区ZZNU养老院是一个医养护结合的养老院,我院本着“以人为本、孝行...", //标注内容简介
    
         //图像地址
    
         imgURL: "./images/oldhome.jpg" //标注的图片
    
     }
    
     }
    
  
    
     //创建标签样式
    
     var createLabelStyle = function (feature) {
    
     //返回一个样式
    
     return new ol.style.Style({
    
         //点的样式
    
         image: new ol.style.Icon(({
    
             //标注图片和文字之间的距离
    
             anchor: [0.5, 60],
    
             //标注样式的起点位置
    
             anchorOrigin: 'top-right',
    
             //X方向单位
    
             anchorXUnits: 'fraction',
    
             //Y方向单位
    
             anchorYUnits: 'pixels',
    
             //偏移起点位置的方向
    
             offsetOrigin: 'top-right',
    
             //透明度
    
             opacity: 0.75,
    
             //图标的url
    
             src: './images/blueIcon.png'
    
         })),
    
         //文本样式
    
         text: new ol.style.Text({
    
             //对其方式
    
             textAlign: 'center',
    
             //基准线
    
             textBaseline: 'middle',
    
             //文字样式
    
             font: 'normal 14px 微软雅黑',
    
             //文本内容
    
             text: feature.get('name'),
    
             //文本填充样式
    
             fill: new ol.style.Fill({
    
                 color: '#aa3300'
    
             }),
    
             //笔触
    
             stroke: new ol.style.Stroke({
    
                 color: '#ffcc33',
    
                 width: 2
    
             })
    
         })
    
     });
    
     }
    
  
    
     var createLabelStyle2 = function (feature) {
    
     //返回一个样式
    
     return new ol.style.Style({
    
         //点的样式
    
         image: new ol.style.Icon(({
    
             //标注图片和文字之间的距离
    
             anchor: [0.5, 60],
    
             //标注样式的起点位置
    
             anchorOrigin: 'top-right',
    
             //X方向单位
    
             anchorXUnits: 'fraction',
    
             //Y方向单位
    
             anchorYUnits: 'pixels',
    
             //偏移起点位置的方向
    
             offsetOrigin: 'top-right',
    
             //透明度
    
             opacity: 0.75,
    
             //图标的url
    
             src: './images/icon.png'
    
         })),
    
         //文本样式
    
         text: new ol.style.Text({
    
             //对其方式
    
             textAlign: 'center',
    
             //基准线
    
             textBaseline: 'middle',
    
             //文字样式
    
             font: 'normal 14px 微软雅黑',
    
             //文本内容
    
             text: feature.get('name'),
    
             //文本填充样式
    
             fill: new ol.style.Fill({
    
                 color: '#aa3300'
    
             }),
    
             //笔触
    
             stroke: new ol.style.Stroke({
    
                 color: '#ffcc33',
    
                 width: 2
    
             })
    
         })
    
     });
    
     }
    
  
    
     //实例化Vector要素,通过矢量图层添加到地图容器中
    
     var iconFeature = new ol.Feature({
    
     //几何样式
    
     geometry: new ol.geom.Point(oldhome),
    
     //名称属性
    
     name: 'zznu养老院', //名称属性
    
     //人口属性
    
     population: 1588
    
     //大概多少人
    
     });
    
     iconFeature.setStyle(createLabelStyle2(iconFeature));
    
  
    
     //矢量标注的数据源
    
     var vectorSource = new ol.source.Vector({
    
     features: [iconFeature]
    
     });
    
  
    
     //矢量标注图层
    
     var vectorLayer = new ol.layer.Vector({
    
     source: vectorSource
    
     });
    
  
    
     map.addLayer(vectorLayer);
    
  
    
     $.post("hospital/FindAllHospitalController.do", function (data) {
    
     for (var i = 0; i < data.length; i++) {
    
         var obj = data[i];
    
         var longitude = obj.longitude;
    
         var latitude = obj.latitude;
    
         var hospitalname = obj.hospitalname;
    
         //实例化Vector要素,通过矢量图层添加到地图容器中
    
         var iconFeature2 = new ol.Feature({
    
             geometry: new ol.geom.Point(ol.proj.fromLonLat([
    
                 longitude, latitude])),
    
             name: hospitalname,//名称属性
    
         });
    
         iconFeature2.setStyle(createLabelStyle(iconFeature2));
    
         //矢量标注的数据源
    
         vectorSource.addFeature(iconFeature2)
    
     }
    
     });
    
  
    
  
    
  
    
     //获取id为popup的div标签
    
     var container = document.getElementById('popup');
    
     //获取id为popup-content的div标签
    
     var content = document.getElementById('popup-content');
    
     //获取id为popup-closer的a标签
    
     var closer = document.getElementById('popup-closer');
    
  
    
     //在地图容器中创建一个Overlay
    
     var popup = new ol.Overlay(({
    
     //元素内容
    
     element: container,
    
     autoPan: true,
    
     positioning: 'bottom-center',
    
     //事件传播到地图视点的时候是否应该停止
    
     stopEvent: false,
    
     autoPanAnimation: {
    
         //动画持续时间
    
         duration: 250
    
     }
    
     }));
    
     //将覆盖层添加到map中
    
     map.addOverlay(popup);
    
  
    
     //添加关闭按钮的单击事件(隐藏popup)
    
     closer.onclick = function () {
    
     popup.setPosition(undefined); //未定义popup位置
    
     closer.blur(); //失去焦点
    
     return false;
    
     };
    
  
    
     //动态创建popup的具体内容
    
     function addFeatrueInfo(info) {
    
     //创建一个a标签元素
    
     var elementA = document.createElement('a');
    
     //设置a标签的样式类
    
     elementA.className = 'markerInfo';
    
     //设置a标签的超链接地址
    
     elementA.href = info.att.titleURL;
    
     //设置a标签的文本内容
    
     setInnerText(elementA, info.att.title);
    
     //将a标签元素添加到内容div标签中
    
     content.appendChild(elementA);
    
  
    
     //创建一个div标签元素
    
     var elementDiv = document.createElement('div');
    
     //设置div标签的内容
    
     setInnerText(elementDiv, info.att.text);
    
     //将div标签加入到内容div标签中
    
     content.appendChild(elementDiv);
    
  
    
     //创建一个图像标签
    
     var elementImg = document.createElement('img');
    
     //指定图像标签的URL
    
     elementImg.className = "markerImg";
    
     elementImg.src = info.att.imgURL;
    
     //将img标签加入到内容div标签中
    
     content.appendChild(elementImg);
    
     };
    
  
    
     //设置文本函数
    
     function setInnerText(element, text) {
    
     if (typeof element.textContent == 'string') {
    
         element.textContent = text;
    
     } else {
    
         element.innerText = text;
    
     }
    
     };
    
  
    
     map.on('click', function (evt) {
    
     var coordinate = evt.coordinate; //获取坐标
    
     var coordinate4326 = ol.proj.transform(coordinate, 'EPSG:3857',
    
         'EPSG:4326');
    
     var longitude = coordinate4326[0];
    
     var latitude = coordinate4326[1];
    
     var location = longitude + "," + latitude;
    
     //判断当前单击处是否有要素,捕获到要素时弹出popup
    
     var feature = map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
    
         return feature;
    
     });
    
     if (feature) {
    
         $.post("hospital/FindHimIntroController.do", {
    
             location: location
    
         }, function (data) {
    
  
    
             var introduction = data[0].introduction;
    
             var hospitalname = data[0].hospitalname;
    
             featuerInfo.att.text = introduction;//正文
    
             featuerInfo.att.title = hospitalname;//标题
    
  
    
             content.innerHTML = ''; //清空popup的内容容器
    
             addFeatrueInfo(featuerInfo); //在popup中加载当前要素的具体信息
    
             if (popup.getPosition() == undefined) {
    
                 popup.setPosition(coordinate); //设置popup的位置
    
             }
    
         });
    
     }
    
     });
    
  
    
     map.on('click', function(evt) {
    
     var coordinate = evt.coordinate;
    
     //判断当前单击处是否有要素,捕获到要素时弹出popup
    
     var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
    
         return feature;
    
     });
    
     if (feature) {
    
         content.innerHTML = ''; //清空popup的内容容器
    
         addFeatrueInfo(featuerInfo); //在popup中加载当前要素的具体信息
    
         if (popup.getPosition() == undefined) {
    
             popup.setPosition(coordinate); //设置popup的位置
    
         }
    
     }
    
     });
    
  
    
     map.on('pointermove', function (e) {
    
     //获取map的像素位置信息
    
     var pixel = map.getEventPixel(e.originalEvent);
    
     //map视口中是否包含某个要素
    
     var hit = map.hasFeatureAtPixel(pixel);
    
     //设置符合当前条件的鼠标样式
    
     map.getTargetElement().style.cursor = hit ? 'pointer' : '';
    
     });
    
 </script>
    
 </body>
    
 </html>
    
    
    
    
    代码解读

源码获取:

联系微信 DQ408040418

扫码获取源码

全部评论 (0)

还没有任何评论哟~