基于B/S架构的医院信息管理系统(免费获取源码+项目介绍+运行介绍+运行截图+论文)

技术架构

后端:SpringBoot+SpringMVC+Mybatis-plus

前端:Vue+elemenet-ui+HTML+js+css+jquery+webpack

数据库:MySQL

功能模块

  • 用户登录

  • 医生管理

  • 预约管理

  • 管理员管理

  • 患者管理

  • 科室管理

  • 药品管理

代码展示:

public ReturnMsg login(@RequestBody AdminDTO adminDTO) {
        if (adminDTO.getType() == 1) {
            Assert.isTrue(StrUtil.isNotEmpty(adminDTO.getUserName())
                    && StrUtil.isNotEmpty(adminDTO.getPassWord()), "账号或密码不能为空!");
            LambdaQueryWrapper<AdminDTO> queryWrapper = Wrappers.lambdaQuery();
            queryWrapper.eq(AdminDTO::getUserName, adminDTO.getUserName()).
                    eq(AdminDTO::getPassWord, adminDTO.getPassWord()).last(BaseConstant.LIMIT_ONE);
            AdminDTO loginUser = adminService.getOne(queryWrapper);
            Assert.notNull(loginUser, "账号或密码错误!");
            loginUser.setType(1);
            return ReturnMsg.ok(loginUser);
        }
        if (adminDTO.getType() == 2) {
            Assert.isTrue(StrUtil.isNotEmpty(adminDTO.getUserName())
                    && StrUtil.isNotEmpty(adminDTO.getPassWord()), "账号或密码不能为空!");
            LambdaQueryWrapper<DoctorDTO> queryWrapper = Wrappers.lambdaQuery();
            queryWrapper.eq(DoctorDTO::getUserName, adminDTO.getUserName()).
                    eq(DoctorDTO::getPassWord, adminDTO.getPassWord()).last(BaseConstant.LIMIT_ONE);
            DoctorDTO loginUser = doctorService.getOne(queryWrapper);
            Assert.notNull(loginUser, "账号或密码错误!");
            loginUser.setType(2);
            return ReturnMsg.ok(loginUser);
        }
        if (adminDTO.getType() == 3) {
            Assert.isTrue(StrUtil.isNotEmpty(adminDTO.getUserName()), "联系方式不能为空!");
            LambdaQueryWrapper<SickInfoDTO> queryWrapper = Wrappers.lambdaQuery();
            queryWrapper.eq(SickInfoDTO::getFamilyTel, adminDTO.getUserName()).last(BaseConstant.LIMIT_ONE);
            SickInfoDTO loginUser = sickInfoService.getOne(queryWrapper);
            if (loginUser == null) {
                loginUser = new SickInfoDTO();
                loginUser.setFamilyTel(adminDTO.getUserName());
                loginUser.setName("患者-游客");
                sickInfoService.save(loginUser);
            }
            loginUser.setType(3);
            return ReturnMsg.ok(loginUser);
        }
        return ReturnMsg.error("账号或密码错误");
    } 
   

源码获取

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值