Bladeren bron

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

huangwenjie 5 jaren geleden
bovenliggende
commit
9758e1a90f
17 gewijzigde bestanden met toevoegingen van 234 en 78 verwijderingen
  1. 3 0
      business/base-service/src/main/java/com/yihu/jw/doctor/dao/BaseDoctorHospitalDao.java
  2. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/score/BaseEvaluateDao.java
  3. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/score/BaseEvaluateScoreDao.java
  4. 55 0
      business/base-service/src/main/java/com/yihu/jw/evaluate/score/service/BaseEvaluateService.java
  5. 2 0
      business/base-service/src/main/java/com/yihu/jw/hospital/mapping/dao/DoctorMappingDao.java
  6. 27 17
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  7. 120 38
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  8. 1 1
      business/base-service/src/mqConfig/mqdata/BS15017.json
  9. 2 2
      business/base-service/src/mqConfig/mqdata/BS16017.json
  10. 2 2
      business/base-service/src/mqConfig/mqdata/BS30025.json
  11. 1 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java
  12. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/score/BaseEvaluateScoreDO.java
  13. 5 5
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/mapping/DoctorMappingDO.java
  14. 6 3
      svr/svr-base/src/main/java/com/yihu/jw/base/service/score/ScoreService.java
  15. 1 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/file_upload/FileUploadEndpoint.java
  16. 4 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  17. 2 2
      svr/svr-internet-hospital/src/main/resources/application.yml

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/doctor/dao/BaseDoctorHospitalDao.java

@ -23,4 +23,7 @@ public interface BaseDoctorHospitalDao extends PagingAndSortingRepository<BaseDo
    List<BaseDoctorHospitalDO> findByOrgCodeAndDeptCode(String orgCode,String deptCode);
    @Query("select bdo from BaseDoctorHospitalDO bdo where bdo.orgCode=?1 and bdo.deptCode=?2 and bdo.doctorCode = ?3 and bdo.del=1")
    List<BaseDoctorHospitalDO> findByOrgCodeAndDeptCodeAndDoctorCode(String orgCode,String deptCode,String doctorCode);
}

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/dao/score/BaseEvaluateDao.java

@ -1,4 +1,4 @@
package com.yihu.jw.base.dao.score;
package com.yihu.jw.evaluate.score.dao;
import com.yihu.jw.entity.base.score.BaseEvaluateDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/dao/score/BaseEvaluateScoreDao.java

@ -1,4 +1,4 @@
package com.yihu.jw.base.dao.score;
package com.yihu.jw.evaluate.score.dao;
import com.yihu.jw.entity.base.score.BaseEvaluateScoreDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

+ 55 - 0
business/base-service/src/main/java/com/yihu/jw/evaluate/score/service/BaseEvaluateService.java

@ -0,0 +1,55 @@
package com.yihu.jw.evaluate.score.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.base.score.BaseEvaluateDO;
import com.yihu.jw.entity.base.score.BaseEvaluateScoreDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateDao;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateScoreDao;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
/**
 * Created by Trick on 2019/6/20.
 */
