123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <?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.pubservice.mysqlmapper.ComTestReportMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.ComTestReport" >
- <id column="CTR_ID" property="ctrId" 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="CTR_Record_ID" property="ctrRecordId" jdbcType="VARCHAR" />
- <result column="CTR_Visit_No" property="ctrVisitNo" jdbcType="VARCHAR" />
- <result column="CTR_Visit_Type" property="ctrVisitType" jdbcType="INTEGER" />
- <result column="CTR_Diag_Name" property="ctrDiagName" jdbcType="VARCHAR" />
- <result column="CTR_Advice_ID" property="ctrAdviceId" jdbcType="VARCHAR" />
- <result column="CTR_Item_Code" property="ctrItemCode" jdbcType="VARCHAR" />
- <result column="CTR_Item_Name" property="ctrItemName" jdbcType="VARCHAR" />
- <result column="CTR_Barcode" property="ctrBarcode" jdbcType="VARCHAR" />
- <result column="CTR_IsMicrobe" property="ctrIsmicrobe" jdbcType="INTEGER" />
- <result column="CTR_Sample_No" property="ctrSampleNo" jdbcType="VARCHAR" />
- <result column="CTR_Sample_Type" property="ctrSampleType" jdbcType="VARCHAR" />
- <result column="CTR_Requester" property="ctrRequester" jdbcType="VARCHAR" />
- <result column="CTR_Request_Time" property="ctrRequestTime" jdbcType="TIMESTAMP" />
- <result column="CTR_Request_Dep" property="ctrRequestDep" jdbcType="VARCHAR" />
- <result column="CTR_Exector" property="ctrExector" jdbcType="VARCHAR" />
- <result column="CTR_Execte_Time" property="ctrExecteTime" jdbcType="TIMESTAMP" />
- <result column="CTR_Receiver" property="ctrReceiver" jdbcType="VARCHAR" />
- <result column="CTR_Receive_Time" property="ctrReceiveTime" jdbcType="TIMESTAMP" />
- <result column="CTR_Lab_Dep" property="ctrLabDep" jdbcType="VARCHAR" />
- <result column="CTR_Checker" property="ctrChecker" jdbcType="VARCHAR" />
- <result column="CTR_Check_Time" property="ctrCheckTime" jdbcType="TIMESTAMP" />
- <result column="CTR_Check_Opinion" property="ctrCheckOpinion" jdbcType="VARCHAR" />
- <result column="CTR_IsDel" property="ctrIsdel" jdbcType="INTEGER" />
- <result column="CTR_Operation_Time" property="ctrOperationTime" jdbcType="TIMESTAMP" />
- <result column="CTR_Operator" property="ctrOperator" jdbcType="VARCHAR" />
- <result column="CTR_IsInp" property="ctrIsinp" jdbcType="INTEGER" />
- <result column="CTR_Reporter" property="ctrReporter" jdbcType="VARCHAR" />
- <result column="CTR_Report_Time" property="ctrReportTime" jdbcType="TIMESTAMP" />
- <result column="UI_Name" property="doctorName" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- CTR_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, CTR_Record_ID, CTR_Visit_No,
- CTR_Visit_Type, CTR_Diag_Name, CTR_Advice_ID, CTR_Item_Code, CTR_Item_Name, CTR_Barcode,
- CTR_IsMicrobe, CTR_Sample_No, CTR_Sample_Type, CTR_Requester, CTR_Request_Time, CTR_Request_Dep,
- CTR_Exector, CTR_Execte_Time, CTR_Receiver, CTR_Receive_Time, CTR_Lab_Dep, CTR_Checker,
- CTR_Check_Time, CTR_Check_Opinion, CTR_IsDel, CTR_Operation_Time, CTR_Operator, CTR_IsInp,
- CTR_Reporter, CTR_Report_Time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from com_test_report
- where CTR_ID = #{ctrId,jdbcType=INTEGER}
- </select>
- <select id="selectByConditions" resultMap="BaseResultMap" >
- SELECT DISTINCT a.*, c.UI_Name doctorName from com_test_report a
- LEFT JOIN inp_med_order b on a.CTR_Advice_ID = b.IMO_Order_ID
- LEFT JOIN sys_userinfo c on b.IMO_Opener = c.UI_Code
- where a.PatientNo IN
- <foreach collection="list" separator="," open="(" close=")" item="item">
- #{item,jdbcType=VARCHAR}
- </foreach>
- and a.CTR_Report_Time <![CDATA[>=]]>#{reportSTime}
- and a.CTR_Report_Time <![CDATA[<]]>#{reportETime}
- and a.CTR_IsDel = 0
- and b.imo_status != -1
- ORDER BY a.ctr_report_time desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from com_test_report
- where CTR_ID = #{ctrId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComTestReport" >
- insert into com_test_report (CTR_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- CTR_Record_ID, CTR_Visit_No, CTR_Visit_Type,
- CTR_Diag_Name, CTR_Advice_ID, CTR_Item_Code,
- CTR_Item_Name, CTR_Barcode, CTR_IsMicrobe,
- CTR_Sample_No, CTR_Sample_Type, CTR_Requester,
- CTR_Request_Time, CTR_Request_Dep, CTR_Exector,
- CTR_Execte_Time, CTR_Receiver, CTR_Receive_Time,
- CTR_Lab_Dep, CTR_Checker, CTR_Check_Time,
- CTR_Check_Opinion, CTR_IsDel, CTR_Operation_Time,
- CTR_Operator, CTR_IsInp, CTR_Reporter,
- CTR_Report_Time)
- values (#{ctrId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{ctrRecordId,jdbcType=VARCHAR}, #{ctrVisitNo,jdbcType=VARCHAR}, #{ctrVisitType,jdbcType=INTEGER},
- #{ctrDiagName,jdbcType=VARCHAR}, #{ctrAdviceId,jdbcType=VARCHAR}, #{ctrItemCode,jdbcType=VARCHAR},
- #{ctrItemName,jdbcType=VARCHAR}, #{ctrBarcode,jdbcType=VARCHAR}, #{ctrIsmicrobe,jdbcType=INTEGER},
- #{ctrSampleNo,jdbcType=VARCHAR}, #{ctrSampleType,jdbcType=VARCHAR}, #{ctrRequester,jdbcType=VARCHAR},
- #{ctrRequestTime,jdbcType=TIMESTAMP}, #{ctrRequestDep,jdbcType=VARCHAR}, #{ctrExector,jdbcType=VARCHAR},
- #{ctrExecteTime,jdbcType=TIMESTAMP}, #{ctrReceiver,jdbcType=VARCHAR}, #{ctrReceiveTime,jdbcType=TIMESTAMP},
- #{ctrLabDep,jdbcType=VARCHAR}, #{ctrChecker,jdbcType=VARCHAR}, #{ctrCheckTime,jdbcType=TIMESTAMP},
- #{ctrCheckOpinion,jdbcType=VARCHAR}, #{ctrIsdel,jdbcType=INTEGER}, #{ctrOperationTime,jdbcType=TIMESTAMP},
- #{ctrOperator,jdbcType=VARCHAR}, #{ctrIsinp,jdbcType=INTEGER}, #{ctrReporter,jdbcType=VARCHAR},
- #{ctrReportTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComTestReport" >
- insert into com_test_report
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ctrId != null" >
- CTR_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="ctrRecordId != null" >
- CTR_Record_ID,
- </if>
- <if test="ctrVisitNo != null" >
- CTR_Visit_No,
- </if>
- <if test="ctrVisitType != null" >
- CTR_Visit_Type,
- </if>
- <if test="ctrDiagName != null" >
- CTR_Diag_Name,
- </if>
- <if test="ctrAdviceId != null" >
- CTR_Advice_ID,
- </if>
- <if test="ctrItemCode != null" >
- CTR_Item_Code,
- </if>
- <if test="ctrItemName != null" >
- CTR_Item_Name,
- </if>
- <if test="ctrBarcode != null" >
- CTR_Barcode,
- </if>
- <if test="ctrIsmicrobe != null" >
- CTR_IsMicrobe,
- </if>
- <if test="ctrSampleNo != null" >
- CTR_Sample_No,
- </if>
- <if test="ctrSampleType != null" >
- CTR_Sample_Type,
- </if>
- <if test="ctrRequester != null" >
- CTR_Requester,
- </if>
- <if test="ctrRequestTime != null" >
- CTR_Request_Time,
- </if>
- <if test="ctrRequestDep != null" >
- CTR_Request_Dep,
- </if>
- <if test="ctrExector != null" >
- CTR_Exector,
- </if>
- <if test="ctrExecteTime != null" >
- CTR_Execte_Time,
- </if>
- <if test="ctrReceiver != null" >
- CTR_Receiver,
- </if>
- <if test="ctrReceiveTime != null" >
- CTR_Receive_Time,
- </if>
- <if test="ctrLabDep != null" >
- CTR_Lab_Dep,
- </if>
- <if test="ctrChecker != null" >
- CTR_Checker,
- </if>
- <if test="ctrCheckTime != null" >
- CTR_Check_Time,
- </if>
- <if test="ctrCheckOpinion != null" >
- CTR_Check_Opinion,
- </if>
- <if test="ctrIsdel != null" >
- CTR_IsDel,
- </if>
- <if test="ctrOperationTime != null" >
- CTR_Operation_Time,
- </if>
- <if test="ctrOperator != null" >
- CTR_Operator,
- </if>
- <if test="ctrIsinp != null" >
- CTR_IsInp,
- </if>
- <if test="ctrReporter != null" >
- CTR_Reporter,
- </if>
- <if test="ctrReportTime != null" >
- CTR_Report_Time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ctrId != null" >
- #{ctrId,jdbcType=INTEGER},
- </if>
- <if test="patientno != null" >
- #{patientno,jdbcType=VARCHAR},
- </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="ctrRecordId != null" >
- #{ctrRecordId,jdbcType=VARCHAR},
- </if>
- <if test="ctrVisitNo != null" >
- #{ctrVisitNo,jdbcType=VARCHAR},
- </if>
- <if test="ctrVisitType != null" >
- #{ctrVisitType,jdbcType=INTEGER},
- </if>
- <if test="ctrDiagName != null" >
- #{ctrDiagName,jdbcType=VARCHAR},
- </if>
- <if test="ctrAdviceId != null" >
- #{ctrAdviceId,jdbcType=VARCHAR},
- </if>
- <if test="ctrItemCode != null" >
- #{ctrItemCode,jdbcType=VARCHAR},
- </if>
- <if test="ctrItemName != null" >
- #{ctrItemName,jdbcType=VARCHAR},
- </if>
- <if test="ctrBarcode != null" >
- #{ctrBarcode,jdbcType=VARCHAR},
- </if>
- <if test="ctrIsmicrobe != null" >
- #{ctrIsmicrobe,jdbcType=INTEGER},
- </if>
- <if test="ctrSampleNo != null" >
- #{ctrSampleNo,jdbcType=VARCHAR},
- </if>
- <if test="ctrSampleType != null" >
- #{ctrSampleType,jdbcType=VARCHAR},
- </if>
- <if test="ctrRequester != null" >
- #{ctrRequester,jdbcType=VARCHAR},
- </if>
- <if test="ctrRequestTime != null" >
- #{ctrRequestTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrRequestDep != null" >
- #{ctrRequestDep,jdbcType=VARCHAR},
- </if>
- <if test="ctrExector != null" >
- #{ctrExector,jdbcType=VARCHAR},
- </if>
- <if test="ctrExecteTime != null" >
- #{ctrExecteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrReceiver != null" >
- #{ctrReceiver,jdbcType=VARCHAR},
- </if>
- <if test="ctrReceiveTime != null" >
- #{ctrReceiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrLabDep != null" >
- #{ctrLabDep,jdbcType=VARCHAR},
- </if>
- <if test="ctrChecker != null" >
- #{ctrChecker,jdbcType=VARCHAR},
- </if>
- <if test="ctrCheckTime != null" >
- #{ctrCheckTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrCheckOpinion != null" >
- #{ctrCheckOpinion,jdbcType=VARCHAR},
- </if>
- <if test="ctrIsdel != null" >
- #{ctrIsdel,jdbcType=INTEGER},
- </if>
- <if test="ctrOperationTime != null" >
- #{ctrOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrOperator != null" >
- #{ctrOperator,jdbcType=VARCHAR},
- </if>
- <if test="ctrIsinp != null" >
- #{ctrIsinp,jdbcType=INTEGER},
- </if>
- <if test="ctrReporter != null" >
- #{ctrReporter,jdbcType=VARCHAR},
- </if>
- <if test="ctrReportTime != null" >
- #{ctrReportTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComTestReport" >
- update com_test_report
- <set >
- <if test="patientno != null" >
- PatientNo = #{patientno,jdbcType=VARCHAR},
- </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="ctrRecordId != null" >
- CTR_Record_ID = #{ctrRecordId,jdbcType=VARCHAR},
- </if>
- <if test="ctrVisitNo != null" >
- CTR_Visit_No = #{ctrVisitNo,jdbcType=VARCHAR},
- </if>
- <if test="ctrVisitType != null" >
- CTR_Visit_Type = #{ctrVisitType,jdbcType=INTEGER},
- </if>
- <if test="ctrDiagName != null" >
- CTR_Diag_Name = #{ctrDiagName,jdbcType=VARCHAR},
- </if>
- <if test="ctrAdviceId != null" >
- CTR_Advice_ID = #{ctrAdviceId,jdbcType=VARCHAR},
- </if>
- <if test="ctrItemCode != null" >
- CTR_Item_Code = #{ctrItemCode,jdbcType=VARCHAR},
- </if>
- <if test="ctrItemName != null" >
- CTR_Item_Name = #{ctrItemName,jdbcType=VARCHAR},
- </if>
- <if test="ctrBarcode != null" >
- CTR_Barcode = #{ctrBarcode,jdbcType=VARCHAR},
- </if>
- <if test="ctrIsmicrobe != null" >
- CTR_IsMicrobe = #{ctrIsmicrobe,jdbcType=INTEGER},
- </if>
- <if test="ctrSampleNo != null" >
- CTR_Sample_No = #{ctrSampleNo,jdbcType=VARCHAR},
- </if>
- <if test="ctrSampleType != null" >
- CTR_Sample_Type = #{ctrSampleType,jdbcType=VARCHAR},
- </if>
- <if test="ctrRequester != null" >
- CTR_Requester = #{ctrRequester,jdbcType=VARCHAR},
- </if>
- <if test="ctrRequestTime != null" >
- CTR_Request_Time = #{ctrRequestTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrRequestDep != null" >
- CTR_Request_Dep = #{ctrRequestDep,jdbcType=VARCHAR},
- </if>
- <if test="ctrExector != null" >
- CTR_Exector = #{ctrExector,jdbcType=VARCHAR},
- </if>
- <if test="ctrExecteTime != null" >
- CTR_Execte_Time = #{ctrExecteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrReceiver != null" >
- CTR_Receiver = #{ctrReceiver,jdbcType=VARCHAR},
- </if>
- <if test="ctrReceiveTime != null" >
- CTR_Receive_Time = #{ctrReceiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrLabDep != null" >
- CTR_Lab_Dep = #{ctrLabDep,jdbcType=VARCHAR},
- </if>
- <if test="ctrChecker != null" >
- CTR_Checker = #{ctrChecker,jdbcType=VARCHAR},
- </if>
- <if test="ctrCheckTime != null" >
- CTR_Check_Time = #{ctrCheckTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrCheckOpinion != null" >
- CTR_Check_Opinion = #{ctrCheckOpinion,jdbcType=VARCHAR},
- </if>
- <if test="ctrIsdel != null" >
- CTR_IsDel = #{ctrIsdel,jdbcType=INTEGER},
- </if>
- <if test="ctrOperationTime != null" >
- CTR_Operation_Time = #{ctrOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="ctrOperator != null" >
- CTR_Operator = #{ctrOperator,jdbcType=VARCHAR},
- </if>
- <if test="ctrIsinp != null" >
- CTR_IsInp = #{ctrIsinp,jdbcType=INTEGER},
- </if>
- <if test="ctrReporter != null" >
- CTR_Reporter = #{ctrReporter,jdbcType=VARCHAR},
- </if>
- <if test="ctrReportTime != null" >
- CTR_Report_Time = #{ctrReportTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where CTR_ID = #{ctrId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComTestReport" >
- update com_test_report
- set PatientNo = #{patientno,jdbcType=VARCHAR},
- HI_ID = #{hiId,jdbcType=INTEGER},
- DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
- CTR_Record_ID = #{ctrRecordId,jdbcType=VARCHAR},
- CTR_Visit_No = #{ctrVisitNo,jdbcType=VARCHAR},
- CTR_Visit_Type = #{ctrVisitType,jdbcType=INTEGER},
- CTR_Diag_Name = #{ctrDiagName,jdbcType=VARCHAR},
- CTR_Advice_ID = #{ctrAdviceId,jdbcType=VARCHAR},
- CTR_Item_Code = #{ctrItemCode,jdbcType=VARCHAR},
- CTR_Item_Name = #{ctrItemName,jdbcType=VARCHAR},
- CTR_Barcode = #{ctrBarcode,jdbcType=VARCHAR},
- CTR_IsMicrobe = #{ctrIsmicrobe,jdbcType=INTEGER},
- CTR_Sample_No = #{ctrSampleNo,jdbcType=VARCHAR},
- CTR_Sample_Type = #{ctrSampleType,jdbcType=VARCHAR},
- CTR_Requester = #{ctrRequester,jdbcType=VARCHAR},
- CTR_Request_Time = #{ctrRequestTime,jdbcType=TIMESTAMP},
- CTR_Request_Dep = #{ctrRequestDep,jdbcType=VARCHAR},
- CTR_Exector = #{ctrExector,jdbcType=VARCHAR},
- CTR_Execte_Time = #{ctrExecteTime,jdbcType=TIMESTAMP},
- CTR_Receiver = #{ctrReceiver,jdbcType=VARCHAR},
- CTR_Receive_Time = #{ctrReceiveTime,jdbcType=TIMESTAMP},
- CTR_Lab_Dep = #{ctrLabDep,jdbcType=VARCHAR},
- CTR_Checker = #{ctrChecker,jdbcType=VARCHAR},
- CTR_Check_Time = #{ctrCheckTime,jdbcType=TIMESTAMP},
- CTR_Check_Opinion = #{ctrCheckOpinion,jdbcType=VARCHAR},
- CTR_IsDel = #{ctrIsdel,jdbcType=INTEGER},
- CTR_Operation_Time = #{ctrOperationTime,jdbcType=TIMESTAMP},
- CTR_Operator = #{ctrOperator,jdbcType=VARCHAR},
- CTR_IsInp = #{ctrIsinp,jdbcType=INTEGER},
- CTR_Reporter = #{ctrReporter,jdbcType=VARCHAR},
- CTR_Report_Time = #{ctrReportTime,jdbcType=TIMESTAMP}
- where CTR_ID = #{ctrId,jdbcType=INTEGER}
- </update>
- </mapper>
|