Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

huangwenjie 7 years ago
parent
commit
6fed6d4877
31 changed files with 230 additions and 64 deletions
  1. 56 0
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/third/template/WlyyFeldsherTemplateController.java
  2. 1 1
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/save/es/ElasticFactory.java
  3. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/ehc/PatientEHCService.java
  4. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java
  5. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java
  6. 4 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java
  7. 6 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ElasticsearchUtil.java
  8. 15 17
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java
  9. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/area/AreaController.java
  10. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/device/DeviceController.java
  11. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/health/HealthEduArticlesController.java
  12. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/hospital/HospitalCommonController.java
  13. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/icd/Icd10Controller.java
  14. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/im/imController.java
  15. 9 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/qrcode/QrCodeController.java
  16. 3 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/CaptchaController.java
  17. 16 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/ManagerUtilController.java
  18. 8 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/WlyySerivceController.java
  19. 1 15
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/verified/VerifiedController.java
  20. 7 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java
  21. 7 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/archives/DoctorArchivesController.java
  22. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/booking/DoctorBookingController.java
  23. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultMoviController.java
  24. 8 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/device/DoctorDeviceController.java
  25. 17 8
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/discussion/DoctorDiscussionGroupController.java
  26. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/family/DoctorFamilyController.java
  27. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prenatalInspector/PrenatalController.java
  28. 5 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/scheduling/DoctorWorkTimeController.java
  29. 16 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java
  30. 30 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java
  31. 1 1
      patient-co/patient-co-wlyy/src/main/resources/application-test.yml

+ 56 - 0
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/third/template/WlyyFeldsherTemplateController.java

@ -0,0 +1,56 @@
package com.yihu.wlyy.web.third.template;
import com.yihu.wlyy.repository.template.DoctorGuidanceTempDao;
import com.yihu.wlyy.service.template.DoctorFeldsherTemplateService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
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;
/**
 * 医生助手模板(供外部应用调用,无需校验)
 * <p>
 * Created by Reece on 2017/9/14.
 */
