|
|
|
@ -19,6 +19,9 @@ import com.hw.dms.domain.vo.DmsBillsFaultInstanceScanVo;
|
|
|
|
|
import com.hw.dms.mapper.DmsFaultInstanceActivityMapper;
|
|
|
|
|
import com.hw.dms.mapper.DmsInstanceFileMapper;
|
|
|
|
|
import com.hw.system.api.domain.SysFile;
|
|
|
|
|
import com.hw.system.api.factory.RemoteFileFallbackFactory;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -36,6 +39,8 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceService {
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(DmsBillsFaultInstanceServiceImpl.class);
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private DmsBillsFaultInstanceMapper dmsBillsFaultInstanceMapper;
|
|
|
|
|
@Autowired
|
|
|
|
@ -62,12 +67,15 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
|
|
|
|
|
|
|
|
|
|
for (DmsInstanceFile dmsInstanceFile : dmsInstanceFiles){
|
|
|
|
|
String filePath = dmsInstanceFile.getFilePath();
|
|
|
|
|
log.info("filePath1:"+filePath);
|
|
|
|
|
if(!filePath.contains("7309")){
|
|
|
|
|
if(filePath.contains("https")){
|
|
|
|
|
filePath.replaceFirst("https","http");
|
|
|
|
|
}
|
|
|
|
|
int index= filePath.indexOf("/statics");
|
|
|
|
|
filePath = "http://172.16.12.100:7309"+filePath.substring(index);
|
|
|
|
|
log.info("filePath2:"+filePath);
|
|
|
|
|
dmsInstanceFile.setUrl(filePath);
|
|
|
|
|
}else{
|
|
|
|
|
dmsInstanceFile.setUrl(dmsInstanceFile.getFilePath());
|
|
|
|
|
}
|
|
|
|
@ -480,4 +488,16 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
String filePath = "https://172.16.12.100/statics/2024/12/05/output_imgage20241205_215325_20241205215439A002.jpg";
|
|
|
|
|
if(!filePath.contains("7309")){
|
|
|
|
|
if(filePath.contains("https")){
|
|
|
|
|
filePath.replaceFirst("https","http");
|
|
|
|
|
}
|
|
|
|
|
int index= filePath.indexOf("/statics");
|
|
|
|
|
filePath = "http://172.16.12.100:7309"+filePath.substring(index);
|
|
|
|
|
}
|
|
|
|
|
System.out.println(filePath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|