Explorar el Código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangjun hace 4 años
padre
commit
b92e3eebd4
Se han modificado 15 ficheros con 215 adiciones y 134 borrados
  1. 48 81
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  2. 21 31
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java
  3. 2 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  4. 13 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  5. 16 2
      business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java
  6. 2 5
      business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java
  7. 7 1
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  8. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  9. 18 1
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyQuestionDO.java
  10. 21 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/survey/WlyySurveyQuestionVO.java
  11. 5 3
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java
  12. 1 1
      svr/svr-internet-hospital-entrance/src/main/resources/application.yml
  13. 53 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java
  14. 6 2
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/survey/SurveyEndpoint.java
  15. 1 1
      svr/svr-internet-hospital/src/main/resources/application.yml

+ 48 - 81
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1111,7 +1111,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " WHERE  " +
                " 1=1";
                " 1=1 and d.del=1 ";
        Map<String, Object> params = new HashedMap();
        if (StringUtils.isNotBlank(dept)) {
            sql += " AND h.dept_code = '" + dept + "'";
@ -3286,52 +3286,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public BaseDoctorDO updateDoctorInfo(String id, String img,String background,String expertise,String visitHospital,String visitHospitalName,String visitDept,String visitDeptName,String backgroundId,String name,Integer sex,String learning,String introduce,String photo){
        if (StringUtils.isNoneBlank(id)){
            BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(id);
            if (StringUtils.isNoneBlank(img)){
                baseDoctorDO.setImg(img);
            }
            if (StringUtils.isNoneBlank(background)){
                baseDoctorDO.setBackground(background);
            }
            if (StringUtils.isNoneBlank(expertise)){
                baseDoctorDO.setExpertise(expertise);
            }
            if (StringUtils.isNoneBlank(visitHospital)){
                baseDoctorDO.setVisitHospital(visitHospital);
            }
            if(StringUtils.isNoneBlank(visitHospitalName)){
                baseDoctorDO.setVisitHospitalName(visitHospitalName);
            }
            if (StringUtils.isNoneBlank(visitDept)){
                baseDoctorDO.setVisitDept(visitDept);
            }
            if (StringUtils.isNoneBlank(visitDeptName)){
                baseDoctorDO.setVisitDeptName(visitDeptName);
            }
            if (StringUtils.isNoneBlank(backgroundId)){
                baseDoctorDO.setBackgroundId(backgroundId);
            }
            if(StringUtils.isNoneBlank(name)){
                baseDoctorDO.setName(name);
            }
            if(StringUtils.isNoneBlank(learning)){
                baseDoctorDO.setLearning(learning);
            }
            if (sex!=null){
                baseDoctorDO.setSex(sex);
            }
            if (StringUtils.isNoneBlank(introduce)){
                baseDoctorDO.setIntroduce(introduce);
            }
            if(StringUtils.isNoneBlank(photo)){
                baseDoctorDO.setPhoto(photo);
            }
            baseDoctorDO.setImg(img);
            baseDoctorDO.setBackground(background);
            baseDoctorDO.setExpertise(expertise);
            baseDoctorDO.setVisitHospital(visitHospital);
            baseDoctorDO.setVisitHospitalName(visitHospitalName);
            baseDoctorDO.setVisitDept(visitDept);
            baseDoctorDO.setVisitDeptName(visitDeptName);
            baseDoctorDO.setBackgroundId(backgroundId);
            baseDoctorDO.setName(name);
            baseDoctorDO.setLearning(learning);
            baseDoctorDO.setSex(sex);
            baseDoctorDO.setIntroduce(introduce);
            baseDoctorDO.setPhoto(photo);
            return baseDoctorDao.save(baseDoctorDO);
        }else {
            return null;
@ -3712,9 +3679,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                } else if ("16".equals(type)) {
                    newConfig.setFirst(newConfig.getFirst().replace("key2", "视频复诊"));
                }
                newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getHospitalName());
                newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getDoctorName());
                newConfig.setKeyword3(config.getKeyword3() + doctorDO.getFee());
                newConfig.setKeyword1( outpatientDO.getHospitalName());
                newConfig.setKeyword2(outpatientDO.getDoctorName());
                newConfig.setKeyword3( doctorDO.getFee());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 医生拒诊开始");
