1. 指标子集映射
This commit is contained in:
parent
ba1a3bcae4
commit
e7974f15cb
10
.idea/inspectionProfiles/Project_Default.xml
Normal file
10
.idea/inspectionProfiles/Project_Default.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<Languages>
|
||||||
|
<language minSize="65" name="Java" />
|
||||||
|
</Languages>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hshh.evaluation.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/evaluation/evaluationCsvData")
|
||||||
|
public class EvaluationCsvDataController {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hshh.evaluation.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估记录表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/evaluation/evaluationHistory")
|
||||||
|
public class EvaluationHistoryController {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hshh.evaluation.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估结果表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/evaluation/evaluationResult")
|
||||||
|
public class EvaluationResultController {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hshh.evaluation.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/evaluation/evaluationTemplateIndicatorWeight")
|
||||||
|
public class EvaluationTemplateIndicatorWeightController {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.hshh.evaluation.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* csv数据.
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@TableName("m_data_evaluation_csv_data")
|
||||||
|
@Data
|
||||||
|
public class EvaluationCsvData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer projectId;
|
||||||
|
|
||||||
|
|
||||||
|
private String randomKey;
|
||||||
|
|
||||||
|
|
||||||
|
private String rawData;
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.hshh.evaluation.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估记录表.
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@TableName("m_data_evaluation_history")
|
||||||
|
@Data
|
||||||
|
public class EvaluationHistory implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer projectId;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
private String randomKey;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.hshh.evaluation.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估结果表.
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@TableName("m_data_evaluation_result")
|
||||||
|
@Data
|
||||||
|
public class EvaluationResult implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer historyId;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer projectId;
|
||||||
|
|
||||||
|
|
||||||
|
private String rawData;
|
||||||
|
|
||||||
|
|
||||||
|
private String resultData;
|
||||||
|
|
||||||
|
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private String randomKey;
|
||||||
|
/**
|
||||||
|
* 得分.
|
||||||
|
*/
|
||||||
|
private Double finalScore;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.hshh.evaluation.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板指标权重表.
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@TableName("m_data_evaluation_template_indicator_weight")
|
||||||
|
@Data
|
||||||
|
public class EvaluationTemplateIndicatorWeight implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer templateId;
|
||||||
|
|
||||||
|
private Integer indicatorTopId;
|
||||||
|
|
||||||
|
private Integer indicatorId;
|
||||||
|
|
||||||
|
private Double weight;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hshh.evaluation.mapper;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationCsvData;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationCsvDataMapper extends BaseMapper<EvaluationCsvData> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hshh.evaluation.mapper;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationHistory;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估记录表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationHistoryMapper extends BaseMapper<EvaluationHistory> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hshh.evaluation.mapper;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationResult;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估结果表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationResultMapper extends BaseMapper<EvaluationResult> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hshh.evaluation.mapper;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationTemplateIndicatorWeight;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationTemplateIndicatorWeightMapper extends BaseMapper<EvaluationTemplateIndicatorWeight> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.hshh.evaluation.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.hshh.evaluation.entity.EvaluationHistory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估记录表 服务类.
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationHistoryService extends IService<EvaluationHistory> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hshh.evaluation.service;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationResult;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估结果表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationResultService extends IService<EvaluationResult> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.hshh.evaluation.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.hshh.evaluation.entity.EvaluationTemplateIndicatorWeight;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标权重服务类.
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface EvaluationTemplateIndicatorWeightService extends
|
||||||
|
IService<EvaluationTemplateIndicatorWeight> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指标对应的权重.
|
||||||
|
*
|
||||||
|
* @param indicatorTopId 指标ID
|
||||||
|
* @param templateId 模板 ID
|
||||||
|
* @return 权重信息
|
||||||
|
*/
|
||||||
|
public Map<Integer, Double> getEvaluationTemplateIndicatorWeightMap(Integer indicatorTopId,
|
||||||
|
Integer templateId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.hshh.evaluation.service;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationCsvData;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
public interface IEvaluationCsvDataService extends IService<EvaluationCsvData> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.hshh.evaluation.service.impl;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationCsvData;
|
||||||
|
import com.hshh.evaluation.mapper.EvaluationCsvDataMapper;
|
||||||
|
import com.hshh.evaluation.service.IEvaluationCsvDataService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EvaluationCsvDataServiceImpl extends ServiceImpl<EvaluationCsvDataMapper, EvaluationCsvData> implements IEvaluationCsvDataService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.hshh.evaluation.service.impl;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationHistory;
|
||||||
|
import com.hshh.evaluation.mapper.EvaluationHistoryMapper;
|
||||||
|
import com.hshh.evaluation.service.EvaluationHistoryService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估记录表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EvaluationHistoryServiceImpl extends ServiceImpl<EvaluationHistoryMapper, EvaluationHistory> implements
|
||||||
|
EvaluationHistoryService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.hshh.evaluation.service.impl;
|
||||||
|
|
||||||
|
import com.hshh.evaluation.entity.EvaluationResult;
|
||||||
|
import com.hshh.evaluation.mapper.EvaluationResultMapper;
|
||||||
|
import com.hshh.evaluation.service.EvaluationResultService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 评估结果表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EvaluationResultServiceImpl extends ServiceImpl<EvaluationResultMapper, EvaluationResult> implements
|
||||||
|
EvaluationResultService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.hshh.evaluation.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.hshh.evaluation.entity.EvaluationTemplateIndicatorWeight;
|
||||||
|
import com.hshh.evaluation.mapper.EvaluationTemplateIndicatorWeightMapper;
|
||||||
|
import com.hshh.evaluation.service.EvaluationTemplateIndicatorWeightService;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author liDongYu
|
||||||
|
* @since 2025-08-21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EvaluationTemplateIndicatorWeightServiceImpl extends
|
||||||
|
ServiceImpl<EvaluationTemplateIndicatorWeightMapper, EvaluationTemplateIndicatorWeight> implements
|
||||||
|
EvaluationTemplateIndicatorWeightService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<Integer, Double> getEvaluationTemplateIndicatorWeightMap(Integer indicatorTopId,
|
||||||
|
Integer templateId) {
|
||||||
|
QueryWrapper<EvaluationTemplateIndicatorWeight> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("indicator_top_id", indicatorTopId);
|
||||||
|
wrapper.eq("template_id", templateId);
|
||||||
|
List<EvaluationTemplateIndicatorWeight> list = this.list(wrapper);
|
||||||
|
if (list != null && !list.isEmpty()) {
|
||||||
|
return list.stream().collect(
|
||||||
|
Collectors.toMap(EvaluationTemplateIndicatorWeight::getIndicatorId,
|
||||||
|
EvaluationTemplateIndicatorWeight::getWeight));
|
||||||
|
}
|
||||||
|
return Map.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hshh.evaluation.mapper.EvaluationCsvDataMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hshh.evaluation.mapper.EvaluationHistoryMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hshh.evaluation.mapper.EvaluationResultMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hshh.evaluation.mapper.EvaluationTemplateIndicatorWeightMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user