PostpartumFollowMake.xml 9.59 KB
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.lyms.platform.permission.dao.master.PostpartumFollowMakeMapper">

<resultMap id="PostpartumFollowMakeResultMap" type="com.lyms.platform.permission.model.PostpartumFollowMake">
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="hospital_id" property="hospitalId" jdbcType="VARCHAR" />
<result column="delivery_date" property="deliveryDate" jdbcType="TIMESTAMP" />
<result column="deliver_id" property="deliverId" jdbcType="VARCHAR" />
<result column="parentId" property="parentid" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="contact_result" property="contactResult" jdbcType="INTEGER" />
<result column="make_type" property="makeType" jdbcType="INTEGER" />
<result column="make_remark" property="makeRemark" jdbcType="VARCHAR" />
<result column="make_create_user" property="makeCreateUser" jdbcType="VARCHAR" />
<result column="make_create_date" property="makeCreateDate" jdbcType="TIMESTAMP" />
<result column="contact_reason" property="contactReason" jdbcType="INTEGER" />
<result column="make_visit_date" property="makeVisitDate" jdbcType="TIMESTAMP" />
<result column="visit_result" property="visitResult" jdbcType="INTEGER" />
<result column="visit_reason" property="visitReason" jdbcType="INTEGER" />
<result column="visit_affirm" property="visitAffirm" jdbcType="INTEGER" />
<result column="visit_date" property="visitDate" jdbcType="TIMESTAMP" />
<result column="visit_doctor" property="visitDoctor" jdbcType="VARCHAR" />
<result column="visit_status" property="visitStatus" jdbcType="INTEGER" />
<result column="visit_remark" property="visitRemark" jdbcType="VARCHAR" />
<result column="visit_create_user" property="visitCreateUser" jdbcType="VARCHAR" />
<result column="visit_create_date" property="visitCreateDate" jdbcType="TIMESTAMP" />
<result column="next_visit_date" property="nextVisitDate" jdbcType="TIMESTAMP" />
<result column="is_close" property="isClose" jdbcType="INTEGER" />
</resultMap>



