123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586 |
- <?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.xinxin.topro.inpnurseservice.mysqlmapper.DicAssessmentDetailMapper">
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- <id column="DAD_ID" property="dadId" jdbcType="INTEGER"/>
- <result column="DA_ID" property="daId" jdbcType="INTEGER"/>
- <result column="DAD_EV_System" property="dadEvSystem" jdbcType="VARCHAR"/>
- <result column="DAD_Code" property="dadCode" jdbcType="VARCHAR"/>
- <result column="DAD_Name" property="dadName" jdbcType="VARCHAR"/>
- <result column="DAD_Other_Name" property="dadOtherName" jdbcType="VARCHAR"/>
- <result column="DAD_Remark" property="dadRemark" jdbcType="VARCHAR"/>
- <result column="DAD_PinyinCode" property="dadPinyincode" jdbcType="VARCHAR"/>
- <result column="DAD_WubiCode" property="dadWubicode" jdbcType="VARCHAR"/>
- <result column="DAD_OtherCode" property="dadOthercode" jdbcType="VARCHAR"/>
- <result column="DAD_Sort" property="dadSort" jdbcType="INTEGER"/>
- <result column="DAD_Operation_Time" property="dadOperationTime" jdbcType="TIMESTAMP"/>
- <result column="DAD_Operator" property="dadOperator" jdbcType="VARCHAR"/>
- <result column="DAD_SupID" property="dadSupid" jdbcType="INTEGER"/>
- <result column="DAD_Category" property="dadCategory" jdbcType="VARCHAR"/>
- <result column="DAD_Input_Type" property="dadInputType" jdbcType="VARCHAR"/>
- <result column="DAD_Layout" property="dadLayout" jdbcType="INTEGER"/>
- <result column="DAD_Mode" property="dadMode" jdbcType="INTEGER"/>
- <result column="DAD_IsDel" property="dadIsdel" jdbcType="INTEGER"/>
- <result column="DAD_Score" property="dadScore" jdbcType="DOUBLE"/>
- <result column="DAD_IsUsing" property="dadIsusing" jdbcType="INTEGER"/>
- <result column="DAD_IsAbnormity" property="dadIsabnormity" jdbcType="INTEGER"/>
- <result column="DAD_LeftPadding" property="dadLeftPadding" jdbcType="INTEGER"/>
- <result column="dad_display_content" property="dadDisplayContent" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- DAD_ID, DA_ID, DAD_EV_System, DAD_Code, DAD_Name, DAD_Other_Name, DAD_Remark, DAD_PinyinCode,
- DAD_WubiCode, DAD_OtherCode, DAD_Sort, DAD_Operation_Time, DAD_Operator, DAD_SupID,
- DAD_Category, DAD_Input_Type, DAD_Layout, DAD_Mode, DAD_IsDel, DAD_Score, DAD_IsUsing,
- DAD_IsAbnormity,DAD_LeftPadding, dad_display_content
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
- select
- <include refid="Base_Column_List"/>
- from dic_assessment_detail
- where DAD_ID = #{dadId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from dic_assessment_detail
- where DAD_ID = #{dadId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- insert into dic_assessment_detail (DAD_ID, DA_ID, DAD_EV_System,
- DAD_Code, DAD_Name, DAD_Other_Name,
- DAD_Remark, DAD_PinyinCode, DAD_WubiCode,
- DAD_OtherCode, DAD_Sort, DAD_Operation_Time,
- DAD_Operator, DAD_SupID, DAD_Category,
- DAD_Input_Type, DAD_Layout, DAD_Mode,
- DAD_IsDel, DAD_Score, DAD_IsUsing,
- DAD_IsAbnormity,DAD_LeftPadding, dad_display_content)
- values (#{dadId,jdbcType=INTEGER}, #{daId,jdbcType=INTEGER}, #{dadEvSystem,jdbcType=VARCHAR},
- #{dadCode,jdbcType=VARCHAR}, #{dadName,jdbcType=VARCHAR}, #{dadOtherName,jdbcType=VARCHAR},
- #{dadRemark,jdbcType=VARCHAR}, #{dadPinyincode,jdbcType=VARCHAR}, #{dadWubicode,jdbcType=VARCHAR},
- #{dadOthercode,jdbcType=VARCHAR}, #{dadSort,jdbcType=INTEGER}, #{dadOperationTime,jdbcType=TIMESTAMP},
- #{dadOperator,jdbcType=VARCHAR}, #{dadSupid,jdbcType=INTEGER}, #{dadCategory,jdbcType=VARCHAR},
- #{dadInputType,jdbcType=VARCHAR}, #{dadLayout,jdbcType=INTEGER}, #{dadMode,jdbcType=INTEGER},
- #{dadIsdel,jdbcType=INTEGER}, #{dadScore,jdbcType=DOUBLE}, #{dadIsusing,jdbcType=INTEGER},
- #{dadIsabnormity,jdbcType=INTEGER},#{dadLeftPadding,jdbcType=INTEGER}, #{dadDisplayContent,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- <selectKey keyProperty="dadId" order="AFTER" resultType="java.lang.Integer">
- select LAST_INSERT_ID()
- </selectKey>
- insert into dic_assessment_detail
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="dadId != null">
- DAD_ID,
- </if>
- <if test="daId != null">
- DA_ID,
- </if>
- <if test="dadEvSystem != null">
- DAD_EV_System,
- </if>
- <if test="dadCode != null">
- DAD_Code,
- </if>
- <if test="dadName != null">
- DAD_Name,
- </if>
- <if test="dadOtherName != null">
- DAD_Other_Name,
- </if>
- <if test="dadRemark != null">
- DAD_Remark,
- </if>
- <if test="dadPinyincode != null">
- DAD_PinyinCode,
- </if>
- <if test="dadWubicode != null">
- DAD_WubiCode,
- </if>
- <if test="dadOthercode != null">
- DAD_OtherCode,
- </if>
- <if test="dadSort != null">
- DAD_Sort,
- </if>
- <if test="dadOperationTime != null">
- DAD_Operation_Time,
- </if>
- <if test="dadOperator != null">
- DAD_Operator,
- </if>
- <if test="dadSupid != null">
- DAD_SupID,
- </if>
- <if test="dadCategory != null">
- DAD_Category,
- </if>
- <if test="dadInputType != null">
- DAD_Input_Type,
- </if>
- <if test="dadLayout != null">
- DAD_Layout,
- </if>
- <if test="dadMode != null">
- DAD_Mode,
- </if>
- <if test="dadIsdel != null">
- DAD_IsDel,
- </if>
- <if test="dadScore != null">
- DAD_Score,
- </if>
- <if test="dadIsusing != null">
- DAD_IsUsing,
- </if>
- <if test="dadIsabnormity != null">
- DAD_IsAbnormity,
- </if>
- <if test="dadLeftPadding != null">
- DAD_LeftPadding,
- </if>
- <if test="dadDisplayContent != null">
- dad_display_content,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="dadId != null">
- #{dadId,jdbcType=INTEGER},
- </if>
- <if test="daId != null">
- #{daId,jdbcType=INTEGER},
- </if>
- <if test="dadEvSystem != null">
- #{dadEvSystem,jdbcType=VARCHAR},
- </if>
- <if test="dadCode != null">
- #{dadCode,jdbcType=VARCHAR},
- </if>
- <if test="dadName != null">
- #{dadName,jdbcType=VARCHAR},
- </if>
- <if test="dadOtherName != null">
- #{dadOtherName,jdbcType=VARCHAR},
- </if>
- <if test="dadRemark != null">
- #{dadRemark,jdbcType=VARCHAR},
- </if>
- <if test="dadPinyincode != null">
- #{dadPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="dadWubicode != null">
- #{dadWubicode,jdbcType=VARCHAR},
- </if>
- <if test="dadOthercode != null">
- #{dadOthercode,jdbcType=VARCHAR},
- </if>
- <if test="dadSort != null">
- #{dadSort,jdbcType=INTEGER},
- </if>
- <if test="dadOperationTime != null">
- #{dadOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dadOperator != null">
- #{dadOperator,jdbcType=VARCHAR},
- </if>
- <if test="dadSupid != null">
- #{dadSupid,jdbcType=INTEGER},
- </if>
- <if test="dadCategory != null">
- #{dadCategory,jdbcType=VARCHAR},
- </if>
- <if test="dadInputType != null">
- #{dadInputType,jdbcType=VARCHAR},
- </if>
- <if test="dadLayout != null">
- #{dadLayout,jdbcType=INTEGER},
- </if>
- <if test="dadMode != null">
- #{dadMode,jdbcType=INTEGER},
- </if>
- <if test="dadIsdel != null">
- #{dadIsdel,jdbcType=INTEGER},
- </if>
- <if test="dadScore != null">
- #{dadScore,jdbcType=DOUBLE},
- </if>
- <if test="dadIsusing != null">
- #{dadIsusing,jdbcType=INTEGER},
- </if>
- <if test="dadIsabnormity != null">
- #{dadIsabnormity,jdbcType=INTEGER},
- </if>
- <if test="dadLeftPadding != null">
- #{dadLeftPadding,jdbcType=INTEGER},
- </if>
- <if test="dadDisplayContent != null">
- #{dadDisplayContent,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <insert id="batchInsertDicAssessmentDetail" parameterType="java.util.List">
- insert into dic_assessment_detail (DA_ID, DAD_EV_System,
- DAD_Code, DAD_Name, DAD_Other_Name,
- DAD_Remark, DAD_PinyinCode, DAD_WubiCode,
- DAD_OtherCode, DAD_Sort, DAD_Operation_Time,
- DAD_Operator, DAD_SupID, DAD_Category,
- DAD_Input_Type, DAD_Layout, DAD_Mode,
- DAD_IsDel, DAD_Score, DAD_IsUsing,
- DAD_IsAbnormity,DAD_LeftPadding, dad_display_content)
- values
- <foreach collection="list" item="item" separator=",">
- ( #{item.daId,jdbcType=INTEGER}, #{item.dadEvSystem,jdbcType=VARCHAR},
- #{item.dadCode,jdbcType=VARCHAR}, #{item.dadName,jdbcType=VARCHAR}, #{item.dadOtherName,jdbcType=VARCHAR},
- #{item.dadRemark,jdbcType=VARCHAR}, #{item.dadPinyincode,jdbcType=VARCHAR}, #{item.dadWubicode,jdbcType=VARCHAR},
- #{item.dadOthercode,jdbcType=VARCHAR}, #{item.dadSort,jdbcType=INTEGER}, #{item.dadOperationTime,jdbcType=TIMESTAMP},
- #{item.dadOperator,jdbcType=VARCHAR}, #{item.dadSupid,jdbcType=INTEGER}, #{item.dadCategory,jdbcType=VARCHAR},
- #{item.dadInputType,jdbcType=VARCHAR}, #{item.dadLayout,jdbcType=INTEGER}, #{item.dadMode,jdbcType=INTEGER},
- #{item.dadIsdel,jdbcType=INTEGER}, #{item.dadScore,jdbcType=DOUBLE}, #{item.dadIsusing,jdbcType=INTEGER},
- #{item.dadIsabnormity,jdbcType=INTEGER},#{item.dadLeftPadding,jdbcType=INTEGER}, #{item.dadDisplayContent,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <update id="updateByPrimaryKeySelective"
- parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- update dic_assessment_detail
- <set>
- <if test="daId != null">
- DA_ID = #{daId,jdbcType=INTEGER},
- </if>
- <if test="dadEvSystem != null">
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR},
- </if>
- <if test="dadCode != null">
- DAD_Code = #{dadCode,jdbcType=VARCHAR},
- </if>
- <if test="dadName != null">
- DAD_Name = #{dadName,jdbcType=VARCHAR},
- </if>
- <if test="dadOtherName != null">
- DAD_Other_Name = #{dadOtherName,jdbcType=VARCHAR},
- </if>
- <if test="dadRemark != null">
- DAD_Remark = #{dadRemark,jdbcType=VARCHAR},
- </if>
- <if test="dadPinyincode != null">
- DAD_PinyinCode = #{dadPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="dadWubicode != null">
- DAD_WubiCode = #{dadWubicode,jdbcType=VARCHAR},
- </if>
- <if test="dadOthercode != null">
- DAD_OtherCode = #{dadOthercode,jdbcType=VARCHAR},
- </if>
- <if test="dadSort != null">
- DAD_Sort = #{dadSort,jdbcType=INTEGER},
- </if>
- <if test="dadOperationTime != null">
- DAD_Operation_Time = #{dadOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dadOperator != null">
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR},
- </if>
- <if test="dadSupid != null">
- DAD_SupID = #{dadSupid,jdbcType=INTEGER},
- </if>
- <if test="dadCategory != null">
- DAD_Category = #{dadCategory,jdbcType=VARCHAR},
- </if>
- <if test="dadInputType != null">
- DAD_Input_Type = #{dadInputType,jdbcType=VARCHAR},
- </if>
- <if test="dadLayout != null">
- DAD_Layout = #{dadLayout,jdbcType=INTEGER},
- </if>
- <if test="dadMode != null">
- DAD_Mode = #{dadMode,jdbcType=INTEGER},
- </if>
- <if test="dadIsdel != null">
- DAD_IsDel = #{dadIsdel,jdbcType=INTEGER},
- </if>
- <if test="dadScore != null">
- DAD_Score = #{dadScore,jdbcType=DOUBLE},
- </if>
- <if test="dadIsusing != null">
- DAD_IsUsing = #{dadIsusing,jdbcType=INTEGER},
- </if>
- <if test="dadIsabnormity != null">
- DAD_IsAbnormity = #{dadIsabnormity,jdbcType=INTEGER},
- </if>
- <if test="dadLeftPadding != null">
- DAD_LeftPadding = #{dadLeftPadding,jdbcType=INTEGER},
- </if>
- <if test="dadDisplayContent != null">
- dad_display_content = #{dadDisplayContent,jdbcType=VARCHAR},
- </if>
- </set>
- where DAD_ID = #{dadId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- update dic_assessment_detail
- set DA_ID = #{daId,jdbcType=INTEGER},
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR},
- DAD_Code = #{dadCode,jdbcType=VARCHAR},
- DAD_Name = #{dadName,jdbcType=VARCHAR},
- DAD_Other_Name = #{dadOtherName,jdbcType=VARCHAR},
- DAD_Remark = #{dadRemark,jdbcType=VARCHAR},
- DAD_PinyinCode = #{dadPinyincode,jdbcType=VARCHAR},
- DAD_WubiCode = #{dadWubicode,jdbcType=VARCHAR},
- DAD_OtherCode = #{dadOthercode,jdbcType=VARCHAR},
- DAD_Sort = #{dadSort,jdbcType=INTEGER},
- DAD_Operation_Time = #{dadOperationTime,jdbcType=TIMESTAMP},
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR},
- DAD_SupID = #{dadSupid,jdbcType=INTEGER},
- DAD_Category = #{dadCategory,jdbcType=VARCHAR},
- DAD_Input_Type = #{dadInputType,jdbcType=VARCHAR},
- DAD_Layout = #{dadLayout,jdbcType=INTEGER},
- DAD_Mode = #{dadMode,jdbcType=INTEGER},
- DAD_IsDel = #{dadIsdel,jdbcType=INTEGER},
- DAD_Score = #{dadScore,jdbcType=DOUBLE},
- DAD_IsUsing = #{dadIsusing,jdbcType=INTEGER},
- DAD_IsAbnormity = #{dadIsabnormity,jdbcType=INTEGER},
- DAD_LeftPadding = #{dadLeftPadding,jdbcType=INTEGER},
- dad_display_content = #{dadDisplayContent,jdbcType=VARCHAR}
- where DAD_ID = #{dadId,jdbcType=INTEGER}
- </update>
- <update id="batchDeleteDicAssessmentDetail">
- UPDATE dic_assessment_detail
- SET DAD_IsDel = -1,
- DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
- WHERE
- DAD_ID IN
- <foreach collection="idList" separator="," open="(" close=")" item="item">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateSortByDadSupIdAndDaId">
- UPDATE dic_assessment_detail
- SET DAD_Sort = DAD_Sort + 1,
- DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_SupID = #{dadSupId,jdbcType=INTEGER}
- AND
- DAD_Sort >= #{dadSort,jdbcType=INTEGER}
- </update>
- <update id="beatchDeleteByDaId">
- UPDATE dic_assessment_detail
- SET DAD_IsDel = -1,
- DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- </update>
- <update id="beatchDeleteByDaIdAndDadEvSystem">
- UPDATE dic_assessment_detail
- SET DAD_IsDel = -1,
- DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- </update>
- <update id="batchDelete">
- UPDATE dic_assessment_detail
- SET DAD_IsDel = -1,
- DAD_Operation_Time = #{date,jdbcType=TIMESTAMP},
- DAD_Operator = #{dadOperator,jdbcType=VARCHAR}
- WHERE
- DAD_SupID = #{dadSupId,jdbcType=INTEGER}
- </update>
- <select id="selectByDaIdAndSupId" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_SupID = #{dadSupId,jdbcType=INTEGER}
- AND
- DAD_IsDel = 0
- ORDER BY DAD_Sort ASC
- </select>
- <select id="getLastDicAssessmentDetail" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_SupID = #{dadSupId,jdbcType=INTEGER}
- ORDER BY DAD_Sort DESC LIMIT 1
- </select>
- <select id="getDicAssessmentBySort" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_SupID = #{dadSupId,jdbcType=INTEGER}
- AND
- DAD_Sort = #{dadSort,jdbcType=INTEGER}
- </select>
- <select id="getAssessmentDetailByDaIdAndDadCode" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_Code = #{dadCode,jdbcType=VARCHAR}
- AND
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- AND
- DAD_IsDel = 0
- </select>
- <select id="selectByDaIdAndSupIdAndDadEvSystem" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_SupID = #{dadSupId,jdbcType=INTEGER}
- AND
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- AND
- DAD_IsDel = 0
- ORDER BY DAD_Sort ASC
- </select>
- <select id="getDicAssessmentDetailList"
- resultType="com.xinxin.topro.inpnurseservice.response.DicAssessmentDetailResponse">
- 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,
- dad.dad_display_content AS dadDisplayContent
- FROM `dic_assessment_detail` dad
- INNER JOIN sys_dictionary_detail sdd ON dad.DAD_EV_System = sdd.SDD_Detail_Code
- WHERE dad.DA_ID = #{daId,jdbcType=INTEGER}
- AND dad.DAD_IsDel = 0
- AND sdd.SDD_IsDel = 0
- AND sdd.SD_ID in (45, 50)
- GROUP BY dad.DAD_EV_System
- ORDER BY sdd.SDD_ID ASC
- </select>
- <select id="selectByDaIdAndDadEvSystem" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- AND
- DAD_IsDel = 0
- </select>
- <select id="selectByDaId" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_IsDel = 0
- </select>
- <select id="getDadEvSystem" resultType="java.lang.String">
- SELECT DAD_EV_System
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_IsDel = 0
- GROUP BY DAD_EV_System
- </select>
- <select id="getDicAssessmentDetailListByDadCode" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DA_ID = #{daId,jdbcType=INTEGER}
- AND
- DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- AND
- DAD_Code = #{dadCode,jdbcType=VARCHAR}
- AND
- DAD_IsDel = 0
- </select>
- <select id="getDicAssessmentPlansByDaId"
- resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentPlan">
- SELECT dap.DAD_ID AS dadId , dap.DAP_ControlID AS dapControlid FROM `dic_assessment_detail` dad
- INNER JOIN dic_assessment_plan dap ON dad.DAD_ID = dap.DAD_ID
- WHERE dad.DA_ID = #{daId,jdbcType=INTEGER}
- AND
- dad.DAD_IsDel = 0
- AND dap.DAP_IsDel = 0
- </select>
- <select id="getDicAssessmentPlansByDaIdAndEvSystem"
- resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentPlan">
- SELECT dap.DAD_ID AS dadId , dap.DAP_ControlID AS dapControlid FROM `dic_assessment_detail` dad
- INNER JOIN dic_assessment_plan dap ON dad.DAD_ID = dap.DAD_ID
- WHERE dad.DA_ID = #{daId,jdbcType=INTEGER}
- AND dad.DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- AND dad.DAD_IsDel = 0
- AND dap.DAP_IsDel = 0
- </select>
- <select id="selectBySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail" resultMap="BaseResultMap" >
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DAD_IsDel = 0
- <if test="daId != null">
- AND DA_ID = #{daId,jdbcType=INTEGER}
- </if>
- </select>
- <select id="selectByEvSystem" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM dic_assessment_detail
- WHERE
- DAD_IsDel = 0
- AND DAD_EV_System = #{dadEvSystem,jdbcType=VARCHAR}
- </select>
- <select id="selectByDaCode" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicAssessmentDetail">
- SELECT
- dad.DAD_ID as dadId,
- dad.DA_ID as daId,
- dad.DAD_EV_System as dadEvSystem,
- dad.DAD_Code as dadCode,
- dad.DAD_Name as dadName,
- dad.DAD_Other_Name as dadOtherName,
- dad.DAD_Sort as dadSort,
- dad.DAD_Category as dadCategory,
- dad.DAD_Input_Type as dadInputType,
- dad.DAD_Layout as dadLayout,
- dad.DAD_Mode as dadMode,
- dad.DAD_Score as dadScore,
- dad.DAD_IsUsing as dadIsusing,
- dad.DAD_IsAbnormity as dadIsabnormity,
- dad.DAD_SupID as dadSupid,
- dad.dad_display_content AS dadDisplayContent
- FROM
- dic_assessment_detail dad
- LEFT JOIN dic_assessment da ON dad.DA_ID = da.DA_ID
- WHERE
- da.DA_IsDel = 0
- AND dad.DAD_IsDel = 0
- AND da.DA_Code = #{daCode,jdbcType=VARCHAR}
- AND (da.HI_ID = 0 OR da.HI_ID = #{hiId,jdbcType=INTEGER})
- </select>
- <select id="getDicAssessmentDetailListByDaIds" resultType="com.xinxin.topro.inpnurseservice.response.DicAssessmentDetailResponse">
- 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,
- dad.dad_display_content AS dadDisplayContent
- FROM dic_assessment_detail dad
- INNER JOIN sys_dictionary_detail sdd ON dad.DAD_EV_System = sdd.SDD_Detail_Code
- WHERE
- dad.DA_ID IN
- <foreach collection="daIds" separator="," open="(" close=")" item="item">
- #{item,jdbcType=INTEGER}
- </foreach>
- AND dad.DAD_IsDel = 0
- AND sdd.SDD_IsDel = 0
- AND sdd.SD_ID in (45, 50)
- GROUP BY DA_ID, DAD_EV_System
- ORDER BY sdd.SDD_ID ASC
- </select>
- </mapper>
|