|
|
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="packageId" column="package_id" />
|
|
|
<result property="orderCode" column="order_code" />
|
|
|
<result property="type" column="type" />
|
|
|
+ <result property="qwExternalContactId" column="qw_external_contact_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="com.fs.his.vo.SopDoctorTaskVo" id="SopDoctorTaskVoResult">
|
|
|
@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="remark" column="remark" />
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
+ <result property="qwExternalContactId" column="qw_external_contact_id" />
|
|
|
|
|
|
<!-- 关联表字段 -->
|
|
|
<result property="name" column="name" /> <!-- qwec.name -->
|
|
|
@@ -41,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsSopDoctorTaskVo">
|
|
|
- select id, company_user_id,doctor_id, user_id, status, create_time, update_time, remark, package_id, order_code, type from fs_sop_doctor_task
|
|
|
+ select id, company_user_id,doctor_id, user_id, status, create_time, update_time, remark, package_id, order_code, type,qw_external_contact_id from fs_sop_doctor_task
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsSopDoctorTaskVoList" parameterType="com.fs.his.vo.SopDoctorTaskVo" resultMap="SopDoctorTaskVoResult">
|
|
|
@@ -51,7 +53,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
qwec.name,
|
|
|
qwec.avatar,
|
|
|
fu.phone,
|
|
|
- fp.package_name,
|
|
|
cp.nick_name as company_user_name,
|
|
|
cp.user_id as company_user_id,
|
|
|
sdt.status,
|
|
|
@@ -59,13 +60,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sdt.create_time,
|
|
|
sdt.update_time,
|
|
|
sdt.remark,
|
|
|
- sdt.type
|
|
|
+ sdt.type,
|
|
|
+ sdt.qw_external_contact_id
|
|
|
FROM
|
|
|
fs_sop_doctor_task sdt
|
|
|
LEFT JOIN company_user cp ON sdt.company_user_id = cp.user_id
|
|
|
- LEFT JOIN qw_external_contact qwec ON sdt.user_id = qwec.id
|
|
|
+ LEFT JOIN qw_external_contact qwec ON sdt.qw_external_contact_id = qwec.id
|
|
|
LEFT JOIN fs_user fu ON qwec.fs_user_id = fu.user_id
|
|
|
- LEFT JOIN fs_package fp ON fp.package_id=sdt.package_id
|
|
|
<where>
|
|
|
<if test="id != null "> and sdt.id = #{id}</if>
|
|
|
<if test="doctorId != null "> and sdt.doctor_id = #{doctorId}</if>
|
|
|
@@ -95,7 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
qwec.name,
|
|
|
qwec.avatar,
|
|
|
fu.phone,
|
|
|
- fp.package_name,
|
|
|
cp.nick_name as company_user_name,
|
|
|
cp.user_id as company_user_id,
|
|
|
sdt.status,
|
|
|
@@ -103,13 +103,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sdt.create_time,
|
|
|
sdt.update_time,
|
|
|
sdt.remark,
|
|
|
- sdt.type
|
|
|
+ sdt.type,
|
|
|
+ sdt.qw_external_contact_id
|
|
|
FROM
|
|
|
fs_sop_doctor_task sdt
|
|
|
LEFT JOIN company_user cp ON sdt.company_user_id = cp.user_id
|
|
|
- LEFT JOIN qw_external_contact qwec ON sdt.user_id = qwec.id
|
|
|
+ LEFT JOIN qw_external_contact qwec ON sdt.qw_external_contact_id = qwec.id
|
|
|
LEFT JOIN fs_user fu ON qwec.fs_user_id = fu.user_id
|
|
|
- LEFT JOIN fs_package fp ON fp.package_id=sdt.package_id
|
|
|
where sdt.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
@@ -126,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="packageId != null">package_id,</if>
|
|
|
<if test="orderCode != null">order_code,</if>
|
|
|
<if test="type != null">type,</if>
|
|
|
+ <if test="qwExternalContactId != null">qw_external_contact_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
|
@@ -138,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="packageId != null">#{packageId},</if>
|
|
|
<if test="orderCode != null">#{orderCode},</if>
|
|
|
<if test="type != null">#{type},</if>
|
|
|
+ <if test="qwExternalContactId != null">#{qwExternalContactId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -154,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="packageId != null">package_id = #{packageId},</if>
|
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
<if test="type != null">type = #{type},</if>
|
|
|
+ <if test="qwExternalContactId != null">qw_external_contact_id=#{qwExternalContactId},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|