Selaa lähdekoodia

Merge branch 'simplatform' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter into simplatform

sjpark 4 vuotta sitten
vanhempi
commit
de763acb6b

+ 18 - 2
src/main/resources/mybatis/mapper/patient/patientPHRHistory.xml

@@ -4,8 +4,24 @@
 <mapper namespace="com.lemon.lifecenter.mapper.PatientPHRHistoryMapper">
 	<insert id="insertPHRHistory" parameterType="PatientPHRHistoryDTO" useGeneratedKeys="true">
 	<![CDATA[
-	    INSERT INTO patient_phr_history (patient_idx, phr_type, phr_value, recorded_by_name, recorded_by_id, create_date)
-       	VALUE (#{patientIdx}, #{phrType}, #{phrValue}, #{recordedByName}, #{recordedById}, NOW())
+	    INSERT INTO patient_phr_history (patient_idx, phr_type, phr_value, recorded_by_name
+	]]>
+   		<if test='recordedById != null and recordedById != ""'>
+            <![CDATA[
+	    	, recorded_by_id
+	    	]]>
+        </if>
+	<![CDATA[    	
+	    	, create_date)
+       	VALUE (#{patientIdx}, #{phrType}, #{phrValue}, #{recordedByName}
+    ]]>
+   		<if test='recordedById != null and recordedById != ""'>
+            <![CDATA[
+	    	, #{recordedById}
+	    	]]>
+        </if>
+	<![CDATA[
+       		, NOW())
 	]]>
 	</insert>
     <select id="selectPHRHistoryCount" parameterType="PatientPHRHistoryDTO" resultType="int">

+ 18 - 2
src/main/resources/mybatis/mapper/patient/patientSymptomSim.xml

@@ -6,10 +6,26 @@
 	<![CDATA[
 	    INSERT INTO patient_symptom_sim (patient_idx, cough_check, dyspnea_check, cold_fit_check, muscle_pain_check, headache_check, sore_throat_check,
 	    	smell_palate_check, fatigue_check, appetite_loss_check, sputum_check, ocin_check, vomiting_check, diarrhea_check, dizziness_check,
-	    	nose_check, etc_check, etc_content, recorded_by_name, recorded_by_id, create_date)
+	    	nose_check, etc_check, etc_content, recorded_by_name
+   	]]>
+   		<if test='recordedById != null and recordedById != ""'>
+            <![CDATA[
+	    	, recorded_by_id
+	    	]]>
+        </if>
+	<![CDATA[    	
+	    	, create_date)
         VALUE (#{patientIdx}, #{coughCheck}, #{dyspneaCheck}, #{coldFitCheck}, #{musclePainCheck}, #{headacheCheck}, #{soreThroatCheck}, 
         	#{smellPalateCheck}, #{fatigueCheck}, #{appetiteLossCheck}, #{sputumCheck}, #{ocinCheck}, #{vomitingCheck}, #{diarrheaCheck}, #{dizzinessCheck}, 
-        	#{noseCheck}, #{etcCheck}, #{etcContent}, #{recordedByName}, #{recordedById}, NOW())
+        	#{noseCheck}, #{etcCheck}, #{etcContent}, #{recordedByName}
+   	]]>
+   		<if test='recordedById != null and recordedById != ""'>
+            <![CDATA[
+	    	, #{recordedById}
+	    	]]>
+        </if>
+	<![CDATA[    	        	
+        	, NOW())
 	]]>
 	</insert>
     <select id="selectSymptomCount" parameterType="PatientSymptomSimDTO" resultType="int">