@RestController
@RequestMapping(value = "/wlyy/feldsher")
@Api(description = "医生助手模板")
public class WlyyFeldsherTemplateController extends BaseController {
    @Autowired
    private DoctorFeldsherTemplateService feldsherTemplateService;
    /**
     * i健康往医生助手 医生端推送模板消息
     *
     * @param type 消息类型
     * @param openId
     * @param url
     * @param first
     * @param remark
     * @param keywords
     * @return
     */
    @RequestMapping(value = "/sendDoctorTemplates", method = RequestMethod.POST)
    @ApiOperation(value = "医生助手给医生发送模板消息")
    public String sendDoctorTemplates(@RequestParam @ApiParam(value = "模板类型",required = true) int type,
                                      @RequestParam @ApiParam(value = "openId", required = true) String openId,
                                      @RequestParam @ApiParam(value = "跳转链接", required = true) String url,
                                      @RequestParam @ApiParam(value = "消息头",required = true) String first,
                                      @RequestParam @ApiParam(value = "消息尾", required = true,defaultValue = "") String remark,
                                      @RequestParam @ApiParam(value = "消息体",required = true) String ... keywords) {
        try {
            feldsherTemplateService.sendDoctorTemplates(type, openId, url, first, remark, keywords);
            return write(200, "发送成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return invalidUserException(e, -1, "发送失败!");
        }
    }
}

+ 1 - 1
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/save/es/ElasticFactory.java

@ -54,7 +54,7 @@ public class ElasticFactory {
        // Construct a new Jest client according to configuration via factory
        // Construct a new Jest client according to configuration via factory
        factory = new JestClientFactory();
        factory = new JestClientFactory();
        HttpClientConfig httpClientConfig = new HttpClientConfig
        HttpClientConfig httpClientConfig = new HttpClientConfig
                .Builder(Arrays.asList(hostArray))
                .Builder(Arrays.asList(hostArray))//http://59.61.92.90:9065,http://59.61.92.90:9067
                .multiThreaded(true)
                .multiThreaded(true)
                .maxTotalConnection(50)// 最大链接
                .maxTotalConnection(50)// 最大链接
                .maxConnectionIdleTime(120, TimeUnit.SECONDS)//链接等待时间
                .maxConnectionIdleTime(120, TimeUnit.SECONDS)//链接等待时间

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/ehc/PatientEHCService.java

@ -44,7 +44,7 @@ public class PatientEHCService extends BaseService {
    public String EHCRedirecturl(String getUid) throws Exception {
    public String EHCRedirecturl(String getUid) throws Exception {
        String result = null;
        String result = null;
        try {
        try {
            String format = "yyyyMMddHHmmss";
            String format = "yyyyMMdd";
            String currentTime = DateUtils.getOutTradeTime();
            String currentTime = DateUtils.getOutTradeTime();
            String uuid = DateUtil.getUidNo(4);
            String uuid = DateUtil.getUidNo(4);
@ -101,6 +101,7 @@ public class PatientEHCService extends BaseService {
            bizContent.put("telephone", phone);
            bizContent.put("telephone", phone);
            bizContent.put("address", address);
            bizContent.put("address", address);
            bizContent.put("work_unit", provinceName + cityName + townName + streetName);
            bizContent.put("work_unit", provinceName + cityName + townName + streetName);
            logger.info("params======> "+bizContent.toString());
            result = httpUtils(getUid, api, appId, termId, appKey, signType, encType, version, redirecturl, bizContent);
            result = httpUtils(getUid, api, appId, termId, appKey, signType, encType, version, redirecturl, bizContent);
        } catch (Exception e) {
        } catch (Exception e) {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -870,7 +870,7 @@ public class FollowUpService extends BaseService {
                    Doctor doctor1 = doctorDao.findByCode(doctor);
                    Doctor doctor1 = doctorDao.findByCode(doctor);
                    String doctorOpenID = doctor1.getOpenid();
                    String doctorOpenID = doctor1.getOpenid();
                    if (StringUtils.isNotEmpty(doctorOpenID)) {
                    if (StringUtils.isNotEmpty(doctorOpenID)) {
                        String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
                        String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                        List<NameValuePair> params = new ArrayList<>();
                        List<NameValuePair> params = new ArrayList<>();
                        params.add(new BasicNameValuePair("type", "6"));
                        params.add(new BasicNameValuePair("type", "6"));
                        params.add(new BasicNameValuePair("openId", doctorOpenID));
                        params.add(new BasicNameValuePair("openId", doctorOpenID));

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -487,7 +487,7 @@ public class PatientHealthIndexService extends BaseService {
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            if (StringUtils.isNotEmpty(doctorOpenID)) {
            if (StringUtils.isNotEmpty(doctorOpenID)) {
                List<Message> messagesList = messageDao.findUnreadHealthIndex(patientCode, receiver);
                List<Message> messagesList = messageDao.findUnreadHealthIndex(patientCode, receiver);
                String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
                String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                List<NameValuePair> params = new ArrayList<>();
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("type", "3"));
                params.add(new BasicNameValuePair("type", "3"));
                params.add(new BasicNameValuePair("openId", doctorOpenID));
                params.add(new BasicNameValuePair("openId", doctorOpenID));

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -577,7 +577,7 @@ public class FamilyContractService extends BaseService {
            }
            }
//            新增发送医生助手模板消息 v1.4.0 by wujunjie
//            新增发送医生助手模板消息 v1.4.0 by wujunjie
            if (StringUtils.isNotEmpty(d.getOpenid())){
            if (StringUtils.isNotEmpty(d.getOpenid())){
                String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
                String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                List<NameValuePair> params = new ArrayList<>();
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
@ -698,7 +698,7 @@ public class FamilyContractService extends BaseService {
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            if (StringUtils.isNotEmpty(d.getOpenid())){
            if (StringUtils.isNotEmpty(d.getOpenid())){
                String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
                String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                List<NameValuePair> params = new ArrayList<>();
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
@ -3449,7 +3449,7 @@ public class FamilyContractService extends BaseService {
            }
            }
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            if (StringUtils.isNotEmpty(d.getOpenid())){
            if (StringUtils.isNotEmpty(d.getOpenid())){
                String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
                String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                List<NameValuePair> params = new ArrayList<>();
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
@ -3661,7 +3661,7 @@ public class FamilyContractService extends BaseService {
            }
            }
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            //            新增发送医生助手模板消息 v1.4.0 by wujunjie
            if (StringUtils.isNotEmpty(d.getOpenid())){
            if (StringUtils.isNotEmpty(d.getOpenid())){
                String url = doctorAssistant + "/doctor/feldsher/sendDoctorTemplates";
                String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                List<NameValuePair> params = new ArrayList<>();
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("type", "5"));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));
                params.add(new BasicNameValuePair("openId", d.getOpenid()));

+ 6 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ElasticsearchUtil.java

@ -50,7 +50,13 @@ public class ElasticsearchUtil {
    public List excute(String sql, Class clazz, String esType, String esIndex) {
    public List excute(String sql, Class clazz, String esType, String esIndex) {
        List saveModels = new ArrayList<>();
        List saveModels = new ArrayList<>();
        try {
        try {
            //解决 group by之后默认是200的问题
            if(sql.toLowerCase().contains("group by")){
                sql=sql+" limit 0,2000";
            }
            SQLExprParser parser = new ElasticSqlExprParser(sql);
            SQLExprParser parser = new ElasticSqlExprParser(sql);
            SQLExpr expr = parser.expr();
            SQLExpr expr = parser.expr();
            SQLQueryExpr queryExpr = (SQLQueryExpr) expr;
            SQLQueryExpr queryExpr = (SQLQueryExpr) expr;

+ 15 - 17
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java

@ -1,24 +1,15 @@
package com.yihu.wlyy.web.common;
package com.yihu.wlyy.web.common;
import java.io.*;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.*;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.util.CommonUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.ImageCompress;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
import com.yihu.wlyy.web.third.gateway.vo.UploadModel;
import com.yihu.wlyy.web.third.gateway.vo.base.BaseResultModel;
import com.yihu.wlyy.web.third.gateway.vo.base.ResultOneModel;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FileUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponse;
@ -27,7 +18,6 @@ import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.Logger;
@ -43,10 +33,17 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import com.yihu.wlyy.web.BaseController;
import org.springframework.web.multipart.MultipartRequest;
import org.springframework.web.multipart.MultipartRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.*;
@Controller
@Controller
@RequestMapping(value = "/upload", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/upload", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "文件上传")
@Api(description = "文件上传")
@ -512,6 +509,7 @@ public class FileUploadController extends BaseController {
            }
            }
            return responseEntity;
            return responseEntity;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "上传失败");
            return error(-1, "上传失败");
        }
        }
    }
    }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/area/AreaController.java

@ -1,7 +1,6 @@
package com.yihu.wlyy.web.common.area;
package com.yihu.wlyy.web.common.area;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.common.area.AreaService;
import com.yihu.wlyy.service.common.area.AreaService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
@ -37,6 +36,7 @@ public class AreaController extends BaseController {
            List<Town> towns = areaService.getCityTowns(city);
            List<Town> towns = areaService.getCityTowns(city);
            return write(200, "查询成功", "data", towns == null ? new ArrayList<Town>() : towns);
            return write(200, "查询成功", "data", towns == null ? new ArrayList<Town>() : towns);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/device/DeviceController.java

@ -59,6 +59,7 @@ public class DeviceController extends BaseController {
            return write(200, "查询成功", "data", device);
            return write(200, "查询成功", "data", device);
        } catch (Exception ex) {
        } catch (Exception ex) {
            error(ex);
            return invalidUserException(ex, -1, ex.getMessage());
            return invalidUserException(ex, -1, ex.getMessage());
        }
        }
    }
    }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/health/HealthEduArticlesController.java

@ -55,6 +55,7 @@ public class HealthEduArticlesController extends BaseController{
            }
            }
            return write(-1, "数据导入失败!");
            return write(-1, "数据导入失败!");
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1, "数据导入失败!");
            return error(-1, "数据导入失败!");
        }
        }

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/hospital/HospitalCommonController.java

@ -29,6 +29,7 @@ public class HospitalCommonController extends BaseController {
            List<Hospital> hospitals = hospitalService.getHositalByTownCode(town);
            List<Hospital> hospitals = hospitalService.getHositalByTownCode(town);
            return write(200, "查询成功", "data", hospitals == null ? new ArrayList<Hospital>() : hospitals);
            return write(200, "查询成功", "data", hospitals == null ? new ArrayList<Hospital>() : hospitals);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -40,6 +41,7 @@ public class HospitalCommonController extends BaseController {
            List<Hospital> hospitals = hospitalService.getHospitalsNot00(getUID());
            List<Hospital> hospitals = hospitalService.getHospitalsNot00(getUID());
            return write(200, "查询成功", "data", hospitals == null ? new ArrayList<Hospital>() : hospitals);
            return write(200, "查询成功", "data", hospitals == null ? new ArrayList<Hospital>() : hospitals);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/icd/Icd10Controller.java

@ -25,6 +25,7 @@ public class Icd10Controller extends BaseController {
        try {
        try {
            return write(200, "查询成功", "data", icd10DictServcie.getIcd10Name(code));
            return write(200, "查询成功", "data", icd10DictServcie.getIcd10Name(code));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -47,6 +48,7 @@ public class Icd10Controller extends BaseController {
        try {
        try {
            return write(200, "查询成功", "data", icd10DictServcie.getHealthProblemName(code));
            return write(200, "查询成功", "data", icd10DictServcie.getHealthProblemName(code));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -59,6 +61,7 @@ public class Icd10Controller extends BaseController {
        try {
        try {
            return write(200, "查询成功", "data", icd10DictServcie.getHealthProblemsByIcd10Code(code));
            return write(200, "查询成功", "data", icd10DictServcie.getHealthProblemsByIcd10Code(code));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -70,6 +73,7 @@ public class Icd10Controller extends BaseController {
            icd10DictServcie.cacheDict();
            icd10DictServcie.cacheDict();
            return write(200, "查询成功");
            return write(200, "查询成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }

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

@ -48,6 +48,7 @@ public class imController extends BaseController {
        try {
        try {
            return success(ImUtill.getTopic(consult).get("data").toString());
            return success(ImUtill.getTopic(consult).get("data").toString());
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }

+ 9 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/qrcode/QrCodeController.java

@ -42,6 +42,7 @@ public class QrCodeController extends WeixinBaseController {
                return error(-1, "生成二维码失败!");
                return error(-1, "生成二维码失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "生成二维码失败!");
            return error(-1, "生成二维码失败!");
        }
        }
    }
    }
@ -62,6 +63,7 @@ public class QrCodeController extends WeixinBaseController {
                return error(-1, "生成二维码失败!");
                return error(-1, "生成二维码失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "生成二维码失败!");
            return error(-1, "生成二维码失败!");
        }
        }
    }
    }
@ -82,6 +84,7 @@ public class QrCodeController extends WeixinBaseController {
                return error(-1, "生成二维码失败!");
                return error(-1, "生成二维码失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "生成二维码失败!");
            return error(-1, "生成二维码失败!");
        }
        }
    }
    }
@ -102,6 +105,7 @@ public class QrCodeController extends WeixinBaseController {
                return error(-1, "生成二维码失败!");
                return error(-1, "生成二维码失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "生成二维码失败!");
            return error(-1, "生成二维码失败!");
        }
        }
    }
    }
@ -145,7 +149,7 @@ public class QrCodeController extends WeixinBaseController {
                response.setStatus(404);
                response.setStatus(404);
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
        }
        }
    }
    }
@ -287,6 +291,7 @@ public class QrCodeController extends WeixinBaseController {
                throw new Exception("医生信息不存在!");
                throw new Exception("医生信息不存在!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            response.setStatus(500);
            response.setStatus(500);
        }
        }
    }
    }
@ -322,6 +327,7 @@ public class QrCodeController extends WeixinBaseController {
                response.setStatus(500);
                response.setStatus(500);
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            response.setStatus(500);
            response.setStatus(500);
        }
        }
    }
    }
@ -357,6 +363,7 @@ public class QrCodeController extends WeixinBaseController {
                response.setStatus(500);
                response.setStatus(500);
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            response.setStatus(500);
            response.setStatus(500);
        }
        }
    }
    }
@ -392,6 +399,7 @@ public class QrCodeController extends WeixinBaseController {
                response.setStatus(500);
                response.setStatus(500);
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            response.setStatus(500);
            response.setStatus(500);
        }
        }
    }
    }

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/CaptchaController.java

@ -50,6 +50,7 @@ public class CaptchaController extends BaseController {
        try{
        try{
            return generateCaptcha();
            return generateCaptcha();
        } catch (Exception e){
        } catch (Exception e){
            error(e);
            return error(500, e.getMessage());
            return error(500, e.getMessage());
        }
        }
    }
    }
@ -62,6 +63,7 @@ public class CaptchaController extends BaseController {
            return generateCaptcha();
            return generateCaptcha();
        } catch (Exception e){
        } catch (Exception e){
            error(e);
            return error(500, e.getMessage());
            return error(500, e.getMessage());
        }
        }
    }
    }
