秋野酱:《个人主页》
个人专栏:《Java专栏》《Python专栏》
⛺️心若有所向往,何惧道阻且长
Java≥8、MySQL≥5.7、Node.js≥14
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
课程设计,大作业,毕业设计,项目练习,学习演示等
基于javaweb的SpringBoothis智能医院管理系统(java+springboot+vue+maven+mybatis+mysql)
登录:
admin 123456 系统管理员
000 123456 前台 前台
002 123456 医技 医技
003 123456 药房 药房
004 123456 信息科 管理
011 123456 门诊 内科(医师) 普通号
012 123456 门诊 内科(医师) 专家号
013 123456 门诊 外科(医师) 普通号
014 123456 门诊 外科(医师) 专家号
Jdk1.8 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class LoginController {
@GetMapping("/login")
public String showLoginPage(Model model) {
return "login";
}
}
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF - 8">
<title>登录界面</title>
<style>
body {
font - family: Arial, sans - serif;
background - color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify - content: center;
align - items: center;
min - height: 100vh;
}
.login - container {
background - color: white;
padding: 20px;
border - radius: 5px;
box - shadow: 0 0 5px rgba(0, 0, 0, 0.1);
width: 300px;
}
h2 {
text - align: center;
}
form {
display: flex;
flex - direction: column;
}
label {
margin - top: 10px;
}
input {
padding: 10px;
margin - bottom: 15px;
border: 1px solid #ccc;
border - radius: 3px;
}
button {
padding: 10px;
background - color: #007BFF;
color: white;
border: none;
border - radius: 3px;
cursor: pointer;
}
button#register - btn {
background - color: #6c757d;
margin - top: 10px;
}
</style>
</head>
<body>
<div class="login - container">
<h2>欢迎登录</h2>
<form action="/login" method="post">
<label for="username">账号</label>
<input type="text" id="username" name="username" placeholder="admin" required>
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="******" required>
<button type="submit">登录</button>
<button type="button" id="register - btn">注册</button>
</form>
</div>
</body>
</html>
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class PatientCost {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String medicalRecordNo;
private String name;
private String idCard;
private String chargeItemName;
private int quantity;
private double unitPrice;
private double totalPrice;
private String itemStatus;
private String time;
// 省略getter和setter方法
}
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/patient - cost")
public class PatientCostController {
@Autowired
private PatientCostRepository patientCostRepository;
@GetMapping("/list")
public List<PatientCost> getPatientCostList() {
return patientCostRepository.findAll();
}
@GetMapping("/search")
public List<PatientCost> searchPatientCost(
@RequestParam(required = false) String medicalRecordNo,
@RequestParam(required = false) String name,
@RequestParam(required = false) String idCard) {
// 这里可以根据条件构建JPQL或SQL进行数据库查询,简单示例先返回所有
return patientCostRepository.findAll();
}
}