You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
4.4 KiB
79 lines
4.4 KiB
<?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.lnsoft.workflow.hxgk.mapper.AdministrativeOrganizationMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.lnsoft.workflow.hxgk.entity.AdministrativeOrganization">
|
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="number" column="number" jdbcType="VARCHAR"/>
|
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
<result property="superior" column="superior" jdbcType="BIGINT"/>
|
|
<result property="organizationType" column="organization_type" jdbcType="BIGINT"/>
|
|
<result property="abbreviation" column="abbreviation" jdbcType="VARCHAR"/>
|
|
<result property="state" column="state" jdbcType="TINYINT"/>
|
|
<result property="time" column="time" jdbcType="BIGINT"/>
|
|
<result property="wechatOrganizationId" column="wechat_organization_id" jdbcType="BIGINT"/>
|
|
<result property="superiorSun" column="superior_sun" jdbcType="VARCHAR"/>
|
|
<result property="schoole" column="schoole" jdbcType="BIGINT"/>
|
|
<result property="kingdeeid" column="kingdeeid" jdbcType="VARCHAR"/>
|
|
<result property="ispower" column="ispower" jdbcType="TINYINT"/>
|
|
<result property="sort" column="sort" jdbcType="OTHER"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="orgAndOrgTypeResultMap" type="com.lnsoft.workflow.hxgk.entity.AdministrativeOrganization">
|
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="number" column="number" jdbcType="VARCHAR"/>
|
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
<result property="superior" column="superior" jdbcType="BIGINT"/>
|
|
<result property="organizationType" column="organization_type" jdbcType="BIGINT"/>
|
|
<result property="abbreviation" column="abbreviation" jdbcType="VARCHAR"/>
|
|
<result property="state" column="state" jdbcType="TINYINT"/>
|
|
<result property="time" column="time" jdbcType="BIGINT"/>
|
|
<result property="wechatOrganizationId" column="wechat_organization_id" jdbcType="BIGINT"/>
|
|
<result property="superiorSun" column="superior_sun" jdbcType="VARCHAR"/>
|
|
<result property="schoole" column="schoole" jdbcType="BIGINT"/>
|
|
<result property="kingdeeid" column="kingdeeid" jdbcType="VARCHAR"/>
|
|
<result property="ispower" column="ispower" jdbcType="TINYINT"/>
|
|
<result property="sort" column="sort" jdbcType="OTHER"/>
|
|
<association property="organizationTypeDetail" javaType="com.lnsoft.workflow.hxgk.entity.AdministrativeOrganizationType">
|
|
<id property="id" column="tId" jdbcType="BIGINT"/>
|
|
<result property="name" column="tName" jdbcType="VARCHAR"/>
|
|
<result property="state" column="tState" jdbcType="TINYINT"/>
|
|
<result property="time" column="tTime" jdbcType="BIGINT"/>
|
|
<result property="level" column="tLevel" jdbcType="OTHER"/>
|
|
<result property="kingdeeid" column="tKingdeeid" jdbcType="VARCHAR"/>
|
|
</association>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id,number,name,
|
|
superior,organization_type,abbreviation,
|
|
state,time,wechat_organization_id,
|
|
superior_sun,schoole,kingdeeid,
|
|
ispower,sort
|
|
</sql>
|
|
<select id="queryOrganizationList" parameterType="com.lnsoft.workflow.hxgk.entity.AdministrativeOrganization"
|
|
resultMap="orgAndOrgTypeResultMap">
|
|
select
|
|
org.id,number,org.name,
|
|
superior,organization_type,abbreviation,
|
|
org.state,org.time,wechat_organization_id,
|
|
superior_sun,schoole, org.kingdeeid,
|
|
ispower,sort, orgtype.id tId, orgtype.name tName,
|
|
orgtype.state tState, orgtype.time tTime, orgtype.level tLevel,
|
|
orgtype.kingdeeid tKingdeeid
|
|
from administrative_organization org
|
|
left join administrative_organization_type orgtype on org.organization_type = orgtype.id
|
|
where org.state != 3
|
|
<if test="id != null">
|
|
AND org.id = #{id}
|
|
</if>
|
|
<if test="superior != null">
|
|
AND org.superior = #{superior}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
AND org.name like concat('%', #{name}, '%')
|
|
</if>
|
|
</select>
|
|
</mapper>
|
|
|