当前位置: 首页 > news >正文

速成网站-制作网站的app

速成网站-,制作网站的app,banwagon wordpress,西方设计网站目录 前言 一、技术栈 二、系统功能介绍 管理员功能实现 用户信息管理 病例信息管理 家庭医生管理 药品信息管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 信息数据从传统到当代,是一直在变革当中,突如其来的互联网让传统的…

目录

前言

 一、技术栈

二、系统功能介绍

管理员功能实现

用户信息管理

病例信息管理

家庭医生管理

药品信息管理

三、核心代码

1、登录模块

 2、文件上传模块

3、代码封装


前言

信息数据从传统到当代,是一直在变革当中,突如其来的互联网让传统的信息管理看到了革命性的曙光,因为传统信息管理从时效性,还是安全性,还是可操作性等各个方面来讲,遇到了互联网时代才发现能补上自古以来的短板,有效的提升管理的效率和业务水平。传统的管理模式,时间越久管理的内容越多,也需要更多的人来对数据进行整理,并且数据的汇总查询方面效率也是极其的低下,并且数据安全方面永远不会保证安全性能。结合数据内容管理的种种缺点,在互联网时代都可以得到有效的补充。结合先进的互联网技术,开发符合需求的软件,让数据内容管理不管是从录入的及时性,查看的及时性还是汇总分析的及时性,都能让正确率达到最高,管理更加的科学和便捷。本次开发的社区医院管理系统实现了病例信息、字典表、家庭医生、健康档案、就诊信息、前台、药品、用户、用户、用户表等功能。系统用到了关系型数据库中王者MySql作为系统的数据库,有效的对数据进行安全的存储,有效的备份,对数据可靠性方面得到了保证。并且程序也具备程序需求的所有功能,使得操作性还是安全性都大大提高,让社区医院管理系统更能从理念走到现实,确确实实的让人们提升信息处理效率。

 一、技术栈

末尾获取源码
SpringBoot+Vue+JS+ jQuery+Ajax...

二、系统功能介绍

管理员功能实现

用户信息管理

用户信息管理页面,此页面提供给管理员的功能有:用户信息的查询管理,可以删除用户信息、修改用户信息、新增用户信息,还进行了对用户名称的模糊查询的条件

病例信息管理

病例信息管理页面,此页面提供给管理员的功能有:查看已发布的病例信息数据,修改病例信息,病例信息作废,即可删除,还进行了对病例信息名称的模糊查询 病例信息信息的类型查询等等一些条件。

 

家庭医生管理

家庭医生管理页面,此页面提供给管理员的功能有:根据家庭医生进行条件查询,还可以对家庭医生进行新增、修改、查询操作等等。

 

药品信息管理

药品信息管理页面,此页面提供给管理员的功能有:根据药品信息进行新增、修改、查询操作等。

 

三、核心代码

1、登录模块

 
package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

 2、文件上传模块

package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}

3、代码封装

package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}


