|
@@ -9,14 +9,33 @@
|
|
|
<!-- 查询货品信息 -->
|
|
|
<select id="getStorage" resultType="com.tld.model.Goods">
|
|
|
select
|
|
|
- <include refid="field"/>
|
|
|
- from tld_goods
|
|
|
+ a.id,
|
|
|
+ a.item_number,
|
|
|
+ a.type,
|
|
|
+ a.min_accommodate,
|
|
|
+ a.accommodate_num,
|
|
|
+ a.max_accommodate,
|
|
|
+ a.supplier,
|
|
|
+ a.storage_location,
|
|
|
+ a.input_type,
|
|
|
+ a.user_department,
|
|
|
+ a.low_reserves,
|
|
|
+ a.high_reserves,
|
|
|
+ a.grade,
|
|
|
+ a. packing_type,
|
|
|
+ a. unit,
|
|
|
+ a.name,
|
|
|
+ b.department_name as userDepartmentName,
|
|
|
+ c.storage_location_name as storageLocationName
|
|
|
+ from tld_goods a
|
|
|
+ left join tld_department b on a.user_department = b.id
|
|
|
+ left join tld_storage_location c on a.storage_location = c.id
|
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
|
<if test="itemNumber != null and itemNumber != ''">
|
|
|
- and item_number = #{itemNumber}
|
|
|
+ and a.item_number = #{itemNumber}
|
|
|
</if>
|
|
|
<if test="id != null and id != ''">
|
|
|
- and id = #{id}
|
|
|
+ and a.id = #{id}
|
|
|
</if>
|
|
|
</trim>
|
|
|
</select>
|
|
@@ -86,8 +105,24 @@
|
|
|
<!-- 导出数据查询 -->
|
|
|
<select id="export" resultType="java.util.LinkedHashMap">
|
|
|
select
|
|
|
- item_number,name,type,min_accommodate,accommodate_num,max_accommodate,supplier,storage_location,input_type,user_department,low_reserves,high_reserves,grade,packing_type,unit
|
|
|
- from tld_goods
|
|
|
+ a.item_number,
|
|
|
+ a.name,
|
|
|
+ a.type,
|
|
|
+ a.min_accommodate,
|
|
|
+ a.accommodate_num,
|
|
|
+ a.max_accommodate,
|
|
|
+ a.supplier,
|
|
|
+ c.storage_location_name,
|
|
|
+ a.input_type,
|
|
|
+ b.department_name,
|
|
|
+ a.low_reserves,
|
|
|
+ a.high_reserves,
|
|
|
+ a.grade,
|
|
|
+ a.packing_type,
|
|
|
+ a.unit
|
|
|
+ from tld_goods a
|
|
|
+ left join tld_department b on a.user_department = b.id
|
|
|
+ left join tld_storage_location c on a.storage_location = c.id
|
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
|
<if test="itemNumber != null and itemNumber != ''">
|
|
|
and item_number = #{itemNumber}
|