DataHandlingController.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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, method = RequestMethod.GET)
  22. public class DataHandlingController extends BaseController {
  23. @Autowired
  24. private FamilyContractService familyContractService;
  25. @Autowired
  26. private ConsultTeamService consultTeamService;
  27. /**
  28. * 生成签约表中的行政团队的code
  29. */
  30. @RequestMapping(value = "produceSignAdminTeamCode")
  31. @ResponseBody
  32. public String produceSignAdminTeamCode() {
  33. try {
  34. return write(200, familyContractService.produceSignAdminTeamCode());
  35. } catch (Exception e) {
  36. error(e);
  37. return error(-1, e.getMessage());
  38. }
  39. }
  40. /**
  41. * 生成咨询表中中的行政团队的code
  42. * @return
  43. */
  44. @RequestMapping(value = "produceConsultAdminTeamCode")
  45. @ResponseBody
  46. public String produceConsultAdminTeamCode() {
  47. try {
  48. return write(200, consultTeamService.produceConsultAdminTeamCode());
  49. } catch (Exception e) {
  50. error(e);
  51. return error(-1, e.getMessage());
  52. }
  53. }
  54. }