|
@@ -220,7 +220,8 @@
|
|
|
g.storage_location_name as storageLocationName,
|
|
|
a.scrq,
|
|
|
a.storage_code,
|
|
|
- a.wbs
|
|
|
+ a.wbs,
|
|
|
+ c.real_name as realName
|
|
|
from tld_storage a
|
|
|
left join tld_material b on a.wllb_code = b.code
|
|
|
left join tld_user c on a.user_id = c.id
|
|
@@ -240,6 +241,9 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
|
|
|
</if>
|
|
|
+ <if test="realName != null and realName != ''">
|
|
|
+ and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
|
|
|
+ </if>
|
|
|
<if test="storageLocationName != null and storageLocationName != ''">
|
|
|
and g.storage_location_name like CONCAT(CONCAT('%', #{storageLocationName}), '%')
|
|
|
</if>
|
|
@@ -298,7 +302,8 @@
|
|
|
g.storage_location_name as storageLocationName,
|
|
|
a.scrq,
|
|
|
a.storage_code,
|
|
|
- a.wbs
|
|
|
+ a.wbs,
|
|
|
+ c.real_name as realName
|
|
|
from tld_storage a
|
|
|
left join tld_material b on a.wllb_code = b.code
|
|
|
left join tld_user c on a.user_id = c.id
|
|
@@ -318,6 +323,9 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
|
|
|
</if>
|
|
|
+ <if test="realName != null and realName != ''">
|
|
|
+ and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
|
|
|
+ </if>
|
|
|
<if test="storageLocationName != null and storageLocationName != ''">
|
|
|
and g.storage_location_name like CONCAT(CONCAT('%', #{storageLocationName}), '%')
|
|
|
</if>
|
|
@@ -544,7 +552,9 @@
|
|
|
b.code as materialCode,
|
|
|
a.storage_code,
|
|
|
a.wbs,
|
|
|
- a.production_code
|
|
|
+ a.production_code,
|
|
|
+ c.real_name as realName,
|
|
|
+ a.production_code as productionCode
|
|
|
from tld_half_product a
|
|
|
left join tld_material b on a.wllb_code = b.code
|
|
|
left join tld_user c on a.user_id = c.id
|
|
@@ -567,6 +577,12 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
|
|
|
</if>
|
|
|
+ <if test="realName != null and realName != ''">
|
|
|
+ and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="productionCode != null and productionCode != ''">
|
|
|
+ and a.production_code like CONCAT(CONCAT('%', #{productionCode}), '%')
|
|
|
+ </if>
|
|
|
<if test="storageCode != null and storageCode != ''">
|
|
|
and a.storage_code like CONCAT(CONCAT('%', #{storageCode}), '%')
|
|
|
</if>
|
|
@@ -579,7 +595,7 @@
|
|
|
</trim>
|
|
|
order by a.scrq desc
|
|
|
</select>
|
|
|
- <!-- 查询半成品入库流水-->
|
|
|
+ <!-- 查询半成品入库流水导出-->
|
|
|
<select id="productExcel" resultType="java.util.LinkedHashMap">
|
|
|
select
|
|
|
b.name,
|
|
@@ -589,7 +605,9 @@
|
|
|
c.user_name,
|
|
|
a.scrq,
|
|
|
a.storage_code,
|
|
|
- a.wbs
|
|
|
+ a.wbs,
|
|
|
+ c.real_name as realName,
|
|
|
+ a.production_code as productionCode
|
|
|
from tld_half_product a
|
|
|
left join tld_material b on a.wllb_code = b.code
|
|
|
left join tld_user c on a.user_id = c.id
|
|
@@ -612,6 +630,12 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
|
|
|
</if>
|
|
|
+ <if test="realName != null and realName != ''">
|
|
|
+ and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
|
|
|
+ </if>
|
|
|
+ <if test="productionCode != null and productionCode != ''">
|
|
|
+ and a.production_code like CONCAT(CONCAT('%', #{productionCode}), '%')
|
|
|
+ </if>
|
|
|
<if test="storageCode != null and storageCode != ''">
|
|
|
and a.storage_code like CONCAT(CONCAT('%', #{storageCode}), '%')
|
|
|
</if>
|
|
@@ -748,7 +772,9 @@
|
|
|
c.user_name as userName,
|
|
|
b.code as materialCode,
|
|
|
a.storage_code,
|
|
|
- a.wbs
|
|
|
+ a.wbs,
|
|
|
+ c.real_name as realName,
|
|
|
+ a.production_code as productionCode
|
|
|
from tld_half a
|
|
|
left join tld_material b on a.wllb_code = b.code
|
|
|
left join tld_user c on a.user_id = c.id
|
|
@@ -769,6 +795,9 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
|
|
|
</if>
|
|
|
+ <if test="realName != null and realName != ''">
|
|
|
+ and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
|
|
|
+ </if>
|
|
|
<if test="attribute != null and attribute != ''">
|
|
|
and a.attribute like CONCAT(CONCAT('%', #{attribute}), '%')
|
|
|
</if>
|
|
@@ -789,16 +818,18 @@
|
|
|
select
|
|
|
b.name as materialName,
|
|
|
a.wllb_code,
|
|
|
- a.produc_batch,
|
|
|
+ if(a.produc_batch = '' , null , a.produc_batch) as producBatch,
|
|
|
a.capacity,
|
|
|
c.user_name as userName,
|
|
|
a.storage_location_code,
|
|
|
a.scrq,
|
|
|
a.serial,
|
|
|
- a.seq,
|
|
|
- a.attribute,
|
|
|
+ if(a.seq = '' , null , a.seq) as seq,
|
|
|
+ if(a.attribute = '' , null , a.attribute) as attribute,
|
|
|
a.storage_code,
|
|
|
- a.wbs
|
|
|
+ if(a.wbs = '' , null , a.wbs) as wbs,
|
|
|
+ c.real_name as realName,
|
|
|
+ a.production_code as productionCode
|
|
|
from tld_half a
|
|
|
left join tld_material b on a.wllb_code = b.code
|
|
|
left join tld_user c on a.user_id = c.id
|
|
@@ -818,6 +849,9 @@
|
|
|
<if test="userName != null and userName != ''">
|
|
|
and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
|
|
|
</if>
|
|
|
+ <if test="realName != null and realName != ''">
|
|
|
+ and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
|
|
|
+ </if>
|
|
|
<if test="attribute != null and attribute != ''">
|
|
|
and a.attribute like CONCAT(CONCAT('%', #{attribute}), '%')
|
|
|
</if>
|
|
@@ -827,9 +861,15 @@
|
|
|
<if test="wbs != null and wbs != ''">
|
|
|
and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
|
|
|
</if>
|
|
|
+ <if test="productionCode != null and productionCode != ''">
|
|
|
+ and a.production_code like CONCAT(CONCAT('%', #{productionCode}), '%')
|
|
|
+ </if>
|
|
|
<if test="storageLocationName != null and storageLocationName != ''">
|
|
|
and e.storage_location_name like CONCAT(CONCAT('%', #{storageLocationName}), '%')
|
|
|
</if>
|
|
|
+ <if test="productionCode != null and productionCode != ''">
|
|
|
+ and a.production_code like CONCAT(CONCAT('%', #{productionCode}), '%')
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
order by a.scrq desc
|
|
|
</select>
|
|
@@ -920,7 +960,7 @@
|
|
|
<insert id="addReturnWarehousingOther">
|
|
|
insert into tld_return_gs_other_warehousing(storage_code, account_sleeve, storage_location_code, wbs, amount,
|
|
|
material_id)
|
|
|
- value (#{storageCode},#{accountSleeve},#{storageLocationCode},#{wbs},#{amount},#{materialId})
|
|
|
+ value (#{storageCode},#{accountSleeve},#{storageLocationCode},#{wbs},#{num},#{materialId})
|
|
|
</insert>
|
|
|
<!-- 其他入库 -->
|
|
|
<insert id="addInventoryOther">
|