| | |
| | | <result property="fuperiod" column="fuperiod"/> |
| | | <result property="futypecode" column="futypecode"/> |
| | | <result property="futypedesc" column="futypedesc"/> |
| | | <result property="fuadivce" column="fuadivce"/> |
| | | <result property="fuadvice" column="fuadvice"/> |
| | | <result property="fuspecialadvice" column="fuspecialadvice"/> |
| | | </resultMap> |
| | | |
| | |
| | | fuperiod, |
| | | futypecode, |
| | | futypedesc, |
| | | fuadivce, |
| | | fuadvice, |
| | | fuspecialadvice, |
| | | remark, |
| | | guid, |
| | |
| | | b.fuperiod, |
| | | b.futypecode, |
| | | b.futypedesc, |
| | | b.fuadivce, |
| | | b.fuadvice, |
| | | b.fuspecialadvice |
| | | FROM |
| | | pat_med_inhosp b |
| | |
| | | a.del_flag = 0 |
| | | AND b.del_flag = 0 |
| | | AND a.idcardno IS NOT NULL |
| | | <if test="startOutHospTime != null"> |
| | | <!--<if test="startOutHospTime != null"> |
| | | AND STR_TO_DATE(b.endtime,'%Y-%m-%d') >= STR_TO_DATE(#{startOutHospTime},'%Y-%m-%d') |
| | | </if> |
| | | <if test="endOutHospTime != null"> |
| | |
| | | </if> |
| | | <if test="endInHospTime != null"> |
| | | AND STR_TO_DATE(b.starttime, '%Y-%m-%d') <= STR_TO_DATE(#{startInHospTime}, '%Y-%m-%d') |
| | | </if>--> |
| | | <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >= |
| | | date_format(#{startOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <= |
| | | date_format(#{endOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >= |
| | | date_format(#{startInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <= |
| | | date_format(#{endInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |
| | |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="patno != null ">and b.patno = #{patno}</if> |
| | | <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> |
| | | <if test="nurseName != null ">and b.nurse_name = #{nurseName}</if> |
| | | <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if> |
| | | <if test="checkFlag != null ">and b.check_flag = #{checkFlag}</if> |
| | | <if test="cry != null and cry == 0 ">and b.endtime is null</if> |
| | | <if test="cry != null and cry == 1 ">and b.endtime is not null</if> |
| | |
| | | b.fuperiod, |
| | | b.futypecode, |
| | | b.futypedesc, |
| | | b.fuadivce, |
| | | b.fuadvice, |
| | | b.fuspecialadvice |
| | | b.schemetime |
| | | FROM |
| | |
| | | <if test="fuperiod != null ">fuperiod,</if> |
| | | <if test="futypecode != null ">futypecode,</if> |
| | | <if test="futypedesc != null ">futypedesc,</if> |
| | | <if test="fuadivce != null ">fuadivce,</if> |
| | | <if test="fuadvice != null ">fuadvice,</if> |
| | | <if test="fuspecialadvice != null ">fuspecialadvice,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="fuperiod != null ">#{fuperiod},</if> |
| | | <if test="futypecode != null ">#{futypecode},</if> |
| | | <if test="futypedesc != null ">#{futypedesc},</if> |
| | | <if test="fuadivce != null ">#{fuadivce},</if> |
| | | <if test="fuadvice != null ">#{fuadvice},</if> |
| | | <if test="fuspecialadvice != null ">#{fuspecialadvice},</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="fuperiod != null ">fuperiod = #{fuperiod},</if> |
| | | <if test="futypecode != null ">futypecode = #{futypecode},</if> |
| | | <if test="futypedesc != null ">futypedesc = #{futypedesc},</if> |
| | | <if test="fuadivce != null ">fuadivce = #{fuadivce},</if> |
| | | <if test="fuadvice != null ">fuadvice = #{fuadvice},</if> |
| | | <if test="fuspecialadvice != null ">fuspecialadvice = #{fuspecialadvice},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |