Browse Source

修改bug

chenyongxing 7 years ago
parent
commit
475db96b67

+ 1 - 4
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/controller/medicine/PhysicalExaminationController.java

@ -184,14 +184,11 @@ public class PhysicalExaminationController extends WeixinBaseController {
    @ApiOperation(value = "获取微信文件,传到越人接口(四象采集,声音文件需要从微信接口获取)")
    @RequestMapping(value = "/dealVoice", method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    @RequestMapping(value = "/dealVoice", produces="application/json;charset=UTF-8")
    @ResponseBody
    public String getFileFromWechat( @ApiParam(name = "mediaId", value = "微信媒体id", required = true)@RequestParam(required = true, name = "type") String mediaId,
                                   @ApiParam(name = "type", value = "1.脸型  2.舌像  3.声音", required = true)@RequestParam(required = true, name = "type") String type,
                                   @ApiParam(name = "ct_id", value = "咨询编号", required = true)@RequestParam(required = true, name = "ct_id") String ct_id) throws Exception {
        String voice = saveVoiceToDisk(mediaId);
        String uploadAttachment = physicalExaminationService.uploadAttachment(voice);
        JSONObject uploadResult = new JSONObject(uploadAttachment);

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/service/PhysicalExaminationService.java

@ -204,7 +204,7 @@ public class PhysicalExaminationService {
    public String uploadAttachment(MultipartFile file) {
        MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
        String fileName = file.getOriginalFilename();
        String filePath =Class.class.getClass().getResource("/").getPath() + "temp/" + System.currentTimeMillis() + fileName;
        String filePath =this.getClass().getResource("/").getPath() + "temp/" + System.currentTimeMillis() + fileName;
        File dest = new File(filePath);
        if (!dest.getParentFile().exists()) {
            dest.getParentFile().mkdirs();

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/resources/application.yml

@ -3,7 +3,7 @@ server:
examCode: 84        #越人试卷编号
yuerenApi: http://172.19.103.88:9099/wlyy-manage/yueren       #越人api调用地址
#yuerenApi: http://127.0.0.1:8180/wlyy_admin/yueren    #my
security:
  basic:
    username: jkzl

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/yueren/YueRenController.java

@ -71,7 +71,7 @@ public class YueRenController extends BaseController {
    public String uploadAttachment(@RequestParam MultipartFile file) {
        MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
        String fileName = file.getOriginalFilename();
        String filePath =Class.class.getClass().getResource("/").getPath() + "temp/" + System.currentTimeMillis() + fileName;
        String filePath =this.getClass().getResource("/").getPath() + "temp/" + System.currentTimeMillis() + fileName;
        File dest = new File(filePath);
        if (!dest.getParentFile().exists()) {
            dest.getParentFile().mkdirs();