首页
用户查询
经办人信息查询
客户录入
浏览客户信息
信息查看
药品信息查询
顾客信息
用户管理
经办人数据报表
顾客编号
首页
技术描述
开发工具: Idea/Eclipse
数据库: mysql
Jar包仓库: Maven
前段框架:jquery/Jsp
后端框架: Spring+SpringMVC+Mybatis
基于SSM+MySQL+JQuery的医药管理系统,分为管理员,经办人,顾客等多个角色,分配不同的菜单界面。整体功能包含客户管理,经办人管理,药品信息查询,药品信息删除,修改,数据报表,用户管理等。
- package mms.controller;
-
- import org.springframework.beans.factory.annotation.Autowired;
-
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.ResponseBody;
-
- import mms.pojo.Agency;
- import mms.pojo.EasyUIResult;
- import mms.services.AgencyService;
-
- @RequestMapping("Agency")
- @Controller
- public class AgencyController {
- // 经办人controller
- @Autowired
- private AgencyService agencyService;
-
- // 通过ano查询单个经办人
- @RequestMapping("GetAgency")
- @ResponseBody
- public Agency queryAgencyByAno(String ano) {
- Agency agency = agencyService.queryAgencyByAno(ano);
- return agency;
- }
-
- @RequestMapping(value = "DeleteAgency", produces = "text/html;charset=UTF-8")
- @ResponseBody
- // 按编号删除
- public String deleteAgencyByAno(String ano) {
- return agencyService.deleteAgencyByAno(ano);
- }
-
- // 批量删除
- @RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")
- @ResponseBody
- public String deleteAgencyByRows(@RequestParam(value = "array[]") String[] array) {
- try {
- return agencyService.deleteAgencyByRows(array);
- } catch (Exception e) {
- // TODO: handle exception
- // 捕获异常,spring进行事务回滚
- return "操作异常,,某些经办人处理过顾客信息,无法删除该经办人,请重新选择";
- }
-
- }
-
- // 修改经办人信息
- @RequestMapping(value = "ModifyAgency", produces = "text/html;charset=UTF-8")
- @ResponseBody
- public String modifyAgency(Agency agency) {
- return agencyService.modifyAgency(agency);
- }
-
- // easyui数据表格返回全部经办人json
- @RequestMapping("GetMessage")
- @ResponseBody
- public EasyUIResult queryAllAgency(@RequestParam(value = "page", defaultValue = "1") Integer page,
- @RequestParam(value = "rows", defaultValue = "5") Integer rows) {
- return this.agencyService.queryAllAgency(page, rows);
- }
-
- // 保存经办人信息
- @RequestMapping(value = "SaveAgency", produces = "text/html;charset=UTF-8")
- @ResponseBody
- public String saveAgency(Agency agency) {
- return agencyService.saveAgency(agency);
- }
-
- // 返回所有经办人
- @RequestMapping("GetAllAgency")
- @ResponseBody
- public java.util.List
getAllAgency() { - java.util.List
allAgency = agencyService.getAllAgency(); - return allAgency;
- }
- }
-
- @RequestMapping("Client")
- @Controller
- public class ClientController {
- // 顾客controller
- @Autowired
- // 注入service
- private ClientService clientService;
-
- // 按编号查询
- @RequestMapping("GetClient")
- @ResponseBody
- public Client queryClientBycno(String cno) {
- Client client = clientService.queryClientBycno(cno);
- return client;
- }
-
- // 按编号删除
- @RequestMapping("DeleteClient")
- @ResponseBody
- public void deleteClientBycno(String cno) {
- clientService.deleteClientBycno(cno);
- }
- // 批量删除
- @RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8")
- @ResponseBody
- public String deleteClientByRows(
- @RequestParam(value = "array[]") String[] array) {
- return clientService.deleteClientByRows(array);
-
- // clientService.deleteClientBycno(cno);
- }
-
- // 保存顾客信息
- @RequestMapping(value = "SaveClient", produces = "text/html;charset=UTF-8")
- @ResponseBody
- public String saveClient(Client client) {
- return clientService.saveClient(client);
- }
-
- @RequestMapping("GetMessage")
- @ResponseBody
- // easyui返回json
- public EasyUIResult queryAllClient(@RequestParam(value = "page", defaultValue = "1") Integer page,
- @RequestParam(value = "rows", defaultValue = "5") Integer rows) {
- EasyUIResult queryAllClient = clientService.queryAllClient(page, rows);
- return queryAllClient;
- }
-
- // 修改客户信息
- @RequestMapping(value = "ModifyClient", produces = "text/html;charset=UTF-8")
- @ResponseBody
- public String modifyClient(Client client) {
- return clientService.modifyClient(client);
- }
- }