Explorar el Código

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

yeshijie hace 4 años
padre
commit
e9fbd3d659
Se han modificado 36 ficheros con 863 adiciones y 120 borrados
  1. 5 0
      business/base-service/src/main/java/com/yihu/jw/dict/dao/DictDeptDescDao.java
  2. 7 0
      business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java
  3. 6 0
      business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java
  4. 7 18
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  5. 3 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java
  6. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java
  7. 244 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  8. 88 7
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java
  9. 16 1
      business/base-service/src/main/java/com/yihu/jw/hospital/ykyy/service/YkyyService.java
  10. 8 3
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  11. 17 4
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  12. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  13. 2 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  14. 12 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyOutpatientVO.java
  15. 1 1
      gateway/ag-basic/pom.xml
  16. 12 1
      gateway/ag-basic/src/main/resources/application.yml
  17. 10 2
      gateway/ag-basic/src/main/resources/bootstrap.yml
  18. 3 3
      server/svr-authentication/pom.xml
  19. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  20. 2 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java
  21. 42 17
      server/svr-authentication/src/main/resources/application.yml
  22. 9 1
      server/svr-authentication/src/main/resources/bootstrap.yml
  23. 14 1
      server/svr-configuration/src/main/resources/bootstrap.yml
  24. 51 1
      svr/svr-base/src/main/resources/application.yml
  25. 8 0
      svr/svr-base/src/main/resources/bootstrap.yml
  26. 3 6
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java
  27. 85 9
      svr/svr-internet-hospital-entrance/src/main/resources/application.yml
  28. 18 2
      svr/svr-internet-hospital-entrance/src/main/resources/bootstrap.yml
  29. 2 0
      svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/UnSettledHISPrescriptionService.java
  30. 8 13
      svr/svr-internet-hospital-job/src/main/resources/application.yml
  31. 1 1
      svr/svr-internet-hospital-job/src/main/resources/bootstrap.yml
  32. 1 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/Xzyy/XzyyController.java
  33. 3 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java
  34. 40 8
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  35. 119 7
      svr/svr-internet-hospital/src/main/resources/application.yml
  36. 10 2
      svr/svr-internet-hospital/src/main/resources/bootstrap.yml

+ 5 - 0
business/base-service/src/main/java/com/yihu/jw/dict/dao/DictDeptDescDao.java

@ -3,6 +3,7 @@ package com.yihu.jw.dict.dao;
import com.yihu.jw.entity.base.dict.DictDeptDescDO;
import com.yihu.jw.entity.base.dict.DictDiseaseDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
@ -16,5 +17,9 @@ public interface DictDeptDescDao extends PagingAndSortingRepository<DictDeptDesc
    DictDeptDescDO findByDeptCodeAndOrgCode(String deptCode,String orgCode);
    @Query("from DictDeptDescDO where orgCode=?1  order by deptCode ASC")
    List<DictDeptDescDO> findByOrgCode(String orgCode);
    @Query("from DictDeptDescDO where orgCode=?1  and deptName like %?2% order by deptCode ASC")
    List<DictDeptDescDO> findByOrgCode(String orgCode,String keyName);
}

+ 7 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java

@ -22,4 +22,11 @@ public interface DoctorWorkTimeDao extends PagingAndSortingRepository<WlyyDoctor
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.startTime >= ?2 and a.startTime <= ?3 order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTimeByTime(String doctor, Date startDate,Date endDate);
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.startTime >= ?2 and a.endTime <= ?3 order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTimeByDate(String doctor, Date startTime, Date endTime);
    @Query("from WlyyDoctorWorkTimeDO a where a.doctor = ?1 and a.createUserType =?2  order by a.startTime asc")
    List<WlyyDoctorWorkTimeDO> findDoctorWorkTime(String doctor,Integer createUserType);
}

+ 6 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -140,4 +140,10 @@ public class PatientMappingService {
            return null;
        }
    }
    public PatientMappingDO findPatientNoByPatientCode(String code){
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(code);
        return patientMappingDO;
    }
}

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

@ -2087,7 +2087,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            //保存挂号费用
            prescription.setRegFee(getChargeFee(outpatientDO.getDoctor()));
            prescription.setPrescribeTime(new Date());
            //保存费用
            prescriptionDao.save(prescription);
            if (wechatId.equalsIgnoreCase("xm_ykyy_wx")){
@ -4180,8 +4180,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " d.id in ("+sqlCode(codes)+")";
        List<Map<String,Object>> doctors = jdbcTemplate.queryForList(sql);
        List<WlyyDoctorWorkTimeDO> workTimeDOs =makeDoctorWorkTimeDOList(doctors,wlyyDoctorWorkTimeDOs);
        doctorSaveWorkTime(workTimeDOs,date,doctors);
        return true;
        return doctorSaveWorkTime(workTimeDOs,date,doctors);
    }
    /**
@ -4217,14 +4216,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        List<Map<String,Object>> doctors = jdbcTemplate.queryForList(sql);
        List<WlyyDoctorWorkTimeDO> workTimeDOs =makeDoctorWorkTimeDOList(doctors,wlyyDoctorWorkTimeDOs);
        for (WlyyDoctorWorkTimeDO workTimeDO:workTimeDOs){
            List<WlyyDoctorWorkTimeDO> workTimeDOList = doctorWorkTimeDao.findDoctorWorkTime(workTimeDO.getDoctor(),workTimeDO.getStartTime(),workTimeDO.getEndTime());
            List<WlyyDoctorWorkTimeDO> workTimeDOList = doctorWorkTimeDao.findDoctorWorkTimeByDate(workTimeDO.getDoctor(),workTimeDO.getStartTime(),workTimeDO.getEndTime());
            if (workTimeDOList!=null&&workTimeDOList.size()!=0){
                try {
                    throw new Exception("您选择的时间与“开始时间-结束时间”的医院排班/自己排班冲突,请重新选择!");
                } catch (Exception e) {
                    e.printStackTrace();
                    return false;
                }
                throw new Exception("您选择的时间与“开始时间-结束时间”的医院排班/自己排班冲突,请重新选择!");
            }else {
                doctorWorkTimeDao.save(workTimeDO);
            }
@ -4331,16 +4325,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param workTimeDOs
     * @return
     */
    public boolean doctorSaveWorkTime(List<WlyyDoctorWorkTimeDO> workTimeDOs,String date,List<Map<String,Object>> doctors){
    public boolean doctorSaveWorkTime(List<WlyyDoctorWorkTimeDO> workTimeDOs,String date,List<Map<String,Object>> doctors) throws Exception {
        for (WlyyDoctorWorkTimeDO workTimeDO:workTimeDOs){
            List<WlyyDoctorWorkTimeDO> workTimeDOList = doctorWorkTimeDao.findDoctorWorkTime(workTimeDO.getDoctor(),workTimeDO.getStartTime(),workTimeDO.getEndTime());
            List<WlyyDoctorWorkTimeDO> workTimeDOList = doctorWorkTimeDao.findDoctorWorkTimeByDate(workTimeDO.getDoctor(),workTimeDO.getStartTime(),workTimeDO.getEndTime());
            if (workTimeDOList!=null&&workTimeDOList.size()!=0){
                try {
                    throw new Exception("您选择的时间与“开始时间-结束时间”的医院排班/自己排班冲突,请重新选择!");
                } catch (Exception e) {
                    e.printStackTrace();
                    return false;
                }
            }else {
                doctorWorkTimeDao.save(workTimeDO);
            }
@ -4942,7 +4931,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "AND outpatient.status in (0,1) " +
                "AND outpatient.doctor='"+doctor+"' " +
                "AND outpatient.pay_status = 1 " +
                "AND outpatient.outpatient_type= '"+outpatient_type+"' ";
                "AND outpatient.outpatient_type= '"+outpatient_type+"'  ";
        if("1".equals(outpatient_type)){//复诊
            sql =  sql + " AND outpatient.type= '"+type+"' ";
            if("2".equals(type)){//视频复诊才需要判断时间,

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

@ -112,6 +112,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                outpatientDO.setConNo(registerDO.getConNo());
                outpatientDO.setRegisterNo(registerDO.getRegisterNo());
                outpatientDO.setAdmDate(registerDO.getCreateTime());
                outpatientDO.setAdmNo(registerDO.getRegisterNo());
                outpatientDao.save(outpatientDO);
                return res;
            }
@ -132,6 +133,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String serialNo = object.getString("registerNo");
            outpatientDO.setRegisterNo(serialNo);
            outpatientDO.setAdmDate(new Date());
            outpatientDO.setAdmNo(serialNo);
            logger.info("挂号流水 registerNo: ");
            outpatientDao.save(outpatientDO);
@ -156,6 +158,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String serialNo = (String) res.get("registerNo");
            outpatientDO.setRegisterNo(serialNo);
            outpatientDO.setAdmDate(new Date());
            outpatientDO.setAdmNo(serialNo);
            logger.info("挂号流水 registerNo: " + serialNo );
            outpatientDao.save(outpatientDO);

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

@ -184,7 +184,6 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        }
        WlyyOutpatientDO outpatient = outpatientDao.save(outpatientDO);
        BusinessOrderDO businessOrderDO = new BusinessOrderDO();
        businessOrderDO.setRelationCode(outpatient.getId());
        businessOrderDO.setRelationName("复诊-诊查费");
@ -198,10 +197,11 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            businessOrderDO.setOrderCategory("2");
        } else if (outpatientDO.getType().equalsIgnoreCase("2")) {
            businessOrderDO.setOrderType(3);
            businessOrderDO.setOrderCategory("2");
            businessOrderDO.setOrderCategory("3");
        }
        businessOrderService.saveOrder(businessOrderDO);
        WlyyPatientRegisterTimeDO registerTimeDO = null;
        try {

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

@ -109,7 +109,7 @@ public class XzzxEntranceService{
    public static String sendMessageUrl ="http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
//    public static String entranceUrl = "http://localhost:10023/xzzx/";
    public static String entranceUrlLocal = "http://localhost:10023/xzzx/";
    public String getSelectUrl(){
@ -638,7 +638,7 @@ public class XzzxEntranceService{
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info("getCardInfo json:"+json);
        logger.info("FindOutpatientInfo json:"+json);
        return json;
    }
@ -1314,6 +1314,72 @@ public class XzzxEntranceService{
    }
    public Map<String,Object> updatePreStatusLocal(String admNo,String realOrder,String status) throws Exception {
        Map<String,Object> map = new HashedMap();
        logger.info("admNo"+admNo+"=========realOrder"+realOrder+"===========status"+status);
        List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByAdmNo(admNo);
        if (wlyyOutpatientDOList==null||wlyyOutpatientDOList.size()==0){
            throw new Exception("该就诊号查不到!");
        }
        for (WlyyOutpatientDO wlyyOutpatientDO:wlyyOutpatientDOList){
            String registerNo = wlyyOutpatientDO.getRegisterNo();
            if (!StringUtils.isNoneBlank(registerNo)){
                throw new Exception("挂号流水号为空!");
            }
            PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(wlyyOutpatientDO.getPatient());
            List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findByOutpatientId(wlyyOutpatientDO.getId());
            if (prescriptionDOList==null||prescriptionDOList.size()==0){
                List<WlyyPrescriptionVO> prescriptionVOList = selectOriginPrescriptionListLocal(registerNo,patientMappingDO.getMappingCode(),admNo,realOrder);
                logger.info("处方数据"+prescriptionVOList);
                for (WlyyPrescriptionVO prescriptionVO:prescriptionVOList){
                    WlyyPrescriptionDO prescriptionDO =JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(prescriptionVO)),WlyyPrescriptionDO.class);
                    prescriptionDO.setOutpatientId(wlyyOutpatientDO.getId());
                    if (status.equalsIgnoreCase("3")){
                        prescriptionDO.setStatus(30);
                    }
                    prescriptionDO.setPatientCode(wlyyOutpatientDO.getPatient());
                    prescriptionDO.setDoctor(wlyyOutpatientDO.getDoctor());
                    prescriptionDO.setHospital("350211A5010");
                    prescriptionDO= prescriptionDao.save(prescriptionDO);
                    //处方诊断表vo
                    List<WlyyPrescriptionDiagnosisVO> diagnosisVOS = prescriptionVO.getDiagnosisVOs();
                    if (diagnosisVOS!=null&&diagnosisVOS.size()!=0){
                        for (WlyyPrescriptionDiagnosisVO diagnosisVO:diagnosisVOS){
                            WlyyPrescriptionDiagnosisDO prescriptionDiagnosisDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(diagnosisVO)),WlyyPrescriptionDiagnosisDO.class);
                            prescriptionDiagnosisDO.setPrescriptionId(prescriptionDO.getId());
                            prescriptionDiagnosisDO.setDel(1);
                            diagnosisDao.save(prescriptionDiagnosisDO);
                        }
                    }
                    //药品表
                    List<WlyyPrescriptionInfoVO> infoVOList = prescriptionVO.getInfoVOs();
                    if (infoVOList!=null&&infoVOList.size()!=0){
                        for (WlyyPrescriptionInfoVO infoVO:infoVOList){
                            WlyyPrescriptionInfoDO infoDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(infoVO)),WlyyPrescriptionInfoDO.class);
                            infoDO.setPrescriptionId(prescriptionDO.getId());
                            infoDO.setDel(1);
                            prescriptionInfoDao.save(infoDO);
                        }
                    }
                    List<WlyyInspectionVO> inspectionVOList = prescriptionVO.getInspectionVOs();
                    if (inspectionVOList!=null&&inspectionVOList.size()!=0)
                    for (WlyyInspectionVO inspectionVO:inspectionVOList){
                        WlyyInspectionDO inspectionDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(inspectionVO)),WlyyInspectionDO.class);
                        BeanUtils.copyProperties(inspectionVO,inspectionDO);
                        inspectionDO.setPrescriptionId(prescriptionDO.getId());
                        inspectionDO.setDel(1);
                        wlyyInspectionDao.save(inspectionDO);
                    }
                }
            }
        }
        return map;
    }
    /**
     * 获取门诊下所有处方信息
     * @param registerSn 流水号
@ -1334,7 +1400,7 @@ public class XzzxEntranceService{
        response = httpClientUtil.get(url,"GBK");
        logger.info("处方response:"+response+"===="+url);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
        if (object!=null&&object.getInteger("status")==200){
            JSONArray array = new JSONArray();
            array = JSONArray.parseArray(object.getString("obj")).getJSONArray(0);
            for (int i=0;i<array.size();i++){
@ -1486,6 +1552,181 @@ public class XzzxEntranceService{
    }
    /**
     * 获取门诊下所有处方信息---内网调下
     * @param registerSn 流水号
     * @param patNo 居民id
     * @param admNo 住院唯一号
     * @param realOrder 处方号
     * @return
     */
    public List<WlyyPrescriptionVO> selectOriginPrescriptionListLocal(String registerSn,String patNo,String admNo,String realOrder){
        List<WlyyPrescriptionVO> prescriptionVOList = new ArrayList<>();
        String response="";
        String params = "";
        if (StringUtils.isNoneBlank(realOrder)){
            params +="&realOrder="+realOrder;
        }
        logger.info("处方request:"+registerSn+"=="+patNo+"==="+admNo+"===="+realOrder);
        String url = entranceUrlLocal+"getOriginPrescriptionList?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+params;
        response = httpClientUtil.get(url,"GBK");
        logger.info("处方response:"+response+"===="+url);
        JSONObject object = JSONObject.parseObject(response);
        if (object!=null&&object.getInteger("status")==200){
            JSONArray array = new JSONArray();
            array = JSONArray.parseArray(object.getString("obj")).getJSONArray(0);
            for (int i=0;i<array.size();i++){
                WlyyPrescriptionVO wlyyPrescriptionVO = new WlyyPrescriptionVO();
                JSONObject jsonObject = array.getJSONObject(i);
                wlyyPrescriptionVO.setCreateTime(DateUtil.strToDate(isEmty(jsonObject.getString("CREATETIME"))));
                wlyyPrescriptionVO.setCreateUser(isEmty(jsonObject.getString("CREATEUSER")));
                wlyyPrescriptionVO.setCreateUserName(isEmty(jsonObject.getString("CREATENAME")));
                wlyyPrescriptionVO.setUpdateTime(DateUtil.strToDate(isEmty(jsonObject.getString("UPDATETIME"))));
                wlyyPrescriptionVO.setUpdateUser(isEmty(jsonObject.getString("UPDATEUSER")));
                wlyyPrescriptionVO.setUpdateUserName(isEmty(jsonObject.getString("UPDATEUSERNAME")));
                wlyyPrescriptionVO.setRealOrder(isEmty(jsonObject.getString("REALORDER")));
                wlyyPrescriptionVO.setOriginRealOrder(isEmty(jsonObject.getString("ORIGINREALORDER")));
                wlyyPrescriptionVO.setAdmNo(isEmty(jsonObject.getString("ADMNO")));
                wlyyPrescriptionVO.setOriginAdmNo(isEmty(jsonObject.getString("ORIGINADMNO")));
                wlyyPrescriptionVO.setSerialNo(isEmty(jsonObject.getString("SERIALNO")));
                wlyyPrescriptionVO.setOriginSerialNo(isEmty(jsonObject.getString("ORIGINSERIALNO")));
                wlyyPrescriptionVO.setType(jsonObject.getInteger("TYPE"));
                wlyyPrescriptionVO.setPatientCode(isEmty(jsonObject.getString("PATIENTCODE")));
                wlyyPrescriptionVO.setPatientName(isEmty(jsonObject.getString("PATEINTNAME")));
                wlyyPrescriptionVO.setIdcard(isEmty(jsonObject.getString("IDCARD")));
                wlyyPrescriptionVO.setCardNo(isEmty(jsonObject.getString("CARDNO")));
                wlyyPrescriptionVO.setSsc(isEmty(jsonObject.getString("SSC")));
                wlyyPrescriptionVO.setDoctor(isEmty(jsonObject.getString("DOCTOR")));
                wlyyPrescriptionVO.setDoctorName(isEmty(jsonObject.getString("DOCTORNAME")));
                wlyyPrescriptionVO.setStatus(jsonObject.getInteger("STATUS"));
                wlyyPrescriptionVO.setMkFailReason(isEmty(jsonObject.getString("MKFAILREASON")));
                wlyyPrescriptionVO.setMkTime(DateUtil.strToDate(isEmty(jsonObject.getString("MKTIME"))));
                wlyyPrescriptionVO.setPrescribeTime(DateUtil.strToDate(isEmty(jsonObject.getString("PRESCRIBETIME"))));
                wlyyPrescriptionVO.setPrescribeReason(isEmty(jsonObject.getString("PRESCRIBEREASON")));
                wlyyPrescriptionVO.setPayTime(DateUtil.strToDate(isEmty(jsonObject.getString("PAYTIME"))));
                wlyyPrescriptionVO.setDosageTime(DateUtil.strToDate(isEmty(jsonObject.getString("DOSAGETIME"))));
                wlyyPrescriptionVO.setFinishTime(DateUtil.strToDate(isEmty(jsonObject.getString("FINISHTIME"))));
                wlyyPrescriptionVO.setDept(isEmty(jsonObject.getString("DEPT")));
                wlyyPrescriptionVO.setDeptName(isEmty(jsonObject.getString("DEPTNAME")));
                wlyyPrescriptionVO.setHospital(isEmty(jsonObject.getString("HOSPITAL")));
                wlyyPrescriptionVO.setHospitalName(isEmty(jsonObject.getString("HOSPITALNAME")));
                wlyyPrescriptionVO.setConsult(isEmty(jsonObject.getString("CONSULT")));
                wlyyPrescriptionVO.setDispensaryType(isEmty(jsonObject.getString("DISPENSARYTYPE"))!=null?Integer.parseInt(isEmty(jsonObject.getString("DISPENSARYTYPE"))):null);
                wlyyPrescriptionVO.setReason(isEmty(jsonObject.getString("REASON")));
                wlyyPrescriptionVO.setDiseaseImg(isEmty(jsonObject.getString("DISEASEIMG")));
                wlyyPrescriptionVO.setRemark(isEmty(jsonObject.getString("REMARK")));
                wlyyPrescriptionVO.setCancelReason(isEmty(jsonObject.getString("CANCELREASON")));
                wlyyPrescriptionVO.setCaCertData(isEmty(jsonObject.getString("CACERTDATA")));
                wlyyPrescriptionVO.setCaMessage(isEmty(jsonObject.getString("CAMESSAGE")));
                wlyyPrescriptionVO.setDigitalSignNo(isEmty(jsonObject.getString("DIGITALSIGNNO")));
                wlyyPrescriptionVO.setOriginalDataAbstract(isEmty(jsonObject.getString("ORIGINALDATAABSTRACT")));
                wlyyPrescriptionVO.setStrOriginalData(isEmty(jsonObject.getString("STRORIGINALDATA")));
                wlyyPrescriptionVO.setHisDeptCode(isEmty(jsonObject.getString("HISDEPTCODE")));
                wlyyPrescriptionVO.setHisDoctorCode(isEmty(jsonObject.getString("HISDOCTORCODE")));
                wlyyPrescriptionVO.setHisGisterTypeCode(isEmty(jsonObject.getString("HISGISTERTYPECODE")));
                wlyyPrescriptionVO.setHisRateTypeCode(isEmty(jsonObject.getString("HISRATETYPECODE")));
                wlyyPrescriptionVO.setHisHospital(isEmty(jsonObject.getString("HISHOSPITAL")));
                wlyyPrescriptionVO.setHisRegisterFee(isEmty(jsonObject.getString("HISREGISTERFEE"))!=null?Integer.parseInt(isEmty(jsonObject.getString("HISREGISTERFEE"))):null);
                wlyyPrescriptionVO.setPayStatus(isEmty(jsonObject.getString("PAYSTATUS"))!=null?Integer.parseInt(isEmty(jsonObject.getString("PAYSTATUS"))):null);
                //TODO 快递数据
                wlyyPrescriptionVO.setDispUser(isEmty(jsonObject.getString("DISPUSER")));
                wlyyPrescriptionVO.setDispUserName(isEmty(jsonObject.getString("DISPUSERNAME")));
                wlyyPrescriptionVO.setDispDate(DateUtil.strToDate(isEmty(jsonObject.getString("DISPDATE"))));
                //诊断
                String disagnosisUrl = entranceUrlLocal+"getOutpatientDiagnosis?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
                String disagnosisResponse = httpClientUtil.get(disagnosisUrl,"GBK");
                logger.info("诊断disagnosisResponse:"+disagnosisResponse);
                JSONObject object1 = JSONObject.parseObject(disagnosisResponse);
                if (object1.getString("status").equalsIgnoreCase("200")){
                    JSONArray jsonArray = JSONArray.parseArray(object1.getString("obj")).getJSONArray(0);
                    logger.info("诊断"+jsonArray.toJSONString());
                    List<WlyyPrescriptionDiagnosisVO> prescriptionDiagnosisVOS = new ArrayList<>();
                    for (int j=0;j<jsonArray.size();j++){
                        JSONObject disagnosisJson = jsonArray.getJSONObject(j);
                        WlyyPrescriptionDiagnosisVO prescriptionDiagnosisVO = new WlyyPrescriptionDiagnosisVO();
                        prescriptionDiagnosisVO.setCode(isEmty(disagnosisJson.getString("DIAGNOSECODE")));
                        prescriptionDiagnosisVO.setName(isEmty(disagnosisJson.getString("DIAGNOSENAME")));
                        prescriptionDiagnosisVO.setType(isEmty(disagnosisJson.getString("DIAGNOSETYPE"))==null?null:Integer.parseInt(disagnosisJson.getString("DIAGNOSETYPE")));
                        prescriptionDiagnosisVOS.add(prescriptionDiagnosisVO);
                    }
                    wlyyPrescriptionVO.setDiagnosisVOs(prescriptionDiagnosisVOS);
                }
                String infoUrl = entranceUrlLocal+"getOutpatientDrugInfo?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
                String infoResponse = httpClientUtil.get(infoUrl,"GBK");
                logger.info("药品infoResponse:"+infoResponse);
                JSONObject infoObject = JSONObject.parseObject(infoResponse);
                if (infoObject.getString("status").equalsIgnoreCase("200")) {
                    JSONArray infoArray = JSONArray.parseArray(infoObject.getString("obj")).getJSONArray(0);
                    //药品
                    List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOList = new ArrayList<>();
                    for (int j=0;j<infoArray.size();j++){
                        WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
                        JSONObject infoJson = infoArray.getJSONObject(j);
                        prescriptionInfoVO.setDrugNo(isEmty(infoJson.getString("DRUGNO")));
                        prescriptionInfoVO.setDrugName(isEmty(infoJson.getString("DRUGNAME")));
                        prescriptionInfoVO.setDispDeposite(isEmty(infoJson.getString("DISPDEPOSITE")));
                        prescriptionInfoVO.setDosage(isEmty(infoJson.getString("DOSAGE")));
                        prescriptionInfoVO.setQuantity(isEmty(infoJson.getString("QUANTITY")));
                        prescriptionInfoVO.setUnit(isEmty(infoJson.getString("UNIT")));
                        prescriptionInfoVO.setUnitName(isEmty(infoJson.getString("UNITNAME")));
                        prescriptionInfoVO.setPackUnitName(isEmty(infoJson.getString("PACKUNITNAME")));
                        prescriptionInfoVO.setPackUnit(isEmty(infoJson.getString("PACKUNIT")));
                        prescriptionInfoVO.setUsageCode(isEmty(infoJson.getString("USAGECODE")));
                        prescriptionInfoVO.setUsageName(isEmty(infoJson.getString("USAGENAME")));
                        prescriptionInfoVO.setSupplyCode(isEmty(infoJson.getString("SUPPLYCODE")));
                        prescriptionInfoVO.setSupplyName(isEmty(infoJson.getString("SUPPLYNAME")));
                        prescriptionInfoVO.setDays(isEmty(infoJson.getString("DAYS")));
                        prescriptionInfoVO.setFrequency(isEmty(infoJson.getString("FREQUENCY")));
                        prescriptionInfoVO.setSerial(isEmty(infoJson.getString("SERIAL")));
                    /*    prescriptionInfoVO.setGroupNo(isEmty(infoJson.getString("groupNo")));*/
                        prescriptionInfoVO.setSpecification(isEmty(infoJson.getString("SPECIFICATION")));
                        prescriptionInfoVO.setPackRetprice(isEmty(infoJson.getString("PACKRETPRICE"))!=null?Double.parseDouble(isEmty(infoJson.getString("PACKRETPRICE"))):null);
                        prescriptionInfoVO.setHerbalCount(isEmty(infoJson.getString("HERBALCOUNT")));
                        prescriptionInfoVO.setPostCount(isEmty(infoJson.getString("POSTCOUNT")));
                        prescriptionInfoVO.setDel(isEmty(infoJson.getString("DEL"))!=null?Integer.parseInt(infoJson.getString("DEL")):null);
                        prescriptionInfoVO.setComm(infoJson.getString("COMM"));
                        wlyyPrescriptionInfoVOList.add(prescriptionInfoVO);
                        wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOList);
                    }
                }
                //检查检验内容
                String inspectionUrl = entranceUrlLocal+"getOutpatientCheckTestInfo?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
                String inspectionResponse = httpClientUtil.get(inspectionUrl,"GBK");
                logger.info("检查检验内容inspectionResponse:"+inspectionResponse);
                JSONObject inspectionObject = JSONObject.parseObject(inspectionResponse);
                if (inspectionObject.getString("status").equalsIgnoreCase("200")) {
                    List<WlyyInspectionVO> wlyyInspectionVOList = new ArrayList<>();
                    JSONArray inspectionArray = JSONArray.parseArray(inspectionObject.getString("obj")).getJSONArray(0);
                    for (int j=0;j<inspectionArray.size();j++){
                        WlyyInspectionVO inspectionVO = new WlyyInspectionVO();
                        JSONObject inspectionJson = inspectionArray.getJSONObject(j);
                        inspectionVO.setGroupName(isEmty(inspectionJson.getString("GROUPNAME")));
                        inspectionVO.setQuantity(isEmty(inspectionJson.getString("QUANTITYS"))!=null?Integer.parseInt(isEmty(inspectionJson.getString("QUANTITYS"))):null);
                        inspectionVO.setFrequency(isEmty(inspectionJson.getString("FREQUENCYS")));
                        inspectionVO.setParentCode(isEmty(inspectionJson.getString("PARENTCODE")));
                        inspectionVO.setParentName(isEmty(inspectionJson.getString("PARENTCODENAME")));
                        inspectionVO.setCode(isEmty(inspectionJson.getString("CODES")));
                        inspectionVO.setName(isEmty(inspectionJson.getString("NAMES")));
                        inspectionVO.setInformation(isEmty(inspectionJson.getString("INFORMATION")));
                        inspectionVO.setCheckEquip(isEmty(inspectionJson.getString("CHECKEQUIP")));
                        inspectionVO.setCheckPartName(isEmty(inspectionJson.getString("CHECKPARTNAME")));
                        inspectionVO.setCheckPart(isEmty(inspectionJson.getString("CHECKPART")));
                        wlyyInspectionVOList.add(inspectionVO);
                    }
                    wlyyPrescriptionVO.setInspectionVOs(wlyyInspectionVOList);
                }
                prescriptionVOList.add(wlyyPrescriptionVO);
            }
        }
        return prescriptionVOList;
    }
    /**
     *
     * 挂号(调his后台包)

+ 88 - 7
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -32,10 +32,7 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
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.util.http.HttpClientUtil;
@ -243,7 +240,7 @@ public class YkyyEntranceService {
    }
    /**
     * 检验信息明细
     * 检查信息明细
     * @param REPORT_ID
     * @return
     * @throws Exception
@ -445,6 +442,26 @@ public class YkyyEntranceService {
                wlyyOutpatientVO.setAdmDate(DateUtil.strToDate(admDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVO.setConDate(DateUtil.strToDate(conDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVOS.add(wlyyOutpatientVO);
                List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
                JSONArray array = findV_ZKSG_JCCX(PAT_NO,wlyyOutpatientVO.getAdmNo());
                for (int j=0;j<array.size();j++){
                    JSONObject object = array.getJSONObject(j);
                    String ksdm = object.getString("ksdm");//科室代码
                    String fymc = object.getString("fymc");//费用名称
                    String fydj = object.getString("fydj");//单价
                    String fysl = object.getString("fysl");//数量
                    String fyhj = object.getString("fyhj");//金额
                    String jzxh = object.getString("jzxh");//就诊序号
                    String zxks = object.getString("zxks");//执行科室
                    WlyyInspectionVO wlyyInspectionVO = new WlyyInspectionVO();
                    wlyyInspectionVO.setName(fymc);
                    wlyyInspectionVO.setDeptName(zxks);
                    wlyyInspectionVO.setDept(ksdm);
                    wlyyInspectionVO.setQuantity(Integer.parseInt(fysl));
                    inspectionVOList.add(wlyyInspectionVO);
                }
                wlyyOutpatientVO.setInspectionVOS(inspectionVOList);
            }
        }
        return wlyyOutpatientVOS;
@ -528,6 +545,51 @@ public class YkyyEntranceService {
    }
    /**
     * HIS就诊患者历史查询
     * @throws Exception
     */
    public JSONArray findV_ZKSG_JCCX(String brid,String conNo) throws Exception{
        String sql = "SELECT\n" +
                "\tz.BRID AS \"brid\",\n" +
                "\tz.BRXM AS \"brxm\",\n" +
                "\tto_char (\n" +
                "\t\tz.KDRQ,\n" +
                "\t\t'yyyy/MM/dd hh24:mi:ss'\n" +
                "\t) AS \"kdrq\",\n" +
                "\tto_char (\n" +
                "\t\tz.ZXRQ,\n" +
                "\t\t'yyyy/MM/dd hh24:mi:ss'\n" +
                "\t) AS \"zxrq\",\n" +
                "\tz.YSDM AS \"ysdm\",\n" +
                "\tz.KSDM AS \"ksdm\",\n" +
                "\tz.FYMC AS \"fymc\",\n" +
                "\tz.FYDJ AS \"fydj\",\n" +
                "\tz.FYSL AS \"fysl\",\n" +
                "\tz.FYHJ AS \"fyhj\",\n" +
                "\tz.YBLB AS \"yblb\",\n" +
                "\tz.JZXH AS \"jzxh\",\n" +
                "\tz.YJXH AS \"yjxh\",\n" +
                "\tz.ZXKS AS \"zxks\"\n" +
                "FROM\n" +
                "\tV_ZKSG_JCCX z\n" +
                "WHERE\n" +
                "\tz.JZXH = '"+conNo+"'\n" +
                "AND z.brid = '"+brid+"'";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        }
        return new JSONArray();
    }
    /**
     * HIS处方记录
     * @throws Exception
@ -598,6 +660,7 @@ public class YkyyEntranceService {
                        "\td.GYTJ as \"gytj\",\n" +
                        "\td.YCJL as \"ycjl\",\n" +
                        "\td.SBXH as \"sbxh\",\n" +
                        "\td.YYTS as \"yyts\",\n" +
                        "\td.YFGG as \"yfgg\"\n" +
                        "FROM\n" +
                        "\tV_MS_DD02 d\n" +
@ -618,15 +681,33 @@ public class YkyyEntranceService {
                    for (int i =0;i<array1.size();i++){
                        JSONObject object1 = array1.getJSONObject(i);
                        WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
                        String sql = "SELECT ypxh as \"ypxh\",ypmc2 as \"ypmc2\" from V_ZKSG_MZ_YPXX WHERE ypxh='"+object1.getString("ypxh")+"' ";
                        Map<String,Object> params4 = new HashedMap();
                        params4.put("sql",sql);
                        HttpResponse response4 = HttpUtils.doGet(url,params4);
                        String content4 = response4.getContent();
                        logger.info("response:"+content4);
                        JSONObject rs4 = JSON.parseObject(content4);
                        Integer status4 = rs4.getInteger("status");
                        if(status4!=null&&status4 == 200){
                            JSONArray array4 =  rs4.getJSONArray("detailModelList");
                            logger.info("info"+rs4.getJSONArray("detailModelList"));
                            if (array4!=null&&array4.size()!=0){
                                JSONObject jsonObject = array4.getJSONObject(0);
                                prescriptionInfoVO.setDrugName(jsonObject.getString("ypmc2"));
                            }
                        }
                        prescriptionInfoVO.setDrugNo(object1.getString("ypxh"));
                        prescriptionInfoVO.setDrugPlace(object1.getString("ypcd"));
                        prescriptionInfoVO.setQuantity(object1.getString("ypsl"));
                        prescriptionInfoVO.setPackRetprice(object1.getDouble("ypdj"));
                        prescriptionInfoVO.setPackUnitName(object1.getString("yfdw"));
                        prescriptionInfoVO.setUnitName(object1.getString("yfdw"));
                        prescriptionInfoVO.setDosage(object1.getString("mrcs"));
                        prescriptionInfoVO.setPackQuantity(object1.getInteger("yfbz"));
                        prescriptionInfoVO.setUsageCode(object1.getString("ypyf"));
                        prescriptionInfoVO.setYpyf(object1.getInteger("ypyf"));
                        prescriptionInfoVO.setDays(object1.getString("yyts"));
                     /*   prescriptionInfoVO.setYpyf(object1.getInteger("ypyf"));*/
                        prescriptionInfoVO.setHisCode(object1.getInteger("sbxh"));
                        prescriptionInfoVO.setSpecification(object1.getString("yfgg"));
                        wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
