Bläddra i källkod

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

humingfen 7 år sedan
förälder
incheckning
1cca2441a6

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

@ -643,6 +643,10 @@ public class SignPatientLabelInfoService extends BaseService {
                // 患者标签
                //json.put("labels", labels == null ? "" : labels);
                //1.4.9版本专科医生判断
                json.put("isSpecialist",specialistService.checkPatientSpecialistSign(p.getCode()));
                result.put(p.getCode(), json);
            }
        }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -5454,7 +5454,7 @@ public class StatisticsESService {
//                startUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, "hemopiezometer", null, null);
//                endUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_87, SaveModel.timeLevel_DDL, "hemopiezometer", null, null);
                anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_88, SaveModel.timeLevel_DDL, "hemopiezometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "hemopiezometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "1");
//                anomalyCountSql = " SELECT COUNT(i.id) FROM device.wlyy_patient_health_index i left join device.wlyy_devices d on i.device_sn=d.device_code where i.type =1 and i.status=1 and i.del=1 " + areaCondition;
                allAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_85, SaveModel.timeLevel_DDL, "hemopiezometer", "", low_level);
                bindingAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "hemopiezometer", "", low_level);
@ -5469,7 +5469,7 @@ public class StatisticsESService {
//                startUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, "glucometer", null, null);
//                endUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_87, SaveModel.timeLevel_DDL, "glucometer", null, null);
                anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_88, SaveModel.timeLevel_DDL, "glucometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "glucometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "2");
//                anomalyCountSql = " SELECT COUNT(i.id) FROM device.wlyy_patient_health_index i left join device.wlyy_devices d on i.device_sn=d.device_code where i.type =2 and i.status=1 and i.del=1 " + areaCondition;
                allAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_85, SaveModel.timeLevel_DDL, "glucometer", "", low_level);
                bindingAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "glucometer", "", low_level);

+ 21 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -686,7 +686,7 @@ public class SpecialistService extends BaseService {
                json.put("keyword1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd"));
                json.put("keyword2", temp.getKeyword2().replace("key1", doctor.getName()));
                json.put("remark", temp.getRemark().replace("key1", StringUtils.isBlank(remark)?"详情请联系您的专科医生":remark));
                json.put("first", temp.getFirst().replace("key1", patient.getName()));
                json.put("first", temp.getFirst().replace("key1", patient.getName()).replace("key2", doctor.getName()));
            } else {
                //同意
                temp = templateConfigDao.findByScene("template_deal_with", "tdwspagr");
@ -694,7 +694,7 @@ public class SpecialistService extends BaseService {
                json.put("keyword1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd"));
                json.put("keyword2", temp.getKeyword2().replace("key1", doctor.getName()));
                json.put("remark", temp.getRemark());
                json.put("first", temp.getFirst().replace("key1", patient.getName()));
                json.put("first", temp.getFirst().replace("key1", patient.getName()).replace("key2", doctor.getName()));
            }
            logger.info("weiTempJOSN:"+json.toString());
@ -732,5 +732,24 @@ public class SpecialistService extends BaseService {
        List<SignPatientLabelInfo> list =   signPatientLabelInfoDao.findByPatientAndLabelTypeAndStatus(patient,"8",1);
        return list;
    }
    public Boolean checkPatientSpecialistSign(String patient){
        try {
            Map<String, Object> param = new HashedMap();
            param.put("patient", patient);
            HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/findPatientTeamList", param);
            JSONObject rs = new JSONObject(response.getContent());
            if ("succes".equals(rs.getString("message"))) {
                JSONArray jr = rs.getJSONArray("obj");
                if(jr!=null&&jr.length()>0){
                    return true;
                }
                return false;
            }
        }catch (Exception e){
            logger.info(e.getMessage()+"_"+e.toString());
        }
        return false;
    }
}

+ 18 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.service.third.guahao;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.entity.doctor.DoctorMapping;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.survey.SurveyScreenResult;
import com.yihu.wlyy.entity.message.Message;
@ -8,6 +9,7 @@ import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientReservation;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorMappingDao;
import com.yihu.wlyy.repository.doctor.SurveyScreenResultDao;
import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
@ -84,6 +86,9 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private DoctorMappingDao doctorMappingDao;
    private ObjectMapper objectMapper = new ObjectMapper();
@ -119,6 +124,13 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            e.printStackTrace();
            System.out.println("获取医生信息失败");
        }
        DoctorMapping doctorMapping = null;
        try{
            doctorMapping = doctorMappingDao.findByJwDoctorHospitalAndJwDoctor(doctor.getHospitalName(),doctorId);
        }catch (Exception e){
            e.printStackTrace();
            System.out.println("获取系统医生信息失败");
        }
        // 保存预约记录
        PatientReservation reservation = new PatientReservation();
        reservation.setCode(code);
