| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487 |
- <?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.chinaitop.depot.storage.mapper.TCcdataMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.storage.model.TCcdata" >
- <result column="id" property="id" jdbcType="VARCHAR" />
- <result column="org_id" property="orgId" jdbcType="VARCHAR" />
- <result column="v_cc_code" property="vCcCode" jdbcType="VARCHAR" />
- <result column="v_hw_code" property="vHwCode" jdbcType="VARCHAR" />
- <result column="stand_or" property="standOr" jdbcType="VARCHAR" />
- <result column="stand_time" property="standTime" jdbcType="TIMESTAMP" />
- <result column="i_tdh" property="iTdh" jdbcType="INTEGER" />
- <result column="i_value" property="iValue" jdbcType="INTEGER" />
- <result column="v_update_time" property="vUpdateTime" jdbcType="TIMESTAMP" />
- <result column="v_update_people" property="vUpdatePeople" jdbcType="VARCHAR" />
- <result column="data_source" property="dataSource" jdbcType="VARCHAR" />
- <result column="v_remark" property="vRemark" jdbcType="VARCHAR" />
- <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
- <result column="jchcff" property="jchcff" jdbcType="VARCHAR" />
- <result column="hczl" property="hczl" jdbcType="VARCHAR" />
- <result column="cldjpd" property="cldjpd" jdbcType="VARCHAR" />
- <result column="hckyxfx" property="hckyxfx" jdbcType="VARCHAR" />
- <result column="fsbw" property="fsbw" jdbcType="VARCHAR" />
- <result column="hcjcdh" property="hcjcdh" jdbcType="VARCHAR" />
- </resultMap>
- <resultMap id="ResultMapWithBLOBs" type="com.chinaitop.depot.storage.model.TCcdata" extends="BaseResultMap" >
- <result column="c_image" property="cImage" jdbcType="LONGVARBINARY" />
- <result column="ckmdzjh" property="ckmdzjh" jdbcType="LONGVARBINARY" />
- </resultMap>
- <sql id="Example_Where_Clause" >
- <where >
- <foreach collection="oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause" >
- <where >
- <foreach collection="example.oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List" >
- id, org_id, v_cc_code, v_hw_code, stand_or, stand_time, i_tdh, i_value, v_update_time,
- v_update_people, data_source, v_remark, updatetime, jchcff, hczl, cldjpd, hckyxfx, fsbw, hcjcdh
- </sql>
- <sql id="Blob_Column_List" >
- c_image, ckmdzjh
- </sql>
- <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.chinaitop.depot.storage.model.TCcdataExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from t_ccdata
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.storage.model.TCcdataExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from t_ccdata
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.storage.model.TCcdataExample" >
- delete from t_ccdata
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.chinaitop.depot.storage.model.TCcdata" >
- insert into t_ccdata (id, org_id, v_cc_code,
- v_hw_code, stand_or, stand_time,
- i_tdh, i_value, v_update_time,
- v_update_people, data_source, v_remark,
- updatetime, jchcff, hczl,
- cldjpd, hckyxfx, c_image, ckmdzjh,fsbw, hcjcdh
- )
- values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vCcCode,jdbcType=VARCHAR},
- #{vHwCode,jdbcType=VARCHAR}, #{standOr,jdbcType=VARCHAR}, #{standTime,jdbcType=TIMESTAMP},
- #{iTdh,jdbcType=INTEGER}, #{iValue,jdbcType=INTEGER}, #{vUpdateTime,jdbcType=TIMESTAMP},
- #{vUpdatePeople,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR}, #{vRemark,jdbcType=VARCHAR},
- #{updatetime,jdbcType=TIMESTAMP}, #{jchcff,jdbcType=VARCHAR}, #{hczl,jdbcType=VARCHAR},
- #{cldjpd,jdbcType=VARCHAR}, #{hckyxfx,jdbcType=VARCHAR}, #{cImage,jdbcType=LONGVARBINARY},
- #{ckmdzjh,jdbcType=LONGVARBINARY},#{fsbw,jdbcType=VARCHAR},#{hcjcdh,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.storage.model.TCcdata" >
- insert into t_ccdata
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="orgId != null" >
- org_id,
- </if>
- <if test="vCcCode != null" >
- v_cc_code,
- </if>
- <if test="vHwCode != null" >
- v_hw_code,
- </if>
- <if test="standOr != null" >
- stand_or,
- </if>
- <if test="standTime != null" >
- stand_time,
- </if>
- <if test="iTdh != null" >
- i_tdh,
- </if>
- <if test="iValue != null" >
- i_value,
- </if>
- <if test="vUpdateTime != null" >
- v_update_time,
- </if>
- <if test="vUpdatePeople != null" >
- v_update_people,
- </if>
- <if test="dataSource != null" >
- data_source,
- </if>
- <if test="vRemark != null" >
- v_remark,
- </if>
- <if test="updatetime != null" >
- updatetime,
- </if>
- <if test="jchcff != null" >
- jchcff,
- </if>
- <if test="hczl != null" >
- hczl,
- </if>
- <if test="cldjpd != null" >
- cldjpd,
- </if>
- <if test="hckyxfx != null" >
- hckyxfx,
- </if>
- <if test="cImage != null" >
- c_image,
- </if>
- <if test="ckmdzjh != null" >
- ckmdzjh,
- </if>
- <if test="fsbw != null">
- fsbw,
- </if>
- <if test="hcjcdh != null">
- hcjcdh,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="vCcCode != null" >
- #{vCcCode,jdbcType=VARCHAR},
- </if>
- <if test="vHwCode != null" >
- #{vHwCode,jdbcType=VARCHAR},
- </if>
- <if test="standOr != null" >
- #{standOr,jdbcType=VARCHAR},
- </if>
- <if test="standTime != null" >
- #{standTime,jdbcType=TIMESTAMP},
- </if>
- <if test="iTdh != null" >
- #{iTdh,jdbcType=INTEGER},
- </if>
- <if test="iValue != null" >
- #{iValue,jdbcType=INTEGER},
- </if>
- <if test="vUpdateTime != null" >
- #{vUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="vUpdatePeople != null" >
- #{vUpdatePeople,jdbcType=VARCHAR},
- </if>
- <if test="dataSource != null" >
- #{dataSource,jdbcType=VARCHAR},
- </if>
- <if test="vRemark != null" >
- #{vRemark,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="jchcff != null" >
- #{jchcff,jdbcType=VARCHAR},
- </if>
- <if test="hczl != null" >
- #{hczl,jdbcType=VARCHAR},
- </if>
- <if test="cldjpd != null" >
- #{cldjpd,jdbcType=VARCHAR},
- </if>
- <if test="hckyxfx != null" >
- #{hckyxfx,jdbcType=VARCHAR},
- </if>
- <if test="cImage != null" >
- #{cImage,jdbcType=LONGVARBINARY},
- </if>
- <if test="ckmdzjh != null" >
- #{ckmdzjh,jdbcType=LONGVARBINARY},
- </if>
- <if test="fsbw != null">
- #{fsbw,jdbcType=VARCHAR},
- </if>
- <if test="hcjcdh != null">
- #{hcjcdh,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.storage.model.TCcdataExample" resultType="java.lang.Integer" >
- select count(*) from t_ccdata
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update t_ccdata
- <set >
- <if test="record.id != null" >
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.orgId != null" >
- org_id = #{record.orgId,jdbcType=VARCHAR},
- </if>
- <if test="record.vCcCode != null" >
- v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
- </if>
- <if test="record.vHwCode != null" >
- v_hw_code = #{record.vHwCode,jdbcType=VARCHAR},
- </if>
- <if test="record.standOr != null" >
- stand_or = #{record.standOr,jdbcType=VARCHAR},
- </if>
- <if test="record.standTime != null" >
- stand_time = #{record.standTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.iTdh != null" >
- i_tdh = #{record.iTdh,jdbcType=INTEGER},
- </if>
- <if test="record.iValue != null" >
- i_value = #{record.iValue,jdbcType=INTEGER},
- </if>
- <if test="record.vUpdateTime != null" >
- v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.vUpdatePeople != null" >
- v_update_people = #{record.vUpdatePeople,jdbcType=VARCHAR},
- </if>
- <if test="record.dataSource != null" >
- data_source = #{record.dataSource,jdbcType=VARCHAR},
- </if>
- <if test="record.vRemark != null" >
- v_remark = #{record.vRemark,jdbcType=VARCHAR},
- </if>
- <if test="record.updatetime != null" >
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.jchcff != null" >
- jchcff = #{record.jchcff,jdbcType=VARCHAR},
- </if>
- <if test="record.hczl != null" >
- hczl = #{record.hczl,jdbcType=VARCHAR},
- </if>
- <if test="record.cldjpd != null" >
- cldjpd = #{record.cldjpd,jdbcType=VARCHAR},
- </if>
- <if test="record.hckyxfx != null" >
- hckyxfx = #{record.hckyxfx,jdbcType=VARCHAR},
- </if>
- <if test="record.cImage != null" >
- c_image = #{record.cImage,jdbcType=LONGVARBINARY},
- </if>
- <if test="record.ckmdzjh != null" >
- ckmdzjh = #{record.ckmdzjh,jdbcType=LONGVARBINARY},
- </if>
- <if test="record.fsbw != null">
- fsbw = #{record.fsbw,jdbcType=VARCHAR},
- </if>
- <if test="record.hcjcdh != null">
- hcjcdh = #{record.hcjcdh,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExampleWithBLOBs" parameterType="map" >
- update t_ccdata
- set org_id = #{record.orgId,jdbcType=VARCHAR},
- v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
- v_hw_code = #{record.vHwCode,jdbcType=VARCHAR},
- stand_or = #{record.standOr,jdbcType=VARCHAR},
- stand_time = #{record.standTime,jdbcType=TIMESTAMP},
- i_tdh = #{record.iTdh,jdbcType=INTEGER},
- i_value = #{record.iValue,jdbcType=INTEGER},
- v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
- v_update_people = #{record.vUpdatePeople,jdbcType=VARCHAR},
- data_source = #{record.dataSource,jdbcType=VARCHAR},
- v_remark = #{record.vRemark,jdbcType=VARCHAR},
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- jchcff = #{record.jchcff,jdbcType=VARCHAR},
- hczl = #{record.hczl,jdbcType=VARCHAR},
- cldjpd = #{record.cldjpd,jdbcType=VARCHAR},
- hckyxfx = #{record.hckyxfx,jdbcType=VARCHAR},
- c_image = #{record.cImage,jdbcType=LONGVARBINARY},
- ckmdzjh = #{record.ckmdzjh,jdbcType=LONGVARBINARY},
- fsbw = #{record.fsbw,jdbcType=VARCHAR},
- hcjcdh = #{record.hcjcdh,jdbcType=VARCHAR}
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="map" >
- update t_ccdata
- set org_id = #{orgId,jdbcType=VARCHAR},
- v_cc_code = #{vCcCode,jdbcType=VARCHAR},
- v_hw_code = #{vHwCode,jdbcType=VARCHAR},
- stand_or = #{standOr,jdbcType=VARCHAR},
- stand_time = #{standTime,jdbcType=TIMESTAMP},
- i_tdh = #{iTdh,jdbcType=INTEGER},
- i_value = #{iValue,jdbcType=INTEGER},
- v_update_time = #{vUpdateTime,jdbcType=TIMESTAMP},
- v_update_people = #{vUpdatePeople,jdbcType=VARCHAR},
- data_source = #{dataSource,jdbcType=VARCHAR},
- v_remark = #{vRemark,jdbcType=VARCHAR},
- updatetime = #{updatetime,jdbcType=TIMESTAMP},
- jchcff = #{jchcff,jdbcType=VARCHAR},
- hczl = #{hczl,jdbcType=VARCHAR},
- cldjpd = #{cldjpd,jdbcType=VARCHAR},
- hckyxfx = #{hckyxfx,jdbcType=VARCHAR},
- c_image = #{cImage,jdbcType=LONGVARBINARY},
- ckmdzjh = #{ckmdzjh,jdbcType=LONGVARBINARY},
- fsbw = #{fsbw,jdbcType=VARCHAR},
- hcjcdh = #{hcjcdh,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByExample" parameterType="map" >
- update t_ccdata
- set id = #{record.id,jdbcType=VARCHAR},
- org_id = #{record.orgId,jdbcType=VARCHAR},
- v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
- v_hw_code = #{record.vHwCode,jdbcType=VARCHAR},
- stand_or = #{record.standOr,jdbcType=VARCHAR},
- stand_time = #{record.standTime,jdbcType=TIMESTAMP},
- i_tdh = #{record.iTdh,jdbcType=INTEGER},
- i_value = #{record.iValue,jdbcType=INTEGER},
- v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
- v_update_people = #{record.vUpdatePeople,jdbcType=VARCHAR},
- data_source = #{record.dataSource,jdbcType=VARCHAR},
- v_remark = #{record.vRemark,jdbcType=VARCHAR},
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- jchcff = #{record.jchcff,jdbcType=VARCHAR},
- hczl = #{record.hczl,jdbcType=VARCHAR},
- cldjpd = #{record.cldjpd,jdbcType=VARCHAR},
- hckyxfx = #{record.hckyxfx,jdbcType=VARCHAR},
- fsbw = #{record.fsbw,jdbcType=VARCHAR},
- hcjcdh = #{record.hcjcdh,jdbcType=VARCHAR}
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <insert id="insertBatch" parameterType="java.util.List">
- insert into t_ccdata (id, org_id, v_cc_code,
- i_tdh, i_value, v_update_time,
- data_source, v_remark, c_image,hcjcdh
- )
- values
- <foreach collection="list" item="cc" index="index" separator=",">
- (#{cc.id,jdbcType=VARCHAR}, #{cc.orgId,jdbcType=VARCHAR}, #{cc.vCcCode,jdbcType=VARCHAR},
- #{cc.iTdh,jdbcType=INTEGER}, #{cc.iValue,jdbcType=INTEGER}, #{cc.vUpdateTime,jdbcType=TIMESTAMP},
- #{cc.dataSource,jdbcType=VARCHAR}, #{cc.vRemark,jdbcType=VARCHAR}, #{cc.cImage,jdbcType=LONGVARBINARY},
- #{cc.hcjcdh,jdbcType=VARCHAR},
- )
- </foreach>
- </insert>
- <select id="getList" resultType="java.util.Map" parameterType="java.util.Map">
- SELECT
- td.id AS id,
- td.v_cc_code AS vcfcode,
- td.v_hw_code AS vhwid,
- td.stand_or AS standor,
- td.stand_time AS standtime,
- td.i_tdh AS itdh,
- td.hczl AS hczl,
- td.i_value AS ivalue,
- td.v_update_people AS vupdatepeople,
- td.v_update_time AS vupdatetime,
- td.hcjcdh AS hcjcdh,
- td.ckmdzjh as ckmdzjh,
- td.fsbw as fsbw
- FROM t_ccdata td
- WHERE td.org_id = #{orgId}
- <if test="iBeginTdh != null and test=iEndTdh != null">
- and td.i_tdh BETWEEN #{iBeginTdh, jdbcType=INTEGER} AND #{iEndTdh, jdbcType=INTEGER}
- </if>
- <if test="vCfCode != null">
- and td.v_cc_code = #{vCfCode}
- </if>
- <if test="createTime != null">
- AND td.v_update_time < #{createTime}
- </if>
- ORDER BY td.v_update_time DESC
- </select>
- <!-- 获得货位代码 -->
- <select id="getJcd" parameterType="java.util.Map" resultType="java.util.Map">
- select hwdm jcd from basic_warehouse
- <where>
- <if test="warehouseId != null">
- warehouse_id = #{warehouseId}
- </if>
- </where>
- </select>
- </mapper>
|