基于javaweb+mysql的springboothis智能医院管理系统(java+springboot+vue+maven+mybatis+mysql)

基于javaweb+mysql的springboothis智能医院管理系统(java+springboot+vue+maven+mybatis+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥10

开发工具

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

前端:WebStorm/VSCode/HBuilderX等均可

适用

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

功能说明

基于javaweb+mysql的SpringBoothis智能医院管理系统(java+springboot+vue+maven+mybatis+mysql)

一、项目运行 环境配置:

Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。

项目技术:

Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。

        HashMap<String,Object> res=new HashMap<>();
        List<User> users = userService.getUsersBy(user);
       //System.out.println(users);
        List<UserShow> allUserShow=new ArrayList<>();
        for(User userw: users){
            allUserShow.add(new UserShow(userw));
        }
        if(users.size()!=0){
            flag="yes";
        }
        res.put("flag",flag);
        res.put("users",allUserShow);
        return res;
    }

    @RequestMapping("/deleteById")
    public Map<String ,Object> deleteById(@RequestBody UserShow user){
        String id=user.getId();
        HashMap<String,Object> res=new HashMap<>();
        String flag="yes";
        userService.deleteById(id);

        res.put("flag",flag);
        return res;
    }

    @RequestMapping("/updateUser")
    public Map<String ,Object> updataUser(@RequestBody UserShow user){
        User user1=new User(user);
        boolean isupdate = userService.updateUser(user1);
        HashMap<String,Object> res=new HashMap<>();
        String flag="yes";

        return res;
    }

    @RequestMapping("/userloading")
    public Map<String,Object> loading(){
        Map<String, Object> loading = userService.loading();
        return loading;
    }

}

     */
    @PostMapping("/reception/getPatient")
    public Map<String,Object> getPatient(@RequestBody Map<String,Object> map){
        String idNum =(String)map.get("idNum");
        Map<String, Object> patient = regService.getPatient(idNum);
        return patient;
    }

    /**
     * 真正实现了挂号的功能
     * @param regForm
     * @return
     */
    @PostMapping("/reception/addReg")
    public Map<String,Object> addReg(@RequestBody RegForm regForm){

        regService.add(regForm);
        Map<String,Object> res=new HashMap<>();
        res.put("isAdd","true");
        return res;
    }

}

@CrossOrigin
@RestController
public class SysUserController {

    @Autowired
    UserService userService;

    @RequestMapping("/adduser")//添加系统用户的实现
    public Map<String,Object> addUser(@RequestBody User user){

    @RequestMapping("/getAllMedicine")
    public Map<String,Object> getAllMedicine(){
        Map<String,Object> res=medicineService.getAllMedicine();
        return res;
    }

    @RequestMapping("/getMedicineBy")
    public Map<String,Object> getMedicineBy(@RequestBody Medicine medicine){
        Map<String, Object> res = medicineService.getMedicineBy(medicine);
        return res;
    }

    @RequestMapping("/deleteMedicineByID")
    public Map<String,Object> deleteMedicineByID(@RequestBody MedicineShow medicineShow){

        Map<String,Object> res=medicineService.deleteByID(medicineShow);
        return res;
    }

    @RequestMapping("/updateMedicine")
    public Map<String,Object> updateMedicine(@RequestBody MedicineShow medicineShow){
        Map<String,Object> res=medicineService.updateMedicine(medicineShow);
        return res;
    }
}


    @RequestMapping("/getAllDep")
    public Map<String,Object> getAllDep(){
        Map<String,Object> res=depService.getAllDep();
        return res;
    }

    @RequestMapping("/getDepBy")
    public Map<String,Object> getDepBy(@RequestBody DepMana depMana){

        Map<String,Object> res=depService.getDepBy(depMana);
        return res;
    }

    @RequestMapping("/deleteByNum")
    public Map<String,Object> deleteByNum(@RequestBody DepShow dep){
        Map<String,Object> res=depService.deleteByNum(dep);
        return res;
    }

    @RequestMapping("/updateDep")
    public Map<String,Object> updateDep(@RequestBody DepShow dep){

        Map<String,Object> res=depService.updateDep(dep);
        return res;
    }
}

@CrossOrigin
@RestController
public class TechPatController {

    @Autowired
    TechPatService techPatService;

