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.

55 lines
2.1 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.udi.admin.dao.inout.WarehousetempDao">
<select id="findTempByOrderId" parameterType="com.glxp.udi.admin.req.inout.CommitRequest"
resultType="com.glxp.udi.admin.entity.inout.WarehousetempEntity">
SELECT *
FROM io_warehousetemp
where `orderId` = #{orderId}
</select>
<insert id="insertTempWarehouses" parameterType="java.util.List">
INSERT INTO io_warehousetemp
(action, mainAction,
code, corpOrderId, actor,
actDate, wrongCode, upperCorpOrderId,
fromCorpID, fromCorp, orderId,batchNo,produceDate,expireDate,serialNo,udi,count,customerId)
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.customerId}
)
</foreach>
</insert>
<select id="findErrorByOrderId" parameterType="com.glxp.udi.admin.req.inout.WarehouseQueryRequest"
resultType="com.glxp.udi.admin.entity.inout.WarehousetempEntity">
SELECT *
FROM io_warehousetemp
where `orderId` = #{corpOrderId} AND code LIKE concat('%',#{code},'%')
</select>
<delete id="deleteTempWarehouses" parameterType="java.util.List">
DELETE FROM io_warehousetemp WHERE id IN
<foreach collection="warehouseEntities" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>