| | |
| | | <select id="getFieldAndScoreData" resultType="com.finance.system.vo.FieldAndScoreDataVO"> |
| | | SELECT tbdc.id, |
| | | tbdc.type_name, |
| | | ts.score, |
| | | ROUND(ts.score,1) AS score, |
| | | tbdc.max_score, |
| | | tbd.dept_area_code, |
| | | tbdc.basic_data_category_id AS basicDataCategoryId, |
| | |
| | | LEFT JOIN tb_basic_data_config tbdc ON ts.basic_data_config_id = tbdc.id |
| | | LEFT JOIN tb_basic_data_category tbdc2 ON tbdc2.id = tbdc.basic_data_category_id |
| | | LEFT JOIN tb_basic_data_category tbdc3 ON tbdc2.parent_id = tbdc3.id |
| | | LEFT JOIN sys_user su ON tbd.dept_area_code = su.area_code |
| | | <where> |
| | | tbd.`quarter` = #{nowQuarter} |
| | | <if test="areaCode!=null and areaCode != ''"> |
| | | tbd.`quarter` = #{nowQuarter} AND su.user_id IN (SELECT user_id FROM sys_user WHERE |
| | | area_code |
| | | LIKE CONCAT( SUBSTRING(#{areaCode}, 1, 4 ), '%' ) AND user_type = 2 AND area_level |
| | | in(1,2,3,4)) |
| | | <if test="isAll!=null and isAll == 2"> |
| | | AND tbd.dept_area_code = #{areaCode} |
| | | </if> |
| | | <if test="yearType==1"> |
| | | AND YEAR(tbd.reporting_time) = YEAR(CURDATE()) |
| | | </if> |
| | | <if test="yearType==2"> |
| | | AND YEAR(tbd.reporting_time) = YEAR(CURDATE())-1 |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getKuKuanBaoZhangShuiPingByAreaCode" resultType="java.lang.String"> |
| | | SELECT |
| | | tbdc.field_value |
| | | FROM tb_basic_data tbd LEFT JOIN tb_basic_data_field tbdc ON tbd.id = tbdc.basic_data_id |
| | | <where> |
| | | tbd.`quarter` LIKE CONCAT(#{year},'%') AND tbd.dept_area_code = #{areaCode} AND tbdc.field_id |
| | | IN (36,37,38) |
| | | </where> |
| | | </select> |
| | | |