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.

48 lines
2.2 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.BroadApiMapper">
<select id="getArea" resultMap="com.ruoyi.manage.mapper.BaseStoreMapper.BaseStoreResult">
select store_name,store_id from base_store where store_tag=2
</select>
<resultMap id="BroadCountNumberMap" type="com.ruoyi.api.domain.BroadCountNumber">
<result property="areaName" column="store_name"/>
<result property="locationCode" column="location_code"/>
<result property="countNumber" column="conum"/>
</resultMap>
<select id="getCountNumberById" resultMap="BroadCountNumberMap">
select bs.store_name, bl.location_code, count(lr.objid) as conum
from base_location bl
left join base_store bs on bs.store_id = bl.store_id
left join ledger_rfid lr on bl.location_code = lr.location_code
where stote_tag = 2
and bl.store_id = #{id}
group by bl.location_code
</select>
<select id="getLedgerByCode" resultMap="com.ruoyi.manage.mapper.LedgerRfidMapper.LedgerRfidResult">
select manufacturer_name, rifd_code, batch_code, create_time
from ledger_rfid lr
left join base_manufacturer bm on lr.manufacturer_id = bm.manufacturer_id
where is_scrap = 1
and location_code = #{locationCode}
</select>
<resultMap id="DeviceResult" type="com.ruoyi.api.domain.NoPowerDevice">
<result property="deviceCode" column="device_code" />
<result property="deviceName" column="device_name" />
<result property="deviceType" column="device_type" />
<result property="useState" column="use_state" />
<result property="deviceState" column="device_state" />
<result property="locationName" column="location_name" />
</resultMap>
<select id="getDevice" resultMap="DeviceResult">
select device_code, device_name, use_state, device_state, location_name from device_base_info where location_name=#{storeName}
</select>
</mapper>