88 lines
3.0 KiB
XML
88 lines
3.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
"http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.hx.slj.modules.reportCustomer.dao.ReportCustomDetailDao">
|
|
<!-- parameterType:参数类型,填写实体类的完整名字 -->
|
|
<resultMap id="baseReportCustomDetail" type="com.hx.slj.modules.reportCustomer.entity.ReportCustomDetail" >
|
|
<id column="id" property="id"/>
|
|
<result column="report_custom_index_id" property="reportCustomIndexId"/>
|
|
<result column="khtx_var_id" property="khtxVarId"/>
|
|
<result column="name" property="name"/>
|
|
<result column="status" property="status"/>
|
|
<result column="sort" property="sort"/>
|
|
<result column="del_flag" property="delFlag"/>
|
|
<result column="create_by" property="createBy"/>
|
|
<result column="create_date" property="createDate"/>
|
|
<result column="update_by" property="updateBy"/>
|
|
<result column="update_date" property="updateDate"/>
|
|
<result column="remarks" property="remarks"/>
|
|
<result column="khtx_target_id" property="khtxTargetId"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="echoDetailMap" type="com.hx.slj.modules.reportCustomer.entity.ReportCustomDetail" >
|
|
<id column="id" property="id"/>
|
|
<result column="name" property="name"/>
|
|
<result column="sort" property="sort"/>
|
|
<result column="remarks" property="remarks"/>
|
|
<association property="khtxVar" javaType="com.hx.slj.modules.reportCustomer.entity.khtxVar">
|
|
<id column="kId" property="id"/>
|
|
<result column="var_name" property="varName"/>
|
|
<association property="assessmentIndex" javaType="com.hx.slj.modules.reportCustomer.entity.AssessmentIndex">
|
|
<id column="aId" property="id"/>
|
|
<result column="aName" property="name"/>
|
|
</association>
|
|
</association>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="echoDetail" parameterType="java.lang.String" resultMap="echoDetailMap">
|
|
select
|
|
r.id, r.`name`,r.remarks,r.sort,k.var_name,a.`NAME` as "aName",k.id as "kId",a.ID as "aId"
|
|
from
|
|
report_custom_detail r
|
|
LEFT JOIN assessment_index a on a.id = r.khtx_target_id
|
|
LEFT JOIN khtx_var k on k.id = r.khtx_var_id
|
|
where r.id = #{detailId} and r.del_flag = '0'
|
|
|
|
</select>
|
|
|
|
<insert id = "insertReportCustomDetailList" parameterType="java.util.List">
|
|
insert into report_custom_detail (
|
|
id,
|
|
report_custom_index_id,
|
|
khtx_var_id,
|
|
name,
|
|
status,
|
|
sort,
|
|
del_flag,
|
|
create_by,
|
|
create_date,
|
|
update_by,
|
|
update_date,
|
|
remarks,
|
|
khtx_target_id
|
|
|
|
)
|
|
values
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
(
|
|
#{item.id},
|
|
#{item.reportCustomIndexId},
|
|
#{item.khtxVarId},
|
|
#{item.name},
|
|
#{item.status},
|
|
#{item.sort},
|
|
#{item.delFlag},
|
|
#{item.createBy},
|
|
#{item.createDate},
|
|
#{item.updateBy},
|
|
#{item.updateDate},
|
|
#{item.remarks},
|
|
#{item.khtxTargetId}
|
|
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
</mapper> |