@ -169,17 +181,21 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(surveyCode);
            surveyScreenResult.setIsOrder(1);
            surveyScreenResult.setReservationCode(patientReservation.getCode());
            surveyScreenResult.setFollowing(0);
            String sql = "update wlyy_survey_screen_result ssr set ssr.is_order = "+surveyScreenResult.getIsOrder()+"," +
                    "reservation_code = '"+surveyScreenResult.getReservationCode()+"' where ssr.id = '"+surveyScreenResult.getId()+"'";
            jdbcTemplate.update(sql);
            //发送消息
            Message message = new Message();
            message.setCzrq(new Date());
            message.setCreateTime(new Date());
            message.setContent("您有一个居民开通专科服务");
            message.setRead(1);//设置未读
            message.setReceiver(doctorId);//设置接受医生的code
            if (doctorMapping!=null){
                message.setReceiver(doctorMapping.getDoctorCode());//设置接受医生的code
            }
            message.setSender(patient);//设置发送的用户
            message.setSenderName(patientName);
            message.setCode(getCode());
@ -1288,6 +1304,7 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
        messageDao.save(message);
        SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(surveyCode);
        surveyScreenResult.setIsOrder(2);
        surveyScreenResult.setFollowing(0);
        surveyScreenResultDao.save(surveyScreenResult);
        JSONObject object = new JSONObject();
        object.put("message",message);

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

@ -23,6 +23,8 @@ public class JwSignService {
    @Value("${sign.check_upload}")
    private String jwUrl;
    @Value("${sign.check_upload_sign}")
    private String jwSignUrl;
    /****************************************************************************************************************************/
    /**
@ -77,4 +79,24 @@ public class JwSignService {
        return HttpClientUtil.post(url, params, "UTF-8");
    }
    
    /**
     * 根据身份证号同步居民签约信息
     */
    public String LoadSignFamilyByIdcard(String idcard) throws Exception {
        String url = jwSignUrl + "/third/sign/LoadSignFamilyByIdcard";
        
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        
        String result =HttpClientUtil.post(url, params, "UTF-8");
        
        com.alibaba.fastjson.JSONObject rejson = com.alibaba.fastjson.JSONObject.parseObject(result);
        
        if(rejson.getInteger("status")!=200){
            throw new Exception("更新签约失败!");
        }
        return "更新签约成功!";
        
    }
}

+ 21 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.service.app.account.DoctorInfoService;
import com.yihu.wlyy.service.app.account.PatientInfoService;
import com.yihu.wlyy.service.app.sign.SignWebService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.third.jw.JwSignService;
import com.yihu.wlyy.util.CommonUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
@ -41,6 +42,8 @@ public class DoctorSignController extends WeixinBaseController {
    private PatientInfoService patientInfoService;
    @Autowired
    private SignWebService signWebService;
    @Autowired
    private JwSignService jwSignService;
    @Autowired
    private CommonUtil CommonUtil;
@ -799,4 +802,22 @@ public class DoctorSignController extends WeixinBaseController {
            return error(-1, "查询失败");
        }
    }
    
    /**
     * 根据身份证号同步居民签约信息
     * @param idcard
     * @return
     */
    @RequestMapping(value = "/loadSignFamilyByIdcard", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public String loadSignFamilyByIdcard(@RequestParam(required = true)String idcard){
        try {
            String re = jwSignService.LoadSignFamilyByIdcard(idcard);
            Patient patient = patientService.findByIdcard(idcard);
            return write(200, "更新签约成功","patient",patient);
        } catch (Exception e) {
            error(e);
            return error(-1, "更新签约失败!");
        }
    }
}

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java

@ -865,8 +865,8 @@ public class WeiXinEventProcess {
        Map<String, String> articleConsult = new HashMap<>();
        articleConsult.put("Url", url);
        articleConsult.put("Title", "您需要开通家庭医生与专科医生的”三师共管“的服务邀请");
        articleConsult.put("Description", "优秀的专科医生团队为您提供个性化健康服务");
        articleConsult.put("Title", "您有一个开通专科服务的邀请,点击查看");
        articleConsult.put("Description", "家庭医生协助专科医生团队为您提供专项服务");
        articleConsult.put("PicUrl", picUrlConsult);
        articles.add(articleConsult);

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

@ -116,6 +116,7 @@ images:
sign:
  check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload_sign: http://172.19.103.88:8011/wlyy_sign
  #check_upload: http://localhost:8070/

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

@ -106,6 +106,7 @@ images:
sign:
  check_upload: http://10.95.22.10:8011/wlyy_service
  check_upload_sign: http://10.95.22.10:8011/wlyy_sign
express:
  sf_url: http://bsp-ois.sit.sf-express.com:9080/bsp-ois/sfexpressService

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

@ -113,6 +113,7 @@ images:
sign:
  check_upload: http://59.61.92.90:8072/wlyy_service
  check_upload_sign: http://59.61.92.90:8072/wlyy_sign
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService

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

@ -106,6 +106,7 @@ images:
sign:
  check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload_sign: http://172.19.103.88:8011/wlyy_sign
express:
  sf_url: http://218.17.248.244:11080/bsp-oisp/sfexpressService

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/system.properties

@ -35,7 +35,7 @@ patient_immune_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={ap
#居民wifi图片地址
patient_wifi_pic_url = {server}/images/wifi.png
#居民抽奖图片地址
patient_draw_pic_url = {server}/images/banner01.png
patient_draw_pic_url = {server}/images/banner02.png
#专科医生签约图片地址
specialist_sign_url = {server}/images/SpBanner.png
#通用活动图片地址

BIN
patient-co/patient-co-wlyy/src/main/webapp/images/banner02.png