基于javaweb的SSH门诊管理系统(java+ssh+jsp+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

451423412808

461423412808

471423412808

基于javaweb的SSH门诊管理系统(java+ssh+jsp+mysql)

登录
admin 123456

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
	List jiuzhenhaolist = chufangDao.findByProperty("jiuzhenhao",
jiuzhenhao);
if (jiuzhenhaolist.isEmpty() || jiuzhenhaolist.size() < 1) {
this.setMessage("就诊号错误!");
this.setPath("listShoufeidetail.action");
return "succeed";
}
Chufang Chufang = (Chufang) jiuzhenhaolist.get(0);
Map request = (Map) ServletActionContext.getContext().get("request");

Yizhu yizhu = yizhuDao.findById(Integer.parseInt(Chufang.getYizhuId()));
Integer danjia = yizhu.getDanjia();

Integer zongjia = danjia * Integer.parseInt(Chufang.getMeicishuliang())
* Integer.parseInt(Chufang.getZhixingcishu())
* Integer.parseInt(Chufang.getZhixingtianshu());
request.put("chufang", Chufang);
request.put("danjia", danjia);
request.put("zongjia", zongjia);

return ActionSupport.SUCCESS;
}

public String editShoufeidetail() throws Exception {
shoufeidetail = shoufeidetailDao.findById(id);
shoufeidetail.setId(id);
shoufeidetail.setJiesuanleixing(jiesuanleixing);
shoufeidetail.setJiuzhenhao(jiuzhenhao);
shoufeidetail.setJiuzhenshijian(jiuzhenshijian);
shoufeidetail.setName(name);
shoufeidetail.setJiuzhenkeshi(jiuzhenkeshi);
shoufeidetail.setYisheng(yisheng);
shoufeidetail.setShoufeimingcheng(shoufeimingcheng);
shoufeidetail.setGuige(guige);
shoufeidetail.setDanwei(danwei);
shoufeidetail.setShuliang(shuliang);
shoufeidetail.setDanjia(danjia);
shoufeidetail.setJizhangjine(jizhangjine);
shoufeidetail.setZifujine(zifujine);
shoufeidetail.setJine(jine);
shoufeidetailDao.merge(shoufeidetail);
this.setMessage("操作成功");
this.setPath("listShoufeidetail.action");
return "succeed";
}

public String infoShoufeidetail() throws Exception {
Shoufeidetail entity = shoufeidetailDao.findById(id);
Map request = (Map) ServletActionContext.getContext().get("request");
request.put("Shoufeidetail", entity);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
	log.debug("getting TAdmin instance with id: " + id);
try {
TAdmin instance = (TAdmin) getHibernateTemplate().get(
"com.model.TAdmin", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}

public List findByExample(TAdmin instance) {
log.debug("finding TAdmin instance by example");
try {
List results = getHibernateTemplate().findByExample(instance);
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}

public List findByProperty(String propertyName, Object value) {
log.debug("finding TAdmin instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from TAdmin as model where model."
+ propertyName + "= ?";
return getHibernateTemplate().find(queryString, value);
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}

public List findByUserName(Object userName) {
return findByProperty(USER_NAME, userName);
}

public List findByUserPw(Object userPw) {
return findByProperty(USER_PW, userPw);
}

public List findAll() {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
	return findByProperty(USER_NAME, userName);
}

public List findByUserPw(Object userPw) {
return findByProperty(USER_PW, userPw);
}

public List findAll() {
log.debug("finding all TAdmin instances");
try {
String queryString = "from TAdmin";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}

public TAdmin merge(TAdmin detachedInstance) {
log.debug("merging TAdmin instance");
try {
TAdmin result = (TAdmin) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}

public void attachDirty(TAdmin instance) {
log.debug("attaching dirty TAdmin instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}

public void attachClean(TAdmin instance) {
log.debug("attaching clean TAdmin instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
public void setShuliang(Integer shuliang) {
this.shuliang = shuliang;
}

public Integer getDanjia() {
return danjia;
}

public void setDanjia(Integer danjia) {
this.danjia = danjia;
}

public Integer getJizhangjine() {
return jizhangjine;
}

public void setJizhangjine(Integer jizhangjine) {
this.jizhangjine = jizhangjine;
}

public Integer getZifujine() {
return zifujine;
}

public void setZifujine(Integer zifujine) {
this.zifujine = zifujine;
}

public Integer getJine() {
return jine;
}

public void setJine(Integer jine) {
this.jine = jine;
}

public Chufang getChufang() {
return chufang;
}

public void setChufang(Chufang chufang) {
this.chufang = chufang;
}

public ChufangDAO getChufangDao() {
return chufangDao;
}

public void setChufangDao(ChufangDAO chufangDao) {
this.chufangDao = chufangDao;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
	}

public String getDanwei() {
return danwei;
}

public void setDanwei(String danwei) {
this.danwei = danwei;
}

public Integer getDanjia() {
return danjia;
}

public void setDanjia(Integer danjia) {
this.danjia = danjia;
}
}




public class ShoufeiAction extends ActionSupport {

private Integer id; //
private String bianma; // 编码
private String name; // 名称
private String guige; // 规格
private String danwei; // 单位
private Integer danjia; // 单价

private String message;
private String path;

private Shoufei shoufei;

private ShoufeiDAO shoufeiDao;

public String addShoufei() throws Exception {
shoufei = new Shoufei();
shoufei.setId(id);
shoufei.setBianma(bianma);
shoufei.setName(name);
shoufei.setGuige(guige);


项目链接:
https://javayms.github.io?id=441423412808201cp
https://javayms.pages.dev?id=441423412808201cp