DicAssessmentDetailMapper.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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.xinxin.topro.inpnurseservice.mysqlmapper.DicAssessmentDetailMapper">
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  5. <id column="DAD_ID" property="dadId" jdbcType="INTEGER"/>
  6. <result column="DA_ID" property="daId" jdbcType="INTEGER"/>
  7. <result column="DAD_EV_System" property="dadEvSystem" jdbcType="VARCHAR"/>
  8. <result column="DAD_Code" property="dadCode" jdbcType="VARCHAR"/>
  9. <result column="DAD_Name" property="dadName" jdbcType="VARCHAR"/>
  10. <result column="DAD_Other_Name" property="dadOtherName" jdbcType="VARCHAR"/>
  11. <result column="DAD_Remark" property="dadRemark" jdbcType="VARCHAR"/>
  12. <result column="DAD_PinyinCode" property="dadPinyincode" jdbcType="VARCHAR"/>
  13. <result column="DAD_WubiCode" property="dadWubicode" jdbcType="VARCHAR"/>
  14. <result column="DAD_OtherCode" property="dadOthercode" jdbcType="VARCHAR"/>
  15. <result column="DAD_Sort" property="dadSort" jdbcType="INTEGER"/>
  16. <result column="DAD_Operation_Time" property="dadOperationTime" jdbcType="TIMESTAMP"/>
  17. <result column="DAD_Operator" property="dadOperator" jdbcType="VARCHAR"/>
  18. <result column="DAD_SupID" property="dadSupid" jdbcType="INTEGER"/>
  19. <result column="DAD_Category" property="dadCategory" jdbcType="VARCHAR"/>
  20. <result column="DAD_Input_Type" property="dadInputType" jdbcType="VARCHAR"/>
  21. <result column="DAD_Layout" property="dadLayout" jdbcType="INTEGER"/>
  22. <result column="DAD_Mode" property="dadMode" jdbcType="INTEGER"/>
  23. <result column="DAD_IsDel" property="dadIsdel" jdbcType="INTEGER"/>
  24. <result column="DAD_Score" property="dadScore" jdbcType="DOUBLE"/>
  25. <result column="DAD_IsUsing" property="dadIsusing" jdbcType="INTEGER"/>
  26. <result column="DAD_IsAbnormity" property="dadIsabnormity" jdbcType="INTEGER"/>
  27. <result column="DAD_LeftPadding" property="dadLeftPadding" jdbcType="INTEGER"/>
  28. <result column="dad_display_content" property="dadDisplayContent" jdbcType="VARCHAR"/>
  29. </resultMap>
  30. <sql id="Base_Column_List">
  31. DAD_ID, DA_ID, DAD_EV_System, DAD_Code, DAD_Name, DAD_Other_Name, DAD_Remark, DAD_PinyinCode,
  32. DAD_WubiCode, DAD_OtherCode, DAD_Sort, DAD_Operation_Time, DAD_Operator, DAD_SupID,
  33. DAD_Category, DAD_Input_Type, DAD_Layout, DAD_Mode, DAD_IsDel, DAD_Score, DAD_IsUsing,
  34. DAD_IsAbnormity,DAD_LeftPadding, dad_display_content
  35. </sql>
  36. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  37. select
  38. <include refid="Base_Column_List"/>
  39. from dic_assessment_detail
  40. where DAD_ID = #{dadId,jdbcType=INTEGER}
  41. </select>
  42. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  43. delete from dic_assessment_detail
  44. where DAD_ID = #{dadId,jdbcType=INTEGER}
  45. </delete>
  46. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  47. insert into dic_assessment_detail (DAD_ID, DA_ID, DAD_EV_System,
  48. DAD_Code, DAD_Name, DAD_Other_Name,
  49. DAD_Remark, DAD_PinyinCode, DAD_WubiCode,
  50. DAD_OtherCode, DAD_Sort, DAD_Operation_Time,
  51. DAD_Operator, DAD_SupID, DAD_Category,
  52. DAD_Input_Type, DAD_Layout, DAD_Mode,
  53. DAD_IsDel, DAD_Score, DAD_IsUsing,
  54. DAD_IsAbnormity,DAD_LeftPadding, dad_display_content)
  55. values (#{dadId,jdbcType=INTEGER}, #{daId,jdbcType=INTEGER}, #{dadEvSystem,jdbcType=VARCHAR},
  56. #{dadCode,jdbcType=VARCHAR}, #{dadName,jdbcType=VARCHAR}, #{dadOtherName,jdbcType=VARCHAR},
  57. #{dadRemark,jdbcType=VARCHAR}, #{dadPinyincode,jdbcType=VARCHAR}, #{dadWubicode,jdbcType=VARCHAR},
  58. #{dadOthercode,jdbcType=VARCHAR}, #{dadSort,jdbcType=INTEGER}, #{dadOperationTime,jdbcType=TIMESTAMP},
  59. #{dadOperator,jdbcType=VARCHAR}, #{dadSupid,jdbcType=INTEGER}, #{dadCategory,jdbcType=VARCHAR},
  60. #{dadInputType,jdbcType=VARCHAR}, #{dadLayout,jdbcType=INTEGER}, #{dadMode,jdbcType=INTEGER},
  61. #{dadIsdel,jdbcType=INTEGER}, #{dadScore,jdbcType=DOUBLE}, #{dadIsusing,jdbcType=INTEGER},
  62. #{dadIsabnormity,jdbcType=INTEGER},#{dadLeftPadding,jdbcType=INTEGER}, #{dadDisplayContent,jdbcType=VARCHAR})
  63. </insert>
  64. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  65. <selectKey keyProperty="dadId" order="AFTER" resultType="java.lang.Integer">
  66. select LAST_INSERT_ID()
  67. </selectKey>
  68. insert into dic_assessment_detail
  69. <trim prefix="(" suffix=")" suffixOverrides=",">
  70. <if test="dadId != null">
  71. DAD_ID,
  72. </if>
  73. <if test="daId != null">
  74. DA_ID,
  75. </if>
  76. <if test="dadEvSystem != null">
  77. DAD_EV_System,
  78. </if>
  79. <if test="dadCode != null">
  80. DAD_Code,
  81. </if>
  82. <if test="dadName != null">
  83. DAD_Name,
  84. </if>
  85. <if test="dadOtherName != null">
  86. DAD_Other_Name,
  87. </if>
  88. <if test="dadRemark != null">
  89. DAD_Remark,
  90. </if>
  91. <if test="dadPinyincode != null">
  92. DAD_PinyinCode,
  93. </if>
  94. <if test="dadWubicode != null">
  95. DAD_WubiCode,
  96. </if>
  97. <if test="dadOthercode != null">
  98. DAD_OtherCode,
  99. </if>
  100. <if test="dadSort != null">
  101. DAD_Sort,
  102. </if>
  103. <if test="dadOperationTime != null">
  104. DAD_Operation_Time,
  105. </if>
  106. <if test="dadOperator != null">
  107. DAD_Operator,
  108. </if>
  109. <if test="dadSupid != null">
  110. DAD_SupID,
  111. </if>
  112. <if test="dadCategory != null">
  113. DAD_Category,
  114. </if>
  115. <if test="dadInputType != null">
  116. DAD_Input_Type,
  117. </if>
  118. <if test="dadLayout != null">
  119. DAD_Layout,
  120. </if>
  121. <if test="dadMode != null">
  122. DAD_Mode,
  123. </if>
  124. <if test="dadIsdel != null">
  125. DAD_IsDel,
  126. </if>
  127. <if test="dadScore != null">
  128. DAD_Score,
  129. </if>
  130. <if test="dadIsusing != null">
  131. DAD_IsUsing,
  132. </if>
  133. <if test="dadIsabnormity != null">
  134. DAD_IsAbnormity,
  135. </if>
  136. <if test="dadLeftPadding != null">
  137. DAD_LeftPadding,
  138. </if>
  139. <if test="dadDisplayContent != null">
  140. dad_display_content,
  141. </if>
  142. </trim>
  143. <trim prefix="values (" suffix=")" suffixOverrides=",">
  144. <if test="dadId != null">
  145. #{dadId,jdbcType=INTEGER},
  146. </if>
  147. <if test="daId != null">
  148. #{daId,jdbcType=INTEGER},
  149. </if>
  150. <if test="dadEvSystem != null">
  151. #{dadEvSystem,jdbcType=VARCHAR},
  152. </if>
  153. <if test="dadCode != null">
  154. #{dadCode,jdbcType=VARCHAR},
  155. </if>
  156. <if test="dadName != null">
  157. #{dadName,jdbcType=VARCHAR},
  158. </if>
  159. <if test="dadOtherName != null">
  160. #{dadOtherName,jdbcType=VARCHAR},
  161. </if>
  162. <if test="dadRemark != null">
  163. #{dadRemark,jdbcType=VARCHAR},
  164. </if>
  165. <if test="dadPinyincode != null">
  166. #{dadPinyincode,jdbcType=VARCHAR},
  167. </if>
  168. <if test="dadWubicode != null">
  169. #{dadWubicode,jdbcType=VARCHAR},
  170. </if>
  171. <if test="dadOthercode != null">
  172. #{dadOthercode,jdbcType=VARCHAR},
  173. </if>
  174. <if test="dadSort != null">
  175. #{dadSort,jdbcType=INTEGER},
  176. </if>
  177. <if test="dadOperationTime != null">
  178. #{dadOperationTime,jdbcType=TIMESTAMP},
  179. </if>
  180. <if test="dadOperator != null">
  181. #{dadOperator,jdbcType=VARCHAR},
  182. </if>
  183. <if test="dadSupid != null">
  184. #{dadSupid,jdbcType=INTEGER},
  185. </if>
  186. <if test="dadCategory != null">
  187. #{dadCategory,jdbcType=VARCHAR},
  188. </if>
  189. <if test="dadInputType != null">
  190. #{dadInputType,jdbcType=VARCHAR},
  191. </if>
  192. <if test="dadLayout != null">
  193. #{dadLayout,jdbcType=INTEGER},
  194. </if>
  195. <if test="dadMode != null">
  196. #{dadMode,jdbcType=INTEGER},
  197. </if>
  198. <if test="dadIsdel != null">
  199. #{dadIsdel,jdbcType=INTEGER},
  200. </if>
  201. <if test="dadScore != null">
  202. #{dadScore,jdbcType=DOUBLE},
  203. </if>
  204. <if test="dadIsusing != null">
  205. #{dadIsusing,jdbcType=INTEGER},
  206. </if>
  207. <if test="dadIsabnormity != null">
  208. #{dadIsabnormity,jdbcType=INTEGER},
  209. </if>
  210. <if test="dadLeftPadding != null">
  211. #{dadLeftPadding,jdbcType=INTEGER},
  212. </if>
  213. <if test="dadDisplayContent != null">
  214. #{dadDisplayContent,jdbcType=VARCHAR},
  215. </if>
  216. </trim>
  217. </insert>
  218. <insert id="batchInsertDicAssessmentDetail" parameterType="java.util.List">
  219. insert into dic_assessment_detail (DA_ID, DAD_EV_System,
  220. DAD_Code, DAD_Name, DAD_Other_Name,
  221. DAD_Remark, DAD_PinyinCode, DAD_WubiCode,
  222. DAD_OtherCode, DAD_Sort, DAD_Operation_Time,
  223. DAD_Operator, DAD_SupID, DAD_Category,
  224. DAD_Input_Type, DAD_Layout, DAD_Mode,
  225. DAD_IsDel, DAD_Score, DAD_IsUsing,
  226. DAD_IsAbnormity,DAD_LeftPadding, dad_display_content)
  227. values
  228. <foreach collection="list" item="item" separator=",">
  229. ( #{item.daId,jdbcType=INTEGER}, #{item.dadEvSystem,jdbcType=VARCHAR},
  230. #{item.dadCode,jdbcType=VARCHAR}, #{item.dadName,jdbcType=VARCHAR}, #{item.dadOtherName,jdbcType=VARCHAR},
  231. #{item.dadRemark,jdbcType=VARCHAR}, #{item.dadPinyincode,jdbcType=VARCHAR}, #{item.dadWubicode,jdbcType=VARCHAR},
  232. #{item.dadOthercode,jdbcType=VARCHAR}, #{item.dadSort,jdbcType=INTEGER}, #{item.dadOperationTime,jdbcType=TIMESTAMP},
  233. #{item.dadOperator,jdbcType=VARCHAR}, #{item.dadSupid,jdbcType=INTEGER}, #{item.dadCategory,jdbcType=VARCHAR},
  234. #{item.dadInputType,jdbcType=VARCHAR}, #{item.dadLayout,jdbcType=INTEGER}, #{item.dadMode,jdbcType=INTEGER},
  235. #{item.dadIsdel,jdbcType=INTEGER}, #{item.dadScore,jdbcType=DOUBLE}, #{item.dadIsusing,jdbcType=INTEGER},
  236. #{item.dadIsabnormity,jdbcType=INTEGER},#{item.dadLeftPadding,jdbcType=INTEGER}, #{item.dadDisplayContent,jdbcType=VARCHAR})
  237. </foreach>
  238. </insert>
  239. <update id="updateByPrimaryKeySelective"
  240. parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  241. update dic_assessment_detail
  242. <set>
  243. <if test="daId != null">
  244. DA_ID = #{daId,jdbcType=INTEGER},
  245. </if>
  246. <if test="dadEvSystem != null">
  247. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR},
  248. </if>
  249. <if test="dadCode != null">
  250. DAD_Code = #{dadCode,jdbcType=VARCHAR},
  251. </if>
  252. <if test="dadName != null">
  253. DAD_Name = #{dadName,jdbcType=VARCHAR},
  254. </if>
  255. <if test="dadOtherName != null">
  256. DAD_Other_Name = #{dadOtherName,jdbcType=VARCHAR},
  257. </if>
  258. <if test="dadRemark != null">
  259. DAD_Remark = #{dadRemark,jdbcType=VARCHAR},
  260. </if>
  261. <if test="dadPinyincode != null">
  262. DAD_PinyinCode = #{dadPinyincode,jdbcType=VARCHAR},
  263. </if>
  264. <if test="dadWubicode != null">
  265. DAD_WubiCode = #{dadWubicode,jdbcType=VARCHAR},
  266. </if>
  267. <if test="dadOthercode != null">
  268. DAD_OtherCode = #{dadOthercode,jdbcType=VARCHAR},
  269. </if>
  270. <if test="dadSort != null">
  271. DAD_Sort = #{dadSort,jdbcType=INTEGER},
  272. </if>
  273. <if test="dadOperationTime != null">
  274. DAD_Operation_Time = #{dadOperationTime,jdbcType=TIMESTAMP},
  275. </if>
  276. <if test="dadOperator != null">
  277. DAD_Operator = #{dadOperator,jdbcType=VARCHAR},
  278. </if>
  279. <if test="dadSupid != null">
  280. DAD_SupID = #{dadSupid,jdbcType=INTEGER},
  281. </if>
  282. <if test="dadCategory != null">
  283. DAD_Category = #{dadCategory,jdbcType=VARCHAR},
  284. </if>
  285. <if test="dadInputType != null">
  286. DAD_Input_Type = #{dadInputType,jdbcType=VARCHAR},
  287. </if>
  288. <if test="dadLayout != null">
  289. DAD_Layout = #{dadLayout,jdbcType=INTEGER},
  290. </if>
  291. <if test="dadMode != null">
  292. DAD_Mode = #{dadMode,jdbcType=INTEGER},
  293. </if>
  294. <if test="dadIsdel != null">
  295. DAD_IsDel = #{dadIsdel,jdbcType=INTEGER},
  296. </if>
  297. <if test="dadScore != null">
  298. DAD_Score = #{dadScore,jdbcType=DOUBLE},
  299. </if>
  300. <if test="dadIsusing != null">
  301. DAD_IsUsing = #{dadIsusing,jdbcType=INTEGER},
  302. </if>
  303. <if test="dadIsabnormity != null">
  304. DAD_IsAbnormity = #{dadIsabnormity,jdbcType=INTEGER},
  305. </if>
  306. <if test="dadLeftPadding != null">
  307. DAD_LeftPadding = #{dadLeftPadding,jdbcType=INTEGER},
  308. </if>
  309. <if test="dadDisplayContent != null">
  310. dad_display_content = #{dadDisplayContent,jdbcType=VARCHAR},
  311. </if>
  312. </set>
  313. where DAD_ID = #{dadId,jdbcType=INTEGER}
  314. </update>
  315. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  316. update dic_assessment_detail
  317. set DA_ID = #{daId,jdbcType=INTEGER},
  318. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR},
  319. DAD_Code = #{dadCode,jdbcType=VARCHAR},
  320. DAD_Name = #{dadName,jdbcType=VARCHAR},
  321. DAD_Other_Name = #{dadOtherName,jdbcType=VARCHAR},
  322. DAD_Remark = #{dadRemark,jdbcType=VARCHAR},
  323. DAD_PinyinCode = #{dadPinyincode,jdbcType=VARCHAR},
  324. DAD_WubiCode = #{dadWubicode,jdbcType=VARCHAR},
  325. DAD_OtherCode = #{dadOthercode,jdbcType=VARCHAR},
  326. DAD_Sort = #{dadSort,jdbcType=INTEGER},
  327. DAD_Operation_Time = #{dadOperationTime,jdbcType=TIMESTAMP},
  328. DAD_Operator = #{dadOperator,jdbcType=VARCHAR},
  329. DAD_SupID = #{dadSupid,jdbcType=INTEGER},
  330. DAD_Category = #{dadCategory,jdbcType=VARCHAR},
  331. DAD_Input_Type = #{dadInputType,jdbcType=VARCHAR},
  332. DAD_Layout = #{dadLayout,jdbcType=INTEGER},
  333. DAD_Mode = #{dadMode,jdbcType=INTEGER},
  334. DAD_IsDel = #{dadIsdel,jdbcType=INTEGER},
  335. DAD_Score = #{dadScore,jdbcType=DOUBLE},
  336. DAD_IsUsing = #{dadIsusing,jdbcType=INTEGER},
  337. DAD_IsAbnormity = #{dadIsabnormity,jdbcType=INTEGER},
  338. DAD_LeftPadding = #{dadLeftPadding,jdbcType=INTEGER},
  339. dad_display_content = #{dadDisplayContent,jdbcType=VARCHAR}
  340. where DAD_ID = #{dadId,jdbcType=INTEGER}
  341. </update>
  342. <update id="batchDeleteDicAssessmentDetail">
  343. UPDATE dic_assessment_detail
  344. SET DAD_IsDel = -1,
  345. DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
  346. DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
  347. WHERE
  348. DAD_ID IN
  349. <foreach collection="idList" separator="," open="(" close=")" item="item">
  350. #{item,jdbcType=INTEGER}
  351. </foreach>
  352. </update>
  353. <update id="updateSortByDadSupIdAndDaId">
  354. UPDATE dic_assessment_detail
  355. SET DAD_Sort = DAD_Sort + 1,
  356. DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
  357. DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
  358. WHERE
  359. DA_ID = #{daId,jdbcType=INTEGER}
  360. AND
  361. DAD_SupID = #{dadSupId,jdbcType=INTEGER}
  362. AND
  363. DAD_Sort >= #{dadSort,jdbcType=INTEGER}
  364. </update>
  365. <update id="beatchDeleteByDaId">
  366. UPDATE dic_assessment_detail
  367. SET DAD_IsDel = -1,
  368. DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
  369. DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
  370. WHERE
  371. DA_ID = #{daId,jdbcType=INTEGER}
  372. </update>
  373. <update id="beatchDeleteByDaIdAndDadEvSystem">
  374. UPDATE dic_assessment_detail
  375. SET DAD_IsDel = -1,
  376. DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
  377. DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
  378. WHERE
  379. DA_ID = #{daId,jdbcType=INTEGER}
  380. AND
  381. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  382. </update>
  383. <update id="batchDelete">
  384. UPDATE dic_assessment_detail
  385. SET DAD_IsDel = -1,
  386. DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
  387. DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
  388. WHERE
  389. DAD_SupID = #{dadSupId,jdbcType=INTEGER}
  390. </update>
  391. <select id="selectByDaIdAndSupId" resultMap="BaseResultMap">
  392. SELECT
  393. <include refid="Base_Column_List"/>
  394. FROM dic_assessment_detail
  395. WHERE
  396. DA_ID = #{daId,jdbcType=INTEGER}
  397. AND
  398. DAD_SupID = #{dadSupId,jdbcType=INTEGER}
  399. AND
  400. DAD_IsDel = 0
  401. ORDER BY DAD_Sort ASC
  402. </select>
  403. <select id="getLastDicAssessmentDetail" resultMap="BaseResultMap">
  404. SELECT
  405. <include refid="Base_Column_List"/>
  406. FROM dic_assessment_detail
  407. WHERE
  408. DA_ID = #{daId,jdbcType=INTEGER}
  409. AND
  410. DAD_SupID = #{dadSupId,jdbcType=INTEGER}
  411. ORDER BY DAD_Sort DESC LIMIT 1
  412. </select>
  413. <select id="getDicAssessmentBySort" resultMap="BaseResultMap">
  414. SELECT
  415. <include refid="Base_Column_List"/>
  416. FROM dic_assessment_detail
  417. WHERE
  418. DA_ID = #{daId,jdbcType=INTEGER}
  419. AND
  420. DAD_SupID = #{dadSupId,jdbcType=INTEGER}
  421. AND
  422. DAD_Sort = #{dadSort,jdbcType=INTEGER}
  423. </select>
  424. <select id="getAssessmentDetailByDaIdAndDadCode" resultMap="BaseResultMap">
  425. SELECT
  426. <include refid="Base_Column_List"/>
  427. FROM dic_assessment_detail
  428. WHERE
  429. DA_ID = #{daId,jdbcType=INTEGER}
  430. AND
  431. DAD_Code = #{dadCode,jdbcType=VARCHAR}
  432. AND
  433. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  434. AND
  435. DAD_IsDel = 0
  436. </select>
  437. <select id="selectByDaIdAndSupIdAndDadEvSystem" resultMap="BaseResultMap">
  438. SELECT
  439. <include refid="Base_Column_List"/>
  440. FROM dic_assessment_detail
  441. WHERE
  442. DA_ID = #{daId,jdbcType=INTEGER}
  443. AND
  444. DAD_SupID = #{dadSupId,jdbcType=INTEGER}
  445. AND
  446. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  447. AND
  448. DAD_IsDel = 0
  449. ORDER BY DAD_Sort ASC
  450. </select>
  451. <select id="getDicAssessmentDetailList"
  452. resultType="com.xinxin.topro.inpnurseservice.response.DicAssessmentDetailResponse">
  453. SELECT dad.DA_ID AS daId, dad.DAD_EV_System AS dadEvSystem, sdd.SDD_Detail_Name AS dadEvSystemName, dad.DAD_Remark AS remark, sdd.SD_ID AS sdId, sdd.pop_up AS popUp, sdd.sdd_remark AS sddRemark,
  454. dad.dad_display_content AS dadDisplayContent
  455. FROM `dic_assessment_detail` dad
  456. INNER JOIN sys_dictionary_detail sdd ON dad.DAD_EV_System = sdd.SDD_Detail_Code
  457. WHERE dad.DA_ID = #{daId,jdbcType=INTEGER}
  458. AND dad.DAD_IsDel = 0
  459. AND sdd.SDD_IsDel = 0
  460. AND sdd.SD_ID in (45, 50)
  461. GROUP BY dad.DAD_EV_System
  462. ORDER BY sdd.SDD_ID ASC
  463. </select>
  464. <select id="selectByDaIdAndDadEvSystem" resultMap="BaseResultMap">
  465. SELECT
  466. <include refid="Base_Column_List"/>
  467. FROM dic_assessment_detail
  468. WHERE
  469. DA_ID = #{daId,jdbcType=INTEGER}
  470. AND
  471. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  472. AND
  473. DAD_IsDel = 0
  474. </select>
  475. <select id="selectByDaId" resultMap="BaseResultMap">
  476. SELECT
  477. <include refid="Base_Column_List"/>
  478. FROM dic_assessment_detail
  479. WHERE
  480. DA_ID = #{daId,jdbcType=INTEGER}
  481. AND
  482. DAD_IsDel = 0
  483. </select>
  484. <select id="getDadEvSystem" resultType="java.lang.String">
  485. SELECT DAD_EV_System
  486. FROM dic_assessment_detail
  487. WHERE
  488. DA_ID = #{daId,jdbcType=INTEGER}
  489. AND
  490. DAD_IsDel = 0
  491. GROUP BY DAD_EV_System
  492. </select>
  493. <select id="getDicAssessmentDetailListByDadCode" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  494. SELECT
  495. <include refid="Base_Column_List"/>
  496. FROM dic_assessment_detail
  497. WHERE
  498. DA_ID = #{daId,jdbcType=INTEGER}
  499. AND
  500. DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  501. AND
  502. DAD_Code = #{dadCode,jdbcType=VARCHAR}
  503. AND
  504. DAD_IsDel = 0
  505. </select>
  506. <select id="getDicAssessmentPlansByDaId"
  507. resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentPlan">
  508. SELECT dap.DAD_ID AS dadId , dap.DAP_ControlID AS dapControlid FROM `dic_assessment_detail` dad
  509. INNER JOIN dic_assessment_plan dap ON dad.DAD_ID = dap.DAD_ID
  510. WHERE dad.DA_ID = #{daId,jdbcType=INTEGER}
  511. AND
  512. dad.DAD_IsDel = 0
  513. AND dap.DAP_IsDel = 0
  514. </select>
  515. <select id="getDicAssessmentPlansByDaIdAndEvSystem"
  516. resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentPlan">
  517. SELECT dap.DAD_ID AS dadId , dap.DAP_ControlID AS dapControlid FROM `dic_assessment_detail` dad
  518. INNER JOIN dic_assessment_plan dap ON dad.DAD_ID = dap.DAD_ID
  519. WHERE dad.DA_ID = #{daId,jdbcType=INTEGER}
  520. AND dad.DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  521. AND dad.DAD_IsDel = 0
  522. AND dap.DAP_IsDel = 0
  523. </select>
  524. <select id="selectBySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail" resultMap="BaseResultMap" >
  525. SELECT
  526. <include refid="Base_Column_List"/>
  527. FROM dic_assessment_detail
  528. WHERE
  529. DAD_IsDel = 0
  530. <if test="daId != null">
  531. AND DA_ID = #{daId,jdbcType=INTEGER}
  532. </if>
  533. </select>
  534. <select id="selectByEvSystem" resultMap="BaseResultMap">
  535. SELECT
  536. <include refid="Base_Column_List"/>
  537. FROM dic_assessment_detail
  538. WHERE
  539. DAD_IsDel = 0
  540. AND DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
  541. </select>
  542. <select id="selectByDaCode" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
  543. SELECT
  544. dad.DAD_ID as dadId,
  545. dad.DA_ID as daId,
  546. dad.DAD_EV_System as dadEvSystem,
  547. dad.DAD_Code as dadCode,
  548. dad.DAD_Name as dadName,
  549. dad.DAD_Other_Name as dadOtherName,
  550. dad.DAD_Sort as dadSort,
  551. dad.DAD_Category as dadCategory,
  552. dad.DAD_Input_Type as dadInputType,
  553. dad.DAD_Layout as dadLayout,
  554. dad.DAD_Mode as dadMode,
  555. dad.DAD_Score as dadScore,
  556. dad.DAD_IsUsing as dadIsusing,
  557. dad.DAD_IsAbnormity as dadIsabnormity,
  558. dad.DAD_SupID as dadSupid,
  559. dad.dad_display_content AS dadDisplayContent
  560. FROM
  561. dic_assessment_detail dad
  562. LEFT JOIN dic_assessment da ON dad.DA_ID = da.DA_ID
  563. WHERE
  564. da.DA_IsDel = 0
  565. AND dad.DAD_IsDel = 0
  566. AND da.DA_Code = #{daCode,jdbcType=VARCHAR}
  567. AND (da.HI_ID = 0 OR da.HI_ID = #{hiId,jdbcType=INTEGER})
  568. </select>
  569. <select id="getDicAssessmentDetailListByDaIds" resultType="com.xinxin.topro.inpnurseservice.response.DicAssessmentDetailResponse">
  570. SELECT dad.DA_ID AS daId, dad.DAD_EV_System AS dadEvSystem, sdd.SDD_Detail_Name AS dadEvSystemName, dad.DAD_Remark AS remark, sdd.SD_ID AS sdId, sdd.pop_up AS popUp, sdd.sdd_remark AS sddRemark,
  571. dad.dad_display_content AS dadDisplayContent
  572. FROM dic_assessment_detail dad
  573. INNER JOIN sys_dictionary_detail sdd ON dad.DAD_EV_System = sdd.SDD_Detail_Code
  574. WHERE
  575. dad.DA_ID IN
  576. <foreach collection="daIds" separator="," open="(" close=")" item="item">
  577. #{item,jdbcType=INTEGER}
  578. </foreach>
  579. AND dad.DAD_IsDel = 0
  580. AND sdd.SDD_IsDel = 0
  581. AND sdd.SD_ID in (45, 50)
  582. GROUP BY DA_ID, DAD_EV_System
  583. ORDER BY sdd.SDD_ID ASC
  584. </select>
  585. </mapper>