Pārlūkot izejas kodu

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

wangzhinan 6 gadi atpakaļ
vecāks
revīzija
659780f537
20 mainītis faili ar 369 papildinājumiem un 302 dzēšanām
  1. 1 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  2. 119 87
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  3. 24 26
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/util/ConvertUtil.java
  4. 3 3
      business/base-service/src/main/java/com/yihu/jw/patient/dao/BasePatientDao.java
  5. 2 0
      business/base-service/src/mqConfig/esbmq-config.xml
  6. 37 3
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  7. 0 58
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
  8. 1 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/security/WebSecurityConfig.java
  9. 43 18
      server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java
  10. 84 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/model/PatientWechat.java
  11. 0 28
      server/svr-authentication/src/main/java/com/yihu/jw/security/model/WlyyUserDetails.java
  12. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/WlyyTokenGranter.java
  13. 15 5
      server/svr-authentication/src/main/resources/application.yml
  14. 6 41
      server/svr-authentication/src/main/resources/bootstrap.yml
  15. 1 1
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/PrescriptionUpdateController.java
  16. 20 5
      svr/svr-internet-hospital-entrance/src/mqConfig/esbmq-config.xml
  17. 0 10
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java
  18. 5 9
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/expressage/ExpressageEndpoint.java
  19. 6 6
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientService.java
  20. 1 1
      svr/svr-wlyy-specialist/src/main/resources/bootstrap.yml

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

@ -1585,6 +1585,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "WHERE " +
                "room.patient_id=patient.id " +
                "AND room.outpatient_id=outpatient.id " +
                "AND outpatient.status = 0 " +
                "AND (room.doctor IS NULL or room.doctor='"+doctor+"') " +
                "AND room.consult_type="+type;
        

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

