Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
36ac0ee985
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.ai.domain;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -10,6 +12,8 @@ import java.util.Date;
|
|||
* @author bonus
|
||||
* @date 2024-12-17
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ModelEvaluateDetails extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public interface DataSetBasicFileMapper {
|
|||
|
||||
public DataSetBasicFileEntity selectDataSetBasicFileByFileName(@Param("parentId") Long parentId,@Param("fileName")String fileName);
|
||||
|
||||
public DataSetBasicFileEntity selectFileName(@Param("parentId") Long parentId,@Param("fileName")String fileName);
|
||||
|
||||
/**
|
||||
* 查询文件基础
|
||||
*
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ public class DataSetBasicFileServiceImpl implements DataSetBasicFileService {
|
|||
DataSetBasicFileEntity basicFile = new DataSetBasicFileEntity();
|
||||
int num = getNumberFromFileName(entity.getFileName());
|
||||
do {
|
||||
basicFile = dataSetBasicFileMapper.selectDataSetBasicFileByFileName(entity.getParentId(), entity.getFileName());
|
||||
basicFile = dataSetBasicFileMapper.selectFileName(entity.getParentId(), entity.getFileName());
|
||||
// 如果存在,则修改文件名并递增 num
|
||||
if (ObjectUtils.isNotEmpty(basicFile)) {
|
||||
num++; // 递增 num
|
||||
|
|
@ -675,7 +675,7 @@ public class DataSetBasicFileServiceImpl implements DataSetBasicFileService {
|
|||
try {
|
||||
fileStream = minioUtil.downloadFile(fileEntity.getFileUrl());
|
||||
String zipEntryName = parentDirectory.isEmpty() ? fileEntity.getFileName() : parentDirectory + File.separator + fileEntity.getFileName();
|
||||
ZipEntry zipEntry = new ZipEntry(parentDirectory);
|
||||
ZipEntry zipEntry = new ZipEntry(zipEntryName);
|
||||
zos.putNextEntry(zipEntry);
|
||||
IOUtils.copy(fileStream, zos);
|
||||
zos.closeEntry();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.bonus.ai.mapper.ModelEvaluateDetailsMapper;
|
|||
import com.bonus.ai.service.ModelEvaluateDetailsService;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -63,6 +64,7 @@ public class ModelEvaluateDetailsServiceImpl implements ModelEvaluateDetailsServ
|
|||
@Override
|
||||
public AjaxResult insertAiModelEvaluateDetails(ModelEvaluateDetails aiModelEvaluateDetails) {
|
||||
try {
|
||||
aiModelEvaluateDetails.setUserId(SecurityUtils.getUserId().toString());
|
||||
int rows = aiModelEvaluateDetailsMapper.insertAiModelEvaluateDetails(aiModelEvaluateDetails);
|
||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ spring:
|
|||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: f648524d-0a7b-449e-8f92-64e05236fd51
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: db93cb6f-e0b3-4f24-a5fc-72f5562f5676
|
||||
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: f648524d-0a7b-449e-8f92-64e05236fd51
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: db93cb6f-e0b3-4f24-a5fc-72f5562f5676
|
||||
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -81,6 +81,14 @@
|
|||
ORDER BY abf.is_directory DESC ,abf.create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectFileName" resultType="com.bonus.ai.domain.DataSetBasicFileEntity" resultMap="DataSetBasicFileResult">
|
||||
<include refid="selectDataSetBasicFileVo"/>
|
||||
where abf.parent_id = #{parentId} AND abf.del_flag ='1'
|
||||
<if test="fileName != null and fileName != ''"> and abf.file_name like concat('%', #{fileName}, '%')</if>
|
||||
ORDER BY abf.is_directory DESC ,abf.create_time DESC
|
||||
</select>
|
||||
|
||||
<insert id="insertDataSetBasicFile" parameterType="com.bonus.ai.domain.DataSetBasicFileEntity" useGeneratedKeys="true" keyProperty="fileId">
|
||||
insert into ai_basic_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -24,49 +24,40 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAiModelEvaluateDetailsVo">
|
||||
select id,
|
||||
evaluate_id,
|
||||
user_id,
|
||||
just_sqmple,
|
||||
lose_sample,
|
||||
tp_num,
|
||||
tn_num,
|
||||
fp_num,
|
||||
fn_num,
|
||||
evalute_time,
|
||||
accuracy_rate,
|
||||
recall_rate,
|
||||
accurate_rate,
|
||||
f_grade,
|
||||
is_active,
|
||||
update_time
|
||||
from ai_model_evaluate_details
|
||||
select amed.id,
|
||||
amed.evaluate_id,
|
||||
su.user_name as user_id,
|
||||
amed.just_sqmple,
|
||||
amed.lose_sample,
|
||||
amed.tp_num,
|
||||
amed.tn_num,
|
||||
amed.fp_num,
|
||||
amed.fn_num,
|
||||
amed.evalute_time,
|
||||
amed.accuracy_rate,
|
||||
amed.recall_rate,
|
||||
amed.accurate_rate,
|
||||
amed.f_grade,
|
||||
amed.is_active,
|
||||
amed.update_time
|
||||
from ai_model_evaluate_details amed
|
||||
LEFT JOIN sys_user su ON amed.user_id = su.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectAiModelEvaluateDetailsList" parameterType="com.bonus.ai.domain.ModelEvaluateDetails"
|
||||
resultMap="AiModelEvaluateDetailsResult">
|
||||
<include refid="selectAiModelEvaluateDetailsVo"/>
|
||||
<where>
|
||||
<if test="evaluateId != null ">and evaluate_id = #{evaluateId}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="justSqmple != null and justSqmple != ''">and just_sqmple = #{justSqmple}</if>
|
||||
<if test="loseSample != null and loseSample != ''">and lose_sample = #{loseSample}</if>
|
||||
<if test="tpNum != null ">and tp_num = #{tpNum}</if>
|
||||
<if test="tnNum != null ">and tn_num = #{tnNum}</if>
|
||||
<if test="fpNum != null ">and fp_num = #{fpNum}</if>
|
||||
<if test="fnNum != null ">and fn_num = #{fnNum}</if>
|
||||
<if test="evaluteTime != null ">and evalute_time = #{evaluteTime}</if>
|
||||
<if test="accuracyRate != null and accuracyRate != ''">and accuracy_rate = #{accuracyRate}</if>
|
||||
<if test="recallRate != null and recallRate != ''">and recall_rate = #{recallRate}</if>
|
||||
<if test="accurateRate != null and accurateRate != ''">and accurate_rate = #{accurateRate}</if>
|
||||
<if test="fGrade != null and fGrade != ''">and f_grade = #{fGrade}</if>
|
||||
<if test="isActive != null and isActive != ''">and is_active = #{isActive}</if>
|
||||
amed.is_active ='0'
|
||||
<if test="evaluateId != null ">and amed.evaluate_id = #{evaluateId}</if>
|
||||
<if test="userId != null and userId != ''">and su.user_name like concat('%', #{userId},
|
||||
'%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAiModelEvaluateDetailsById" parameterType="Long" resultMap="AiModelEvaluateDetailsResult">
|
||||
<include refid="selectAiModelEvaluateDetailsVo"/>
|
||||
where id = #{id}
|
||||
where amed.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAiModelEvaluateDetails" parameterType="com.bonus.ai.domain.ModelEvaluateDetails">
|
||||
|
|
@ -138,7 +129,7 @@
|
|||
</delete>
|
||||
|
||||
<delete id="deleteAiModelEvaluateDetailsByIds" parameterType="String">
|
||||
delete from ai_model_evaluate_details where id in
|
||||
update ai_model_evaluate_details set is_active ='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -24,51 +24,52 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAiModelEvaluateVo">
|
||||
select id,
|
||||
create_by,
|
||||
evaluate_name,
|
||||
evaluate_version,
|
||||
sample_all,
|
||||
process_speed,
|
||||
memory_usage,
|
||||
enviro_conditions,
|
||||
accuracy_rate,
|
||||
recall_rate,
|
||||
accurate_rate,
|
||||
f_grade,
|
||||
remart,
|
||||
create_time,
|
||||
is_active,
|
||||
update_time
|
||||
from ai_model_evaluate
|
||||
select ame.id,
|
||||
su.user_name AS create_by,
|
||||
ame.evaluate_name,
|
||||
ame.evaluate_version,
|
||||
ame.sample_all,
|
||||
ame.process_speed,
|
||||
ame.memory_usage,
|
||||
ame.enviro_conditions,
|
||||
ame.accuracy_rate,
|
||||
ame.recall_rate,
|
||||
ame.accurate_rate,
|
||||
ame.f_grade,
|
||||
ame.remart,
|
||||
ame.create_time,
|
||||
ame.is_active,
|
||||
ame.update_time
|
||||
from ai_model_evaluate ame
|
||||
LEFT JOIN sys_user su ON ame.create_by = su.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectAiModelEvaluateList" parameterType="com.bonus.ai.domain.ModelEvaluate"
|
||||
resultMap="AiModelEvaluateResult">
|
||||
<include refid="selectAiModelEvaluateVo"/>
|
||||
<where>
|
||||
<if test="evaluateName != null and evaluateName != ''">and evaluate_name like concat('%', #{evaluateName},
|
||||
<if test="evaluateName != null and evaluateName != ''">and ame.evaluate_name like concat('%', #{evaluateName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="evaluateVersion != null and evaluateVersion != ''">and evaluate_version = #{evaluateVersion}</if>
|
||||
<if test="sampleAll != null ">and sample_all = #{sampleAll}</if>
|
||||
<if test="processSpeed != null and processSpeed != ''">and process_speed = #{processSpeed}</if>
|
||||
<if test="memoryUsage != null and memoryUsage != ''">and memory_usage = #{memoryUsage}</if>
|
||||
<if test="enviroConditions != null and enviroConditions != ''">and enviro_conditions =
|
||||
<if test="evaluateVersion != null and evaluateVersion != ''">and ame.evaluate_version = #{evaluateVersion}</if>
|
||||
<if test="sampleAll != null ">and ame.sample_all = #{sampleAll}</if>
|
||||
<if test="processSpeed != null and processSpeed != ''">and ame.process_speed = #{processSpeed}</if>
|
||||
<if test="memoryUsage != null and memoryUsage != ''">and ame.memory_usage = #{memoryUsage}</if>
|
||||
<if test="enviroConditions != null and enviroConditions != ''">and ame.enviro_conditions =
|
||||
#{enviroConditions}
|
||||
</if>
|
||||
<if test="accuracyRate != null and accuracyRate != ''">and accuracy_rate = #{accuracyRate}</if>
|
||||
<if test="recallRate != null and recallRate != ''">and recall_rate = #{recallRate}</if>
|
||||
<if test="accurateRate != null and accurateRate != ''">and accurate_rate = #{accurateRate}</if>
|
||||
<if test="fGrade != null and fGrade != ''">and f_grade = #{fGrade}</if>
|
||||
<if test="remart != null and remart != ''">and remart = #{remart}</if>
|
||||
<if test="isActive != null and isActive != ''">and is_active = #{isActive}</if>
|
||||
<if test="accuracyRate != null and accuracyRate != ''">and ame.accuracy_rate = #{accuracyRate}</if>
|
||||
<if test="recallRate != null and recallRate != ''">and ame.recall_rate = #{recallRate}</if>
|
||||
<if test="accurateRate != null and accurateRate != ''">and ame.accurate_rate = #{accurateRate}</if>
|
||||
<if test="fGrade != null and fGrade != ''">and ame.f_grade = #{fGrade}</if>
|
||||
<if test="remart != null and remart != ''">and ame.remart = #{remart}</if>
|
||||
<if test="isActive != null and isActive != ''">and ame.is_active = #{isActive}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAiModelEvaluateById" parameterType="Long" resultMap="AiModelEvaluateResult">
|
||||
<include refid="selectAiModelEvaluateVo"/>
|
||||
where id = #{id}
|
||||
where ame.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAiModelEvaluate" parameterType="com.bonus.ai.domain.ModelEvaluate">
|
||||
|
|
|
|||
Loading…
Reference in New Issue