|
|
@ -6,6 +6,7 @@ import com.github.yulichang.toolkit.JoinWrappers;
|
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
import io.seata.spring.annotation.GlobalTransactional;
|
|
|
|
import io.seata.spring.annotation.GlobalTransactional;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
|
import org.dromara.common.core.constant.DmsConstants;
|
|
|
|
import org.dromara.common.core.constant.DmsConstants;
|
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
@ -31,6 +32,8 @@ import org.dromara.dms.mapper.DmsInstanceFileMapper;
|
|
|
|
import org.dromara.dms.service.IDmsBillsFaultInstanceService;
|
|
|
|
import org.dromara.dms.service.IDmsBillsFaultInstanceService;
|
|
|
|
import org.dromara.dms.service.IDmsFaultInstanceActivityService;
|
|
|
|
import org.dromara.dms.service.IDmsFaultInstanceActivityService;
|
|
|
|
import org.dromara.dms.service.IDmsInstanceFileService;
|
|
|
|
import org.dromara.dms.service.IDmsInstanceFileService;
|
|
|
|
|
|
|
|
import org.dromara.resource.api.RemoteFileService;
|
|
|
|
|
|
|
|
import org.dromara.resource.api.domain.RemoteFile;
|
|
|
|
import org.dromara.workflow.api.RemoteWorkflowService;
|
|
|
|
import org.dromara.workflow.api.RemoteWorkflowService;
|
|
|
|
import org.dromara.workflow.api.domain.RemoteCompleteTask;
|
|
|
|
import org.dromara.workflow.api.domain.RemoteCompleteTask;
|
|
|
|
import org.dromara.workflow.api.domain.RemoteStartProcess;
|
|
|
|
import org.dromara.workflow.api.domain.RemoteStartProcess;
|
|
|
@ -52,6 +55,7 @@ import java.util.concurrent.CompletableFuture;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceService {
|
|
|
|
public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceService {
|
|
|
|
|
|
|
|
|
|
|
|
private final DmsBillsFaultInstanceMapper baseMapper;
|
|
|
|
private final DmsBillsFaultInstanceMapper baseMapper;
|
|
|
@ -68,7 +72,8 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
|
|
|
|
|
|
|
|
|
|
|
|
private final IDmsFaultInstanceActivityService dmsFaultInstanceActivityService;
|
|
|
|
private final IDmsFaultInstanceActivityService dmsFaultInstanceActivityService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@DubboReference(timeout = 15000, retries = 1)
|
|
|
|
|
|
|
|
private final RemoteFileService remoteFileService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询故障报修工单
|
|
|
|
* 查询故障报修工单
|
|
|
@ -375,8 +380,8 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
|
|
|
|
for (DmsInstanceFileVo dmsInstanceFile : dmsInstanceFiles){
|
|
|
|
for (DmsInstanceFileVo dmsInstanceFile : dmsInstanceFiles){
|
|
|
|
// 获取文件路径
|
|
|
|
// 获取文件路径
|
|
|
|
String filePath = dmsInstanceFile.getFilePath();
|
|
|
|
String filePath = dmsInstanceFile.getFilePath();
|
|
|
|
// 如果文件路径不包含"7309"
|
|
|
|
// 如果文件路径不包含"9005"
|
|
|
|
if(!filePath.contains("7309")){
|
|
|
|
if(!filePath.contains("9005")){
|
|
|
|
// 如果文件路径包含"https",将其替换为"http"
|
|
|
|
// 如果文件路径包含"https",将其替换为"http"
|
|
|
|
if(filePath.contains("https")){
|
|
|
|
if(filePath.contains("https")){
|
|
|
|
filePath.replaceFirst("https","http");
|
|
|
|
filePath.replaceFirst("https","http");
|
|
|
@ -384,12 +389,11 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
|
|
|
|
// 找到"/statics"的索引位置
|
|
|
|
// 找到"/statics"的索引位置
|
|
|
|
int index= filePath.indexOf("/statics");
|
|
|
|
int index= filePath.indexOf("/statics");
|
|
|
|
// 修改文件路径为新的地址
|
|
|
|
// 修改文件路径为新的地址
|
|
|
|
filePath = "http://172.16.12.100:7309"+filePath.substring(index);
|
|
|
|
filePath = "http://118.25.106.99:9005"+filePath.substring(index);
|
|
|
|
// 设置新的URL和文件路径
|
|
|
|
// 设置新的URL和文件路径
|
|
|
|
dmsInstanceFile.setFilePath(filePath);
|
|
|
|
dmsInstanceFile.setFilePath(filePath);
|
|
|
|
dmsInstanceFile.setFilePath(filePath);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
// 如果文件路径包含"7309",直接设置URL为文件路径
|
|
|
|
// 如果文件路径包含"9005",直接设置URL为文件路径
|
|
|
|
dmsInstanceFile.setFilePath(dmsInstanceFile.getFilePath());
|
|
|
|
dmsInstanceFile.setFilePath(dmsInstanceFile.getFilePath());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -402,6 +406,7 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void batchInsertInstanceFiles(List<String> fileUrls, Long instanceActivityId) {
|
|
|
|
public void batchInsertInstanceFiles(List<String> fileUrls, Long instanceActivityId) {
|
|
|
|
// 判断文件URL列表是否不为空且非空
|
|
|
|
// 判断文件URL列表是否不为空且非空
|
|
|
|
if (fileUrls != null && !fileUrls.isEmpty()) {
|
|
|
|
if (fileUrls != null && !fileUrls.isEmpty()) {
|
|
|
|