| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038 |
- <?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.com.goldenwater.dcproj.dao.BisInspAllRlationPersDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers" id="bisInspAllRlationPersResultMap">
- <result property="callnumber" column="CALLNUMBER"/>
- <result property="dpnm" column="DPNM"/>
- <result property="dppost" column="DPPOST"/>
- <result property="idnm" column="IDNM"/>
- <result property="plst" column="PLST"/>
- <result property="school" column="SCHOOL"/>
- <result property="specialty" column="SPECIALTY"/>
- <result property="imgurl" column="IMGURL"/>
- <result property="guid" column="GUID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="pwd" column="PWD"/>
- <result property="sex" column="SEX"/>
- <result property="telnumb" column="TELNUMB"/>
- <result property="faxnumb" column="FAXNUMB"/>
- <result property="mobilenumb" column="MOBILENUMB"/>
- <result property="email" column="EMAIL"/>
- <result property="bornDate" column="BORN_DATE"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="admDuty" column="ADM_DUTY"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="remark" column="REMARK"/>
- <result property="persType" column="PERS_TYPE"/>
- <result property="permission" column="PERMISSION"/>
- <result property="ownerSystem" column="OWNER_SYSTEM"/>
- <result property="province" column="PROVINCE"/>
- <result property="departId" column="DEPART_ID"/>
- <result property="departNm" column="DEPART_NM"/>
- <result property="wUnit" column="W_UNIT"/>
- <result property="planDpId" column="PLAN_DP_ID"/>
- </resultMap>
- <resultMap type="cn.com.goldenwater.dcproj.dto.BisInspAllRlationPersDto" id="bisInspAllRlationPersDtoResultMap">
- <result property="callnumber" column="CALLNUMBER"/>
- <result property="dpnm" column="DPNM"/>
- <result property="dppost" column="DPPOST"/>
- <result property="idnm" column="IDNM"/>
- <result property="plst" column="PLST"/>
- <result property="school" column="SCHOOL"/>
- <result property="specialty" column="SPECIALTY"/>
- <result property="imgurl" column="IMGURL"/>
- <result property="guid" column="GUID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="pwd" column="PWD"/>
- <result property="sex" column="SEX"/>
- <result property="telnumb" column="TELNUMB"/>
- <result property="faxnumb" column="FAXNUMB"/>
- <result property="mobilenumb" column="MOBILENUMB"/>
- <result property="email" column="EMAIL"/>
- <result property="bornDate" column="BORN_DATE"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="admDuty" column="ADM_DUTY"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="remark" column="REMARK"/>
- <result property="pertype" column="PERS_TYPE"/>
- <result property="permission" column="PERMISSION"/>
- <result property="operateTime" column="OPERATE_TIME"/>
- <result property="index" column="ROW_ID"/>
- <result property="wUnit" column="W_UNIT"/>
- <result property="planDpId" column="PLAN_DP_ID"/>
- </resultMap>
- <sql id="table_columns">
- CALLNUMBER,
- PROVINCE,
- DEPART_ID,
- DEPART_NM,
- DPNM,
- DPPOST,
- IDNM,
- PLST,
- SCHOOL,
- SPECIALTY,
- IMGURL,
- GUID,
- PERS_NAME,
- PWD,
- SEX,
- TELNUMB,
- FAXNUMB,
- MOBILENUMB,
- EMAIL,
- BORN_DATE,
- ORG_ID,
- ORG_NM,
- ADM_DUTY,
- COLL_TIME,
- REMARK,
- PERS_TYPE,
- PERMISSION,
- OWNER_SYSTEM,
- W_UNIT,
- PLAN_DP_ID
- </sql>
- <sql id="entity_properties">
- #{callnumber},#{province},#{departId},#{departNm},
- #{dpnm},
- #{dppost},
- #{idnm},
- #{plst},
- #{school},
- #{specialty},
- #{imgurl},
- #{guid},
- #{persName},
- #{pwd},
- #{sex},
- #{telnumb},
- #{faxnumb},
- #{mobilenumb},
- #{email},
- #{bornDate},
- #{orgId},
- #{orgNm},
- #{admDuty},
- #{collTime},
- #{remark},
- #{persType},
- #{permission},
- #{ownerSystem},
- #{wUnit},
- #{planDpId}
- </sql>
- <sql id="table_columns2">
- CALLNUMBER ,DEPART_ID,DEPART_NM,
- DPNM,
- DPPOST,
- IDNM,
- PLST,
- SCHOOL,
- SPECIALTY,
- IMGURL,
- GUID,
- PERS_NAME,
- SEX,
- TELNUMB,
- FAXNUMB,
- MOBILENUMB,
- EMAIL,
- BORN_DATE,
- ORG_ID,
- ORG_NM,
- ADM_DUTY,
- COLL_TIME,
- REMARK,
- PERS_TYPE,
- PERMISSION,
- OWNER_SYSTEM,
- W_UNIT,
- PLAN_DP_ID
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <!-- '%' , #{roleName} , '%'; -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="callnumber != null and callnumber != ''">and CALLNUMBER = #{callnumber}</if>
- <if test="wUnit != null and wUnit != ''">and W_UNIT = #{wUnit}</if>
- <if test="dppost != null and dppost != ''">and DPPOST = #{dppost}</if>
- <if test="departId != null and departId != ''">and depart_Id = #{departId}</if>
- <if test="departNm != null and departNm != ''">and depart_Nm = #{departNm}</if>
- <if test="idnm != null and idnm != ''">and IDNM like CONCAT(#{idnm} , '%')</if>
- <if test="plst != null and plst != ''">and PLST = #{plst}</if>
- <if test="school != null and school != ''">and SCHOOL = #{school}</if>
- <if test="specialty != null and specialty != ''">and SPECIALTY = #{specialty}</if>
- <if test="imgurl != null and imgurl != ''">and IMGURL = #{imgurl}</if>
- <if test="guid != null and guid != ''">and GUID = #{guid}</if>
- <if test="persName != null and persName != ''">and PERS_NAME like CONCAT('%' , #{persName} , '%')</if>
- <if test="pwd != null and pwd != ''">and PWD = #{pwd}</if>
- <if test="sex != null">and SEX = #{sex}</if>
- <if test="telnumb != null and telnumb != ''">and TELNUMB like CONCAT(#{telnumb} , '%')</if>
- <if test="faxnumb != null and faxnumb != ''">and FAXNUMB = #{faxnumb}</if>
- <if test="mobilenumb != null and mobilenumb != ''">and MOBILENUMB = #{mobilenumb}</if>
- <if test="email != null and email != ''">and EMAIL = #{email}</if>
- <if test="bornDate != null">and BORN_DATE = #{bornDate}</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="orgNm != null and orgNm != ''">and ORG_NM like CONCAT(#{orgNm} , '%')</if>
- <if test="admDuty != null and admDuty != ''">and ADM_DUTY = #{admDuty}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="remark != null and remark != ''">and REMARK = #{remark}</if>
- <if test="permission != null and permission != ''">and PERMISSION = #{permission}</if>
- <if test="phoneIsNull!=null and phoneIsNull!=''">and MOBILENUMB is null</if>
- <if test="ownerSystem != null and ownerSystem != ''">and OWNER_SYSTEM = #{ownerSystem}</if>
- <if test="dpnm != null and dpnm != ''">and DPNM = #{dpnm}</if>
- <if test="persType != null and persType != ''">and PERS_TYPE = #{persType}</if>
- <if test="province != null and province != ''">and PROVINCE = #{province}</if>
- <if test="planDpId != null and planDpId != ''">and PLAN_DP_ID = #{planDpId}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspAllRlationPersResultMap" parameterType="String">
- select
- <include refid="table_columns2"/>
- from BIS_INSP_ALL_RLATION_PERS where guid = #{id}
- </select>
- <select id="getBy" resultMap="bisInspAllRlationPersResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspAllRlationPersResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS
- </select>
- <select id="findList" resultMap="bisInspAllRlationPersResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_ALL_RLATION_PERS
- <include refid="page_where"/>
- </select>
- <select id="findListByOrgIdOrderByOperateTime" resultMap="bisInspAllRlationPersDtoResultMap">
- select distinct tp.GUID,
- tp.DPNM,
- tp.W_UNIT,
- tp.DPPOST,
- tp.IDNM,
- tp.PLST,
- tp.SCHOOL,
- tp.SPECIALTY,
- tp.IMGURL,
- tp.PERS_NAME,
- tp.SEX,
- tp.TELNUMB,
- tp.FAXNUMB,
- tp.MOBILENUMB,
- tp.EMAIL,
- tp.BORN_DATE,
- tp.ORG_ID,
- tp.ORG_NM,
- tp.ADM_DUTY,
- tp.COLL_TIME,
- tp.REMARK,tp.PERMISSION,
- cr.operate_time,cr.LONGITUDE lgtd,cr.LATITUDE lttd,cr.LON centerXGd,cr.LAT centerYGd,
- CASE WHEN tr.GUID IS NOT NULL THEN '1'
- WHEN tr.GUID IS NULL THEN '0'
- END AS STATE
- from
- (
- select distinct t.GUID,
- t.DPNM,
- t.W_UNIT,
- t.DPPOST,
- t.IDNM,
- t.PLST,
- t.SCHOOL,
- t.SPECIALTY,
- t.IMGURL,
- t.PERS_NAME,
- t.SEX,
- t.TELNUMB,
- t.FAXNUMB,
- t.MOBILENUMB,
- t.EMAIL,
- t.BORN_DATE,
- t.ORG_ID,
- t.ORG_NM,
- t.ADM_DUTY,
- t.COLL_TIME,
- t.REMARK,t.PERMISSION from BIS_INSP_ALL_RLATION rla left join (
- select s.*,o.org_id as real_org from bis_insp_all_rlation_pers s,(select * from bis_insp_pers_org g where 1=1
- <if test="orgId !=null and orgId !=''">
- and g.org_id =#{orgId}
- </if>
- ) o where s.guid=o.pers_id
- ) t on rla.persid = t.guid
- <if test="orgId !=null and orgId !=''">
- where REGEXP_LIKE( Id,concat('^(',
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persId}
- and ad_code =#{province}
- )>0 then
- (SELECT group_concat(id separator '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- and ad_code =#{province} GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ,')') )
- </if>
- <if test="province !=null and province !=''">
- and rla.ad_code=#{province}
- </if>
- ) tp LEFT JOIN
- (SELECT t.GUID,
- t.DPNM,
- t.W_UNIT,
- t.DPPOST,
- t.IDNM,
- t.PLST,
- t.SCHOOL,
- t.SPECIALTY,
- t.IMGURL,
- t.PERS_NAME,
- t.SEX,
- t.TELNUMB,
- t.FAXNUMB,
- t.MOBILENUMB,
- t.EMAIL,
- t.BORN_DATE,
- t.ORG_ID,
- t.ORG_NM,
- t.ADM_DUTY,
- t.COLL_TIME,
- t.REMARK,t.PERMISSION,
- t1.operate_time,t1.LONGITUDE lgtd,t1.LATITUDE lttd,
- t1.LON centerXGd,t1.LAT centerYGd FROM (
- select s.* from bis_insp_all_rlation_pers s,(select * from bis_insp_pers_org g where 1=1
- <if test="orgId !=null and orgId !=''">
- and g.org_id =#{orgId}
- </if>
- ) o where s.guid=o.pers_id )t
- left join pers_position_latest t1 on t.guid = t1.pers_id
- where 1 = 1 and t1.PERS_ID is not null
- and t1.OPERATE_TIME >= #{operateTime}
- ) tr on tp.guid = tr.guid
- LEFT JOIN pers_position_latest cr on tp.guid = cr.PERS_ID
- WHERE 1 = 1
- <if test="isAdmin!=true">
- AND cr.OPERATE_TIME > DATE_ADD(now(), INTERVAL -1 DAY)
- </if>
- <if test="persName != null and persName != ''">and tp.PERS_NAME like CONCAT('%' , #{persName} , '%')</if>
- <if test="certificateCode != null and certificateCode != ''">AND (tp.IDNM LIKE '%${certificateCode}%' OR
- tp.TELNUMB LIKE '%${certificateCode}%')
- </if>
- <if test="deptName != null and deptName != ''">AND (tp.DPNM LIKE '%${deptName}%' OR tp.ORG_NM LIKE
- '%${deptName}%')
- </if>
- <if test="status != null and status != ''"> AND tr.GUID IS NOT NULL</if>
- </select>
- <select id="findListByClassify" resultMap="bisInspAllRlationPersDtoResultMap"
- parameterType="cn.com.goldenwater.dcproj.param.PersPositionParam">
- select
- DISTINCT t3.GUID,
- t3.DPNM,
- t3.W_UNIT,
- t3.DPPOST,
- t3.IDNM,
- t3.PLST,
- t3.SCHOOL,
- t3.SPECIALTY,
- t3.IMGURL,
- t3.PERS_NAME,
- t3.SEX,
- t3.TELNUMB,
- t3.FAXNUMB,
- t3.MOBILENUMB,
- t3.EMAIL,
- t3.BORN_DATE,
- t3.ORG_ID,
- t3.ORG_NM,
- t3.ADM_DUTY,
- t3.COLL_TIME,
- t3.REMARK,
- t4.operate_time,t4.LONGITUDE lgtd,t4.LATITUDE lttd,
- (case
- when t4.OPERATE_TIME >= #{operateTime} then
- '1'
- else
- '0'
- end) state
- from bis_insp_all t1
- LEFT JOIN (select * from BIS_INSP_ALL_RLATION n where 1=1
- <include refid="provinceSql"/>
- ) t2 ON t2.id = t1.id
- left join BIS_INSP_ALL_RLATION_PERS t3 ON t3.guid = t2.persid
- left join pers_position_latest t4 on t4.pers_id=t3.guid
- where 1 = 1
- <if test="id != null and id != ''">AND
- <foreach item="item" index="index" collection="id.split(',')" open="(" separator="OR" close=")">
- t1.id LIKE CONCAT(#{item}, '%')
- </foreach>
- </if>
- <if test="persName != null and persName != ''">and t3.PERS_NAME like CONCAT('%' , #{persName} , '%')</if>
- <if test="pertype != null and pertype != ''">and t2.PERTYPE =#{pertype}</if>
- <if test='status == "1"'>and t4.OPERATE_TIME >= #{operateTime}</if>
- <if test="orderBy == null or orderBy == ''">order by operate_time</if>
- <if test="orderBy != null and orderBy != ''">order by ${orderBy}</if>
- </select>
- <select id="findListCountByClassify" resultType="int"
- parameterType="cn.com.goldenwater.dcproj.param.PersPositionParam">
- select
- count(DISTINCT t3.GUID)
- from bis_insp_all t1
- LEFT JOIN (select * from BIS_INSP_ALL_RLATION n where 1=1
- <include refid="provinceSql"/>
- ) t2 ON t2.id = t1.id
- left join BIS_INSP_ALL_RLATION_PERS t3 ON t3.guid = t2.persid
- left join pers_position_latest t4 on t4.pers_id=t3.guid
- where t1.id like concat(#{id},'%') and t4.PERS_ID is not null
- <if test="persName != null and persName != ''">and t3.PERS_NAME like CONCAT('%' , #{persName} , '%')</if>
- <if test="pertype != null and pertype != ''">and t2.PERTYPE =#{pertype}</if>
- <if test="operateTime != null">and t4.OPERATE_TIME >= #{operateTime}</if>
- </select>
- <sql id="provinceSql">
- <choose>
- <when test="province !=null and province !=''">
- AND AD_CODE=#{province}
- </when>
- <otherwise>
- AND AD_CODE is null
- </otherwise>
- </choose>
- </sql>
- <select id="selectCount" resultType="int">
- select count(DISTINCT t1.GUID) from BIS_INSP_ALL_RLATION_PERS t1
- where t1.ORG_ID LIKE concat(#{orgId}, '%')
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers">
- insert into BIS_INSP_ALL_RLATION_PERS(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_ALL_RLATION_PERS where guid = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers">
- delete from BIS_INSP_ALL_RLATION_PERS
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_ALL_RLATION_PERS set flag_valid = 0 where guid = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers">
- update BIS_INSP_ALL_RLATION_PERS
- <trim prefix="set" suffixOverrides=",">
- <if test="callnumber != null and callnumber != ''">CALLNUMBER = #{callnumber},</if>
- <if test="wUnit != null and wUnit != ''">W_UNIT = #{wUnit},</if>
- <if test="departId != null and departId != ''">depart_Id = #{departId},</if>
- <if test="departNm != null and departNm != ''">depart_Nm = #{departNm},</if>
- <if test="dppost != null and dppost != ''">DPPOST = #{dppost},</if>
- <if test="idnm != null and idnm != ''">IDNM = #{idnm},</if>
- <if test="plst != null and plst != ''">PLST = #{plst},</if>
- <if test="school != null and school != ''">SCHOOL = #{school},</if>
- <if test="specialty != null and specialty != ''">SPECIALTY = #{specialty},</if>
- <if test="imgurl != null and imgurl != ''">IMGURL = #{imgurl},</if>
- <if test="dpnm != null and dpnm != ''">DPNM = #{dpnm},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="pwd != null and pwd != ''">PWD = #{pwd},</if>
- <if test="sex != null">SEX = #{sex},</if>
- <if test="telnumb != null and telnumb != ''">TELNUMB = #{telnumb},</if>
- <if test="faxnumb != null and faxnumb != ''">FAXNUMB = #{faxnumb},</if>
- <if test="mobilenumb != null and mobilenumb != ''">MOBILENUMB = #{mobilenumb},</if>
- <if test="email != null and email != ''">EMAIL = #{email},</if>
- <if test="bornDate != null">BORN_DATE = #{bornDate},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="admDuty != null and admDuty != ''">ADM_DUTY = #{admDuty},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="loginTm != null">LOGIN_TM = #{loginTm},</if>
- <if test="remark != null and remark != ''">REMARK = #{remark},</if>
- <if test="permission != null and permission != ''">PERMISSION = #{permission},</if>
- <if test="ownerSystem != null and ownerSystem != ''">OWNER_SYSTEM = #{ownerSystem},</if>
- <if test="persType != null and persType != ''">PERS_TYPE = #{persType},</if>
- <if test="planDpId != null and planDpId != ''">PLAN_DP_ID = #{planDpId},</if>
- </trim>
- <where>guid = #{guid}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers">
- update BIS_INSP_ALL_RLATION_PERS
- <trim prefix="set" suffixOverrides=",">
- <if test="callnumber != null and callnumber != ''">CALLNUMBER = #{callnumber},</if>
- <if test="wUnit != null and wUnit != ''">W_UNIT = #{wUnit},</if>
- <if test="departId != null and departId != ''">depart_Id = #{departId},</if>
- <if test="departNm != null and departNm != ''">depart_Nm = #{departNm},</if>
- <if test="dppost != null and dppost != ''">DPPOST = #{dppost},</if>
- <if test="idnm != null and idnm != ''">IDNM = #{idnm},</if>
- <if test="plst != null and plst != ''">PLST = #{plst},</if>
- <if test="school != null and school != ''">SCHOOL = #{school},</if>
- <if test="specialty != null and specialty != ''">SPECIALTY = #{specialty},</if>
- <if test="imgurl != null and imgurl != ''">IMGURL = #{imgurl},</if>
- <if test="dpnm != null and dpnm != ''">DPNM = #{dpnm},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="pwd != null and pwd != ''">PWD = #{pwd},</if>
- <if test="sex != null">SEX = #{sex},</if>
- <if test="telnumb != null and telnumb != ''">TELNUMB = #{telnumb},</if>
- <if test="faxnumb != null and faxnumb != ''">FAXNUMB = #{faxnumb},</if>
- <if test="mobilenumb != null and mobilenumb != ''">MOBILENUMB = #{mobilenumb},</if>
- <if test="email != null and email != ''">EMAIL = #{email},</if>
- <if test="bornDate != null">BORN_DATE = #{bornDate},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="admDuty != null and admDuty != ''">ADM_DUTY = #{admDuty},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="remark != null and remark != ''">REMARK = #{remark},</if>
- <if test="permission != null and permission != ''">PERMISSION = #{permission},</if>
- <if test="ownerSystem != null and ownerSystem != ''">OWNER_SYSTEM = #{ownerSystem},</if>
- <if test="persType != null and persType != ''">PERS_TYPE = #{persType},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="getZjList" resultMap="bisInspAllRlationPersResultMap">
- SELECT * FROM BIS_INSP_ALL_RLATION_PERS WHERE IDNM IS NOT NULL
- </select>
- <!-- 在线人数resultType="Integer" -->
- <select id="selectCountOnlinePers" resultType="java.lang.Integer" parameterType="java.lang.String">
- SELECT COUNT(*) FROM(
- SELECT DISTINCT USER_ID FROM
- BIS_INSP_LOG
- WHERE INTM >= STR_TO_DATE(#{sttm}, '%Y-%m-%d %H:%i:%S')
- AND INTM <= STR_TO_DATE(#{entm}, '%Y-%m-%d %H:%i:%S')
- <include refid="orgIdsql"/>
- GROUP BY USER_ID
- ) s
- </select>
- <sql id="orgIdsql">
- <choose>
- <when test="orgId !=null and orgId !=''">
- AND ORG_ID=#{orgId}
- </when>
- <otherwise>
- AND ORG_ID is null
- </otherwise>
- </choose>
- </sql>
- <select id="selectOnlinePers" resultType="java.util.HashMap" parameterType="java.lang.String">
- SELECT B.* FROM (
- SELECT DISTINCT USER_ID FROM
- BIS_INSP_LOG
- WHERE INTM >= STR_TO_DATE(#{sttm}, '%Y-%m-%d %H:%i:%S')
- AND INTM <= STR_TO_DATE(#{entm}, '%Y-%m-%d %H:%i:%S')
- <include refid="orgIdsql"/>
- GROUP BY USER_ID
- )A LEFT JOIN BIS_INSP_ALL_RLATION_PERS B ON B.GUID = A.USER_ID
- </select>
- <update id="setHeadMan" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlation">
- UPDATE BIS_INSP_ALL_RLATION SET PERTYPE = #{pertype} WHERE PERSID = #{persid} AND ID = #{id} AND ORG_ID=#{orgId}
- </update>
- <select id="getLeaderByGroup" parameterType="cn.com.goldenwater.dcproj.param.GroupLeaderParam"
- resultType="cn.com.goldenwater.dcproj.dto.GroupLeaderDto">
- SELECT A.GUID,A.PERS_NAME,A.MOBILENUMB FROM BIS_INSP_ALL_RLATION_PERS A
- LEFT JOIN (SELECT B.PERSID PERSID,B.AD_CODE FROM BIS_INSP_ALL_RLATION B LEFT JOIN BIS_INSP_ALL_OBJ C ON B.ID = C.ID
- WHERE B.ID LIKE '${id}%' AND C.OBJ_ID = #{objId} AND B.PERTYPE = '1') T1
- ON A.GUID = T1.PERSID where T1.PERSID IS NOT NULL
- <if test="province !=null and province !=''">
- AND T1.ad_code=#{province}
- </if>
- limit 1
- </select>
- <select id="findPersData" parameterType="cn.com.goldenwater.dcproj.param.BisInspAllRlationPersParam"
- resultType="cn.com.goldenwater.dcproj.dto.PersListDto">
- select CALLNUMBER,
- DPNM,
- W_UNIT,
- DPPOST,
- IDNM,
- PLST,
- SCHOOL,
- SPECIALTY,
- IMGURL,
- GUID,
- PERS_NAME,
- SEX,
- TELNUMB,
- FAXNUMB,
- MOBILENUMB,
- EMAIL,
- BORN_DATE,
- ORG_ID,
- ORG_NM,
- ADM_DUTY,
- COLL_TIME,
- REMARK,
- PERMISSION,PERS_TYPE from BIS_INSP_ALL_RLATION_PERS WHERE 1 = 1
- <if test="callnumber != null and callnumber != ''">and CALLNUMBER = #{callnumber}</if>
- <if test="dppost != null and dppost != ''">and DPPOST = #{dppost}</if>
- <if test="idnm != null and idnm != ''">and IDNM like CONCAT(#{idnm} , '%')</if>
- <if test="plst != null and plst != ''">and PLST = #{plst}</if>
- <if test="school != null and school != ''">and SCHOOL = #{school}</if>
- <if test="specialty != null and specialty != ''">and SPECIALTY = #{specialty}</if>
- <if test="imgurl != null and imgurl != ''">and IMGURL = #{imgurl}</if>
- <if test="guid != null and guid != ''">and GUID = #{guid}</if>
- <if test="persName != null and persName != ''">and PERS_NAME like CONCAT('%' , #{persName} , '%')</if>
- <if test="pwd != null and pwd != ''">and PWD = #{pwd}</if>
- <if test="sex != null">and SEX = #{sex}</if>
- <if test="telnumb != null and telnumb != ''">and TELNUMB like CONCAT(#{telnumb} , '%')</if>
- <if test="faxnumb != null and faxnumb != ''">and FAXNUMB = #{faxnumb}</if>
- <if test="mobilenumb != null and mobilenumb != ''">and MOBILENUMB = #{mobilenumb}</if>
- <if test="email != null and email != ''">and EMAIL = #{email}</if>
- <if test="bornDate != null">and BORN_DATE = #{bornDate}</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="orgNm != null and orgNm != ''">and ORG_NM like CONCAT(#{orgNm} , '%')</if>
- <if test="admDuty != null and admDuty != ''">and ADM_DUTY = #{admDuty}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="remark != null and remark != ''">and REMARK = #{remark}</if>
- <if test="permission != null and permission != ''">and PERMISSION = #{permission}</if>
- <if test="phoneIsNull!=null and phoneIsNull!=''">and MOBILENUMB is null</if>
- <if test="planDpId != null and planDpId != ''">and PLAN_DP_ID = #{planDpId}</if>
- </select>
- <select id="listByCurUser" resultType="cn.com.goldenwater.dcproj.dto.PersListDto">
- SELECT A.*,B.ROLES,s.org_ids,s.org_names
- FROM BIS_INSP_ALL_RLATION_PERS A LEFT JOIN
- (
- SELECT A.GUID, GROUP_CONCAT(C.ROLE_NAME) as ROLES
- FROM BIS_INSP_ALL_RLATION_PERS A
- left join GW_SYS_REL_USER_ROLE B
- ON A.GUID=B.USER_ID
- LEFT JOIN GW_SYS_ROLE C
- ON B.ROLE_ID=C.ID
- GROUP BY A.GUID
- )B ON A.GUID=B.GUID
- left join (
- Select g.pers_id,GROUP_CONCAT(g.org_id) org_ids,GROUP_CONCAT(o.org_nm) org_names
- from Bis_Insp_Pers_Org g,bis_insp_org o where g.org_id=o.org_id
- <if test="province !=null and province !=''">
- AND o.rlcode LIKE CONCAT(#{province},'%')
- </if>
- group by g.pers_id
- )s on A.Guid=s.pers_id
- WHERE 1=1
- <if test="name != null and name != ''">
- and A.PERS_NAME LIKE CONCAT('%',#{name},'%')
- </if>
- <if test="list != null and list.size()>0">
- AND A.OWNER_SYSTEM IN
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="orgId !=null and orgId !=''">
- and s.org_ids LIKE '%${orgId}%'
- </if>
- <if test="phoneIsNull!=null and phoneIsNull!=''">
- and A.MOBILENUMB is null
- </if>
- <if test="orgNm != null and orgNm != ''">
- and (A.ORG_NM LIKE CONCAT('%',#{orgNm},'%') or s.org_names LIKE CONCAT('%',#{orgNm},'%'))
- </if>
- <if test="mobilenumb != null and mobilenumb != ''">and A.MOBILENUMB = #{mobilenumb}</if>
- <if test="dpnm != null and dpnm != ''">and A.DPNM like '%${dpnm}%'</if>
- <if test="planDpId != null and planDpId != ''">and A.PLAN_DP_ID = #{planDpId}</if>
- ORDER BY A.INTM,A.PERS_NAME desc
- </select>
- <select id="getByPlanId" resultType="cn.com.goldenwater.dcproj.dto.BisInspAllRlationDto">
- select A.PERTYPE,B.GUID,PERS_NAME,MOBILENUMB from bis_insp_all_rlation A LEFT JOIN BIS_INSP_ALL_RLATION_PERS B ON A.PERSID=B.GUID where A.id=#{planId}
- </select>
- <update id="updatePersTypeById">
- UPDATE BIS_INSP_ALL_RLATION_PERS SET PERS_TYPE = #{persType} WHERE GUID = #{guid}
- </update>
- <update id="updatePassword" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers">
- update BIS_INSP_ALL_RLATION_PERS set PWD = #{pwd} where GUID = #{guid}
- </update>
- <insert id="insertRelation">
- INSERT INTO BIS_INSP_ALL_RLATION(persId,id,PERTYPE,org_id,ad_code,type) VALUES(#{guid},#{s},'2',#{orgId},#{adCode},#{type})
- </insert>
- <select id="getNodeInfo" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.BisInspAllDto">
- SELECT * FROM BIS_INSP_ALL WHERE ID = #{s}
- </select>
- <select id="getRelationData" resultType="cn.com.goldenwater.dcproj.model.BisInspAllRlation">
- SELECT * FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{guid} AND ID = #{s}
- <if test="orgId !=null and orgId !=''">
- and ORG_ID=#{orgId}
- </if>
- <choose>
- <when test="adCode !=null and adCode !=''">
- and ad_code=#{adCode}
- </when>
- <otherwise>
- and ad_code is null
- </otherwise>
- </choose>
- </select>
- <select id="getSysUsers" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT * FROM BIS_INSP_ALL_RLATION_PERS T
- WHERE 1=1
- <if test="orgIds != null and orgIds != ''">AND
- <foreach item="item" index="index" collection="orgIds.split(',')" open="(" separator="OR" close=")">
- T.ORG_ID = #{item}
- </foreach>
- </if>
- <if test="persTypes != null and persTypes != ''">AND
- <foreach item="item" index="index" collection="persTypes.split(',')" open="(" separator="OR" close=")">
- T.PERS_TYPE = #{item}
- </foreach>
- </if>
- </select>
- <select id="findListByPersId" resultMap="bisInspAllRlationPersDtoResultMap" parameterType="cn.com.goldenwater.dcproj.param.PersPositionParam">
- select distinct tp.GUID,
- tp.DPNM,
- tp.W_UNIT,
- tp.DPPOST,
- tp.IDNM,
- tp.PLST,
- tp.SCHOOL,
- tp.SPECIALTY,
- tp.IMGURL,
- tp.PERS_NAME,
- tp.SEX,
- tp.TELNUMB,
- tp.FAXNUMB,
- tp.MOBILENUMB,
- tp.EMAIL,
- tp.BORN_DATE,
- tp.ORG_ID,
- tp.ORG_NM,
- tp.ADM_DUTY,
- tp.COLL_TIME,
- tp.REMARK,tp.PERMISSION,
- cr.operate_time,cr.LONGITUDE lgtd,cr.LATITUDE lttd,cr.LON centerXGd,cr.LAT centerYGd,
- CASE WHEN tr.GUID IS NOT NULL THEN '1'
- WHEN tr.GUID IS NULL THEN '0'
- END AS STATE
- from
- (
- select distinct t.GUID,
- t.DPNM,
- t.W_UNIT,
- t.DPPOST,
- t.IDNM,
- t.PLST,
- t.SCHOOL,
- t.SPECIALTY,
- t.IMGURL,
- t.PERS_NAME,
- t.SEX,
- t.TELNUMB,
- t.FAXNUMB,
- t.MOBILENUMB,
- t.EMAIL,
- t.BORN_DATE,
- t.ORG_ID,
- t.ORG_NM,
- t.ADM_DUTY,
- t.COLL_TIME,
- t.REMARK,t.PERMISSION from Tac_Insp_Year_Batch_Group_Pers rla left join tac_worker_b b on rla.pers_id = b.id left join bis_insp_all_rlation_pers t on b.login_id = t.guid
- where b.id is not null and t.guid is not null
- <if test="persId != null and persId != ''">
- and rla.group_id in (select group_id from Tac_Insp_Year_Batch_Group_Pers p where p.pers_id in (select id from tac_worker_b b where b.login_id = #{persId}))
- </if>
- <if test="orgId != null and orgId != ''">
- and rla.group_id = #{orgId}
- </if>
- <if test="year != null">
- and rla.year = #{year}
- </if>
- <if test="batch != null">
- and rla.batch = #{batch}
- </if>
- <if test="persName != null and persName != ''">and b.name like CONCAT('%', #{persName}, '%')</if>
- ) tp LEFT JOIN
- (SELECT t.GUID,
- t.DPNM,
- t.W_UNIT,
- t.DPPOST,
- t.IDNM,
- t.PLST,
- t.SCHOOL,
- t.SPECIALTY,
- t.IMGURL,
- t.PERS_NAME,
- t.SEX,
- t.TELNUMB,
- t.FAXNUMB,
- t.MOBILENUMB,
- t.EMAIL,
- t.BORN_DATE,
- t.ORG_ID,
- t.ORG_NM,
- t.ADM_DUTY,
- t.COLL_TIME,
- t.REMARK,t.PERMISSION,
- t1.operate_time,t1.LONGITUDE lgtd,t1.LATITUDE lttd,
- t1.LON centerXGd,t1.LAT centerYGd FROM bis_insp_all_rlation_pers t
- left join pers_position_latest t1 on t.guid = t1.pers_id
- where t1.PERS_ID is not null
- and t1.OPERATE_TIME >= #{operateTime}
- ) tr on tp.guid = tr.guid
- LEFT JOIN pers_position_latest cr on tp.guid = cr.PERS_ID
- <if test="status != null and status != ''">AND tr.GUID IS NOT NULL</if>
- </select>
- <select id="listByMap" parameterType="java.util.Map" resultType="cn.com.goldenwater.dcproj.dto.PersListDto">
- <choose>
- <!-- 查询单位下的所有人员列表 -->
- <when test='null != isAll and "" != isAll and "1" == isAll.toString()'>
- SELECT P.CALLNUMBER,
- P.DPNM,
- P.W_UNIT,
- P.DPPOST,
- P.IDNM,
- P.PLST,
- P.SCHOOL,
- P.SPECIALTY,
- P.IMGURL,
- P.GUID,
- P.PERS_NAME,
- P.SEX,
- P.TELNUMB,
- P.FAXNUMB,
- P.MOBILENUMB,
- P.EMAIL,
- P.BORN_DATE,
- P.ORG_ID,
- P.ORG_NM,
- P.ADM_DUTY,
- P.COLL_TIME,
- P.REMARK,
- P.PERMISSION,
- p.MOHURD,
- P.AGE,
- count(case when BR.PERSID is not null then BR.PERSID end ) as "dcNum"
- FROM BIS_INSP_ALL_RLATION_PERS P
- JOIN BIS_INSP_PERS_ORG BIPO ON BIPO.PERS_ID = P.GUID
- JOIN BIS_INSP_ORG BIO ON BIPO.org_id = BIO.org_id
- LEFT JOIN (select B.PERSID,B.ID, T.NAME,C.STTM,C.INTM
- FROM BIS_INSP_ALL_RLATION B
- JOIN BIS_INSP_ALL C ON B.ID = C.ID
- JOIN (select * FROM ATT_INSP_TYPE where code IN (select INSP_TYPE FROM REL_ORG_INSP_TYPE
- <where>
- <if test="orgId != null and orgId != '' ">
- AND ORG_ID = #{orgId}
- </if>
- </where>
- )) T ON SUBSTR(C.ID, 1, 3) = T.CODE
- LEFT JOIN BIS_INSP_ALL_OBJ O ON O.ID = C.ID
- <where>
- LENGTH(C.ID) = 12
- <if test="depm != null and depm.size() > 0 ">
- AND SUBSTR(C.ID, 1, 3) IN (SELECT PTYPE FROM ATT_INSP_TYPE_DUTY where DUTY_DEP IN
- <foreach item="item" index="index" collection="depm" open="(" separator="," close=")">
- '${item}'
- </foreach>
- )
- </if>
- <if test="orgId != null and orgId != '' ">
- AND B.ID LIKE '___${orgId}%'
- </if>
- <if test="sttm != null and sttm != '' ">
- and C.STTM >= STR_TO_DATE(#{sttm}, '%Y-%m-%d')
- </if>
- <if test="entm != null and entm != '' ">
- and C.INTM < date_add( STR_TO_DATE(#{entm},'%Y-%m-%d'), INTERVAL 1 day )
- </if>
- <if test="adCode != null and adCode != ''">and O.OBJ_AD_CODE like concat(#{adCode}, '%')</if>
- <if test="objType != null and objType != ''">and B.ID like '${objType}%'</if>
- <if test="objTypeName != null and objTypeName != ''">and T.NAME like '%${objTypeName}%'</if>
- <if test="pnm != null and pnm != ''">and C.PNM LIKE '%${pnm}%'</if>
- </where>
- ) BR ON P.GUID = BR.PERSID
- <where>
- <if test='orgId != null and orgId != "" '>
- AND BIO.ORG_ID = #{orgId}
- </if>
- <if test='adCode != null and adCode != "" '>
- AND BIO.AD_CODE LIKE CONCAT(#{adCode}, '%' )
- </if>
- <if test="objType != null and objType != ''">and BR.ID like '${objType}%'</if>
- <if test="objTypeName != null and objTypeName != ''">and BR.NAME like '%${objTypeName}%'</if>
- <if test="persName != null and persName != ''">and P.PERS_NAME like concat('%' , #{persName} , '%')</if>
- <if test="telnumb != null and telnumb != ''">and P.TELNUMB LIKE concat('%' , #{telnumb}, '%')</if>
- <if test="faxnumb != null and faxnumb != ''">and P.FAXNUMB = #{faxnumb}</if>
- <if test="mobilenumb != null and mobilenumb != ''">and P.MOBILENUMB LIKE '%${mobilenumb}%'</if>
- <if test="email != null and email != ''">and P.EMAIL = #{email}</if>
- <if test="orgNm != null and orgNm != ''">and P.ORG_NM LIKE '%${orgNm}%'</if>
- <if test="admDuty != null and admDuty != ''">and P.ADM_DUTY = #{admDuty}</if>
- <if test="remark != null and remark != ''">and P.REMARK = #{remark}</if>
- <if test="permission != null and permission != ''">and P.PERMISSION = #{permission}</if>
- <if test="planDpId != null and planDpId != ''">and P.PLAN_DP_ID = #{planDpId}</if>
- </where>
- GROUP BY P.CALLNUMBER,
- P.DPNM,
- P.W_UNIT,
- P.DPPOST,
- P.IDNM,
- P.PLST,
- P.SCHOOL,
- P.SPECIALTY,
- P.IMGURL,
- P.GUID,
- P.PERS_NAME,
- P.SEX,
- P.TELNUMB,
- P.FAXNUMB,
- P.MOBILENUMB,
- P.EMAIL,
- P.BORN_DATE,
- P.ORG_ID,
- P.ORG_NM,
- P.ADM_DUTY,
- P.COLL_TIME,
- P.REMARK,
- P.PERMISSION,
- p.MOHURD,
- P.AGE
- order by count(case when BR.PERSID is not null then BR.PERSID end ) desc
- </when>
- <!-- 默认查询 督查人员 列表 -->
- <otherwise>
- SELECT P.CALLNUMBER,
- P.DPNM,
- P.W_UNIT,
- P.DPPOST,
- P.IDNM,
- P.PLST,
- P.SCHOOL,
- P.SPECIALTY,
- P.IMGURL,
- P.GUID,
- P.PERS_NAME,
- P.SEX,
- P.TELNUMB,
- P.FAXNUMB,
- P.MOBILENUMB,
- P.EMAIL,
- P.BORN_DATE,
- P.ORG_ID,
- P.ORG_NM,
- P.ADM_DUTY,
- P.COLL_TIME,
- P.REMARK,
- P.PERMISSION,
- p.MOHURD,
- P.AGE,
- count(B.PERSID) as "dcNum"
- FROM BIS_INSP_ALL_RLATION B
- JOIN BIS_INSP_ALL C ON B.ID = C.ID
- JOIN BIS_INSP_ALL_RLATION_PERS P ON P.GUID = B.PERSID
- JOIN (select * FROM ATT_INSP_TYPE where code IN (select INSP_TYPE FROM REL_ORG_INSP_TYPE
- <where>
- <if test="orgId != null and orgId != '' ">
- AND ORG_ID = #{orgId}
- </if>
- </where>
- )) T ON SUBSTR(C.ID, 1, 3) = T.CODE
- LEFT JOIN BIS_INSP_ALL_OBJ O ON O.ID = C.ID
- <where>
- LENGTH(C.ID) = 12
- <if test="depm != null and depm.size() > 0 ">
- AND SUBSTR(C.ID, 1, 3) IN (SELECT PTYPE FROM ATT_INSP_TYPE_DUTY where DUTY_DEP IN
- <foreach item="item" index="index" collection="depm" open="(" separator="," close=")">
- '${item}'
- </foreach>
- )
- </if>
- <if test="orgId != null and orgId != '' ">
- AND B.ID LIKE '___${orgId}%'
- </if>
- <if test="sttm != null and sttm != '' ">
- and C.STTM >= STR_TO_DATE(#{sttm}, '%Y-%m-%d')
- </if>
- <if test="entm != null and entm != '' ">
- and C.INTM < date_add( STR_TO_DATE(#{entm},'%Y-%m-%d'), INTERVAL 1 day )
- </if>
- <if test="adCode != null and adCode != ''">and O.OBJ_AD_CODE like concat(#{adCode}, '%')</if>
- <if test="objType != null and objType != ''">and B.ID like '${objType}%'</if>
- <if test="objTypeName != null and objTypeName != ''">and T.NAME like '%${objTypeName}%'</if>
- <if test="persName != null and persName != ''">and P.PERS_NAME like concat('%' , #{persName} , '%')</if>
- <if test="telnumb != null and telnumb != ''">and P.TELNUMB LIKE concat('%' , #{telnumb}, '%')</if>
- <if test="faxnumb != null and faxnumb != ''">and P.FAXNUMB = #{faxnumb}</if>
- <if test="mobilenumb != null and mobilenumb != ''">and P.MOBILENUMB LIKE '%${mobilenumb}%'</if>
- <if test="pnm != null and pnm != ''">and C.PNM LIKE '%${pnm}%'</if>
- <if test="email != null and email != ''">and P.EMAIL = #{email}</if>
- <if test="orgNm != null and orgNm != ''">and P.ORG_NM LIKE '%${orgNm}%'</if>
- <if test="admDuty != null and admDuty != ''">and P.ADM_DUTY = #{admDuty}</if>
- <if test="remark != null and remark != ''">and P.REMARK = #{remark}</if>
- <if test="permission != null and permission != ''">and P.PERMISSION = #{permission}</if>
- <if test="planDpId != null and planDpId != ''">and P.PLAN_DP_ID = #{planDpId}</if>
- </where>
- GROUP BY P.CALLNUMBER,
- P.DPNM,
- P.W_UNIT,
- P.DPPOST,
- P.IDNM,
- P.PLST,
- P.SCHOOL,
- P.SPECIALTY,
- P.IMGURL,
- P.GUID,
- P.PERS_NAME,
- P.SEX,
- P.TELNUMB,
- P.FAXNUMB,
- P.MOBILENUMB,
- P.EMAIL,
- P.BORN_DATE,
- P.ORG_ID,
- P.ORG_NM,
- P.ADM_DUTY,
- P.COLL_TIME,
- P.REMARK,
- P.PERMISSION,
- p.MOHURD,
- P.AGE
- </otherwise>
- </choose>
- </select>
- <select id="getPersByObjId" resultType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPers">
- select distinct pe.* from BIS_INSP_ALL_OBJ t
- left join bis_insp_all a on t.id = a.id
- left join bis_insp_all_rlation p on a.id = p.id
- left join bis_insp_all_rlation_pers pe on p.persid = pe.guid
- where t.obj_id = #{objId} and p.pertype = #{pertype}
- </select>
- </mapper>
|