| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <?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.com.goldenwater.dcproj.dao.TacObjPblmHbDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacObjPblmHb" id="tacObjPblmHbResultMap">
- <result property="id" column="ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="listType" column="LIST_TYPE"/>
- <result property="pblmstbHbId" column="PBLMSTB_HB_ID"/>
- <result property="isPblm" column="IS_PBLM"/>
- <result property="pblmNt" column="PBLM_NT"/>
- <result property="nt" column="NT"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="state" column="STATE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="spfsnlType" column="SPFSNL_TYPE"/>
- <result property="genus" column="GENUS"/>
- <result property="focPblm" column="FOC_PBLM"/>
- <result property="chkItem" column="CHK_ITEM"/>
- <result property="chkGist" column="CHK_GIST"/>
- <result property="chkFrp" column="CHK_FRP"/>
- <result property="pblmDesc" column="PBLM_DESC"/>
- <result property="pblmNm" column="PBLM_NM"/>
- <result property="pblmPasi" column="PBLM_PASI"/>
- <result property="subjectIds" column="SUBJECT_IDS"/>
- <result property="subjectNames" column="SUBJECT_NAMES"/>
- <result property="sn" column="SN"/>
- <result property="pblmMasteryLevel" column="PBLM_MASTERY_LEVEL"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- OBJ_ID,
- LIST_TYPE,
- PBLMSTB_HB_ID,
- IS_PBLM,
- PBLM_NT,
- NT,
- PBLM_ID,
- STATE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{objId},
- #{listType},
- #{pblmstbHbId},
- #{isPblm},
- #{pblmNt},
- #{nt},
- #{pblmId},
- #{state},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="listType != null and listType != ''">and LIST_TYPE = #{listType}</if>
- <if test="pblmstbHbId != null and pblmstbHbId != ''">and PBLMSTB_HB_ID = #{pblmstbHbId}</if>
- <if test="isPblm != null and isPblm != ''">and IS_PBLM = #{isPblm}</if>
- <if test="pblmNt != null and pblmNt != ''">and PBLM_NT = #{pblmNt}</if>
- <if test="nt != null and nt != ''">and NT = #{nt}</if>
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="state != null and state != ''">and STATE = #{state}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- </trim>
- </sql>
- <!-- <select id="findPblmHbList" resultMap="tacObjPblmHbResultMap">-->
- <!-- select t.*,r.name,r.location,r.ad_code from TAC_OBJ_PBLM_HB t ,tac_pawp_rgstr r where t.obj_id=r.obj_id-->
- <!-- and 1=1-->
- <!-- <if test="spfsnlType != null and spfsnlType != ''"> and t.SPFSNL_TYPE like concat(concat('%',#{spfsnlType}),'%')</if>-->
- <!-- <if test="objId != null and objId != ''"> and t.OBJ_ID like concat(concat('%',#{objId}),'%')</if>-->
- <!-- </select>-->
- <!-- <select id="findPblmHbList" resultMap="tacObjPblmHbResultMap">-->
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmHb">
- INSERT INTO TAC_OBJ_PBLM_HB (
- ID,
- OBJ_ID,
- LIST_TYPE,
- PBLMSTB_HB_ID,
- IS_PBLM,
- PBLM_NT,
- NT,
- PBLM_ID,
- STATE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT
- )
- SELECT
- UUID() AS ID,
- #{objId} AS OBJ_ID,
- '' AS LIST_TYPE,
- id AS PBLMSTB_HB_ID,
- '' AS IS_PBLM,
- '' AS PBLM_NT,
- '' AS NT,
- '' AS PBLM_ID,
- '' AS STATE,
- #{persId} AS PERS_ID,
- now() AS INTM,
- now() AS UPTM,
- '0' AS DATA_STAT
- FROM TAC_OBJ_PBLMSTB_HB
- </insert>
- <select id="findPblmHbList" resultMap="tacObjPblmHbResultMap" >
- SELECT t.*, r.name, r.location, r.ad_code,
- tt.genus, tt.foc_pblm, tt.chk_item, tt.chk_gist,
- tt.SPFSNL_TYPE, tt.CHK_FRP, tt.PBLMS_DESC,tt.PBLM_MASTERY_LEVEL
- FROM TAC_OBJ_PBLM_HB t
- LEFT JOIN tac_pawp_rgstr r ON t.obj_id = r.obj_id
- LEFT JOIN TAC_OBJ_PBLMstb_HB tt ON tt.id = t.PBLMSTB_HB_ID
- WHERE 1=1
- AND t.data_stat = '0' AND tt.data_stat = '0'
- <if test="spfsnlType != null and spfsnlType != ''">
- AND tt.SPFSNL_TYPE LIKE CONCAT('%', #{spfsnlType}, '%')
- </if>
- <if test="objId != null and objId != ''">
- AND t.OBJ_ID LIKE CONCAT('%', #{objId}, '%')
- </if>
- <if test='isPblm == "1".toString()'>
- AND (t.is_pblm = '0' OR t.is_pblm = '1')
- </if>
- <if test='isPblm == "0".toString()'>
- AND t.is_pblm IS NULL
- </if>
- ORDER BY tt.genus,tt.foc_pblm
- </select>
- <select id="getListData" resultMap="tacObjPblmHbResultMap">
- select t.*,r.name,r.location,r.ad_code ,tt.genus,tt.foc_pblm,tt.chk_item,tt.chk_gist ,tt.SPFSNL_TYPE,tt.CHK_FRP,tt.PBLMS_DESC,tt.PBLM_MASTERY_LEVEL,ttt.sn
- from TAC_OBJ_PBLM_HB t left join tac_pawp_rgstr r on t.obj_id=r.obj_id
- left join TAC_OBJ_PBLMstb_HB tt on tt.id = t.PBLMSTB_HB_ID
- left join TAC_OBJ_PBLMSTB ttt on ttt.id = tt.pblms_id
- where 1=1
- <if test="spfsnlType != null and spfsnlType != ''"> and tt.SPFSNL_TYPE like concat(concat('%',#{spfsnlType}),'%')</if>
- <if test="objId != null and objId != ''"> and t.OBJ_ID like concat(concat('%',#{objId}),'%')</if>
- and t.data_stat = '0'
- </select>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmHb">
- update TAC_OBJ_PBLM_HB
- set IS_PBLM = #{isPblm},NT = #{nt},PBLM_ID = #{pblmId}
- <!--<trim prefix="set" suffixOverrides=",">
- <if test="isPblm != null">IS_PBLM = #{isPblm},</if>
- <if test="nt != null and nt != ''">NT = #{nt}</if>
- <!–<if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
- <if test="pblmPasi != null and pblmPasi != ''">PBLM_PASI = #{pblmPasi},</if>
- <if test="subjectNames != null and subjectNames != ''">SUBJECT_NAMES = #{subjectNames},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>–>
- </trim>-->
- <where>ID = #{id}</where>
- </update>
- <delete id="delete" parameterType="java.lang.String">
- update TAC_OBJ_PBLM_HB set DATA_STAT='9' where ID = #{id}
- </delete>
- <select id="findPblmHbList1" resultMap="tacObjPblmHbResultMap">
- SELECT t.*, r.name, r.location, r.ad_code,
- tt.genus, tt.foc_pblm, tt.chk_item, tt.chk_gist,
- tt.SPFSNL_TYPE, tt.CHK_FRP, tt.PBLMS_DESC, tt.PBLM_MASTERY_LEVEL
- FROM TAC_OBJ_PBLM_HB t
- LEFT JOIN tac_pawp_rgstr r ON t.obj_id = r.obj_id
- LEFT JOIN TAC_OBJ_PBLMstb_HB tt ON tt.id = t.PBLMSTB_HB_ID
- WHERE 1=1
- <if test="spfsnlType != null and spfsnlType != ''">
- AND tt.SPFSNL_TYPE LIKE CONCAT('%', #{spfsnlType}, '%')
- </if>
- <if test="objId != null and objId != ''">
- AND t.OBJ_ID LIKE CONCAT('%', #{objId}, '%')
- </if>
- <if test='isPblm == "1".toString()'>
- AND (t.is_pblm = '0' OR t.is_pblm = '1')
- </if>
- <if test='isPblm == "0".toString()'>
- AND t.is_pblm IS NULL
- </if>
- AND t.data_stat = '0' AND tt.data_stat = '0'
- ORDER BY tt.genus,tt.foc_pblm
- </select>
- <select id="get" resultMap="tacObjPblmHbResultMap" parameterType="String" >
- select a.ID,
- a.OBJ_ID,
- a.LIST_TYPE,
- a.PBLMSTB_HB_ID,
- a.IS_PBLM,
- a.PBLM_NT,
- a.NT,
- a.PBLM_ID,
- a.STATE,
- a.PERS_ID,
- a.INTM,
- a.UPTM,
- a.DATA_STAT ,b.* ,c.* from TAC_OBJ_PBLM_HB a left join TAC_OBJ_PBLMstb_HB b on b.id = a.PBLMSTB_HB_ID
- LEFT JOIN TAC_PBLM_INFO c on a.obj_id = c.obj_id and a.pblm_id = c.id
- where a.ID = #{id}
- </select>
- <select id="getfile" resultMap="tacObjPblmHbResultMap" parameterType="String" >
- select a.ID,
- a.OBJ_ID,
- a.LIST_TYPE,
- a.PBLMSTB_HB_ID,
- a.IS_PBLM,
- a.PBLM_NT,
- a.NT,
- a.PBLM_ID,
- a.STATE,
- a.PERS_ID,
- a.INTM,
- a.UPTM,
- a.DATA_STAT ,b.* ,c.* from TAC_OBJ_PBLM_HB a left join TAC_OBJ_PBLMstb_HB b on b.id = a.PBLMSTB_HB_ID
- LEFT JOIN TAC_PBLM_INFO c on a.obj_id = c.obj_id and a.pblm_id = c.id
- where a.ID = #{id}
- </select>
- </mapper>
|