select t1.RFIDnum,t1.barcode,t3.ProductBarcode ,t1.state,t1.UpdateTime from dbo.T_RP_WorkTrayRealTimeInfo t1 left join T_BD_SubStation t2 on t1.currentStation=t2.StationID left join dbo.T_RP_BarcodeRelationShip t3 on t1.SemiBarcode=t3.SemiBarcode_Line where UsedFlag='1'
select t1.RFIDnum,t1.barcode,t3.ProductBarcode ,t1.state,t1.UpdateTime from dbo.T_RP_WorkTrayRealTimeInfo t1 left join T_BD_SubStation t2 on t1.currentStation=t2.StationID left join dbo.T_RP_BarcodeRelationShip t3 on t1.SemiBarcode=t3.SemiBarcode_Line
<where>
<iftest="StationCode != '' "> and t2.StationID = #{StationCode}</if>
<iftest="rfidNum != '' "> and t1.RFIDnum = #{rfidNum}</if>