|
@@ -13,13 +13,13 @@
|
|
|
<result column="name_zh" jdbcType="VARCHAR" property="nameZh"/>
|
|
|
<result column="user_heand" jdbcType="VARCHAR" property="userHeand"/>
|
|
|
<result column="email" jdbcType="VARCHAR" property="email"/>
|
|
|
- <result column="APP_ID" jdbcType="VARCHAR" property="appId"/>
|
|
|
- <result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
|
|
|
- <result column="INS_CODE" jdbcType="VARCHAR" property="insCode"/>
|
|
|
- <result column="INS_NAME" jdbcType="VARCHAR" property="insName"/>
|
|
|
+ <result column="app_id" jdbcType="VARCHAR" property="appId"/>
|
|
|
+ <result column="app_name" jdbcType="VARCHAR" property="appName"/>
|
|
|
+ <result column="ins_code" jdbcType="VARCHAR" property="insCode"/>
|
|
|
+ <result column="ins_name" jdbcType="VARCHAR" property="insName"/>
|
|
|
<result column="dept_id" jdbcType="VARCHAR" property="deptId"/>
|
|
|
<result column="dept_name" jdbcType="VARCHAR" property="deptName"/>
|
|
|
- <result column="EXPIRE_DATE" jdbcType="TIMESTAMP" property="expireDate"/>
|
|
|
+ <result column="expire_date" jdbcType="TIMESTAMP" property="expireDate"/>
|
|
|
<result column="is_qualifier" jdbcType="INTEGER" property="isQualifier"/>
|
|
|
<result column="dept_id_his" jdbcType="VARCHAR" property="deptIdHis"/>
|
|
|
<result column="dept_name_his" jdbcType="VARCHAR" property="deptNameHis"/>
|
|
@@ -28,18 +28,21 @@
|
|
|
|
|
|
|
|
|
<select id="getList" parameterType="com.cbkj.platform.api.beans.user.AdminInfo" resultMap="BaseResultMap">
|
|
|
- select ai.user_id, ai.user_name, ai.name_zh, ai.app_id, ai.ins_code, ai.dept_id, ai.dept_name
|
|
|
+ select ai.user_id, ai.user_name, ai.name_zh, sdm.app_id, sdm.ins_code, sdm.dept_id, sdm.dept_name
|
|
|
+ , (select app.app_name from sys_app app where app.app_id = sdm.app_id and app.status = '0') app_name
|
|
|
+ , (select ins.ins_name from sys_institution ins where ins.ins_code = sdm.ins_code and ins.status = '0') ins_name
|
|
|
from sys_admin_info ai
|
|
|
+ join sys_doctor_multipoint sdm on sdm.user_id = ai.user_id
|
|
|
<where>
|
|
|
- ai.status = '1'
|
|
|
+ ai.status = '0'
|
|
|
<if test="appId != null and appId != ''">
|
|
|
- and ai.app_id = #{appId}
|
|
|
+ and sdm.app_id = #{appId}
|
|
|
</if>
|
|
|
<if test="insCode != null and insCode != ''">
|
|
|
- and ai.ins_code = #{insCode}
|
|
|
+ and sdm.ins_code = #{insCode}
|
|
|
</if>
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
- and ai.dept_id = #{deptId}
|
|
|
+ and sdm.dept_id = #{deptId}
|
|
|
</if>
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and ai.user_name like concat('%', #{userName}, '%')
|
|
@@ -48,25 +51,53 @@
|
|
|
and ai.name_zh like concat('%', #{nameZh}, '%')
|
|
|
</if>
|
|
|
</where>
|
|
|
+ group by ai.user_id
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="getDetail" parameterType="com.cbkj.platform.api.beans.user.AdminInfo" resultMap="BaseResultMap">
|
|
|
- select ai.*
|
|
|
+ select ai.user_id
|
|
|
+ , ai.user_name
|
|
|
+ , ai.name_zh
|
|
|
+ , ai.sex
|
|
|
+ , ai.phone
|
|
|
+ , ai.address
|
|
|
+ , ai.user_heand
|
|
|
+ , ai.email
|
|
|
+ , ai.certificate
|
|
|
+ , ai.last_ip
|
|
|
+ , ai.EXPIRE_DATE
|
|
|
+ , ai.is_qualifier
|
|
|
+ , ai.is_py_wb
|
|
|
+ , ai.qualifier_pic_path
|
|
|
+ , ai.personal_share
|
|
|
+ , ai.professional
|
|
|
+ , ai.professional_pic_path
|
|
|
+ , sdm.app_id
|
|
|
+ , sdm.ins_code
|
|
|
+ , sdm.dept_id
|
|
|
+ , sdm.dept_name
|
|
|
+ , sdm.dept_id_his
|
|
|
+ , sdm.dept_name_his
|
|
|
+ , sdm.employee_id
|
|
|
+ , (select app.app_name from sys_app app where app.app_id = sdm.app_id and app.status = '0') app_name
|
|
|
+ , (select ins.ins_name from sys_institution ins where ins.ins_code = sdm.ins_code and ins.status = '0') ins_name
|
|
|
+
|
|
|
from sys_admin_info ai
|
|
|
+ join sys_doctor_multipoint sdm on sdm.user_id = ai.user_id
|
|
|
<where>
|
|
|
- ai.status = '1'
|
|
|
+ ai.status = '0'
|
|
|
<if test="appId != null and appId != ''">
|
|
|
- and ai.app_id = #{appId}
|
|
|
+ and sdm.app_id = #{appId}
|
|
|
</if>
|
|
|
<if test="insCode != null and insCode != ''">
|
|
|
- and ai.ins_code = #{insCode}
|
|
|
+ and sdm.ins_code = #{insCode}
|
|
|
</if>
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
- and ai.dept_id = #{deptId}
|
|
|
+ and sdm.dept_id = #{deptId}
|
|
|
</if>
|
|
|
- <if test="employee_id != null and employee_id != ''">
|
|
|
- and ai.employee_id = #{employee_id}
|
|
|
+ <if test="employeeId != null and employeeId != ''">
|
|
|
+ and sdm.employee_id = #{employeeId}
|
|
|
</if>
|
|
|
<if test="userId != null and userId != ''">
|
|
|
and ai.user_id = #{userId}
|
|
@@ -76,31 +107,31 @@
|
|
|
|
|
|
<select id="getListByMultipoint" parameterType="com.cbkj.platform.api.beans.user.AdminInfo" resultMap="BaseResultMap">
|
|
|
select e.*
|
|
|
- ,(select app.app_name from sys_app app where app.app_id = e.APP_ID) APP_NAME
|
|
|
- ,(select ins.INS_NAME from sys_institution ins where ins.ins_code = e.INS_CODE and ins.app_id = e.APP_ID) INS_NAME
|
|
|
+ ,(select app.app_name from sys_app app where app.app_id = e.APP_ID and app.status = '0') APP_NAME
|
|
|
+ ,(select ins.INS_NAME from sys_institution ins where ins.ins_code = e.INS_CODE and ins.app_id = e.APP_ID and ins.status = '0') INS_NAME
|
|
|
from
|
|
|
(
|
|
|
- select ai.user_id, ai.user_name, ai.name_zh
|
|
|
- , IFNULL(dm.app_id, IFNULL(ai.app_id, '000000')) app_id
|
|
|
- , IFNULL(dm.ins_code, IFNULL(ai.ins_code, '000000')) ins_code
|
|
|
- , IFNULL(dm.dept_id, IFNULL(ai.dept_id, '000000')) dept_id
|
|
|
- , IFNULL(dm.dept_name, IFNULL(ai.dept_name, '000000')) dept_name
|
|
|
- from sys_admin_info ai
|
|
|
- left join sys_doctor_multipoint dm on dm.user_id = ai.user_id
|
|
|
- where ai.status = '1'
|
|
|
- <if test="appId != null and appId != ''">
|
|
|
- and dm.app_id = #{appId}
|
|
|
- </if>
|
|
|
- <if test="insCode != null and insCode != ''">
|
|
|
- and dm.ins_code = #{insCode}
|
|
|
- </if>
|
|
|
- <if test="deptId != null and deptId != ''">
|
|
|
- and dm.dept_id = #{deptId}
|
|
|
- </if>
|
|
|
- <if test="deptIdHis != null and deptIdHis != ''">
|
|
|
- and dm.dept_id_his = #{deptIdHis}
|
|
|
- </if>
|
|
|
- order by app_id, ins_code, dept_id
|
|
|
+ select ai.user_id, ai.user_name, ai.name_zh
|
|
|
+ , IFNULL(dm.app_id, IFNULL(ai.app_id, '000000')) app_id
|
|
|
+ , IFNULL(dm.ins_code, IFNULL(ai.ins_code, '000000')) ins_code
|
|
|
+ , IFNULL(dm.dept_id, IFNULL(ai.dept_id, '000000')) dept_id
|
|
|
+ , IFNULL(dm.dept_name, IFNULL(ai.dept_name, '000000')) dept_name
|
|
|
+ from sys_admin_info ai
|
|
|
+ left join sys_doctor_multipoint dm on dm.user_id = ai.user_id
|
|
|
+ where ai.status = '0'
|
|
|
+ <if test="appId != null and appId != ''">
|
|
|
+ and dm.app_id = #{appId}
|
|
|
+ </if>
|
|
|
+ <if test="insCode != null and insCode != ''">
|
|
|
+ and dm.ins_code = #{insCode}
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and dm.dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="deptIdHis != null and deptIdHis != ''">
|
|
|
+ and dm.dept_id_his = #{deptIdHis}
|
|
|
+ </if>
|
|
|
+ order by app_id, ins_code, dept_id
|
|
|
) e
|
|
|
</select>
|
|
|
</mapper>
|