|
@@ -73,7 +73,7 @@
|
|
|
prescribe_code_url, cycle, icd_code, source, doctor_confirm, start_operate_time,
|
|
prescribe_code_url, cycle, icd_code, source, doctor_confirm, start_operate_time,
|
|
|
end_operate_time, operate_second, third_party_user_id, is_send_to_third_party,
|
|
end_operate_time, operate_second, third_party_user_id, is_send_to_third_party,
|
|
|
handwrite_collection_id, company_customer_id
|
|
handwrite_collection_id, company_customer_id
|
|
|
- from fs_prescribe_scrm
|
|
|
|
|
|
|
+ from fs_prescribe_data_scrm
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectFsPrescribeDataScrmByPrescribeId" parameterType="Long" resultMap="FsPrescribeDataScrmResult">
|
|
<select id="selectFsPrescribeDataScrmByPrescribeId" parameterType="Long" resultMap="FsPrescribeDataScrmResult">
|
|
@@ -115,8 +115,37 @@
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="waitOpenPrescribeList" resultType="com.fs.qw.vo.FsPrescribeDataScrmVO">
|
|
|
|
|
+ select pds.* from fs_prescribe_data_scrm pds
|
|
|
|
|
+ left join fs_company_customer fcc on pds.prescribe_id = fcc.prescribe_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ pds.doctor_id = #{doctorId}
|
|
|
|
|
+ <if test="prescribeType != null"> and prescribe_type = #{prescribeType}</if>
|
|
|
|
|
+ <if test="orderCode != null"> and order_code = #{orderCode}</if>
|
|
|
|
|
+ <if test="prescribeCode != null and prescribeCode != ''"> and prescribe_code = #{prescribeCode}</if>
|
|
|
|
|
+ <if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
|
|
|
|
+ <if test="doctorId != null"> and doctor_id = #{doctorId}</if>
|
|
|
|
|
+ <if test="doctorConfirm != null"> and doctor_confirm = #{doctorConfirm}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <select id="pendingStorePrescribeList" resultType="com.fs.qw.vo.FsPrescribeDataScrmVO">
|
|
|
|
|
+ select pds.* from fs_prescribe_data_scrm pds
|
|
|
|
|
+ left join fs_company_customer fcc on pds.prescribe_id = fcc.prescribe_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ pds.drug_doctor_id = #{drugDoctorId}
|
|
|
|
|
+ <if test="orderCode != null"> and order_code = #{orderCode}</if>
|
|
|
|
|
+ <if test="prescribeCode != null and prescribeCode != ''"> and prescribe_code = #{prescribeCode}</if>
|
|
|
|
|
+ <if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
|
|
|
|
+ <if test="status != null"> and status = #{status}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<insert id="insertFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm" useGeneratedKeys="true" keyProperty="prescribeId">
|
|
<insert id="insertFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm" useGeneratedKeys="true" keyProperty="prescribeId">
|
|
|
- insert into fs_prescribe_scrm
|
|
|
|
|
|
|
+ insert into fs_prescribe_data_scrm
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="prescribeType != null">prescribe_type,</if>
|
|
<if test="prescribeType != null">prescribe_type,</if>
|
|
|
<if test="inquiryOrderId != null">inquiry_order_id,</if>
|
|
<if test="inquiryOrderId != null">inquiry_order_id,</if>
|
|
@@ -226,7 +255,7 @@
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm">
|
|
<update id="updateFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm">
|
|
|
- update fs_prescribe_scrm
|
|
|
|
|
|
|
+ update fs_prescribe_data_scrm
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="prescribeType != null">prescribe_type = #{prescribeType},</if>
|
|
<if test="prescribeType != null">prescribe_type = #{prescribeType},</if>
|
|
|
<if test="inquiryOrderId != null">inquiry_order_id = #{inquiryOrderId},</if>
|
|
<if test="inquiryOrderId != null">inquiry_order_id = #{inquiryOrderId},</if>
|
|
@@ -284,11 +313,11 @@
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteFsPrescribeDataScrmByPrescribeId" parameterType="Long">
|
|
<delete id="deleteFsPrescribeDataScrmByPrescribeId" parameterType="Long">
|
|
|
- delete from fs_prescribe_scrm where prescribe_id = #{prescribeId}
|
|
|
|
|
|
|
+ delete from fs_prescribe_data_scrm where prescribe_id = #{prescribeId}
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteFsPrescribeDataScrmByPrescribeIds" parameterType="Long">
|
|
<delete id="deleteFsPrescribeDataScrmByPrescribeIds" parameterType="Long">
|
|
|
- delete from fs_prescribe_scrm where prescribe_id in
|
|
|
|
|
|
|
+ delete from fs_prescribe_data_scrm where prescribe_id in
|
|
|
<foreach collection="array" item="prescribeId" open="(" separator="," close=")">
|
|
<foreach collection="array" item="prescribeId" open="(" separator="," close=")">
|
|
|
#{prescribeId}
|
|
#{prescribeId}
|
|
|
</foreach>
|
|
</foreach>
|