Java项目:医院门诊收费管理系统(java+html+jdbc+mysql)

一、项目简述


功能:登录,门诊划价,收费,报表,药品管理等等功能。


二、项目运行
 

运行环境: Jdk1.8 + Tomcats . 5 + mysql + Eclispe ( IntelliJ IDEA ,Eclispe , MyEclispe , sts 都支持)。


项目技术: JSP + Entity + Servlert + html + css + Javascript + JQuery + Ajax +「 ileupload 等等。

药品操作代码:

/*
* 药品操作
* 
*/
@Controller
@RequestMapping("drugdictionary")
public class SdrugdictionaryController {
    @Autowired
    private SdrugdictionaryService sdrugdictionaryService;
    /*
     * 查询药品
     * */
    @RequestMapping("findAllSdrugdictionary")
    @ResponseBody
    public Object SdrugdictionaryList(Sdrugdictionary sdrugdictionary, Integer page, Integer limit){
        PageHelper.startPage(page, limit);
        List<SdrugdictionaryMapper> listAll = sdrugdictionaryService.findAllSdrugdictionary(sdrugdictionary);
        PageInfo pageInfo = new PageInfo(listAll);
        Map<String, Object> tableData = new HashMap<String, Object>();
        //这是layui要求返回的json数据格式
        tableData.put("code", 0);
        tableData.put("msg", "");
        //将全部数据的条数作为count传给前台(一共多少条)
        tableData.put("count", pageInfo.getTotal());
        //将分页后的数据返回(每页要显示的数据)
        tableData.put("data", pageInfo.getList());

        return tableData;
    }
    /*
     * 添加药品
     * */
    @RequestMapping("addSdrugdictionary")
    @ResponseBody
    public Object addSdrugdictionary(Sdrugdictionary sdrugdictionary){
        int count = sdrugdictionaryService.count(sdrugdictionary);
        if(count==0){
            int i = sdrugdictionaryService.addSdrugdictionary(sdrugdictionary);
            if(i==1){
                return "添加成功";
            }else{
                return "添加失败";
            }
        }else {
            return sdrugdictionary.getDrugName()+"已存在";
        }

    }
    /*
     * 修改药品
     * */
    @RequestMapping("editSdrugdictionary")
    @ResponseBody
    public Object editSdrugdictionary(Sdrugdictionary sdrugdictionary){
        int i = sdrugdictionaryService.editSdrugdictionary(sdrugdictionary);
        if(i==1){
            return "修改成功";
        }else{
            return "修改失败";
        }

    }
    /*
     * 删除药品
     * */
    @RequestMapping("deleteSdrugdictionary")
    @ResponseBody
    public Object deleteSdrugdictionary(Integer drugId){
        int i = sdrugdictionaryService.deleteSdrugdictionary(drugId);
        if(i==1){
            return "删除成功";
        }else{
            return "删除失败";
        }
    }

    @RequestMapping("findAllArea")
    @ResponseBody
    public Object findAllArea(){
        List<Area> allArea = sdrugdictionaryService.findAllArea();
        return allArea;
    }
    @RequestMapping("findAllType")
    @ResponseBody
    public Object findAllType(){
        List<Type> allType = sdrugdictionaryService.findAllType();
        return allType;
    }
    @RequestMapping("findAllUnit")
    @ResponseBody
    public Object findAllUnit(){
        List<Unit> allUnit = sdrugdictionaryService.findAllUnit();
        return allUnit;
    }
}

管理菜单操作:

@Controller
public class SysController {
    @Autowired
    private UserService userService;

    /*
     * 跳转管理菜单
     * */
    @RequestMapping("toMenuManager")
    public String toMenuManager() {
        return "view/menu/menuManager";
    }

    /*
     * 跳转加载菜单管理左边的菜单树
     * */
    @RequestMapping("toMenuLeft")
    public String toMenuLeft() {
        return "view/menu/menuLeft";
    }

    /*
     * 跳转加载菜单管理左边的增删改
     * */
    @RequestMapping("toMenuRight")
    public String toMenuRight() {
        return "view/menu/menuRight";
    }
    /*
     * 跳转加载角色
     * */
    @RequestMapping("toLoadAllRole")
    public String toLoadAllRole() {
        return "view/role/roleManager";
    }
    /*
     * 跳转加载用户
     * */
    @RequestMapping("toLoadAllUser")
    public String toLoadAllUser() {
        return "view/user/userManager";
    }

