• 基于SSM+MySQL+JQuery的医药管理系统


    首页

    用户查询

    经办人信息查询

    客户录入

    浏览客户信息

    信息查看

    药品信息查询

    顾客信息

    用户管理

    经办人数据报表

    顾客编号

    首页

    技术描述

    开发工具: Idea/Eclipse
    数据库: mysql
    Jar包仓库: Maven
    前段框架:jquery/Jsp
    后端框架: Spring+SpringMVC+Mybatis

    资料说明

    基于SSM+MySQL+JQuery的医药管理系统,分为管理员,经办人,顾客等多个角色,分配不同的菜单界面。整体功能包含客户管理,经办人管理,药品信息查询,药品信息删除,修改,数据报表,用户管理等。

    1. package mms.controller;
    2. import org.springframework.beans.factory.annotation.Autowired;
    3. import org.springframework.stereotype.Controller;
    4. import org.springframework.web.bind.annotation.RequestMapping;
    5. import org.springframework.web.bind.annotation.RequestParam;
    6. import org.springframework.web.bind.annotation.ResponseBody;
    7. import mms.pojo.Agency;
    8. import mms.pojo.EasyUIResult;
    9. import mms.services.AgencyService;
    10. @RequestMapping("Agency")
    11. @Controller
    12. public class AgencyController {
    13. // 经办人controller
    14. @Autowired
    15. private AgencyService agencyService;
    16. // 通过ano查询单个经办人
    17. @RequestMapping("GetAgency")
    18. @ResponseBody
    19. public Agency queryAgencyByAno(String ano) {
    20. Agency agency = agencyService.queryAgencyByAno(ano);
    21. return agency;
    22. }
    23. @RequestMapping(value = "DeleteAgency", produces = "text/html;charset=UTF-8")
    24. @ResponseBody
    25. // 按编号删除
    26. public String deleteAgencyByAno(String ano) {
    27. return agencyService.deleteAgencyByAno(ano);
    28. }
    29. // 批量删除
    30. @RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")
    31. @ResponseBody
    32. public String deleteAgencyByRows(@RequestParam(value = "array[]") String[] array) {
    33. try {
    34. return agencyService.deleteAgencyByRows(array);
    35. } catch (Exception e) {
    36. // TODO: handle exception
    37. // 捕获异常,spring进行事务回滚
    38. return "操作异常,,某些经办人处理过顾客信息,无法删除该经办人,请重新选择";
    39. }
    40. }
    41. // 修改经办人信息
    42. @RequestMapping(value = "ModifyAgency", produces = "text/html;charset=UTF-8")
    43. @ResponseBody
    44. public String modifyAgency(Agency agency) {
    45. return agencyService.modifyAgency(agency);
    46. }
    47. // easyui数据表格返回全部经办人json
    48. @RequestMapping("GetMessage")
    49. @ResponseBody
    50. public EasyUIResult queryAllAgency(@RequestParam(value = "page", defaultValue = "1") Integer page,
    51. @RequestParam(value = "rows", defaultValue = "5") Integer rows) {
    52. return this.agencyService.queryAllAgency(page, rows);
    53. }
    54. // 保存经办人信息
    55. @RequestMapping(value = "SaveAgency", produces = "text/html;charset=UTF-8")
    56. @ResponseBody
    57. public String saveAgency(Agency agency) {
    58. return agencyService.saveAgency(agency);
    59. }
    60. // 返回所有经办人
    61. @RequestMapping("GetAllAgency")
    62. @ResponseBody
    63. public java.util.List getAllAgency() {
    64. java.util.List allAgency = agencyService.getAllAgency();
    65. return allAgency;
    66. }
    67. }
    1. @RequestMapping("Client")
    2. @Controller
    3. public class ClientController {
    4. // 顾客controller
    5. @Autowired
    6. // 注入service
    7. private ClientService clientService;
    8. // 按编号查询
    9. @RequestMapping("GetClient")
    10. @ResponseBody
    11. public Client queryClientBycno(String cno) {
    12. Client client = clientService.queryClientBycno(cno);
    13. return client;
    14. }
    15. // 按编号删除
    16. @RequestMapping("DeleteClient")
    17. @ResponseBody
    18. public void deleteClientBycno(String cno) {
    19. clientService.deleteClientBycno(cno);
    20. }
    21. // 批量删除
    22. @RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")
    23. @ResponseBody
    24. public String deleteClientByRows(
    25. @RequestParam(value = "array[]") String[] array) {
    26. return clientService.deleteClientByRows(array);
    27. // clientService.deleteClientBycno(cno);
    28. }
    29. // 保存顾客信息
    30. @RequestMapping(value = "SaveClient", produces = "text/html;charset=UTF-8")
    31. @ResponseBody
    32. public String saveClient(Client client) {
    33. return clientService.saveClient(client);
    34. }
    35. @RequestMapping("GetMessage")
    36. @ResponseBody
    37. // easyui返回json
    38. public EasyUIResult queryAllClient(@RequestParam(value = "page", defaultValue = "1") Integer page,
    39. @RequestParam(value = "rows", defaultValue = "5") Integer rows) {
    40. EasyUIResult queryAllClient = clientService.queryAllClient(page, rows);
    41. return queryAllClient;
    42. }
    43. // 修改客户信息
    44. @RequestMapping(value = "ModifyClient", produces = "text/html;charset=UTF-8")
    45. @ResponseBody
    46. public String modifyClient(Client client) {
    47. return clientService.modifyClient(client);
    48. }
    49. }

  • 相关阅读:
    干货!适应环境变化的公平意识在线元学习
    JAVA06_Optional类概述、初始化、常用方法、最佳实践
    如何理解分类任务中的logits?
    我经历过的职场故事
    Web前端—CSS高级(定位、高级技巧、CSS修饰属性、综合案例:购物网站轮播图)
    eslint如何支持uniapp的全局对象uni 和 H5+的plus 以及浏览器的全家对象 windows等...
    华山论剑:2nm芯片工艺谁更强?
    Java.lang.Class类 getProtectionDomain()方法有什么功能呢?
    【App自动化测试】(十一)自动化关键数据记录
    【SQL Server】入门教程(总结篇)
  • 原文地址:https://blog.csdn.net/qq_36155000/article/details/125910964