|
|
@@ -227,8 +227,11 @@ public class BaseSafetyToolServiceImpl implements IBaseSafetyToolService {
|
|
|
return AjaxResult.error("临时目录创建失败");
|
|
|
}
|
|
|
for (BaseSafetyTool tool : tools){
|
|
|
- File file = new File(tmpPath + tool.getToolCode() + ".jpg");
|
|
|
+ String jpgPath = tmpPath + tool.getToolCode() + ".jpg";
|
|
|
+ File file = new File(jpgPath);
|
|
|
+ log.debug(" ++ {}", jpgPath);
|
|
|
byte[] byteArray = HttpUtils.sendGetStream(tool.getQcodeUrl());
|
|
|
+ log.debug(" -- {}", tool.getQcodeUrl());
|
|
|
try (FileOutputStream os = new FileOutputStream(file, true)){
|
|
|
os.write(byteArray, 0, byteArray.length);
|
|
|
} catch (IOException e) {
|