| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.system.ApplicationHome; |
| | | import org.springframework.core.env.Environment; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | |
| | | @Autowired |
| | | private FGCDFileDownloadService service; |
| | | @Autowired |
| | | private Environment environment; |
| | | |
| | | @GetMapping("listByDeviceId") |
| | | @ApiOperation(value = "数据导入") |
| | |
| | | //存储A059图片的文件夹 |
| | | //调试版 |
| | | //D:\GitWorkSpace\fg_v2.0\target\classes |
| | | //String fileDirName = jarFile.getParentFile().toString()+File.separator+"A059"+File.separator+"images"+File.separator+devId; |
| | | //打包版 |
| | | String fileDirName = jarFile.toString()+File.separator+"A059"+File.separator+"images"+File.separator+devId; |
| | | int configType = Integer.parseInt(environment.getProperty("configFile.type")); |
| | | String fileDirName = ""; |
| | | //测试版 |
| | | if(configType==1){ |
| | | fileDirName = jarFile.getParentFile().toString()+File.separator+"A059"+File.separator+"images"+File.separator+devId; |
| | | }else{ |
| | | //打包版 |
| | | fileDirName = jarFile.toString()+File.separator+"A059"+File.separator+"images"+File.separator+devId; |
| | | } |
| | | |
| | | //图片的Url |
| | | File file = new File(fileDirName); |