|
|
@ -14,7 +14,7 @@
|
|
|
|
select rifd_code from ledger_rfid where rifd_code = #{epc} limit 1
|
|
|
|
select rifd_code from ledger_rfid where rifd_code = #{epc} limit 1
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<insert id="submintInsertRecordIn">
|
|
|
|
<insert id="submintInsertRecordIn">
|
|
|
|
INSERT ignore into bg_wheel_chocks.record_in (epc_code, batch_code, location_code,manufacturer_id,
|
|
|
|
INSERT ignore into record_in (epc_code, batch_code, location_code,manufacturer_id,
|
|
|
|
manufacturer_Name,
|
|
|
|
manufacturer_Name,
|
|
|
|
create_by,create_time)
|
|
|
|
create_by,create_time)
|
|
|
|
VALUES
|
|
|
|
VALUES
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="submintInsertLedger">
|
|
|
|
<insert id="submintInsertLedger">
|
|
|
|
INSERT ignore into bg_wheel_chocks.ledger_rfid (manufacturer_id, rifd_code, batch_code, location_code)
|
|
|
|
INSERT ignore into ledger_rfid (manufacturer_id, rifd_code, batch_code, location_code)
|
|
|
|
VALUES
|
|
|
|
VALUES
|
|
|
|
<foreach collection="inStore.epclist" item="item" separator=",">
|
|
|
|
<foreach collection="inStore.epclist" item="item" separator=",">
|
|
|
|
(#{inStore.manufacturerId},#{item},#{inStore.binchCode},#{inStore.selectLocationText})
|
|
|
|
(#{inStore.manufacturerId},#{item},#{inStore.binchCode},#{inStore.selectLocationText})
|
|
|
@ -36,14 +36,17 @@
|
|
|
|
<!-- -->
|
|
|
|
<!-- -->
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="submitInsertRecordOut">
|
|
|
|
<insert id="submitInsertRecordOut">
|
|
|
|
INSERT INTO bg_wheel_chocks.record_out (epc_code, location_code, use_user, create_by) VALUES
|
|
|
|
INSERT INTO record_out (epc_code, location_code, use_user, create_by)
|
|
|
|
|
|
|
|
VALUES
|
|
|
|
<foreach collection="outStoreDto.epcList" item="epc" separator=",">
|
|
|
|
<foreach collection="outStoreDto.epcList" item="epc" separator=",">
|
|
|
|
(#{epc}, #{outStoreDto.areaCode}, #{outStoreDto.useUser}, #{outStoreDto.submitUser})
|
|
|
|
(
|
|
|
|
|
|
|
|
#{epc}, #{outStoreDto.areaCode}, #{outStoreDto.useUser}, #{outStoreDto.submitUser}
|
|
|
|
|
|
|
|
)
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updataLedger">
|
|
|
|
<update id="updataLedger">
|
|
|
|
UPDATE bg_wheel_chocks.ledger_rfid
|
|
|
|
UPDATE ledger_rfid
|
|
|
|
SET
|
|
|
|
SET
|
|
|
|
location_type = '2',
|
|
|
|
location_type = '2',
|
|
|
|
location_code = #{outStoreDto.areaCode},
|
|
|
|
location_code = #{outStoreDto.areaCode},
|
|
|
@ -53,6 +56,14 @@
|
|
|
|
#{epc}
|
|
|
|
#{epc}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updataLedgerFoyOut">
|
|
|
|
|
|
|
|
UPDATE ledger_rfid
|
|
|
|
|
|
|
|
SET
|
|
|
|
|
|
|
|
location_type = '2',
|
|
|
|
|
|
|
|
location_code = #{outStoreDto.areaCode},
|
|
|
|
|
|
|
|
update_time = now()
|
|
|
|
|
|
|
|
WHERE rifd_code =#{epc}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="storeCheckSelect" resultType="com.ruoyi.api.domain.StockDto">
|
|
|
|
<select id="storeCheckSelect" resultType="com.ruoyi.api.domain.StockDto">
|
|
|
|
select row_number() over (order by location_code) as 'index',
|
|
|
|
select row_number() over (order by location_code) as 'index',
|
|
|
@ -65,7 +76,7 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertCheckInfo">
|
|
|
|
<insert id="insertCheckInfo">
|
|
|
|
INSERT INTO bg_wheel_chocks.record_store_check_info (check_id, epc_code, location_code, check_state)
|
|
|
|
INSERT INTO record_store_check_info (check_id, epc_code, location_code, check_state)
|
|
|
|
VALUES
|
|
|
|
VALUES
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
(#{id}, #{item.epcCode},#{item.locationCode},#{item.state})
|
|
|
|
(#{id}, #{item.epcCode},#{item.locationCode},#{item.state})
|
|
|
@ -98,7 +109,7 @@
|
|
|
|
where rifd_code = #{epc}
|
|
|
|
where rifd_code = #{epc}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<update id="updataLedgerForBf">
|
|
|
|
<update id="updataLedgerForBf">
|
|
|
|
UPDATE bg_wheel_chocks.ledger_rfid
|
|
|
|
UPDATE ledger_rfid
|
|
|
|
SET is_scrap = #{state},
|
|
|
|
SET is_scrap = #{state},
|
|
|
|
update_time=now()
|
|
|
|
update_time=now()
|
|
|
|
WHERE rifd_code = #{epc}
|
|
|
|
WHERE rifd_code = #{epc}
|
|
|
@ -114,7 +125,7 @@
|
|
|
|
from ledger_rfid lf
|
|
|
|
from ledger_rfid lf
|
|
|
|
left join sys_dict_data sdd on sdd.dict_value = is_scrap and sdd.dict_type = 'bf_y_n'
|
|
|
|
left join sys_dict_data sdd on sdd.dict_value = is_scrap and sdd.dict_type = 'bf_y_n'
|
|
|
|
left join sys_dict_data sdd1 on sdd1.dict_value = location_type and sdd1.dict_type = 'store_tag'
|
|
|
|
left join sys_dict_data sdd1 on sdd1.dict_value = location_type and sdd1.dict_type = 'store_tag'
|
|
|
|
left join bg_wheel_chocks.record_invalidated ri on lf.rifd_code = ri.epc
|
|
|
|
left join record_invalidated ri on lf.rifd_code = ri.epc
|
|
|
|
where rifd_code = #{epc}
|
|
|
|
where rifd_code = #{epc}
|
|
|
|
limit 1
|
|
|
|
limit 1
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -153,14 +164,14 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertWasreOutRecord">
|
|
|
|
<insert id="insertWasreOutRecord">
|
|
|
|
INSERT INTO bg_wheel_chocks.record_waste_out (epc_code, location_code, create_by) VALUES
|
|
|
|
INSERT INTO record_waste_out (epc_code, location_code, create_by) VALUES
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
( #{item.epcCode},#{item.locationCode},#{user})
|
|
|
|
( #{item.epcCode},#{item.locationCode},#{user})
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updataLedgerForWasreOut" >
|
|
|
|
<update id="updataLedgerForWasreOut" >
|
|
|
|
UPDATE bg_wheel_chocks.ledger_rfid
|
|
|
|
UPDATE ledger_rfid
|
|
|
|
SET location_type = null,
|
|
|
|
SET location_type = null,
|
|
|
|
location_code = null,
|
|
|
|
location_code = null,
|
|
|
|
is_scrap = '3',
|
|
|
|
is_scrap = '3',
|
|
|
|