@ -80,6 +82,7 @@ public class CaptchaController extends BaseController {
            return write(200, "ok", "pass", pass);
            return write(200, "ok", "pass", pass);
        } catch (Exception e){
        } catch (Exception e){
            error(e);
            return error(500, e.getMessage());
            return error(500, e.getMessage());
        }
        }
    }
    }

+ 16 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/ManagerUtilController.java

@ -63,6 +63,7 @@ public class ManagerUtilController extends BaseController {
            diseaseService.updateToRedis();
            diseaseService.updateToRedis();
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -78,6 +79,7 @@ public class ManagerUtilController extends BaseController {
            diseaseService.updateToDisease();
            diseaseService.updateToDisease();
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -93,6 +95,7 @@ public class ManagerUtilController extends BaseController {
        try {
        try {
            return write(200, "查询成功", "data", redisTemplate.opsForValue().get("disease:" + patient));
            return write(200, "查询成功", "data", redisTemplate.opsForValue().get("disease:" + patient));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -111,6 +114,7 @@ public class ManagerUtilController extends BaseController {
            workTimeService.consultTimesRemain(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
            workTimeService.consultTimesRemain(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -127,6 +131,7 @@ public class ManagerUtilController extends BaseController {
            statisticsService.peopleNumToRedis(year);
            statisticsService.peopleNumToRedis(year);
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -142,6 +147,7 @@ public class ManagerUtilController extends BaseController {
            manageUtilService.signPatientSetGroup();
            manageUtilService.signPatientSetGroup();
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -157,6 +163,7 @@ public class ManagerUtilController extends BaseController {
            manageUtilService.setSignTeamAndGroupByPage(page);
            manageUtilService.setSignTeamAndGroupByPage(page);
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -172,6 +179,7 @@ public class ManagerUtilController extends BaseController {
            manageUtilService.setSignTeamAndGroupById(id);
            manageUtilService.setSignTeamAndGroupById(id);
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -192,6 +200,7 @@ public class ManagerUtilController extends BaseController {
                return write(200, "查询成功", "data", ManageUtilService.errorSigns);
                return write(200, "查询成功", "data", ManageUtilService.errorSigns);
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -208,6 +217,7 @@ public class ManagerUtilController extends BaseController {
                    .setEnd(end).setStart(start)).start();
                    .setEnd(end).setStart(start)).start();
            return write(200, "启动成功");
            return write(200, "启动成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }
@ -224,6 +234,7 @@ public class ManagerUtilController extends BaseController {
            manageUtilService.transformEduArticle();
            manageUtilService.transformEduArticle();
            return write(200, "启动成功");
            return write(200, "启动成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }
@ -262,6 +273,7 @@ public class ManagerUtilController extends BaseController {
            jo.put("patient_online", SystemData.patientTokens.size());
            jo.put("patient_online", SystemData.patientTokens.size());
            return write(200, "启动成功","data",jo);
            return write(200, "启动成功","data",jo);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }
@ -280,6 +292,7 @@ public class ManagerUtilController extends BaseController {
            GateWayInterceptor.status = close;
            GateWayInterceptor.status = close;
            return write(200, "关闭成功");
            return write(200, "关闭成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }
@ -294,6 +307,7 @@ public class ManagerUtilController extends BaseController {
            GateWayInterceptor.status = open;
            GateWayInterceptor.status = open;
            return write(200, "开启成功");
            return write(200, "开启成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }
@ -320,6 +334,7 @@ public class ManagerUtilController extends BaseController {
            }
            }
            return write(200, "关闭成功");
            return write(200, "关闭成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }
@ -346,6 +361,7 @@ public class ManagerUtilController extends BaseController {
            }
            }
            return write(200, "开启成功");
            return write(200, "开启成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "启动失败");
            return error(-1, "启动失败");
        }
        }
    }
    }

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

@ -3,7 +3,6 @@ package com.yihu.wlyy.web.common.util;
import com.yihu.wlyy.service.third.guahao.GuahaoXMService;
import com.yihu.wlyy.service.third.guahao.GuahaoXMService;
import com.yihu.wlyy.service.third.jw.JwSmjkService;
import com.yihu.wlyy.service.third.jw.JwSmjkService;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
@ -12,13 +11,14 @@ import org.apache.commons.lang3.StringUtils;
import org.dom4j.Document;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.Element;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
/**
 * Created by lyr on 2016/9/29.
 * Created by lyr on 2016/9/29.
@ -56,6 +56,7 @@ public class WlyySerivceController extends BaseController{
                return write(200,"调用成功","data",jsonString);
                return write(200,"调用成功","data",jsonString);
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1,"调用失败");
            return error(-1,"调用失败");
        }
        }
    }
    }
@ -101,6 +102,7 @@ public class WlyySerivceController extends BaseController{
                return write(200,"调用成功","data",jsonString);
                return write(200,"调用成功","data",jsonString);
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1,"调用失败");
            return error(-1,"调用失败");
        }
        }
    }
    }
@ -147,6 +149,7 @@ public class WlyySerivceController extends BaseController{
                return write(200,"调用成功","data",jsonString);
                return write(200,"调用成功","data",jsonString);
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1,"调用失败");
            return error(-1,"调用失败");
        }
        }
    }
    }
@ -188,6 +191,7 @@ public class WlyySerivceController extends BaseController{
                return write(200,"调用成功","data",jsonString);
                return write(200,"调用成功","data",jsonString);
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1,"调用失败");
            return error(-1,"调用失败");
        }
        }
    }
    }

+ 1 - 15
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/verified/VerifiedController.java

@ -1,28 +1,13 @@
package com.yihu.wlyy.web.common.verified;
package com.yihu.wlyy.web.common.verified;
import com.yihu.wlyy.service.third.verified.VerifiedService;
import com.yihu.wlyy.service.third.verified.VerifiedService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.ImageCompress;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.io.FileUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Controller;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import sun.misc.BASE64Encoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
@Controller
@Controller
@RequestMapping(value = "/verified", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/verified", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ -69,6 +54,7 @@ public class VerifiedController extends BaseController {
			return write(200, "人脸识别成功!");
			return write(200, "人脸识别成功!");
		} catch (Exception e) {
		} catch (Exception e) {
			error(e);
			return error(-1, e.getMessage());
			return error(-1, e.getMessage());
		}
		}
	}
	}

+ 7 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -293,6 +293,7 @@ public class DoctorController extends BaseController {
            return write(200, "查询成功", "data", hos);
            return write(200, "查询成功", "data", hos);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -355,6 +356,7 @@ public class DoctorController extends BaseController {
            JSONArray doctors = doctorInfoService.findWorkingDoctorListByDept(dept, hospital, level, key, page, pagesize);
            JSONArray doctors = doctorInfoService.findWorkingDoctorListByDept(dept, hospital, level, key, page, pagesize);
            return write(200, "查询成功", "data", doctors);
            return write(200, "查询成功", "data", doctors);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -1351,6 +1353,7 @@ public class DoctorController extends BaseController {
            }
            }
            return write(200, "查询成功!", "doctors", array);
            return write(200, "查询成功!", "doctors", array);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");
        }
        }
    }
    }
@ -1400,6 +1403,7 @@ public class DoctorController extends BaseController {
                return error(-1, "更新失败");
                return error(-1, "更新失败");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -1451,6 +1455,7 @@ public class DoctorController extends BaseController {
                return error(-1, "更新失败");
                return error(-1, "更新失败");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "更新失败");
            return error(-1, "更新失败");
        }
        }
    }
    }
@ -1609,6 +1614,7 @@ public class DoctorController extends BaseController {
                return write(-1, "手机号更新失败");
                return write(-1, "手机号更新失败");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "手机号更新失败");
            return error(-1, "手机号更新失败");
        }
        }
    }
    }
@ -1667,6 +1673,7 @@ public class DoctorController extends BaseController {
            doctorInfoService.updatePassword(newPassword1, newPassword2, oldPassword, doctorCode);
            doctorInfoService.updatePassword(newPassword1, newPassword2, oldPassword, doctorCode);
            return write(200, "更新成功");
            return write(200, "更新成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }

+ 7 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/archives/DoctorArchivesController.java

@ -52,6 +52,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "获取就诊记录成功!", "data", result);
            return write(200, "获取就诊记录成功!", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            {
            {
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
@ -82,6 +83,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "获取健康档案详情成功!", "data", result);
            return write(200, "获取健康档案详情成功!", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            {
            {
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
@ -108,6 +110,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "通过事件号获取档案类型列表成功!", "data", result);
            return write(200, "通过事件号获取档案类型列表成功!", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            {
            {
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
@ -137,6 +140,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "获取用药记录成功!", "data", result);
            return write(200, "获取用药记录成功!", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            {
            {
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
@ -168,6 +172,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "获取检查检验报告成功!", "data", result);
            return write(200, "获取检查检验报告成功!", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            if(e.getMessage().indexOf("卡号尚未在医疗机构注册过")>0)
            {
            {
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
                return error(-1,"对不起,您的社保卡有变更,请改天再试");
@ -194,7 +199,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "获取就诊事件详情成功!", "data", result);
            return write(200, "获取就诊事件详情成功!", "data", result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "获取就诊事件详情失败!");
            return invalidUserException(e, -1, "获取就诊事件详情失败!");
        }
        }
    }
    }
@ -211,6 +216,7 @@ public class DoctorArchivesController extends BaseController {
            return write(200, "保存就诊事件成功!");
            return write(200, "保存就诊事件成功!");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return invalidUserException(e, -1, "保存就诊事件失败!");
            return invalidUserException(e, -1, "保存就诊事件失败!");
        }
        }
    }
    }

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/booking/DoctorBookingController.java

@ -59,6 +59,7 @@ public class DoctorBookingController extends BaseController{
                return error(-1, "挂号单不存在!");
                return error(-1, "挂号单不存在!");
            }
            }
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -105,6 +106,7 @@ public class DoctorBookingController extends BaseController{
                return error(-1, "取消挂号单失败!");
                return error(-1, "取消挂号单失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultMoviController.java

@ -102,7 +102,7 @@ public class DoctorConsultMoviController extends BaseController {
	/**
	/**
	 * 根据code查询电话和视频详情
	 * 根据code查询电话和视频详情
	 * @param consult 咨询标识
	 * @param code 咨询标识
	 * @return
	 * @return
	 */
	 */
	@ApiOperation("根据code查询电话和视频详情")
	@ApiOperation("根据code查询电话和视频详情")

+ 8 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/device/DoctorDeviceController.java

@ -58,6 +58,7 @@ public class DoctorDeviceController extends BaseController {
			return success("设备保存成功!");
			return success("设备保存成功!");
		}
		}
		catch (Exception ex) {
		catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, ex.getMessage());
			return invalidUserException(ex, -1, ex.getMessage());
		}
		}
	}
	}
@ -77,6 +78,7 @@ public class DoctorDeviceController extends BaseController {
			return write(200, "查询成功", "data", list);
			return write(200, "查询成功", "data", list);
		} catch (Exception ex) {
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, ex.getMessage());
			return invalidUserException(ex, -1, ex.getMessage());
		}
		}
	}
	}
@ -119,6 +121,7 @@ public class DoctorDeviceController extends BaseController {
				return error(-1, "不存在该设备!");
				return error(-1, "不存在该设备!");
			}
			}
		} catch (Exception ex) {
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1,ex.getMessage());
			return invalidUserException(ex, -1,ex.getMessage());
		}
		}
	}
	}
