5463ee78431a3c4c9129b97a7717ee8db8c79c99.svn-base 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.yihu.platform.api;
  2. import com.yihu.platform.utils.ApiUtil;
  3. import com.yihu.platform.utils.StringUtil;
  4. import com.yihu.wsgw.api.InterfaceMessage;
  5. import net.sf.json.JSONException;
  6. import net.sf.json.JSONObject;
  7. /**
  8. * 医生接口
  9. * @author wengsb----yihu.com
  10. * 2017年8月17日下午3:00:15
  11. */
  12. public class DoctorApi {
  13. /**
  14. * 通过医院id,医生id获取医生列表
  15. * @param msg
  16. * @return
  17. */
  18. public String queryComplexDoctorList_v2(InterfaceMessage msg) {
  19. try {
  20. JSONObject json = JSONObject.fromObject(msg.getParam());
  21. Integer id = StringUtil.isEmpty(json.get("id")) ? null : json.getInt("id");
  22. String param = StringUtil.isEmpty(json.get("param")) ? "" : json.getString("param");
  23. if (StringUtil.isEmpty(id)) {
  24. return ApiUtil.getRespJSON(-10000, "id不能为空").toString();
  25. }
  26. JSONObject result = new JSONObject();
  27. result.put("hosDeptId", "");
  28. result.put("doctorUid", "");
  29. result.put("doctorName", "");
  30. result.put("doctorSex", "");
  31. result.put("lczc", "");
  32. result.put("lczcName", "");
  33. result.put("spells", "");
  34. result.put("skill", "");
  35. result.put("intro", "");
  36. result.put("photoUri", "");
  37. result.put("provinceId", "");
  38. result.put("provinceName", "");
  39. result.put("cityId", "");
  40. result.put("cityName", "");
  41. result.put("hospitalId", "");
  42. result.put("hosName", "");
  43. result.put("deptName", "");
  44. JSONObject obj = ApiUtil.getRespJSON(10000, "成功");
  45. obj.put("Result", result);
  46. obj.put("Count", 10);
  47. return obj.toString();
  48. } catch (JSONException e) {
  49. return ApiUtil.getRespJSON(-10000, "非标准json:[" + msg.getParam() + "]").toString();
  50. } catch (Exception e) {
  51. e.printStackTrace();
  52. return ApiUtil.getRespJSON(-14444, "加载异常!" + StringUtil.getException(e)).toString();
  53. }
  54. }
  55. }