Edit D:\rfid\libsystem\WEB-INF\classes\com\jishen\libsystem\mapping\LibHoldingsMapper.xml
<?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.jishen.libsystem.dao.LibHoldingsMapper"> <resultMap id="BaseResultMap" type="com.jishen.libsystem.entity.LibHoldings"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="BIBID" jdbcType="DECIMAL" property="bibid" /> <result column="CHECKID" jdbcType="DECIMAL" property="checkid" /> <result column="BINDID" jdbcType="DECIMAL" property="bindid" /> <result column="RDRID" jdbcType="DECIMAL" property="rdrid" /> <result column="LIBCODE" jdbcType="VARCHAR" property="libcode" /> <result column="CURLIBCODE" jdbcType="VARCHAR" property="curlibcode" /> <result column="BARCODE" jdbcType="VARCHAR" property="barcode" /> <result column="STATUS" jdbcType="CHAR" property="status" /> <result column="CALLNO" jdbcType="VARCHAR" property="callno" /> <result column="LOCATION" jdbcType="VARCHAR" property="location" /> <result column="CURLOCATION" jdbcType="VARCHAR" property="curlocation" /> <result column="CHECKDATE" jdbcType="DECIMAL" property="checkdate" /> <result column="DOCTYPE" jdbcType="VARCHAR" property="doctype" /> <result column="SENDDATE" jdbcType="DECIMAL" property="senddate" /> <result column="LOANDATE" jdbcType="DECIMAL" property="loandate" /> <result column="LOANTIME" jdbcType="DECIMAL" property="loantime" /> <result column="RETURNDATE" jdbcType="DECIMAL" property="returndate" /> <result column="RENEWNUM" jdbcType="DECIMAL" property="renewnum" /> <result column="VOLUMENUM" jdbcType="DECIMAL" property="volumenum" /> <result column="VOLUMEINFO" jdbcType="VARCHAR" property="volumeinfo" /> <result column="OTHERNO" jdbcType="VARCHAR" property="otherno" /> <result column="ASSETNO" jdbcType="VARCHAR" property="assetno" /> <result column="SHELFNO" jdbcType="VARCHAR" property="shelfno" /> <result column="BINDTYPE" jdbcType="VARCHAR" property="bindtype" /> <result column="DOCSOURCES" jdbcType="VARCHAR" property="docsources" /> <result column="MEDIATYPE" jdbcType="VARCHAR" property="mediatype" /> <result column="PRICE" jdbcType="DECIMAL" property="price" /> <result column="TOTALPRICE" jdbcType="DECIMAL" property="totalprice" /> <result column="SUMLOANNUM" jdbcType="DECIMAL" property="sumloannum" /> <result column="SUMRENEWNUM" jdbcType="DECIMAL" property="sumrenewnum" /> <result column="SUMLOANDAYS" jdbcType="DECIMAL" property="sumloandays" /> <result column="CHECKPRICE" jdbcType="DECIMAL" property="checkprice" /> <result column="CHECKTOTALPRICE" jdbcType="DECIMAL" property="checktotalprice" /> <result column="HLDUID" jdbcType="VARCHAR" property="hlduid" /> </resultMap> <sql id="Base_Column_List"> ID, BIBID, CHECKID, BINDID, RDRID, LIBCODE, CURLIBCODE, BARCODE, STATUS, CALLNO, LOCATION, CURLOCATION, CHECKDATE, DOCTYPE, SENDDATE, LOANDATE, LOANTIME, RETURNDATE, RENEWNUM, VOLUMENUM, VOLUMEINFO, OTHERNO, ASSETNO, SHELFNO, BINDTYPE, DOCSOURCES, MEDIATYPE, PRICE, TOTALPRICE, SUMLOANNUM, SUMRENEWNUM, SUMLOANDAYS, CHECKPRICE, CHECKTOTALPRICE,HLDUID </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_HOLDINGS where ID = #{id,jdbcType=DECIMAL} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from LIB_HOLDINGS where ID = #{id,jdbcType=DECIMAL} </delete> <insert id="insert" parameterType="com.jishen.libsystem.entity.LibHoldings"> insert into LIB_HOLDINGS (ID, BIBID, CHECKID, BINDID, RDRID, LIBCODE, CURLIBCODE, BARCODE, STATUS, CALLNO, LOCATION, CURLOCATION, CHECKDATE, DOCTYPE, SENDDATE, LOANDATE, LOANTIME, RETURNDATE, RENEWNUM, VOLUMENUM, VOLUMEINFO, OTHERNO, ASSETNO, SHELFNO, BINDTYPE, DOCSOURCES, MEDIATYPE, PRICE, TOTALPRICE, SUMLOANNUM, SUMRENEWNUM, SUMLOANDAYS, CHECKPRICE, CHECKTOTALPRICE) values (#{id,jdbcType=DECIMAL}, #{bibid,jdbcType=DECIMAL}, #{checkid,jdbcType=DECIMAL}, #{bindid,jdbcType=DECIMAL}, #{rdrid,jdbcType=DECIMAL}, #{libcode,jdbcType=VARCHAR}, #{curlibcode,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{callno,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, #{curlocation,jdbcType=VARCHAR}, #{checkdate,jdbcType=DECIMAL}, #{doctype,jdbcType=VARCHAR}, #{senddate,jdbcType=DECIMAL}, #{loandate,jdbcType=DECIMAL}, #{loantime,jdbcType=DECIMAL}, #{returndate,jdbcType=DECIMAL}, #{renewnum,jdbcType=DECIMAL}, #{volumenum,jdbcType=DECIMAL}, #{volumeinfo,jdbcType=VARCHAR}, #{otherno,jdbcType=VARCHAR}, #{assetno,jdbcType=VARCHAR}, #{shelfno,jdbcType=VARCHAR}, #{bindtype,jdbcType=VARCHAR}, #{docsources,jdbcType=VARCHAR}, #{mediatype,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{totalprice,jdbcType=DECIMAL}, #{sumloannum,jdbcType=DECIMAL}, #{sumrenewnum,jdbcType=DECIMAL}, #{sumloandays,jdbcType=DECIMAL}, #{checkprice,jdbcType=DECIMAL}, #{checktotalprice,jdbcType=DECIMAL}) </insert> <insert id="insertSelective" parameterType="com.jishen.libsystem.entity.LibHoldings"> <selectKey keyProperty="id" resultType="java.lang.Long" order="BEFORE"> select LIB_HOLDINGS_SEQ.nextval a FROM dual </selectKey> insert into LIB_HOLDINGS <trim prefix="(" suffix=")" suffixOverrides=","> ID, <if test="bibid != null"> BIBID, </if> <if test="checkid != null"> CHECKID, </if> <if test="bindid != null"> BINDID, </if> <if test="rdrid != null"> RDRID, </if> <if test="libcode != null"> LIBCODE, </if> <if test="curlibcode != null"> CURLIBCODE, </if> <if test="barcode != null"> BARCODE, </if> <if test="status != null"> STATUS, </if> <if test="callno != null"> CALLNO, </if> <if test="location != null"> LOCATION, </if> <if test="curlocation != null"> CURLOCATION, </if> <if test="checkdate != null"> CHECKDATE, </if> <if test="doctype != null"> DOCTYPE, </if> <if test="senddate != null"> SENDDATE, </if> <if test="loandate != null"> LOANDATE, </if> <if test="loantime != null"> LOANTIME, </if> <if test="returndate != null"> RETURNDATE, </if> <if test="renewnum != null"> RENEWNUM, </if> <if test="volumenum != null"> VOLUMENUM, </if> <if test="volumeinfo != null"> VOLUMEINFO, </if> <if test="otherno != null"> OTHERNO, </if> <if test="assetno != null"> ASSETNO, </if> <if test="shelfno != null"> SHELFNO, </if> <if test="bindtype != null"> BINDTYPE, </if> <if test="docsources != null"> DOCSOURCES, </if> <if test="mediatype != null"> MEDIATYPE, </if> <if test="price != null"> PRICE, </if> <if test="totalprice != null"> TOTALPRICE, </if> <if test="sumloannum != null"> SUMLOANNUM, </if> <if test="sumrenewnum != null"> SUMRENEWNUM, </if> <if test="sumloandays != null"> SUMLOANDAYS, </if> <if test="checkprice != null"> CHECKPRICE, </if> <if test="checktotalprice != null"> CHECKTOTALPRICE, </if> <if test="hlduid != null"> HLDUID, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> #{id,jdbcType=DECIMAL}, <if test="bibid != null"> #{bibid,jdbcType=DECIMAL}, </if> <if test="checkid != null"> #{checkid,jdbcType=DECIMAL}, </if> <if test="bindid != null"> #{bindid,jdbcType=DECIMAL}, </if> <if test="rdrid != null"> #{rdrid,jdbcType=DECIMAL}, </if> <if test="libcode != null"> #{libcode,jdbcType=VARCHAR}, </if> <if test="curlibcode != null"> #{curlibcode,jdbcType=VARCHAR}, </if> <if test="barcode != null"> #{barcode,jdbcType=VARCHAR}, </if> <if test="status != null"> #{status,jdbcType=CHAR}, </if> <if test="callno != null"> #{callno,jdbcType=VARCHAR}, </if> <if test="location != null"> #{location,jdbcType=VARCHAR}, </if> <if test="curlocation != null"> #{curlocation,jdbcType=VARCHAR}, </if> <if test="checkdate != null"> #{checkdate,jdbcType=DECIMAL}, </if> <if test="doctype != null"> #{doctype,jdbcType=VARCHAR}, </if> <if test="senddate != null"> #{senddate,jdbcType=DECIMAL}, </if> <if test="loandate != null"> #{loandate,jdbcType=DECIMAL}, </if> <if test="loantime != null"> #{loantime,jdbcType=DECIMAL}, </if> <if test="returndate != null"> #{returndate,jdbcType=DECIMAL}, </if> <if test="renewnum != null"> #{renewnum,jdbcType=DECIMAL}, </if> <if test="volumenum != null"> #{volumenum,jdbcType=DECIMAL}, </if> <if test="volumeinfo != null"> #{volumeinfo,jdbcType=VARCHAR}, </if> <if test="otherno != null"> #{otherno,jdbcType=VARCHAR}, </if> <if test="assetno != null"> #{assetno,jdbcType=VARCHAR}, </if> <if test="shelfno != null"> #{shelfno,jdbcType=VARCHAR}, </if> <if test="bindtype != null"> #{bindtype,jdbcType=VARCHAR}, </if> <if test="docsources != null"> #{docsources,jdbcType=VARCHAR}, </if> <if test="mediatype != null"> #{mediatype,jdbcType=VARCHAR}, </if> <if test="price != null"> #{price,jdbcType=DECIMAL}, </if> <if test="totalprice != null"> #{totalprice,jdbcType=DECIMAL}, </if> <if test="sumloannum != null"> #{sumloannum,jdbcType=DECIMAL}, </if> <if test="sumrenewnum != null"> #{sumrenewnum,jdbcType=DECIMAL}, </if> <if test="sumloandays != null"> #{sumloandays,jdbcType=DECIMAL}, </if> <if test="checkprice != null"> #{checkprice,jdbcType=DECIMAL}, </if> <if test="checktotalprice != null"> #{checktotalprice,jdbcType=DECIMAL}, </if> <if test="hlduid != null"> #{hlduid,jdbcType=VARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.jishen.libsystem.entity.LibHoldings"> update LIB_HOLDINGS <set> <if test="bibid != null"> BIBID = #{bibid,jdbcType=DECIMAL}, </if> <if test="checkid != null"> CHECKID = #{checkid,jdbcType=DECIMAL}, </if> <if test="bindid != null"> BINDID = #{bindid,jdbcType=DECIMAL}, </if> <if test="rdrid != null"> RDRID = #{rdrid,jdbcType=DECIMAL}, </if> <if test="libcode != null"> LIBCODE = #{libcode,jdbcType=VARCHAR}, </if> <if test="curlibcode != null"> CURLIBCODE = #{curlibcode,jdbcType=VARCHAR}, </if> <if test="barcode != null"> BARCODE = #{barcode,jdbcType=VARCHAR}, </if> <if test="status != null"> STATUS = #{status,jdbcType=CHAR}, </if> <if test="callno != null"> CALLNO = #{callno,jdbcType=VARCHAR}, </if> <if test="location != null"> LOCATION = #{location,jdbcType=VARCHAR}, </if> <if test="curlocation != null"> CURLOCATION = #{curlocation,jdbcType=VARCHAR}, </if> <if test="checkdate != null"> CHECKDATE = #{checkdate,jdbcType=DECIMAL}, </if> <if test="doctype != null"> DOCTYPE = #{doctype,jdbcType=VARCHAR}, </if> <if test="senddate != null"> SENDDATE = #{senddate,jdbcType=DECIMAL}, </if> <if test="loandate != null"> LOANDATE = #{loandate,jdbcType=DECIMAL}, </if> <if test="loantime != null"> LOANTIME = #{loantime,jdbcType=DECIMAL}, </if> <if test="returndate != null"> RETURNDATE = #{returndate,jdbcType=DECIMAL}, </if> <if test="renewnum != null"> RENEWNUM = #{renewnum,jdbcType=DECIMAL}, </if> <if test="volumenum != null"> VOLUMENUM = #{volumenum,jdbcType=DECIMAL}, </if> <if test="volumeinfo != null"> VOLUMEINFO = #{volumeinfo,jdbcType=VARCHAR}, </if> <if test="otherno != null"> OTHERNO = #{otherno,jdbcType=VARCHAR}, </if> <if test="assetno != null"> ASSETNO = #{assetno,jdbcType=VARCHAR}, </if> <if test="shelfno != null"> SHELFNO = #{shelfno,jdbcType=VARCHAR}, </if> <if test="bindtype != null"> BINDTYPE = #{bindtype,jdbcType=VARCHAR}, </if> <if test="docsources != null"> DOCSOURCES = #{docsources,jdbcType=VARCHAR}, </if> <if test="mediatype != null"> MEDIATYPE = #{mediatype,jdbcType=VARCHAR}, </if> <if test="price != null"> PRICE = #{price,jdbcType=DECIMAL}, </if> <if test="totalprice != null"> TOTALPRICE = #{totalprice,jdbcType=DECIMAL}, </if> <if test="sumloannum != null"> SUMLOANNUM = #{sumloannum,jdbcType=DECIMAL}, </if> <if test="sumrenewnum != null"> SUMRENEWNUM = #{sumrenewnum,jdbcType=DECIMAL}, </if> <if test="sumloandays != null"> SUMLOANDAYS = #{sumloandays,jdbcType=DECIMAL}, </if> <if test="checkprice != null"> CHECKPRICE = #{checkprice,jdbcType=DECIMAL}, </if> <if test="checktotalprice != null"> CHECKTOTALPRICE = #{checktotalprice,jdbcType=DECIMAL}, </if> <if test="hlduid != null"> hlduid = #{hlduid,jdbcType=VARCHAR}, </if> </set> where <choose> <when test="barcode != null and id == null"> barcode = #{barcode,jdbcType=VARCHAR} </when> <otherwise> ID = #{id,jdbcType=DECIMAL} </otherwise> </choose> </update> <update id="updateByPrimaryKey" parameterType="com.jishen.libsystem.entity.LibHoldings"> update LIB_HOLDINGS set BIBID = #{bibid,jdbcType=DECIMAL}, CHECKID = #{checkid,jdbcType=DECIMAL}, BINDID = #{bindid,jdbcType=DECIMAL}, RDRID = #{rdrid,jdbcType=DECIMAL}, LIBCODE = #{libcode,jdbcType=VARCHAR}, CURLIBCODE = #{curlibcode,jdbcType=VARCHAR}, BARCODE = #{barcode,jdbcType=VARCHAR}, STATUS = #{status,jdbcType=CHAR}, CALLNO = #{callno,jdbcType=VARCHAR}, LOCATION = #{location,jdbcType=VARCHAR}, CURLOCATION = #{curlocation,jdbcType=VARCHAR}, CHECKDATE = #{checkdate,jdbcType=DECIMAL}, DOCTYPE = #{doctype,jdbcType=VARCHAR}, SENDDATE = #{senddate,jdbcType=DECIMAL}, LOANDATE = #{loandate,jdbcType=DECIMAL}, LOANTIME = #{loantime,jdbcType=DECIMAL}, RETURNDATE = #{returndate,jdbcType=DECIMAL}, RENEWNUM = #{renewnum,jdbcType=DECIMAL}, VOLUMENUM = #{volumenum,jdbcType=DECIMAL}, VOLUMEINFO = #{volumeinfo,jdbcType=VARCHAR}, OTHERNO = #{otherno,jdbcType=VARCHAR}, ASSETNO = #{assetno,jdbcType=VARCHAR}, SHELFNO = #{shelfno,jdbcType=VARCHAR}, BINDTYPE = #{bindtype,jdbcType=VARCHAR}, DOCSOURCES = #{docsources,jdbcType=VARCHAR}, MEDIATYPE = #{mediatype,jdbcType=VARCHAR}, PRICE = #{price,jdbcType=DECIMAL}, TOTALPRICE = #{totalprice,jdbcType=DECIMAL}, SUMLOANNUM = #{sumloannum,jdbcType=DECIMAL}, SUMRENEWNUM = #{sumrenewnum,jdbcType=DECIMAL}, SUMLOANDAYS = #{sumloandays,jdbcType=DECIMAL}, CHECKPRICE = #{checkprice,jdbcType=DECIMAL}, CHECKTOTALPRICE = #{checktotalprice,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL} </update> <select id="listSelective" parameterType="com.jishen.libsystem.entity.LibHoldings" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_HOLDINGS where 1=1 <if test="libcode != null"> and LIBCODE = #{libcode,jdbcType=VARCHAR} </if> <if test="bibid != null"> and BIBID = #{bibid,jdbcType=DECIMAL} </if> <if test="checkid != null"> and CHECKID = #{checkid,jdbcType=DECIMAL} </if> <if test="rdrid != null"> and RDRID = #{rdrid,jdbcType=DECIMAL} </if> <if test="id != null"> and ID = #{id,jdbcType=DECIMAL} </if> <if test="barcode != null"> and BARCODE like CONCAT(#{barcode,jdbcType=VARCHAR},'%') </if> <if test="callno != null"> and callno like CONCAT(#{callno,jdbcType=VARCHAR},'%') </if> <if test="assetno != null"> and assetno like CONCAT(#{assetno,jdbcType=VARCHAR},'%') </if> <if test="hlduid != null"> and hlduid = #{hlduid,jdbcType=VARCHAR} </if> <if test="status != null"> and STATUS = #{status,jdbcType=VARCHAR} </if> </select> <select id="listByCheckAllData" parameterType="com.jishen.libsystem.entity.LibHoldings" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_HOLDINGS where <![CDATA[ LIBCODE <> CURLIBCODE]]> </select> <select id="listSelectiveByBarcode" parameterType="com.jishen.libsystem.entity.LibHoldings" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_HOLDINGS where 1=1 <if test="libcode != null"> and LIBCODE = #{libcode,jdbcType=VARCHAR} </if> <if test="bibid != null"> and BIBID = #{bibid,jdbcType=DECIMAL} </if> <if test="rdrid != null"> and RDRID = #{rdrid,jdbcType=DECIMAL} </if> <if test="id != null"> and ID = #{id,jdbcType=DECIMAL} </if> <if test="barcode != null"> and BARCODE = #{barcode,jdbcType=VARCHAR} </if> <if test="assetno != null"> and assetno = #{assetno,jdbcType=VARCHAR} </if> <if test="hlduid != null"> and hlduid = #{hlduid,jdbcType=VARCHAR} </if> <if test="status != null"> and STATUS = #{status,jdbcType=VARCHAR} </if> </select> <select id="listHoldingWithBib" resultType="com.jishen.common.HoldingWithBibEntity"> select title,author,publish,publishaddress,publishdate,isbn,subject,seriesname,attachment,content,LIB_HOLDINGS.* from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join lib_acq_check on lib_holdings.checkid=lib_acq_check.id where 1 = 1 <!-- LIB_HOLDINGS,LIB_BIBLIOGRAPHY where LIB_HOLDINGS.bibid=LIB_BIBLIOGRAPHY.id --> <if test="record.libcode != null"> and LIB_HOLDINGS.LIBCODE = #{record.libcode,jdbcType=VARCHAR} </if> <if test="record.bibid != null"> and LIB_HOLDINGS.BIBID = #{record.bibid,jdbcType=DECIMAL} </if> <if test="record.rdrid != null"> and LIB_HOLDINGS.RDRID = #{record.rdrid,jdbcType=DECIMAL} </if> <if test="record.id != null"> and LIB_HOLDINGS.ID = #{record.id,jdbcType=DECIMAL} </if> <if test="record.barcode != null"> and LIB_HOLDINGS.BARCODE = #{record.barcode,jdbcType=VARCHAR} </if> <if test="record.hlduid != null"> and LIB_HOLDINGS.hlduid = #{record.hlduid,jdbcType=VARCHAR} </if> <if test="record.assetno != null"> and LIB_HOLDINGS.assetno = #{record.assetno,jdbcType=VARCHAR} </if> <include refid="common.condition"/> </select> <select id="listHoldingWithBibAndRdr" resultType="com.jishen.common.HoldingWithBibRdrEntity"> select name,rdrno,email,title,author,publish,publishaddress,publishdate,isbn,subject,seriesname,attachment,LIB_HOLDINGS.* from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join LIB_CIR_READER on lib_holdings.rdrid=LIB_CIR_READER.id where 1 = 1 <!-- LIB_HOLDINGS,LIB_BIBLIOGRAPHY where LIB_HOLDINGS.bibid=LIB_BIBLIOGRAPHY.id --> <if test="record.status != null"> and LIB_HOLDINGS.STATUS = #{record.status,jdbcType=VARCHAR} </if> <if test="record.libcode != null"> and LIB_HOLDINGS.LIBCODE = #{record.libcode,jdbcType=VARCHAR} </if> <if test="record.bibid != null"> and LIB_HOLDINGS.BIBID = #{record.bibid,jdbcType=DECIMAL} </if> <if test="record.rdrid != null"> and LIB_HOLDINGS.RDRID = #{record.rdrid,jdbcType=DECIMAL} </if> <if test="record.id != null"> and LIB_HOLDINGS.ID = #{record.id,jdbcType=DECIMAL} </if> <if test="record.barcode != null"> and LIB_HOLDINGS.BARCODE = #{record.barcode,jdbcType=VARCHAR} </if> <if test="record.hlduid != null"> and LIB_HOLDINGS.hlduid = #{record.hlduid,jdbcType=VARCHAR} </if> <if test="record.assetno != null"> and LIB_HOLDINGS.assetno = #{record.assetno,jdbcType=VARCHAR} </if> <include refid="common.condition"/> </select> <select id="listSendHoldingWithBib" resultType="com.jishen.common.HoldingWithBibEntity"> select title,author,publish,publishaddress,publishdate,isbn,subject,seriesname,attachment,LIB_HOLDINGS.* from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join lib_acq_check on lib_holdings.checkid=lib_acq_check.id where 1 = 1 and (LIB_HOLDINGS.status = '0' or LIB_BIBLIOGRAPHY.status='0') <include refid="common.condition"/> </select> <update id="updateSendHoldingByBibWithAcqCheck" parameterType="com.jishen.common.HoldingWithBibEntity"> update lib_holdings <set> STATUS = '1',SENDDATE = #{record.senddate,jdbcType=DECIMAL} </set> where STATUS = '0' and lib_holdings.id in ( select lib_holdings.id from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join lib_acq_check on lib_holdings.checkid=lib_acq_check.id where 1 = 1 and (LIB_HOLDINGS.status = '0' or LIB_BIBLIOGRAPHY.status='0') <include refid="common.condition"/> ) </update> <update id="updateHoldingByBibWithAcqCheck" parameterType="com.jishen.common.HoldingWithBibEntity"> update lib_holdings <set> STATUS = '1',SENDDATE = #{record.senddate,jdbcType=DECIMAL} </set> where STATUS = '0' and lib_holdings.id in ( select lib_holdings.id from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join lib_acq_check on lib_holdings.checkid=lib_acq_check.id where 1 = 1 <include refid="common.condition"/> ) </update> <update id="updateHoldingByPerBind"> update lib_holdings <set> STATUS = '1',SENDDATE = to_char(sysdate,'yyyymmdd') </set> where STATUS = '0' and lib_holdings.bindid in ( select LIB_PER_BIND.id from LIB_PER_BIND left join lib_bibliography on LIB_PER_BIND.bibid=lib_bibliography.id left join lib_holdings on LIB_PER_BIND.id=lib_holdings.bindid where 1=1 <include refid="common.condition" /> ) </update> <insert id="insertRecords" > insert into LIB_HOLDINGS ( <include refid="Base_Column_List" /> ) select <if test="autoId"> LIB_HOLDINGS_SEQ.nextval, </if>list.* from ( <foreach collection="records" item="record" index="index" separator="UNION ALL"> select <if test="autoId==false"> #{record.id,jdbcType=DECIMAL}, </if> #{record.bibid,jdbcType=DECIMAL}, #{record.checkid,jdbcType=DECIMAL}, #{record.bindid,jdbcType=DECIMAL}, #{record.rdrid,jdbcType=DECIMAL}, #{record.libcode,jdbcType=VARCHAR}, #{record.curlibcode,jdbcType=VARCHAR}, #{record.barcode,jdbcType=VARCHAR}, #{record.status,jdbcType=CHAR}, #{record.callno,jdbcType=VARCHAR}, #{record.location,jdbcType=VARCHAR}, #{record.curlocation,jdbcType=VARCHAR}, #{record.checkdate,jdbcType=DECIMAL}, #{record.doctype,jdbcType=VARCHAR}, #{record.senddate,jdbcType=DECIMAL}, #{record.loandate,jdbcType=DECIMAL}, #{record.loantime,jdbcType=DECIMAL}, #{record.returndate,jdbcType=DECIMAL}, #{record.renewnum,jdbcType=DECIMAL}, #{record.volumenum,jdbcType=DECIMAL}, #{record.volumeinfo,jdbcType=VARCHAR}, #{record.otherno,jdbcType=VARCHAR}, #{record.assetno,jdbcType=VARCHAR}, #{record.shelfno,jdbcType=VARCHAR}, #{record.bindtype,jdbcType=VARCHAR}, #{record.docsources,jdbcType=VARCHAR}, #{record.mediatype,jdbcType=VARCHAR}, #{record.price,jdbcType=DECIMAL}, #{record.totalprice,jdbcType=DECIMAL}, #{record.sumloannum,jdbcType=DECIMAL}, #{record.sumrenewnum,jdbcType=DECIMAL}, #{record.sumloandays,jdbcType=DECIMAL}, #{record.checkprice,jdbcType=DECIMAL}, #{record.checktotalprice,jdbcType=DECIMAL},#{record.hlduid,jdbcType=VARCHAR} from dual </foreach> ) list </insert> <update id="updateRecords" parameterType="java.util.List"> begin <foreach collection="records" item="record" index="index" separator=";"> update LIB_HOLDINGS <set> <if test="record.bibid != null"> BIBID = #{record.bibid,jdbcType=DECIMAL}, </if> <if test="record.checkid != null"> CHECKID = #{record.checkid,jdbcType=DECIMAL}, </if> <if test="record.bindid != null"> BINDID = #{record.bindid,jdbcType=DECIMAL}, </if> <if test="record.rdrid != null"> RDRID = #{record.rdrid,jdbcType=DECIMAL}, </if> <if test="record.libcode != null"> LIBCODE = #{record.libcode,jdbcType=VARCHAR}, </if> <if test="record.curlibcode != null"> CURLIBCODE = #{record.curlibcode,jdbcType=VARCHAR}, </if> <if test="record.barcode != null"> BARCODE = #{record.barcode,jdbcType=VARCHAR}, </if> <if test="record.status != null"> STATUS = #{record.status,jdbcType=CHAR}, </if> <if test="record.callno != null"> CALLNO = #{record.callno,jdbcType=VARCHAR}, </if> <if test="record.location != null"> LOCATION = #{record.location,jdbcType=VARCHAR}, </if> <if test="record.curlocation != null"> CURLOCATION = #{record.curlocation,jdbcType=VARCHAR}, </if> <if test="record.checkdate != null"> CHECKDATE = #{record.checkdate,jdbcType=DECIMAL}, </if> <if test="record.doctype != null"> DOCTYPE = #{record.doctype,jdbcType=VARCHAR}, </if> <if test="record.senddate != null"> SENDDATE = #{record.senddate,jdbcType=DECIMAL}, </if> <if test="record.loandate != null"> LOANDATE = #{record.loandate,jdbcType=DECIMAL}, </if> <if test="record.loantime != null"> LOANTIME = #{record.loantime,jdbcType=DECIMAL}, </if> <if test="record.returndate != null"> RETURNDATE = #{record.returndate,jdbcType=DECIMAL}, </if> <if test="record.renewnum != null"> RENEWNUM = #{record.renewnum,jdbcType=DECIMAL}, </if> <if test="record.volumenum != null"> VOLUMENUM = #{record.volumenum,jdbcType=DECIMAL}, </if> <if test="record.volumeinfo != null"> VOLUMEINFO = #{record.volumeinfo,jdbcType=VARCHAR}, </if> <if test="record.otherno != null"> OTHERNO = #{record.otherno,jdbcType=VARCHAR}, </if> <if test="record.assetno != null"> ASSETNO = #{record.assetno,jdbcType=VARCHAR}, </if> <if test="record.shelfno != null"> SHELFNO = #{record.shelfno,jdbcType=VARCHAR}, </if> <if test="record.bindtype != null"> BINDTYPE = #{record.bindtype,jdbcType=VARCHAR}, </if> <if test="record.docsources != null"> DOCSOURCES = #{record.docsources,jdbcType=VARCHAR}, </if> <if test="record.mediatype != null"> MEDIATYPE = #{record.mediatype,jdbcType=VARCHAR}, </if> <if test="record.price != null"> PRICE = #{record.price,jdbcType=DECIMAL}, </if> <if test="record.totalprice != null"> TOTALPRICE = #{record.totalprice,jdbcType=DECIMAL}, </if> <if test="record.sumloannum != null"> SUMLOANNUM = #{record.sumloannum,jdbcType=DECIMAL}, </if> <if test="record.sumrenewnum != null"> SUMRENEWNUM = #{record.sumrenewnum,jdbcType=DECIMAL}, </if> <if test="record.sumloandays != null"> SUMLOANDAYS = #{record.sumloandays,jdbcType=DECIMAL}, </if> <if test="record.checkprice != null"> CHECKPRICE = #{record.checkprice,jdbcType=DECIMAL}, </if> <if test="record.checktotalprice != null"> CHECKTOTALPRICE = #{record.checktotalprice,jdbcType=DECIMAL}, </if> <if test="record.hlduid != null"> HLDUID = #{record.hlduid,jdbcType=VARCHAR}, </if> </set> where ID = #{record.id,jdbcType=DECIMAL} </foreach> ;end; </update> <delete id="deleteRecords"> delete from LIB_HOLDINGS where 1 = 1 <include refid="common.condition"/> </delete> <select id="listWithCondition" resultType="com.jishen.libsystem.entity.LibHoldings"> select <include refid="Base_Column_List" /> from LIB_HOLDINGS where 1=1 <include refid="common.condition"/> </select> </mapper>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de