|
|
@ -56,6 +56,7 @@ import com.google.gson.GsonBuilder; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.ListUtils; |
|
|
|
import org.apache.commons.io.FilenameUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.logging.log4j.LogManager; |
|
|
|
import org.apache.logging.log4j.Logger; |
|
|
@ -2254,7 +2255,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
List<String> files = new ArrayList<>(); |
|
|
|
for (String url : issueDetail.getData().getTopicInfo().getPhotoList()) { |
|
|
|
Result<MultipartFile> multipartFileResult = |
|
|
|
HttpClientManager.getInstance().getFileItem(url, UUID.randomUUID().toString().replace("-", "")); |
|
|
|
HttpClientManager.getInstance().getFileItem(url, "image." + FilenameUtils.getExtension(url)); |
|
|
|
if (!multipartFileResult.success()) { |
|
|
|
throw new RenException(multipartFileResult.getCode(), multipartFileResult.getMsg()); |
|
|
|
} |
|
|
@ -2274,7 +2275,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
List<String> files = new ArrayList<>(); |
|
|
|
for (TopicFileResultDTO item : topicAttachment.getData().getVoiceList()) { |
|
|
|
Result<MultipartFile> multipartFileResult = |
|
|
|
HttpClientManager.getInstance().getFileItem(item.getUrl(), UUID.randomUUID().toString().replace("-", "")); |
|
|
|
HttpClientManager.getInstance().getFileItem(item.getUrl(), "voice." + FilenameUtils.getExtension(item.getUrl())); |
|
|
|
if (!multipartFileResult.success()) { |
|
|
|
throw new RenException(multipartFileResult.getCode(), multipartFileResult.getMsg()); |
|
|
|
} |
|
|
@ -2293,7 +2294,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
List<String> files = new ArrayList<>(); |
|
|
|
for (TopicFileResultDTO item : topicAttachment.getData().getVideoList()) { |
|
|
|
Result<MultipartFile> multipartFileResult = |
|
|
|
HttpClientManager.getInstance().getFileItem(item.getUrl(), UUID.randomUUID().toString().replace("-", "")); |
|
|
|
HttpClientManager.getInstance().getFileItem(item.getUrl(), "video." + FilenameUtils.getExtension(item.getUrl())); |
|
|
|
if (!multipartFileResult.success()) { |
|
|
|
throw new RenException(multipartFileResult.getCode(), multipartFileResult.getMsg()); |
|
|
|
} |
|
|
@ -2312,7 +2313,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
List<String> files = new ArrayList<>(); |
|
|
|
for (TopicFileResultDTO item : topicAttachment.getData().getDocList()) { |
|
|
|
Result<MultipartFile> multipartFileResult = |
|
|
|
HttpClientManager.getInstance().getFileItem(item.getUrl(), UUID.randomUUID().toString().replace("-", "")); |
|
|
|
HttpClientManager.getInstance().getFileItem(item.getUrl(), "doc." + FilenameUtils.getExtension(item.getUrl())); |
|
|
|
if (!multipartFileResult.success()) { |
|
|
|
throw new RenException(multipartFileResult.getCode(), multipartFileResult.getMsg()); |
|
|
|
} |
|
|
@ -2402,7 +2403,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void platformCallBack(PlatformCallBackFormDTO formDTO) { |
|
|
|
ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.getSubProcessByPlatformId(formDTO.getEventId()); |
|
|
|
ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.getSubProcessByTaskId(formDTO.getEventId()); |
|
|
|
projectSubProcessDTO.setExternalStatus(formDTO.getStatus()); |
|
|
|
projectSubProcessDTO.setResult(formDTO.getNote()); |
|
|
|
projectSubProcessDTO.setHandleDate(DateUtils.stringToDate(formDTO.getHandleDate(), DateUtils.DATE_TIME_PATTERN)); |
|
|
@ -2504,4 +2505,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
return gson.toJson(object); |
|
|
|
} |
|
|
|
|
|
|
|
private String getFileName(String url) { |
|
|
|
return UUID.randomUUID().toString().replace("-", "") + "." + FilenameUtils.getExtension(url); |
|
|
|
} |
|
|
|
|
|
|
|
} |