TProcessesBlastdesignHoleMapper.xml 2.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?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.wise.sc.acquisition.business.mapper.TProcessesBlastdesignHoleMapper">


    <!-- 表和实体字段对照关系, 类似RestultMap -->
    <sql id="TProcessesBlastdesignHoleColumns">
        a.Uid,
        a.StopeName,
        a.StepName,
        a.BlastAreaName,
        a.BlastHoleID,
        a.Depth,
        a.RowSpace,
        a.HoleSpace,
        a.Azimuth,
        a.Inclination,
        a.Aperture,
        a.x,
        a.y,
        a.z,
        a.StepHeight,
renchao's avatar
renchao committed
23 24
        a.HoleBlastVolume,
        a.Tag
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
	</sql>

    <sql id="TProcessesBlastdesignVolumeColumns">
        b.BlastVolume,
        b.DesignDate,
	</sql>


    <sql id="TProcessesBlastdesignHoleJoins">
        left join T_Processes_BlastDesign_Volume b on a.StopeName=b.StopeName and a.StepName=b.StepName and a.BlastAreaName=b.BlastAreaName
    </sql>

    <!-- 获取所有getPage列表 -->
    <select id="getPage" resultType="cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo">
        SELECT
renchao's avatar
renchao committed
40 41 42 43 44 45 46 47 48 49 50 51
        a.Uid,
        a.BlastHoleID,
        a.Depth,
        a.RowSpace,
        a.HoleSpace,
        a.Azimuth,
        a.Inclination,
        a.Aperture,
        a.x,
        a.y,
        a.z,
        a.StepHeight,
renchao's avatar
renchao committed
52
        b.BlastVolume
53 54 55 56 57 58 59
        FROM T_Processes_BlastDesign_Hole a
        <include refid="TProcessesBlastdesignHoleJoins"/>
        <where>
            ${ew.sqlSegment}
        </where>
    </select>

60

罗贤顺's avatar
罗贤顺 committed
61
    <!-- 获取所有getByQuery列表 -->
renchao's avatar
renchao committed
62 63 64 65 66 67 68 69 70 71 72
    <select id="getByQuery" resultType="cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo">
        SELECT
        <include refid="TProcessesBlastdesignVolumeColumns"/>
        <include refid="TProcessesBlastdesignHoleColumns"/>
        FROM T_Processes_BlastDesign_Hole a
        <include refid="TProcessesBlastdesignHoleJoins"/>
        <where>
            ${ew.sqlSegment}
        </where>
    </select>

73 74 75 76 77 78 79 80 81 82 83
    <!-- 获取所有getByQuery列表 -->
    <select id="getSumByCondition" resultType="Double">
        SELECT
        sum(${condition})
        FROM T_Processes_BlastDesign_Hole a
        <include refid="TProcessesBlastdesignHoleJoins"/>
        <where>
            ${ew.sqlSegment}
        </where>
    </select>

84
</mapper>