liusheng
2 天以前 0bd3850e552fd3aa61619db84e4d6e673640943d
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -7,6 +7,7 @@
import com.ruoyi.common.core.domain.entity.SysUserDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.AesUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
@@ -24,6 +25,8 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
@@ -1855,6 +1858,44 @@
        return true;
    }
    @Override
    public Map<String, Object> query360PatInfolwl(Long patid, SysUser sysUser) {
        Map<String, Object> result = new HashMap<>();
        PatArchive pa = patArchiveMapper.selectPatArchiveByPatid(patid);
        if (pa.getPatientno() == null) {
            result.put("url", null);
            result.put("error", "患者编号为空");
            return result;
        }
        StringBuffer sbf = new StringBuffer("http://cfdata.nhyfy.cn/cfdata/h360/patient-summary?");
        sbf.append("referer=thirdparty");
        sbf.append("&encode=1");
        sbf.append("&patientMainIndexNum=" + AesUtils.encrypt(pa.getPatientno()));
        sbf.append("&workId=" + AesUtils.encrypt(sysUser.getUserName()));
        sbf.append("&workName=" + AesUtils.encrypt(sysUser.getNickName()));
        sbf.append("&hisOrgCode=" + AesUtils.encrypt("20001001"));
        sbf.append("&hisOrgName=" + AesUtils.encrypt("南华大学附属第一医院"));
        sbf.append("&hisHosCode=" + AesUtils.encrypt("30001002"));
        sbf.append("&hisHosName=" + AesUtils.encrypt("南华大学附属第一医院"));
        String url360 = null;
        try {
            url360 = URLEncoder.encode(sbf.toString(), "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
        StringBuffer stringBuffer = new StringBuffer("http://cfdata.nhyfy.cn/cfdata/login/nologin?");
        //accountNo对接人不给,先空着---------------------------------------------------------------
        stringBuffer.append("accountNo=");
        stringBuffer.append("&source=third");
        stringBuffer.append("&redirectUrl=" + url360);
        result.put("url", stringBuffer.toString());
        result.put("error", null);
        return result;
    }
    private Boolean getType(String type, Map dataMap) {
        switch (type) {
            case "BR_DA_DangAnJL":