12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package com.yihu.platform.api;
- import com.yihu.platform.utils.ApiUtil;
- import com.yihu.platform.utils.StringUtil;
- import com.yihu.wsgw.api.InterfaceMessage;
- import net.sf.json.JSONException;
- import net.sf.json.JSONObject;
- /**
- * 医生接口
- * @author wengsb----yihu.com
- * 2017年8月17日下午3:00:15
- */
- public class DoctorApi {
- /**
- * 通过医院id,医生id获取医生列表
- * @param msg
- * @return
- */
- public String queryComplexDoctorList_v2(InterfaceMessage msg) {
- try {
- JSONObject json = JSONObject.fromObject(msg.getParam());
- Integer id = StringUtil.isEmpty(json.get("id")) ? null : json.getInt("id");
- String param = StringUtil.isEmpty(json.get("param")) ? "" : json.getString("param");
- if (StringUtil.isEmpty(id)) {
- return ApiUtil.getRespJSON(-10000, "id不能为空").toString();
- }
- JSONObject result = new JSONObject();
- result.put("hosDeptId", "");
- result.put("doctorUid", "");
- result.put("doctorName", "");
- result.put("doctorSex", "");
- result.put("lczc", "");
- result.put("lczcName", "");
- result.put("spells", "");
- result.put("skill", "");
- result.put("intro", "");
- result.put("photoUri", "");
- result.put("provinceId", "");
- result.put("provinceName", "");
- result.put("cityId", "");
- result.put("cityName", "");
- result.put("hospitalId", "");
- result.put("hosName", "");
- result.put("deptName", "");
-
- JSONObject obj = ApiUtil.getRespJSON(10000, "成功");
- obj.put("Result", result);
- obj.put("Count", 10);
- return obj.toString();
- } catch (JSONException e) {
- return ApiUtil.getRespJSON(-10000, "非标准json:[" + msg.getParam() + "]").toString();
- } catch (Exception e) {
- e.printStackTrace();
- return ApiUtil.getRespJSON(-14444, "加载异常!" + StringUtil.getException(e)).toString();
- }
- }
-
- }
|