@ -28,6 +28,8 @@ import net.sf.json.JSONArray;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
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.core.io.ClassPathResource;
@ -51,6 +53,7 @@ import java.util.stream.Collectors;
@Service
@Transactional
public class EntranceService {
    private Logger logger= LoggerFactory.getLogger(EntranceService.class);
    //门诊余额查询
    private static String BS15017="BS15017";
    //门诊就诊卡列表
@ -1331,31 +1334,33 @@ public class EntranceService {
        } else {
            jsonArray= BS55010( windowsNo, code, chargeType, demoFlag);
        }
        for(Object object:jsonArray){
            net.sf.json.JSONObject jsonObjectBody=(net.sf.json.JSONObject)object;
            String chareName="";
            if(null!=jsonObjectBody){
                String chareCode=null==jsonObjectBody.get("charge_type")?"":jsonObjectBody.get("charge_type").toString();
                String winNo=null==jsonObjectBody.get("windows_no")?"":jsonObjectBody.get("windows_no").toString();
                //WlyyChargeDictDO
                if(!map.containsKey(chareCode+"_"+winNo)){
                    //查询号别
                    net.sf.json.JSONArray chares= MS02013(chareCode);
                    for(Object object1:chares) {
                        net.sf.json.JSONObject jsonObjectBody1 = (net.sf.json.JSONObject) object1;
                        chareName=null==jsonObjectBody1.get("name")?"":jsonObjectBody1.get("name").toString();
                        System.out.println(chareCode+chareName);
                        WlyyChargeDictDO wlyyChargeDictDO=new WlyyChargeDictDO();
                        wlyyChargeDictDO.setChargeType(chareCode);
                        wlyyChargeDictDO.setChargeName(chareName);
                        wlyyChargeDictDO.setDeptTypeCode(winNo);
                        Double free=null==jsonObjectBody.get("req_fee")?0:Double.parseDouble(jsonObjectBody.get("req_fee").toString());
                        wlyyChargeDictDO.setReqFee(free);
                        wlyyChargeDictDO.setCreateTime(new Date());
                        map.put(chareCode+"_"+winNo,chareName);
                        wlyyChargeDictDO=wlyyChargeDictDao.save(wlyyChargeDictDO);
                        wlyyChargeDictDOS.add(wlyyChargeDictDO);
        if(null!=jsonArray){
            for(Object object:jsonArray){
                net.sf.json.JSONObject jsonObjectBody=(net.sf.json.JSONObject)object;
                String chareName="";
                if(null!=jsonObjectBody){
                    String chareCode=null==jsonObjectBody.get("charge_type")?"":jsonObjectBody.get("charge_type").toString();
                    String winNo=null==jsonObjectBody.get("windows_no")?"":jsonObjectBody.get("windows_no").toString();
                    //WlyyChargeDictDO
                    if(!map.containsKey(chareCode+"_"+winNo)){
                        //查询号别
                        net.sf.json.JSONArray chares= MS02013(chareCode);
                        for(Object object1:chares) {
                            net.sf.json.JSONObject jsonObjectBody1 = (net.sf.json.JSONObject) object1;
                            chareName=null==jsonObjectBody1.get("name")?"":jsonObjectBody1.get("name").toString();
                            System.out.println(chareCode+chareName);
                            WlyyChargeDictDO wlyyChargeDictDO=new WlyyChargeDictDO();
                            wlyyChargeDictDO.setChargeType(chareCode);
                            wlyyChargeDictDO.setChargeName(chareName);
                            wlyyChargeDictDO.setDeptTypeCode(winNo);
                            Double free=null==jsonObjectBody.get("req_fee")?0:Double.parseDouble(jsonObjectBody.get("req_fee").toString());
                            wlyyChargeDictDO.setReqFee(free);
                            wlyyChargeDictDO.setCreateTime(new Date());
                            map.put(chareCode+"_"+winNo,chareName);
                            wlyyChargeDictDO=wlyyChargeDictDao.save(wlyyChargeDictDO);
                            wlyyChargeDictDOS.add(wlyyChargeDictDO);
                        }
                    }
                }
            }
@ -1417,71 +1422,98 @@ public class EntranceService {
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRowMS02003(resp);
        }
            net.sf.json.JSONArray jsonArray = ConvertUtil.convertListEnvelopInBodyRowMS02003(resp);
            for (Object object : jsonArray) {
                net.sf.json.JSONObject jsonObjectBody = (net.sf.json.JSONObject) object;
                String doctorCode = "";
                String doctorName = "";
                if (null != jsonObjectBody) {
                    //获取中山医院的医生
                    String winNo = "6";
                    doctorCode = null == jsonObjectBody.get("Emp_Code") ? "" : jsonObjectBody.get("Emp_Code").toString();
                    //根据医生及分部,获取医生号别
                    net.sf.json.JSONArray jsonArrayCharge = BS55010(winNo, doctorCode, null, false);
                    String chareType = "";
                    for (Object objectCharge : jsonArrayCharge) {
                        net.sf.json.JSONObject jsonObjectBodyCharge = (net.sf.json.JSONObject) objectCharge;
                        if (null != jsonObjectBodyCharge) {
                            chareType = null == jsonObjectBodyCharge.get("charge_type") ? "" : jsonObjectBodyCharge.get("charge_type").toString();
        net.sf.json.JSONObject jsonObject= net.sf.json.JSONObject.fromObject(resp);
        if(null!=jsonObject&&"1".equals(jsonObject.get("code").toString())){
            JSONArray jsonObjectMgsInfo=(JSONArray)jsonObject.get("MsgInfo");
            if(null!=jsonObjectMgsInfo){
                for (Object object : jsonObjectMgsInfo) {
                    net.sf.json.JSONObject jsonArraySub = (net.sf.json.JSONObject) object;
                    jsonObjectMgsInfo=(JSONArray)jsonArraySub.get("body");
                    if(jsonObjectMgsInfo instanceof JSONArray){
                        for (Object objectSub : jsonObjectMgsInfo) {
                            net.sf.json.JSONObject jsonObjectBody = (net.sf.json.JSONObject) objectSub;
                            String doctorCode = "";
                            String doctorName = "";
                            if (null != jsonObjectBody) {
                                //获取中山医院的医生
                                String winNo = "6";
                                doctorCode = null == jsonObjectBody.get("Emp_Code") ? "" : jsonObjectBody.get("Emp_Code").toString();
                                //根据医生及分部,获取医生号别
                                net.sf.json.JSONArray jsonArrayCharge = BS55010(winNo, doctorCode, null, false);
                                String chareType = "";
                                if(null!=jsonArrayCharge){
                                    for (Object objectCharge : jsonArrayCharge) {
                                        net.sf.json.JSONObject jsonObjectBodyCharge = (net.sf.json.JSONObject) objectCharge;
                                        if (null != jsonObjectBodyCharge) {
                                            chareType = null == jsonObjectBodyCharge.get("charge_type") ? "" : jsonObjectBodyCharge.get("charge_type").toString();
                                        }
                                    }
                                }
                                //保存医生信息
                                BaseDoctorDO baseDoctorDO = new BaseDoctorDO();
                                String idCard = null == jsonObjectBody.get("Card_Id") ? "" : jsonObjectBody.get("Card_Id").toString();
                                baseDoctorDO.setIdcard(idCard);
                                baseDoctorDO.setBirthday(IdCardUtil.getBirthdayForIdcard(idCard));
                                baseDoctorDO.setSex(Integer.valueOf(IdCardUtil.getSexForIdcard(idCard)));
                                //拼音码
                                baseDoctorDO.setSpell(null == jsonObjectBody.get("PinYin_Code") ? "" : jsonObjectBody.get("PinYin_Code").toString());
                                String disableFlag = null == jsonObjectBody.get("Disable_Flag") ? "" : jsonObjectBody.get("Disable_Flag").toString();
                                //互联网医院:1停用,0使用  转 i健康:1正常,0作废
                                baseDoctorDO.setDel("1".equals(disableFlag) ? "0" : "1");
                                //姓名
                                doctorName = null == jsonObjectBody.get("Emp_Name") ? "" : jsonObjectBody.get("Emp_Name").toString();
                                //号别
                                baseDoctorDO.setChargeType(chareType);
                                if (StringUtils.isNotBlank(idCard)) {
                                    baseDoctorDO.setSalt(PwdUtil.randomString(5));
                                    try {
                                        baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex(baseDoctorDO.getIdcard().substring(baseDoctorDO.getIdcard().length()-6) + "{" + baseDoctorDO.getSalt() + "}"));
                                    } catch (Exception e) {
                                        logger.error(e.getMessage()+"docotr="+doctorCode+";idcard="+baseDoctorDO.getIdcard());
                                    }
                                }else {
                                    baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex("123456"+ "{" + baseDoctorDO.getSalt() + "}"));
                                }
                                baseDoctorDO.setName(doctorName);
                                baseDoctorDO.setIsFamous(0);
                                baseDoctorDO.setCreateTime(new Date());
                                baseDoctorDO.setUpdateTime(new Date());
                                baseDoctorDO.setMobile("0");
                                baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
                                //根据医生和机构判断数据是否存在,若不存在则在mapping中追加记录
                                List<DoctorMappingDO> doctorMappingDOS = doctorMappingDao.findByDoctorAndOrgCode(baseDoctorDO.getId(), "350211A1002");
                                if (!(null != doctorMappingDOS && doctorMappingDOS.size() > 0)) {
                                    DoctorMappingDO doctorMappingDO = new DoctorMappingDO();
                                    doctorMappingDO.setDoctor(baseDoctorDO.getId());
                                    doctorMappingDO.setDoctorName(doctorName);
                                    doctorMappingDO.setMappingCode(doctorCode);
                                    doctorMappingDO.setMappingName(doctorName);
                                    doctorMappingDO.setOrgCode("350211A1002");
                                    doctorMappingDO.setOrgName("厦门市中山医院");
                                    doctorMappingDao.save(doctorMappingDO);
                                }
                                // 用医生和机构id、部门判断数据是否存在,若不存在则保存医生机构关联关系
                                String deptCode = null == jsonObjectBody.get("Dept_Code") ? "" : jsonObjectBody.get("Dept_Code").toString();
                                List<BaseDoctorHospitalDO> baseDoctorHospitalDOS = baseDoctorHospitalDao.findByOrgCodeAndDeptCodeAndDoctorCode("350211A1002", deptCode, baseDoctorDO.getId());
                                if (!(null != baseDoctorHospitalDOS && baseDoctorHospitalDOS.size() > 0)) {
                                    BaseDoctorHospitalDO baseDoctorHospitalDO = new BaseDoctorHospitalDO();
                                    baseDoctorHospitalDO.setOrgCode("350211A1002");
                                    baseDoctorHospitalDO.setOrgName("厦门市中山医院");
                                    baseDoctorHospitalDO.setDoctorCode(baseDoctorDO.getId());
                                    baseDoctorHospitalDO.setDeptCode(deptCode);
                                    baseDoctorHospitalDO.setDel("1");
                                    baseDoctorHospitalDao.save(baseDoctorHospitalDO);
                                }
                                i++;
                            }
                        }
                    }
                    //保存医生信息
                    BaseDoctorDO baseDoctorDO = new BaseDoctorDO();
                    String idCard = null == jsonObjectBody.get("Card_Id") ? "" : jsonObjectBody.get("Card_Id").toString();
                    baseDoctorDO.setIdcard(idCard);
                    baseDoctorDO.setBirthday(IdCardUtil.getBirthdayForIdcard(idCard));
                    baseDoctorDO.setSex(Integer.valueOf(IdCardUtil.getSexForIdcard(idCard)));
                    //拼音码
                    baseDoctorDO.setSpell(null == jsonObjectBody.get("PinYin_Code") ? "" : jsonObjectBody.get("PinYin_Code").toString());
                    String disableFlag = null == jsonObjectBody.get("Disable_Flag") ? "" : jsonObjectBody.get("Disable_Flag").toString();
                    //互联网医院:1停用,0使用  转 i健康:1正常,0作废
                    baseDoctorDO.setDel("1".equals(disableFlag) ? "0" : "1");
                    //姓名
                    doctorName = null == jsonObjectBody.get("Emp_Name") ? "" : jsonObjectBody.get("Emp_Name").toString();
                    //号别
                    baseDoctorDO.setChargeType(chareType);
                    if (StringUtils.isNotBlank(idCard)) {
                        baseDoctorDO.setSalt(PwdUtil.randomString(5));
                        baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex(baseDoctorDO.getIdcard().substring(12, 18) + "{" + baseDoctorDO.getSalt() + "}"));
                    }
                    baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
                    //根据医生和机构判断数据是否存在,若不存在则在mapping中追加记录
                    List<DoctorMappingDO> doctorMappingDOS = doctorMappingDao.findByDoctorAndOrgCode(baseDoctorDO.getId(), "350211A1002");
                    if (!(null != doctorMappingDOS && doctorMappingDOS.size() > 0)) {
                        DoctorMappingDO doctorMappingDO = new DoctorMappingDO();
                        doctorMappingDO.setDoctor(baseDoctorDO.getId());
                        doctorMappingDO.setDoctorName(doctorName);
                        doctorMappingDO.setMappingCode(doctorCode);
                        doctorMappingDO.setMappingName(doctorName);
                        doctorMappingDO.setOrgCode("350211A1002");
                        doctorMappingDO.setOrgName("厦门市中山医院");
                        doctorMappingDao.save(doctorMappingDO);
                    }
                    // 用医生和机构id、部门判断数据是否存在,若不存在则保存医生机构关联关系
                    String deptCode = null == jsonObjectBody.get("Dept_Code") ? "" : jsonObjectBody.get("Dept_Code").toString();
                    List<BaseDoctorHospitalDO> baseDoctorHospitalDOS = baseDoctorHospitalDao.findByOrgCodeAndDeptCodeAndDoctorCode("350211A1002", deptCode, baseDoctorDO.getId());
                    if (!(null != baseDoctorHospitalDOS && baseDoctorHospitalDOS.size() > 0)) {
                        BaseDoctorHospitalDO baseDoctorHospitalDO = new BaseDoctorHospitalDO();
                        baseDoctorHospitalDO.setOrgCode("350211A1002");
                        baseDoctorHospitalDO.setOrgName("厦门市中山医院");
                        baseDoctorHospitalDO.setDoctorCode(baseDoctorDO.getId());
                        baseDoctorHospitalDO.setDeptCode(deptCode);
                        baseDoctorHospitalDO.setDel("1");
                        baseDoctorHospitalDao.save(baseDoctorHospitalDO);
                    }
                    i++;
                }
            }
        }}
//            net.sf.json.JSONArray jsonArray = ConvertUtil.convertListEnvelopInBodyRowMS02003(resp);
//            for (Object object : jsonArray) { }
//        }
        return i;
    }

+ 24 - 26
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/util/ConvertUtil.java

@ -185,30 +185,28 @@ public class ConvertUtil {
     * @return
     * @throws Exception
     */
    public static  JSONArray convertListEnvelopInBodyRowMS02003(String obj)throws Exception{
        JSONObject jsonObject=JSONObject.fromObject(obj);
        JSONArray jsonArray=new JSONArray();
        if(null!=jsonObject&&"1".equals(jsonObject.get("code").toString())){
            JSONArray jsonObjectMgsInfo=(JSONArray)jsonObject.get("MsgInfo");
            if(null!=jsonObjectMgsInfo){
                for (Object object : jsonObjectMgsInfo) {
                    if(object instanceof JSONArray){
                        //获取到数组中的CDATA进行再解析
                        net.sf.json.JSONArray jsonArraySub = (net.sf.json.JSONArray) object;
                        for (Object objectSub : jsonArraySub) {
                            if(null!=objectSub){
                                jsonArray.add(objectSub) ;
                            }
                        }
                        }
                }
                return jsonArray;
            }else {
                return null;
            }
        }else {
            return  null;
        }
    }
//    public static  JSONArray convertListEnvelopInBodyRowMS02003(String obj)throws Exception{
//        JSONObject jsonObject=JSONObject.fromObject(obj);
//        JSONArray jsonArray=new JSONArray();
//        if(null!=jsonObject&&"1".equals(jsonObject.get("code").toString())){
//            JSONArray jsonObjectMgsInfo=(JSONArray)jsonObject.get("MsgInfo");
//            if(null!=jsonObjectMgsInfo){
//                for (Object object : jsonObjectMgsInfo) {
//                    net.sf.json.JSONObject jsonArraySub = (net.sf.json.JSONObject) object;
//                    jsonObjectMgsInfo=(JSONArray)jsonArraySub.get("body");
//                    if(jsonObjectMgsInfo instanceof JSONArray)
//                        for (Object objectSub : jsonObjectMgsInfo) {
//
//                        }
//                        }
//
//                }
//                return jsonArray;
//            }else {
//                return null;
//            }
//        }else {
//            return  null;
//        }
//    }
}

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/patient/dao/BasePatientDao.java

@ -38,9 +38,9 @@ public interface BasePatientDao extends PagingAndSortingRepository<BasePatientDO
    @Query("from BasePatientDO p where p.mobile = ?1 and p.del=?2")
    List<BasePatientDO> findByMobileAndDel(String mobile,String del);
    @Modifying
    @Query(" update BasePatientDO a set a.openid=?2 where a.id=?1 ")
    int updateOpenId(String id, String openId);
//    @Modifying
//    @Query(" update BasePatientDO a set a.openid=?2 where a.id=?1 ")
//    int updateOpenId(String id, String openId);
    BasePatientDO findByIdAndDel(String id,String del);
}

+ 2 - 0
business/base-service/src/mqConfig/esbmq-config.xml

@ -57,6 +57,8 @@
				<BS20011_1>EwellQ.S60.BS20011.GET</BS20011_1>
				<BS55010_0>EwellQ.S60.BS55010.PUT</BS55010_0>
				<BS55010_1>EwellQ.S60.BS55010.GET</BS55010_1>
				<MS02003_0>EwellQ.S60.MS02003.PUT</MS02003_0>
				<MS02003_1>EwellQ.S60.MS02003.GET</MS02003_1>
			</QUEUES>
		</QMGR.S60>
	</MQCONFIG>

+ 37 - 3
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -628,8 +628,9 @@ public class ImService {
		
		JSONObject users = new JSONObject();
		users.put(doctor,0);
		
		// 设置医生名称
		BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctor);
		// 设置患者信息
		ct.setPatient(patient);
		// 查询患者信息
@ -655,9 +656,20 @@ public class ImService {
//		consult.setGuidance(ct.getGuidance());
		// 设置咨询标识
		ct.setConsult(consult.getId());
		// 设置医生CODE
		ct.setDoctor(doctor);
		// 设置医生名称
		ct.setDoctorName(baseDoctorDO.getName());
		
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("title", tempPatient.getName() + "申请专家咨询");
		jsonObject.put("content",ct.getSymptoms());
		jsonObject.put("age",DateUtil.getAgeForIdcard(tempPatient.getIdcard()));
		jsonObject.put("sex",tempPatient.getSex());
		jsonObject.put("name",tempPatient.getName());
		
		//推送给IM去创建议题,取得成员消息
		JSONObject messages = imUtil.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), consult.getSymptoms(), consult.getImages(), doctor);
		JSONObject messages = imUtil.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), jsonObject.toJSONString(), consult.getImages(), doctor);
		users.put(patient, 0);//+ " "+(tempPatient.getSex()==1?"(男 ":"(女 ") + IdCardUtil.getAgeForIdcard(tempPatient.getIdcard())+")"
		JSONObject obj = imUtil.createTopics(patient + "_" + doctor + "_" + ct.getType(), consult.getId(), tempPatient.getName(), users, messages, imUtil.SESSION_TYPE_MUC);
		if (obj == null) {
@ -817,8 +829,16 @@ public class ImService {
			//1、获取his就诊记录详情(保存续方表、药品续方信息表、续方疾病类型表)
			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outpatientCode);
			
			if(!"0".equals(wlyyOutpatientDO.getStatus())){
				throw new RuntimeException("该就诊记录已被取消,无法接单!");
			}
			
			JSONObject jsonObject = new JSONObject();
			jsonObject.put("title", p.getName() + "申请复诊");
			jsonObject.put("content",wlyyOutpatientDO.getDescription());
			jsonObject.put("age",DateUtil.getAgeForIdcard(p.getIdcard()));
			jsonObject.put("sex",p.getSex());
			jsonObject.put("name",p.getName());
			
			
			String content = jsonObject.toString();
@ -834,6 +854,7 @@ public class ImService {
			ct.setDoctorName(doctor.getName());
			// 设置患者信息
			ct.setPatient(patient);
			ct.setSymptoms(wlyyOutpatientDO.getDescription());
//			if (1 == type) {
//				ct.setSymptoms("高血压");
//			} else if (2 == type) {
@ -868,7 +889,7 @@ public class ImService {
			ct.setConsult(consult.getId());
			
			//推送给IM去创建议题,取得成员消息
			JSONObject messages = imUtil.getCreateTopicMessage(doctorCode, doctor.getName(), consult.getTitle(), content, consult.getImages(), patient);
			JSONObject messages = imUtil.getCreateTopicMessage(patient, p.getName(), consult.getTitle(), content, consult.getImages(), doctorCode);
			
			//5、(im创建咨询) 续方咨询的sessionid为居民code+就诊code+咨询类型(图文,视频,图文+视频)
			String sessionId = patient + "_" + outpatientCode + "_" + ct.getType();
@ -905,6 +926,10 @@ public class ImService {
			
			JSONObject result = imUtil.getSingleSessionInfo(sessionId,doctorCode);
			
			wlyyOutpatientDO.setStatus("1");//修改就诊记录为就诊中
			wlyyOutpatientDO.setConDate(new Date());
			outpatientDao.save(wlyyOutpatientDO);
			
			return result;
		}
	}
@ -996,6 +1021,15 @@ public class ImService {
		consultTeam.setStatus(1);
		consultDao.save(cons);
		consultTeamDao.save(consultTeam);
		
		//判断是否是在线复诊
		if(cons.getRelationCode() != null){
			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(cons.getRelationCode());
			if(wlyyOutpatientDO != null && wlyyOutpatientDO.getId() != null){
				wlyyOutpatientDO.setStatus("2");
			}
		}
		return 1;
	}
	

+ 0 - 58
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java

@ -175,23 +175,6 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
     */
    private String recordAmount;
    /**
     * 微信编号
     */
    private String openid;
    /**
     * i健康微信编号
     */
    private String ihealthOpenid;
    /**
     * i健康微信编号添加时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date ihealthOpenidTime;
    /**
     * 用户状态:1正常,0禁用,-1恶意注册,2审核中
     */
@ -202,12 +185,6 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
     */
    private String mobileRemarks;
    /**
     * 第一次添加open的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date openidTime;
    /**
     * 绑定电子社保卡主体(共济为操作人code,医社保关联patient_medicare_card)
     */
@ -458,15 +435,6 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
        this.recordAmount = recordAmount;
    }
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    @Column(name = "patient_status")
    public String getPatientStatus() {
        return patientStatus;
@ -485,15 +453,6 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
        this.mobileRemarks = mobileRemarks;
    }
    @Column(name = "openid_time")
    public Date getOpenidTime() {
        return openidTime;
    }
    public void setOpenidTime(Date openidTime) {
        this.openidTime = openidTime;
    }
    @Column(name = "principal_code")
    public String getPrincipalCode() {
        return principalCode;
@ -645,21 +604,4 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
        this.loginDate = loginDate;
    }
    @Column(name = "ihealth_openid")
    public String getIhealthOpenid() {
        return ihealthOpenid;
    }
    public void setIhealthOpenid(String ihealthOpenid) {
        this.ihealthOpenid = ihealthOpenid;
    }
    @Column(name = "ihealth_openid_time")
    public Date getIhealthOpenidTime() {
        return ihealthOpenidTime;
    }
    public void setIhealthOpenidTime(Date ihealthOpenidTime) {
        this.ihealthOpenidTime = ihealthOpenidTime;
    }
}

+ 1 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/security/WebSecurityConfig.java

@ -6,6 +6,7 @@ import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.transaction.annotation.Transactional;
/**
 * Created by progr1mmer on 2017/9/27.

+ 43 - 18
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -23,6 +23,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.ClientDetailsService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@ -47,10 +48,13 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    private static final String DEFAULT_PATIENT_DETAILS_IDCARD_STATEMENT = "SELECT * FROM base_patient p WHERE p.idcard = ? ";
    private static final String DEFAULT_PATIENT_INSERT_STATEMENT =
            "INSERT into base_patient (`id`,`ihealth_openid`,`ihealth_openid_time`,`idcard`,`password`,`salt`,`name`,`birthday`,`sex`,`mobile`," +
            "INSERT into base_patient (`id`,`photo`,`idcard`,`password`,`salt`,`name`,`birthday`,`sex`,`mobile`," +
                    "`province_code`,`province_name`,`city_code`,`city_name`,`town_code`,`town_name`,`street_code`,`street_name`,`address`," +
                    "`del`,`locked`,`enabled`,`login_failure_count`,`login_date`) " +
                    " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                    " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
    private static final String PATIENT_INSERT_WEHCAT = "insert into base_patient_wechat (`id`,`wechat_id`,`patient_id`,`openid`,`create_time`) values(?,?,?,?,?)";
    private static final String BespeakRegist = "bespeakRegist:";
@ -127,6 +131,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
     * @param username
     * @return
     */
    @Transactional
    public List<WlyyUserDetails> getWlyyUserDetails(String username) {
        String loginType = getLogintype();
@ -164,7 +169,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
                try{
                    res = httpClientUtil.post(iHealthUserInfoUrl, params, "UTF-8");
                }catch (Exception e){
                    logger.error("远程请求i健康用户信息异常败:" + e.getMessage());
                    logger.error("远程请求i健康用户信息异常:" + e.getMessage());
                    return users;
                }
                if(null == res){
@ -178,8 +183,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
                try {
                    this.getJdbcTemplate().update(DEFAULT_PATIENT_INSERT_STATEMENT,
                            new Object[]{patient.getString("code"),
                                    patient.getString("openid"),
                                    new Date(),
                                    patient.getString("photo"),
                                    patient.getString("idcard"),
                                    patient.getString("password"),
                                    patient.getString("salt"),
@ -207,6 +211,20 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
                    logger.error("将i健康居民数据同步到互联网医院居民表失败:" + e.getMessage());
                    return users;
                }
                try {
                    this.getJdbcTemplate().update(PATIENT_INSERT_WEHCAT,
                            new Object[]{
                                    UUID.randomUUID().toString(),
                                    getWechatId(),
                                    patient.getString("code"),
                                    getOpenid(),
                                    new Date()
                            }
                    );
                }catch (Exception e){
                    logger.error("将i健康居民微信openid数据同步到互联网医院居民微信关联表失败:" + e.getMessage());
                    return users;
                }
                WlyyUserDetails user = new WlyyUserDetails();
                user.setName(patient.getString("name"));
@ -404,7 +422,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    }
    /**
     * 获取i健康用户登录openid型
     * 获取用户登录的clientId
     *
     * @return
     */
@ -417,15 +435,29 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
        return clientId;
    }
    /**
     * 获取用户登录的wechatId
     *
     * @return
     */
    public String getWechatId() {
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        String wechatId = request.getParameter("wechat_id");
        return wechatId;
    }
  /**
     * 获取i健康用户登录openid型
     * 获取用户登录的idcard
     *
     * @return
     */
    public String getIdcard() {
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        KeyPair keyPair = (KeyPair) request.getAttribute("privateKey");
        KeyPair keyPair = (KeyPair) request.getSession().getAttribute("privateKey");
        String idcard = com.yihu.jw.security.utils.RSAUtils.decryptBase64(request.getParameter("idcard"), keyPair);
        return idcard;
@ -434,20 +466,13 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    public boolean setRolePhth(String loginType, OAuth2AccessToken token, String id, StringRedisTemplate redisTemplate) {
        if (org.apache.commons.lang.StringUtils.isBlank(loginType) || "1".equals(loginType)) { //1或默认查找user表,为平台管理员账号
        if (org.apache.commons.lang.StringUtils.isBlank(loginType) || "1".equals(loginType) || "2".equals(loginType) || "3".equals(loginType) || "4".equals(loginType)) { //1或默认查找user表,为平台管理员账号
            String key = "wlyy2:auth:token:" + token.getValue();
            redisTemplate.opsForValue().set(key, "/**");
            redisTemplate.expire(key, token.getExpiresIn(), TimeUnit.SECONDS);
        } else if ("2".equals(loginType)) {//2.为医生账号
        } else if ("3".equals(loginType) || "4".equals(loginType)) { //3.患者账号
            String key = "wlyy2:auth:token:" + token.getValue();
            redisTemplate.opsForValue().set(key, "/**");
            redisTemplate.expire(key, token.getExpiresIn(), TimeUnit.SECONDS);
        } else {
            return false;
            return true;
        }
        return true;
        return false;
    }
    public void updateOpenId(String openid, String userId) {

+ 84 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/model/PatientWechat.java

@ -0,0 +1,84 @@
package com.yihu.jw.security.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
 * Model - 居民微信openid
 * Created by lith on 2019/7/3.
 */
public class PatientWechat implements Serializable {
    private String id; //对应患者,医生等表中的id字段
    //用户名
    private String saasId;
    //姓名
    private String name;
    //身份证号码
    private String wechatId;
    //手机号码
    private String openid;
    //patient_id
    private String unionid;
    //最后登陆时间
    private Date createTime;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getWechatId() {
        return wechatId;
    }
    public void setWechatId(String wechatId) {
        this.wechatId = wechatId;
    }
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public String getUnionid() {
        return unionid;
    }
    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}

+ 0 - 28
server/svr-authentication/src/main/java/com/yihu/jw/security/model/WlyyUserDetails.java

@ -115,17 +115,6 @@ public class WlyyUserDetails implements Serializable {
    private String address;
    /**
     * i健康微信编号
     */
    private String ihealthOpenid;
    /**
     * i健康微信编号添加时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date ihealthOpenidTime;
    public Date getBirthday() {
        return birthday;
@ -199,23 +188,6 @@ public class WlyyUserDetails implements Serializable {
        this.streetName = streetName;
    }
    public String getIhealthOpenid() {
        return ihealthOpenid;
    }
    public void setIhealthOpenid(String ihealthOpenid) {
        this.ihealthOpenid = ihealthOpenid;
    }
    public Date getIhealthOpenidTime() {
        return ihealthOpenidTime;
    }
    public void setIhealthOpenidTime(Date ihealthOpenidTime) {
        this.ihealthOpenidTime = ihealthOpenidTime;
    }
    public String getId() {
        return id;
    }

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

@ -63,7 +63,7 @@ public class WlyyTokenGranter implements TokenGranter {
                        requestFactory
                ));
        tokenGranters.put(WlyyImplicitTokenGranter.GRANT_TYPE,
            tokenGranters.put(WlyyImplicitTokenGranter.GRANT_TYPE,
                new WlyyImplicitTokenGranter(
                        tokenServices,
                        clientDetailsService,

+ 15 - 5
server/svr-authentication/src/main/resources/application.yml

@ -1,6 +1,7 @@
server:
  port: 10260
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
@ -22,22 +23,23 @@ user:
  reflashFailedCountTime: 5 #将失败次数重置为0
  tryLoginTimes: 5 #失败重试次数
---
spring:
  profiles: jwdev
  ##发现服务
  datasource:
    url: jdbc:mysql://172.26.0.114/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: jkzlehr
    username: ssgg
    password: ssgg@jkzl2019
  redis:
    host: 172.26.0.253 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr
# i健康用户信息接口,开放出来给互联网医院登录同步用户信息用
iHealth:
  user-info-uri: http://ehr.yihu.com/wlyy/iHealth/userInfo
zhongshanHospital:
  user-info-uri: http://laptop-u738dn2p:10023/mqsdk/getUserInfoByOpenid
---
spring:
  profiles: jwtest
@ -48,9 +50,13 @@ spring:
  redis:
    host: 172.26.0.253 # 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
---
spring:
  profiles: jwprod
@ -62,5 +68,9 @@ spring:
    host: 192.0.33.26 # Redis server host.
    port: 6390 # Redis server port.
    password: Kb6wKDQP1W4
  ##发现服务
iHealth:
  user-info-uri: http://ehr.yihu.com/wlyy/iHealth/userInfo
  user-info-uri: http://ehr.yihu.com/wlyy/iHealth/userInfo
zhongshanHospital:
  user-info-uri: http://laptop-u738dn2p:10023/mqsdk/getUserInfoByOpenid

+ 6 - 41
server/svr-authentication/src/main/resources/bootstrap.yml

@ -12,54 +12,19 @@ spring:
  profiles: jwdev
  cloud:
    config:
      discovery:
        enabled: true
        service-id: svr-configuration
##发现服务
eureka:
  client:
    healthcheck:
      enabled: true #监控检查
    serviceUrl:
      defaultZone: http://jw:jkzl@172.26.0.107:8761/eureka/
  instance:
    prefer-ip-address: false
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
      uri: ${wlyy.spring.config.uri:http://172.26.0.107:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
spring:
  profiles: jwtest
  cloud:
    config:
      discovery:
        enabled: true
        service-id: svr-configuration
##发现服务
eureka:
  client:
    healthcheck:
      enabled: true #监控检查
    serviceUrl:
      defaultZone: http://jw:jkzl@172.26.0.107:8761/eureka/
  instance:
    prefer-ip-address: false
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
      uri: ${wlyy.spring.config.uri:http://172.26.0.107:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
spring:
  profiles: jwprod
  cloud:
    config:
      discovery:
        enabled: true
        service-id: svr-configuration
##发现服务
eureka:
  client:
    healthcheck:
      enabled: true #监控检查
    serviceUrl:
      defaultZone: http://jw:jkzl@192.0.33.26:8761/eureka/
  instance:
    prefer-ip-address: false
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
      uri: ${wlyy.spring.config.uri:http://192.0.33.26:1221}
      label: ${wlyy.spring.config.label:master}

+ 1 - 1
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/PrescriptionUpdateController.java

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
 * Created by zdm on 2019/5/30.
 */
@RestController
@RequestMapping(value ="/open/prescriptionUpdate")
@RequestMapping(value ="/prescriptionUpdate")
@Api(value = "处方状态变更", description = "处方状态变更", tags = {"hospital-entrance处方状态变更"})
public class PrescriptionUpdateController extends EnvelopRestEndpoint {

+ 20 - 5
svr/svr-internet-hospital-entrance/src/mqConfig/esbmq-config.xml

@ -10,11 +10,6 @@
			<CHARSET>1392</CHARSET>
			<FILEPATH>D:\test</FILEPATH>
			<QUEUES>
				<!--<BS10001_0>EwellQ.S60.BS10001.PUT</BS10001_0>
			 	<BS10001_1>EwellQ.S60.BS10001.GET</BS10001_1>
			 	<BS10002_0>EwellQ.S60.BS10002.PUT</BS10002_0>
			 	<BS10002_1>EwellQ.S60.BS10002.GET</BS10002_1>
			 	<BS10002_2>EwellQ.S60.BS10002.XXX</BS10002_2>-->
				<BS15017_0>EwellQ.S60.BS15017.PUT</BS15017_0>
				<BS15017_1>EwellQ.S60.BS15017.GET</BS15017_1>
				<BS15018_0>EwellQ.S60.BS15018.PUT</BS15018_0>
@ -39,6 +34,26 @@
				<MS02013_1>EwellQ.S60.MS02013.GET</MS02013_1>
				<MS30012_0>EwellQ.S60.MS30012.PUT</MS30012_0>
				<MS30012_1>EwellQ.S60.MS30012.GET</MS30012_1>
				<MS53001_0>EwellQ.S60.MS53001.PUT</MS53001_0>
				<MS53001_1>EwellQ.S60.MS53001.GET</MS53001_1>
				<MS25001_0>EwellQ.S60.MS25001.PUT</MS25001_0>
				<MS25001_1>EwellQ.S60.MS25001.GET</MS25001_1>
				<MS25002_0>EwellQ.S60.MS25002.PUT</MS25002_0>
				<MS25002_1>EwellQ.S60.MS25002.GET</MS25002_1>
				<BS25017_0>EwellQ.S60.BS25017.PUT</BS25017_0>
				<BS25017_1>EwellQ.S60.BS25017.GET</BS25017_1>
				<BS20010_0>EwellQ.S60.BS20010.PUT</BS20010_0>
				<BS20010_1>EwellQ.S60.BS20010.GET</BS20010_1>
				<BS20019_0>EwellQ.S60.BS20019.PUT</BS20019_0>
				<BS20019_1>EwellQ.S60.BS20019.GET</BS20019_1>
				<BS20018_0>EwellQ.S60.BS20018.PUT</BS20018_0>
				<BS20018_1>EwellQ.S60.BS20018.GET</BS20018_1>
				<BS20011_0>EwellQ.S60.BS20011.PUT</BS20011_0>
				<BS20011_1>EwellQ.S60.BS20011.GET</BS20011_1>
				<BS55010_0>EwellQ.S60.BS55010.PUT</BS55010_0>
				<BS55010_1>EwellQ.S60.BS55010.GET</BS55010_1>
				<MS02003_0>EwellQ.S60.MS02003.PUT</MS02003_0>
				<MS02003_1>EwellQ.S60.MS02003.GET</MS02003_1>
			</QUEUES>
		</QMGR.S60>
	</MQCONFIG>

+ 0 - 10
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -1,7 +1,5 @@
package com.yihu.jw.hospital.endpoint.consult;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
@ -13,17 +11,9 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
 * @author huangwenjie
 */

+ 5 - 9
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/expressage/ExpressageEndpoint.java

@ -131,10 +131,6 @@ public class ExpressageEndpoint extends EnvelopRestEndpoint {
                    return success("顺丰快递下单成功!");
                }else{
                    //如果该处方的快递单号未生成,则继续下单
                    //由于下单前已经判断过是否派送,这里不再重复判断----huangwenjie-2017.08.04
                    //先判断地址是否可派送boolean delivery = sfexpressService.getSFOrderFilterService(sfexpress_obj.getProvinceName()+sfexpress_obj.getCityName()+sfexpress_obj.getTownName()+sfexpress_obj.getAddress());
                    //根据业务订单号判断是否已经下单成功
                    boolean go_on = sfexpressService.sfOrderSearchService(sfexpress_obj);
@ -145,7 +141,7 @@ public class ExpressageEndpoint extends EnvelopRestEndpoint {
                        //保存快递单号和增加处方物流记录为配送
                        sfexpressService.updatePrescriptionExpressage(sfexpress_obj);
                    }
                    return success("顺丰快递下单成功!");
                    return success(sfexpress_obj);
                }
            }
        }catch (Exception e){
@ -160,9 +156,9 @@ public class ExpressageEndpoint extends EnvelopRestEndpoint {
    public Envelop SFGetOrderInfo(
            @ApiParam(name="outpatientId", value="门诊编号") @RequestParam(value = "outpatientId",required = true) String outpatientId){
        try {
            List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpaitentId",outpatientId);
            List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId",outpatientId);
            if(CollectionUtils.isEmpty(expressageDOList)){
                return failed( "查询失败,");
                return failed( "当前门诊不存在快递信息");
            }
            WlyyPrescriptionExpressageDO sfexpress_obj = expressageDOList.get(0);
            return success(sfexpress_obj);
@ -176,9 +172,9 @@ public class ExpressageEndpoint extends EnvelopRestEndpoint {
    @ApiOperation("通过门诊编号查询顺丰快递是否下单成功")
    public Envelop SFOrderSearchService(
            @ApiParam(name="outpatientId", value="门诊编号") @RequestParam(value = "outpatientId",required = true) String outpatientId){
        List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpaitentId",outpatientId);
        List<WlyyPrescriptionExpressageDO> expressageDOList = sfexpressService.findByField("outpatientId",outpatientId);
        if(CollectionUtils.isEmpty(expressageDOList)){
            return failed( "查询失败,");
            return failed( "当前门诊没有顺丰快递信息");
        }
        try {
            WlyyPrescriptionExpressageDO sfexpress_obj = expressageDOList.get(0);

+ 6 - 6
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientService.java

@ -99,8 +99,8 @@ public class PatientService extends BasePatientService<BasePatientDO, BasePatien
                patient.setPassword(MD5.md5Hex(password + "{" + patient.getSalt() + "}"));
            }
            if (!"undefined".equals(openid) && StringUtils.isNotBlank(openid)) {
                patient.setOpenid(openid);
                patient.setOpenidTime(new Date());
//                patient.setOpenid(openid);
//                patient.setOpenidTime(new Date());
            }
            patient.setMobile(mobile);
            patient.setLocked(0);
@ -304,10 +304,10 @@ public class PatientService extends BasePatientService<BasePatientDO, BasePatien
    }
    @Transactional(rollbackFor = Exception.class)
    public int updateOpenId(String id, String openId) {
        return basePatientDao.updateOpenId(id, openId);
    }
//    @Transactional(rollbackFor = Exception.class)
//    public int updateOpenId(String id, String openId) {
//        return basePatientDao.updateOpenId(id, openId);
//    }
    /**

+ 1 - 1
svr/svr-wlyy-specialist/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name: svr-wlyy-specialist-lyx
    name: svr-wlyy-specialist
  cloud:
    config:
      failFast: true