|
@@ -32,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="allergy" column="allergy" />
|
|
<result property="allergy" column="allergy" />
|
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
|
<result property="patientId" column="patient_id" />
|
|
<result property="patientId" column="patient_id" />
|
|
|
|
|
+ <result property="doctorType2Id" column="doctor_type2_id" />
|
|
|
|
|
+ <result property="doctorType2Confirm" column="doctor_type2_confirm" />
|
|
|
|
|
+ <result property="doctorType2Sign" column="doctor_type2_sign" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsUserInformationCollectionVo">
|
|
<sql id="selectFsUserInformationCollectionVo">
|
|
@@ -39,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
, doctor_confirm, create_time, update_time,doctor_id,company_user_id
|
|
, doctor_confirm, create_time, update_time,doctor_id,company_user_id
|
|
|
,package_id,pay_type,amount,is_package,user_confirm2,package_order_code
|
|
,package_id,pay_type,amount,is_package,user_confirm2,package_order_code
|
|
|
,status,user_advice,doctor_advice,doctor_sign,doctor_confirm_time,sex,user_name,user_phone_four
|
|
,status,user_advice,doctor_advice,doctor_sign,doctor_confirm_time,sex,user_name,user_phone_four
|
|
|
- ,allergy,remark,patient_id from fs_user_information_collection
|
|
|
|
|
|
|
+ ,allergy,remark,patient_id,doctor_type2_id,doctor_type2_confirm,doctor_type2_sign from fs_user_information_collection
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectFsUserInformationCollectionList" parameterType="FsUserInformationCollection" resultMap="FsUserInformationCollectionResult">
|
|
<select id="selectFsUserInformationCollectionList" parameterType="FsUserInformationCollection" resultMap="FsUserInformationCollectionResult">
|
|
@@ -74,15 +77,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
<select id="selectFsUserInformationCollectionDTOById"
|
|
<select id="selectFsUserInformationCollectionDTOById"
|
|
|
resultType="com.fs.his.dto.FsUserInformationCollectionDTO">
|
|
resultType="com.fs.his.dto.FsUserInformationCollectionDTO">
|
|
|
- SELECT fui.*,fu.nick_name as userName,fp.patient_name,cu.nick_name as companyUserName,fd.doctor_name,fpkg.package_name,fqa.json_info as questionJson FROM fs_user_information_collection fui
|
|
|
|
|
|
|
+ SELECT fui.*,fu.nick_name as userName,fp.patient_name,cu.nick_name as companyUserName,fd.doctor_name,fd1.doctor_name as doctorType2Name,fpkg.package_name,fqa.json_info as questionJson FROM fs_user_information_collection fui
|
|
|
LEFT JOIN fs_user fu ON fui.user_id = fu.user_id
|
|
LEFT JOIN fs_user fu ON fui.user_id = fu.user_id
|
|
|
LEFT JOIN fs_patient fp ON fui.patient_id = fp. patient_id
|
|
LEFT JOIN fs_patient fp ON fui.patient_id = fp. patient_id
|
|
|
LEFT JOIN company_user cu ON fui.company_user_id = cu.user_id
|
|
LEFT JOIN company_user cu ON fui.company_user_id = cu.user_id
|
|
|
LEFT JOIN fs_doctor fd ON fui.doctor_id = fd.doctor_id
|
|
LEFT JOIN fs_doctor fd ON fui.doctor_id = fd.doctor_id
|
|
|
|
|
+ LEFT JOIN fs_doctor fd1 ON fui.doctor_type2_id = fd1.doctor_id
|
|
|
LEFT JOIN fs_package fpkg ON fui.package_id = fpkg.package_id
|
|
LEFT JOIN fs_package fpkg ON fui.package_id = fpkg.package_id
|
|
|
LEFT JOIN fs_question_and_answer fqa ON fui.question_id = fqa.id
|
|
LEFT JOIN fs_question_and_answer fqa ON fui.question_id = fqa.id
|
|
|
WHERE fui.id = #{id}
|
|
WHERE fui.id = #{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="selectFsUserInformationCollectionByDoctorType2"
|
|
|
|
|
+ resultType="com.fs.his.domain.FsUserInformationCollection">
|
|
|
|
|
+ select fui.*,fp.patient_name as patientName from fs_user_information_collection fui left join fs_patient fp on fui.patient_id = fp.patient_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="maps.doctorType2Id != null and maps.doctorType2Id != ''"> and fui.doctor_type2_id = #{maps.doctorType2Id}</if>
|
|
|
|
|
+ <if test="maps.doctorType2Confirm != null and maps.doctorType2Confirm != ''"> and fui.doctor_type2_confirm = #{maps.doctorType2Confirm}</if>
|
|
|
|
|
+ <if test="maps.packageOrderCode != null and maps.packageOrderCode != ''"> and fui.package_order_code = #{maps.packageOrderCode}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+
|
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
<insert id="insertFsUserInformationCollection" parameterType="FsUserInformationCollection" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertFsUserInformationCollection" parameterType="FsUserInformationCollection" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into fs_user_information_collection
|
|
insert into fs_user_information_collection
|
|
@@ -113,6 +127,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="allergy != null">allergy,</if>
|
|
<if test="allergy != null">allergy,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
<if test="remark != null">remark,</if>
|
|
|
<if test="patientId != null">patient_id,</if>
|
|
<if test="patientId != null">patient_id,</if>
|
|
|
|
|
+ <if test="doctorType2Id != null">doctor_type2_id,</if>
|
|
|
|
|
+ <if test="doctorType2Confirm != null">doctor_type2_confirm,</if>
|
|
|
|
|
+ <if test="doctorType2Sign != null">doctor_type2_sign,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="questionId != null">#{questionId},</if>
|
|
<if test="questionId != null">#{questionId},</if>
|
|
@@ -141,6 +158,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="allergy != null">#{allergy},</if>
|
|
<if test="allergy != null">#{allergy},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
|
<if test="patientId != null">#{patientId},</if>
|
|
<if test="patientId != null">#{patientId},</if>
|
|
|
|
|
+ <if test="patientId != null">#{patientId},</if>
|
|
|
|
|
+ <if test="patientId != null">#{patientId},</if>
|
|
|
|
|
+ <if test="patientId != null">#{patientId},</if>
|
|
|
|
|
+ <if test="doctorType2Id != null">doctorType2Id,</if>
|
|
|
|
|
+ <if test="doctorType2Confirm != null">doctorType2Confirm,</if>
|
|
|
|
|
+ <if test="doctorType2Sign != null">doctorType2Sign,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -173,6 +196,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="allergy != null">allergy = #{allergy},</if>
|
|
<if test="allergy != null">allergy = #{allergy},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="patientId != null">patient_id = #{patientId},</if>
|
|
<if test="patientId != null">patient_id = #{patientId},</if>
|
|
|
|
|
+ <if test="doctorType2Id != null">doctor_type2_id = #{doctorType2Id},</if>
|
|
|
|
|
+ <if test="doctorType2Confirm != null">doctor_type2_confirm = #{doctorType2Confirm},</if>
|
|
|
|
|
+ <if test="doctorType2Sign != null">doctor_type2_sign = #{doctorType2Sign},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where id = #{id}
|
|
where id = #{id}
|
|
|
</update>
|
|
</update>
|