|
|
@@ -19,10 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="terminatedBy" column="terminated_by" />
|
|
|
<result property="remark" column="remark" />
|
|
|
<result property="orderCode" column="order_code" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserInformationCollectionScheduleVo">
|
|
|
- select id, collection_id, user_id, doctor_id, package_id, package_name, current_step, status, create_time, completed_time, terminated_time, terminated_by, remark,order_code from fs_user_information_collection_schedule
|
|
|
+ select id, collection_id, user_id, doctor_id, package_id, package_name, current_step, status, create_time, completed_time, terminated_time, terminated_by, remark,order_code,company_id, company_user_id from fs_user_information_collection_schedule
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsUserInformationCollectionScheduleList" parameterType="FsUserInformationCollectionSchedule" resultMap="FsUserInformationCollectionScheduleResult">
|
|
|
@@ -42,7 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
s.terminated_time,
|
|
|
s.terminated_by,
|
|
|
s.remark,
|
|
|
- s.order_code
|
|
|
+ s.order_code,
|
|
|
+ s.company_id,
|
|
|
+ s.company_user_id
|
|
|
FROM
|
|
|
fs_user_information_collection_schedule s
|
|
|
LEFT JOIN fs_user_information_collection c ON s.collection_id = c.id
|
|
|
@@ -61,6 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="terminatedTime != null "> and s.terminated_time = #{terminatedTime}</if>
|
|
|
<if test="terminatedBy != null and terminatedBy != ''"> and s.terminated_by = #{terminatedBy}</if>
|
|
|
<if test="orderCode != null and orderCode != ''"> AND s.order_code = #{orderCode}</if>
|
|
|
+ <if test="companyId != null and companyId != ''"> AND s.company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''"> AND s.company_user_id = #{companyUserId}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -103,6 +109,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="terminatedTime != null"> AND s.terminated_time = #{terminatedTime}</if>
|
|
|
<if test="terminatedBy != null and terminatedBy != ''"> AND s.terminated_by = #{terminatedBy}</if>
|
|
|
<if test="orderCode != null and orderCode != ''"> AND s.order_code = #{orderCode}</if>
|
|
|
+ <if test="companyId != null and companyId != ''"> AND s.company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''"> AND s.company_user_id = #{companyUserId}</if>
|
|
|
AND s.id = (
|
|
|
SELECT MAX(s2.id)
|
|
|
FROM fs_user_information_collection_schedule s2
|
|
|
@@ -120,6 +128,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="terminatedTime != null"> AND s2.terminated_time = #{terminatedTime}</if>
|
|
|
<if test="terminatedBy != null and terminatedBy != ''"> AND s2.terminated_by = #{terminatedBy}</if>
|
|
|
<if test="orderCode != null and orderCode != ''"> AND s2.order_code = #{orderCode}</if>
|
|
|
+ <if test="companyId != null and companyId != ''"> AND s2.company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''"> AND s2.company_user_id = #{companyUserId}</if>
|
|
|
)
|
|
|
</where>
|
|
|
ORDER BY s.create_time desc
|
|
|
@@ -134,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
id, collection_id, user_id, doctor_id,
|
|
|
package_id, package_name, current_step, status, create_time,
|
|
|
- completed_time, terminated_time, terminated_by, remark,order_code
|
|
|
+ completed_time, terminated_time, terminated_by, remark,order_code,company_id,company_user_id
|
|
|
FROM fs_user_information_collection_schedule
|
|
|
WHERE collection_id = #{collectionId}
|
|
|
ORDER BY id DESC
|
|
|
@@ -149,7 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
id, collection_id, user_id, doctor_id,
|
|
|
package_id, package_name, current_step, status, create_time,
|
|
|
- completed_time, terminated_time, terminated_by, remark,order_code
|
|
|
+ completed_time, terminated_time, terminated_by, remark,order_code,company_id,company_user_id
|
|
|
FROM fs_user_information_collection_schedule
|
|
|
WHERE collection_id = #{collectionId}
|
|
|
AND status = 1
|
|
|
@@ -174,6 +184,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="terminatedBy != null">terminated_by,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
<if test="orderCode != null">order_code,</if>
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="collectionId != null">#{collectionId},</if>
|
|
|
@@ -189,6 +201,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="terminatedBy != null">#{terminatedBy},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
<if test="orderCode != null">#{orderCode},</if>
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -208,6 +222,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="terminatedBy != null">terminated_by = #{terminatedBy},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|