|
@@ -23,6 +23,7 @@ import org.springblade.archive.entity.ArchiveAiName;
|
|
|
import org.springblade.archive.mapper.ArchiveAiNameMapper;
|
|
|
import org.springblade.archive.service.IArchiveAiNameService;
|
|
|
import org.springblade.archive.vo.ArchiveAiNameVO;
|
|
|
+import org.springblade.archive.vo.ArchiveAiNameVO1;
|
|
|
import org.springblade.common.utils.DeepSeekClient;
|
|
|
import org.springblade.common.vo.DeepSeekResponse;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
@@ -38,6 +39,7 @@ import java.io.IOException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static java.util.stream.Collectors.groupingBy;
|
|
|
|
|
@@ -81,23 +83,23 @@ public class ArchiveAiNameServiceImpl extends BaseServiceImpl<ArchiveAiNameMappe
|
|
|
List<ArchiveAiName> archiveAiNames = entry.getValue();
|
|
|
archiveAiNameVO.setTaskId(entry.getKey());
|
|
|
Date createTime = archiveAiNames.get(0).getCreateTime();
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String formattedDate = sdf.format(createTime);
|
|
|
archiveAiNameVO.setTaskTime(formattedDate);
|
|
|
archiveAiNameVO.setNum(archiveAiNames.size());
|
|
|
- archiveAiNameVO.setStatus(archiveAiNames.stream().allMatch(ai -> ai.getStatus() == 2) ? 2 : 1);
|
|
|
+ archiveAiNameVO.setStatus(archiveAiNames.stream().allMatch(ai -> ai.getStatus() == 2) ? 2 : archiveAiNames.stream().allMatch(ai -> ai.getStatus() == 3)?3:1);
|
|
|
list.add(archiveAiNameVO);
|
|
|
}
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
+
|
|
|
@Transactional
|
|
|
- public boolean confirmAiName(String ids) {
|
|
|
- List<ArchiveAiName> archiveAiNameList = this.listByIds(Func.toLongList(ids));
|
|
|
+ public boolean confirmAiName(List<ArchiveAiNameVO1>vos) {
|
|
|
+ List<ArchiveAiName> archiveAiNameList = this.listByIds(vos.stream().map(o->o.getArchiveAutoId()).collect(Collectors.toList()));
|
|
|
if(!archiveAiNameList.isEmpty()){
|
|
|
- for (ArchiveAiName archiveAiName : archiveAiNameList) {
|
|
|
+ for (ArchiveAiNameVO1 archiveAiName : vos) {
|
|
|
if(archiveAiName.getStatus()==2&& StringUtils.isNotEmpty(archiveAiName.getArchiveNameAi())){
|
|
|
archiveAiName.setStatus(3);
|
|
|
String sql=" update u_archives_auto set name='"+archiveAiName.getArchiveNameAi()+"' where id="+archiveAiName.getArchiveAutoId();
|