瀏覽代碼

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

# Conflicts:
#	svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java
wangzhinan 4 年之前
父節點
當前提交
242bf5f8aa

+ 2 - 5
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -3,17 +3,14 @@ package com.yihu.jw.order.pay.ylz;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.hospital.prescription.dao.OauthDzqmConfigDao;
import com.yihu.jw.hospital.prescription.dao.OauthYlzConfigDao;
import com.yihu.jw.order.pay.utils.PayLogService;
import com.yihu.jw.util.common.QrcodeUtil;
import com.yihu.jw.utils.ByteToInputStream;
import com.yihu.jw.utils.StringUtil;
import com.ylzinfo.onepay.sdk.HisOnepayClient;
import com.ylzinfo.onepay.sdk.OnepayClient;
import com.ylzinfo.onepay.sdk.domain.ResponseParams;
import com.ylzinfo.onepay.sdk.domain.ext.*;
import com.ylzinfo.onepay.sdk.utils.DateUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -254,7 +251,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config");
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }
@ -315,7 +312,7 @@ public class YlzPayService {
        String object  = null;
        Boolean isSuccess = true;
        String error = null;
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_pay_config");
        OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findById("ylz_balance_config");
        if(oauthYlzConfigDO==null){
            return "未找到支付配置文件";
        }

+ 53 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -772,8 +772,60 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "content", value = "消息内容", defaultValue = "")
			@RequestParam(value = "content", required = true) String content,
			@ApiParam(name = "type", value = "咨询type", defaultValue = "")
			@RequestParam(value = "type", required = false) String type
			@RequestParam(value = "type", required = false) String type,
			@ApiParam(name = "times", value = "times", defaultValue = "")
			@RequestParam(value = "times", required = false) Integer times,
			@ApiParam(name = "wechat_appid", value = "wechat_appid", defaultValue = "")
			@RequestParam(value = "wechat_appid", required = false) String wechat_appid
	)throws Exception{
		List<String> failed = new ArrayList<>();
		//处理语音文件
		if(!org.springframework.util.StringUtils.isEmpty(wechat_appid)){
//			imService.getInputStream("1",wechat_appid);
			if("3".equalsIgnoreCase(content_type)){//语音文件
				String voicepath = imService.fetchWxVoices(wechat_appid);
				logger.info("voice_path:"+voicepath);
				JSONObject obj = new JSONObject();
				String voiceurl = "";
				// 将临时语音拷贝到正式存储路径下
				if (org.apache.commons.lang3.StringUtils.isNotEmpty(voicepath)) {
					if("xm_ihealth_wx".equals(wechat_appid)){
						logger.info("voice_wx_type:"+wechat_appid);
						voiceurl = fileUploadService.uploadWxVoice(voicepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
					}else if ("xm_xzzx_wx".equalsIgnoreCase(wechat_appid)){
						voiceurl = fileUploadService.uploadWxVoiceToEntrance(remote_inner_url,voicepath);
						logger.info(voiceurl);
					}else {
						voiceurl = fileUtil.copyTempVoice(voicepath,fastdfs_file_url);
					}
					obj.put("path", voiceurl);
					obj.put("times", times);
					content = obj.toString();
				}
			}else if("2".equalsIgnoreCase(content_type)){//图片文件
				String imagepath = imService.fetchWxImages(wechat_appid);
				logger.info("image_path:"+imagepath);
				JSONObject obj = new JSONObject();
				String imgeUrl = "";
				// 将临时语音拷贝到正式存储路径下
				if (org.apache.commons.lang3.StringUtils.isNotEmpty(imagepath)) {
					if("xm_ihealth_wx".equals(wechat_appid)){
						logger.info("imge_wx_type:"+wechat_appid);
						imgeUrl = fileUploadService.uploadWxImage(imagepath);
//					uploadVO.setFullUri(map.get("accessory").toString());
					}else{
						imgeUrl = fileUtil.copyTempVoice(imagepath,fastdfs_file_url);
					}
					content = imgeUrl;
				}
			}else{
			}
		}
		session_id = imService.getPatientGuaidenceConsult(sender_id,session_id,type);
		String result = imService.patientGuaidenceAppend(sender_id,sender_name,session_id,content_type,content,"1");
		return success(result);