    @RequestMapping("/loadingtech")
        Map<String,Object> res=inspectionService.getAllInsXZ();
        return res;
    }

    @PostMapping("/getallxm")
    public Map<String,Object> getAllInsXM(@RequestBody Map<String,Object> map){
        String techExeOff=(String)map.get("depart_id");
        Map<String,Object> res=inspectionService.getAllInsXM(techExeOff);
        return res;
    }

    @PostMapping("/getform")
    public Map<String,Object> getTech(@RequestBody Map<String,Object> map){
        String techMum=(String)map.get("tech_id");
        Map<String,Object> res=inspectionService.getTech(techMum);
        return res;
    }

    @PostMapping("/addtech")
    public Map<String,Object> addTech(@RequestBody Map<String,Object> map){
        String comTechNum=(String)map.get("comTechNum");
        String check_RegID=(String)map.get("check_RegID");
        //System.out.println("add+"+comTechNum+"+"+check_RegID);
        Map<String,Object> res=inspectionService.addIns(comTechNum,check_RegID);
        return res;
    }

    @PostMapping("/addcomItem")
    public Map<String,Object> allCom(@RequestBody CommonInsShow commonInsShow){
        //System.out.println(commonInsShow);
        Map<String,Object> res=inspectionService.allCom(commonInsShow);
        return res;
    }

    @PostMapping("/delectItem")
    public Map<String,Object> deleteInsp(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        //System.out.println(maps);
        //System.out.println(check_RegID);
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
            String check_TechID=(String) map1.get("techNum");
            //System.out.println(check_TechID);
            res=inspectionService.deleteInsp(check_RegID,check_TechID);
        }
        return res;
    }


@CrossOrigin
@RestController
public class SiteRegController {

    @Autowired
    LoadingS loadingS;
    @Autowired
    UserService userService;
    @Autowired
    RegService regService;

    /*
    * 加载挂号科室的信息*/
    @RequestMapping("/reception/regloaddep")
    public Map<String,Object> loading(){
        Map<String,Object> res=new HashMap<>();
        List<Departoptions> list = loadingS.sitRegDep();
        res.put("deps",list);
        return res;
    }

    /*
    * 获取并加载当前科室和号别的医生(有余号的)
    * */
    @RequestMapping("/reception/selbydoc")
    public Map<String,Object> SelBydoc(@RequestBody RegDepart regDepart){
        Map<String,Object> res=new HashMap<>();
        if(regDepart.getValue()==null||regDepart.getRegType()==null){//如果没有科室或号别就直接返回null
            return res;
        }
     * 根据身份证号查询是否存在这个病人,并返回其基本的数据
     */
    @PostMapping("/reception/getPatient")
    public Map<String,Object> getPatient(@RequestBody Map<String,Object> map){
        String idNum =(String)map.get("idNum");
        Map<String, Object> patient = regService.getPatient(idNum);
        return patient;
    }

    /**
     * 真正实现了挂号的功能
     * @param regForm
     * @return
     */
    @PostMapping("/reception/addReg")
    public Map<String,Object> addReg(@RequestBody RegForm regForm){

        regService.add(regForm);
        Map<String,Object> res=new HashMap<>();
        res.put("isAdd","true");
        return res;
    }

}

@CrossOrigin
@RestController
public class SysUserController {

    @Autowired
    UserService userService;