@ -3727,13 +3694,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName()));
                    if ("9".equals(type)) {
                        newConfig.setFirst(newConfig.getFirst().replace("key2", "图文复诊"));
                        newConfig.setKeyword1(config.getKeyword1() + "图文复诊支付");
                        newConfig.setKeyword1( "图文复诊支付");
                    } else if ("16".equals(type)) {
                        newConfig.setFirst(newConfig.getFirst().replace("key2", "视频复诊"));
                        newConfig.setKeyword1(config.getKeyword1() + "视频复诊支付");
                        newConfig.setKeyword1( "视频复诊支付");
                    }
                    newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getHospitalName());
                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName());
                    newConfig.setKeyword2(outpatientDO.getHospitalName());
                    newConfig.setKeyword3(outpatientDO.getDoctorName());
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 就诊支付提醒开始");
@ -3745,13 +3712,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    newConfig.setFirst(config.getFirst().replace("key1", consPatientDO.getName()));
                    if ("1".equals(type)) {
                        newConfig.setFirst(newConfig.getFirst().replace("key2", "图文咨询"));
                        newConfig.setKeyword1(config.getKeyword1() + "图文咨询支付");
                        newConfig.setKeyword1("图文咨询支付");
                    } else if ("17".equals(type)) {
                        newConfig.setFirst(newConfig.getFirst().replace("key2", "视频咨询"));
                        newConfig.setKeyword1(config.getKeyword1() + "视频咨询支付");
                        newConfig.setKeyword1("视频咨询支付");
                    }
                    newConfig.setKeyword2(config.getKeyword2() + hospitalDO.getOrgName());
                    newConfig.setKeyword3(config.getKeyword3() + consDoctorDO.getName());
                    newConfig.setKeyword2( hospitalDO.getOrgName());
                    newConfig.setKeyword3( consDoctorDO.getName());
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                    logger.info("眼科微信消息模板推送 咨询支付提醒开始");
@ -3763,9 +3730,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                BeanUtils.copyProperties(config, newConfig);
                newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName()));
                newConfig.setKeyword1(config.getKeyword1() + "处方支付");
                newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getHospitalName());
                newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName());
                newConfig.setKeyword1( "处方支付");
                newConfig.setKeyword2(outpatientDO.getHospitalName());
                newConfig.setKeyword3( outpatientDO.getDoctorName());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 处方支付提醒开始");
