Browse Source

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

zdm 5 years ago
parent
commit
06ffeffc2e

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

@ -74,12 +74,12 @@ public class PatientMappingService {
        if(patientMappingDO!=null){
            return patientMappingDO.getMappingCode();
        }
        JSONArray rs = entranceService.BS15018(null,patientDO.getIdcard(),demoFlag);
        JSONArray rs = entranceService.BS15018(patientDO.getIdcard(),null,demoFlag);
        if(rs!=null&&rs.size()>0){
            //获取居民信息
            JSONObject json = rs.getJSONObject(0);
            String mappingCode = json.getString("PAT_NO");
            String mappingCode = json.getString("PAT_NO").trim();
            //存储对应映射关系
            PatientMappingDO mappingDO = new PatientMappingDO();

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

@ -8,7 +8,6 @@ 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.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
@ -46,9 +45,6 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.QrcodeUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.security.Code16;
import com.yihu.jw.util.security.MD5;
import com.yihu.mysql.query.BaseJpaService;
import com.ylzinfo.ehc.EhcHandler;
import com.ylzinfo.ehc.common.utils.DateUtils;
@ -59,8 +55,6 @@ import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -70,7 +64,6 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ErrorHandler;
import java.io.IOException;
import java.io.InputStream;
@ -201,7 +194,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     */
    public WlyyPrescriptionVO findOriginPrescription(String registerSn, String patNo, String admNo, String realOrder, boolean demoFlag)throws Exception{
        List<WlyyPrescriptionVO> rs = entranceService.BS16017(registerSn,patNo,admNo,realOrder,demoFlag);
        List<WlyyPrescriptionVO> rs = entranceService.BS16017(registerSn,realOrder,admNo,patNo,demoFlag);
        if(rs!=null&&rs.size()>0){
            return rs.get(0);
        }
@ -733,6 +726,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        if(StringUtils.isNotBlank(chargeType)){
            sql+=" AND d.charge_type ='"+chargeType+"'";
        }else{
            sql+=" AND d.charge_type is not null ";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
@ -795,6 +790,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        if(StringUtils.isNotBlank(chargeType)){
            totalSql+= " AND d.charge_type ='"+chargeType+"'";
        }else{
            totalSql+= " AND d.charge_type is not null ";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            totalSql+= " AND d.outpatient_type like'%"+outpatientType+"%'";
@ -852,6 +849,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        if(StringUtils.isNotBlank(chargeType)){
            sql+= " AND d.charge_type ='"+chargeType+"'";
        }else{
            sql+= " AND d.charge_type is not null";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            sql+= " AND d.outpatient_type like'%"+outpatientType+"%'";
@ -1521,7 +1520,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @throws Exception
     */
    public net.sf.json.JSONObject getCardInfo(String cardNo, boolean demoFlag) throws Exception {
        return entranceService.qutpatientBalance(cardNo,demoFlag);
        return entranceService.qutpatientBalance(cardNo,true);
    }
    public List<Map<String,Object>> findWorkTimeInfo(String id){
@ -2260,7 +2259,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     */
    public Boolean saveDoctorWorkTimeJson(String type,String codes,String workTimeJson)throws Exception{
        List<WlyyDoctorWorkTimeDO> wlyyDoctorWorkTimeDOs = (List<WlyyDoctorWorkTimeDO>) com.alibaba.fastjson.JSONArray.parseArray(workTimeJson, WlyyDoctorWorkTimeDO.class);
        com.alibaba.fastjson.JSONArray works = JSON.parseArray(workTimeJson);
        List<WlyyDoctorWorkTimeDO> wlyyDoctorWorkTimeDOs = new ArrayList<>();
        for(int i=0;i<works.size();i++){
            com.alibaba.fastjson.JSONObject work = (com.alibaba.fastjson.JSONObject)works.get(i);
            WlyyDoctorWorkTimeDO timeDO = objectMapper.readValue(work.toJSONString(),WlyyDoctorWorkTimeDO.class);
            wlyyDoctorWorkTimeDOs.add(timeDO);
        }
        //全院医生
        if("1".equals(type)){

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

@ -217,48 +217,6 @@ public class EntranceService {
        return ConvertUtil.convertListEnvelopByString(resp);
    }
    /**
     * 门诊处方信息(所有处方)根据处方信息封装到实体中
     * @param REGISTER_SN 流水号,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
     * @param realOrder 处方号 ,选择输入参数,该参数输入时获取到处方号为realOrder的处方
     * @param PAT_NO 病人id ,必传参数,只传病人id时,获取该病人的所有处方
     * @param ADM_NO 就诊唯一号 ,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
     * @param demoFlag 是否获取demo数据
     * @return
     * @throws Exception
     */
    public List<WlyyPrescriptionVO>  BS16017(String REGISTER_SN,String realOrder,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
        String fid=BS16017;
        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>");
            //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("<MsgInfo><endNum>20000</endNum><Msg/>");
            if (StringUtils.isNotBlank(REGISTER_SN)) {
                sbs.append("<query compy=\"=\" item=\"REGISTER_SN\" splice=\"and\" value=\"'" + REGISTER_SN + "'\"/>");
            }
            if (StringUtils.isNotBlank(realOrder)) {
                sbs.append("<query compy=\"=\" item=\"real_order\" splice=\"and\" value=\"'" + realOrder + "'\"/>");
            }
            if (StringUtils.isNotBlank(PAT_NO)) {
                sbs.append("<query compy=\"=\" item=\"PAT_NO\" splice=\"and\" value=\"'" + PAT_NO + "'\"/>");
            }
            if (StringUtils.isNotBlank(ADM_NO)) {
                sbs.append("<query compy=\"=\" item=\"ADM_NO\" splice=\"and\" value=\"'" + ADM_NO + "'\"/>");
            }
            //查询信息结束
            sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
        }
        return convertWlyyPrescriptionVOInBodyRow(resp);
    }
    /**
     * 处方(处方主体+诊断+药品)适配
     * @param obj 接口返回参数
@ -377,6 +335,48 @@ public class EntranceService {
            return  null;
        }
    }
    /**
     * 门诊处方信息(所有处方)根据处方信息封装到实体中
     * @param REGISTER_SN 流水号,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
     * @param realOrder 处方号 ,选择输入参数,该参数输入时获取到处方号为realOrder的处方
     * @param PAT_NO 病人id ,必传参数,只传病人id时,获取该病人的所有处方
     * @param ADM_NO 就诊唯一号 ,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
     * @param demoFlag 是否获取demo数据
     * @return
     * @throws Exception
     */
    public List<WlyyPrescriptionVO>  BS16017(String REGISTER_SN,String realOrder,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
        String fid=BS16017;
        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>");
            //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("<MsgInfo><endNum>20000</endNum><Msg/>");
            if (StringUtils.isNotBlank(REGISTER_SN)) {
                sbs.append("<query compy=\"=\" item=\"REGISTER_SN\" splice=\"and\" value=\"'" + REGISTER_SN + "'\"/>");
            }
            if (StringUtils.isNotBlank(realOrder)) {
                sbs.append("<query compy=\"=\" item=\"real_order\" splice=\"and\" value=\"'" + realOrder + "'\"/>");
            }
            if (StringUtils.isNotBlank(PAT_NO)) {
                sbs.append("<query compy=\"=\" item=\"PAT_NO\" splice=\"and\" value=\"'" + PAT_NO + "'\"/>");
            }
            if (StringUtils.isNotBlank(ADM_NO)) {
                sbs.append("<query compy=\"=\" item=\"ADM_NO\" splice=\"and\" value=\"'" + ADM_NO + "'\"/>");
            }
            //查询信息结束
            sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
        }
        return convertWlyyPrescriptionVOInBodyRow(resp);
    }
    /**
     * 初始化处方接口

+ 4 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/doctor/WlyyDoctorWorkTimeDO.java

@ -115,7 +115,7 @@ public class WlyyDoctorWorkTimeDO extends UuidIdentityEntity {
    public String getTimeType() {
        return timeType;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public void setTimeType(String timeType) {
        this.timeType = timeType;
    }
@ -124,7 +124,7 @@ public class WlyyDoctorWorkTimeDO extends UuidIdentityEntity {
    public Date getStartTime() {
        return startTime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
@ -133,7 +133,7 @@ public class WlyyDoctorWorkTimeDO extends UuidIdentityEntity {
    public Date getEndTime() {
        return endTime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
@ -150,7 +150,7 @@ public class WlyyDoctorWorkTimeDO extends UuidIdentityEntity {
    public Date getCreateTime() {
        return createTime;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

+ 6 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/service/OauthYlzConfigService.java

@ -88,6 +88,11 @@ public class OauthYlzConfigService {
        return null;
    }
    /**
     * 验证电子健康卡授权
     * @param authorizeNo
     * @return
     */
    public Map<String,Object> checkOauthQRCode(String authorizeNo){
        Map<String,Object> rsMap = new HashedMap();
@ -133,6 +138,7 @@ public class OauthYlzConfigService {
                        patient.setEnabled(1);
                        patient.setLocked(0);
                        patient.setCreateTime(new Date());
                        patient.setUpdateTime(new Date());
                        patient.setBirthday(DateUtil.strToDate(biz.getString("birthday"),"yyyyMMdd"));
                        basePatientDao.save(patient);

+ 8 - 0
svr/svr-internet-hospital/pom.xml

@ -205,7 +205,15 @@
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>xom</groupId>
            <artifactId>xom</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>im-service</artifactId>

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

@ -57,7 +57,6 @@ es:
    servicePackLog: base_service_package_log
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
  connect-timeout: 2 #链接超时时间
  network-timeout: 30
  charset: ISO8859-1 #编码
@ -108,6 +107,8 @@ spring:
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
# 短信发送地址
jw:
  smsUrl: http://svr-base:10020/sms_gateway/send
@ -164,6 +165,8 @@ spring:
    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: 97ed8a0a-4f07-4b85-ab02-b716c611a464  # base库中,wx_wechat 的id字段
# 短信验证码发送的客户端标识,居民端
@ -215,6 +218,8 @@ spring:
    password: Kb6wKDQP1W4
fastDFS:
  fastdfs_file_url: http://192.0.33.26:8888/
fast-dfs:
  tracker-server: 192.0.33.26:22122 #服务器地址
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
# 短信验证码发送的客户端标识,居民端