소스 검색

处方表增加医生建议相关字段

cgp 1 일 전
부모
커밋
5d21618e40

+ 20 - 10
fs-service/src/main/java/com/fs/his/domain/FsPrescribeDataScrm.java

@@ -7,21 +7,19 @@ import lombok.Data;
 import java.util.Date;
 
 /**
- * 处方表(SCRM)对象 fs_prescribe_scrm
+ * 处方表(SCRM)对象 fs_prescribe_data_scrm
  *
  * @author ruoyi
  * @date 2026-06-11
  */
-
 @Data
-public class FsPrescribeDataScrm extends BaseEntity
-{
+public class FsPrescribeDataScrm extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
     /** id */
     private Long prescribeId;
 
-    /** 处方类型 1西药 2中药 3中药+西药(意味着有两种处方) */
+    /** 处方类型 1西药 2中药 3中药+西药(有两种处方图片) */
     private Integer prescribeType;
 
     /** 订单ID */
@@ -72,13 +70,13 @@ public class FsPrescribeDataScrm extends BaseEntity
     /** 肾功能是否异常(传值:是/否) */
     private String renalUnusual;
 
-    /** 是否是备孕/怀孕/哺乳期(传值:是 */
+    /** 是否是备孕/怀孕/哺乳期(传值:是/否) */
     private String isLactation;
 
     /** 患者电话 */
     private String patientTel;
 
-    /** 患者性别(传数字,1男 0⼥) */
+    /** 患者性别(1男 0⼥) */
     private Integer patientGender;
 
     /** 复诊凭证 */
@@ -116,7 +114,7 @@ public class FsPrescribeDataScrm extends BaseEntity
     /** 使用JSON */
     private String usageJson;
 
-    /** 备注 */
+    /** 医嘱建议 */
     private String remark;
 
     /** 店铺ID */
@@ -137,7 +135,7 @@ public class FsPrescribeDataScrm extends BaseEntity
     /** 患者生日 */
     private String patientBirthday;
 
-    /** 制作类型 0-颗粒剂 1-膏方 */
+    /** 是否填写医生建议(0未填写,1已填写) */
     private Integer recipeType;
 
     /** 二维码图片 */
@@ -152,7 +150,7 @@ public class FsPrescribeDataScrm extends BaseEntity
     /** 订单来源 */
     private Integer source;
 
-    /** 医生是否确认 0待医生开方 1确认开方 -1医生拒方 */
+    /** 医生是否确认 0待医生开方 1已开方待药师审核 -1医生拒方 */
     private Integer doctorConfirm;
 
     /** 医生开始操作时间(益寿缘从医生建议开始算) */
@@ -177,4 +175,16 @@ public class FsPrescribeDataScrm extends BaseEntity
 
     /** 客户信息表id */
     private Long companyCustomerId;
+
+    /** 饮食运动建议 */
+    private String foodAndExerciseGuidance;
+
+    /** 治疗方面(诊断内容,建议治疗) */
+    private String healingAreaJson;
+
+    /** 注意禁忌 */
+    private String noteTaboos;
+
+    /** 舌诊、面诊、手诊 */
+    private String facialDiagnosis;
 }

+ 89 - 59
fs-service/src/main/resources/mapper/his/FsPrescribeDataScrmMapper.xml

@@ -5,65 +5,69 @@
 <mapper namespace="com.fs.his.mapper.FsPrescribeDataScrmMapper">
 
     <resultMap type="com.fs.his.domain.FsPrescribeDataScrm" id="FsPrescribeDataScrmResult">
