Przeglądaj źródła

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

Conflicts:
	patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SendP2PUtil.java
8 lat temu
rodzic
commit
6d079aac43
16 zmienionych plików z 237 dodań i 103 usunięć
  1. 1 1
      patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/CurrentDayAllQuotaJob.java
  2. 1 1
      patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/FollowUpJob.java
  3. 1 0
      patient-co-statistics/src/main/resources/application.yml
  4. 5 1
      patient-co-wlyy/pom.xml
  5. 6 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java
  6. 0 3
      patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/PatientInterceptor.java
  7. 83 39
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/archives/PatientRecordService.java
  8. 2 1
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java
  9. 72 38
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  10. 3 3
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java
  11. 30 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SendP2PUtil.java
  12. 4 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/archives/DoctorArchivesController.java
  13. 15 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java
  14. 6 6
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java
  15. 4 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/archives/PatientArchivesController.java
  16. 4 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/OpenApiSmjkController.java

+ 1 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/CurrentDayAllQuotaJob.java

@ -489,7 +489,7 @@ public class CurrentDayAllQuotaJob implements Job {
        String quotaId="4";
        try{
            //找出今天的随访信息
            String sql=" select * from wlyy_followup a where  a.update_time< '"+tomorrow+"' and a.update_time>= '"+now+"' ";
            String sql=" select * from wlyy_followup a where  a.status=1 and  a.followup_plan_date< '"+tomorrow+"' and a.followup_plan_date>= '"+now+"' ";
            //找出今天的随访信息
            List<Map<String, Object>> plans = jdbcTemplate.queryForList(sql);

+ 1 - 1
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/FollowUpJob.java

@ -89,7 +89,7 @@ public class FollowUpJob implements Job {
            quartzJobLog.setJobId(wlyyJobConfig.getId());
            quartzJobLog.setJobName(wlyyJobConfig.getJobName());
            String sql = " select * from wlyy_followup a where a.update_time>='" + daybefore + Constant.quota_date_last + "' and a.update_time< '" + yesterday + Constant.quota_date_last + "'  ";
            String sql = " select * from wlyy_followup a where  a.status=1 and  a.followup_plan_date>='" + daybefore + Constant.quota_date_last + "' and a.followup_plan_date< '" + yesterday + Constant.quota_date_last + "'  ";
            //找出今天的随访信息
            List<Map<String, Object>> plans = jdbcTemplate.queryForList(sql);
            FilterModel etlModels = followUpDataFilter.filter(plans, sql, yesterday);

+ 1 - 0
patient-co-statistics/src/main/resources/application.yml

@ -165,6 +165,7 @@ spring:
  redis:
    host: 120.41.253.95 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzl_ehr
  followupMessage:
    cron : 0 5 0 * * ?

+ 5 - 1
patient-co-wlyy/pom.xml

@ -197,7 +197,11 @@
            <version>${sitemesh.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>it.sauronsoftware.cron4j</groupId>
            <artifactId>cron4j</artifactId>
            <version>2.2.5</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>

+ 6 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java

@ -15,8 +15,8 @@ import java.util.Date;
/**
 * 医生权限校验
 * @author George
 *
 * @author George
 */
public class DoctorInterceptor extends BaseInterceptor {
@ -34,7 +34,11 @@ public class DoctorInterceptor extends BaseInterceptor {
			String tokenStr = json.has("token") ? json.getString("token") : "";
			String uid = json.has("uid") ? json.getString("uid") : "";
			String imei = json.has("imei") ? json.getString("imei") : "";
			String observer = json.has("observer") ? json.getString("observer") : "";
			//如果是观察者直接返回true
			if (!org.springframework.util.StringUtils.isEmpty(observer) && observer.equals("1")) {
				return true;
			}
			if (StringUtils.isEmpty(tokenStr) || StringUtils.isEmpty(imei) || StringUtils.isEmpty(uid)) {
				response.getOutputStream().write(error(SystemConf.NOT_LOGIN, "请登录后再操作!").getBytes());
				return false;

+ 0 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/PatientInterceptor.java

@ -24,9 +24,6 @@ public class PatientInterceptor extends BaseInterceptor {
	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
		boolean flag = true;
		if(flag){
			return true;
		}
		try {
			if(request.getRequestURI().contains("/patient/hosptail/getHositalByTownCode")){
				return true;

+ 83 - 39
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/archives/PatientRecordService.java

@ -206,7 +206,7 @@ public class PatientRecordService {
    /**
     * 获取检查检验列表
     */
    public List<Map<String, String>> getExamAndLabReport(String patientCode, String page, String pageSize) throws Exception {
    public List<Map<String, String>> getExamAndLabReport(String patientCode, String page, String pageSize, String lastTime) throws Exception {
        List<Map<String, String>> re = new ArrayList<>();
        //获取患者
@ -215,20 +215,34 @@ public class PatientRecordService {
        //获取基卫数据
        String response = jwSmjkService.getExamAndLabReport(patient.getSsc(), page, pageSize);     //【基卫接口】
        int pageInt = Integer.parseInt(page);
        int pageSizeInt = Integer.parseInt(pageSize);
        pageInt = pageInt > 0 ? pageInt -1 : 0;
        //获取app数据
        String sql = "select a.*,b.img_type as catalog,GROUP_CONCAT(b.img_label) as label \n" +
                "from wlyy_patient_event a,wlyy_patient_event_img b\n" +
                "where a.patient='"+patientCode+"' and b.event_id=a.id and b.img_type in ('检查报告','检验报告')  \n" +
                "where a.patient='" + patientCode + "' and b.event_id=a.id and b.img_type in ('检查报告','检验报告')  \n" +
                "group by b.event_id,b.img_type order by a.event_date desc";
        List<Map<String, Object>> appList = jdbcTemplate.queryForList(sql);
        if (!StringUtils.isEmpty(response)) {
        if (!StringUtils.isEmpty(response) && !"[{}]".equals(response)) {
            JSONArray array = new JSONArray(response);
            String max = "";
            String min = "";
            for (int i = 0; i < array.length(); i++) {
                JSONObject item = array.getJSONObject(i);
                Map<String, String> map = new HashMap<>();
                if (i == 0) //最大值
                {
                    max = item.optString("END_TIME");
                } else if (i == array.length() - 1) //最小值
                {
                    min = item.optString("END_TIME");
                }
                map.put("id", item.optString("EVENT"));
                map.put("patient", patientCode);
                map.put("eventDate", item.optString("END_TIME"));
@ -253,47 +267,72 @@ public class PatientRecordService {
            //过滤
            for (Map<String, Object> item : appList) {
                Map<String, String> map = new HashMap<>();
                map.put("id", item.get("id").toString());
                map.put("patient", patientCode);
                map.put("eventDate", DateUtil.dateToStrLong((Date) item.get("event_date")));
                String type = "";
                if ("检验报告".equals(item.get("catalog"))) {
                    type = "检验";
                } else if ("检查报告".equals(item.get("catalog"))) {
                    type = "检查";
                String eventDate = DateUtil.dateToStrLong((Date) item.get("event_date"));
                int maxCompare = eventDate.compareTo(max);
                int minCompare = eventDate.compareTo(min);
                Boolean contain = false;
                if (maxCompare < 0 && minCompare >= 0)       //时间范围内
                {
                    contain = true;
                }
                //第一页特殊处理
                if ("1".equals(page) && maxCompare >= 0) {
                    contain = true;
                }
                //最后一页特殊处理
                if (!"1".equals(page) && (array.length() == 0 || "[{}]".equals(response)) && !StringUtils.isEmpty(lastTime)) {
                    int lastTimeCompare = eventDate.compareTo(lastTime);
                    if (lastTimeCompare < 0) {
                        contain = true;
                    }
                }
                if (contain) {
                    Map<String, String> map = new HashMap<>();
                    map.put("id", item.get("id").toString());
                    map.put("patient", patientCode);
                    map.put("eventDate", eventDate);
                    String type = "";
                    if ("检验报告".equals(item.get("catalog"))) {
                        type = "检验";
                    } else if ("检查报告".equals(item.get("catalog"))) {
                        type = "检查";
                    }
                    map.put("type", type);
                    map.put("catalogCode", "");
                    map.put("serial", "");
                    map.put("orgName", String.valueOf(item.get("org_name")));
                    map.put("label", String.valueOf(item.get("label"))); //检测项目
                    map.put("dataFrom", "2");//基卫数据
                    re.add(map);
                }
                map.put("type", type);
                map.put("catalogCode", "");
                map.put("serial", "");
                map.put("orgName", String.valueOf(item.get("org_name")));
                map.put("label", String.valueOf(item.get("label"))); //检测项目
                map.put("dataFrom", "2");//基卫数据
                re.add(map);
            }
            //排序
            re = sortMapList(re, "eventDate", "DESC");
        }
        else {
            for (Map<String, Object> item : appList) {
                Map<String, String> map = new HashMap<>();
                map.put("id", String.valueOf(item.get("id")));
                map.put("patient", patientCode);
                map.put("eventDate", DateUtil.dateToStrLong((Date) item.get("event_date")));
                String type = "";
                if ("检验报告".equals(item.get("catalog"))) {
                    type = "检验";
                } else if ("检查报告".equals(item.get("catalog"))) {
                    type = "检查";
        } else {
            if ("1".equals(page)) {
                for (Map<String, Object> item : appList) {
                    Map<String, String> map = new HashMap<>();
                    map.put("id", String.valueOf(item.get("id")));
                    map.put("patient", patientCode);
                    map.put("eventDate", DateUtil.dateToStrLong((Date) item.get("event_date")));
                    String type = "";
                    if ("检验报告".equals(item.get("catalog"))) {
                        type = "检验";
                    } else if ("检查报告".equals(item.get("catalog"))) {
                        type = "检查";
                    }
                    map.put("type", type);
                    map.put("catalogCode", "");
                    map.put("serial", "");
                    map.put("orgName", String.valueOf(item.get("org_name")));
                    map.put("label", String.valueOf(item.get("label"))); //检测项目
                    map.put("dataFrom", "2");//基卫数据
                    re.add(map);
                }
                map.put("type", type);
                map.put("catalogCode", "");
                map.put("serial", "");
                map.put("orgName", String.valueOf(item.get("org_name")));
                map.put("label", String.valueOf(item.get("label"))); //检测项目
                map.put("dataFrom", "2");//基卫数据
                re.add(map);
            }
        }
@ -307,7 +346,12 @@ public class PatientRecordService {
    public String getDrugsListPage(String patientCode, String page, String pageSize) throws Exception {
        //获取患者
        Patient patient = patientDao.findByCode(patientCode);
        return jwSmjkService.getDrugsListPage(patient.getSsc(), page, pageSize);
        String response = jwSmjkService.getDrugsListPage(patient.getSsc(), page, pageSize);
        if ("[{}]".equals(response)) {
            response = "[]";
        }
        return response;
    }

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

@ -170,7 +170,8 @@ public class FollowUpService extends BaseService {
     * @return
     */
    public JSONArray getListByPatientAndTeam(String patient, Long teamCode, int page, int pageSize) {
        PageRequest pageRequest = new PageRequest(page, pageSize);
        Sort sort = new Sort(Sort.Direction.DESC,"createTime");
        PageRequest pageRequest = new PageRequest(page, pageSize,sort);
        Page<Object> result = followupDao.findByPatientAndTeam(patient, teamCode, pageRequest);
        JSONArray array = new JSONArray();

+ 72 - 38
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -1571,25 +1571,41 @@ public class SignPatientLabelInfoService extends BaseService {
        Matcher matcher = pattern1.matcher(filter);
        if (matcher.matches()) {
//            身份证校验通过
            String sql = "select" +
                    " p. CODE," +
                    " p. NAME ," +
                    " p.idcard," +
                    " p.sex," +
                    " f.id," +
                    " f.type," +
                    " f.doctor," +
                    " f.doctor_health," +
                    " f.admin_team_code," +
                    " t.id teamCode," +
                    " t.`name` teamName" +
                    " from" +
                    " wlyy_patient p" +
                    " LEFT JOIN wlyy_sign_family f ON p.CODE = f.patient" +
                    " LEFT JOIN wlyy_admin_team t ON f.admin_team_code = t.id" +
                    " where" +
                    " p. idcard = ? AND (f.id IS NULL || f.status > 0)";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter);
            String sql = "SELECT" +
                    "   p. CODE," +
                    "   p. NAME," +
                    "   p.idcard," +
                    "   p.sex," +
                    "   f.id," +
                    "   f.type," +
                    "   f.doctor," +
                    "   f.doctor_health," +
                    "   f.admin_team_code," +
                    "   f. STATUS," +
                    "   t.id teamCode," +
                    "   t.name teamName"+
                    "  FROM" +
                    "   wlyy_patient p" +
                    "  LEFT JOIN (" +
                    "   SELECT" +
                    "    id,type,patient,doctor,doctor_health,admin_team_code,status" +
                    "  FROM" +
                    "   wlyy_sign_family" +
                    "  WHERE" +
                    "   STATUS > 0" +
                    "  AND patient IN (" +
                    "  SELECT" +
                    "   CODE" +
                    "  FROM" +
                    "   wlyy_patient" +
                    "  WHERE" +
                    "   idcard = ?" +
                    ")" +
                    ") f ON p. CODE = f.patient" +
                    "  LEFT JOIN wlyy_admin_team t ON t.id = f.admin_team_code" +
                    "  WHERE" +
                    "   p. idcard = ?";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter,filter);
            for (Map<String, Object> p : list) {
                JSONObject pJson = new JSONObject();
@ -1601,6 +1617,7 @@ public class SignPatientLabelInfoService extends BaseService {
                pJson.put("photo", p.get("photo") != null ? p.get("photo") : "");
                pJson.put("id", p.get("id") != null ? p.get("id") : "");
                pJson.put("doctor", p.get("doctor") != null ? p.get("doctor") : "");
                pJson.put("isSign",p.get("status")!=null?(Integer.parseInt(p.get("status").toString())>=1?"1":"0"):"0");
                pJson.put("doctorHealth", p.get("doctor_health") != null ? p.get("doctor_health") : "");
                if (p.get("id") != null && (doctorCode.equals(pJson.get("doctor")) || doctorCode.equals(pJson.get("doctorHealth")))) {
                    if (p.get("teamCode") != null && StringUtils.isNotEmpty(p.get("teamCode").toString())) {
@ -1623,25 +1640,41 @@ public class SignPatientLabelInfoService extends BaseService {
                }
            }
        } else {
            String sql = "select" +
                    " p. CODE," +
                    " p. NAME," +
                    " p.idcard," +
                    " p.sex," +
                    " f.id," +
                    " f.type," +
                    " f.doctor," +
                    " f.doctor_health," +
                    " f.admin_team_code," +
                    " t.id teamCode," +
                    " t.`name` teamName" +
                    " from" +
                    " wlyy_patient p" +
                    " LEFT JOIN wlyy_sign_family f ON p.CODE = f.patient" +
                    " LEFT JOIN wlyy_admin_team t ON f.admin_team_code = t.id" +
                    " where" +
                    " p. name = ? AND (f.id IS NULL || f.status > 0)";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter);
            String sql = "SELECT" +
                    "   p. CODE," +
                    "   p. NAME," +
                    "   p.idcard," +
                    "   p.sex," +
                    "   f.id," +
                    "   f.type," +
                    "   f.doctor," +
                    "   f.doctor_health," +
                    "   f.admin_team_code," +
                    "   f. STATUS," +
                    "   t.id teamCode," +
                    "   t.name teamName"+
                    "  FROM" +
                    "   wlyy_patient p" +
                    "  LEFT JOIN (" +
                    "   SELECT" +
                    "    id,patient,type,doctor,doctor_health,admin_team_code,status" +
                    "  FROM" +
                    "   wlyy_sign_family" +
                    "  WHERE" +
                    "   STATUS > 0" +
                    "  AND patient IN (" +
                    "  SELECT" +
                    "   CODE" +
                    "  FROM" +
                    "   wlyy_patient" +
                    "  WHERE" +
                    "   name = ?" +
                    ")" +
                    ") f ON p. CODE = f.patient" +
                    "  LEFT JOIN wlyy_admin_team t ON t.id = f.admin_team_code" +
                    "  WHERE" +
                    "   p. name  = ?";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter,filter);
            for (Map<String, Object> p : list) {
                JSONObject pJson = new JSONObject();
@ -1653,6 +1686,7 @@ public class SignPatientLabelInfoService extends BaseService {
                pJson.put("photo", p.get("photo") != null ? p.get("photo") : "");
                pJson.put("id", p.get("id") != null ? p.get("id") : "");
                pJson.put("doctor", p.get("doctor") != null ? p.get("doctor") : "");
                pJson.put("isSign",p.get("status")!=null?(Integer.parseInt(p.get("status").toString())>=1?"1":"0"):"0");
                pJson.put("doctorHealth", p.get("doctor_health") != null ? p.get("doctor_health") : "");
                if (p.get("id") != null && (doctorCode.equals(pJson.get("doctor")) || doctorCode.equals(pJson.get("doctorHealth")))) {
                    if (p.get("teamCode") != null && StringUtils.isNotEmpty(p.get("teamCode").toString())) {

+ 3 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -207,11 +207,11 @@ public class PatientService extends TokenService {
        IdcardInfoExtractor ie = new IdcardInfoExtractor(idcard);
        String code = getCode();
        String sql = "insert wlyy_patient(code,idcard,name,ssc,mobile,password,salt,openid" +
                ",status,birthday,sex,czrq,disease,disease_condition,record_amount,points)" +
                " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                ",status,birthday,sex,czrq,openid_time,disease,disease_condition,record_amount,points)" +
                " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        jdbcTemplate.update(sql, new Object[]{code, idcard, name, ssc, mobile, password, salt, imei, 1, ie.getBirthday()
                , ie.getGender(), clock.getCurrentDate(), 0, 0, 0, 0});
                , ie.getGender(), clock.getCurrentDate(),clock.getCurrentDate(), 0, 0, 0, 0});
        Patient temp = patientDao.findByCode(code);
        if (temp != null) {

+ 30 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SendP2PUtil.java

@ -0,0 +1,30 @@
package com.yihu.wlyy.util;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import java.util.ArrayList;
import java.util.List;
public class SendP2PUtil {
	public static String sendP2Pmsg(String from,String to,String contentType,String content){
		String url = SystemConf.getInstance().getSystemProperties().getProperty("im_list_get")
				+ "api/v1/chats/pm";
		List<NameValuePair> params = new ArrayList<>();
		if(!"4".equals(contentType)){
			contentType = "0";
		}
		params.add(new BasicNameValuePair("from", from));
		params.add(new BasicNameValuePair("to", to));
		params.add(new BasicNameValuePair("content",  content));
		params.add(new BasicNameValuePair("contentType",contentType));
		String response = HttpClientUtil.post(url, params, "UTF-8");
		if (StringUtils.isEmpty(response)) {
			return "-1";
		}else{
			return "200";
		}
	}
}

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

@ -118,10 +118,12 @@ public class DoctorArchivesController extends BaseController {
                                @ApiParam(name="page",value="第几页",defaultValue = "1")
                                @RequestParam(value="page",required = true) String page,
                                @ApiParam(name="pageSize",value="每页几行",defaultValue = "10")
                                @RequestParam(value="pageSize",required = true) String pageSize)
                                @RequestParam(value="pageSize",required = true) String pageSize,
                                @ApiParam(name="lastTime",value="最后一条时间",defaultValue = "2010-10-10 00:00:00")
                                    @RequestParam(value="lastTime",required = false) String lastTime)
    {
        try {
            List<Map<String,String>> result = patientRecordService.getExamAndLabReport(patient, page, pageSize);
            List<Map<String,String>> result = patientRecordService.getExamAndLabReport(patient, page, pageSize,lastTime);
            return write(200, "获取检查检验报告成功!", "data", result);
        } catch (Exception e) {

+ 15 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -343,10 +343,11 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
            String msgHead = doctor.getName() + "医生给您发来了一篇患教文章";
            String endMsg = "为了您的健康," + doctor.getName() + "医生给您发送了一篇患教文章,请仔细查阅,如有问题,可随时咨询医生。";
            JSONArray messages = new JSONArray();
            Map<String, Map<String, Object>> msgs = new HashMap<>();
            for (String p : patientSet) {
                Patient patientTemp = patientService.findByCode(p);
                SignFamily signFamily = signFamilyDao.findByjiatingPatient(p);
                if(signFamily == null){
                if (signFamily == null) {
                    throw new Exception("can not find patient's family sign info");
                }
                for (String a : articles) {
@ -393,7 +394,11 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
                        json.put("doctorName", doctor.getName());
                        json.put("date", DateUtil.dateToStrLong(DateUtil.getNowDate()));
                        json.put("remark", endMsg);
                        PushMsgTask.getInstance().putWxMsg(getAccessToken(), 9, patientTemp.getOpenid(), patientTemp.getName(), json);
                        Map<String, Object> content = new HashMap<>();
                        content.put("openid", patientTemp.getOpenid());
                        content.put("name", patientTemp.getName());
                        content.put("json", json);
                        msgs.put(patientTemp.getCode(), content);
                    }
                }
            }
@ -402,6 +407,14 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
            if (row <= 0) {
                return error(-1, "发送失败!");
            } else {
                for (String key : msgs.keySet()) {
                    Map<String,Object> map = msgs.get(key);
                    PushMsgTask.getInstance().putWxMsg(getAccessToken(), 9,
                            map.get("openid") == null ? "":map.get("openid").toString(),
                            map.get("name") == null ? "":map.get("name").toString(),
                            (JSONObject) map.get("json"));
                }
                // 推送消息给患者
                PushMsgTask.getInstance().put(messages);
                return success("发送成功!");

+ 6 - 6
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -26,20 +26,20 @@ public class SignPatientLabelInfoController extends BaseController {
    @Autowired
    SignPatientLabelInfoService labelInfoService;
    @RequestMapping(value="toList",method = RequestMethod.GET)
    @RequestMapping(value="getPatientByNameOrIdcard",method = RequestMethod.GET)
    @ResponseBody
    public String search(@RequestParam String str){
    @ApiOperation("医生端搜索签约居民")
    public String search(@RequestParam(required = true) String str){
        try {
            if (StringUtils.isEmpty(str)) {
                return error(-1, "居民不能为空");
                return error(-1, "居民不能为空!");
            }
            JSONObject temp = labelInfoService.search(str,getUID());
            return write(200, "查询成功", "data", temp);
            return write(200, "查询成功!", "data", temp);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
            return error(-1, "查询失败!");
        }
//        return labelInfoService.search(str,getUID());
    }
    /**

+ 4 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/archives/PatientArchivesController.java

@ -121,10 +121,12 @@ public class PatientArchivesController extends WeixinBaseController {
    public String getReportList(@ApiParam(name="page",value="第几页",defaultValue = "1")
                                    @RequestParam(value="page",required = true) String page,
                                @ApiParam(name="pageSize",value="每页几行",defaultValue = "10")
                                    @RequestParam(value="pageSize",required = true) String pageSize)
                                    @RequestParam(value="pageSize",required = true) String pageSize,
                                @ApiParam(name="lastTime",value="最后一条时间",defaultValue = "2010-10-10 00:00:00")
                                    @RequestParam(value="lastTime",required = false) String lastTime)
    {
        try {
            List<Map<String,String>> result = patientRecordService.getExamAndLabReport(getUID(), page, pageSize);
            List<Map<String,String>> result = patientRecordService.getExamAndLabReport(getUID(), page, pageSize,lastTime);
            return write(200, "获取检查检验报告成功!", "data", result);
        } catch (Exception e) {

+ 4 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/OpenApiSmjkController.java

@ -118,10 +118,12 @@ public class OpenApiSmjkController extends BaseController {
								@ApiParam(name="page",value="第几页",defaultValue = "1")
								@RequestParam(value="page",required = true) String page,
								@ApiParam(name="pageSize",value="每页几行",defaultValue = "10")
								@RequestParam(value="pageSize",required = true) String pageSize)
								@RequestParam(value="pageSize",required = true) String pageSize,
								@ApiParam(name="lastTime",value="最后一条时间",defaultValue = "2010-10-10 00:00:00")
									@RequestParam(value="lastTime",required = false) String lastTime)
	{
		try {
			List<Map<String,String>> result = patientRecordService.getExamAndLabReport(patient, page, pageSize);
			List<Map<String,String>> result = patientRecordService.getExamAndLabReport(patient, page, pageSize,lastTime);
			return write(200, "获取检查检验报告成功!", "data", result);
		} catch (Exception e) {