Edit D:\rfid\libsystem\WEB-INF\classes\com\jishen\libsystem\mapping\LibTitleNumberMapper.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.LibTitleNumberMapper"> <resultMap id="BaseResultMap" type="com.jishen.libsystem.entity.LibTitleNumber"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="LIBCODE" jdbcType="VARCHAR" property="libcode" /> <result column="CLASSNO" jdbcType="VARCHAR" property="classno" /> <result column="TITNUM" jdbcType="DECIMAL" property="titnum" /> <result column="SYSID" jdbcType="DECIMAL" property="sysid" /> </resultMap> <sql id="Base_Column_List"> ID, LIBCODE, CLASSNO, TITNUM, SYSID </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_TITLE_NUMBER where ID = #{id,jdbcType=DECIMAL} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from LIB_TITLE_NUMBER where ID = #{id,jdbcType=DECIMAL} </delete> <insert id="insert" parameterType="com.jishen.libsystem.entity.LibTitleNumber"> insert into LIB_TITLE_NUMBER (ID, LIBCODE, CLASSNO, TITNUM, SYSID) values (#{id,jdbcType=DECIMAL}, #{libcode,jdbcType=VARCHAR}, #{classno,jdbcType=VARCHAR}, #{titnum,jdbcType=DECIMAL}, #{sysid,jdbcType=DECIMAL}) </insert> <insert id="insertSelective" parameterType="com.jishen.libsystem.entity.LibTitleNumber"> <selectKey keyProperty="id" resultType="java.lang.Long" order="BEFORE"> select LIB_TITLE_NUMBER_SEQ.nextval a FROM dual </selectKey> insert into LIB_TITLE_NUMBER <trim prefix="(" suffix=")" suffixOverrides=","> ID, <if test="libcode != null"> LIBCODE, </if> <if test="classno != null"> CLASSNO, </if> <if test="titnum != null"> TITNUM, </if> <if test="sysid != null"> SYSID, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> #{id,jdbcType=DECIMAL}, <if test="libcode != null"> #{libcode,jdbcType=VARCHAR}, </if> <if test="classno != null"> #{classno,jdbcType=VARCHAR}, </if> <if test="titnum != null"> #{titnum,jdbcType=DECIMAL}, </if> <if test="sysid != null"> #{sysid,jdbcType=DECIMAL}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.jishen.libsystem.entity.LibTitleNumber"> update LIB_TITLE_NUMBER <set> <if test="libcode != null"> LIBCODE = #{libcode,jdbcType=VARCHAR}, </if> <if test="classno != null"> CLASSNO = #{classno,jdbcType=VARCHAR}, </if> <if test="titnum != null"> TITNUM = #{titnum,jdbcType=DECIMAL}, </if> <if test="sysid != null"> SYSID = #{sysid,jdbcType=DECIMAL}, </if> </set> where ID = #{id,jdbcType=DECIMAL} </update> <update id="updateByPrimaryKey" parameterType="com.jishen.libsystem.entity.LibTitleNumber"> update LIB_TITLE_NUMBER set LIBCODE = #{libcode,jdbcType=VARCHAR}, CLASSNO = #{classno,jdbcType=VARCHAR}, TITNUM = #{titnum,jdbcType=DECIMAL}, SYSID = #{sysid,jdbcType=DECIMAL} where ID = #{id,jdbcType=DECIMAL} </update> <select id="listSelective" parameterType="com.jishen.libsystem.entity.LibTitleNumber" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_TITLE_NUMBER where 1=1 <if test="libcode != null"> and LIBCODE = #{libcode,jdbcType=VARCHAR} </if> <if test="sysid != null"> and SYSID = #{sysid,jdbcType=DECIMAL} </if> <if test="classno != null"> and CLASSNO = #{classno,jdbcType=VARCHAR} </if> </select> <delete id="deleteRecords" parameterType="com.jishen.libsystem.entity.LibTitleNumber"> delete LIB_TITLE_NUMBER where 1=1 <if test="libcode != null"> and LIBCODE = #{libcode,jdbcType=VARCHAR} </if> <if test="sysid != null"> and SYSID = #{sysid,jdbcType=DECIMAL} </if> </delete> <insert id="renewRecords" parameterType="com.jishen.libsystem.entity.LibTitleNumber"> <![CDATA[ insert into LIB_TITLE_NUMBER (ID, LIBCODE, SYSID, CLASSNO, TITNUM) select LIB_TITLE_NUMBER_SEQ.nextval ,#{libcode}, ${sysid},list2.classno,list2.titnum from ( select classno,max(titnum) titnum FROM ( select regexp_substr(callno, '[^/]+') as classno, max(to_number(regexp_replace(substr(regexp_substr(callno, '/\w*'),2), '[^0-9]', ''))) as titnum from lib_holdings where libcode = #{libcode} and bibid in (select id from lib_bibliography where sysid=${sysid} ) group by regexp_substr(callno, '[^/]+') union all select regexp_substr(callno, '[^/]+') as classno, max(to_number(regexp_replace(substr(regexp_substr(callno, '/\w*'),2), '[^0-9]', ''))) as titnum from lib_bibliography where libcode = #{libcode} and sysid=${sysid} group by regexp_substr(callno, '[^/]+') ) list1 group by classno) list2 where titnum is not null ]]> </insert> <select id="listWithCondition" parameterType="com.jishen.common.SrchLimitEntity" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_TITLE_NUMBER where 1=1 <include refid="common.condition"></include> </select> </mapper>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de