@Service
public class BaseEvaluateService extends BaseJpaService<BaseEvaluateDO, BaseEvaluateDao> {
    @Autowired
    private BaseEvaluateScoreDao baseEvaluateScoreDao;
    @Autowired
    private BaseEvaluateDao baseEvaluateDao;
    @Autowired
    private ObjectMapper objectMapper;
    public Boolean addEvaluateScore(String evaluateScoreJson, String evaluatesJson)throws Exception{
        BaseEvaluateScoreDO baseEvaluateScoreDO = objectMapper.readValue(evaluateScoreJson,BaseEvaluateScoreDO.class);
        List<BaseEvaluateDO> evaluateDOList = (List<BaseEvaluateDO>) com.alibaba.fastjson.JSONArray.parseArray(evaluatesJson, BaseEvaluateDO.class);
        if(evaluateDOList!=null&& evaluateDOList.size()>0){
            Double total = 0.0;
            for(BaseEvaluateDO evaluate :evaluateDOList){
                total += evaluate.getScore();
            }
            Double avg = new BigDecimal(total/evaluateDOList.size()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
            baseEvaluateScoreDO.setScore(avg);
            BaseEvaluateScoreDO baseEvaluateScore = baseEvaluateScoreDao.save(baseEvaluateScoreDO);
            for(BaseEvaluateDO evaluateDO:evaluateDOList){
                evaluateDO.setRelationCode(baseEvaluateScore.getId());
            }
            baseEvaluateDao.save(evaluateDOList);
        }
        return true;
    }
}

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/dao/DoctorMappingDao.java

@ -12,4 +12,6 @@ import java.util.List;
public interface DoctorMappingDao extends PagingAndSortingRepository<DoctorMappingDO, String>, JpaSpecificationExecutor<DoctorMappingDO> {
    List<DoctorMappingDO> findByDoctorAndOrgCode(String doctor,String orgCode);
    List<DoctorMappingDO> findByOrgCodeAndMappingCode(String orgCode,String mappingCode);
}

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

@ -266,6 +266,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("age",IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
        rs.put("address",basePatientDO.getAddress());
        rs.put("mobile",basePatientDO.getMobile());
        rs.put("birthday",DateUtil.dateToStr(basePatientDO.getBirthday(),"yyyy-MM-dd"));
        //获取处方信息
        List<WlyyPrescriptionDO> prescriptionDOs = null;
@ -471,7 +473,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public Boolean appointmentRevisit(String outpatientJson,String expressageJson,String registerJson)throws Exception{
    public WlyyOutpatientDO appointmentRevisit(String outpatientJson,String expressageJson,String registerJson)throws Exception{
        //1.保存就诊实体
        WlyyOutpatientDO outpatientDO = objectMapper.readValue(outpatientJson,WlyyOutpatientDO.class);
@ -507,9 +509,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        prescriptionExpressageDao.save(expressageDO);
        //3.创建候诊室
        createRoom(outpatient);
        createRoom(outpatient,registerTimeDO==null?null:registerTimeDO.getStartTime());
        return true;
        return outpatient;
    }
    /**
@ -517,13 +519,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param outpatientDO
     * @return
     */
    public Boolean createRoom(WlyyOutpatientDO outpatientDO){
    public Boolean createRoom(WlyyOutpatientDO outpatientDO,Date reservationTime){
        WlyyHospitalWaitingRoomDO waitingRoom = new WlyyHospitalWaitingRoomDO();
        waitingRoom.setConsultType(1);
        waitingRoom.setPatientId(outpatientDO.getPatient());
        waitingRoom.setPatientName(outpatientDO.getPatientName());
        waitingRoom.setReservationTime(outpatientDO.getAdmDate());
        waitingRoom.setReservationTime(reservationTime);
        waitingRoom.setVisitStatus(0);
        waitingRoom.setReservationType(1);
        waitingRoom.setSort(0);
@ -584,10 +586,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public JSONObject checkOutpatient(String patient){
    public JSONObject checkOutpatient(String patient)throws Exception{
        //-1卡余额不足,,-2 存在未结束的诊断热 1成功
        JSONObject rs = new JSONObject();
        //1.判断钱是否够
        //1.余额判断改到前端判断
        //net.sf.json.JSONObject json = entranceService.qutpatientBalance(cardNo,demoFlag);
        //2.判断是否有未结束的
        List<WlyyOutpatientDO> list = outpatientDao.findByPatientList(patient);
@ -820,6 +823,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            prescriptionDO = prescriptionDOs.get(0);
        }else{
            prescriptionDO = new WlyyPrescriptionDO();
            prescriptionDO.setOutpatientId(outPatientId);
        }
        prescriptionDO.setStatus(10);
        prescriptionDO.setPatientCode(outpatientDO.getPatient());
@ -831,7 +835,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //下诊断
        //删除之前诊断
        List<WlyyPrescriptionDiagnosisDO> ds = prescriptionDiagnosisDao.findByPrescriptionId(prescription.getId());
        prescriptionDiagnosisDao.delete(ds);
        if(ds!=null&&ds.size()>0){
            prescriptionDiagnosisDao.delete(ds);
        }
        List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
        String Icd10 = "";
@ -1288,21 +1294,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            t.put("startTime",DateUtil.dateToStr(sc.getTime(),"yyyy-MM-dd HH:mm:ss"));
            //加上时间间隔
            sc.add(Calendar.MINUTE,timeDO.getTimeInterval());
            //如果结束时间大于排班时间则不再拆分号源
            if(sc.getTime().after(timeDO.getEndTime())){
                break;
            }
            t.put("endTime",DateUtil.dateToStr(sc.getTime(),"yyyy-MM-dd HH:mm:ss"));
            //如果号源被预约了,标记为true
            Boolean registered = false;
            if(registerTimeDOs!=null&&registerTimeDOs.size()>0){
                Boolean registered = false;
                for(WlyyPatientRegisterTimeDO registerTimeDO : registerTimeDOs){
                    if(t.get("startTime").equals(DateUtil.dateToStr(registerTimeDO.getStartTime(),"yyyy-MM-dd HH:mm:ss"))){
                        registered = true;
                    }
                }
                t.put("registered",registered);
            }
            t.put("registered",registered);
            rs.add(t);
        }
@ -1360,13 +1367,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public Map<String,Object> findDoctorInfo(String doctor){
        BaseDoctorDO doctorDO = baseDoctorDao.findOne(doctor);
        Map<String,Object> rs = new HashedMap();
        rs.put("doctor",doctor);
        rs.put("doctor",doctorDO.getName());
        rs.put("job",doctorDO.getJobTitleCode());
        rs.put("jobName",doctorDO.getJobTitleName());
        rs.put("chargeType",doctorDO.getChargeType());
        rs.put("photo",doctorDO.getPhoto());
        if(doctorDO!=null){
            rs.put("doctor",doctor);
            rs.put("doctor",doctorDO.getName());
            rs.put("job",doctorDO.getJobTitleCode());
            rs.put("jobName",doctorDO.getJobTitleName());
            rs.put("chargeType",doctorDO.getChargeType());
            rs.put("photo",doctorDO.getPhoto());
        }
        return rs;
    }

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

@ -5,11 +5,15 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.dict.dao.DictHospitalDeptDao;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
@ -86,6 +90,10 @@ public class EntranceService {
    private WlyyChargeDictDao wlyyChargeDictDao;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private DoctorMappingDao doctorMappingDao;
    @Autowired
    private BaseDoctorHospitalDao baseDoctorHospitalDao;
    /**
     * 获取本地示例返参
@ -123,7 +131,7 @@ public class EntranceService {
    /**
     * 查询门诊余额
     * @param cardNo 身份证号码,必传参数
     * @param cardNo 卡号,必传参数
     * @param demoFlag 是否使用demo.不请求接口。true代表获取本地数据,false代表获取his数据
     * @return
     * @throws Exception
@ -163,8 +171,8 @@ public class EntranceService {
    /**
     * 门诊就诊卡列表
     * @param SOCIAL_NO 身份证号,二者不能都为空
     * @param CARD_NO 就诊卡号,二者不能都为空
     * @param SOCIAL_NO 身份证号
     * @param CARD_NO 就诊卡号
     * @return
     * @throws Exception
     */
@ -280,6 +288,8 @@ public class EntranceService {
                                    wlyyPrescriptionVO = initWlyyPrescriptionVo(new WlyyPrescriptionVO(), jsonObjectBody, realOrder);
                                    wlyyPrescriptionVO.setHospital("350211A1002");
                                    wlyyPrescriptionVO.setHospitalName("厦门市中山医院");
                                    String doasgeTime=null != jsonObjectBody.get("DISP_DATE") ? jsonObjectBody.get("DISP_DATE").toString() : "";
                                    wlyyPrescriptionVO.setDosageTime(DateUtil.strToDate((doasgeTime+" 00:00:00"),DateUtil.YYYY_MM_DD_HH_MM_SS));
                                    wlyyPrescriptionVOMap.put(realOrder, wlyyPrescriptionVO);
                                    //主诊断 毒蛇咬伤&T63.001
                                    String[] icdName = jsonObjectBody.get("icd_name").toString().split("&");
@ -376,7 +386,7 @@ public class EntranceService {
        wlyyPrescriptionVO.setPatientCode(patNo);
        wlyyPrescriptionVO.setPatientName(patientName);
        wlyyPrescriptionVO.setIdcard(patientMappingDo.getIdcard());
        wlyyPrescriptionVO.setIdcard(null==patientMappingDo?null:patientMappingDo.getIdcard());
        //TODO 社保卡号
        wlyyPrescriptionVO.setSsc("");
        wlyyPrescriptionVO.setHisDoctorCode(null != jsonObjectBody.get("PRESC_DOC") ? jsonObjectBody.get("PRESC_DOC").toString() : "");
@ -417,6 +427,8 @@ public class EntranceService {
    public  List<WlyyOutpatientVO> BS30025(String PAT_NO,String conNo,String startTime,String endTime,boolean demoFlag) throws Exception {
        String fid = BS30025;
        String resp = "";
        String orgCode = "350211A1002";
        String orgName = "厦门市中山医院";
        if (demoFlag) {
            resp = getJosnFileResullt(fid);
        } else {
@ -452,8 +464,8 @@ public class EntranceService {
            if (null != jsonObjectMgsInfo) {
                wlyyOutpatientVO = new WlyyOutpatientVO();
                //中山医院固定入参
                wlyyOutpatientVO.setHospital("350211A1002");
                wlyyOutpatientVO.setHospitalName("厦门市中山医院");
                wlyyOutpatientVO.setHospital(orgCode);
                wlyyOutpatientVO.setHospitalName(orgName);
                wlyyOutpatientVO.setWinNo("6");
                wlyyOutpatientVO.setAdmNo(null == jsonObjectMgsInfo.get("ADM_NO") ? "" : jsonObjectMgsInfo.get("ADM_NO") + "");
                wlyyOutpatientVO.setRegisterNo(null == jsonObjectMgsInfo.get("REGISTER_SN") ? "" : jsonObjectMgsInfo.get("REGISTER_SN") + "");
@ -470,15 +482,60 @@ public class EntranceService {
                wlyyOutpatientVO.setPatient(patNo);
                wlyyOutpatientVO.setPatientName(patientName);
                wlyyOutpatientVO.setConNo(null == jsonObjectMgsInfo.get("CON_NO") ? "" : jsonObjectMgsInfo.get("CON_NO") + "");
                wlyyOutpatientVO.setDoctor(null == jsonObjectMgsInfo.get("CON_DOC") ? "" : jsonObjectMgsInfo.get("CON_DOC") + "");
                String doctor=null == jsonObjectMgsInfo.get("CON_DOC") ? "" : jsonObjectMgsInfo.get("CON_DOC") + "";
                //转化医生
                String mappingCode = doctor.trim();
                String doctorCode = "";
                if(StringUtils.isNotBlank(mappingCode)){
                    List<DoctorMappingDO> mappingDOs =doctorMappingDao.findByOrgCodeAndMappingCode(orgCode,mappingCode);
                    if(mappingDOs!=null&&mappingDOs.size()>0){
                        doctorCode = mappingDOs.get(0).getDoctor();
                    }
                }
                wlyyOutpatientVO.setDoctor(doctorCode);
                wlyyOutpatientVO.setDoctorName(null == jsonObjectMgsInfo.get("CON_DOC_NAME") ? "" : jsonObjectMgsInfo.get("CON_DOC_NAME") + "");
                wlyyOutpatientVO.setIdcard(null == jsonObjectMgsInfo.get("social_no") ? "" : jsonObjectMgsInfo.get("social_no") + "");
                wlyyOutpatientVO.setMjz(null == jsonObjectMgsInfo.get("MJZ") ? "" : jsonObjectMgsInfo.get("MJZ") + "");
                String icds = null == jsonObjectMgsInfo.get("icd_name") ? "" : jsonObjectMgsInfo.get("icd_name") + "";
                String[] icdcodeAndName = icds.split("&");
                wlyyOutpatientVO.setIcd10(icdcodeAndName.length > 1 ? icdcodeAndName[1].toString() : "");
                wlyyOutpatientVO.setIcd10Name(icdcodeAndName.length > 0 ? icdcodeAndName[0].toString() : "");
                //主诊断 毒蛇咬伤&T63.001
                String[] icdName = jsonObjectMgsInfo.get("icd_name").toString().split("&");
                String[] diagTwo = jsonObjectMgsInfo.get("diag_two").toString().split("&");
                String[] diagThree = jsonObjectMgsInfo.get("diag_three").toString().split("&");
                String[] diagFour = jsonObjectMgsInfo.get("diag_four").toString().split("&");
                String[] diagFive = jsonObjectMgsInfo.get("diag_five").toString().split("&");
                String icdcodes = "";
                String icdNames = "";
                if(icdName.length>0){
                    icdcodes += icdName[1];
                    icdNames += icdName[0];
                }
                if(diagTwo.length>0){
                    icdcodes += ","+diagTwo[1];
                    icdNames += ","+diagTwo[0];
                }
                if(diagThree.length>0){
                    icdcodes += ","+diagThree[1];
                    icdNames += ","+diagThree[0];
                }
                if(diagFour.length>0){
                    icdcodes += ","+diagFour[1];
                    icdNames += ","+diagFour[0];
                }
                if(diagFive.length>0){
                    icdcodes += ","+diagFive[1];
                    icdNames += ","+diagFive[0];
                }
//                String icds = null == jsonObjectMgsInfo.get("icd_name") ? "" : jsonObjectMgsInfo.get("icd_name") + "";
//                String[] icdcodeAndName = icds.split("&");
//                wlyyOutpatientVO.setIcd10(icdcodeAndName.length > 1 ? icdcodeAndName[1].toString() : "");
//                wlyyOutpatientVO.setIcd10Name(icdcodeAndName.length > 0 ? icdcodeAndName[0].toString() : "");
                wlyyOutpatientVO.setIcd10(icdcodes);
                wlyyOutpatientVO.setIcd10Name(icdNames);
                String admDate = null == jsonObjectMgsInfo.get("ADM_DAT") ? "" : jsonObjectMgsInfo.get("ADM_DAT") + "";
                String conDate = null == jsonObjectMgsInfo.get("CON_DATE") ? "" : jsonObjectMgsInfo.get("CON_DATE") + "";
                wlyyOutpatientVO.setAdmDate(DateUtil.strToDate(admDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
@ -1335,59 +1392,84 @@ public class EntranceService {
     * @throws Exception
     */
    public int MS02003(boolean demoFlag) throws Exception {
        int i=0;
        String fid="MS02003";
        String resp="";
        int i = 0;
        String fid = "MS02003";
        String resp = "";
        if (demoFlag) {
            resp = getJosnFileResullt(fid);
        } else {
            StringBuffer sbs = new StringBuffer();
            //AccessControl :用户、密码、服务id
            sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
            sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>" + mqUser + "</UserName><Password>" + mqPwd + "</Password></AccessControl>");
            //MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
            sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
            sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>" + sourceSysCode + "</SourceSysCode><TargetSysCode>" + targetSysCode + "</TargetSysCode></MessageHeader>");
            //查询信息拼接
            sbs.append("<MsgInfo><endNum>10000</endNum><Msg></Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            net.sf.json.JSONArray jsonArray= ConvertUtil.convertListEnvelopInBodyRow(resp);
            for(Object object:jsonArray){
                net.sf.json.JSONObject jsonObjectBody=(net.sf.json.JSONObject)object;
                String doctorCode="";
                if(null!=jsonObjectBody){
            net.sf.json.JSONArray jsonArray = ConvertUtil.convertListEnvelopInBodyRow(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();
                    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();
                        }
                    }
                    //保存医生信息
                    BaseDoctorDO baseDoctorDO=new BaseDoctorDO();
                    String idCard=null==jsonObjectBody.get("Card_Id")?"":jsonObjectBody.get("Card_Id").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();
                    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");
                    baseDoctorDO.setDel("1".equals(disableFlag) ? "0" : "1");
                    //姓名
                    baseDoctorDO.setName(null==jsonObjectBody.get("Emp_Name")?"":jsonObjectBody.get("Emp_Name").toString());
                    doctorName = null == jsonObjectBody.get("Emp_Name") ? "" : jsonObjectBody.get("Emp_Name").toString();
                    //号别
                    baseDoctorDO.setChargeType(chareType);
                    if(StringUtils.isNotBlank(idCard)){
                    if (StringUtils.isNotBlank(idCard)) {
                        baseDoctorDO.setSalt(PwdUtil.randomString(5));
                        baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex(baseDoctorDO.getIdcard().substring(12, 18) + "{" + baseDoctorDO.getSalt() + "}"));
                    }
                    baseDoctorDao.save(baseDoctorDO);
                    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++;
                }
            }

+ 1 - 1
business/base-service/src/mqConfig/mqdata/BS15017.json

@ -3,7 +3,7 @@
	"MsgInfo": {
		"Msg": {
			"CARD_NO": "D26818411",
			"ZHYE": "0.00",
			"ZHYE": "30.00",
			"YEXZ_FLAG": "1"
		},
		"MsgCount": "1",

+ 2 - 2
business/base-service/src/mqConfig/mqdata/BS16017.json

@ -42,8 +42,8 @@
				"YPZYSX": "远离进餐时服,血栓性静脉炎禁用",
				"dxk_meeting_no": [],
				"icd_name": "先兆流产&O20.000",
				"diag_two": "&",
				"diag_three": "&",
				"diag_two": "先兆流产1&O20.001",
				"diag_three": "先兆流产1&O20.002",
				"diag_four": [],
				"diag_five": [],
				"real_order": "401934082",

+ 2 - 2
business/base-service/src/mqConfig/mqdata/BS30025.json

@ -3,7 +3,7 @@
	"MsgInfo": [{
		"row": {
			"ADM_NO": "P11160895-0(2)",
			"PAT_NAME": "张爱华",
			"PAT_NAME": "文彬",
			"SEX": "2",
			"BIRTH_DATE": "1959/01/01 00:00:00",
			"ID_CARD": [],
@ -14,7 +14,7 @@
			"CON_NO": "2",
			"CON_DATE": "2019/06/03 01:37:52",
			"CON_DOC": "8632 ",
			"CON_DOC_NAME": "赵冰",
			"CON_DOC_NAME": "贵港医生1",
			"CON_SPEC": "1190007",
			"CON_SPEC_NAME": "急诊外科",
			"RCPT_POLICY": "00",

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

@ -304,6 +304,7 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
        this.name = name;
    }
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    @Column(name = "birthday")
    public Date getBirthday() {
        return birthday;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/score/BaseEvaluateScoreDO.java

@ -21,7 +21,7 @@ public class BaseEvaluateScoreDO extends UuidIdentityEntityWithOperator {
    private String doctorName;//医生名字',
    private String patient;//评价人',
    private String patientName;//评价人姓名',
    private Integer evaluateType;//.咨询评价;',
    private Integer evaluateType;//.咨询评价;1咨询',
    private String relationCode;//所属业务关系code,例如:1为咨询code',
    private Double score;//主表分数',
    private Integer type;//1、实名,2、匿名',

+ 5 - 5
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/mapping/DoctorMappingDO.java

@ -15,7 +15,7 @@ import java.util.Date;
public class DoctorMappingDO extends UuidIdentityEntity {
    private String doctor;//医生code',
    private String doctor_name;//医生名称',
    private String doctorName;//医生名称',
    private String idcard;//身份证号',
    private String orgCode;//机构code',
    private String orgName;//机构名称',
@ -35,12 +35,12 @@ public class DoctorMappingDO extends UuidIdentityEntity {
        this.doctor = doctor;
    }
    public String getDoctor_name() {
        return doctor_name;
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctor_name(String doctor_name) {
        this.doctor_name = doctor_name;
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    public String getIdcard() {

+ 6 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/service/score/ScoreService.java

@ -1,9 +1,12 @@
package com.yihu.jw.base.service.score;
import com.yihu.jw.base.dao.score.BaseEvaluateDao;
import com.yihu.jw.base.dao.score.BaseEvaluateScoreDao;
import com.yihu.jw.entity.base.score.BaseEvaluateDO;
import com.yihu.jw.entity.base.score.BaseEvaluateScoreDO;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateDao;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateScoreDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -16,7 +19,7 @@ import java.util.List;
 */
@Service
@Transactional
public class ScoreService {
public class ScoreService{
    @Autowired
    private BaseEvaluateScoreDao baseEvaluateScoreDao;

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/file_upload/FileUploadEndpoint.java

@ -64,7 +64,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STRING)
    @ApiOperation(value = "base64上传图片",notes = "base64上传图片")
    public ObjEnvelop<UploadVO> uploadImages(@ApiParam(name = "jsonData", value = "头像转化后的输入流")
                                                 @RequestBody String jsonData) throws Exception {
                                             @RequestParam(value = "jsonData", required = true) String jsonData) throws Exception {
        UploadVO uploadVO = fileUploadService.uploadImages(jsonData,fastdfs_file_url);
        return success("上传成功", uploadVO);
    }

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

@ -168,7 +168,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.checkOutpatient)
    @ApiOperation(value = "判断是否可用发起门诊", notes = "判断是否可用发起门诊")
    public ObjEnvelop checkOutpatient(@ApiParam(name = "patient", value = "续方明细")
                                      @RequestParam(value = "patient", required = true)String patient){
                                      @RequestParam(value = "patient", required = true)String patient)throws Exception{
        return success(prescriptionService.checkOutpatient(patient));
    }
@ -247,15 +247,15 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.makeDiagnosis)
    @ApiOperation(value = "下诊断", notes = "下诊断")
    public ObjEnvelop makeDiagnosis(@ApiParam(name = "outPatientId", value = "门诊编号")
                                            @RequestParam(value = "outPatientId", required = false)String outPatientId,
                                            @RequestParam(value = "outPatientId", required = true)String outPatientId,
                                            @ApiParam(name = "advice", value = "医嘱")
                                            @RequestParam(value = "advice", required = false)String advice,
                                            @ApiParam(name = "type", value = "1带药品,2不带药品")
                                            @RequestParam(value = "type", required = false)String type,
                                            @RequestParam(value = "type", required = true)String type,
                                            @ApiParam(name = "infoJsons", value = "药品json")
                                            @RequestParam(value = "infoJsons", required = false)String infoJsons,
                                            @ApiParam(name = "diagnosisJson", value = "诊断json")
                                            @RequestParam(value = "diagnosisJson", required = false)String diagnosisJson)throws Exception {
                                            @RequestParam(value = "diagnosisJson", required = true)String diagnosisJson)throws Exception {
        return success(prescriptionService.makeDiagnosis(outPatientId,advice,type,infoJsons,diagnosisJson));
    }

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

@ -107,7 +107,7 @@ spring:
#    base-url: http://localhost:9411 #日志追踪的地址
fastDFS:
  fastdfs_file_url: http://172.26.0.110:22122/
  fastdfs_file_url: http://172.26.0.110:8888/
# 短信发送地址
jw:
  smsUrl: http://svr-base:10020/sms_gateway/send
@ -162,7 +162,7 @@ spring:
    host: 172.26.0.253 # Redis server host.
    port: 6379 # Redis server port.
fastDFS:
  fastdfs_file_url: http://172.26.0.110:22122/
  fastdfs_file_url: http://172.26.0.110:8888/
wechat:
  id: 97ed8a0a-4f07-4b85-ab02-b716c611a464  # base库中,wx_wechat 的id字段
# 短信验证码发送的客户端标识,居民端