|
|
@ -108,6 +108,11 @@ public class SceneQuestionServiceImpl implements ISceneQuestionService { |
|
|
} |
|
|
} |
|
|
String uploadFilePath = null; |
|
|
String uploadFilePath = null; |
|
|
if (!ObjectUtil.isEmpty(files) && files.length == 1) { |
|
|
if (!ObjectUtil.isEmpty(files) && files.length == 1) { |
|
|
|
|
|
long fileSize = files[0].getSize(); |
|
|
|
|
|
int maxSize = 10 * 1024 * 1024; |
|
|
|
|
|
if (fileSize > maxSize) { |
|
|
|
|
|
return ZDResponse.error("不允许超过10MB"); |
|
|
|
|
|
} |
|
|
uploadFilePath = fileUploadApi.upload(files[0]); |
|
|
uploadFilePath = fileUploadApi.upload(files[0]); |
|
|
} |
|
|
} |
|
|
UserBean userBean = userApi.getCurrentUser(); |
|
|
UserBean userBean = userApi.getCurrentUser(); |
|
|
@ -131,9 +136,9 @@ public class SceneQuestionServiceImpl implements ISceneQuestionService { |
|
|
if (result > 0 && !ObjectUtil.isEmpty(files)) { |
|
|
if (result > 0 && !ObjectUtil.isEmpty(files)) { |
|
|
zdxtFileCommonApi.deleteZdxtFileByIds(sceneQuestion.getGuid()); |
|
|
zdxtFileCommonApi.deleteZdxtFileByIds(sceneQuestion.getGuid()); |
|
|
zdxtFileCommonApi.insertZdxtFile(files[0], sceneQuestion.getGuid() + "", uploadFilePath); |
|
|
zdxtFileCommonApi.insertZdxtFile(files[0], sceneQuestion.getGuid() + "", uploadFilePath); |
|
|
return ZDResponse.success(); |
|
|
return ZDResponse.success("更改成功,点击'保存流程图'生效"); |
|
|
} else if (result > 0) { |
|
|
} else if (result > 0) { |
|
|
return ZDResponse.success(); |
|
|
return ZDResponse.success("更改成功,点击'保存流程图'生效"); |
|
|
} |
|
|
} |
|
|
return ZDResponse.error("失败"); |
|
|
return ZDResponse.error("失败"); |
|
|
} |
|
|
} |
|
|
|