瀏覽代碼

发起协同门诊

Trick 5 年之前
父節點
當前提交
24035ccd6f

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

@ -199,6 +199,12 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    @ApiModelProperty(value = "1已经评价,0或其他未评价", example = "模块1")
    private String evaluateStatus;
    /**
     * 1.在线复诊2.协同门诊
     */
    @ApiModelProperty(value = "1.在线复诊2.协同门诊", example = "模块1")
    private String outpatientType;
    public String getAdmNo() {
        return admNo;
    }
@ -429,4 +435,12 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    public void setEvaluateStatus(String evaluateStatus) {
        this.evaluateStatus = evaluateStatus;
    }
    public String getOutpatientType() {
        return outpatientType;
    }
    public void setOutpatientType(String outpatientType) {
        this.outpatientType = outpatientType;
    }
}

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

@ -698,8 +698,15 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    @RequestMapping(value = "/oauth/getOauthQRCodeImg", method = RequestMethod.GET)
    public ObjEnvelop getOauthQRCodeImg(){
        logger.info("/oauth/getOauthQRCodeImg:"+ DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
        return ObjEnvelop.getSuccess("success", oauthYlzConfigService.getOauthQRCodeImg());
        try{
            logger.info("/oauth/getOauthQRCodeImg1:"+" startTime:"+ DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            Map<String,Object> rs = oauthYlzConfigService.getOauthQRCodeImg();
            logger.info("/oauth/getOauthQRCodeImg2:"+" endTime:"+ DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS") );
            return ObjEnvelop.getSuccess("success", rs);
        }catch (Exception e){
            e.printStackTrace();
            return ObjEnvelop.getError("getOauthQRCodeImg error");
        }
    }
    @RequestMapping(value = "/oauth/checkQRCodeLogin", method = RequestMethod.POST)

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

@ -32,7 +32,6 @@ import java.util.UUID;
 * Created by Trick on 2019/7/26.
 */
@Service
@Transactional
public class OauthYlzConfigService {
    private static final Logger logger = LoggerFactory.getLogger(OauthYlzConfigService.class);
@ -91,9 +90,9 @@ public class OauthYlzConfigService {
    public Map<String,Object> getOauthQRCodeImg(){
        try {
            logger.info("getOauthQRCode dao1:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            logger.info("getOauthQRCodeImg dao1:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findOne("ylz_config");
            logger.info("getOauthQRCode dao2:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            logger.info("getOauthQRCodeImg dao2:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            TransRequest e = new TransRequest();
            e.setMethod("ehc.ehealthcard.authurl");
            e.setApp_id(oauthYlzConfigDO.getAppId());
@ -136,6 +135,7 @@ public class OauthYlzConfigService {
     * @param authorizeNo
     * @return
     */
    @Transactional
    public Map<String,Object> checkOauthQRCode(String authorizeNo){
        Map<String,Object> rsMap = new HashedMap();

+ 4 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/utils/ByteToInputStream.java

@ -36,6 +36,7 @@ public class ByteToInputStream {
        }catch (Exception e){
            logger.error(e.toString());
        }finally {
            inStream.close();
            swapStream.close();
        }
        return in2b;
@ -45,8 +46,9 @@ public class ByteToInputStream {
        // 将图片文件转化为字节数组字符串,并对其进行Base64编码处理
        byte[] data = null;
        // 读取图片字节数组
        ByteArrayOutputStream swapStream = null;
        try {
            ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
            swapStream = new ByteArrayOutputStream();
            byte[] buff = new byte[100];
            int rc = 0;
            while ((rc = in.read(buff, 0, 100)) > 0) {
@ -58,6 +60,7 @@ public class ByteToInputStream {
        } finally {
            if (in != null) {
                try {
                    swapStream.close();
                    in.close();
                } catch (IOException e) {
                    logger.error(e.toString());

+ 2 - 3
server/svr-authentication/src/main/java/com/yihu/jw/security/utils/QrcodeUtil.java

@ -59,9 +59,8 @@ public class QrcodeUtil {
            hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
            hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
            hints.put(EncodeHintType.MARGIN, 0);
            BitMatrix bitMatrix = new MultiFormatWriter().encode(content,
              BarcodeFormat.QR_CODE, size, size, hints);
             os = new ByteArrayOutputStream();
            BitMatrix bitMatrix = new MultiFormatWriter().encode(content,BarcodeFormat.QR_CODE, size, size, hints);
            os = new ByteArrayOutputStream();
            MatrixToImageWriter.writeToStream(bitMatrix, imgType, os);
            return new ByteArrayInputStream(os.toByteArray());
        } catch (Exception e) {