|
@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.yihu.wlyy.config.FastDFSConfig;
|
|
|
import com.yihu.wlyy.service.app.archives.PatientEventService;
|
|
|
import com.yihu.wlyy.service.app.archives.PatientRecordService;
|
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
|
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import com.yihu.wlyy.web.WeixinBaseController;
|
|
@ -189,9 +190,11 @@ public class PatientArchivesController extends WeixinBaseController {
|
|
|
InputStream wxImg = getInputStream(mediaId);
|
|
|
ObjectNode result = fastDFSUtil.upload(wxImg, "jpg", "");
|
|
|
wxImg.close();
|
|
|
|
|
|
String serverUrl = SystemConf.getInstance().getSystemProperties().getProperty("fastdfs_file_url");
|
|
|
if (result != null) {
|
|
|
url = result.get("fileUrl").toString().replaceAll("\"", "");
|
|
|
url = serverUrl
|
|
|
+ result.get("groupName").toString().replaceAll("\"", "") + "/"
|
|
|
+ result.get("remoteFileName").toString().replaceAll("\"", "");
|
|
|
}
|
|
|
else{
|
|
|
return write(-1, "图片上传失败!");
|