| | |
| | | <?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"> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbBasicDataConfigMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TbBasicDataConfig"> |
| | | <id column="id" property="id"/> |
| | | <result column="basic_data_category_id" property="basicDataCategoryId"/> |
| | | <result column="type_name" property="typeName"/> |
| | | <result column="field_description" property="fieldDescription"/> |
| | | <result column="calculate_type" property="calculateType"/> |
| | | <result column="number_calculate_formula" property="numberCalculateFormula"/> |
| | | <result column="field_id_str" property="fieldIdStr"/> |
| | | <result column="status" property="status"/> |
| | | <result column="del_flag" property="delFlag"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TbBasicDataConfig"> |
| | | <id column="id" property="id"/> |
| | | <result column="basic_data_category_id" property="basicDataCategoryId"/> |
| | | <result column="type_name" property="typeName"/> |
| | | <result column="field_description" property="fieldDescription"/> |
| | | <result column="calculate_type" property="calculateType"/> |
| | | <result column="number_calculate_formula" property="numberCalculateFormula"/> |
| | | <result column="field_id_str" property="fieldIdStr"/> |
| | | <result column="status" property="status"/> |
| | | <result column="del_flag" property="delFlag"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, basic_data_category_id, type_name, field_description, calculate_type, number_calculate_formula, field_id_str, status, del_flag, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | <select id="scoreCalculatePage" resultType="com.ruoyi.system.vo.ScoreCalculateVO"> |
| | | SELECT tdc.id, |
| | | tdc.type_name, |
| | | tdc.calculate_type |
| | | FROM tb_score ts |
| | | LEFT JOIN tb_basic_data tbd ON ts.basic_data_id = tbd.id |
| | | LEFT JOIN tb_basic_data_config tdc ON ts.basic_data_config_id = tdc.id |
| | | <where> |
| | | tbd.`quarter` = #{query.quarter} |
| | | <if test="query.typeName !=null and query.typeName != ''"> |
| | | AND tdc.type_name LIKE CONCAT('%',#{query.typeName},'%') |
| | | </if> |
| | | <if test="query.type !=null"> |
| | | AND tdc.calculate_type LIKE CONCAT('%',#{query.type},'%') |
| | | </if> |
| | | </where> |
| | | GROUP BY tdc.type_name |
| | | </select> |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, basic_data_category_id, type_name, field_description, calculate_type, number_calculate_formula, field_id_str, status, del_flag, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | <select id="scoreCalculatePage" resultType="com.ruoyi.system.vo.ScoreCalculateVO"> |
| | | SELECT tdc.id, |
| | | tdc.type_name, |
| | | tdc.calculate_type |
| | | FROM tb_score ts |
| | | LEFT JOIN tb_basic_data tbd ON ts.basic_data_id = tbd.id |
| | | LEFT JOIN tb_basic_data_config tdc ON ts.basic_data_config_id = tdc.id |
| | | <where> |
| | | tbd.`quarter` = #{query.quarter} |
| | | <if test="query.typeName !=null and query.typeName != ''"> |
| | | AND tdc.type_name LIKE CONCAT('%',#{query.typeName},'%') |
| | | </if> |
| | | <if test="query.type !=null"> |
| | | AND tdc.calculate_type LIKE CONCAT('%',#{query.type},'%') |
| | | </if> |
| | | </where> |
| | | GROUP BY tdc.type_name |
| | | </select> |
| | | <select id="queryPage" resultType="com.ruoyi.system.vo.BasicDataConfigVO"> |
| | | SELECT tbdc.id,tbdc.type_name,tbdc.calculate_type,tbdc.status,tbdc2.basic_data_category_name AS |
| | | basicDataCategory |
| | | FROM tb_basic_data_config tbdc |
| | | LEFT JOIN tb_basic_data_category tbdc2 ON tbdc.basic_data_category_id = tbdc2.id |
| | | <where> |
| | | <if test="query.basicDataConfigName != null and query.basicDataConfigName !=''"> |
| | | AND bdc.type_name LIKE CONCAT('%',#{query.basicDataConfigName},'%') |
| | | </if> |
| | | <if test="query.status !=null"> |
| | | AND bdc.status = #{query.status} |
| | | </if> |
| | | <if test="query.calculateType !=null"> |
| | | AND bdc.calculate_type = #{query.calculateType} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |