xml version = "1.0" encoding = "UTF-8" ?>
< mapper namespace = "com.ld.ldstat.mapper.StatementEnteringMapper" >
< resultMap id = "queryChartAllTwo" type = "com.ld.ldstat.vo.StatementEnteringVO" >
< id property = "id" jdbcType = "BIGINT" column = "sid" >id >
< result property = "theDate" jdbcType = "DATE" column = "the_date" >result >
< result property = "deptName" jdbcType = "VARCHAR" column = "dept_name" >result >
< result property = "deptId" jdbcType = "BIGINT" column = "dept_id" >result >
< collection property = "cashCar" javaType = "java.util.List" ofType = "com.ld.ldstat.entity.CashCar" >
< id property = "id" jdbcType = "BIGINT" column = "cid" >id >
< result property = "parentId" jdbcType = "BIGINT" column = "c_parent_id" />
< result property = "projectName" jdbcType = "VARCHAR" column = "c_project_name" />
< result property = "ninetyWithin" jdbcType = "INTEGER" column = "ninety_within" />
< result property = "ninetyExcept" jdbcType = "INTEGER" column = "ninety_except" />
< result property = "cashCar" jdbcType = "INTEGER" column = "cash_car" />
collection >
< collection property = "subtotalAll" ofType = "com.ld.ldstat.entity.SubtotalAll" >
< id property = "id" jdbcType = "BIGINT" column = "aid" >id >
< result property = "parentId" jdbcType = "BIGINT" column = "a_parent_id" />
< result property = "projectName" jdbcType = "VARCHAR" column = "a_project_name" />
< result property = "subtotalType" jdbcType = "INTEGER" column = "subtotal_type" />
< result property = "task" jdbcType = "INTEGER" column = "task" />
< result property = "theDay" jdbcType = "INTEGER" column = "the_day" />
collection >
resultMap >
< select id = "queruMapperPage" resultMap = "queryChartAllTwo" >
SELECT
se.id sid,se.the_date,se.dept_name,
ca.id cid,ca.project_name c_project_name,ca.parent_id c_parent_id,ca.ninety_Within,ca.ninety_except,ca.cash_car,
sa.id aid,sa.project_name a_project_name,sa.parent_id a_parent_id,sa.task,sa.the_day
FROM
statement_entering se
LEFT JOIN cash_car ca on se.id = ca.parent_id
LEFT JOIN subtotal_all sa on se.id = sa.parent_id
select >
mapper >
|