Selaa lähdekoodia

Merge branch 'dev' of huangwenjie/patient-co-management into dev

chenweida 8 vuotta sitten
vanhempi
commit
9c7fae94f2

+ 26 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwSmjkService.java

@ -1041,4 +1041,30 @@ public class JwSmjkService {
            return resultArray.toString();
        }
    }
    /**
     * 获取转诊预约医生列表
     * @param orgCode   机构编码
     * @param deptCode  科室编码
     * @param strCredential 身份证据
     * @return
     */
    public String getRegDeptSpeDoctorList(String orgCode, String deptCode, String strCredential) {
        String url = jwUrl + "/third/smjk/RegDeptSpeDoctorList";
        List<NameValuePair> params = new ArrayList<>();
        //当前时间;
        String strStart = DateUtil.getStringDateShort();
        //10天预约
        String strEnd = DateUtil.getNextDay(strStart, 11);
        params.add(new BasicNameValuePair("orgCode", orgCode));
        params.add(new BasicNameValuePair("deptCode", deptCode));
        params.add(new BasicNameValuePair("strStart", strStart));
        params.add(new BasicNameValuePair("strEnd", strEnd));
        params.add(new BasicNameValuePair("strCredential", strCredential));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        return response;
    }
}

+ 26 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/WlyySerivceController.java

@ -7,16 +7,14 @@ import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.*;
@ -218,6 +216,30 @@ public class WlyySerivceController extends BaseController{
        }
    }
    /**
     * 获取转诊预约医生列表
     * @param orgCode   机构编码
     * @param deptCode  科室编码
     * @param strCredential 身份证据
     * @return
     */
    @RequestMapping(value = "/third/smjk/RegDeptSpeDoctorList",method = RequestMethod.POST)
    @ApiOperation("获取转诊预约医生列表")
    @ResponseBody
    public String getRegDeptSpeDoctorList(
            @ApiParam(name="orgCode",value="机构编码") @RequestParam(name="orgCode",required = true) String orgCode,
            @ApiParam(name="deptCode",value="科室编码") @RequestParam(name="deptCode",required = true) String deptCode,
            @ApiParam(name="strCredential",value="身份证据") @RequestParam(name="strCredential",required = true) String strCredential){
        try {
            String list  = jwSmjkService.getRegDeptSpeDoctorList(orgCode,deptCode,strCredential);
            return write(200, "获取转诊预约医生列表成功!", "data", list);
        } catch (Exception ex) {
            ex.printStackTrace();
            return error(-1,"获取转诊预约医生列表列表失败");
        }
    }
    /**
     * 转诊预约医生号源转换
     * @param xml