123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- <?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.InpGuidanceResultMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceResult" >
- <id column="IGR_ID" property="igrId" jdbcType="INTEGER" />
- <result column="IG_ID" property="igId" jdbcType="INTEGER" />
- <result column="IGR_Result_Code" property="igrResultCode" jdbcType="VARCHAR" />
- <result column="IGR_Result_Name" property="igrResultName" jdbcType="VARCHAR" />
- <result column="IGR_Iscomplete" property="igrIscomplete" jdbcType="INTEGER" />
- <result column="IGR_Recordor" property="igrRecordor" jdbcType="VARCHAR" />
- <result column="IGR_Record_Time" property="igrRecordTime" jdbcType="TIMESTAMP" />
- <result column="IGR_Del_Reason" property="igrDelReason" jdbcType="VARCHAR" />
- <result column="IGR_Operation_Time" property="igrOperationTime" jdbcType="TIMESTAMP" />
- <result column="IGR_Operator" property="igrOperator" jdbcType="VARCHAR" />
- <result column="IGR_IsDel" property="igrIsdel" jdbcType="INTEGER" />
- <result column="IGR_Indicator_Name" property="igrIndicatorName" jdbcType="VARCHAR" />
- <result column="IGR_Indicator_Code" property="igrIndicatorCode" jdbcType="VARCHAR" />
- <result column="IGR_Remark" property="igrRemark" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- IGR_ID, IG_ID, IGR_Result_Code, IGR_Result_Name, IGR_Iscomplete, IGR_Recordor, IGR_Record_Time,
- IGR_Del_Reason, IGR_Operation_Time, IGR_Operator, IGR_IsDel ,IGR_Indicator_Name, IGR_Indicator_Code, IGR_Remark
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance_result
- where IGR_IsDel = 0 AND IGR_ID = #{igrId,jdbcType=INTEGER}
- </select>
- <select id="selectAll" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance_result
- where IGR_IsDel = 0
- order by IGR_Operation_Time desc
- </select>
- <select id="selectByIgId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance_result
- where IGR_IsDel = 0 AND IG_ID = #{igId,jdbcType=INTEGER}
- order by IGR_Operation_Time desc
- </select>
- <select id="selectByIgIdsList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance_result
- where IGR_IsDel = 0 AND IG_ID in
- <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
- #{item,jdbcType=INTEGER}
- </foreach>
- order by IGR_Operation_Time desc
- </select>
- <select id="selectByIgIdComplete" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from inp_guidance_result
- where IGR_IsDel = 0 AND IGR_Iscomplete = 0
- AND IG_ID = #{igId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from inp_guidance_result
- where IGR_ID = #{igrId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceResult" >
- insert into inp_guidance_result (IGR_ID, IG_ID, IGR_Result_Code,
- IGR_Result_Name, IGR_Iscomplete, IGR_Recordor,
- IGR_Record_Time, IGR_Del_Reason, IGR_Operation_Time,
- IGR_Operator, IGR_IsDel ,IGR_Indicator_Name, IGR_Indicator_Code)
- values (#{igrId,jdbcType=INTEGER}, #{igId,jdbcType=INTEGER}, #{igrResultCode,jdbcType=VARCHAR},
- #{igrResultName,jdbcType=VARCHAR}, #{igrIscomplete,jdbcType=INTEGER}, #{igrRecordor,jdbcType=VARCHAR},
- #{igrRecordTime,jdbcType=TIMESTAMP}, #{igrDelReason,jdbcType=VARCHAR}, #{igrOperationTime,jdbcType=TIMESTAMP},
- #{igrOperator,jdbcType=VARCHAR}, #{igrIsdel,jdbcType=INTEGER}, #{igrIndicatorName,jdbcType=VARCHAR}, #{igrIndicatorCode,jdbcType=VARCHAR})
- </insert>
- <insert id="batchInsert" parameterType="java.util.List" >
- insert into inp_guidance_result (IG_ID, IGR_Result_Code,
- IGR_Result_Name, IGR_Iscomplete, IGR_Recordor,
- IGR_Record_Time, IGR_Operation_Time,
- IGR_Operator, IGR_Indicator_Name, IGR_Indicator_Code, IGR_Remark)
- values
- <foreach collection="list" item="item" separator="," index="index" >
- (#{item.igId,jdbcType=INTEGER}, #{item.igrResultCode,jdbcType=VARCHAR},
- #{item.igrResultName,jdbcType=VARCHAR}, #{item.igrIscomplete,jdbcType=INTEGER}, #{item.igrRecordor,jdbcType=VARCHAR},
- #{item.igrRecordTime,jdbcType=TIMESTAMP}, now(),
- #{item.igrOperator,jdbcType=VARCHAR}, #{item.igrIndicatorName,jdbcType=VARCHAR}, #{item.igrIndicatorCode,jdbcType=VARCHAR},#{item.igrRemark,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceResult" >
- insert into inp_guidance_result
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="igrId != null" >
- IGR_ID,
- </if>
- <if test="igId != null" >
- IG_ID,
- </if>
- <if test="igrResultCode != null" >
- IGR_Result_Code,
- </if>
- <if test="igrResultName != null" >
- IGR_Result_Name,
- </if>
- <if test="igrIscomplete != null" >
- IGR_Iscomplete,
- </if>
- <if test="igrRecordor != null" >
- IGR_Recordor,
- </if>
- <if test="igrRecordTime != null" >
- IGR_Record_Time,
- </if>
- <if test="igrDelReason != null" >
- IGR_Del_Reason,
- </if>
- <if test="igrOperationTime != null" >
- IGR_Operation_Time,
- </if>
- <if test="igrOperator != null" >
- IGR_Operator,
- </if>
- <if test="igrIsdel != null" >
- IGR_IsDel,
- </if>
- <if test="igrIndicatorName != null" >
- IGR_Indicator_Name,
- </if>
- <if test="igrIndicatorCode != null" >
- IGR_Indicator_Code,
- </if>
- <if test="igrRemark != null" >
- IGR_Remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="igrId != null" >
- #{igrId,jdbcType=INTEGER},
- </if>
- <if test="igId != null" >
- #{igId,jdbcType=INTEGER},
- </if>
- <if test="igrResultCode != null" >
- #{igrResultCode,jdbcType=VARCHAR},
- </if>
- <if test="igrResultName != null" >
- #{igrResultName,jdbcType=VARCHAR},
- </if>
- <if test="igrIscomplete != null" >
- #{igrIscomplete,jdbcType=INTEGER},
- </if>
- <if test="igrRecordor != null" >
- #{igrRecordor,jdbcType=VARCHAR},
- </if>
- <if test="igrRecordTime != null" >
- #{igrRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igrDelReason != null" >
- #{igrDelReason,jdbcType=VARCHAR},
- </if>
- <if test="igrOperationTime != null" >
- #{igrOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igrOperator != null" >
- #{igrOperator,jdbcType=VARCHAR},
- </if>
- <if test="igrIsdel != null" >
- #{igrIsdel,jdbcType=INTEGER},
- </if>
- <if test="igrIndicatorName != null" >
- #{igrIndicatorName,jdbcType=VARCHAR},
- </if>
- <if test="igrIndicatorCode != null" >
- #{igrIndicatorCode,jdbcType=VARCHAR},
- </if>
- <if test="igrRemark != null" >
- #{igrRemark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceResult" >
- update inp_guidance_result
- <set >
- <if test="igId != null" >
- IG_ID = #{igId,jdbcType=INTEGER},
- </if>
- <if test="igrResultCode != null" >
- IGR_Result_Code = #{igrResultCode,jdbcType=VARCHAR},
- </if>
- <if test="igrResultName != null" >
- IGR_Result_Name = #{igrResultName,jdbcType=VARCHAR},
- </if>
- <if test="igrIscomplete != null" >
- IGR_Iscomplete = #{igrIscomplete,jdbcType=INTEGER},
- </if>
- <if test="igrRecordor != null" >
- IGR_Recordor = #{igrRecordor,jdbcType=VARCHAR},
- </if>
- <if test="igrRecordTime != null" >
- IGR_Record_Time = #{igrRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igrDelReason != null" >
- IGR_Del_Reason = #{igrDelReason,jdbcType=VARCHAR},
- </if>
- <if test="igrOperationTime != null" >
- IGR_Operation_Time = #{igrOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="igrOperator != null" >
- IGR_Operator = #{igrOperator,jdbcType=VARCHAR},
- </if>
- <if test="igrIsdel != null" >
- IGR_IsDel = #{igrIsdel,jdbcType=INTEGER},
- </if>
- <if test="igrIndicatorName != null" >
- IGR_Indicator_Name = #{igrIndicatorName,jdbcType=VARCHAR},
- </if>
- <if test="igrIndicatorCode != null" >
- IGR_Indicator_Code = #{igrIndicatorCode,jdbcType=VARCHAR},
- </if>
- <if test="igrRemark != null" >
- IGR_Remark = #{igrRemark,jdbcType=VARCHAR},
- </if>
- </set>
- where IGR_ID = #{igrId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpGuidanceResult" >
- update inp_guidance_result
- set IG_ID = #{igId,jdbcType=INTEGER},
- IGR_Result_Code = #{igrResultCode,jdbcType=VARCHAR},
- IGR_Result_Name = #{igrResultName,jdbcType=VARCHAR},
- IGR_Iscomplete = #{igrIscomplete,jdbcType=INTEGER},
- IGR_Recordor = #{igrRecordor,jdbcType=VARCHAR},
- IGR_Record_Time = #{igrRecordTime,jdbcType=TIMESTAMP},
- IGR_Del_Reason = #{igrDelReason,jdbcType=VARCHAR},
- IGR_Operation_Time = #{igrOperationTime,jdbcType=TIMESTAMP},
- IGR_Operator = #{igrOperator,jdbcType=VARCHAR},
- IGR_IsDel = #{igrIsdel,jdbcType=INTEGER},
- IGR_Indicator_Name = #{igrIndicatorName,jdbcType=VARCHAR},
- IGR_Indicator_Code = #{igrIndicatorCode,jdbcType=VARCHAR},
- IGR_Remark = #{igrRemark,jdbcType=VARCHAR}
- where IGR_ID = #{igrId,jdbcType=INTEGER}
- </update>
- <update id="batchUpdate" parameterType="java.util.List" >
- <foreach collection="list" item="item" separator=";" index="index" close="" open="">
- update inp_guidance_result
- set IG_ID = #{item.igId,jdbcType=INTEGER},
- IGR_Result_Code = #{item.igrResultCode,jdbcType=VARCHAR},
- IGR_Result_Name = #{item.igrResultName,jdbcType=VARCHAR},
- IGR_Iscomplete = #{item.igrIscomplete,jdbcType=INTEGER},
- IGR_Recordor = #{item.igrRecordor,jdbcType=VARCHAR},
- IGR_Record_Time = #{item.igrRecordTime,jdbcType=TIMESTAMP},
- IGR_Operation_Time = now(),
- IGR_Operator = #{item.igrOperator,jdbcType=VARCHAR},
- IGR_Remark = #{item.igrRemark,jdbcType=VARCHAR}
- where IGR_ID = #{item.igrId,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="batchUpdateReason" parameterType="java.util.List" >
- <foreach collection="list" item="item" separator=";" index="index" close="" open="">
- update inp_guidance_result
- set IGR_Result_Name = #{item.igrResultName,jdbcType=VARCHAR},
- IGR_Remark = #{item.igrRemark,jdbcType=VARCHAR},
- IGR_Iscomplete = 1
- where IGR_ID = #{item.igrId,jdbcType=INTEGER}
- </foreach>
- </update>
- <update id="updateStatus" parameterType="java.lang.Integer" >
- update inp_guidance_result
- set IGR_IsDel = -1
- where IGR_ID = #{igrId,jdbcType=INTEGER}
- </update>
- <select id="selectByIgIdAndIgrIndicatorCode" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from inp_guidance_result
- where IGR_IsDel = 0 AND IG_ID = #{igFormerId,jdbcType=INTEGER} AND IGR_Indicator_Code = #{igrIndicatorCode,jdbcType=VARCHAR}
- </select>
- </mapper>
|