| | |
| | | <?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="cn.flightfeather.supervision.domain.mapper.OverallEvaluationMapper" > |
| | | <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.OverallEvaluation" > |
| | | <?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="cn.flightfeather.supervision.domain.mapper.OverallEvaluationMapper"> |
| | | <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.OverallEvaluation"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | <id column="OE_GUID" property="oeGuid" jdbcType="INTEGER" /> |
| | | <result column="BI_GUID" property="ciGuid" jdbcType="VARCHAR" /> |
| | | <result column="OE_Score" property="oeScore" jdbcType="INTEGER" /> |
| | | <result column="OE_Publish_Time" property="oePublishTime" jdbcType="DATE" /> |
| | | <result column="OE_Update_Time" property="oeUpdateTime" jdbcType="DATE" /> |
| | | <result column="OE_Scene_Type_Id" property="oeSceneTypeId" jdbcType="TINYINT" /> |
| | | <result column="OE_Scene_Type" property="oeSceneType" jdbcType="VARCHAR" /> |
| | | <result column="OE_Period" property="oePeriod" jdbcType="VARCHAR" /> |
| | | <result column="OE_Code_Level" property="oeCodeLevel" jdbcType="TINYINT" /> |
| | | <id column="OE_GUID" jdbcType="INTEGER" property="oeGuid" /> |
| | | <result column="BI_GUID" jdbcType="VARCHAR" property="biGuid" /> |
| | | <result column="OE_Score" jdbcType="INTEGER" property="oeScore" /> |
| | | <result column="OE_Publish_Time" jdbcType="TIMESTAMP" property="oePublishTime" /> |
| | | <result column="OE_Update_Time" jdbcType="TIMESTAMP" property="oeUpdateTime" /> |
| | | <result column="OE_Scene_Type_Id" jdbcType="TINYINT" property="oeSceneTypeId" /> |
| | | <result column="OE_Scene_Type" jdbcType="VARCHAR" property="oeSceneType" /> |
| | | <result column="OE_Period" jdbcType="VARCHAR" property="oePeriod" /> |
| | | <result column="OE_Code_Level" jdbcType="TINYINT" property="oeCodeLevel" /> |
| | | <result column="OE_Start_Time" jdbcType="DATE" property="oeStartTime" /> |
| | | <result column="OE_End_Time" jdbcType="DATE" property="oeEndTime" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <sql id="Base_Column_List"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | OE_GUID, BI_GUID, OE_Score, OE_Publish_Time, OE_Update_Time, OE_Scene_Type_Id, OE_Scene_Type, |
| | | OE_Period, OE_Code_Level |
| | | OE_GUID, BI_GUID, OE_Score, OE_Publish_Time, OE_Update_Time, OE_Scene_Type_Id, OE_Scene_Type, |
| | | OE_Period, OE_Code_Level, OE_Start_Time, OE_End_Time |
| | | </sql> |
| | | |
| | | <resultMap id="CreditInfoVo" type="cn.flightfeather.supervision.lightshare.vo.CreditInfoVo"> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="getLatestPeriod" resultType="String"> |
| | | SELECT @var_period:= ( |
| | | SELECT |
| | | a.OE_Start_Time |
| | | FROM |
| | | ea_t_overall_evaluation AS a |
| | | LEFT JOIN ea_t_baseinfo AS b ON a.BI_GUID = b.BI_GUID |
| | | <where> |
| | | <if test="provinceCode != null"> |
| | | AND b.BI_Province_Code = #{provinceCode} |
| | | </if> |
| | | <if test="provinceName != null"> |
| | | AND b.BI_Province_Name = #{provinceName} |
| | | </if> |
| | | <if test="cityCode != null"> |
| | | AND b.BI_City_Code = #{cityCode} |
| | | </if> |
| | | <if test="cityName != null"> |
| | | AND b.BI_City_Name = #{cityName} |
| | | </if> |
| | | <if test="districtCode != null"> |
| | | AND b.BI_District_Code = #{districtCode} |
| | | </if> |
| | | <if test="districtName != null"> |
| | | AND b.BI_District_Name = #{districtName} |
| | | </if> |
| | | <if test="townCode != null"> |
| | | AND b.BI_Town_Code = #{townCode} |
| | | </if> |
| | | <if test="townName != null"> |
| | | AND b.BI_Town_Name = #{townName} |
| | | </if> |
| | | <if test="areaCode != null"> |
| | | AND b.BI_Area_Code = #{areaCode} |
| | | </if> |
| | | <if test="area != null"> |
| | | AND b.BI_Area = #{area} |
| | | </if> |
| | | <if test="mcId != null"> |
| | | AND b.BI_Management_Company_Id = #{mcId} |
| | | </if> |
| | | <if test="mcName != null"> |
| | | AND b.BI_Management_Company = #{mcName} |
| | | </if> |
| | | <if test="sceneTypes.size() != 0"> |
| | | AND a.OE_Scene_Type_Id in |
| | | <foreach collection="sceneTypes" item="type" open="(" separator="," close=")"> |
| | | #{type, jdbcType=VARCHAR} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | a.OE_Publish_Time DESC |
| | | LIMIT 1 |
| | | ); |
| | | </select> |
| | | <select id="getCreditCount" resultMap="BaseResultMap"> |
| | | SELECT |
| | | a.* |
| | | FROM |
| | | ea_t_overall_evaluation AS a |
| | | LEFT JOIN ea_t_baseinfo AS b ON a.BI_GUID = b.BI_GUID |
| | | <where> |
| | | <if test="provinceCode != null"> |
| | | AND b.BI_Province_Code = #{provinceCode} |
| | | </if> |
| | | <if test="provinceName != null"> |
| | | AND b.BI_Province_Name = #{provinceName} |
| | | </if> |
| | | <if test="cityCode != null"> |
| | | AND b.BI_City_Code = #{cityCode} |
| | | </if> |
| | | <if test="cityName != null"> |
| | | AND b.BI_City_Name = #{cityName} |
| | | </if> |
| | | <if test="districtCode != null"> |
| | | AND b.BI_District_Code = #{districtCode} |
| | | </if> |
| | | <if test="districtName != null"> |
| | | AND b.BI_District_Name = #{districtName} |
| | | </if> |
| | | <if test="townCode != null"> |
| | | AND b.BI_Town_Code = #{townCode} |
| | | </if> |
| | | <if test="townName != null"> |
| | | AND b.BI_Town_Name = #{townName} |
| | | </if> |
| | | <if test="areaCode != null"> |
| | | AND b.BI_Area_Code = #{areaCode} |
| | | </if> |
| | | <if test="area != null"> |
| | | AND b.BI_Area = #{area} |
| | | </if> |
| | | <if test="mcId != null"> |
| | | AND b.BI_Management_Company_Id = #{mcId} |
| | | </if> |
| | | <if test="mcName != null"> |
| | | AND b.BI_Management_Company = #{mcName} |
| | | </if> |
| | | <if test="sceneTypes.size() != 0"> |
| | | AND a.OE_Scene_Type_Id in |
| | | <foreach collection="sceneTypes" item="type" open="(" separator="," close=")"> |
| | | #{type} |
| | | </foreach> |
| | | </if> |
| | | <if test="period != null"> |
| | | AND a.OE_Start_Time <= '${period}' |
| | | AND a.OE_End_Time >= '${period}' |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="searchEcCodeList" resultMap="CreditInfoVo"> |
| | | SELECT |
| | | b.BI_GUID AS userId, |
| | | b.BI_Name AS name, |
| | | c.UI_Extension2 AS sceneType, |
| | | b.CI_Name AS departmentName, |
| | | b.BI_Management_Company AS managementCompany, |
| | | a.OE_Publish_Time AS publishTime, |
| | | a.OE_Update_Time AS updateTime, |
| | | a.OE_Code_Level AS codeLevel, |
| | | b.BI_District_Name AS district, |
| | | b.BI_Town_Name AS town, |
| | | c.UI_IsEnable AS status |
| | | FROM |
| | | ea_t_overall_evaluation AS a |
| | | LEFT JOIN ea_t_baseinfo AS b ON a.BI_GUID = b.BI_GUID |
| | | LEFT JOIN sm_t_userinfo AS c ON a.BI_GUID = c.UI_GUID |
| | | <where> |
| | | <if test="provinceCode != null"> |
| | | AND b.BI_Province_Code = #{provinceCode} |
| | | </if> |
| | | <if test="provinceName != null"> |
| | | AND b.BI_Province_Name = #{provinceName} |
| | | </if> |
| | | <if test="cityCode != null"> |
| | | AND b.BI_City_Code = #{cityCode} |
| | | </if> |
| | | <if test="cityName != null"> |
| | | AND b.BI_City_Name = #{cityName} |
| | | </if> |
| | | <if test="districtCode != null"> |
| | | AND b.BI_District_Code = #{districtCode} |
| | | </if> |
| | | <if test="districtName != null"> |
| | | AND b.BI_District_Name = #{districtName} |
| | | </if> |
| | | <if test="townCode != null"> |
| | | AND b.BI_Town_Code = #{townCode} |
| | | </if> |
| | | <if test="townName != null"> |
| | | AND b.BI_Town_Name = #{townName} |
| | | </if> |
| | | <if test="areaCode != null"> |
| | | AND b.BI_Area_Code = #{areaCode} |
| | | </if> |
| | | <if test="area != null"> |
| | | AND b.BI_Area = #{area} |
| | | </if> |
| | | <if test="mcId != null"> |
| | | AND b.BI_Management_Company_Id = #{mcId} |
| | | </if> |
| | | <if test="mcName != null"> |
| | | AND b.BI_Management_Company = #{mcName} |
| | | </if> |
| | | <if test="sceneTypes.size() != 0"> |
| | | AND a.OE_Scene_Type_Id in |
| | | <foreach collection="sceneTypes" item="type" open="(" separator="," close=")"> |
| | | #{type, jdbcType=VARCHAR} |
| | | </foreach> |
| | | </if> |
| | | <if test="codeType != null"> |
| | | AND a.OE_Code_Level = ${codeType} |
| | | </if> |
| | | <if test="searchText != null"> |
| | | AND b.BI_Name LIKE '%${searchText}%' |
| | | </if> |
| | | <if test="period != null"> |
| | | AND a.OE_Start_Time <= '${period}' |
| | | AND a.OE_End_Time >= '${period}' |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |