81 lines
2.8 KiB
XML
81 lines
2.8 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.oa.mapper.SysOaWarehouseMapper">
|
|
|
|
<resultMap type="com.ruoyi.oa.domain.vo.SysOaWarehouseVo" id="SysOaWarehouseResult">
|
|
<result property="id" column="id"/>
|
|
<result property="inventory" column="inventory"/>
|
|
<result property="model" column="model"/>
|
|
<result property="price" column="price"/>
|
|
<result property="unit" column="unit"/>
|
|
<result property="name" column="name"/>
|
|
<result property="brand" column="brand"/>
|
|
<result property="specifications" column="specifications"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="delFlag" column="del_flag"/>
|
|
</resultMap>
|
|
|
|
<select id="selectVoByIdAndXml" resultMap="SysOaWarehouseResult" parameterType="Long">
|
|
select id, inventory, model, unit, name, brand, specifications, remark, create_time, create_by, update_time, update_by, del_flag
|
|
from sys_oa_warehouse
|
|
where id = #{id}
|
|
</select>
|
|
|
|
|
|
<select id="selectVoPageThreshold" resultType="com.ruoyi.oa.domain.vo.SysOaWarehouseVo">
|
|
select id,
|
|
inventory,
|
|
model,
|
|
unit,
|
|
name,
|
|
brand,
|
|
specifications,
|
|
remark,
|
|
create_time,
|
|
create_by,
|
|
update_time,
|
|
update_by,
|
|
del_flag
|
|
from sys_oa_warehouse
|
|
|
|
${ew.getCustomSqlSegment}
|
|
</select>
|
|
<select id="selectListVoPage" resultType="com.ruoyi.oa.domain.vo.SysOaWarehouseVo">
|
|
select
|
|
sow.id,
|
|
sow.inventory,
|
|
sow.model,
|
|
sow.unit,
|
|
sow.name,
|
|
sow.brand,
|
|
sow.specifications,
|
|
sow.remark,
|
|
sow.create_time,
|
|
sow.create_by,
|
|
sow.update_time,
|
|
sow.update_by,
|
|
sow.del_flag,
|
|
sow.price,
|
|
sow.threshold,
|
|
(
|
|
select sum(sowt.task_inventory)
|
|
from sys_oa_warehouse_task sowt
|
|
left join sys_oa_warehouse_master sowm on sowm.master_id = sowt.master_id
|
|
where sowt.warehouse_id = sow.id
|
|
and sowm.type = 2
|
|
and sowm.status = 0
|
|
) as task_inventory
|
|
from sys_oa_warehouse sow
|
|
${ew.getCustomSqlSegment}
|
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|