@ -3774,8 +3741,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_msg_notice", scene, 1);
                BeanUtils.copyProperties(config, newConfig);
                newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName()));
                newConfig.setKeyword1(config.getKeyword1() + remindMsg);
                newConfig.setKeyword2(config.getKeyword2() + DateUtil.getStringDate());
                newConfig.setKeyword1( remindMsg);
                newConfig.setKeyword2( DateUtil.getStringDate());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
            } else if ("outpatientMsgRemind".equalsIgnoreCase(titelType)) {
@ -3786,10 +3753,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getDoctorName()).replace("key2", doctorDO.getJobTitleName()));
                    newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getDoctorName());
                    newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getAdmDate());
                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDeptName());
                    newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getIcd10Name());
                    newConfig.setKeyword1( outpatientDO.getDoctorName());
                    newConfig.setKeyword2(DateUtil.dateToStrLong(outpatientDO.getAdmDate()));
                    newConfig.setKeyword3(outpatientDO.getDeptName());
                    newConfig.setKeyword4( outpatientDO.getIcd10Name());
                    if ("16".equals(type)) {
                        newConfig.setRemark(config.getRemark().replace("key1", "视频复诊"));
                    } else if ("17".equals(type)) {
@ -3805,10 +3772,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1", consPatientDO.getName()).replace("key2", consDoctorDO.getJobTitleName()));
                    newConfig.setKeyword1(config.getKeyword1() + consDoctorDO.getName());
                    newConfig.setKeyword2(config.getKeyword2() + consultTeam.getCzrq());//咨询暂无挂号时间
                    newConfig.setKeyword3(config.getKeyword3() + hospitalDO.getDeptName());
                    newConfig.setKeyword4(config.getKeyword4() + consultTeam.getSymptoms());
                    newConfig.setKeyword1( consDoctorDO.getName());
                    newConfig.setKeyword2(DateUtil.dateToStrLong(consultTeam.getCzrq()));//咨询暂无挂号时间
                    newConfig.setKeyword3( hospitalDO.getDeptName());
                    newConfig.setKeyword4( consultTeam.getSymptoms());
                    if ("16".equals(type)) {
                        newConfig.setRemark(config.getRemark().replace("key1", "视频复诊"));
                    } else if ("17".equals(type)) {
@ -3828,11 +3795,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    if ("16".equals(type)) {
                        newConfig.setFirst(config.getFirst().replaceFirst("key1", "视频复诊"));
                    }
                    newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getPatientName());
                    newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getDeptName());
                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName());
                    newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getRegisterDate());
                    newConfig.setKeyword5(config.getKeyword5() + generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId));
                    newConfig.setKeyword1( outpatientDO.getPatientName());
                    newConfig.setKeyword2( outpatientDO.getDeptName());
                    newConfig.setKeyword3( outpatientDO.getDoctorName());
                    newConfig.setKeyword4(DateUtil.dateToStrLong(outpatientDO.getRegisterDate()));
                    newConfig.setKeyword5(generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId));
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 视频问诊预约提醒开始");
@ -3843,11 +3810,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    if ("17".equals(type)) {
                        newConfig.setFirst(config.getFirst().replaceFirst("key1", "视频咨询"));
                    }
                    newConfig.setKeyword1(config.getKeyword1() + consPatientDO.getName());
                    newConfig.setKeyword2(config.getKeyword2() + hospitalDO.getDeptName());
                    newConfig.setKeyword3(config.getKeyword3() + consDoctorDO.getName());
                    newConfig.setKeyword4(config.getKeyword4() + consultTeam.getCzrq());
                    newConfig.setKeyword5(config.getKeyword5() + generalDoctorWaitingNumber(consDoctorDO.getId(), wxId, outpatientId));
                    newConfig.setKeyword1(consPatientDO.getName());
                    newConfig.setKeyword2(hospitalDO.getDeptName());
                    newConfig.setKeyword3(consDoctorDO.getName());
                    newConfig.setKeyword4(DateUtil.dateToStrLong(consultTeam.getCzrq()));
                    newConfig.setKeyword5(generalDoctorWaitingNumber(consDoctorDO.getId(), wxId, outpatientId));
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 视频咨询预约提醒开始");

+ 21 - 31
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java

@ -1,56 +1,35 @@
package com.yihu.jw.hospital.prescription.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxWechatDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalWaitingRoomDO;
import com.yihu.jw.entity.hospital.doctor.WlyyPatientRegisterTimeDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.hospital.consult.dao.HospitalWaitingRoomDao;
import com.yihu.jw.hospital.doctor.dao.PatientRegisterTimeDao;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPatientRegisterDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionExpressageDO;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.mapping.service.DoctorMappingService;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PatientRegisterDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionExpressageDao;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.order.dao.BusinessOrderDao;
import com.yihu.jw.order.pay.wx.WeChatConfig;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.restmodel.hospital.prescription.*;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by yeshijie on 2020/05/07.
@ -76,6 +55,8 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    private XzzxEntranceService xzzxEntranceService;
    @Autowired
    private PatientMappingDao patientMappingDao;
    @Autowired
    private PrescriptionExpressageDao prescriptionExpressageDao;
    /**
@ -86,6 +67,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     */
    public JSONObject registerOutPatient(String outPatientId, String doctor){
        WlyyOutpatientDO outpatientDO = outpatientDao.findOne(outPatientId);
        List<WlyyPrescriptionExpressageDO> expressageDOS =prescriptionExpressageDao.findByOutpatientId(outPatientId);
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        if (doctorMappingDO == null) {
@ -118,8 +100,16 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            }
        }
        String doctorFlag =  doctorMappingDO.getDoctorName()+"/"+doctorMappingDO.getMappingCode();
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType());
        String courierflag = "N";
        if (expressageDOS!=null&&expressageDOS.size()!=0){
            WlyyPrescriptionExpressageDO expressageDO = expressageDOS.get(0);
            if (expressageDO.getOneselfPickupFlg()!=null&&expressageDO.getOneselfPickupFlg()==1){
                courierflag="N";
            }else if (expressageDO.getOneselfPickupFlg()!=null&&expressageDO.getOneselfPickupFlg()==0){
                courierflag="Y";
            }
        }
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType(),courierflag);
        logger.info("挂号结果 res: " + res.toString());
        JSONObject object = res.getJSONObject("returnContents");
        String rsCode = "";

