|
@@ -67,7 +67,8 @@
|
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="diagnoseChinese" column="diagnose_chinese" />
|
|
<result property="diagnoseChinese" column="diagnose_chinese" />
|
|
|
<result property="remarkChinese" column="remark_chinese" />
|
|
<result property="remarkChinese" column="remark_chinese" />
|
|
|
- <result property="notPrescribeReason" column="not_prescribe_reason" />
|
|
|
|
|
|
|
+ <result property="notPrescribeReason" column="not_prescribe_reason" />
|
|
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsPrescribeDataScrmVo">
|
|
<sql id="selectFsPrescribeDataScrmVo">
|
|
@@ -82,7 +83,7 @@
|
|
|
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,
|
|
|
food_and_exercise_guidance, healing_area_json, note_taboos, facial_diagnosis,is_document,
|
|
food_and_exercise_guidance, healing_area_json, note_taboos, facial_diagnosis,is_document,
|
|
|
- diagnose_chinese,remark_chinese,not_prescribe_reason
|
|
|
|
|
|
|
+ diagnose_chinese,remark_chinese,not_prescribe_reason,company_user_id
|
|
|
from fs_prescribe_data_scrm
|
|
from fs_prescribe_data_scrm
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -99,6 +100,7 @@
|
|
|
<if test="orderCode != null"> and order_code = #{orderCode}</if>
|
|
<if test="orderCode != null"> and order_code = #{orderCode}</if>
|
|
|
<if test="storeOrderId != null"> and store_order_id = #{storeOrderId}</if>
|
|
<if test="storeOrderId != null"> and store_order_id = #{storeOrderId}</if>
|
|
|
<if test="userId != null"> and user_id = #{userId}</if>
|
|
<if test="userId != null"> and user_id = #{userId}</if>
|
|
|
|
|
+ <if test="companyUserId != null"> and company_user_id = #{companyUserId}</if>
|
|
|
<if test="patientId != null"> and patient_id = #{patientId}</if>
|
|
<if test="patientId != null"> and patient_id = #{patientId}</if>
|
|
|
<if test="prescribeCode != null and prescribeCode != ''"> and prescribe_code = #{prescribeCode}</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="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
|
@@ -146,7 +148,7 @@
|
|
|
fpds.remark, fpds.prescribe_doctor_id, fpds.doctor_sign_url,fpds.recipe_type, fpds.source,
|
|
fpds.remark, fpds.prescribe_doctor_id, fpds.doctor_sign_url,fpds.recipe_type, fpds.source,
|
|
|
fpds.doctor_confirm, fpds.company_customer_id,fpds.food_and_exercise_guidance, fpds.healing_area_json,
|
|
fpds.doctor_confirm, fpds.company_customer_id,fpds.food_and_exercise_guidance, fpds.healing_area_json,
|
|
|
fpds.note_taboos,fpds.facial_diagnosis,fpds.is_document,fpds.diagnose_chinese,fpds.remark_chinese,
|
|
fpds.note_taboos,fpds.facial_diagnosis,fpds.is_document,fpds.diagnose_chinese,fpds.remark_chinese,
|
|
|
- fpds.not_prescribe_reason,cu.nick_name as companyUserName
|
|
|
|
|
|
|
+ fpds.not_prescribe_reason,fpds.company_user_id,cu.nick_name as companyUserName
|
|
|
from fs_prescribe_data_scrm fpds left join fs_store_order_scrm orderScrm on fpds.prescribe_id = orderScrm.prescribe_id
|
|
from fs_prescribe_data_scrm fpds left join fs_store_order_scrm orderScrm on fpds.prescribe_id = orderScrm.prescribe_id
|
|
|
left join company_user cu on orderScrm.company_user_id = cu.user_id
|
|
left join company_user cu on orderScrm.company_user_id = cu.user_id
|
|
|
<where>
|
|
<where>
|
|
@@ -179,6 +181,34 @@
|
|
|
order by fpds.create_time desc
|
|
order by fpds.create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="notRecommendUseList" parameterType="com.fs.his.dto.NotRecommendUseQueryDto" resultType="com.fs.his.vo.DoctorScrmPrescribeVO">
|
|
|
|
|
+ select fpds.prescribe_id, fpds.prescribe_type,cd.dept_name as deptName, fpds.prescribe_code,
|
|
|
|
|
+ fpds.patient_age, fpds.patient_name, fpds.is_history_allergic, fpds.patient_tel,
|
|
|
|
|
+ fpds.patient_gender, fpds.prescribe_img_url,fpds.prescribe_img_store_url,fpds.audit_reason,
|
|
|
|
|
+ fpds.diagnose, fpds.doctor_id, fpds.drug_doctor_id, fpds.create_time, fpds.status,fpds.audit_time,
|
|
|
|
|
+ fpds.remark, fpds.prescribe_doctor_id, fpds.doctor_sign_url,fpds.recipe_type, fpds.source,
|
|
|
|
|
+ fpds.doctor_confirm, fpds.company_customer_id,fpds.food_and_exercise_guidance, fpds.healing_area_json,
|
|
|
|
|
+ fpds.note_taboos,fpds.facial_diagnosis,fpds.is_document,fpds.diagnose_chinese,fpds.remark_chinese,
|
|
|
|
|
+ fpds.not_prescribe_reason,cu.nick_name as companyUserName
|
|
|
|
|
+ from fs_prescribe_data_scrm fpds
|
|
|
|
|
+ left join company_user cu on fpds.company_user_id = cu.user_id
|
|
|
|
|
+ left join company_dept cd on cd.dept_id = cu.dept_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ fpds.doctor_confirm = -3
|
|
|
|
|
+ <if test="doctorId != null"> and fpds.doctor_id = #{doctorId}</if>
|
|
|
|
|
+ <if test="companyUserName != null"> and cu.nick_name like concat('%', #{companyUserName}, '%')</if>
|
|
|
|
|
+ <if test="deptId != null"> and cu.dept_id = #{deptId}</if>
|
|
|
|
|
+ <!-- 按时间范围查询 -->
|
|
|
|
|
+ <if test="beginTime != null and beginTime != ''">
|
|
|
|
|
+ and fpds.create_time >= #{beginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
|
|
+ and fpds.create_time <= #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by fpds.create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<select id="waitOpenPrescribeList" resultType="com.fs.qw.vo.FsPrescribeDataScrmVO">
|
|
<select id="waitOpenPrescribeList" resultType="com.fs.qw.vo.FsPrescribeDataScrmVO">
|
|
|
select pds.* from fs_prescribe_data_scrm pds
|
|
select pds.* from fs_prescribe_data_scrm pds
|
|
|
left join fs_company_customer fcc on pds.prescribe_id = fcc.prescribe_id
|
|
left join fs_company_customer fcc on pds.prescribe_id = fcc.prescribe_id
|
|
@@ -297,6 +327,7 @@
|
|
|
<if test="diagnoseChinese != null">diagnose_chinese,</if>
|
|
<if test="diagnoseChinese != null">diagnose_chinese,</if>
|
|
|
<if test="remarkChinese != null">remark_chinese,</if>
|
|
<if test="remarkChinese != null">remark_chinese,</if>
|
|
|
<if test="notPrescribeReason != null">not_prescribe_reason,</if>
|
|
<if test="notPrescribeReason != null">not_prescribe_reason,</if>
|
|
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="prescribeType != null">#{prescribeType},</if>
|
|
<if test="prescribeType != null">#{prescribeType},</if>
|
|
@@ -358,6 +389,7 @@
|
|
|
<if test="diagnoseChinese != null">#{diagnoseChinese},</if>
|
|
<if test="diagnoseChinese != null">#{diagnoseChinese},</if>
|
|
|
<if test="remarkChinese != null">#{remarkChinese},</if>
|
|
<if test="remarkChinese != null">#{remarkChinese},</if>
|
|
|
<if test="notPrescribeReason != null">#{notPrescribeReason},</if>
|
|
<if test="notPrescribeReason != null">#{notPrescribeReason},</if>
|
|
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -423,6 +455,7 @@
|
|
|
<if test="diagnoseChinese != null">diagnose_chinese = #{diagnoseChinese},</if>
|
|
<if test="diagnoseChinese != null">diagnose_chinese = #{diagnoseChinese},</if>
|
|
|
<if test="remarkChinese != null">remark_chinese = #{remarkChinese},</if>
|
|
<if test="remarkChinese != null">remark_chinese = #{remarkChinese},</if>
|
|
|
<if test="notPrescribeReason != null">not_prescribe_reason = #{notPrescribeReason},</if>
|
|
<if test="notPrescribeReason != null">not_prescribe_reason = #{notPrescribeReason},</if>
|
|
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where prescribe_id = #{prescribeId}
|
|
where prescribe_id = #{prescribeId}
|
|
|
</update>
|
|
</update>
|