Browse Source

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

yeshijie 7 years ago
parent
commit
5495bd69cf

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/SwaggerConfig.java

@ -175,6 +175,7 @@ public class SwaggerConfig {
                        regex("/wechat/.*"),
                        regex("/nofilter/.*"),
                        regex("/idc10/.*"),
                        regex("/im_new/.*"),
                        regex("/version/.*"),
                        regex("/express/.*")

+ 10 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImUtill.java

@ -115,7 +115,7 @@ public class ImUtill {
     * @param pagesize
     * @return
     */
    public String getConsultByStatusAndType(String user,Integer status,Integer reply,Integer type,int page,int pagesize){
    public String getConsultByStatusAndType(String user,Integer status,Integer reply,Integer type,String patientName,String startTime,String endTime,int page,int pagesize){
        String imAddr = im_host + "api/v2/sessions/topicListByType";
        imAddr = imAddr + "?user="+user + "&page=" + page + "&pagesize=" + pagesize;
        if (status != null) {
@ -127,6 +127,15 @@ public class ImUtill {
        if (type != null) {
            imAddr += ("&type=" + type);
        }
        if (patientName != null) {
            imAddr += ("&patientName=" + patientName);
        }
        if (startTime != null) {
            imAddr += ("&startTime=" + startTime);
        }
        if (endTime != null) {
            imAddr += ("&endTime=" + endTime);
        }
        String response = HttpClientUtil.get(imAddr, "UTF-8");
        return response;
    }

+ 6 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/im/imController.java

@ -9,6 +9,7 @@ import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.util.ImUtill;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -132,7 +133,10 @@ public class imController extends BaseController {
            @RequestParam(required = false) String doctor,
            @RequestParam Integer status,
            @RequestParam(required = false) Integer reply,
            @RequestParam(required = false) Integer type,
            @ApiParam(name = "type", value = "咨询类型") @RequestParam(required = false) Integer type,
            @ApiParam(name = "patientName", value = "居民姓名") @RequestParam(required = false) String patientName,
            @ApiParam(name = "startTime", value = "开始时间") @RequestParam(required = false) String startTime,
            @ApiParam(name = "endTime", value = "结束时间") @RequestParam(required = false) String endTime,
            @RequestParam int page,
            @RequestParam int pagesize) {
        try {
@ -143,7 +147,7 @@ public class imController extends BaseController {
            if(type==null){
                consult = ImUtill.getConsultByStatus(doctor, status, reply, page, pagesize);
            }else {
                consult = ImUtill.getConsultByStatusAndType(doctor, status, reply,type, page, pagesize);
                consult = ImUtill.getConsultByStatusAndType(doctor, status, reply,type,patientName,startTime,endTime, page, pagesize);
            }
            JSONArray jsonArray = new JSONArray(consult);
            Iterator<Object> it = jsonArray.iterator();