You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
480 lines
17 KiB
XML
480 lines
17 KiB
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.glxp.sale.admin.dao.inout.WarehousetempMapper">
|
|
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inout.Warehousetemp">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="action" jdbcType="VARCHAR" property="action" />
|
|
<result column="mainAction" jdbcType="VARCHAR" property="mainaction" />
|
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
|
<result column="corpOrderId" jdbcType="VARCHAR" property="corporderid" />
|
|
<result column="actor" jdbcType="VARCHAR" property="actor" />
|
|
<result column="actDate" jdbcType="VARCHAR" property="actdate" />
|
|
<result column="wrongCode" jdbcType="INTEGER" property="wrongcode" />
|
|
<result column="upperCorpOrderId" jdbcType="VARCHAR" property="uppercorporderid" />
|
|
<result column="fromCorpID" jdbcType="VARCHAR" property="fromcorpid" />
|
|
<result column="fromCorp" jdbcType="VARCHAR" property="fromcorp" />
|
|
<result column="orderId" jdbcType="VARCHAR" property="orderid" />
|
|
<result column="batchNo" jdbcType="VARCHAR" property="batchno" />
|
|
<result column="produceDate" jdbcType="VARCHAR" property="producedate" />
|
|
<result column="expireDate" jdbcType="VARCHAR" property="expiredate" />
|
|
<result column="serialNo" jdbcType="VARCHAR" property="serialno" />
|
|
<result column="udi" jdbcType="VARCHAR" property="udi" />
|
|
<result column="count" jdbcType="INTEGER" property="count" />
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
|
|
<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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
id, action, mainAction, code, corpOrderId, actor, actDate, wrongCode, upperCorpOrderId,
|
|
fromCorpID, fromCorp, orderId, batchNo, produceDate, expireDate, serialNo, udi, count,type
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.glxp.sale.admin.entity.inout.WarehousetempExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from warehousetemp
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
</select>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from warehousetemp
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from warehousetemp
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.glxp.sale.admin.entity.inout.WarehousetempExample">
|
|
delete from warehousetemp
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.glxp.sale.admin.entity.inout.Warehousetemp">
|
|
insert into warehousetemp (id, action, mainAction,
|
|
code, corpOrderId, actor,
|
|
actDate, wrongCode, upperCorpOrderId,
|
|
fromCorpID, fromCorp, orderId,
|
|
batchNo, produceDate, expireDate,
|
|
serialNo, udi, count,type
|
|
)
|
|
values (#{id,jdbcType=BIGINT}, #{action,jdbcType=VARCHAR}, #{mainaction,jdbcType=VARCHAR},
|
|
#{code,jdbcType=VARCHAR}, #{corporderid,jdbcType=VARCHAR}, #{actor,jdbcType=VARCHAR},
|
|
#{actdate,jdbcType=VARCHAR}, #{wrongcode,jdbcType=INTEGER}, #{uppercorporderid,jdbcType=VARCHAR},
|
|
#{fromcorpid,jdbcType=VARCHAR}, #{fromcorp,jdbcType=VARCHAR}, #{orderid,jdbcType=VARCHAR},
|
|
#{batchno,jdbcType=VARCHAR}, #{producedate,jdbcType=VARCHAR}, #{expiredate,jdbcType=VARCHAR},
|
|
#{serialno,jdbcType=VARCHAR}, #{udi,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER},#{type,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.glxp.sale.admin.entity.inout.Warehousetemp">
|
|
insert into warehousetemp
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="action != null">
|
|
action,
|
|
</if>
|
|
<if test="mainaction != null">
|
|
mainAction,
|
|
</if>
|
|
<if test="code != null">
|
|
code,
|
|
</if>
|
|
<if test="corporderid != null">
|
|
corpOrderId,
|
|
</if>
|
|
<if test="actor != null">
|
|
actor,
|
|
</if>
|
|
<if test="actdate != null">
|
|
actDate,
|
|
</if>
|
|
<if test="wrongcode != null">
|
|
wrongCode,
|
|
</if>
|
|
<if test="uppercorporderid != null">
|
|
upperCorpOrderId,
|
|
</if>
|
|
<if test="fromcorpid != null">
|
|
fromCorpID,
|
|
</if>
|
|
<if test="fromcorp != null">
|
|
fromCorp,
|
|
</if>
|
|
<if test="orderid != null">
|
|
orderId,
|
|
</if>
|
|
<if test="batchno != null">
|
|
batchNo,
|
|
</if>
|
|
<if test="producedate != null">
|
|
produceDate,
|
|
</if>
|
|
<if test="expiredate != null">
|
|
expireDate,
|
|
</if>
|
|
<if test="serialno != null">
|
|
serialNo,
|
|
</if>
|
|
<if test="udi != null">
|
|
udi,
|
|
</if>
|
|
<if test="count != null">
|
|
count,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="action != null">
|
|
#{action,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="mainaction != null">
|
|
#{mainaction,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="code != null">
|
|
#{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="corporderid != null">
|
|
#{corporderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="actor != null">
|
|
#{actor,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="actdate != null">
|
|
#{actdate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="wrongcode != null">
|
|
#{wrongcode,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="uppercorporderid != null">
|
|
#{uppercorporderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fromcorpid != null">
|
|
#{fromcorpid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fromcorp != null">
|
|
#{fromcorp,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="orderid != null">
|
|
#{orderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="batchno != null">
|
|
#{batchno,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="producedate != null">
|
|
#{producedate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="expiredate != null">
|
|
#{expiredate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="serialno != null">
|
|
#{serialno,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="udi != null">
|
|
#{udi,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="count != null">
|
|
#{count,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.glxp.sale.admin.entity.inout.WarehousetempExample" resultType="java.lang.Long">
|
|
select count(*) from warehousetemp
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update warehousetemp
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.action != null">
|
|
action = #{record.action,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.mainaction != null">
|
|
mainAction = #{record.mainaction,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.code != null">
|
|
code = #{record.code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.corporderid != null">
|
|
corpOrderId = #{record.corporderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.actor != null">
|
|
actor = #{record.actor,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.actdate != null">
|
|
actDate = #{record.actdate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.wrongcode != null">
|
|
wrongCode = #{record.wrongcode,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.uppercorporderid != null">
|
|
upperCorpOrderId = #{record.uppercorporderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.fromcorpid != null">
|
|
fromCorpID = #{record.fromcorpid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.fromcorp != null">
|
|
fromCorp = #{record.fromcorp,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.orderid != null">
|
|
orderId = #{record.orderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.batchno != null">
|
|
batchNo = #{record.batchno,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.producedate != null">
|
|
produceDate = #{record.producedate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.expiredate != null">
|
|
expireDate = #{record.expiredate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.serialno != null">
|
|
serialNo = #{record.serialno,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.udi != null">
|
|
udi = #{record.udi,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.count != null">
|
|
count = #{record.count,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.type != null">
|
|
type = #{record.type,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update warehousetemp
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
action = #{record.action,jdbcType=VARCHAR},
|
|
mainAction = #{record.mainaction,jdbcType=VARCHAR},
|
|
code = #{record.code,jdbcType=VARCHAR},
|
|
corpOrderId = #{record.corporderid,jdbcType=VARCHAR},
|
|
actor = #{record.actor,jdbcType=VARCHAR},
|
|
actDate = #{record.actdate,jdbcType=VARCHAR},
|
|
wrongCode = #{record.wrongcode,jdbcType=INTEGER},
|
|
upperCorpOrderId = #{record.uppercorporderid,jdbcType=VARCHAR},
|
|
fromCorpID = #{record.fromcorpid,jdbcType=VARCHAR},
|
|
fromCorp = #{record.fromcorp,jdbcType=VARCHAR},
|
|
orderId = #{record.orderid,jdbcType=VARCHAR},
|
|
batchNo = #{record.batchno,jdbcType=VARCHAR},
|
|
produceDate = #{record.producedate,jdbcType=VARCHAR},
|
|
expireDate = #{record.expiredate,jdbcType=VARCHAR},
|
|
serialNo = #{record.serialno,jdbcType=VARCHAR},
|
|
udi = #{record.udi,jdbcType=VARCHAR},
|
|
count = #{record.count,jdbcType=INTEGER,
|
|
type = #{record.type,jdbcType=INTEGER}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inout.Warehousetemp">
|
|
update warehousetemp
|
|
<set>
|
|
<if test="action != null">
|
|
action = #{action,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="mainaction != null">
|
|
mainAction = #{mainaction,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="code != null">
|
|
code = #{code,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="corporderid != null">
|
|
corpOrderId = #{corporderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="actor != null">
|
|
actor = #{actor,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="actdate != null">
|
|
actDate = #{actdate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="wrongcode != null">
|
|
wrongCode = #{wrongcode,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="uppercorporderid != null">
|
|
upperCorpOrderId = #{uppercorporderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fromcorpid != null">
|
|
fromCorpID = #{fromcorpid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fromcorp != null">
|
|
fromCorp = #{fromcorp,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="orderid != null">
|
|
orderId = #{orderid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="batchno != null">
|
|
batchNo = #{batchno,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="producedate != null">
|
|
produceDate = #{producedate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="expiredate != null">
|
|
expireDate = #{expiredate,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="serialno != null">
|
|
serialNo = #{serialno,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="udi != null">
|
|
udi = #{udi,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="count != null">
|
|
count = #{count,jdbcType=INTEGER},
|
|
</if>
|
|
|
|
<if test="type != null">
|
|
type = #{type,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inout.Warehousetemp">
|
|
update warehousetemp
|
|
set action = #{action,jdbcType=VARCHAR},
|
|
mainAction = #{mainaction,jdbcType=VARCHAR},
|
|
code = #{code,jdbcType=VARCHAR},
|
|
corpOrderId = #{corporderid,jdbcType=VARCHAR},
|
|
actor = #{actor,jdbcType=VARCHAR},
|
|
actDate = #{actdate,jdbcType=VARCHAR},
|
|
wrongCode = #{wrongcode,jdbcType=INTEGER},
|
|
upperCorpOrderId = #{uppercorporderid,jdbcType=VARCHAR},
|
|
fromCorpID = #{fromcorpid,jdbcType=VARCHAR},
|
|
fromCorp = #{fromcorp,jdbcType=VARCHAR},
|
|
orderId = #{orderid,jdbcType=VARCHAR},
|
|
batchNo = #{batchno,jdbcType=VARCHAR},
|
|
produceDate = #{producedate,jdbcType=VARCHAR},
|
|
expireDate = #{expiredate,jdbcType=VARCHAR},
|
|
serialNo = #{serialno,jdbcType=VARCHAR},
|
|
udi = #{udi,jdbcType=VARCHAR},
|
|
count = #{count,jdbcType=INTEGER},
|
|
type = #{type,jdbcType=INTEGER},
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
|
|
<insert id="insertTempWarehouses" parameterType="java.util.List">
|
|
INSERT INTO warehousetemp
|
|
(action, mainAction,
|
|
code, corpOrderId, actor,
|
|
actDate, wrongCode, upperCorpOrderId,
|
|
fromCorpID, fromCorp, orderId,batchNo,produceDate,expireDate,serialNo,udi,count,type)
|
|
VALUES
|
|
<foreach collection="warehouseEntities" item="item" index="index"
|
|
separator=",">
|
|
(
|
|
#{item.action},
|
|
#{item.mainaction},
|
|
#{item.code},
|
|
#{item.corporderid},
|
|
#{item.actor},
|
|
#{item.actdate},
|
|
#{item.wrongcode},
|
|
#{item.uppercorporderid},
|
|
#{item.fromcorpid},
|
|
#{
|
|
item.fromcorp
|
|
},#{item.orderid}
|
|
,#{item.batchno}
|
|
,#{item.producedate}
|
|
,#{item.expiredate}
|
|
,#{item.serialno}
|
|
,#{item.udi}
|
|
,#{item.count}
|
|
,#{item.type}
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
<select id="findErrorByOrderId" parameterType="com.glxp.sale.admin.req.inout.WarehouseQueryRequest"
|
|
resultType="com.glxp.sale.admin.entity.inout.Warehousetemp">
|
|
SELECT *
|
|
FROM warehousetemp
|
|
where `orderId` = #{corpOrderId} AND code LIKE concat('%',#{code},'%')
|
|
</select>
|
|
|
|
<delete id="deleteTempWarehouses" parameterType="java.util.List">
|
|
DELETE FROM warehousetemp WHERE id IN
|
|
<foreach collection="warehouseEntities" item="item" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |