|
@@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="avatar" column="avatar" />
|
|
<result property="avatar" column="avatar" />
|
|
|
<result property="phone" column="phone" />
|
|
<result property="phone" column="phone" />
|
|
|
<result property="packageName" column="package_name" />
|
|
<result property="packageName" column="package_name" />
|
|
|
|
|
+ <result property="companyUserName" column="nick_name" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsSopCompanyUserTaskVo">
|
|
<sql id="selectFsSopCompanyUserTaskVo">
|
|
@@ -64,12 +65,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sct.update_time,
|
|
sct.update_time,
|
|
|
sct.remark,
|
|
sct.remark,
|
|
|
sct.type,
|
|
sct.type,
|
|
|
|
|
+ cu.nick_name,
|
|
|
sct.qw_external_contact_id
|
|
sct.qw_external_contact_id
|
|
|
FROM
|
|
FROM
|
|
|
fs_sop_company_user_task sct
|
|
fs_sop_company_user_task sct
|
|
|
LEFT JOIN fs_doctor fd ON sct.doctor_id = fd.doctor_id
|
|
LEFT JOIN fs_doctor fd ON sct.doctor_id = fd.doctor_id
|
|
|
LEFT JOIN qw_external_contact qwec ON sct.qw_external_contact_id = qwec.id
|
|
LEFT JOIN qw_external_contact qwec ON sct.qw_external_contact_id = qwec.id
|
|
|
LEFT JOIN fs_user fu ON qwec.fs_user_id = fu.user_id
|
|
LEFT JOIN fs_user fu ON qwec.fs_user_id = fu.user_id
|
|
|
|
|
+ LEFT JOIN company_user cu ON cu.user_id = sct.company_user_id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="id != null "> and sct.id = #{id}</if>
|
|
<if test="id != null "> and sct.id = #{id}</if>
|
|
|
<if test="doctorId != null "> and sct.doctor_id = #{doctorId}</if>
|
|
<if test="doctorId != null "> and sct.doctor_id = #{doctorId}</if>
|
|
@@ -80,8 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyUserId != null "> and sct.company_user_id = #{companyUserId}</if>
|
|
<if test="companyUserId != null "> and sct.company_user_id = #{companyUserId}</if>
|
|
|
<if test="status != null "> and sct.status = #{status}</if>
|
|
<if test="status != null "> and sct.status = #{status}</if>
|
|
|
<if test="qwUserId != null "> and qwec.qw_user_id = #{qwUserId}</if>
|
|
<if test="qwUserId != null "> and qwec.qw_user_id = #{qwUserId}</if>
|
|
|
- <if test="name != null "> and qwec.name like concat('%', #{name}, '%')</if>
|
|
|
|
|
- <if test="doctorName != null "> and fd.doctor_name like concat('%', #{doctorName}, '%')</if>
|
|
|
|
|
|
|
+ <if test="name != null and name !='' "> and qwec.name like concat('%', #{name}, '%')</if>
|
|
|
|
|
+ <if test="doctorName != null and doctorName != ''"> and fd.doctor_name like concat('%', #{doctorName}, '%')</if>
|
|
|
|
|
+ <if test="companyUserName != null and companyUserName !=''"> and cu.nick_name like concat('%', #{companyUserName}, '%')</if>
|
|
|
<if test="beginTime != null and beginTime != ''">
|
|
<if test="beginTime != null and beginTime != ''">
|
|
|
and sct.create_time >= str_to_date(#{beginTime}, '%Y-%m-%d %H:%i:%s')
|
|
and sct.create_time >= str_to_date(#{beginTime}, '%Y-%m-%d %H:%i:%s')
|
|
|
</if>
|
|
</if>
|