首页>代码>基于spring+springMVC+mybatis+easyui技术实现的医药后台管理系统>/MMS/src/main/java/mms/controller/AgencyController.java
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<Agency> getAllAgency() { java.util.List<Agency> allAgency = agencyService.getAllAgency(); return allAgency; } }

fellowfun LV12
2023年12月4日
KAIzx11 LV7
2023年6月15日
LITIANYU084414 LV11
2023年1月4日
wcy071213 LV27
2022年12月8日
2931765614 LV2
2022年11月4日
testuser1234567 LV24
2022年6月30日
葡萄树下酒庄 LV9
2022年1月4日
幸运疯子 LV13
2021年12月20日
hulahula123 LV4
2021年12月16日
893213895 LV18
2021年12月16日

苯科仔
2024年12月16日
暂无贡献等级
krispeng LV14
2024年11月19日
Sean_admin LV7
2024年8月8日
fengst
2024年6月18日
暂无贡献等级
大魔王help
2024年6月11日
暂无贡献等级
飃go with wind
2024年5月7日
暂无贡献等级
WBelong LV8
2024年4月2日
微信网友_6914427966033920 LV4
2024年3月19日
superqi
2024年1月1日
暂无贡献等级
夜起星河 LV8
2023年12月29日