<insert id="addPostpartumFollowMake" parameterType="com.lyms.platform.permission.model.PostpartumFollowMake">
insert into postpartum_follow_make (id,hospital_id,delivery_date,deliver_id,parentId,pid,contact_result,make_type,make_remark,make_create_user,make_create_date,contact_reason,make_visit_date,visit_result,visit_reason,visit_affirm,visit_date,visit_doctor,visit_status,visit_remark,visit_create_user,visit_create_date,next_visit_date,is_close) values (#{id},#{hospitalId},#{deliveryDate},#{deliverId},#{parentid},#{pid},#{contactResult},#{makeType},#{makeRemark},#{makeCreateUser},#{makeCreateDate},#{contactReason},#{makeVisitDate},#{visitResult},#{visitReason},#{visitAffirm},#{visitDate},#{visitDoctor},#{visitStatus},#{visitRemark},#{visitCreateUser},#{visitCreateDate},#{nextVisitDate},#{isClose})
</insert>



<update id="updatePostpartumFollowMake" parameterType="com.lyms.platform.permission.model.PostpartumFollowMake">
update postpartum_follow_make <set><if test="hospitalId != null and hospitalId != ''">
hospital_id = #{hospitalId,jdbcType=VARCHAR},
</if>
<if test="deliveryDate != null">
delivery_date = #{deliveryDate,jdbcType=TIMESTAMP},
</if>
<if test="deliverId != null and deliverId != ''">
deliver_id = #{deliverId,jdbcType=VARCHAR},
</if>
<if test="parentid != null and parentid != ''">
parentId = #{parentid,jdbcType=VARCHAR},
</if>
<if test="pid != null and pid != ''">
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="contactResult != null and contactResult >= 0">
contact_result = #{contactResult,jdbcType=INTEGER},
</if>
<if test="makeType != null and makeType >= 0">
make_type = #{makeType,jdbcType=INTEGER},
</if>
<if test="makeRemark != null and makeRemark != ''">
make_remark = #{makeRemark,jdbcType=VARCHAR},
</if>
<if test="makeCreateUser != null and makeCreateUser != ''">
make_create_user = #{makeCreateUser,jdbcType=VARCHAR},
</if>
<if test="makeCreateDate != null">
make_create_date = #{makeCreateDate,jdbcType=TIMESTAMP},
</if>
<if test="contactReason != null and contactReason >= 0">
contact_reason = #{contactReason,jdbcType=INTEGER},
</if>
<if test="makeVisitDate != null">
make_visit_date = #{makeVisitDate,jdbcType=TIMESTAMP},
</if>
<if test="visitResult != null and visitResult >= 0">
visit_result = #{visitResult,jdbcType=INTEGER},
</if>
<if test="visitReason != null and visitReason >= 0">
visit_reason = #{visitReason,jdbcType=INTEGER},
</if>
<if test="visitAffirm != null and visitAffirm >= 0">
visit_affirm = #{visitAffirm,jdbcType=INTEGER},
</if>
<if test="visitDate != null">
visit_date = #{visitDate,jdbcType=TIMESTAMP},
</if>
<if test="visitDoctor != null and visitDoctor != ''">
visit_doctor = #{visitDoctor,jdbcType=VARCHAR},
</if>
<if test="visitStatus != null and visitStatus >= 0">
visit_status = #{visitStatus,jdbcType=INTEGER},
</if>
<if test="visitRemark != null and visitRemark != ''">
visit_remark = #{visitRemark,jdbcType=VARCHAR},
</if>
<if test="visitCreateUser != null and visitCreateUser != ''">
visit_create_user = #{visitCreateUser,jdbcType=VARCHAR},
</if>
<if test="visitCreateDate != null">
visit_create_date = #{visitCreateDate,jdbcType=TIMESTAMP},
</if>
<if test="nextVisitDate != null">
next_visit_date = #{nextVisitDate,jdbcType=TIMESTAMP},
</if>
<if test="isClose != null and isClose >= 0">
is_close = #{isClose,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>


<delete id="deletePostpartumFollowMake" parameterType="java.lang.String">
delete from postpartum_follow_make where id = #{id,jdbcType=VARCHAR}
</delete>



<select id="getPostpartumFollowMake" resultMap="PostpartumFollowMakeResultMap" parameterType="java.lang.String">
select id,hospital_id,delivery_date,deliver_id,parentId,pid,contact_result,make_type,make_remark,make_create_user,make_create_date,contact_reason,make_visit_date,visit_result,visit_reason,visit_affirm,visit_date,visit_doctor,visit_status,visit_remark,visit_create_user,visit_create_date,next_visit_date,is_close
from postpartum_follow_make where id = #{id,jdbcType=VARCHAR}
</select>


<sql id="orderAndLimit">
<if test="sort != null and sort != '' ">
order by ${sort}
<if test="need != null">
limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
</if>
</if>
</sql>



<sql id="PostpartumFollowMakeCondition">
<where>
1 = 1
<if test="id != null and id != ''">
and id = #{id,jdbcType=VARCHAR}
</if>
<if test="hospitalId != null and hospitalId != ''">
and hospital_id = #{hospitalId,jdbcType=VARCHAR}
</if>
<if test="deliveryDate != null">
and delivery_date = #{deliveryDate,jdbcType=TIMESTAMP}
</if>
<if test="deliverId != null and deliverId != ''">
and deliver_id = #{deliverId,jdbcType=VARCHAR}
</if>
<if test="parentid != null and parentid != ''">
and parentId = #{parentid,jdbcType=VARCHAR}
</if>
<if test="pid != null and pid != ''">
and pid = #{pid,jdbcType=VARCHAR}
</if>
<if test="contactResult != null and contactResult >= 0">
and contact_result = #{contactResult,jdbcType=INTEGER}
</if>
<if test="makeType != null and makeType >= 0">
and make_type = #{makeType,jdbcType=INTEGER}
</if>
<if test="makeRemark != null and makeRemark != ''">
and make_remark = #{makeRemark,jdbcType=VARCHAR}
</if>
<if test="makeCreateUser != null and makeCreateUser != ''">
and make_create_user = #{makeCreateUser,jdbcType=VARCHAR}
</if>
<if test="makeCreateDate != null">
and make_create_date = #{makeCreateDate,jdbcType=TIMESTAMP}
</if>
<if test="contactReason != null and contactReason >= 0">
and contact_reason = #{contactReason,jdbcType=INTEGER}
</if>
<if test="makeVisitDate != null">
and make_visit_date = #{makeVisitDate,jdbcType=TIMESTAMP}
</if>
<if test="visitResult != null and visitResult >= 0">
and visit_result = #{visitResult,jdbcType=INTEGER}
</if>
<if test="visitReason != null and visitReason >= 0">
and visit_reason = #{visitReason,jdbcType=INTEGER}
</if>
<if test="visitAffirm != null and visitAffirm >= 0">
and visit_affirm = #{visitAffirm,jdbcType=INTEGER}
</if>
<if test="visitDate != null">
and visit_date = #{visitDate,jdbcType=TIMESTAMP}
</if>
<if test="visitDoctor != null and visitDoctor != ''">
and visit_doctor = #{visitDoctor,jdbcType=VARCHAR}
</if>
<if test="visitStatus != null and visitStatus >= 0">
and visit_status = #{visitStatus,jdbcType=INTEGER}
</if>
<if test="visitRemark != null and visitRemark != ''">
and visit_remark = #{visitRemark,jdbcType=VARCHAR}
</if>
<if test="visitCreateUser != null and visitCreateUser != ''">
and visit_create_user = #{visitCreateUser,jdbcType=VARCHAR}
</if>
<if test="visitCreateDate != null">
and visit_create_date = #{visitCreateDate,jdbcType=TIMESTAMP}
</if>
<if test="nextVisitDate != null">
and next_visit_date = #{nextVisitDate,jdbcType=TIMESTAMP}
</if>
<if test="isClose != null and isClose >= 0">
and is_close = #{isClose,jdbcType=INTEGER}
</if>
</where>
</sql>



<select id="queryPostpartumFollowMake" resultMap="PostpartumFollowMakeResultMap" parameterType="com.lyms.platform.permission.model.PostpartumFollowMakeQuery">
select id,hospital_id,delivery_date,deliver_id,parentId,pid,contact_result,make_type,make_remark,make_create_user,make_create_date,contact_reason,make_visit_date,visit_result,visit_reason,visit_affirm,visit_date,visit_doctor,visit_status,visit_remark,visit_create_user,visit_create_date,next_visit_date,is_close
from postpartum_follow_make
<include refid="PostpartumFollowMakeCondition" />
<include refid="orderAndLimit" />
</select>



<select id="queryPostpartumFollowMakeCount" resultType="int" parameterType="com.lyms.platform.permission.model.PostpartumFollowMakeQuery">
select count(1) from postpartum_follow_make
<include refid="PostpartumFollowMakeCondition" />
</select>



</mapper>