zjh
2025-05-20 7fc564f30d27f47158061e015511595eebefd3b0
ltkj-admin/src/main/java/com/ltkj/web/config/captcha/CommonController.java
@@ -17,6 +17,7 @@
import com.ltkj.db.DataSourceContextHolder;
import com.ltkj.hosp.domain.SysAttachment;
import com.ltkj.hosp.service.ISysAttachmentService;
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.system.service.ISysDictDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -50,8 +51,8 @@
    @Autowired
    private ServerConfig serverConfig;
    @Value("${path.xdtfilePath}")
    private String value;
//    @Value("${path.xdtfilePath}")
//    private String value;
    private static final String FILE_DELIMETER = ",";
@@ -67,6 +68,8 @@
    private ISysAttachmentService sysAttachmentService;
    @Autowired
    private ISysDictDataService sysDictDataService;
    @Autowired
    private ISysConfigService configService;
    /**
@@ -288,7 +291,9 @@
    @ApiOperation(value = "心电图报告上传图片方法")
    public AjaxResult uploadXdtFile(@ApiParam("文件") @RequestPart("file") MultipartFile file,
                                    @ApiParam("体检号") String tjh,@ApiParam("项目id") String proId) throws Exception {
        try {
            String value = configService.selectConfigByKey("path_xdtfilePath");
            // 上传文件路径
            // 第一步:生成文件并保存
            String key = DataSourceContextHolder.getDataSourceKey();