123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413 |
- <?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.ComExamReportMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.ComExamReport" >
- <id column="CER_ID" property="cerId" 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="CER_Advice_ID" property="cerAdviceId" jdbcType="VARCHAR" />
- <result column="CRE_Record_ID" property="creRecordId" jdbcType="VARCHAR" />
- <result column="CER_Visit_No" property="cerVisitNo" jdbcType="VARCHAR" />
- <result column="CER_Apply_No" property="cerApplyNo" jdbcType="VARCHAR" />
- <result column="CER_Report_Name" property="cerReportName" jdbcType="VARCHAR" />
- <result column="CER_Part_Code" property="cerPartCode" jdbcType="VARCHAR" />
- <result column="CER_Part" property="cerPart" jdbcType="VARCHAR" />
- <result column="CER_Model" property="cerModel" jdbcType="VARCHAR" />
- <result column="CER_Exam_Finding" property="cerExamFinding" jdbcType="VARCHAR" />
- <result column="CER_Exam_Result" property="cerExamResult" jdbcType="VARCHAR" />
- <result column="CER_Diag_Name" property="cerDiagName" jdbcType="VARCHAR" />
- <result column="CER_Image_ID" property="cerImageId" jdbcType="VARCHAR" />
- <result column="CER_Reporter" property="cerReporter" jdbcType="VARCHAR" />
- <result column="CER_Report_Time" property="cerReportTime" jdbcType="TIMESTAMP" />
- <result column="CER_Examiner" property="cerExaminer" jdbcType="VARCHAR" />
- <result column="CER_Exam_Time" property="cerExamTime" jdbcType="TIMESTAMP" />
- <result column="CER_Checker" property="cerChecker" jdbcType="VARCHAR" />
- <result column="CER_Check_Time" property="cerCheckTime" jdbcType="TIMESTAMP" />
- <result column="CER_IsDel" property="cerIsdel" jdbcType="INTEGER" />
- <result column="CER_Operation_Time" property="cerOperationTime" jdbcType="TIMESTAMP" />
- <result column="CER_Operator" property="cerOperator" jdbcType="VARCHAR" />
- <result column="CER_Delreason" property="cerDelreason" jdbcType="VARCHAR" />
- <result column="CER_IsInp" property="cerIsinp" jdbcType="INTEGER" />
- <result column="UI_Name" property="doctorName" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- CER_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, CER_Advice_ID, CRE_Record_ID,
- CER_Visit_No, CER_Apply_No, CER_Report_Name, CER_Part_Code, CER_Part, CER_Model,
- CER_Exam_Finding, CER_Exam_Result, CER_Diag_Name, CER_Image_ID, CER_Reporter, CER_Report_Time,
- CER_Examiner, CER_Exam_Time, CER_Checker, CER_Check_Time, CER_IsDel, CER_Operation_Time,
- CER_Operator, CER_Delreason, CER_IsInp
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from com_exam_report
- where CER_ID = #{cerId,jdbcType=INTEGER}
- </select>
- <select id="selectByConditions" resultMap="BaseResultMap" >
- SELECT DISTINCT a.*, c.UI_Name doctorName from com_exam_report a
- LEFT JOIN inp_med_order b on a.CER_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.CER_Report_Time >= #{reportSTime,jdbcType=TIMESTAMP}
- and a.CER_Report_Time < #{reportETime,jdbcType=TIMESTAMP}
- and IFNULL(a.CER_IsDel,0) = 0
- ORDER BY a.CER_Exam_Time desc
- </select>
- <select id="selectQuotaData" resultMap="BaseResultMap" >
- SELECT CER_Model,count(*) quota
- from com_exam_report
- where 1=1
- <if test="wardDm != null" >
- and DW_WardDm = #{wardDm,jdbcType=VARCHAR}
- </if>
- and CER_Report_Time >= #{reportSTime,jdbcType=TIMESTAMP}
- and CER_Report_Time < #{reportETime,jdbcType=TIMESTAMP}
- and IFNULL(CER_IsDel,0) = 0 GROUP BY CER_Model
- </select>
- <select id="selectByIds" resultMap="BaseResultMap" >
- select
- <include refid="Base_Column_List" />
- from com_exam_report
- where CER_ID in <foreach item='item' index='index' collection='list' open='(' separator=',' close=')'> #{item} </foreach>
- and IFNULL(CER_IsDel,0) = 0
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from com_exam_report
- where CER_ID = #{cerId,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComExamReport" >
- insert into com_exam_report (CER_ID, PatientNo, HI_ID,
- DD_DepDm, DW_WardDm, DB_BedNo,
- CER_Advice_ID, CRE_Record_ID, CER_Visit_No,
- CER_Apply_No, CER_Report_Name, CER_Part_Code,
- CER_Part, CER_Model, CER_Exam_Finding,
- CER_Exam_Result, CER_Diag_Name, CER_Image_ID,
- CER_Reporter, CER_Report_Time, CER_Examiner,
- CER_Exam_Time, CER_Checker, CER_Check_Time,
- CER_IsDel, CER_Operation_Time, CER_Operator,
- CER_Delreason, CER_IsInp)
- values (#{cerId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
- #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
- #{cerAdviceId,jdbcType=VARCHAR}, #{creRecordId,jdbcType=VARCHAR}, #{cerVisitNo,jdbcType=VARCHAR},
- #{cerApplyNo,jdbcType=VARCHAR}, #{cerReportName,jdbcType=VARCHAR}, #{cerPartCode,jdbcType=VARCHAR},
- #{cerPart,jdbcType=VARCHAR}, #{cerModel,jdbcType=VARCHAR}, #{cerExamFinding,jdbcType=VARCHAR},
- #{cerExamResult,jdbcType=VARCHAR}, #{cerDiagName,jdbcType=VARCHAR}, #{cerImageId,jdbcType=VARCHAR},
- #{cerReporter,jdbcType=VARCHAR}, #{cerReportTime,jdbcType=TIMESTAMP}, #{cerExaminer,jdbcType=VARCHAR},
- #{cerExamTime,jdbcType=TIMESTAMP}, #{cerChecker,jdbcType=VARCHAR}, #{cerCheckTime,jdbcType=TIMESTAMP},
- #{cerIsdel,jdbcType=INTEGER}, #{cerOperationTime,jdbcType=TIMESTAMP}, #{cerOperator,jdbcType=VARCHAR},
- #{cerDelreason,jdbcType=VARCHAR}, #{cerIsinp,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComExamReport" >
- insert into com_exam_report
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="cerId != null" >
- CER_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="cerAdviceId != null" >
- CER_Advice_ID,
- </if>
- <if test="creRecordId != null" >
- CRE_Record_ID,
- </if>
- <if test="cerVisitNo != null" >
- CER_Visit_No,
- </if>
- <if test="cerApplyNo != null" >
- CER_Apply_No,
- </if>
- <if test="cerReportName != null" >
- CER_Report_Name,
- </if>
- <if test="cerPartCode != null" >
- CER_Part_Code,
- </if>
- <if test="cerPart != null" >
- CER_Part,
- </if>
- <if test="cerModel != null" >
- CER_Model,
- </if>
- <if test="cerExamFinding != null" >
- CER_Exam_Finding,
- </if>
- <if test="cerExamResult != null" >
- CER_Exam_Result,
- </if>
- <if test="cerDiagName != null" >
- CER_Diag_Name,
- </if>
- <if test="cerImageId != null" >
- CER_Image_ID,
- </if>
- <if test="cerReporter != null" >
- CER_Reporter,
- </if>
- <if test="cerReportTime != null" >
- CER_Report_Time,
- </if>
- <if test="cerExaminer != null" >
- CER_Examiner,
- </if>
- <if test="cerExamTime != null" >
- CER_Exam_Time,
- </if>
- <if test="cerChecker != null" >
- CER_Checker,
- </if>
- <if test="cerCheckTime != null" >
- CER_Check_Time,
- </if>
- <if test="cerIsdel != null" >
- CER_IsDel,
- </if>
- <if test="cerOperationTime != null" >
- CER_Operation_Time,
- </if>
- <if test="cerOperator != null" >
- CER_Operator,
- </if>
- <if test="cerDelreason != null" >
- CER_Delreason,
- </if>
- <if test="cerIsinp != null" >
- CER_IsInp,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="cerId != null" >
- #{cerId,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="cerAdviceId != null" >
- #{cerAdviceId,jdbcType=VARCHAR},
- </if>
- <if test="creRecordId != null" >
- #{creRecordId,jdbcType=VARCHAR},
- </if>
- <if test="cerVisitNo != null" >
- #{cerVisitNo,jdbcType=VARCHAR},
- </if>
- <if test="cerApplyNo != null" >
- #{cerApplyNo,jdbcType=VARCHAR},
- </if>
- <if test="cerReportName != null" >
- #{cerReportName,jdbcType=VARCHAR},
- </if>
- <if test="cerPartCode != null" >
- #{cerPartCode,jdbcType=VARCHAR},
- </if>
- <if test="cerPart != null" >
- #{cerPart,jdbcType=VARCHAR},
- </if>
- <if test="cerModel != null" >
- #{cerModel,jdbcType=VARCHAR},
- </if>
- <if test="cerExamFinding != null" >
- #{cerExamFinding,jdbcType=VARCHAR},
- </if>
- <if test="cerExamResult != null" >
- #{cerExamResult,jdbcType=VARCHAR},
- </if>
- <if test="cerDiagName != null" >
- #{cerDiagName,jdbcType=VARCHAR},
- </if>
- <if test="cerImageId != null" >
- #{cerImageId,jdbcType=VARCHAR},
- </if>
- <if test="cerReporter != null" >
- #{cerReporter,jdbcType=VARCHAR},
- </if>
- <if test="cerReportTime != null" >
- #{cerReportTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerExaminer != null" >
- #{cerExaminer,jdbcType=VARCHAR},
- </if>
- <if test="cerExamTime != null" >
- #{cerExamTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerChecker != null" >
- #{cerChecker,jdbcType=VARCHAR},
- </if>
- <if test="cerCheckTime != null" >
- #{cerCheckTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerIsdel != null" >
- #{cerIsdel,jdbcType=INTEGER},
- </if>
- <if test="cerOperationTime != null" >
- #{cerOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerOperator != null" >
- #{cerOperator,jdbcType=VARCHAR},
- </if>
- <if test="cerDelreason != null" >
- #{cerDelreason,jdbcType=VARCHAR},
- </if>
- <if test="cerIsinp != null" >
- #{cerIsinp,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComExamReport" >
- update com_exam_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="cerAdviceId != null" >
- CER_Advice_ID = #{cerAdviceId,jdbcType=VARCHAR},
- </if>
- <if test="creRecordId != null" >
- CRE_Record_ID = #{creRecordId,jdbcType=VARCHAR},
- </if>
- <if test="cerVisitNo != null" >
- CER_Visit_No = #{cerVisitNo,jdbcType=VARCHAR},
- </if>
- <if test="cerApplyNo != null" >
- CER_Apply_No = #{cerApplyNo,jdbcType=VARCHAR},
- </if>
- <if test="cerReportName != null" >
- CER_Report_Name = #{cerReportName,jdbcType=VARCHAR},
- </if>
- <if test="cerPartCode != null" >
- CER_Part_Code = #{cerPartCode,jdbcType=VARCHAR},
- </if>
- <if test="cerPart != null" >
- CER_Part = #{cerPart,jdbcType=VARCHAR},
- </if>
- <if test="cerModel != null" >
- CER_Model = #{cerModel,jdbcType=VARCHAR},
- </if>
- <if test="cerExamFinding != null" >
- CER_Exam_Finding = #{cerExamFinding,jdbcType=VARCHAR},
- </if>
- <if test="cerExamResult != null" >
- CER_Exam_Result = #{cerExamResult,jdbcType=VARCHAR},
- </if>
- <if test="cerDiagName != null" >
- CER_Diag_Name = #{cerDiagName,jdbcType=VARCHAR},
- </if>
- <if test="cerImageId != null" >
- CER_Image_ID = #{cerImageId,jdbcType=VARCHAR},
- </if>
- <if test="cerReporter != null" >
- CER_Reporter = #{cerReporter,jdbcType=VARCHAR},
- </if>
- <if test="cerReportTime != null" >
- CER_Report_Time = #{cerReportTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerExaminer != null" >
- CER_Examiner = #{cerExaminer,jdbcType=VARCHAR},
- </if>
- <if test="cerExamTime != null" >
- CER_Exam_Time = #{cerExamTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerChecker != null" >
- CER_Checker = #{cerChecker,jdbcType=VARCHAR},
- </if>
- <if test="cerCheckTime != null" >
- CER_Check_Time = #{cerCheckTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerIsdel != null" >
- CER_IsDel = #{cerIsdel,jdbcType=INTEGER},
- </if>
- <if test="cerOperationTime != null" >
- CER_Operation_Time = #{cerOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="cerOperator != null" >
- CER_Operator = #{cerOperator,jdbcType=VARCHAR},
- </if>
- <if test="cerDelreason != null" >
- CER_Delreason = #{cerDelreason,jdbcType=VARCHAR},
- </if>
- <if test="cerIsinp != null" >
- CER_IsInp = #{cerIsinp,jdbcType=INTEGER},
- </if>
- </set>
- where CER_ID = #{cerId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.ComExamReport" >
- update com_exam_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},
- CER_Advice_ID = #{cerAdviceId,jdbcType=VARCHAR},
- CRE_Record_ID = #{creRecordId,jdbcType=VARCHAR},
- CER_Visit_No = #{cerVisitNo,jdbcType=VARCHAR},
- CER_Apply_No = #{cerApplyNo,jdbcType=VARCHAR},
- CER_Report_Name = #{cerReportName,jdbcType=VARCHAR},
- CER_Part_Code = #{cerPartCode,jdbcType=VARCHAR},
- CER_Part = #{cerPart,jdbcType=VARCHAR},
- CER_Model = #{cerModel,jdbcType=VARCHAR},
- CER_Exam_Finding = #{cerExamFinding,jdbcType=VARCHAR},
- CER_Exam_Result = #{cerExamResult,jdbcType=VARCHAR},
- CER_Diag_Name = #{cerDiagName,jdbcType=VARCHAR},
- CER_Image_ID = #{cerImageId,jdbcType=VARCHAR},
- CER_Reporter = #{cerReporter,jdbcType=VARCHAR},
- CER_Report_Time = #{cerReportTime,jdbcType=TIMESTAMP},
- CER_Examiner = #{cerExaminer,jdbcType=VARCHAR},
- CER_Exam_Time = #{cerExamTime,jdbcType=TIMESTAMP},
- CER_Checker = #{cerChecker,jdbcType=VARCHAR},
- CER_Check_Time = #{cerCheckTime,jdbcType=TIMESTAMP},
- CER_IsDel = #{cerIsdel,jdbcType=INTEGER},
- CER_Operation_Time = #{cerOperationTime,jdbcType=TIMESTAMP},
- CER_Operator = #{cerOperator,jdbcType=VARCHAR},
- CER_Delreason = #{cerDelreason,jdbcType=VARCHAR},
- CER_IsInp = #{cerIsinp,jdbcType=INTEGER}
- where CER_ID = #{cerId,jdbcType=INTEGER}
- </update>
- </mapper>
|