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.

52 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.ruoyi.api.mapper.ApiMapper">
<insert id="submintInsertRecordIn">
2 years ago
INSERT ignore into bg_wheel_chocks.record_in (epc_code, batch_code, location_code,manufacturer_id,
manufacturer_Name,
create_by,create_time)
VALUES
<foreach collection="inStore.epclist" item="item" separator=",">
(#{item},#{inStore.binchCode},#{inStore.selectLocationText},#{inStore.manufacturerId},#{inStore.selectManuText},#{inStore.submitUser},now())
</foreach>
</insert>
<insert id="submintInsertLedger">
2 years ago
INSERT ignore into bg_wheel_chocks.ledger_rfid (manufacturer_id, rifd_code, batch_code, location_code)
VALUES
<foreach collection="inStore.epclist" item="item" separator=",">
(#{inStore.manufacturerId},#{item},#{inStore.binchCode},#{inStore.selectLocationText})
</foreach>
</insert>
<!-- -->
2 years ago
<insert id="submitInsertRecordOut">
INSERT INTO bg_wheel_chocks.record_out (epc_code, location_code, use_user, create_by) VALUES
<foreach collection="outStoreDto.epcList" item="epc" separator=",">
(#{epc}, #{outStoreDto.areaCode}, #{outStoreDto.useUser}, #{outStoreDto.submitUser})
</foreach>
</insert>
<update id="updataLedger">
UPDATE bg_wheel_chocks.ledger_rfid
SET
2 years ago
location_type = '2',
location_code = #{outStoreDto.areaCode},
update_time = now()
2 years ago
WHERE rifd_code in
<foreach collection="outStoreDto.epcList" item="epc" separator="," open="(" close=")">
2 years ago
#{epc}
2 years ago
</foreach>
</update>
2 years ago
<select id="storeCheckSelect" resultType="com.ruoyi.api.domain.StockDto">
select row_number() over (order by location_code) as 'index',
rifd_code as epcCode,
location_code as locationCode,
'N' as state
from ledger_rfid
where location_type = 1
and is_scrap = 1
</select>
</mapper>