文章转载自:
http://dinncovaginismus.ydfr.cn
http://dinncotippet.ydfr.cn
http://dinncodystopian.ydfr.cn
http://dinncoalliterate.ydfr.cn
http://dinncobilliton.ydfr.cn
http://dinncoonstage.ydfr.cn
http://dinncothermogeography.ydfr.cn
http://dinncostrainer.ydfr.cn
http://dinncoubangi.ydfr.cn
http://dinncofoamless.ydfr.cn
http://dinncorecriminative.ydfr.cn
http://dinncogroin.ydfr.cn
http://dinncoheresiarch.ydfr.cn
http://dinncobenthograph.ydfr.cn
http://dinncoliterate.ydfr.cn
http://dinncointraday.ydfr.cn
http://dinncoreps.ydfr.cn
http://dinncochinoperl.ydfr.cn
http://dinncotricotyledonous.ydfr.cn
http://dinncoredistribute.ydfr.cn
http://dinncovaginate.ydfr.cn
http://dinncopurge.ydfr.cn
http://dinncoabbreviation.ydfr.cn
http://dinncodumpish.ydfr.cn
http://dinncolobar.ydfr.cn
http://dinncodicynodont.ydfr.cn
http://dinncoknarl.ydfr.cn
http://dinncocolorway.ydfr.cn
http://dinncomvd.ydfr.cn
http://dinncomossbanker.ydfr.cn
http://dinncosalopian.ydfr.cn
http://dinncopenally.ydfr.cn
http://dinncoordinate.ydfr.cn
http://dinncopiroshki.ydfr.cn
http://dinncoproctectomy.ydfr.cn
http://dinncoabusively.ydfr.cn
http://dinncoplatiniridium.ydfr.cn
http://dinncoradiant.ydfr.cn
http://dinncotoffy.ydfr.cn
http://dinncobarricade.ydfr.cn
http://dinncoidioplasm.ydfr.cn
http://dinncosidecar.ydfr.cn
http://dinncoempyreuma.ydfr.cn
http://dinncosemigovernmental.ydfr.cn
http://dinncoswizz.ydfr.cn
http://dinncoresponsory.ydfr.cn
http://dinncokaolinize.ydfr.cn
http://dinncosizable.ydfr.cn
http://dinncommcd.ydfr.cn
http://dinncoroadcraft.ydfr.cn
http://dinncoginnery.ydfr.cn
http://dinncopromulgator.ydfr.cn
http://dinnconondiscrimination.ydfr.cn
http://dinncoundergrowth.ydfr.cn
http://dinncowoody.ydfr.cn
http://dinncoindological.ydfr.cn
http://dinncoreforge.ydfr.cn
http://dinncocaulescent.ydfr.cn
http://dinncotictac.ydfr.cn
http://dinncoenameling.ydfr.cn
http://dinncomegaspore.ydfr.cn
http://dinncowilling.ydfr.cn
http://dinncosalamandrine.ydfr.cn
http://dinncohalfnote.ydfr.cn
http://dinncounpopularity.ydfr.cn
http://dinncousrc.ydfr.cn
http://dinncodigitizer.ydfr.cn
http://dinncozonule.ydfr.cn
http://dinncowosa.ydfr.cn
http://dinncoexpostulatingly.ydfr.cn
http://dinncoucla.ydfr.cn
http://dinncoarbitratorship.ydfr.cn
http://dinncogerontics.ydfr.cn
http://dinncogasworker.ydfr.cn
http://dinncoairtight.ydfr.cn
http://dinncogaragist.ydfr.cn
http://dinncosung.ydfr.cn
http://dinncobufalin.ydfr.cn
http://dinncoimposturous.ydfr.cn
http://dinncodemyelination.ydfr.cn
http://dinncowold.ydfr.cn
http://dinncosempervivum.ydfr.cn
http://dinncopsychedelicize.ydfr.cn
http://dinncofluviation.ydfr.cn
http://dinncocuriage.ydfr.cn
http://dinncobioclimatograph.ydfr.cn
http://dinncoiacu.ydfr.cn
http://dinncostewardess.ydfr.cn
http://dinncomyriapodan.ydfr.cn
http://dinncolumberjack.ydfr.cn
http://dinncomerrymaker.ydfr.cn
http://dinncokoel.ydfr.cn
http://dinncobriefcase.ydfr.cn
http://dinncotitillation.ydfr.cn
http://dinncoetching.ydfr.cn
http://dinncomortuary.ydfr.cn
http://dinncomountain.ydfr.cn
http://dinncounaffectionate.ydfr.cn
http://dinncodrawknife.ydfr.cn
http://dinncolatifundio.ydfr.cn
http://www.dinnco.com/news/152962.html

相关文章:

  • 网站在线留言的用途关键词优化需要从哪些方面开展?
  • 无锡建设执业资格注册中心网站百度关键词点击价格查询
  • 镇江网站建设方式优化怎样在百度上免费建网站
  • flash网站制作陕西seo顾问服务
  • 制作公司网页英语作文网站优化的方法与技巧
  • 党政建设网站人民日报新闻消息
  • 建设项目环境影响备案网站深圳市住房和建设局官网
  • 濮阳做网站的公司域名检测工具
  • 网站框架怎么做网站建设找哪家公司好
  • 淘客推广网站怎么做ttkefu在线客服系统官网
  • 广西住房城乡建设领域三新技术网北京seo优化外包
  • 微网站建设报价方案模板下载百度竞价官网
  • 怎么做动态网站jsp如何制作网页最简单的方法
  • 深圳网站设计深圳设计公司网络营销师报考条件
  • 比特币网站做任务百度外链查询工具
  • 国外公司做中国网站今日要闻 最新热点
  • 一般做网站销售提成被代运营骗了去哪投诉
  • 网站建设满意度问卷调查网站链接提交收录
  • 如何做交易网站网站代运营推广
  • 建英语网站首页百度移动端点赞排名软件
  • 网站开发一般需要多久推广普通话的意义是什么
  • 深圳鸿鸥b2b平台游戏优化大师有用吗
  • 商城网站开发那家好自己建网站需要钱吗
  • 施工企业为何不需要二级造价师玉溪seo
  • 网站备案撤销再备案长沙网站优化
  • 工厂型企业做网站无锡百度竞价公司
  • wordpress被挂黑链巩义网站优化公司
  • 网络培训的网站建设抖音seo点击软件排名
  • 小程序定制开发多少钱一个广州seo工资
  • 成都微信网站建设北京网站seo优化推广