Guiji_Healthcommission_Mapper2.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.sooka.mapper.Guiji_Healthcommission_Mapper2">
  4. <sql id="global_name">
  5. id,create_time,cd_time,cd_batch,cd_operation,cd_source,
  6. </sql>
  7. <sql id="global_value">
  8. #{id},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
  9. </sql>
  10. <sql id="update_sql">
  11. create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
  12. </sql>
  13. <parameterMap id="pm_xx" type="com.sooka.model.bo.Guiji_healthcommission_xx_Bean">
  14. </parameterMap>
  15. <insert id="add_guiji_healthcommission_xx" parameterMap="pm_xx">
  16. insert into t_guiji_healthcommission_xx (
  17. <include refid="global_name"></include>
  18. name,idcardnum,sexid,birthday,address,fmname,chname,donkind,doncode,volume,abo,
  19. rhd,collectdate,collectplace,organname,organtel
  20. )
  21. values (
  22. <include refid="global_value"></include>
  23. #{Name},#{IDCardNum},#{SexID},#{Birthday},#{Address},#{FMName},#{CHName},#{DonCode},#{DonKind},
  24. #{Volume},#{ABO},#{RhD},#{CollectDate},#{CollectPlace},#{OrganName},#{OrganTel})
  25. </insert>
  26. <update id="update_guiji_healthcommission_xx" parameterMap="pm_xx">
  27. update t_guiji_healthcommission_xx
  28. <trim prefix="SET" suffixOverrides=",">
  29. <include refid="update_sql"></include>
  30. <if test="Name != null and Name != ''">
  31. Name = #{Name},
  32. </if>
  33. <if test="IDCardNum != null and IDCardNum != ''">
  34. IDCardNum = #{IDCardNum},
  35. </if>
  36. <if test="SexID != null and SexID != ''">
  37. SexID = #{SexID},
  38. </if>
  39. <if test="Birthday != null and Birthday != ''">
  40. Birthday = #{Birthday},
  41. </if>
  42. <if test="Address != null and Address != ''">
  43. Address = #{Address},
  44. </if>
  45. <if test="FMName != null and FMName != ''">
  46. FMName = #{FMName},
  47. </if>
  48. <if test="CHName != null and CHName != ''">
  49. CHName = #{CHName},
  50. </if>
  51. <if test="DonCode != null and DonCode != ''">
  52. DonCode = #{DonCode},
  53. </if>
  54. <if test="DonKind != null and DonKind != ''">
  55. DonKind = #{DonKind},
  56. </if>
  57. <if test="Volume != null and Volume != ''">
  58. Volume = #{Volume},
  59. </if>
  60. <if test="ABO != null and ABO != ''">
  61. ABO = #{ABO},
  62. </if>
  63. <if test="RhD != null and RhD != ''">
  64. RhD = #{RhD},
  65. </if>
  66. <if test="CollectDate != null and CollectDate != ''">
  67. CollectDate = #{CollectDate},
  68. </if>
  69. <if test="CollectPlace != null and CollectPlace != ''">
  70. CollectPlace = #{CollectPlace},
  71. </if>
  72. <if test="OrganName != null and OrganName != ''">
  73. OrganName = #{OrganName},
  74. </if>
  75. <if test="OrganTel != null and OrganTel != ''">
  76. OrganTel = #{OrganTel},
  77. </if>
  78. </trim>
  79. where id = #{id}
  80. </update>
  81. <parameterMap id="pm_yyryxx" type="com.sooka.model.bo.Guiji_healthcommission_yyryxx_Bean"></parameterMap>
  82. <insert id="add_guiji_healthcommission_yyryxx" parameterMap="pm_yyryxx">
  83. insert into t_guiji_healthcommission_yyryxx (
  84. <include refid="global_name"></include>
  85. CardID,PersonType,UnitName,UserName,Sex,Age,Nature,Education,CellPhone,WorkType,
  86. WorkAge,UnitNatrue,PhotoUrl,LicenseUrl,AddDate,AppTime)
  87. values (
  88. <include refid="global_value"></include>
  89. #{CardID},#{PersonType},#{UnitName},#{UserName},#{Sex},#{Age},#{Nature},
  90. #{Education},#{CellPhone},
  91. #{WorkType},#{WorkAge},#{UnitNatrue},#{PhotoUrl},#{LicenseUrl},#{AddDate},#{AppTime}
  92. )
  93. </insert>
  94. <update id="update_guiji_healthcommission_yyryxx" parameterMap="pm_yyryxx">
  95. update t_guiji_healthcommission_yyryxx
  96. <trim prefix="SET" suffixOverrides=",">
  97. <include refid="update_sql"></include>
  98. <if test="CardID != null and CardID != ''">
  99. CardID = #{CardID},
  100. </if>
  101. <if test="PersonType != null and PersonType != ''">
  102. PersonType= #{PersonType},
  103. </if>
  104. <if test="UnitName != null and UnitName != ''">
  105. UnitName = #{UnitName},
  106. </if>
  107. <if test="UserName != null and UserName != ''">
  108. UserName = #{UserName},
  109. </if>
  110. <if test="Sex != null and Sex != ''">
  111. Sex = #{Sex},
  112. </if>
  113. <if test="Age != null and Age != ''">
  114. Age = #{Age},
  115. </if>
  116. <if test="Nature != null and Nature != ''">
  117. Nature = #{Nature},
  118. </if>
  119. <if test="Education != null and Education != ''">
  120. Education = #{Education},
  121. </if>
  122. <if test="CellPhone != null and CellPhone != ''">
  123. CellPhone = #{CellPhone},
  124. </if>
  125. <if test="WorkType != null and WorkType != ''">
  126. WorkType = #{WorkType},
  127. </if>
  128. <if test="WorkAge != null and WorkAge != ''">
  129. WorkAge = #{WorkAge},
  130. </if>
  131. <if test="UnitNatrue != null and UnitNatrue != ''">
  132. UnitNatrue = #{UnitNatrue},
  133. </if>
  134. <if test="PhotoUrl != null and PhotoUrl != ''">
  135. PhotoUrl = #{PhotoUrl},
  136. </if>
  137. <if test="LicenseUrl != null and LicenseUrl != ''">
  138. LicenseUrl = #{LicenseUrl},
  139. </if>
  140. <if test="AddDate != null and AddDate != ''">
  141. AddDate = #{AddDate},
  142. </if>
  143. <if test="AppTime != null and AppTime != ''">
  144. AppTime = #{AppTime},
  145. </if>
  146. </trim>
  147. where ID=#{id}
  148. </update>
  149. <parameterMap id="pm_tjxx" type="com.sooka.model.bo.Guiji_healthcommission_tjxx_Bean"></parameterMap>
  150. <insert id="add_guiji_healthcommission_tjxx" parameterMap="pm_tjxx">
  151. insert into t_guiji_healthcommission_tjxx (
  152. <include refid="global_name"></include>
  153. CardID,PersonType,UnitName,UserName,Sex,Age,Nature,Education,CellPhone,WorkType,WorkAge,
  154. UnitNatrue,PhotoUrl,LicenseUrl,AddDate,AppTime,I_Checked,I_CheckUser,Y_Checked,Y_CheckUser,
  155. H_LEVlgM,H_JiaGan,H_XQZYM,H_LiJiGanJun,H_ShangHan,
  156. H_MeiDu,H_HIV,H_Conclusion,H_Checked,H_CheckUser,
  157. T_HasGanYan,T_GanYan,T_HasShangHan,T_ShangHan,T_HasLiJi,
  158. T_LiJi,T_HasFeiJieHe,T_FeiJieHe,T_HasPiFuBing,
  159. T_PiFuBing,T_HasOtherDisease,T_OtherDisease,T_Xin,T_Gan,T_Pi,T_Fei,T_PiFu,
  160. T_Other,T_X,T_Phenomenon,X_Checked,X_CheckUser,T_Conclusion,T_Checked,T_CheckUser,
  161. B_Checked,B_CheckUser,C_Checked,C_CheckUser)
  162. values (
  163. <include refid="global_value"></include>
  164. #{CardID},#{PersonType},#{UnitName},#{UserName},#{Sex},#{Age},#{Nature},#{Education},
  165. #{CellPhone},#{WorkType},#{WorkAge},#{UnitNatrue},#{PhotoUrl},#{LicenseUrl},
  166. #{AddDate},#{AppTime},#{I_Checked},#{I_CheckUser},#{Y_Checked},#{Y_CheckUser},
  167. #{H_LEVlgM},#{H_JiaGan},#{H_XQZYM},#{H_LiJiGanJun},#{H_ShangHan},#{H_MeiDu},
  168. #{H_HIV},#{H_Conclusion},#{H_Checked},#{H_CheckUser},
  169. #{T_HasGanYan},#{T_GanYan},#{T_HasShangHan},#{T_ShangHan},#{T_HasLiJi},
  170. #{T_LiJi},#{T_HasFeiJieHe},#{T_FeiJieHe},#{T_HasPiFuBing},#{T_PiFuBing},#{T_HasOtherDisease},
  171. #{T_OtherDisease},#{T_Xin},#{T_Gan},#{T_Pi},#{T_Fei},#{T_PiFu},#{T_Other},
  172. #{T_X},#{T_Phenomenon},#{X_Checked},#{X_CheckUser},#{T_Conclusion},#{T_Checked},
  173. #{T_CheckUser},#{B_Checked},#{B_CheckUser},#{C_Checked},#{C_CheckUser})
  174. </insert>
  175. <update id="update_guiji_healthcommission_tjxx">
  176. update t_guiji_healthcommission_tjxx
  177. <trim prefix="SET" suffixOverrides=",">
  178. <include refid="update_sql"></include>
  179. <if test="CardID != null and CardID!= ''">
  180. CardID = #{CardID},
  181. </if>
  182. <if test="PersonType != null and PersonType != ''">
  183. PersonType = #{PersonType},
  184. </if>
  185. <if test="UnitName != null and UnitName != ''">
  186. UnitName = #{UnitName},
  187. </if>
  188. <if test="UserName != null and UserName != ''">
  189. UserName = #{UserName},
  190. </if>
  191. <if test="Sex != null and Sex != ''">
  192. Sex = #{Sex},
  193. </if>
  194. <if test="Age != null and Age != ''">
  195. Age = #{Age},
  196. </if>
  197. <if test="Nature != null and Nature != ''">
  198. Nature = #{Nature},
  199. </if>
  200. <if test="Education != null and Education != ''">
  201. Education = #{Education},
  202. </if>
  203. <if test="CellPhone != null and CellPhone != ''">
  204. CellPhone = #{CellPhone},
  205. </if>
  206. <if test="WorkType != null and WorkType != ''">
  207. WorkType = #{WorkType},
  208. </if>
  209. <if test="WorkAge != null and WorkAge != ''">
  210. WorkAge = #{WorkAge},
  211. </if>
  212. <if test="UnitNatrue != null and UnitNatrue != ''">
  213. UnitNatrue = #{UnitNatrue},
  214. </if>
  215. <if test="PhotoUrl != null and PhotoUrl != ''">
  216. PhotoUrl = #{PhotoUrl},
  217. </if>
  218. <if test="LicenseUrl != null and LicenseUrl != ''">
  219. LicenseUrl = #{LicenseUrl},
  220. </if>
  221. <if test="AddDate != null and AddDate != ''">
  222. AddDate = #{AddDate},
  223. </if>
  224. <if test="AppTime != null and AppTime != ''">
  225. AppTime = #{AppTime},
  226. </if>
  227. <if test="I_Checked != null and I_Checked != ''">
  228. I_Checked = #{I_Checked},
  229. </if>
  230. <if test="I_CheckUser != null and I_CheckUser != ''">
  231. I_CheckUser = #{I_CheckUser},
  232. </if>
  233. <if test="Y_Checked != null and Y_Checked != ''">
  234. Y_Checked = #{Y_Checked},
  235. </if>
  236. <if test="Y_CheckUser != null and Y_CheckUser != ''">
  237. Y_CheckUser = #{Y_CheckUser},
  238. </if>
  239. <if test="H_LEVlgM != null and H_LEVlgM != ''">
  240. H_LEVlgM = #{H_LEVlgM},
  241. </if>
  242. <if test="H_JiaGan != null and H_JiaGan != ''">
  243. H_JiaGan = #{H_JiaGan},
  244. </if>
  245. <if test="H_XQZYM != null and H_XQZYM != ''">
  246. H_XQZYM = #{H_XQZYM},
  247. </if>
  248. <if test="H_LiJiGanJun != null and H_LiJiGanJun != ''">
  249. H_LiJiGanJun = #{H_LiJiGanJun},
  250. </if>
  251. <if test="H_ShangHan != null and H_ShangHan != ''">
  252. H_ShangHan = #{H_ShangHan},
  253. </if>
  254. <if test="H_MeiDu != null and H_MeiDu != ''">
  255. H_MeiDu = #{H_MeiDu},
  256. </if>
  257. <if test="H_HIV != null and H_HIV != ''">
  258. H_HIV = #{H_HIV},
  259. </if>
  260. <if test="H_Conclusion != null and H_Conclusion != ''">
  261. H_Conclusion = #{H_Conclusion},
  262. </if>
  263. <if test="H_Checked != null and H_Checked != ''">
  264. H_Checked = #{H_Checked},
  265. </if>
  266. <if test="H_CheckUser != null and H_CheckUser != ''">
  267. H_CheckUser = #{H_CheckUser},
  268. </if>
  269. <if test="T_HasGanYan != null and T_HasGanYan != ''">
  270. T_HasGanYan = #{T_HasGanYan},
  271. </if>
  272. <if test="T_GanYan != null and T_GanYan != ''">
  273. T_GanYan = #{T_GanYan},
  274. </if>
  275. <if test="T_HasShangHan != null and T_HasShangHan != ''">
  276. T_HasShangHan = #{T_HasShangHan},
  277. </if>
  278. <if test="T_ShangHan != null and T_ShangHan != ''">
  279. T_ShangHan = #{T_ShangHan},
  280. </if>
  281. <if test="T_HasLiJi != null and T_HasLiJi != ''">
  282. T_HasLiJi = #{T_HasLiJi},
  283. </if>
  284. <if test="T_LiJi != null and T_LiJi != ''">
  285. T_LiJi = #{T_LiJi},
  286. </if>
  287. <if test="T_HasFeiJieHe != null and T_HasFeiJieHe != ''">
  288. T_HasFeiJieHe = #{T_HasFeiJieHe},
  289. </if>
  290. <if test="T_FeiJieHe != null and T_FeiJieHe != ''">
  291. T_FeiJieHe = #{T_FeiJieHe},
  292. </if>
  293. <if test="T_HasPiFuBing != null and T_HasPiFuBing != ''">
  294. T_HasPiFuBing = #{T_HasPiFuBing},
  295. </if>
  296. <if test="T_PiFuBing != null and T_PiFuBing != ''">
  297. T_PiFuBing = #{T_PiFuBing},
  298. </if>
  299. <if test="T_HasOtherDisease != null and T_HasOtherDisease != ''">
  300. T_HasOtherDisease = #{T_HasOtherDisease},
  301. </if>
  302. <if test="T_OtherDisease != null and T_OtherDisease != ''">
  303. T_OtherDisease = #{T_OtherDisease},
  304. </if>
  305. <if test="T_Xin != null and T_Xin != ''">
  306. T_Xin = #{T_Xin},
  307. </if>
  308. <if test="T_Gan != null and T_Gan != ''">
  309. T_Gan = #{T_Gan},
  310. </if>
  311. <if test="T_Pi != null and T_Pi != ''">
  312. T_Pi = #{T_Pi},
  313. </if>
  314. <if test="T_Fei != null and T_Fei != ''">
  315. T_Fei = #{T_Fei},
  316. </if>
  317. <if test="T_PiFu != null and T_PiFu != ''">
  318. T_PiFu = #{T_PiFu},
  319. </if>
  320. <if test="T_Other != null and T_Other != ''">
  321. T_Other = #{T_Other},
  322. </if>
  323. <if test="T_X != null and T_X != ''">
  324. T_X = #{T_X},
  325. </if>
  326. <if test="T_Phenomenon != null and T_Phenomenon != ''">
  327. T_Phenomenon = #{T_Phenomenon},
  328. </if>
  329. <if test="X_Checked != null and X_Checked != ''">
  330. X_Checked = #{X_Checked},
  331. </if>
  332. <if test="X_CheckUser != null and X_CheckUser != ''">
  333. X_CheckUser = #{X_CheckUser},
  334. </if>
  335. <if test="T_Conclusion != null and T_Conclusion != ''">
  336. T_Conclusion = #{T_Conclusion},
  337. </if>
  338. <if test="T_Checked != null and T_Checked != ''">
  339. T_Checked = #{T_Checked},
  340. </if>
  341. <if test="T_CheckUser != null and T_CheckUser != ''">
  342. T_CheckUser = #{T_CheckUser},
  343. </if>
  344. <if test="B_Checked != null and B_Checked != ''">
  345. B_Checked = #{B_Checked},
  346. </if>
  347. <if test="B_CheckUser != null and B_CheckUser != ''">
  348. B_CheckUser = #{B_CheckUser},
  349. </if>
  350. <if test="C_Checked != null and C_Checked != ''">
  351. C_Checked = #{C_Checked},
  352. </if>
  353. <if test="C_CheckUser != null and C_CheckUser != ''">
  354. C_CheckUser = #{C_CheckUser},
  355. </if>
  356. </trim>
  357. where id = #{id}
  358. </update>
  359. <resultMap id="rm_xx" type="com.sooka.model.bo.Guiji_healthcommission_xx_Bean"></resultMap>
  360. <select id="select_guiji_healthcommission_xx" resultMap="rm_xx" parameterMap="pm_xx">
  361. select name,idcardnum,sexid,birthday,address,fmname,chname,donkind,doncode,volume,abo,
  362. rhd,collectdate,collectplace,organname,organtel from t_guiji_healthcommission_xx
  363. where 1=1
  364. <if test="Name != null and Name != ''">
  365. and name = #{name}
  366. </if>
  367. <if test="IDCardNum != null and IDCardNum != ''">
  368. and idcardnum = #{idcardnum}
  369. </if>
  370. </select>
  371. <resultMap id="rm_tjxx" type="com.sooka.model.bo.Guiji_healthcommission_tjxx_Bean"></resultMap>
  372. <select id="select_guiji_healthcommission_tjxx" parameterMap="pm_tjxx" resultMap="rm_tjxx">
  373. select
  374. CardID,PersonType,UnitName,UserName,Sex,Age,Nature,Education,CellPhone,WorkType,WorkAge,
  375. UnitNatrue,PhotoUrl,LicenseUrl,AddDate,AppTime,I_Checked,I_CheckUser,Y_Checked,Y_CheckUser,
  376. H_LEVlgM,H_JiaGan,H_XQZYM,H_LiJiGanJun,H_ShangHan,
  377. H_MeiDu,H_HIV,H_Conclusion,H_Checked,H_CheckUser,
  378. T_HasGanYan,T_GanYan,T_HasShangHan,T_ShangHan,T_HasLiJi,
  379. T_LiJi,T_HasFeiJieHe,T_FeiJieHe,T_HasPiFuBing,
  380. T_PiFuBing,T_HasOtherDisease,T_OtherDisease,T_Xin,T_Gan,T_Pi,T_Fei,T_PiFu,
  381. T_Other,T_X,T_Phenomenon,X_Checked,X_CheckUser,T_Conclusion,T_Checked,T_CheckUser,
  382. B_Checked,B_CheckUser,C_Checked,C_CheckUser
  383. from t_guiji_healthcommission_tjxx where 1=1
  384. <if test="UserName != null and UserName != ''">
  385. and UserName = #{UserName}
  386. </if>
  387. <if test="CardID != null and CardID != null">
  388. and CardID = #{CardID}
  389. </if>
  390. </select>
  391. </mapper>