@ -1196,7 +1277,7 @@ public class YkyyEntranceService {
                "FROM\n" +
                "\tV_ZKSG_JCXM_MZ mz where 1=1 ";
        if (StringUtils.isNoneBlank(pydm)){
            sql+=" and lower(pydm) = '%"+pydm.toLowerCase()+"%'";
            sql+=" and lower(pydm) like '%"+pydm.toLowerCase()+"%'";
        }
        /*List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);*/
        JSONArray array = new JSONArray();

+ 16 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/ykyy/service/YkyyService.java

@ -626,7 +626,22 @@ public class YkyyService {
    }
    /**
     * 根据订单id修改医生ID
     * @param doctorId  医生ID
     * @param orderId   订单ID
     * @return
     */
    public String  updateDoctorIdByOrderId(String doctorId,String orderId){
        String response="";
        String url="http://www.yanketong.com:133/api/doc_jkzl/update_doctorid_by_orderno?";
        url+="order_no="+orderId;
        url+="&doctor_id="+doctorId;
        logger.info("根据订单id修改医生ID接口URL="+url);
        response = httpClientUtil.get(url,"UTF-8");
        logger.info("根据订单id修改医生ID="+response);
        return response;
    }
}

+ 8 - 3
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -57,6 +57,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
@ -149,7 +150,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                businessOrderDO.setDoctor(wlyyPrescriptionDO.getDoctor());
                businessOrderDO.setPatient(wlyyPrescriptionDO.getPatientCode());
                businessOrderDO.setPatientName(wlyyPrescriptionDO.getPatientName());
                businessOrderDO.setPayPrice(wlyyPrescriptionDO.getDrugFee()*100);
                BigDecimal b = new BigDecimal(String.valueOf(wlyyPrescriptionDO.getDrugFee()));
                BigDecimal c = new BigDecimal(String.valueOf(100));
                BigDecimal bc = b.multiply(c);
                businessOrderDO.setPayPrice(bc.doubleValue());
                businessOrderDO.setDescription("处方结算");
                businessOrderDO = businessOrderDao.save(businessOrderDO);
                businessOrderDOS.add(businessOrderDO);
@ -260,7 +264,8 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                }
            }
        }else {
            throw new Exception("医生映射表不存在!");
            /*throw new Exception("医生映射表不存在!");*/
            yktDoctor="hlwyymrys001";
        }
        String remark = businessOrderDO.getRematk();
        String response=ykyyService.addYktOrder(orderNo,patientId,orderAmout,remark,state,orderType,yktDoctor,payType,null,patientTel,orderCatagrate,pcCallBack,appCallBack);
@ -676,7 +681,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                }
            }
            else if (businessOrderDO!=null&&!businessOrderDO.getOrderCategory().equalsIgnoreCase("5")){
            if (businessOrderDO!=null&&!businessOrderDO.getOrderCategory().equalsIgnoreCase("5")){
                ykyyService.updateYktOrderStatus(businessOrderDO.getOrderNo(),businessOrderDO.getStatus().toString());
            }

+ 17 - 4
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -28,6 +28,7 @@ import com.yihu.jw.hospital.mapping.service.DoctorMappingService;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.hospital.message.service.SystemMessageService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.im.dao.ConsultDao;
@ -123,6 +124,9 @@ public class ImService {
	@Autowired
	private YkyyService ykyyService;
	@Autowired
	private PrescriptionService prescriptionService;
	
	@Value("${im.data_base_name}")
	private String data_base_name;
@ -304,7 +308,7 @@ public class ImService {
				"AND a.patient= '" +patient+"' "+
				"AND b.to_doctor='" +doctor+"' "+
				"AND a.del='1' " +
				"AND (a.type<> 9 or a.type<> 16)" +
				"AND (a.type<> 9 and a.type<> 16)" +
				"AND a.status=0";
		
		List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(totalSql);
@ -1201,6 +1205,8 @@ public class ImService {
			consult.setGuidance(ct.getGuidance());
			//关联业务code
			consult.setRelationCode(outpatientCode);
			//支付状态为1
			consult.setPayStatus(1);
			// 设置咨询标识
			ct.setConsult(consult.getId());
			
@ -1477,26 +1483,30 @@ public class ImService {
		data.put("gender",patient.getSex().toString());
		data.put("question",consultTeam.getSymptoms());
		String type="";
		if (cons.getType()!=null&&1==cons.getType()){
			String msg =patient.getName()+ ",您好!您有1条图文咨询已结束,请及时对咨询医生进行评价。";
			data.put("msg",msg);
			data.put("type","1");
			type="1";
		}
		if (cons.getType()!=null&&9==cons.getType()){
			String msg=patient.getName()+ ",您好!您有1条图文复诊已结束,请及时对咨询医生进行评价。";
			data.put("msg",msg);
			data.put("type","9");
			type="9";
		}
		if (cons.getType()!=null&&16==cons.getType()){
			String msg=patient.getName()+ ",您好!您有1条视频复诊已结束,请及时对咨询医生进行评价。";
			data.put("msg",msg);
			data.put("type","16");
			type="16";
		}
		if (cons.getType()!=null&&17==cons.getType()){
			String msg=patient.getName()+ ",您好!您有1条视频咨询已结束,请及时对咨询医生进行评价。";
			data.put("msg",msg);
			data.put("type","17");
			type="17";
		}
		messageDO.setData(data.toString());
		try {
@ -1508,6 +1518,9 @@ public class ImService {
		if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
			ykyyService.pushNotificationToYktPatient(patient.getYktId(),messageDO.getTitle(),data.get("msg").toString());
		}
		prescriptionService.sendWxTemplateMsg(wxId,cons.getRelationCode(),type,"evaluateRemind",null);
	}
@ -2605,7 +2618,7 @@ public class ImService {
					"wlyy_consult_team b," +
					"base_patient d  " +
					"WHERE a.id=b.consult " +
					"AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (" + type + ") and b.status = 0  " +
					"AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (" + type + ") and b.status = 0 and a.pay_status=1 " +
					"ORDER BY a.czrq desc ";
		}
		if("9".equals(type) || "16".equals(type)|| "12".equals(type)){
@ -2640,7 +2653,7 @@ public class ImService {
						" left join wlyy_prescription p on p.outpatient_id = op.id "+
					"WHERE op.patient=patient.id " +
					"AND op.doctor='"+doctorCode+"' " +
					"AND op.status in ('0','1') ";
					"AND op.status in ('0','1') and  op.pay_status=1 ";
			if("9".equals(type)){
				//图文复诊
				sql =sql +"AND op.type=1 AND op.outpatient_type=1 ";

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

@ -19,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
    @GeneratedValue(generator = "generator")
/*    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)
    @Column(name = "id", unique = true, nullable = false)*/
//==========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;

+ 2 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -479,6 +479,8 @@ public class BaseHospitalRequestMapping {
        public static final String updatePayStatus = "/updatePayStatus";
        public static final String findPatNoByPatient = "/findPatNoByPatient";

+ 12 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyOutpatientVO.java

@ -214,6 +214,10 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    private Integer payStatus;
    @ApiModelProperty(value = "检查项目", example = "检查项目")
    private List<WlyyInspectionVO> inspectionVOS;
    public String getAdmNo() {
        return admNo;
@ -477,4 +481,12 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }
    public List<WlyyInspectionVO> getInspectionVOS() {
        return inspectionVOS;
    }
    public void setInspectionVOS(List<WlyyInspectionVO> inspectionVOS) {
        this.inspectionVOS = inspectionVOS;
    }
}

+ 1 - 1
gateway/ag-basic/pom.xml

@ -12,7 +12,7 @@
    <artifactId>ag-basic</artifactId>
    <version>${parent.version}</version>
    <packaging>jar</packaging>
    <packaging>war</packaging>
    <dependencies>
        <!-- 支持Tomcat启动 -->

+ 12 - 1
gateway/ag-basic/src/main/resources/application.yml

@ -186,4 +186,15 @@ spring:
  redis:
     host: 59.61.92.90 # Redis server host.
     port: 9054  # Redis server port.
     password: jkzlehr
     password: jkzlehr
---
spring:
  profiles: jwystest
  datasource:
    url: jdbc:mysql://172.26.0.104/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: root
    password: jkzlehr
  redis:
    host: 172.26.0.190 # Redis server host.
    port: 6379 # Redis server port.

+ 10 - 2
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -52,7 +52,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.pring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
@ -96,4 +96,12 @@ spring:
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.120.216:1221}
      label: ${wlyy.spring.config.label:master}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwystest
  cloud:
    config:
      uri: ${wlyy-spring.config.uri:http://172.26.0.194:1221}
      label: ${wlyy-spring.config.label:jwdev}

+ 3 - 3
server/svr-authentication/pom.xml

@ -75,11 +75,11 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
       <!-- <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <!-- <scope>runtime</scope> -->
        </dependency>
            &lt;!&ndash; <scope>runtime</scope> &ndash;&gt;
        </dependency>-->
        <!-- Redis  -->
        <dependency>

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -1435,7 +1435,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
                                    if (list!=null&&list.size()!=0){
                                        for (int i=0;i<list.size();i++){
                                            JSONObject family = list.getJSONObject(i);
                                            if (family.getString("ILLNESS").equalsIgnoreCase("本人")){
                                            if (family.getString("ILLNESS").equalsIgnoreCase("本人")||tel.equalsIgnoreCase(family.getString("TEL"))){
                                                basePatientDO.setDel("1");
                                                basePatientDO.setName(family.getString("NAME"));
                                                basePatientDO.setCreateTime(new Date());

+ 2 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java

@ -83,7 +83,8 @@ public class RegisterService {
            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO();
            medicareCardDO.setDel("1");
            medicareCardDO.setType(PatientMedicareCardDO.Type.MedicareCard.getType());
            medicareCardDO.setParentType("A");
            medicareCardDO.setType("A_01");
            medicareCardDO.setCode(ssc);
            medicareCardDO.setPatientCode(temp.getId());

+ 42 - 17
server/svr-authentication/src/main/resources/application.yml

@ -5,23 +5,21 @@ server:
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    hikari:
      registerMbeans: true
      max-active: 100
      max-idle: 100 #最大空闲连接
      min-idle: 10 #最小空闲连接
      validation-query-timeout: 20
      log-validation-errors: true
      validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
      validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
      test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
      test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
      idle-timeout: 20000
      connection-test-query: SELECT 1
      num-tests-per-eviction-run: 100 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
      test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
      min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
      time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    max-active: 100
    max-idle: 100 #最大空闲连接
    min-idle: 10 #最小空闲连接
    validation-query-timeout: 20
    log-validation-errors: true
    validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
    validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
    test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
    test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
    idle-timeout: 20000
    connection-test-query: SELECT 1
    num-tests-per-eviction-run: 100 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  redis:
    database: 0 # Database index used by the connection factory.
    timeout: 0 # Connection timeout in milliseconds.
@ -259,6 +257,33 @@ fastDFS:
wlyy:
  url: http://www.xmtyw.cn/wlyy/
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
---
spring:
  profiles: jwystest
  datasource:
    url: jdbc:mysql://172.26.0.195/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: root
    password: jkzlehr
  redis:
    host: 172.26.0.190 # Redis server host.
    port: 6379 # Redis server port.
  ##发现服务
## i健康用户信息接口,开放出来给互联网医院登录同步用户信息用
iHealth:
  user-info-uri: http://ehr.yihu.com/wlyy/iHealth/userInfo
zhongshanHospital:
  user-info-uri: http://laptop-u738dn2p:10023/mqsdk/getUserInfoByOpenid
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyy/
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream

+ 9 - 1
server/svr-authentication/src/main/resources/bootstrap.yml

@ -47,7 +47,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
@ -99,3 +99,11 @@ spring:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.120.216:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwystest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.194:1221}
      label: ${wlyy.spring.config.label:jwdev}

+ 14 - 1
server/svr-configuration/src/main/resources/bootstrap.yml

@ -139,4 +139,17 @@ spring:
        git:
          uri: ${wlyy.spring.config.git.uri:http://127.0.0.1:10010/jkzl/config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:master}
        default-label: ${wlyy.spring.config.git.label:master}
---
spring:
  profiles: jwystest
  ##git配置
  cloud:
    config:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://192.168.1.220:10080/Amoy2/wlyy2.0.config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:jwdev}

+ 51 - 1
svr/svr-base/src/main/resources/application.yml

@ -423,4 +423,54 @@ fastDFS:
fast-dfs:
  tracker-server: 172.16.100.240:22122 #服务器地址
wechat:
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段  # todo 待配置
---
spring:
  profiles: jwystest
  datasource:
    url: jdbc:mysql://172.26.0.195/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: root
    password: jkzlehr
  #    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
  #    username: root
  #    password: 123456
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.26.0.190:9300,172.26.0.190:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.26.0.190:9200,http://172.26.0.190:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  redis:
    host: 172.26.0.190 # Redis server host.
    port: 6379 # Redis server port.
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
wlyy:
  url: http://ehr.yihu.com/wlyy/
wechat:
  id: xm_zsyy_wx
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream

+ 8 - 0
svr/svr-base/src/main/resources/bootstrap.yml

@ -79,3 +79,11 @@ spring:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.120.216:1221}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwystest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.194:1221}
      label: ${wlyy.spring.config.label:jwdev}

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

@ -8,10 +8,7 @@ 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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Trick on 2020/3/18.
@ -236,7 +233,7 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
     * @return
             * @throws Exception
     */
    @GetMapping(value = "/updatePreStatus")
    @PostMapping(value = "/updatePreStatus")
    @ApiOperation(value = "处方状态变更", notes = "处方状态变更")
    public ObjEnvelop updatePreStatus(@ApiParam(name = "admNo", value = "就诊唯一号", required = false)
                                      @RequestParam(value = "admNo",required = false)String admNo,
@ -244,7 +241,7 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
                                      @RequestParam(value = "realOrder",required = false)String realOrder,
                                      @ApiParam(name = "status", value = "处方状态:3结算完成", required = false)
                                      @RequestParam(value = "status",required = false)String status)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.updatePreStatus(admNo,realOrder,status));
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.updatePreStatusLocal(admNo,realOrder,status));
    }

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

@ -48,10 +48,6 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
@ -217,8 +213,8 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
  sf_check_word:
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
# 眼科医院前置机
spring:
@ -262,8 +258,8 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
  sf_check_word:
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
#心脏中心前置机配置
spring:
@ -301,4 +297,84 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
  sf_check_word:
  sf_check_word:
---
spring:
  profiles: jwtest
  datasource:
    url: jdbc:mysql://172.26.0.104/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: ssgg
    password: ssgg@jkzl2019
  redis:
    host: 172.26.0.253 # Redis server host.
    port: 6379 # Redis server port.
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.193:3000/
  data_base_name: im_internet_hospital
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
#是否开启i健康接口 0关闭,1开启
testPattern:
  sign: 0
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwystest
  datasource:
    url: jdbc:mysql://172.26.0.195/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: root
    password: jkzlehr
  redis:
    host: 172.26.0.190 # Redis server host.
    port: 6379 # Redis server port.
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.193:3000/
  data_base_name: im_internet_hospital
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
#是否开启i健康接口 0关闭,1开启
testPattern:
  sign: 0
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk

+ 18 - 2
svr/svr-internet-hospital-entrance/src/main/resources/bootstrap.yml

@ -28,7 +28,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
@ -44,4 +44,20 @@ spring:
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.70:1221}
      label: ${wlyy.spring.config.label:master}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwtest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.194:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
spring:
  profiles: jwystest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.194:1221}
      label: ${wlyy.spring.config.label:jwdev}

+ 2 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/UnSettledHISPrescriptionService.java

@ -257,6 +257,8 @@ public class UnSettledHISPrescriptionService {
                                    wxPushLogDao.save(wxPushLogDO);
                                }
                                WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
                                wlyyPrescriptionDO.setPrescribeTime(new Date());
                                prescriptionDao.save(wlyyPrescriptionDO);
                                JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
                                logger.info("wlyyPrescriptionDO参数入参"+object.toJSONString());
                                WlyyPrescriptionVO prescriptionVO = JSONObject.toJavaObject(object,WlyyPrescriptionVO.class);

+ 8 - 13
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -38,11 +38,6 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
quartz:
  name: schedulerFactoryBean
# 上传文件临时路径配置
@ -165,8 +160,8 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
  profiles: jwOracleProd
@ -205,7 +200,7 @@ wechat:
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
@ -237,7 +232,7 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_code: WH000091
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
@ -271,8 +266,8 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_code:
  sf_check_word:
---
spring:
@ -304,5 +299,5 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
  sf_code:
  sf_check_word:

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

@ -41,7 +41,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/Xzyy/XzyyController.java

@ -128,7 +128,7 @@ public class XzyyController extends EnvelopRestEndpoint {
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/updatePreStatus")
    @PostMapping(value = "/updatePreStatus")
    @ApiOperation(value = "处方状态变更", notes = "处方状态变更")
    public ObjEnvelop updatePreStatus(@ApiParam(name = "admNo", value = "就诊唯一号", required = false)
                                      @RequestParam(value = "admNo",required = false)String admNo,

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

@ -440,6 +440,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
				String msg= "";
				if (type==17){
					msg=re.getString("patientName")+",您好!您有一个视频咨询订单待支付,请及时支付。点击完成支付,如您已支付请忽略本条信息。";
					prescriptionService.sendWxTemplateMsg(wxId,null,type+"","videoOrderRemind",null);
				}else {
					msg=re.getString("patientName")+",您好!您有一个图文咨询订单待支付,请及时支付。点击完成支付,如您已支付请忽略本条信息。";
				}
@ -448,8 +449,9 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
				systemMessageService.saveMessage(systemMessageDO);
				BasePatientDO patientDO = basePatientDao.findById(patient);
				if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
					ykyyService.pushNotificationToYktPatient(patientDO.getYktId(),systemMessageDO.getTitle(),data.get("msg").toString());
					String templateMsgResult = ykyyService.pushNotificationToYktPatient(patientDO.getYktId(), systemMessageDO.getTitle(), data.get("msg").toString());
				}
			}
			//发送系统消息

+ 40 - 8
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -14,6 +14,7 @@ import com.yihu.jw.entity.base.area.BaseTownDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDiagnosisDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
@ -108,6 +109,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    private BaseProvinceService baseProvinceService;
    @Autowired
    private BaseCityService baseCityService;
    @Autowired
    private PatientMappingService patientMappingService;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -283,8 +286,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDeptByOrgCode)
    @ApiOperation(value = "查询机构下所有科室", notes = "查询机构下所有科室")
    public MixEnvelop findDeptByOrgCode(@ApiParam(name = "orgCode", value = "机构code")
                                   @RequestParam(value = "orgCode", required = true)String orgCode) {
        return prescriptionService.findDeptByOrgCode(orgCode);
                                   @RequestParam(value = "orgCode", required = true)String orgCode,
                                        @ApiParam(name = "keyName", value = "关键字")
                                        @RequestParam(value = "keyName", required = false)String keyName) {
        return prescriptionService.findDeptByOrgCode(orgCode,keyName);
    }
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDeptByKeyWord)
@ -653,7 +658,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                             @RequestParam(value = "workTimeJson", required = true)String workTimeJson,
                                             @ApiParam(name = "date", value = "yyyy-MM,支持‘,’分割")
                                             @RequestParam(value = "date", required = false)String date)throws Exception {
        return success(prescriptionService.doctorSaveWorkTimeJson(codes,workTimeJson,date));
        try {
            return success(prescriptionService.doctorSaveWorkTimeJson(codes,workTimeJson,date));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.updateWorkTime)
@ -662,13 +672,21 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                             @RequestParam(value = "workTimeJson", required = true)String workTimeJson,
                                             @ApiParam(name = "codes", value = "医生code,‘,’分割")
                                             @RequestParam(value = "codes", required = true)String codes)throws Exception {
        return success(prescriptionService.doctorUpdateWorkTimeJson(workTimeJson,codes));
        try {
            return success(prescriptionService.doctorUpdateWorkTimeJson(workTimeJson,codes));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.deleteWorkTime)
    @ApiOperation(value = "医生自主排班删除接口", notes = "医生自主排班删除接口")
    public ObjEnvelop deleteWorkTime(@ApiParam(name = "code", value = "排班id")
                                             @RequestParam(value = "code", required = true)String code)throws Exception {
        return success(prescriptionService.deleteWorkTime(code));
        try {
            return success(prescriptionService.deleteWorkTime(code));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = "test")
@ -1089,13 +1107,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                        consult.put("session_id", consult.get("patientId").toString()+"_"+ consult.get("generalDoctor").toString()+"_"+ consult.get("doctorCode").toString()+"_15");
                    }else{}
                }else if("9".equals(type)){//图文复诊
                    consult.put("session_id", consult.get("patientId")!=null?consult.get("patientId").toString():null+"_"+consult.get("outpatientId")!=null?consult.get("outpatientId").toString():null+"_9");
                    consult.put("session_id", consult.get("patientId").toString()+"_"+consult.get("outpatientId").toString()+"_9");
                    consult.put("type",type);
                }else if("16".equals(type)){//视频复诊
                    consult.put("session_id", consult.get("patientId")!=null?consult.get("patientId").toString():null+"_"+consult.get("outpatientId")!=null?consult.get("outpatientId").toString():null+"_16");
                    consult.put("session_id", consult.get("patientId").toString()+"_"+consult.get("outpatientId").toString()+"_16");
                    consult.put("type",type);
                }else if("12".equals(type)){//协同门诊
                    consult.put("session_id", consult.get("patientId")!=null?consult.get("patientId").toString():null+"_"+consult.get("outpatientId")!=null?consult.get("outpatientId").toString():null+"_12");
                    consult.put("session_id", consult.get("patientId").toString()+"_"+consult.get("outpatientId").toString()+"_12");
                    consult.put("type",type);
                }else{}
                
@ -1878,4 +1897,17 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatNoByPatient)
    @ApiOperation(value = "patient映射信息")
    public ObjEnvelop findPatNoByPatient (
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = false) String code) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",patientMappingService.findPatientNoByPatientCode(code));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

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

@ -73,11 +73,6 @@ fast-dfs:
configDefault: # 默认配置
  saasId: xmjkzl_saasId
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwdev
@ -154,6 +149,11 @@ FileTempPath:
qywx:
  url: 2
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwtest
@ -182,7 +182,7 @@ fastDFS:
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -228,6 +228,11 @@ wlyy:
qywx:
  url: 2
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwprod
@ -304,6 +309,11 @@ wlyy:
qywx:
  url: https://hlwyy.xmzsh.com/hlwyy
  id: zsyy
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
spring:
  profiles: jwOracleTest
@ -386,6 +396,11 @@ wlyy:
qywx:
  url: 2
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
  profiles: jwOracleProd
@ -468,6 +483,11 @@ qywx:
  url: 2
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
##==心脏中心 ===============================================================================
spring:
@ -543,6 +563,11 @@ wlyy:
qywx:
  url: https://ih.xmheart.com/hlwyy/
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
##==心脏中心外 ===============================================================================
spring:
@ -620,6 +645,11 @@ wlyy:
qywx:
  url: https://ih.xmheart.com/hlwyy/
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
##==厦门卫计委 ===============================================================================
spring:
@ -695,4 +725,86 @@ es:
qywx:
  url: 1
  id: 2
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
spring:
  profiles: jwystest
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://172.26.0.195/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true&useSSL=false
    username: root
    password: jkzlehr
  #  elasticsearch:
  #    cluster-name: jkzl #集群名 默认elasticsearch
  #    cluster-nodes: 172.26.0.115:9300,172.26.0.115:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
  #    client-transport-sniff: false
  #    jest:
  #      uris: http://172.26.0.112:9200,http://172.26.0.112:9200
  #      connection-timeout: 60000 # Connection timeout in milliseconds.
  #      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.26.0.116:61616
    user: admin
    password: admin
  redis:
#    host: 172.26.0.253 # Redis server host.
    host: 172.26.0.190 # Redis server host.
    port: 6379 # Redis server port.
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
myFamily:
  qrCodeFailurTime: 2
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: true
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.193:3000/
  data_base_name: im_internet_hospital
es:
  pwflag: 1 # 1需要密码,2不需要密码
  index:
    Statistics: hlw_quota_test
  type:
    Statistics: hlw_quota_test
  host:  http://172.26.0.190:9200
  tHost: 172.26.0.190:9300
  clusterName: jkzl
  securityUser: elastic:changeme
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
  image_path : /var/local/upload/images
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
#文件服务器上传配置 0本地,1.I健康,2.内网调用
testPattern:
  sign: 0
  remote_inner_url: 172.16.100.240:10023/open/fileUpload/upload_stream
wlyy:
  url: http://ehr.yihu.com/wlyy/
qywx:
  url: 2
  id: 1

+ 10 - 2
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -35,7 +35,7 @@ spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.16.1.42:1221}
      uri: ${wlyy.spring.config.uri:http://127.0.0.1:1221}
      label: ${wlyy.spring.config.label:master}
---
@ -80,4 +80,12 @@ spring:
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://192.168.120.210:1221}
      label: ${wlyy.spring.config.label:master}
      label: ${wlyy.spring.config.label:master}
---
spring:
  profiles: jwystest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.26.0.194:1221}
      label: ${wlyy.spring.config.label:jwdev}