+ 2 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -583,6 +583,7 @@ public class EntranceService {
            if (StringUtils.isNotBlank(endTime)) {
                sbs.append("<query compy=\"&lt;\" item=\"CON_DATE\" splice=\"and\" value=\"'" + endTime + "'\"/>");
            }
            sbs.append("<order item=\"CON_DATE\" sort=\"desc\"/>");
            //查询信息结束
            sbs.append("</MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
@ -1399,7 +1400,7 @@ public class EntranceService {
            if (StringUtils.isNotBlank(now)) {
                sbs.append("<query compy=\"&lt;\" item=\"ADM_DAT\" splice=\"and\" value=\"'" + now + "'\"/>");
            }
            sbs.append("<order item=\"CON_DATE\" sort=\"desc\"/>");
            sbs.append("<order item=\"ADM_DAT\" sort=\"desc\"/>");
            //查询信息结束
            sbs.append("</MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);

+ 13 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -869,7 +869,7 @@ public class XzzxEntranceService{
     * @throws Exception
     */
    //挂号(调his后台包)
    public String registered(String doctor,String dept,String sickId,String clinicclass)throws Exception{
    public String registered(String doctor,String dept,String sickId,String clinicclass,String courierflag)throws Exception{
        String api = "Registered";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
@ -894,6 +894,9 @@ public class XzzxEntranceService{
            condition +="<clinicclass>"+clinicclass+"</clinicclass>";
        }
        if (!StringUtils.isEmpty(courierflag)&&!courierflag.equalsIgnoreCase("null")){
            condition +="<courierflag>"+courierflag+"</courierflag>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
@ -1792,11 +1795,12 @@ public class XzzxEntranceService{
     * @param clinicclass 挂号类别(必填)
     * @return
     */
    public JSONObject registeredOperate(String doctor,String dept,String sickId,String clinicclass){
    public JSONObject registeredOperate(String doctor,String dept,String sickId,String clinicclass,String courierflag){
        JSONObject jsonObject= new JSONObject();
        String response="";
        logger.info("clinicclass:"+clinicclass);
        String url = entranceUrl+"registered?doctor="+doctor+"&dept="+dept+"&sickId="+sickId+"&clinicclass="+clinicclass;
        logger.info("courierflag:"+courierflag);
        String url = entranceUrl+"registered?doctor="+doctor+"&dept="+dept+"&sickId="+sickId+"&clinicclass="+clinicclass+"&courierflag="+courierflag;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
@ -1990,6 +1994,12 @@ public class XzzxEntranceService{
                wlyyPrescriptionDO.setStatus(30);
                prescriptionDao.save(wlyyPrescriptionDO);
            }
        }else if (status.equalsIgnoreCase("4")){
            List<WlyyPrescriptionDO> prescriptionDOList =  prescriptionDao.findByAdmNoAndRealOrderList(admNo,realOrder);
            for (WlyyPrescriptionDO wlyyPrescriptionDO:prescriptionDOList){
                wlyyPrescriptionDO.setStatus(100);
                prescriptionDao.save(wlyyPrescriptionDO);
            }
        }
        return map;
    }

+ 16 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java

@ -79,7 +79,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
     * @param size
     * @return
     */
    public MixEnvelop findSurveyQuestion(String title,Integer questionType,Integer page,Integer size)throws Exception{
    public MixEnvelop findSurveyQuestion(String title,String creater, Integer questionType,Integer page,Integer size)throws Exception{
        //计算总数
        String totalSql ="SELECT" +
@ -94,6 +94,10 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
            totalSql+=" AND q.question_type ="+questionType;
        }
        if (StringUtils.isNoneBlank(creater)){
            totalSql+=" AND q.creater ='"+creater+"' ";
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        Long count = 0L;
        if (rstotal != null && rstotal.size() > 0) {
@ -122,6 +126,10 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        if(questionType!=null){
            sql+=" AND q.question_type ="+questionType;
        }
        if (StringUtils.isNoneBlank(creater)){
            sql+=" AND q.creater ='"+creater+"' ";
        }
        sql += " ORDER BY q.create_time DESC LIMIT " + (page - 1) * size + "," + size + " ";
        List<WlyySurveyQuestionVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyySurveyQuestionVO.class));
@ -237,7 +245,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
     * @param size
     * @return
     */
    public MixEnvelop findSurveyTemplate(String title,String label,Integer page,Integer size){
    public MixEnvelop findSurveyTemplate(String title,String creater,String label,Integer page,Integer size){
        String totalSql ="SELECT " +
                " COUNT(1) AS total" +
@ -254,6 +262,9 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        if(StringUtils.isNotBlank(label)){
            totalSql += " AND i.label_code ='"+label+"'";
        }
        if (StringUtils.isNoneBlank(creater)){
            totalSql +=" AND  t.creater = '"+creater+"' ";
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        Long count = 0L;
@ -284,6 +295,9 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        if(StringUtils.isNotBlank(label)){
            sql += " AND  i.label_code ='"+label+"'";
        }
        if (StringUtils.isNoneBlank(creater)){
            sql +=" AND  t.creater = '"+creater+"' ";
        }
        sql += " ORDER BY t.create_time DESC LIMIT " + (page - 1) * size + "," + size + " ";
        List<WlyySurveyTemplateVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyySurveyTemplateVO.class));

+ 2 - 5
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -3,17 +3,14 @@ package com.yihu.jw.order.pay.ylz;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.hospital.prescription.dao.OauthDzqmConfigDao;
import com.yihu.jw.hospital.prescription.dao.OauthYlzConfigDao;
import com.yihu.jw.order.pay.utils.PayLogService;
import com.yihu.jw.util.common.QrcodeUtil;
import com.yihu.jw.utils.ByteToInputStream;
import com.yihu.jw.utils.StringUtil;
import com.ylzinfo.onepay.sdk.HisOnepayClient;
import com.ylzinfo.onepay.sdk.OnepayClient;
import com.ylzinfo.onepay.sdk.domain.ResponseParams;
import com.ylzinfo.onepay.sdk.domain.ext.*;
import com.ylzinfo.onepay.sdk.utils.DateUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -254,7 +251,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config");
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -315,7 +312,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config");
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }

+ 7 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -2345,7 +2345,13 @@ public class ImService {
			}else {
				sessionType=imUtil.SESSION_TYPE_GUIDANCE_HOSPITAL;
			}
			JSONObject sessionJson  = imUtil.createSession(participants,sessionType,"居民 "+basePatientDO.getName()+" "+patientSex,session_id);
			String patientAge = "";
			if (org.apache.commons.lang3.StringUtils.isNoneBlank(basePatientDO.getIdcard())){
				int age = DateUtil.getAgeForIdcard(basePatientDO.getIdcard());
				patientAge = ""+age;
			}
			JSONObject sessionJson  = imUtil.createSession(participants,sessionType,basePatientDO.getName()+" "+patientSex+" "+patientAge,session_id);
			if(sessionJson.getInteger("status") ==-1){
				throw  new RuntimeException(sessionJson.getString("message"));
			}else{

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -25,7 +25,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
    /*@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
/*    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 18 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/survey/WlyySurveyQuestionDO.java

@ -1,7 +1,6 @@
package com.yihu.jw.entity.hospital.survey;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -26,6 +25,8 @@ public class WlyySurveyQuestionDO {
    private String del;//删除标志(1正常,0删除)',
    private Date createTime;//创建时间',
    private Date updateTime;//修改时间',
    private String creater;
    private String createrName;
    @Id
    @Column(name = "id", unique = true, nullable = false)
@ -110,4 +111,20 @@ public class WlyySurveyQuestionDO {
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getCreater() {
        return creater;
    }
    public void setCreater(String creater) {
        this.creater = creater;
    }
    public String getCreaterName() {
        return createrName;
    }
    public void setCreaterName(String createrName) {
        this.createrName = createrName;
    }
}

+ 21 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/survey/WlyySurveyQuestionVO.java

@ -35,6 +35,11 @@ public class WlyySurveyQuestionVO extends UuidIdentityVO {
    private Date updateTime;//修改时间',
    @ApiModelProperty(value = "选项目", example = "模块1")
    private List<WlyySurveyQuestionsOptionVO> optionVOs;
    @ApiModelProperty(value = "创建者code", example = "模块1")
    private String creater;
    @ApiModelProperty(value = "创建者名字", example = "模块1")
    private String createrName;
    public String getTitle() {
        return title;
@ -117,4 +122,20 @@ public class WlyySurveyQuestionVO extends UuidIdentityVO {
    public void setOptionVOs(List<WlyySurveyQuestionsOptionVO> optionVOs) {
        this.optionVOs = optionVOs;
    }
    public String getCreater() {
        return creater;
    }
    public void setCreater(String creater) {
        this.creater = creater;
    }
    public String getCreaterName() {
        return createrName;
    }
    public void setCreaterName(String createrName) {
        this.createrName = createrName;
    }
}

+ 5 - 3
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java

@ -243,8 +243,10 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
                                 @ApiParam(name = "sickId", value = "病人id", required = false)
                                     @RequestParam(value = "sickId",required = false)String sickId,
                                 @ApiParam(name = "clinicclass", value = "挂号类别", required = false)
                                     @RequestParam(value = "clinicclass",required = false)String clinicclass)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.registered(doctor,dept,sickId,clinicclass));
                                     @RequestParam(value = "clinicclass",required = false)String clinicclass,
                                 @ApiParam(name = "courierflag", value = "快递发药标识(Y快递N为自取)", required = false)
                                     @RequestParam(value = "courierflag",required = false)String courierflag)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.registered(doctor,dept,sickId,clinicclass,courierflag));
    }
    /**
@ -266,7 +268,7 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
        Map<String,Object> map = xzzxEntranceService.updatePreStatusLocal(admNo,realOrder,status);
        if (status.equalsIgnoreCase("1")){
            List<WlyyPrescriptionDO> prescriptionDOList =  prescriptionDao.findByAdmNoAndRealOrderList(admNo,realOrder);
            if (prescriptionDOList!=null&&prescriptionDOList.size()!=0){
                    if (prescriptionDOList!=null&&prescriptionDOList.size()!=0){
                WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
                JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
                System.out.println("wlyyPrescriptionDO参数入参"+object.toJSONString());

+ 1 - 1
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -300,7 +300,7 @@ hospital:
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.16.1.42:3000/
  im_list_get: http://192.168.118.240:3000/
  data_base_name: im
fastDFS:
  fastdfs_file_url: http://192.168.103.159:8888/

+ 53 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -772,8 +772,60 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "content", value = "消息内容", defaultValue = "")
			@RequestParam(value = "content", required = true) String content,
			@ApiParam(name = "type", value = "咨询type", defaultValue = "")
			@RequestParam(value = "type", required = false) String type
			@RequestParam(value = "type", required = false) String type,
			@ApiParam(name = "times", value = "times", defaultValue = "")
			@RequestParam(value = "times", required = false) Integer times,
			@ApiParam(name = "wechat_appid", value = "wechat_appid", defaultValue = "")
			@RequestParam(value = "wechat_appid", required = false) String wechat_appid
	)throws Exception{
		List<String> failed = new ArrayList<>();
		//处理语音文件
		if(!org.springframework.util.StringUtils.isEmpty(wechat_appid)){
//			imService.getInputStream("1",wechat_appid);
			if("3".equalsIgnoreCase(content_type)){//语音文件
				String voicepath = imService.fetchWxVoices(wechat_appid);
				logger.info("voice_path:"+voicepath);
				JSONObject obj = new JSONObject();
				String voiceurl = "";
				// 将临时语音拷贝到正式存储路径下
				if (org.apache.commons.lang3.StringUtils.isNotEmpty(voicepath)) {
					if("xm_ihealth_wx".equals(wechat_appid)){
						logger.info("voice_wx_type:"+wechat_appid);
						voiceurl = fileUploadService.uploadWxVoice(voicepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
					}else if ("xm_xzzx_wx".equalsIgnoreCase(wechat_appid)){
						voiceurl = fileUploadService.uploadWxVoiceToEntrance(remote_inner_url,voicepath);
						logger.info(voiceurl);
					}else {
						voiceurl = fileUtil.copyTempVoice(voicepath,fastdfs_file_url);
					}
					obj.put("path", voiceurl);
					obj.put("times", times);
					content = obj.toString();
				}
			}else if("2".equalsIgnoreCase(content_type)){//图片文件
				String imagepath = imService.fetchWxImages(wechat_appid);
				logger.info("image_path:"+imagepath);
				JSONObject obj = new JSONObject();
				String imgeUrl = "";
				// 将临时语音拷贝到正式存储路径下
				if (org.apache.commons.lang3.StringUtils.isNotEmpty(imagepath)) {
					if("xm_ihealth_wx".equals(wechat_appid)){
						logger.info("imge_wx_type:"+wechat_appid);
						imgeUrl = fileUploadService.uploadWxImage(imagepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
					}else{
						imgeUrl = fileUtil.copyTempVoice(imagepath,fastdfs_file_url);
					}
					content = imgeUrl;
				}
			}else{
			}
		}
		session_id = imService.getPatientGuaidenceConsult(sender_id,session_id,type);
		String result = imService.patientGuaidenceAppend(sender_id,sender_name,session_id,content_type,content,"1");
		return success(result);

+ 6 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/survey/SurveyEndpoint.java

@ -43,13 +43,15 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "问题-获取问卷问题列表")
    public MixEnvelop findSurveyQuestion(@ApiParam(name = "title", value = "标题")
                                          @RequestParam(value = "title",required = false) String title,
                                         @ApiParam(name = "creater", value = "创建者")
                                        @RequestParam(value = "creater",required = false) String creater,
                                         @ApiParam(name = "questionType", value = "问题类型")
                                          @RequestParam(value = "questionType",required = false)Integer questionType,
                                         @ApiParam(name = "page", value = "第几页,1开始")
                                          @RequestParam(value = "page",required = true)Integer page,
                                         @ApiParam(name = "size", value = "每页大小")
                                          @RequestParam(value = "size",required = true)Integer size) throws Exception {
        return surveyService.findSurveyQuestion(title,questionType,page,size);
        return surveyService.findSurveyQuestion(title,creater,questionType,page,size);
    }
    @GetMapping(value = BaseHospitalRequestMapping.WlyySurvey.findBySurveyId)
@ -89,13 +91,15 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "模板-查询模板列表")
    public MixEnvelop findSurveyTemplate(@ApiParam(name = "title", value = "标题")
                                              @RequestParam(value = "title",required = false) String title,
                                         @ApiParam(name = "creater", value = "创建者")
                                         @RequestParam(value = "creater",required = false) String creater,
                                          @ApiParam(name = "label", value = "标签code")
                                              @RequestParam(value = "label",required = false)String label,
                                          @ApiParam(name = "page", value = "第几页,1开始")
                                              @RequestParam(value = "page",required = true)Integer page,
                                          @ApiParam(name = "size", value = "每页大小")
                                              @RequestParam(value = "size",required = true)Integer size) throws Exception {
        return surveyService.findSurveyTemplate( title, label, page, size);
        return surveyService.findSurveyTemplate( title, creater,label, page, size);
    }
    @GetMapping(value = BaseHospitalRequestMapping.WlyySurvey.findSurveyTemplateById)

+ 1 - 1
svr/svr-internet-hospital/src/main/resources/application.yml

@ -558,7 +558,7 @@ hospital:
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://192.168.103.150:3000/
  im_list_get: http://192.168.118.240:3000/
  data_base_name: im
# 上传文件临时路径配置