fix:1.补路径分隔符 2.SQL语句分号

This commit is contained in:
nieziyan 2023-11-03 19:34:56 +08:00
parent 45811d00e0
commit dfb536fbbb
2 changed files with 7 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.system.mapper.GardsSampleDataMapper"> <mapper namespace="org.jeecg.modules.system.mapper.GardsSampleDataMapper">
<delete id="delTables"> <delete id="delTables">
<foreach collection = "tableNames" item = "tableName" index = "index"> <foreach collection = "tableNames" item = "tableName" index = "index">
DELETE FROM ${tableName} WHERE SAMPLE_ID = #{sampleId} DELETE FROM ${tableName} WHERE SAMPLE_ID = #{sampleId};
</foreach> </foreach>
</delete> </delete>

View File

@ -91,8 +91,8 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
public Result<?> deleteById(Integer sampleId, boolean sampleData, public Result<?> deleteById(Integer sampleId, boolean sampleData,
boolean rnAuto, boolean rnMan) { boolean rnAuto, boolean rnMan) {
String ftpRootPath = ftpUtil.getFtpRootPath(); String ftpRootPath = ftpUtil.getFtpRootPath();
String savePath = ftpRootPath + pathProperties.getSaveFilePath(); String savePath = ftpRootPath + pathProperties.getSaveFilePath() + StrUtil.SLASH;
String logPath = ftpRootPath + pathProperties.getLogPath(); String logPath = ftpRootPath + pathProperties.getLogPath() + StrUtil.SLASH;
/* 删除数据库数据 */ /* 删除数据库数据 */
// 过滤掉多余的表 // 过滤掉多余的表
String ORIGINAL = "ORIGINAL";String RNAUTO = "RNAUTO";String RNMAN = "RNMAN"; String ORIGINAL = "ORIGINAL";String RNAUTO = "RNAUTO";String RNMAN = "RNMAN";
@ -169,8 +169,7 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
.orElse(new GardsSampleDataSystem()); .orElse(new GardsSampleDataSystem());
} }
private String samplePath(String savePath, private String samplePath(String savePath, Integer sampleId){
Integer sampleId){
GardsSampleDataSystem sampleData = getOne(sampleId); GardsSampleDataSystem sampleData = getOne(sampleId);
String inputFileName = sampleData.getInputFileName(); String inputFileName = sampleData.getInputFileName();
if (StrUtil.isBlank(inputFileName)) if (StrUtil.isBlank(inputFileName))
@ -178,10 +177,8 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
return savePath + inputFileName; return savePath + inputFileName;
} }
private List<String> manOrAutoPath(String savePath, private List<String> manOrAutoPath(String savePath, String logPath,
String logPath, Integer sampleId, String owner){
Integer sampleId,
String owner){
List<String> fileList = new ArrayList<>(); List<String> fileList = new ArrayList<>();
GardsAnalyses analysisMan = baseMapper.getAnalysis(sampleId, owner); GardsAnalyses analysisMan = baseMapper.getAnalysis(sampleId, owner);
if (ObjectUtil.isNull(analysisMan)) if (ObjectUtil.isNull(analysisMan))