|
|
@@ -190,8 +190,10 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
ZipOutputStream zip = new ZipOutputStream(outputStream);
|
|
|
downloadFileName="项目打卡数据_"+DateUtils.dateTimeNow()+".zip";
|
|
|
String[] idList = ids.split(",");
|
|
|
+ Integer logx=0;
|
|
|
for (String id : idList) {
|
|
|
ProjectStaffRecord psr = projectStaffRecordMapper.selectByPrimaryKey(Long.valueOf(id));
|
|
|
+ //防止重名码
|
|
|
if (psr != null) {
|
|
|
ProjectTask projectTask = projectTaskMapper.selectByPrimaryKey(psr.getPid());
|
|
|
String annexUrl = psr.getAnnexUrl();
|
|
|
@@ -202,6 +204,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
for (String s : split) {
|
|
|
if (StringUtils.isNotEmpty(s)){
|
|
|
index++;
|
|
|
+ logx++;
|
|
|
String url=s.replace("/profile/upload","");
|
|
|
url=RuoYiConfig.getUploadPath()+url;
|
|
|
System.out.println(url);
|
|
|
@@ -209,7 +212,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
if (file.exists()){
|
|
|
try {
|
|
|
String suffix = s.substring(s.indexOf("."), s.length());
|
|
|
- String fileName=projectTask.getName()+"_"+psr.getName()+"_"+recordTimes+"_"+index+suffix;
|
|
|
+ String fileName=projectTask.getName()+"_"+psr.getName()+"_"+recordTimes+logx+"_"+index+suffix;
|
|
|
ZipEntry e = new ZipEntry(fileName);
|
|
|
zip.putNextEntry(e);
|
|
|
IOUtils.write(FileUtils.getBytes(file),zip);
|