@ -138,6 +141,7 @@ public class DoctorDeviceController extends BaseController {
			patientDeviceService.deleteDevices(deviceSn,type,getUID());
			patientDeviceService.deleteDevices(deviceSn,type,getUID());
			return write(200,"解绑成功!");
			return write(200,"解绑成功!");
		}catch (Exception e){
		}catch (Exception e){
			error(e);
			return write(-1,e.getMessage());
			return write(-1,e.getMessage());
		}
		}
	}
	}
@ -153,6 +157,7 @@ public class DoctorDeviceController extends BaseController {
			return write(200, "查询成功", "data", device);
			return write(200, "查询成功", "data", device);
		} catch (Exception ex) {
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, ex.getMessage());
			return invalidUserException(ex, -1, ex.getMessage());
		}
		}
	}
	}
@ -174,6 +179,7 @@ public class DoctorDeviceController extends BaseController {
			return error(-1, re);
			return error(-1, re);
		}catch (Exception e){
		}catch (Exception e){
			error(e);
			return error(-1,e.getMessage());
			return error(-1,e.getMessage());
		}
		}
	}
	}
@ -188,6 +194,7 @@ public class DoctorDeviceController extends BaseController {
			String re = patientDeviceService.registerSn(deviceSn);
			String re = patientDeviceService.registerSn(deviceSn);
			return write(200,re);
			return write(200,re);
		}catch (Exception e){
		}catch (Exception e){
			error(e);
			return error(-1,e.getMessage());
			return error(-1,e.getMessage());
		}
		}
	}
	}
