| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?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="com.yt.zhylplat.moduleLhzx.section.mapper.TLhzxSectionMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.yt.zhylplat.moduleLhzx.section.entity.TLhzxSection">
- <id column="id" property="id" />
- <result column="section_name" property="sectionName" />
- <result column="section_type" property="sectionType" />
- <result column="create_user_id" property="createUserId" />
- <result column="create_date" property="createDate" />
- <result column="update_user_id" property="updateUserId" />
- <result column="update_date" property="updateDate" />
- <result column="del_flg" property="delFlg" />
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="Base_Column_List">
- id, section_name, section_type, create_user_id, create_date, update_user_id, update_date, del_flg
- </sql>
- <select id="getSectionId" resultType="com.yt.zhylplat.moduleLhzx.section.entity.TLhzxSection">
- select
- id
- from
- T_Lhzx_Section
- where
- section_name = #{sectionName}
- and
- del_flg = 0
- limit 1
- </select>
- <select id="selectSectionByMaintenanceCompanyId"
- resultType="com.yt.zhylplat.moduleLhzx.section.entity.TLhzxSection">
- select
- *
- from
- T_Lhzx_Section s
- where
- del_flg = 0
- and
- exists(
- select
- 1
- from
- T_Lhzx_Road_Section_Maintenance_Company
- where
- del_flg = 0
- and
- section_id = s.id
- and
- maintenance_company_id = #{maintenanceCompanyId}
- )
- </select>
- <select id="realityEmployee" resultType="com.yt.zhylplat.moduleLhzx.employee.entity.TLhzxEmployeeSection">
- SELECT
- count(*) as sumSectionNumber
- FROM
- T_Lhzx_Employee_Section es
- WHERE
- es.del_flg = 0
- <if test="es.sectionId!=null">
- and es.section_id=#{es.sectionId}
- </if>
- GROUP BY
- es.section_id
- </select>
- </mapper>
|