8 changed files with 212 additions and 22 deletions
@ -0,0 +1,30 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 评价指标字典表数据--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class IndexDictResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 指标名 |
|||
*/ |
|||
private String indexName; |
|||
/** |
|||
* 指标code |
|||
*/ |
|||
private String indexCode; |
|||
/** |
|||
* 指标值类型 百分比:percent |
|||
*/ |
|||
private String valueType; |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 评价指标字典 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface IndexDictDao { |
|||
|
|||
/** |
|||
* @param |
|||
* @Description 查询指标字典表是百分比类型的数据 |
|||
* @author sun |
|||
*/ |
|||
List<IndexDictResultDTO> selectList(); |
|||
|
|||
/** |
|||
* @param |
|||
* @Description 根据indexCode查询指标字典表具体数据 |
|||
* @author sun |
|||
*/ |
|||
IndexDictResultDTO selectIndexDict(@Param("indexCode") String indexCode); |
|||
} |
@ -0,0 +1,31 @@ |
|||
<?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.epmet.datareport.dao.fact.IndexDictDao"> |
|||
|
|||
<select id="selectList" resultType="com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO"> |
|||
SELECT |
|||
index_name AS "indexName", |
|||
index_code AS "indexCode", |
|||
value_type AS "valueType" |
|||
FROM |
|||
index_dict |
|||
WHERE |
|||
del_flag = '0' |
|||
AND value_type != 'none' |
|||
</select> |
|||
|
|||
<select id="selectIndexDict" resultType="com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO"> |
|||
SELECT |
|||
index_name AS "indexName", |
|||
index_code AS "indexCode", |
|||
value_type AS "valueType" |
|||
FROM |
|||
index_dict |
|||
WHERE |
|||
del_flag = '0' |
|||
AND index_code = #{indexCode} |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue