123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <?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.InpSkinTestResultMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpSkinTestResult" >
- <id column="PST_ID" property="pstId" jdbcType="INTEGER" />
- <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
- <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
- <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
- <result column="PST_Recordor" property="pstRecordor" jdbcType="VARCHAR" />
- <result column="PST_Record_Time" property="pstRecordTime" jdbcType="TIMESTAMP" />
- <result column="PST_IsDel" property="pstIsdel" jdbcType="INTEGER" />
- <result column="PST_AdviceCode" property="pstAdvicecode" jdbcType="VARCHAR" />
- <result column="PST_BarCode" property="pstBarcode" jdbcType="VARCHAR" />
- <result column="PST_State" property="pstState" jdbcType="INTEGER" />
- <result column="PST_Result" property="pstResult" jdbcType="VARCHAR" />
- <result column="PST_Start_Time" property="pstStartTime" jdbcType="TIMESTAMP" />
- <result column="PST_End_Time" property="pstEndTime" jdbcType="TIMESTAMP" />
- <result column="PST_SK_Name" property="pstSkName" jdbcType="VARCHAR" />
- <result column="PST_Broad_Category" property="pstBroadCategory" jdbcType="VARCHAR" />
- <result column="PST_Micro_Category" property="pstMicroCategory" jdbcType="VARCHAR" />
- <result column="PST_Gatherer" property="pstGatherer" jdbcType="VARCHAR" />
- <result column="PST_gather_Time" property="pstGatherTime" jdbcType="TIMESTAMP" />
- <result column="PST_Option" property="pstOption" jdbcType="VARCHAR" />
- <result column="PST_Checker" property="pstChecker" jdbcType="VARCHAR" />
- <result column="PST_Check_Time" property="pstCheckTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- PST_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, PST_Recordor, PST_Record_Time,
- PST_IsDel, PST_AdviceCode, PST_BarCode, PST_State, PST_Result, PST_Start_Time, PST_End_Time,
- PST_SK_Name, PST_Broad_Category, PST_Micro_Category, PST_Gatherer, PST_gather_Time,PST_Option,PST_Checker,PST_Check_Time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from pda_skin_test
- where PST_ID = #{pstId,jdbcType=INTEGER}
- </select>
- <select id="selectByBarCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from pda_skin_test
- where PST_State = 0 AND PST_IsDel = 0 AND PST_BarCode = #{pstBarcode,jdbcType=VARCHAR}
- </select>
- <select id="selectByPatientNo" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from pda_skin_test
- where PST_State = 0 AND PST_IsDel = 0 AND PatientNo = #{patientNo,jdbcType=INTEGER}
- </select>
- <select id="selectByUserID" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from pda_skin_test
- where PST_State = 0 AND PST_IsDel = 0 AND PST_Gatherer = #{userID,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from pda_skin_test
- where PST_ID = #{pstId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmapper.InpSkinTestResultMapper" >
- insert into pda_skin_test (PST_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- PST_Recordor, PST_Record_Time, PST_IsDel,
- PST_AdviceCode, PST_BarCode, PST_State,
- PST_Result, PST_Start_Time, PST_End_Time,
- PST_SK_Name, PST_Broad_Category, PST_Micro_Category,
- PST_Gatherer, PST_gather_Time,PST_Option,PST_Checker,PST_Check_Time)
- values (#{pstId,jdbcType=INTEGER}, #{patientno,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{pstRecordor,jdbcType=VARCHAR}, #{pstRecordTime,jdbcType=TIMESTAMP}, #{pstIsdel,jdbcType=INTEGER},
- #{pstAdvicecode,jdbcType=VARCHAR}, #{pstBarcode,jdbcType=VARCHAR}, #{pstState,jdbcType=INTEGER},
- #{pstResult,jdbcType=VARCHAR}, #{pstStartTime,jdbcType=TIMESTAMP}, #{pstEndTime,jdbcType=TIMESTAMP},
- #{pstSkName,jdbcType=VARCHAR}, #{pstBroadCategory,jdbcType=VARCHAR}, #{pstMicroCategory,jdbcType=VARCHAR},
- #{pstGatherer,jdbcType=VARCHAR}, #{pstGatherTime,jdbcType=TIMESTAMP},
- #{pstOption,jdbcType=VARCHAR}, #{pstChecker,jdbcType=VARCHAR}, #{pstCheckTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertCollectList" parameterType="java.util.List" >
- insert into pda_skin_test (PST_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- PST_Recordor, PST_Record_Time, PST_IsDel,
- PST_AdviceCode, PST_BarCode, PST_State,
- PST_Result, PST_Start_Time, PST_End_Time,
- PST_SK_Name, PST_Broad_Category, PST_Micro_Category,
- PST_Gatherer, PST_gather_Time,PST_Option,PST_Checker,PST_Check_Time)
- values <foreach collection="list" item="item" index="index" separator=",">
- (#{item.pstId,jdbcType=INTEGER}, #{item.patientno,jdbcType=INTEGER}, #{item.hiId,jdbcType=INTEGER},
- #{item.ddDepdm,jdbcType=VARCHAR}, #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR},
- #{item.pstRecordor,jdbcType=VARCHAR}, #{item.pstRecordTime,jdbcType=TIMESTAMP}, #{item.pstIsdel,jdbcType=INTEGER},
- #{item.pstAdvicecode,jdbcType=VARCHAR}, #{item.pstBarcode,jdbcType=VARCHAR}, #{item.pstState,jdbcType=INTEGER},
- #{item.pstResult,jdbcType=VARCHAR}, #{item.pstStartTime,jdbcType=TIMESTAMP}, #{item.pstEndTime,jdbcType=TIMESTAMP},
- #{item.pstSkName,jdbcType=VARCHAR}, #{item.pstBroadCategory,jdbcType=VARCHAR}, #{item.pstMicroCategory,jdbcType=VARCHAR},
- #{item.pstGatherer,jdbcType=VARCHAR}, #{item.pstGatherTime,jdbcType=TIMESTAMP},
- #{item.pstOption,jdbcType=VARCHAR}, #{item.pstChecker,jdbcType=VARCHAR}, #{item.pstCheckTime,jdbcType=TIMESTAMP})
- </foreach>
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmapper.InpSkinTestResultMapper" >
- insert into pda_skin_test
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="pstId != null" >
- PST_ID,
- </if>
- <if test="patientno != null" >
- PatientNo,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm,
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm,
- </if>
- <if test="dbBedno != null" >
- DB_BedNo,
- </if>
- <if test="pstRecordor != null" >
- PST_Recordor,
- </if>
- <if test="pstRecordTime != null" >
- PST_Record_Time,
- </if>
- <if test="pstIsdel != null" >
- PST_IsDel,
- </if>
- <if test="pstAdvicecode != null" >
- PST_AdviceCode,
- </if>
- <if test="pstBarcode != null" >
- PST_BarCode,
- </if>
- <if test="pstState != null" >
- PST_State,
- </if>
- <if test="pstResult != null" >
- PST_Result,
- </if>
- <if test="pstStartTime != null" >
- PST_Start_Time,
- </if>
- <if test="pstEndTime != null" >
- PST_End_Time,
- </if>
- <if test="pstSkName != null" >
- PST_SK_Name,
- </if>
- <if test="pstBroadCategory != null" >
- PST_Broad_Category,
- </if>
- <if test="pstMicroCategory != null" >
- PST_Micro_Category,
- </if>
- <if test="pstGatherer != null" >
- PST_Gatherer,
- </if>
- <if test="pstGatherTime != null" >
- PST_gather_Time,
- </if>
- <if test="pstOption != null" >
- PST_Option,
- </if>
- <if test="pstChecker != null" >
- PST_Checker,
- </if>
- <if test="pstCheckTime != null" >
- PST_Check_Time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="pstId != null" >
- #{pstId,jdbcType=INTEGER},
- </if>
- <if test="patientno != null" >
- #{patientno,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ddDepdm != null" >
- #{ddDepdm,jdbcType=VARCHAR},
- </if>
- <if test="dwWarddm != null" >
- #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dbBedno != null" >
- #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="pstRecordor != null" >
- #{pstRecordor,jdbcType=VARCHAR},
- </if>
- <if test="pstRecordTime != null" >
- #{pstRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstIsdel != null" >
- #{pstIsdel,jdbcType=INTEGER},
- </if>
- <if test="pstAdvicecode != null" >
- #{pstAdvicecode,jdbcType=VARCHAR},
- </if>
- <if test="pstBarcode != null" >
- #{pstBarcode,jdbcType=VARCHAR},
- </if>
- <if test="pstState != null" >
- #{pstState,jdbcType=INTEGER},
- </if>
- <if test="pstResult != null" >
- #{pstResult,jdbcType=VARCHAR},
- </if>
- <if test="pstStartTime != null" >
- #{pstStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstEndTime != null" >
- #{pstEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstSkName != null" >
- #{pstSkName,jdbcType=VARCHAR},
- </if>
- <if test="pstBroadCategory != null" >
- #{pstBroadCategory,jdbcType=VARCHAR},
- </if>
- <if test="pstMicroCategory != null" >
- #{pstMicroCategory,jdbcType=VARCHAR},
- </if>
- <if test="pstGatherer != null" >
- #{pstGatherer,jdbcType=VARCHAR},
- </if>
- <if test="pstGatherTime != null" >
- #{pstGatherTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstOption != null" >
- #{PST_Option,jdbcType=VARCHAR},
- </if>
- <if test="pstChecker != null" >
- #{PST_Checker,jdbcType=VARCHAR},
- </if>
- <if test="pstCheckTime != null" >
- #{PST_Check_Time,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmapper.InpSkinTestResultMapper" >
- update pda_skin_test
- <set >
- <if test="patientno != null" >
- PatientNo = #{patientno,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="ddDepdm != null" >
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dbBedno != null" >
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- </if>
- <if test="pstRecordor != null" >
- PST_Recordor = #{pstRecordor,jdbcType=VARCHAR},
- </if>
- <if test="pstRecordTime != null" >
- PST_Record_Time = #{pstRecordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstIsdel != null" >
- PST_IsDel = #{pstIsdel,jdbcType=INTEGER},
- </if>
- <if test="pstAdvicecode != null" >
- PST_AdviceCode = #{pstAdvicecode,jdbcType=VARCHAR},
- </if>
- <if test="pstBarcode != null" >
- PST_BarCode = #{pstBarcode,jdbcType=VARCHAR},
- </if>
- <if test="pstState != null" >
- PST_State = #{pstState,jdbcType=INTEGER},
- </if>
- <if test="pstResult != null" >
- PST_Result = #{pstResult,jdbcType=VARCHAR},
- </if>
- <if test="pstStartTime != null" >
- PST_Start_Time = #{pstStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstEndTime != null" >
- PST_End_Time = #{pstEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstSkName != null" >
- PST_SK_Name = #{pstSkName,jdbcType=VARCHAR},
- </if>
- <if test="pstBroadCategory != null" >
- PST_Broad_Category = #{pstBroadCategory,jdbcType=VARCHAR},
- </if>
- <if test="pstMicroCategory != null" >
- PST_Micro_Category = #{pstMicroCategory,jdbcType=VARCHAR},
- </if>
- <if test="pstGatherer != null" >
- PST_Gatherer = #{pstGatherer,jdbcType=VARCHAR},
- </if>
- <if test="pstGatherTime != null" >
- PST_gather_Time = #{pstGatherTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pstOption != null" >
- PST_Option = #{pstOption,jdbcType=VARCHAR},
- </if>
- <if test="pstChecker != null" >
- PST_Checker = #{pstChecker,jdbcType=VARCHAR},
- </if>
- <if test="pstCheckTime != null" >
- PST_Check_Time = #{pstCheckTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where PST_ID = #{pstId,jdbcType=INTEGER}
- </update>
- <select id="selectBySelective" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select a.*,b.bedNo,b.chartNo,b.dose,b.doseUnit,b.wayName,b.usage,b.orderTime,b.OrderUserName,b.ptName patinetName,b.itemName
- from pda_skin_test a
- INNER JOIN inp_patient c on a.PatientNo = c.IP_PatientNo
- LEFT JOIN v_expand_order b on a.PST_AdviceCode = b.RecordId
- where a.PST_IsDel = 0
- AND a.DW_WardDm = #{departNo} and a.PST_Start_Time >= #{execSTime} and a.PST_Start_Time <= #{execETime}
- <if test='beds!=null'> and c.DB_BedNo in <foreach item='item' index='index' collection='beds' open='(' separator=',' close=')'> #{item} </foreach></if>
- and c.IP_Status = #{inHospitalStatus}
- </select>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmapper.InpSkinTestResultMapper" >
- update pda_skin_test
- set PatientNo = #{patientno,jdbcType=INTEGER},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- PST_Recordor = #{pstRecordor,jdbcType=VARCHAR},
- PST_Record_Time = #{pstRecordTime,jdbcType=TIMESTAMP},
- PST_IsDel = #{pstIsdel,jdbcType=INTEGER},
- PST_AdviceCode = #{pstAdvicecode,jdbcType=VARCHAR},
- PST_BarCode = #{pstBarcode,jdbcType=VARCHAR},
- PST_State = #{pstState,jdbcType=INTEGER},
- PST_Result = #{pstResult,jdbcType=VARCHAR},
- PST_Start_Time = #{pstStartTime,jdbcType=TIMESTAMP},
- PST_End_Time = #{pstEndTime,jdbcType=TIMESTAMP},
- PST_SK_Name = #{pstSkName,jdbcType=VARCHAR},
- PST_Broad_Category = #{pstBroadCategory,jdbcType=VARCHAR},
- PST_Micro_Category = #{pstMicroCategory,jdbcType=VARCHAR},
- PST_Gatherer = #{pstGatherer,jdbcType=VARCHAR},
- PST_gather_Time = #{pstGatherTime,jdbcType=TIMESTAMP},
- PST_Option = #{pstOption,jdbcType=VARCHAR},
- PST_Checker = #{pstChecker,jdbcType=VARCHAR},
- PST_Check_Time = #{pstCheckTime,jdbcType=TIMESTAMP}
- where PST_ID = #{pstId,jdbcType=INTEGER}
- </update>
- <update id="batchUpdate" parameterType="java.util.List" >
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- update pda_skin_test
- set PST_State = 1,
- PST_Recordor = #{item.pstRecordor,jdbcType=VARCHAR},
- PST_Record_Time = #{item.pstRecordTime,jdbcType=TIMESTAMP},
- PST_Result = #{item.pstResult,jdbcType=VARCHAR},
- PST_Option = #{item.pstOption,jdbcType=VARCHAR},
- PST_Checker = #{item.pstChecker,jdbcType=VARCHAR},
- PST_Check_Time = #{item.pstCheckTime,jdbcType=TIMESTAMP}
- where PST_ID = #{item.pstId,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|