|
@@ -137,28 +137,28 @@
|
|
|
GROUP BY
|
|
|
a.storage_location_code,
|
|
|
a.material_id,
|
|
|
- a.wbs ,
|
|
|
+ a.wbs,
|
|
|
a.account_sleeve
|
|
|
</select>
|
|
|
<!-- 查询库位信息 -->
|
|
|
<select id="getQueryInventory" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
- a.storage_location_code as storageLocationCode,
|
|
|
- a.material_id as materialId,
|
|
|
- a.amount AS sum,
|
|
|
- a.serial,
|
|
|
- a.produc_batch as producBatch,
|
|
|
- a.supplier_id as supplierId,
|
|
|
- b.storage_location_name as storageLocationName ,
|
|
|
- b.warehouse_where as warehouseWhere,
|
|
|
- b.storage_location_type as storageLocationType,
|
|
|
- b.storage_location_capacity as storageLocationCapacity,
|
|
|
- b.is_not_disable as isNotDisable,
|
|
|
- b.create_time as createTime,
|
|
|
- b.is_product as isProduct,
|
|
|
- c.name as name,
|
|
|
- c.code as code,
|
|
|
- e.name as supplierName
|
|
|
+ a.storage_location_code as storageLocationCode,
|
|
|
+ a.material_id as materialId,
|
|
|
+ a.amount AS sum,
|
|
|
+ a.serial,
|
|
|
+ a.produc_batch as producBatch,
|
|
|
+ a.supplier_id as supplierId,
|
|
|
+ b.storage_location_name as storageLocationName ,
|
|
|
+ b.warehouse_where as warehouseWhere,
|
|
|
+ b.storage_location_type as storageLocationType,
|
|
|
+ b.storage_location_capacity as storageLocationCapacity,
|
|
|
+ b.is_not_disable as isNotDisable,
|
|
|
+ b.create_time as createTime,
|
|
|
+ b.is_product as isProduct,
|
|
|
+ c.name as name,
|
|
|
+ c.code as code,
|
|
|
+ e.name as supplierName
|
|
|
FROM
|
|
|
tld_inventory a
|
|
|
LEFT JOIN tld_storage_location b ON a.storage_location_code = b.storage_location_code
|
|
@@ -176,16 +176,23 @@
|
|
|
<!--导出-->
|
|
|
<select id="getStorageLocation" resultType="java.util.LinkedHashMap">
|
|
|
SELECT
|
|
|
- c.code as code,
|
|
|
- c.name as name,
|
|
|
- sum( a.amount ) AS sum,
|
|
|
- b.storage_location_name as storageLocationName ,
|
|
|
- p.name as companyName,
|
|
|
- e.name as supplierName,
|
|
|
- a.wbs as wbs,
|
|
|
- f.name as warehouseName,
|
|
|
- FROM
|
|
|
- tld_inventory a
|
|
|
+ YEAR(CURDATE()) AS year,
|
|
|
+ MONTH(CURDATE()) AS month,
|
|
|
+ f.code as warehouseCode,
|
|
|
+ f.name as warehouseName,
|
|
|
+ b.storage_location_name as storageLocationName,
|
|
|
+ c.code as code,
|
|
|
+ c.name as name,
|
|
|
+ c.unit_of_measurement,
|
|
|
+ sum( a.amount ) AS sum,
|
|
|
+ a.wbs as wbs,
|
|
|
+ c.max_num,
|
|
|
+ DATEDIFF(now(),scrq),
|
|
|
+ c.part_type,
|
|
|
+ c.wllb_class,
|
|
|
+ p.code as companyCode,
|
|
|
+ p.name as companyName
|
|
|
+ FROM tld_inventory a
|
|
|
LEFT JOIN tld_storage_location b ON a.storage_location_code = b.storage_location_code
|
|
|
LEFT JOIN tld_material c ON a.material_id = c.tld_id
|
|
|
LEFT JOIN tld_customer e ON a.supplier_id = e.code
|
|
@@ -222,7 +229,9 @@
|
|
|
</trim>
|
|
|
GROUP BY
|
|
|
a.storage_location_code,
|
|
|
- a.material_id
|
|
|
+ a.material_id,
|
|
|
+ a.wbs,
|
|
|
+ a.account_sleeve
|
|
|
</select>
|
|
|
<!-- 查询接入信息 -->
|
|
|
<select id="getAccess" resultType="com.tld.model.Access">
|
|
@@ -926,13 +935,5 @@
|
|
|
</trim>
|
|
|
ORDER BY a.scrq DESC
|
|
|
</select>
|
|
|
- <!--查询库存数量-->
|
|
|
- <select id="getAmount" resultType="java.lang.String">
|
|
|
- select ifnull(sum(amount),'0') as amount from tld_inventory where wbs = #{wbs} and account_sleeve = #{companyNumber} and wllb_code = #{materialCode}
|
|
|
- </select>
|
|
|
- <!--查询库存数量-->
|
|
|
- <select id="getAmounts" resultType="java.lang.String">
|
|
|
- select ifnull(sum(amount),'0') as amount from tld_inventory where wbs = #{wbs} and account_sleeve = #{companyNumber} and wllb_code = #{materialCode}
|
|
|
- </select>
|
|
|
|
|
|
</mapper>
|