@ -207,6 +214,7 @@ public class DoctorDeviceController extends BaseController {
			List<Map<String,String>> list = patientDeviceService.getDeviceUser(patient,deviceSn,type);
			List<Map<String,String>> list = patientDeviceService.getDeviceUser(patient,deviceSn,type);
			return write(200, "获取设备绑定信息成功!", "data",list);
			return write(200, "获取设备绑定信息成功!", "data",list);
		} catch (Exception ex) {
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, ex.getMessage());
			return invalidUserException(ex, -1, ex.getMessage());
		}
		}
	}
	}

+ 17 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/discussion/DoctorDiscussionGroupController.java

@ -1,19 +1,17 @@
package com.yihu.wlyy.web.doctor.discussion;
package com.yihu.wlyy.web.doctor.discussion;
import java.util.*;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.consult.Consult;
import com.yihu.wlyy.entity.consult.ConsultTeam;
import com.yihu.wlyy.entity.consult.ConsultTeam;
import com.yihu.wlyy.entity.discussion.WlyyTalkGroup;
import com.yihu.wlyy.entity.discussion.WlyyTalkGroup;
import com.yihu.wlyy.entity.discussion.WlyyTalkGroupMember;
import com.yihu.wlyy.entity.discussion.WlyyTalkGroupMember;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.service.app.consult.ConsultService;
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.talk.TalkGroupService;
import com.yihu.wlyy.service.common.account.DoctorService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
@ -27,9 +25,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yihu.wlyy.service.app.talk.TalkGroupService;
import com.yihu.wlyy.service.common.account.DoctorService;
import com.yihu.wlyy.web.BaseController;
import java.util.*;
@Controller
@Controller
@RequestMapping(value = "/doctor/talkgroup", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "/doctor/talkgroup", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ -205,6 +201,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "创建讨论组失败!");
            return error(-1, "创建讨论组失败!");
        }
        }
    }
    }