    /*
     * 跳转加载doctor.html
     * */
    @RequestMapping("toDoctor")
    public String toDoctor() {
        return "view/center/doctor";
    }
    /*
     * 跳转加载departments.html
     * */
    @RequestMapping("toDepartments")
    public String toDepartments() {
        return "view/center/departments";
    }
    /*
     * 跳转加载registeredtype.html
     * */
    @RequestMapping("toRegisteredType")
    public String toRegisteredtype() {
        return "view/center/registeredType";
    }

    /*
     * 跳转加载icon.html
     * */
    @RequestMapping("icon")
    public String icon() {
        return "view/center/icon";
    }

    /*
     * 跳转加载type.html
     * */
    @RequestMapping("toType")
    public String toType() {
        return "view/center/type";
    }
    /*
     * 跳转加载area.html
     * */
    @RequestMapping("toArea")
    public String toArea() {
        return "view/center/area";
    }

    /*
     * 跳转加载skull.html
     * */
    @RequestMapping("toSkull")
    public String toSkull() {
        return "view/center/skull";
    }
    /*
     * 跳转加载warehuose.html
     * */
    @RequestMapping("toWarehuose")
    public String toWarehuose() {
        return "view/center/warehuose";
    }

    /*
     * 跳转加载supplyManage.html
     * */
    @RequestMapping("toSupplyManage")
    public String toSupplyManage() {
        return "view/center/supplyManage";
    }
    /*
     * 跳转加载supply.html
     * */
    @RequestMapping("toSupply")
    public String toSupply() {
        return "view/center/supply";
    }
    /*
     * 跳转加载unit.html
     * */
    @RequestMapping("toUnit")
    public String toUnit() {
        return "view/center/unit";
    }

    /*
     * 跳转加载updateLogin.html
     * */
    @RequestMapping("toUpdateLogin")
    public String toUpdateLogin(User user, Integer userid, Model model) {
        List<User> users = userService.updateLogin(user);
        model.addAttribute("usersLogin",users);
        return "view/user/updateLogin";
    }
    /*
     * 跳转加载projectTypeManage.html
     * */
    @RequestMapping("toProjectTypeManage")
    public String toProjectTypeManage() {
        return "view/center/projectTypeManage";
    }
    /*
     * 跳转加载paiban.html
     * */
    @RequestMapping("toPaiban")
    public String toPaiban() {
        return "view/center/paiban";
    }
    /*
     * 跳转加载drugdictionary.html
     * */
    @RequestMapping("toDrugdictionary")
    public String toDrugdictionary() {
        return "view/center/drugdictionary";
    }
    /*
     * 跳转加载main.html
     * */
    @RequestMapping("toMain")
    public String toMain() {
        return "view/main/main";
    }
    /*
     * 跳转加载reportManage.html
     * */
    @RequestMapping("toReportFinance")
    public String toReportFinance() {
        return "view/finance/reportManage";
    }

    /*
     * 跳转加载zhuYuanManage.html
     * */
    @RequestMapping("toZhuYaunManage")
    public String toZhuYaunManage() {
        return "view/finance/zhuYuanManage";
    }
    /*
     * 跳转加载zhuYuanManage.html
     * */
    @RequestMapping("toBingYear")
    public String toBingYear() {
        return "view/finance/reportBing";
    }
    /*
     * 跳转加载zhuYuanBing.html
     * */
    @RequestMapping("toBing2")
    public String toBing2() {
        return "view/finance/zhuYuanBing";
    }
    /*
     * 跳转加载doctorDuibi.html
     * */
    @RequestMapping("toDoctorDuibi")
    public String toDoctorDuibi() {
        return "view/finance/doctorDuibi";
    }

    /*
     * 跳转加载current.html
     * */
    @RequestMapping("toCurrent")
    public String toCurrenti() {
        return "view/finance/current";
    }
}

猜你喜欢

转载自blog.csdn.net/m0_59687645/article/details/121222105