|
@@ -126,7 +126,8 @@
|
|
e.NAME AS materialName,
|
|
e.NAME AS materialName,
|
|
e.CODE AS materialCode,
|
|
e.CODE AS materialCode,
|
|
b.ask_goods_code,
|
|
b.ask_goods_code,
|
|
- b.company_number
|
|
|
|
|
|
+ b.company_number,
|
|
|
|
+ b.sqrq
|
|
FROM
|
|
FROM
|
|
tld_ask_goods a
|
|
tld_ask_goods a
|
|
JOIN tld_ask_goods_f b ON a.ask_goods_id = b.ask_goods_id
|
|
JOIN tld_ask_goods_f b ON a.ask_goods_id = b.ask_goods_id
|
|
@@ -134,7 +135,7 @@
|
|
JOIN tld_material e ON a.material_id = e.tld_id
|
|
JOIN tld_material e ON a.material_id = e.tld_id
|
|
WHERE e.part_type != '半成品' and e.part_type != '产成品'
|
|
WHERE e.part_type != '半成品' and e.part_type != '产成品'
|
|
<if test="askGoodsId != null and askGoodsId != ''">
|
|
<if test="askGoodsId != null and askGoodsId != ''">
|
|
- and a.ask_goods_id = #{askGoodsId}
|
|
|
|
|
|
+ and b.ask_goods_code = #{askGoodsId}
|
|
</if>
|
|
</if>
|
|
<if test="materialCode != null and materialCode != ''">
|
|
<if test="materialCode != null and materialCode != ''">
|
|
and e.code like CONCAT(CONCAT('%', #{materialCode}), '%')
|
|
and e.code like CONCAT(CONCAT('%', #{materialCode}), '%')
|
|
@@ -193,7 +194,8 @@
|
|
e.NAME AS materialName,
|
|
e.NAME AS materialName,
|
|
e.CODE AS materialCode,
|
|
e.CODE AS materialCode,
|
|
b.ask_goods_code,
|
|
b.ask_goods_code,
|
|
- b.company_number
|
|
|
|
|
|
+ b.company_number,
|
|
|
|
+ b.sqrq
|
|
FROM
|
|
FROM
|
|
tld_invite a
|
|
tld_invite a
|
|
JOIN tld_invite_f b ON a.ask_goods_id = b.ask_goods_id
|
|
JOIN tld_invite_f b ON a.ask_goods_id = b.ask_goods_id
|
|
@@ -201,7 +203,7 @@
|
|
JOIN tld_material e ON a.material_id = e.tld_id
|
|
JOIN tld_material e ON a.material_id = e.tld_id
|
|
WHERE e.part_type != '半成品' and e.part_type != '产成品'
|
|
WHERE e.part_type != '半成品' and e.part_type != '产成品'
|
|
<if test="askGoodsId != null and askGoodsId != ''">
|
|
<if test="askGoodsId != null and askGoodsId != ''">
|
|
- and a.ask_goods_id = #{askGoodsId}
|
|
|
|
|
|
+ and b.ask_goods_code = #{askGoodsId}
|
|
</if>
|
|
</if>
|
|
<if test="materialCode != null and materialCode != ''">
|
|
<if test="materialCode != null and materialCode != ''">
|
|
and e.code like CONCAT(CONCAT('%', #{materialCode}), '%')
|
|
and e.code like CONCAT(CONCAT('%', #{materialCode}), '%')
|
|
@@ -336,13 +338,13 @@
|
|
b.warehouse_transfer_type,
|
|
b.warehouse_transfer_type,
|
|
c.name as materialName,
|
|
c.name as materialName,
|
|
c.code as materialCode,
|
|
c.code as materialCode,
|
|
- f.name as askGoodsWarehouseaName,
|
|
|
|
|
|
+ f.name as askGoodsWarehouseName,
|
|
e.name as supplyWarehouseName
|
|
e.name as supplyWarehouseName
|
|
from tld_warehouse_transfer a
|
|
from tld_warehouse_transfer a
|
|
join tld_warehouse_transfer_f b on a.warehouse_transfer_id = b.warehouse_transfer_id
|
|
join tld_warehouse_transfer_f b on a.warehouse_transfer_id = b.warehouse_transfer_id
|
|
join tld_material c on a.material_id = c.tld_id
|
|
join tld_material c on a.material_id = c.tld_id
|
|
join tld_warehouse e on a.supply_warehouse_id = e.tld_id
|
|
join tld_warehouse e on a.supply_warehouse_id = e.tld_id
|
|
- join tld_warehouse f on a.ask_goods_warehouse_id = f.tld_id
|
|
|
|
|
|
+ join tld_warehouse f on b.ask_goods_warehouse_id = f.tld_id
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
<if test="type != null and type != ''">
|
|
<if test="type != null and type != ''">
|
|
and a.type = #{type}
|
|
and a.type = #{type}
|
|
@@ -353,6 +355,9 @@
|
|
<if test="materialName != null and materialName != ''">
|
|
<if test="materialName != null and materialName != ''">
|
|
and c.name like CONCAT(CONCAT('%', #{materialName}), '%')
|
|
and c.name like CONCAT(CONCAT('%', #{materialName}), '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="warehouseTransferCode != null and warehouseTransferCode != ''">
|
|
|
|
+ and b.warehouse_transfer_code like CONCAT(CONCAT('%', #{warehouseTransferCode}), '%')
|
|
|
|
+ </if>
|
|
<if test="startTime != null and startTime != ''">
|
|
<if test="startTime != null and startTime != ''">
|
|
and a.document_time <![CDATA[>=]]> #{startTime}
|
|
and a.document_time <![CDATA[>=]]> #{startTime}
|
|
</if>
|
|
</if>
|
|
@@ -377,12 +382,17 @@
|
|
f.name as askGoodsWarehouseaName,
|
|
f.name as askGoodsWarehouseaName,
|
|
e.name as supplyWarehouseName,
|
|
e.name as supplyWarehouseName,
|
|
b.document_time,
|
|
b.document_time,
|
|
- a.type
|
|
|
|
|
|
+ case
|
|
|
|
+ when a.type = '0' then
|
|
|
|
+ '未移库'
|
|
|
|
+ when a.type = '1' then
|
|
|
|
+ '已移库'
|
|
|
|
+ end as type
|
|
from tld_warehouse_transfer a
|
|
from tld_warehouse_transfer a
|
|
join tld_warehouse_transfer_f b on a.warehouse_transfer_id = b.warehouse_transfer_id
|
|
join tld_warehouse_transfer_f b on a.warehouse_transfer_id = b.warehouse_transfer_id
|
|
join tld_material c on a.material_id = c.tld_id
|
|
join tld_material c on a.material_id = c.tld_id
|
|
join tld_warehouse e on a.supply_warehouse_id = e.tld_id
|
|
join tld_warehouse e on a.supply_warehouse_id = e.tld_id
|
|
- join tld_warehouse f on a.ask_goods_warehouse_id = f.tld_id
|
|
|
|
|
|
+ join tld_warehouse f on b.ask_goods_warehouse_id = f.tld_id
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
<trim prefix="WHERE" prefixOverrides="and |or">
|
|
<if test="type != null and type != ''">
|
|
<if test="type != null and type != ''">
|
|
and a.type = #{type}
|
|
and a.type = #{type}
|