|
@@ -3,6 +3,7 @@ package org.jeecg.modules.prowork.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.jeecg.common.dto.prowork.ProWorkMilestoneAddReqDTO;
|
|
|
import org.jeecg.common.dto.prowork.ProWorkMilestoneRespDTO;
|
|
@@ -101,6 +102,7 @@ public class ProWorkMilestoneServiceImpl extends ServiceImpl<ProWorkMilestoneMap
|
|
|
queryWrapper.eq("work_mile_id", id);
|
|
|
queryWrapper.lambda().eq(ProWorkUpdateFile::getDelFlag,"0");
|
|
|
List<ProWorkUpdateFile> list = proWorkUpdateFileService.list(queryWrapper);
|
|
|
+ list.sort((x, y)-> Integer.compare(x.getSort(), y.getSort()));
|
|
|
List<ProWorkUpdateFileRespDTO> fileList = Lists.newArrayList();
|
|
|
for(ProWorkUpdateFile updateFile : list){
|
|
|
ProWorkUpdateFileRespDTO respDTO = new ProWorkUpdateFileRespDTO(updateFile);
|
|
@@ -130,7 +132,9 @@ public class ProWorkMilestoneServiceImpl extends ServiceImpl<ProWorkMilestoneMap
|
|
|
|
|
|
String[] filePath = fileAddReqDTO.getFileUrl().split("/");
|
|
|
int index = filePath.length;
|
|
|
- String fileName = StringUtils.substringBefore(filePath[index - 1], ".");
|
|
|
+ String fileNameAfter = StringUtils.substringAfter(filePath[index - 1], ".");
|
|
|
+ String fileNameBefore = StringUtils.substringBefore(filePath[index - 1], "_");
|
|
|
+ String fileName = fileNameBefore + "." + fileNameAfter;
|
|
|
proWorkUpdateFile.setFileName(fileName);
|
|
|
proWorkUpdateFile.setWorkMileId(id);
|
|
|
list.add(proWorkUpdateFile);
|