zhaowenxuan
8 天以前 0892d843cd394f383ff50f480f7f22f2ec3829bc
ltkj-admin/src/main/java/com/ltkj/web/config/captcha/CommonController.java
@@ -16,6 +16,7 @@
import com.ltkj.common.utils.SnowFlake;
import com.ltkj.common.utils.uuid.UUID;
import com.ltkj.hosp.domain.SysAttachment;
import com.ltkj.hosp.mapper.TestMapper;
import com.ltkj.hosp.service.ISysAttachmentService;
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.system.service.ISysDictDataService;
@@ -51,8 +52,8 @@
    @Autowired
    private ServerConfig serverConfig;
    @Value("${path.xdtfilePath}")
    private String value;
//    @Value("${path.xdtfilePath}")
//    private String value;
    private static final String FILE_DELIMETER = ",";
@@ -69,8 +70,9 @@
    @Autowired
    private ISysDictDataService sysDictDataService;
    @Autowired
    private ISysConfigService sysConfigService;
    private ISysConfigService configService;
    @Autowired
    private TestMapper testMapper;
    /**
     * 通用下载请求
@@ -151,13 +153,20 @@
        }
    }
    /**
     * exe上传图片接口
     * @param file
     * @param dictVal
     * @param ip
     * @return
     */
    @PostMapping("/uploadImgExe")
    @ApiOperation(value = "EXE程序循环读取图片上传")
    public AjaxResult uploadImgExe(@RequestPart("file") MultipartFile file,@RequestParam("val")String dictVal,@RequestParam("ip")String ip){
        if (StrUtil.isBlank(dictVal))
            return AjaxResult.error("类型不能为空");
        try {
            String exeimgsaveurl = sysConfigService.selectConfigByKey("exeimgsaveurl");
            String exeimgsaveurl = configService.selectConfigByKey("exeimgsaveurl");
            String filePath;
            if (StrUtil.isNotBlank(exeimgsaveurl)){
                filePath = exeimgsaveurl;
@@ -195,6 +204,18 @@
            e.printStackTrace();
            return AjaxResult.error(e.getMessage());
        }
    }
    /**
     * 获取exe程序上传图片列表
     * @param type
     * @return
     */
    @GetMapping("/getExeUploadImgList")
    public AjaxResult getExeUploadImgList(@RequestParam("type") String type){
        if (StrUtil.isBlank(type)) return AjaxResult.error("类型不能为空");
        List<Map<String, Object>> list = testMapper.getExeUploadImgListByGnLx(type);
        return AjaxResult.success().put("data",list);
    }
    @GetMapping("/listExeVal")
@@ -304,6 +325,7 @@
                                    @ApiParam("体检号") String tjh,@ApiParam("项目id") String proId) throws Exception {
        try {
            // 上传文件路径
            String value = configService.selectConfigByKey("path_xdtfilePath");
            String filePath = value + File.separator;
            String outputFileName = tjh +"_" +proId;
            // 上传并返回新文件名称