-        <id     property="prescribeId"           column="prescribe_id"          />
-        <result property="prescribeType"         column="prescribe_type"         />
-        <result property="inquiryOrderId"        column="inquiry_order_id"       />
-        <result property="orderCode"             column="order_code"       />
-        <result property="storeOrderId"          column="store_order_id"         />
-        <result property="userId"                column="user_id"                />
-        <result property="patientId"             column="patient_id"             />
-        <result property="prescribeCode"         column="prescribe_code"         />
-        <result property="patientDescs"          column="patient_descs"          />
-        <result property="nowIllness"            column="now_illness"            />
-        <result property="historyIllness"        column="history_illness"        />
-        <result property="patientAge"            column="patient_age"            />
-        <result property="patientName"           column="patient_name"           />
-        <result property="weight"                column="weight"                 />
-        <result property="isHistoryAllergic"     column="is_history_allergic"    />
-        <result property="historyAllergic"       column="history_allergic"       />
-        <result property="liverUnusual"          column="liver_unusual"          />
-        <result property="renalUnusual"          column="renal_unusual"          />
-        <result property="isLactation"           column="is_lactation"           />
-        <result property="patientTel"            column="patient_tel"            />
-        <result property="patientGender"         column="patient_gender"         />
-        <result property="recordPic"             column="record_pic"             />
-        <result property="prescribeImgUrl"       column="prescribe_img_url"      />
-        <result property="prescribeImgStoreUrl"  column="prescribe_img_store_url"/>
-        <result property="auditReason"           column="audit_reason"           />
-        <result property="diagnose"              column="diagnose"               />
-        <result property="doctorId"              column="doctor_id"              />
-        <result property="drugDoctorId"          column="drug_doctor_id"         />
-        <result property="createTime"            column="create_time"            />
-        <result property="status"                column="status"                 />
-        <result property="auditTime"             column="audit_time"             />
-        <result property="usageJson"             column="usage_json"             />
-        <result property="remark"                column="remark"                 />
-        <result property="storeId"               column="store_id"               />
-        <result property="prescribeDoctorId"     column="prescribe_doctor_id"    />
-        <result property="doctorSignUrl"         column="doctor_sign_url"        />
-        <result property="prescribeDoctorSignUrl" column="prescribe_doctor_sign_url"/>
-        <result property="drugDoctorSignUrl"     column="drug_doctor_sign_url"   />
-        <result property="patientBirthday"       column="patient_birthday"       />
-        <result property="recipeType"            column="recipe_type"            />
-        <result property="prescribeCodeUrl"      column="prescribe_code_url"     />
-        <result property="cycle"                 column="cycle"                  />
-        <result property="icdCode"               column="icd_code"               />
-        <result property="source"                column="source"                 />
-        <result property="doctorConfirm"         column="doctor_confirm"         />
-        <result property="startOperateTime"      column="start_operate_time"     />
-        <result property="endOperateTime"        column="end_operate_time"       />
-        <result property="operateSecond"         column="operate_second"         />
-        <result property="thirdPartyUserId"      column="third_party_user_id"    />
-        <result property="isSendToThirdParty"    column="is_send_to_third_party" />
-        <result property="handwriteCollectionId" column="handwrite_collection_id"/>
-        <result property="companyCustomerId"     column="company_customer_id"    />
-        <result property="createBy"              column="create_by"              />
-        <result property="updateBy"              column="update_by"              />
-        <result property="updateTime"            column="update_time"            />
+        <id     property="prescribeId"                column="prescribe_id"                />
+        <result property="prescribeType"              column="prescribe_type"              />
+        <result property="inquiryOrderId"             column="inquiry_order_id"            />
+        <result property="orderCode"                  column="order_code"                  />
+        <result property="storeOrderId"               column="store_order_id"              />
+        <result property="userId"                     column="user_id"                     />
+        <result property="patientId"                  column="patient_id"                  />
+        <result property="prescribeCode"              column="prescribe_code"              />
+        <result property="patientDescs"               column="patient_descs"               />
+        <result property="nowIllness"                 column="now_illness"                 />
+        <result property="historyIllness"             column="history_illness"             />
+        <result property="patientAge"                 column="patient_age"                 />
+        <result property="patientName"                column="patient_name"                />
+        <result property="weight"                     column="weight"                      />
+        <result property="isHistoryAllergic"          column="is_history_allergic"         />
+        <result property="historyAllergic"            column="history_allergic"            />
+        <result property="liverUnusual"               column="liver_unusual"               />
+        <result property="renalUnusual"               column="renal_unusual"               />
+        <result property="isLactation"                column="is_lactation"                />
+        <result property="patientTel"                 column="patient_tel"                 />
+        <result property="patientGender"              column="patient_gender"              />
+        <result property="recordPic"                  column="record_pic"                  />
+        <result property="prescribeImgUrl"            column="prescribe_img_url"           />
+        <result property="prescribeImgStoreUrl"       column="prescribe_img_store_url"     />
+        <result property="auditReason"                column="audit_reason"                />
+        <result property="diagnose"                   column="diagnose"                    />
+        <result property="doctorId"                   column="doctor_id"                   />
+        <result property="drugDoctorId"               column="drug_doctor_id"              />
+        <result property="createTime"                 column="create_time"                 />
+        <result property="status"                     column="status"                      />
+        <result property="auditTime"                  column="audit_time"                  />
+        <result property="usageJson"                  column="usage_json"                  />
+        <result property="remark"                     column="remark"                      />
+        <result property="storeId"                    column="store_id"                    />
+        <result property="prescribeDoctorId"          column="prescribe_doctor_id"         />
+        <result property="doctorSignUrl"              column="doctor_sign_url"             />
+        <result property="prescribeDoctorSignUrl"     column="prescribe_doctor_sign_url"   />
+        <result property="drugDoctorSignUrl"          column="drug_doctor_sign_url"        />
+        <result property="patientBirthday"            column="patient_birthday"            />
+        <result property="recipeType"                 column="recipe_type"                 />
+        <result property="prescribeCodeUrl"           column="prescribe_code_url"          />
+        <result property="cycle"                      column="cycle"                       />
+        <result property="icdCode"                    column="icd_code"                    />
+        <result property="source"                     column="source"                      />
+        <result property="doctorConfirm"              column="doctor_confirm"              />
+        <result property="startOperateTime"           column="start_operate_time"          />
+        <result property="endOperateTime"             column="end_operate_time"            />
+        <result property="operateSecond"              column="operate_second"              />
+        <result property="thirdPartyUserId"           column="third_party_user_id"         />
+        <result property="isSendToThirdParty"         column="is_send_to_third_party"      />
+        <result property="handwriteCollectionId"      column="handwrite_collection_id"     />
+        <result property="companyCustomerId"          column="company_customer_id"         />
+        <result property="foodAndExerciseGuidance"    column="food_and_exercise_guidance"  />
+        <result property="healingAreaJson"            column="healing_area_json"           />
+        <result property="noteTaboos"                 column="note_taboos"                 />
+        <result property="facialDiagnosis"            column="facial_diagnosis"            />
+        <result property="createBy"                   column="create_by"                   />
+        <result property="updateBy"                   column="update_by"                   />
+        <result property="updateTime"                 column="update_time"                 />
     </resultMap>
 
     <sql id="selectFsPrescribeDataScrmVo">
-        select prescribe_id, prescribe_type, inquiry_order_id,order_code, store_order_id, user_id, patient_id,
+        select prescribe_id, prescribe_type, inquiry_order_id, order_code, store_order_id, user_id, patient_id,
                prescribe_code, patient_descs, now_illness, history_illness, patient_age, patient_name,
                weight, is_history_allergic, history_allergic, liver_unusual, renal_unusual, is_lactation,
                patient_tel, patient_gender, record_pic, prescribe_img_url, prescribe_img_store_url,
@@ -72,7 +76,8 @@
                prescribe_doctor_sign_url, drug_doctor_sign_url, patient_birthday, recipe_type,
                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,
-               handwrite_collection_id, company_customer_id
+               handwrite_collection_id, company_customer_id,
+               food_and_exercise_guidance, healing_area_json, note_taboos, facial_diagnosis
         from fs_prescribe_data_scrm
     </sql>
 
@@ -104,6 +109,18 @@
             <if test="doctorConfirm != null"> and doctor_confirm = #{doctorConfirm}</if>
             <if test="isSendToThirdParty != null"> and is_send_to_third_party = #{isSendToThirdParty}</if>
             <if test="companyCustomerId != null"> and company_customer_id = #{companyCustomerId}</if>
+            <if test="foodAndExerciseGuidance != null and foodAndExerciseGuidance != ''">
+                and food_and_exercise_guidance like concat('%', #{foodAndExerciseGuidance}, '%')
+            </if>
+            <if test="healingAreaJson != null and healingAreaJson != ''">
+                and healing_area_json like concat('%', #{healingAreaJson}, '%')
+            </if>
+            <if test="noteTaboos != null and noteTaboos != ''">
+                and note_taboos like concat('%', #{noteTaboos}, '%')
+            </if>
+            <if test="facialDiagnosis != null and facialDiagnosis != ''">
+                and facial_diagnosis like concat('%', #{facialDiagnosis}, '%')
+            </if>
             <!-- 按时间范围查询 -->
             <if test="params != null and beginTime != null and beginTime != ''">
                 and create_time >= #{params.beginCreateTime}
@@ -130,12 +147,11 @@
         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} and doctor_confirm = 1 <!--必须是医生开方通过的才能进入待药师审核 -->
+            pds.drug_doctor_id = #{drugDoctorId} and doctor_confirm = 1
             <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>
@@ -143,6 +159,7 @@
         </where>
         order by create_time desc
     </select>
+
     <select id="selectFsPrescribeDataScrmImgVOByPrescribeId"
             resultType="com.fs.his.vo.FsPrescribeDataScrmImgVO">
         select fpds.*,
@@ -157,6 +174,7 @@
                  left join fs_doctor doctor on fpds.doctor_id = doctor.doctor_id
                  left join fs_doctor drug_fd on fpds.drug_doctor_id = drug_fd.doctor_id
                  left join fs_patient fp on fpds.patient_id = fp.patient_id
+        where fpds.prescribe_id = #{prescribeId}
     </select>
 
     <insert id="insertFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm" useGeneratedKeys="true" keyProperty="prescribeId">
@@ -213,6 +231,10 @@
             <if test="isSendToThirdParty != null">is_send_to_third_party,</if>
             <if test="handwriteCollectionId != null">handwrite_collection_id,</if>
             <if test="companyCustomerId != null">company_customer_id,</if>
+            <if test="foodAndExerciseGuidance != null">food_and_exercise_guidance,</if>
+            <if test="healingAreaJson != null">healing_area_json,</if>
+            <if test="noteTaboos != null">note_taboos,</if>
+            <if test="facialDiagnosis != null">facial_diagnosis,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="prescribeType != null">#{prescribeType},</if>
@@ -266,6 +288,10 @@
             <if test="isSendToThirdParty != null">#{isSendToThirdParty},</if>
             <if test="handwriteCollectionId != null">#{handwriteCollectionId},</if>
             <if test="companyCustomerId != null">#{companyCustomerId},</if>
+            <if test="foodAndExerciseGuidance != null">#{foodAndExerciseGuidance},</if>
+            <if test="healingAreaJson != null">#{healingAreaJson},</if>
+            <if test="noteTaboos != null">#{noteTaboos},</if>
+            <if test="facialDiagnosis != null">#{facialDiagnosis},</if>
         </trim>
     </insert>
 
@@ -323,6 +349,10 @@
             <if test="isSendToThirdParty != null">is_send_to_third_party = #{isSendToThirdParty},</if>
             <if test="handwriteCollectionId != null">handwrite_collection_id = #{handwriteCollectionId},</if>
             <if test="companyCustomerId != null">company_customer_id = #{companyCustomerId},</if>
+            <if test="foodAndExerciseGuidance != null">food_and_exercise_guidance = #{foodAndExerciseGuidance},</if>
+            <if test="healingAreaJson != null">healing_area_json = #{healingAreaJson},</if>
+            <if test="noteTaboos != null">note_taboos = #{noteTaboos},</if>
+            <if test="facialDiagnosis != null">facial_diagnosis = #{facialDiagnosis},</if>
         </trim>
         where prescribe_id = #{prescribeId}
     </update>