    @RequestMapping("/adduser")//添加系统用户的实现
    public Map<String,Object> addUser(@RequestBody User user){
        HashMap<String,Object> res=new HashMap<>();
        if(userService.getUserByID(user.getId())!=null){
            res.put("isAdd","false");
        }else {
        List<Map<String,Object>> med=(List<Map<String, Object>>)map.get("med");
        String pm_PreID=(String) map.get("cfid");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> m:med){
            String pm_MedID=(String)m.get("id");
            res=premedService.deletePremedByNum(pm_PreID,pm_MedID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class PrescriptionController {

    @Autowired
    PrescriptionService prescriptionService;

    @PostMapping("/addchufang")
    public Map<String,Object> addPrescription(@RequestBody Map<String,Object> map){
        String pre_RegID=(String)map.get("regID");
        String pre_Name=(String)map.get("name");
        Map<String,Object> res=prescriptionService.addPrescription(pre_RegID,pre_Name);
        return res;
    }

    @PostMapping("/delectchufang")
    public Map<String,Object> deletePrescriptionByNum(@RequestBody Map<String,Object> map){
        Map<String,Object> res=new HashMap<>();
    }

    @PostMapping("/outpart/opendrug")
    public Map<String,Object> kaiyap(@RequestBody Map<String,Object> map){
        Map<String,Object> res=new HashMap<>();
        List<Map<String,Object>> maps=(List<Map<String,Object>>)map.get("med");
        for(Map<String,Object> m:maps){
            String pm_PreID=(String) m.get("cid");
            String pm_MedID=(String) m.get("mid");
            res=medPatService.UpdateMedicine(pm_PreID,pm_MedID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class WithdnumController {
    @Autowired
    WithdnumService withdnumService;

    @RequestMapping("/reception/loadingwith")
    public Map<String,Object> loadingreg(){//退号页面加载信息

        return withdnumService.loading();
    }

    @RequestMapping("/reception/withby")
    public Map<String,Object> searchby(@RequestBody Map<String,Object> map){
        String medRecNum=(String)map.get("medRecNum");
        String name=(String)map.get("name");
        String idNum=(String)map.get("idNum");
        return withdnumService.searchBy(medRecNum,name,idNum);

    }

    @PostMapping("/reception/czwith")
    public Map<String,Object> czwith(@RequestBody WithShow withShow){
        int i = withdnumService.backH(withShow.getRegID());
        String s="true";
        if(i==0){
            s="false";
        }else {
            userService.addUser(user);
            res.put("isAdd","true");
        }
        return res;
    }

    @RequestMapping("/getAllUsers")
    public Map<String,Object> getAllUsers(){
        HashMap<String,Object> res=new HashMap<>();
        List<User> allUsers = userService.getAllUsers();
        List<UserShow> allUserShow=new ArrayList<>();
        for(User user: allUsers){
            allUserShow.add(new UserShow(user));
        }
//        System.out.println(allUsers);
        res.put("Users",allUserShow);
        return res;
    }

    @RequestMapping("/getUsersBy")
    public Map<String ,Object> getUsersBy(@RequestBody User user){
        String flag="no";
       //System.out.println(user);
        HashMap<String,Object> res=new HashMap<>();
        List<User> users = userService.getUsersBy(user);
       //System.out.println(users);
        List<UserShow> allUserShow=new ArrayList<>();
        for(User userw: users){
            allUserShow.add(new UserShow(userw));
        }
        if(users.size()!=0){
            flag="yes";
        }
        res.put("flag",flag);
        res.put("users",allUserShow);
        return res;
    }

    @RequestMapping("/deleteById")
    public Map<String ,Object> deleteById(@RequestBody UserShow user){
        String id=user.getId();
        HashMap<String,Object> res=new HashMap<>();
        String flag="yes";
        userService.deleteById(id);

        res.put("flag",flag);
        return res;
    }

    @RequestMapping("/updateUser")
    public Map<String ,Object> updataUser(@RequestBody UserShow user){
    @PostMapping("adddrug")
    public Map<String,Object> addPremed(@RequestBody Map<String,Object> map){
        Map<String,Object> med=(Map<String, Object>)map.get("med");
        String pm_PreID=(String)med.get("cid");
        String pm_MedID=(String)med.get("id");
        String pm_Num=(String)med.get("num");
        String pm_Frequency=(String)med.get("fre");
        Map<String,Object> res=premedService.addPremed(pm_PreID,pm_MedID,pm_Num,pm_Frequency);
        return res;
    }

    @PostMapping("delectdrug")
    public Map<String,Object> deletePremedByNum(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> med=(List<Map<String, Object>>)map.get("med");
        String pm_PreID=(String) map.get("cfid");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> m:med){
            String pm_MedID=(String)m.get("id");
            res=premedService.deletePremedByNum(pm_PreID,pm_MedID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class PrescriptionController {

        List<DocTableData> DocTableDatas = list.getList();
        boolean isupdate = docschMagService.update(list);
        if(isupdate){
            map.put("flag","yes");
        }
        return map;
    }

}

@CrossOrigin
@RestController
public class DepController {

    @Autowired
    DepService depService;

    @RequestMapping("/addDep")//添加科室
    public Map<String,Object> addDep(@RequestBody DepMana depMana) {
        Map<String,Object> res=depService.addDep(depMana);
        return res;
    }

    @RequestMapping("/getAllDep")
    public Map<String,Object> getAllDep(){
        Map<String,Object> res=depService.getAllDep();
        return res;
    }

    @RequestMapping("/getDepBy")
    public Map<String,Object> getDepBy(@RequestBody DepMana depMana){

        Map<String,Object> res=depService.getDepBy(depMana);
        return res;

@CrossOrigin
@RestController
public class WithdnumController {
    @Autowired
    WithdnumService withdnumService;

    @RequestMapping("/reception/loadingwith")
    public Map<String,Object> loadingreg(){//退号页面加载信息

        return withdnumService.loading();
    }

    @RequestMapping("/reception/withby")
    public Map<String,Object> searchby(@RequestBody Map<String,Object> map){
        String medRecNum=(String)map.get("medRecNum");
        String name=(String)map.get("name");
        String idNum=(String)map.get("idNum");
        return withdnumService.searchBy(medRecNum,name,idNum);

    }

    @PostMapping("/reception/czwith")
    public Map<String,Object> czwith(@RequestBody WithShow withShow){
        int i = withdnumService.backH(withShow.getRegID());
        String s="true";
        if(i==0){
            s="false";
        }
        Map<String,Object> map= new HashMap<>();
        map.put("flag",s);
        return map;
    }
}
    @PostMapping("finddrug")
    public Map<String,Object> getMedicineBy(@RequestBody Map<String,Object> map){
        String med_Name=(String)map.get("medname");
        Map<String,Object> res=premedService.getMedicineBy(med_Name);
        return res;
    }

    @PostMapping("adddrug")
    public Map<String,Object> addPremed(@RequestBody Map<String,Object> map){
        Map<String,Object> med=(Map<String, Object>)map.get("med");
        String pm_PreID=(String)med.get("cid");
        String pm_MedID=(String)med.get("id");
        String pm_Num=(String)med.get("num");
        String pm_Frequency=(String)med.get("fre");
        Map<String,Object> res=premedService.addPremed(pm_PreID,pm_MedID,pm_Num,pm_Frequency);
        return res;
    }

    @PostMapping("delectdrug")
    public Map<String,Object> deletePremedByNum(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> med=(List<Map<String, Object>>)map.get("med");
        String pm_PreID=(String) map.get("cfid");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> m:med){
            String pm_MedID=(String)m.get("id");
            res=premedService.deletePremedByNum(pm_PreID,pm_MedID);
        }
        return res;
    }
}

@CrossOrigin
@RestController
public class PrescriptionController {

    @Autowired
    PrescriptionService prescriptionService;

    @PostMapping("/addchufang")

    @RequestMapping("/addDep")//添加科室
    public Map<String,Object> addDep(@RequestBody DepMana depMana) {
        Map<String,Object> res=depService.addDep(depMana);
        return res;
    }

    @RequestMapping("/getAllDep")
    public Map<String,Object> getAllDep(){
        Map<String,Object> res=depService.getAllDep();
        return res;
    }

    @RequestMapping("/getDepBy")
    public Map<String,Object> getDepBy(@RequestBody DepMana depMana){

        Map<String,Object> res=depService.getDepBy(depMana);
        return res;
    }

    @RequestMapping("/deleteByNum")
    public Map<String,Object> deleteByNum(@RequestBody DepShow dep){
        Map<String,Object> res=depService.deleteByNum(dep);
        return res;
    }

    @RequestMapping("/updateDep")
    public Map<String,Object> updateDep(@RequestBody DepShow dep){

        Map<String,Object> res=depService.updateDep(dep);
        return res;
    }
}

@CrossOrigin
@RestController
public class TechPatController {

    @Autowired
    TechPatService techPatService;

    @RequestMapping("/loadingtech")
    public Map<String,Object> getAllTechPat(){
        Map<String,Object> res=techPatService.getAllTechPat();
        return res;
    }

@CrossOrigin
@RestController
public class WithdnumController {
    @Autowired
    WithdnumService withdnumService;

    @RequestMapping("/reception/loadingwith")
    public Map<String,Object> loadingreg(){//退号页面加载信息

        return withdnumService.loading();
    }

    @RequestMapping("/reception/withby")
    public Map<String,Object> searchby(@RequestBody Map<String,Object> map){
        String medRecNum=(String)map.get("medRecNum");
        String name=(String)map.get("name");
        String idNum=(String)map.get("idNum");
        return withdnumService.searchBy(medRecNum,name,idNum);

    }

    @PostMapping("/reception/czwith")
    public Map<String,Object> czwith(@RequestBody WithShow withShow){
        int i = withdnumService.backH(withShow.getRegID());
        String s="true";
        if(i==0){
            s="false";
        }
        Map<String,Object> map= new HashMap<>();
        map.put("flag",s);
        return map;
    }
}
    }

    @PostMapping("/delectItem")
    public Map<String,Object> deleteInsp(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        //System.out.println(maps);
        //System.out.println(check_RegID);
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
            String check_TechID=(String) map1.get("techNum");
            //System.out.println(check_TechID);
            res=inspectionService.deleteInsp(check_RegID,check_TechID);
        }
        return res;
    }

    @PostMapping("/update")
    public Map<String,Object> updateInspection(@RequestBody Map<String,Object> map){
        List<Map<String,Object>> maps=(List<Map<String,Object>>) map.get("mult");
        String check_RegID= (String) map.get("check_RegID");
        Map<String,Object> res=new HashMap<>();
        for(Map<String,Object> map1:maps){
            String check_TechID=(String) map1.get("techNum");
            res=inspectionService.updateInspection(check_RegID,check_TechID);
        }
        return res;
    }
}

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

请添加图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值