@ -369,6 +366,7 @@ public class DoctorDiscussionGroupController extends BaseController {
                return error(-1, "创建讨论组失败!");
                return error(-1, "创建讨论组失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "创建讨论组失败");
            return error(-1, "创建讨论组失败");
        }
        }
    }
    }
@ -408,6 +406,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "查询成功", "data", group);
            return write(200, "查询成功", "data", group);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -494,6 +493,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "添加讨论组成员成功!", "data", memberJson);
            return write(200, "添加讨论组成员成功!", "data", memberJson);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "添加讨论组成员失败!");
            return error(-1, "添加讨论组成员失败!");
        }
        }
    }
    }
@ -572,6 +572,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "添加成员成功");
            return write(200, "添加成员成功");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "添加成员失败!");
            return error(-1, "添加成员失败!");
        }
        }
    }
    }
@ -595,6 +596,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            talkGroupService.deleteTalkMember(groupCode, memberCode);
            talkGroupService.deleteTalkMember(groupCode, memberCode);
            return write(200, "移除成员成功!");
            return write(200, "移除成员成功!");
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "移除讨论组成员失败!");
            return error(-1, "移除讨论组成员失败!");
        }
        }
    }
    }
@ -664,6 +666,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "获取医生讨论组成功!", "data", jsonArray);
            return write(200, "获取医生讨论组成功!", "data", jsonArray);
        } catch (Exception ex) {
        } catch (Exception ex) {
            error(ex);
            return error(-1, "获取医生讨论组列表失败!");
            return error(-1, "获取医生讨论组列表失败!");
        }
        }
    }
    }
@ -684,6 +687,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "查询成功", "data", new JSONArray(data));
            return write(200, "查询成功", "data", new JSONArray(data));
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -753,6 +757,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            }
            }
            return write(200, "查询成功", "data", json);
            return write(200, "查询成功", "data", json);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }
@ -796,6 +801,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "获取讨论组成员列表成功!", "data", result);
            return write(200, "获取讨论组成员列表成功!", "data", result);
        } catch (Exception ex) {
        } catch (Exception ex) {
            error(ex);
            return error(-1, "获取讨论组成员列表失败!");
            return error(-1, "获取讨论组成员列表失败!");
        }
        }
    }
    }
@ -814,6 +820,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            JSONArray groups = talkGroupService.getTalkGroupHistories(getUID(), patient);
            JSONArray groups = talkGroupService.getTalkGroupHistories(getUID(), patient);
            return write(200, "获取讨论组历史记录成功!", "data", groups);
            return write(200, "获取讨论组历史记录成功!", "data", groups);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "获取讨论组历史记录失败!");
            return error(-1, "获取讨论组历史记录失败!");
        }
        }
    }
    }
@ -852,6 +859,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "查询成功!", "data", jsonArray);
            return write(200, "查询成功!", "data", jsonArray);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");
        }
        }
    }
    }
@ -870,6 +878,7 @@ public class DoctorDiscussionGroupController extends BaseController {
            return write(200, "查询成功!", "data", count);
            return write(200, "查询成功!", "data", count);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");
        }
        }
    }
    }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/family/DoctorFamilyController.java

