|
|
|
@ -9,8 +9,9 @@ |
|
|
|
A.site, |
|
|
|
A.WarehouseID Warehouse_ID, |
|
|
|
A.TransType Trans_Type, |
|
|
|
A.UserName User_Name, |
|
|
|
dbo.eam_Get_eamAdminName_TPM(A.site,A.UserName) as userName, |
|
|
|
A.TransDate Trans_Date, |
|
|
|
dbo.eam_Get_eamAdminName_TPM(A.site,A.remark3) as remark3, |
|
|
|
B.PartNo Part_No, |
|
|
|
B.LocationID Location_ID, |
|
|
|
B.TransQty Trans_Qty, |
|
|
|
@ -31,9 +32,8 @@ |
|
|
|
left join part_spare C on A.site = C.site and a.bu_no = c.bu_no and C.part_no = B.PartNo |
|
|
|
LEFT JOIN view_custdev_mes_vendor vcmv on vcmv.supplier_id = A.PartnerID |
|
|
|
<where> |
|
|
|
A.site in (select site from eam_access_site where username = #{query.username}) |
|
|
|
and (A.site + '-' + A.bu_no) in (select * from dbo.query_bu(#{query.username})) |
|
|
|
and B.BatchNo is not null |
|
|
|
A.site in (select site from eam_access_site ) |
|
|
|
AND B.BatchNo is not null |
|
|
|
<if test="query.buDesc != null and query.buDesc != ''"> |
|
|
|
AND dbo.get_bu_desc (a.site, a.bu_no) = #{query.buDesc} |
|
|
|
</if> |
|
|
|
@ -43,6 +43,9 @@ |
|
|
|
<if test="query.partNo != null and query.partNo != ''"> |
|
|
|
and B.PartNo like '%'+#{query.partNo}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.partDescription != null and query.partDescription != ''"> |
|
|
|
AND C.part_description LIKE '%'+ #{query.partDescription}+ '%' |
|
|
|
</if> |
|
|
|
<if test="query.batchNo != null and query.batchNo != ''"> |
|
|
|
and B.BatchNo like '%' + #{query.batchNo}+ '%' |
|
|
|
</if> |
|
|
|
@ -58,18 +61,16 @@ |
|
|
|
<if test="query.endTransDate != null and query.endTransDate!= '' "> |
|
|
|
and A.TransDate <![CDATA[<=]]> #{query.endTransDate} |
|
|
|
</if> |
|
|
|
<if test="query.userName != null and query.userName !='' "> |
|
|
|
and A.UserName like '%'+#{query.userName}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.supplierName != null and query.supplierName != ''"> |
|
|
|
and vcmv.supplier_name like '%'+#{query.supplierName}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.orderRef1 != null and query.orderRef1 != ''"> |
|
|
|
and A.orderRef1 like '$'+#{query.orderRef1}+'%' |
|
|
|
and A.orderRef1 like '%'+#{query.orderRef1}+'%' |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order By A.TransNo, B.ItemNo, A.TransDate desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getaveragePriceFlagList" resultType="com.xujie.sys.modules.pms.data.EamAdminData"> |
|
|
|
select username AS adminID from sys_user a |
|
|
|
left join sys_user_role b on a.user_id = b.user_id |
|
|
|
|