文件下载 + 流程的历史版本问
This commit is contained in:
+16
@@ -245,6 +245,16 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
|||||||
SarBussionessStand result = sarBussionessStandEOService.selectStandardsInfoUpdateByKey(id);
|
SarBussionessStand result = sarBussionessStandEOService.selectStandardsInfoUpdateByKey(id);
|
||||||
String collectId = personCollectEOService.queryCollectByUserAndId(id);
|
String collectId = personCollectEOService.queryCollectByUserAndId(id);
|
||||||
result.setCollectId(collectId);
|
result.setCollectId(collectId);
|
||||||
|
Object fbgbuss = result.getAttrInfoMap().get("FBGBUSS");
|
||||||
|
Object fbgbussName = result.getAttrInfoMap().get("FBGBUSSName");
|
||||||
|
if(fbgbuss != null ){
|
||||||
|
result.getAttrInfoMap().put("LSBBBUSS",fbgbuss.toString());
|
||||||
|
result.getAttrInfoMap().put("FBGBUSS",null);
|
||||||
|
}
|
||||||
|
if(fbgbussName != null ){
|
||||||
|
result.getAttrInfoMap().put("LSBBBUSSName",fbgbussName.toString());
|
||||||
|
result.getAttrInfoMap().put("FBGBUSSName",null);
|
||||||
|
}
|
||||||
return Result.success(result);
|
return Result.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,5 +431,11 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
|||||||
public ResponseMessage emptyFileAnewStorage (){
|
public ResponseMessage emptyFileAnewStorage (){
|
||||||
return sarBussionessStandEOService.emptyFileAnewStorage();
|
return sarBussionessStandEOService.emptyFileAnewStorage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "|SarBussionessStand|远程文件下载")
|
||||||
|
@GetMapping("/downloadFile")
|
||||||
|
public ResponseMessage downloadFile (){
|
||||||
|
return sarBussionessStandEOService.downloadFile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -59,5 +59,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
|||||||
ResponseMessage emptyFileAnewStorage();
|
ResponseMessage emptyFileAnewStorage();
|
||||||
|
|
||||||
ResponseMessage<SarBussionessStand> importSarBussionessStandFile(MultipartFile file);
|
ResponseMessage<SarBussionessStand> importSarBussionessStandFile(MultipartFile file);
|
||||||
|
|
||||||
|
ResponseMessage downloadFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+40
@@ -105,6 +105,9 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
import java.sql.Clob;
|
import java.sql.Clob;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@@ -2923,6 +2926,43 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
// }
|
// }
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public ResponseMessage downloadFile() {
|
||||||
|
//查询
|
||||||
|
//List<OldSystem> oldSystems = sarStandardsInfoDao.selectOldSystemFile();
|
||||||
|
//for (OldSystem src : oldSystems){
|
||||||
|
String i = saveFile("");
|
||||||
|
if(i.equals("-1")){
|
||||||
|
return Result.error();
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String saveFile(String src) {
|
||||||
|
//主服务 G:\kmpro_futian\htdocs\UploadFile
|
||||||
|
// 测试服务 E:\kmpro_futian\htdocs\UploadFile
|
||||||
|
// 本地服务
|
||||||
|
String filePath = "https:10.0.3.21/E://srcul";
|
||||||
|
//String filePath = "https:10.0.11.1//E://kmpro_futian/htdocs/";
|
||||||
|
src = "全球标准法规系统需求(1)(1).docx";
|
||||||
|
try {
|
||||||
|
URL url = new URL(filePath);
|
||||||
|
File file = new File(filePath,src);
|
||||||
|
try {
|
||||||
|
FileUtils.copyURLToFile(url,file);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.info("文件下载错误");
|
||||||
|
return "-1";
|
||||||
|
}
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.info("文件下载错误");
|
||||||
|
return "-1";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -105,4 +105,6 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
|||||||
List<OldSystem> selectListInfo();
|
List<OldSystem> selectListInfo();
|
||||||
|
|
||||||
List<OldSystem> OldSystemFile(@Param("loreDocId") String loreDocId);
|
List<OldSystem> OldSystemFile(@Param("loreDocId") String loreDocId);
|
||||||
|
|
||||||
|
List<OldSystem> selectOldSystemFile();
|
||||||
}
|
}
|
||||||
|
|||||||
+7
@@ -1921,4 +1921,11 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOldSystemFile" resultType="com.adc.da.slrs.sarBussionessStand.entity.OldSystem">
|
||||||
|
SELECT
|
||||||
|
lo.Src as 'fileSrc'
|
||||||
|
from lore_attache lo
|
||||||
|
where 1=1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user