@ -60,6 +60,7 @@ public class DoctorFamilyController extends WeixinBaseController {
            return write(200, "查询成功", "list", result.size() > 0 ? new JSONArray(result.values()) : new JSONArray());
            return write(200, "查询成功", "list", result.size() > 0 ? new JSONArray(result.values()) : new JSONArray());
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");
        }
        }
    }
    }

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prenatalInspector/PrenatalController.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.web.doctor.prenatalInspector;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.service.app.prenatalInspector.PrenatalInspectorPreCardService;
import com.yihu.wlyy.service.app.prenatalInspector.PrenatalInspectorPreCardService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
@ -27,6 +28,7 @@ public class PrenatalController extends BaseController{
    @ApiOperation("建卡列表-孕检计划")
    @ApiOperation("建卡列表-孕检计划")
    @RequestMapping(value = "prenatalInspectorList", method = RequestMethod.POST)
    @RequestMapping(value = "prenatalInspectorList", method = RequestMethod.POST)
    @ObserverRequired
    public String prenatalInspectorList(@ApiParam(name = "patient", value = "居民code", defaultValue = "d9de442323324a759ac82857c4692184")
    public String prenatalInspectorList(@ApiParam(name = "patient", value = "居民code", defaultValue = "d9de442323324a759ac82857c4692184")
                                        @RequestParam(value = "patient", required = true) String patient){
                                        @RequestParam(value = "patient", required = true) String patient){
        try {
        try {

+ 5 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/scheduling/DoctorWorkTimeController.java

@ -15,7 +15,6 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
/**
/**
 * Created by lyr on 2016/08/19.
 * Created by lyr on 2016/08/19.
@ -45,6 +44,7 @@ public class DoctorWorkTimeController extends BaseController {
            return write(200, "查询成功!", "data", workTime);
            return write(200, "查询成功!", "data", workTime);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
            return error(-1, "查询失败!");
        }
        }
    }
    }
@ -116,6 +116,7 @@ public class DoctorWorkTimeController extends BaseController {
                return write(-1, "保存失败!");
                return write(-1, "保存失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "保存失败!");
            return error(-1, "保存失败!");
        }
        }
    }
    }
@ -172,6 +173,7 @@ public class DoctorWorkTimeController extends BaseController {
                return error(-1, "设置失败");
                return error(-1, "设置失败");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "设置失败");
            return error(-1, "设置失败");
        }
        }
    }
    }
@ -210,6 +212,7 @@ public class DoctorWorkTimeController extends BaseController {
            JSONObject result = doctorWorkTimeService.isFamousDoctorWorking(doctor);
            JSONObject result = doctorWorkTimeService.isFamousDoctorWorking(doctor);
            return write(200,result.getString("msg"),"data",result.getString("status"));
            return write(200,result.getString("msg"),"data",result.getString("status"));
        }catch (Exception e){
        }catch (Exception e){
            error(e);
            return error(-1,"查询失败");
            return error(-1,"查询失败");
        }
        }
    }
    }
@ -246,6 +249,7 @@ public class DoctorWorkTimeController extends BaseController {
            JSONObject json = doctorWorkTimeService.findDoctorWeekWorkTime(doctor, week);
            JSONObject json = doctorWorkTimeService.findDoctorWeekWorkTime(doctor, week);
            return write(200, "查询成功", "data", json);
            return write(200, "查询成功", "data", json);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
            return error(-1, "查询失败");
        }
        }
    }
    }

+ 16 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java

@ -156,6 +156,7 @@ public class BookingController extends WeixinBaseController {
            return re;
            return re;
//            return write(200, "获取机构列表成功!", "data", re);
//            return write(200, "获取机构列表成功!", "data", re);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -180,6 +181,7 @@ public class BookingController extends WeixinBaseController {
            return list;
            return list;
//            return write(200, "获取科室列表成功!", "data", list);
//            return write(200, "获取科室列表成功!", "data", list);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -207,6 +209,7 @@ public class BookingController extends WeixinBaseController {
            String list  = jwSmjkService.getRegDeptSpeDoctorList(hospitalId,hosDeptId);
            String list  = jwSmjkService.getRegDeptSpeDoctorList(hospitalId,hosDeptId);
            return list;
            return list;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -227,6 +230,7 @@ public class BookingController extends WeixinBaseController {
            String list = jwSmjkService.GetDoctorArrange(hospitalId,hosDeptId,doctorId);
            String list = jwSmjkService.GetDoctorArrange(hospitalId,hosDeptId,doctorId);
            return list;
            return list;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -247,6 +251,7 @@ public class BookingController extends WeixinBaseController {
            String list = jwSmjkService.GetDoctorArrangeSimple(hospitalId,hosDeptId,doctorId);
            String list = jwSmjkService.GetDoctorArrangeSimple(hospitalId,hosDeptId,doctorId);
            return list;
            return list;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -270,6 +275,7 @@ public class BookingController extends WeixinBaseController {
            JSONObject result  = jwSmjkService.GetDoctorInfoTen(hospitalId,hosDeptId,doctorId);
            JSONObject result  = jwSmjkService.GetDoctorInfoTen(hospitalId,hosDeptId,doctorId);
            return write(200, "获取医生详细信息成功!","data",result);
            return write(200, "获取医生详细信息成功!","data",result);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -392,6 +398,7 @@ public class BookingController extends WeixinBaseController {
                return error(-1, "创建挂号单失败!");
                return error(-1, "创建挂号单失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -471,6 +478,7 @@ public class BookingController extends WeixinBaseController {
                return error(-1, "取消挂号单失败!");
                return error(-1, "取消挂号单失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -648,6 +656,7 @@ public class BookingController extends WeixinBaseController {
                return error(-1, "创建挂号单失败!");
                return error(-1, "创建挂号单失败!");
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -666,6 +675,7 @@ public class BookingController extends WeixinBaseController {
            List<Map<String, Object>> list = guahaoXM.GetDoctorArrangeTenDay(hospitalId, hosDeptId, doctorId);
            List<Map<String, Object>> list = guahaoXM.GetDoctorArrangeTenDay(hospitalId, hosDeptId, doctorId);
            return write(200, "获取医生排班成功!", "data", list);
            return write(200, "获取医生排班成功!", "data", list);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -687,6 +697,7 @@ public class BookingController extends WeixinBaseController {
            return write(200, "获取患者预约信息列表成功!", "data", list);
            return write(200, "获取患者预约信息列表成功!", "data", list);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -706,6 +717,7 @@ public class BookingController extends WeixinBaseController {
            return write(200, "获取患者预约信息列表成功!", "data", list);
            return write(200, "获取患者预约信息列表成功!", "data", list);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -722,6 +734,7 @@ public class BookingController extends WeixinBaseController {
            return write(200, "获取患者预约信息成功!", "data", obj);
            return write(200, "获取患者预约信息成功!", "data", obj);
        }
        }
        catch (Exception e) {
        catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -737,6 +750,7 @@ public class BookingController extends WeixinBaseController {
            Long obj = patientReservationService.countReservationByDoctorForPatient(doctor, patient);
            Long obj = patientReservationService.countReservationByDoctorForPatient(doctor, patient);
            return write(200, "获取患者预约信息成功!", "data", obj);
            return write(200, "获取患者预约信息成功!", "data", obj);
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -755,6 +769,7 @@ public class BookingController extends WeixinBaseController {
            String list = jwSmjkService.GetRegList(patient);
            String list = jwSmjkService.GetRegList(patient);
            return list;
            return list;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }
@ -773,6 +788,7 @@ public class BookingController extends WeixinBaseController {
            String obj = jwSmjkService.GetRegDetail(patientCode,orgCode,regCode);
            String obj = jwSmjkService.GetRegDetail(patientCode,orgCode,regCode);
            return obj;
            return obj;
        } catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
            return error(-1, e.getMessage());
        }
        }
    }
    }

+ 30 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java

@ -17,6 +17,7 @@ import com.yihu.wlyy.service.third.ylz.PayLogService;
import com.yihu.wlyy.service.weixin.wxpay.model.BindCard;
import com.yihu.wlyy.service.weixin.wxpay.model.BindCard;
import com.yihu.wlyy.service.weixin.wxpay.model.Charge;
import com.yihu.wlyy.service.weixin.wxpay.model.Charge;
import com.yihu.wlyy.service.weixin.wxpay.service.OnePayService;
import com.yihu.wlyy.service.weixin.wxpay.service.OnePayService;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.web.WeixinBaseController;
import com.yihu.wlyy.web.WeixinBaseController;
import com.ylzinfo.onepay.sdk.OnepayDefaultClient;
import com.ylzinfo.onepay.sdk.OnepayDefaultClient;
import com.ylzinfo.onepay.sdk.domain.RequestParams;
import com.ylzinfo.onepay.sdk.domain.RequestParams;
@ -28,11 +29,14 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Controller;
@ -51,10 +55,7 @@ import java.io.StringWriter;
import java.net.URLDecoder;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
/**
 * Created by hzp on 2017/05/23.
 * Created by hzp on 2017/05/23.
@ -84,6 +85,12 @@ public class OnePayController extends WeixinBaseController {
    ObjectMapper objectMapper;
    ObjectMapper objectMapper;
    @Autowired
    @Autowired
    JdbcTemplate jdbcTemplate;
    JdbcTemplate jdbcTemplate;
    @Value("${doctorAssistant.api}")
    private String doctorAssistant;
    @Value("${doctorAssistant.target_url}")
    private String targetUrl;
    @Autowired
    private HttpClientUtil httpClientUtil;
    @RequestMapping(value = "bindCard", method = RequestMethod.POST)
    @RequestMapping(value = "bindCard", method = RequestMethod.POST)
    @ApiOperation("查询绑卡信息")
    @ApiOperation("查询绑卡信息")
@ -758,12 +765,29 @@ public class OnePayController extends WeixinBaseController {
    @ResponseBody
    @ResponseBody
    public String cleaData() throws IOException, PayException {
    public String cleaData() throws IOException, PayException {
        try {
        try {
            String sql = "SELECT t.code FROM wlyy_charge t WHERE (t.need_upload != '0' OR t.need_upload is null) AND (t.trade_status = '0' OR t.trade_status = '1')";
            /*String sql = "SELECT t.code FROM wlyy_charge t WHERE (t.need_upload != '0' OR t.need_upload is null) AND (t.trade_status = '0' OR t.trade_status = '1')";
            List<Map<String, Object>> codes = jdbcTemplate.queryForList(sql);
            List<Map<String, Object>> codes = jdbcTemplate.queryForList(sql);
            for (Map<String, Object> code :codes) {
            for (Map<String, Object> code :codes) {
                String outChargeNo = code.get("code").toString();
                String outChargeNo = code.get("code").toString();
                pay.chargeQuery(outChargeNo,getAccessToken());
                pay.chargeQuery(outChargeNo,getAccessToken());
            }
            }*/
            String url = doctorAssistant + "/wllyy/feldsher/sendDoctorTemplates";
            List<NameValuePair> params = new ArrayList<>();
            params.add(new BasicNameValuePair("type", "5"));
            params.add(new BasicNameValuePair("openId", "orrOgwATDaljVunlAq_Tdx3imhYg"));
            params.add(new BasicNameValuePair("url", targetUrl));
            params.add(new BasicNameValuePair("first", "wjj" + "医生您好,你有一条新的签约申请待处理"));
            params.add(new BasicNameValuePair("remark", "请尽快使用厦门i健康APP处理居民的签约申请"));
            SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
            String date = format.format(new Date());
            String keywords = date + "," + "wjj";
            params.add(new BasicNameValuePair("keywords", keywords));
            LOGGER.info("==========================================");
            LOGGER.info("url ==>"+url);
            LOGGER.info("targetUrl ==>"+targetUrl);
            LOGGER.info("==========================================");
            httpClientUtil.post(url, params, "UTF-8");
            LOGGER.info("*********************************************");
            return write(200, "数据整理成功!");
            return write(200, "数据整理成功!");
        } catch (Exception e) {
        } catch (Exception e) {
            return write(-1, "数据整理成功失败!");
            return write(-1, "数据整理成功失败!");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -21,7 +21,7 @@ server:
  server_url: http://ehr.yihu.com/wlyy/
  server_url: http://ehr.yihu.com/wlyy/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
doctorAssistant:
  api: http://ehr.yihu.com/wlyy/
  api: http://172.19.103.88:443/assistant/
  target_url: home/html/unreadMessageStatistic.html
  target_url: home/html/unreadMessageStatistic.html
im:
im: