DataHandlingController.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. package com.yihu.wlyy.web.data;
  2. import com.yihu.wlyy.entity.organization.HospitalDept;
  3. import com.yihu.wlyy.service.app.consult.ConsultTeamService;
  4. import com.yihu.wlyy.service.app.sign.FamilyContractService;
  5. import com.yihu.wlyy.web.BaseController;
  6. import org.json.JSONArray;
  7. import org.json.JSONObject;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.data.domain.Page;
  10. import org.springframework.http.MediaType;
  11. import org.springframework.stereotype.Controller;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RequestMethod;
  14. import org.springframework.web.bind.annotation.RequestParam;
  15. import org.springframework.web.bind.annotation.ResponseBody;
  16. /**
  17. * Created by Administrator on 2016.10.08.
  18. * 修改历史数据处理控制器
  19. */
  20. @Controller
  21. @RequestMapping(value = "/dataHandling", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
  22. public class DataHandlingController extends BaseController {
  23. @Autowired
  24. private FamilyContractService familyContractService;
  25. @Autowired
  26. private ConsultTeamService consultTeamService;
  27. @Autowired
  28. private DataHandingService dataHandingService;
  29. /**
  30. * 生成签约表中的行政团队的code
  31. */
  32. @RequestMapping(value = "produceSignAdminTeamCode")
  33. @ResponseBody
  34. public String produceSignAdminTeamCode() {
  35. try {
  36. return write(200, familyContractService.produceSignAdminTeamCode());
  37. } catch (Exception e) {
  38. error(e);
  39. return error(-1, e.getMessage());
  40. }
  41. }
  42. /**
  43. * 生成咨询表中中的行政团队的code
  44. * @return
  45. */
  46. @RequestMapping(value = "produceConsultAdminTeamCode")
  47. @ResponseBody
  48. public String produceConsultAdminTeamCode() {
  49. try {
  50. return write(200, consultTeamService.produceConsultAdminTeamCode());
  51. } catch (Exception e) {
  52. error(e);
  53. return error(-1, e.getMessage());
  54. }
  55. }
  56. /**
  57. * 生成医生和患者表中有身份的用户的密码
  58. * @return
  59. */
  60. @RequestMapping(value = "producePatientAndDoctorPasswor")
  61. @ResponseBody
  62. public String producePatientAndDoctorPasswor() {
  63. try {
  64. return write(200, dataHandingService.producePatientAndDoctorPasswor());
  65. } catch (Exception e) {
  66. error(e);
  67. return error(-1, e.getMessage());
  68. }
  69. }
  70. }