| 
					
				 | 
			
			
				@@ -342,44 +342,44 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 获取形态转换物料的原始入库单 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="getAssemVouchsOrgInList" resultType="org.jeecg.modules.report.entity.FabricAssemVouchsOrgIn"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		select  'rdrecords01' as cTableName,b.AutoId,a.cBusType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		b.cInvCode+isnull(b.cFree1,'')+isnull(b.cBatch,'') as cInvIdBefore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		c.cInvCode2+c.cColor2+c.cAVBatch2 as cInvIdAfter,c.iAVQuantity/c.iAVQuantity2 as iRate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		from VIEW_FabricLoss_AssemVouchs c,rdrecords01 b,rdrecord01 a,Vendor d, VendorClass e 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		where a.id=b.id and d.cVenCode=a.cVenCode and d.cVCCode =e.cVCCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and c.cinvcode+ccolor+cavbatch=b.cinvcode +isnull(b.cFree1,'')+isnull(b.cBatch,'') and b.iQuantity <> 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and c.cInvCode2+c.cColor2+c.cAVBatch2 in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<foreach  item="item" collection="invIdList" index="index"  open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		) union all ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		select  'rdrecords08' as cTableName,b.AutoId,a.cBusType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		b.cInvCode+isnull(b.cFree1,'')+isnull(b.cBatch,'') as cInvIdBefore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		c.cInvCode2+c.cColor2+c.cAVBatch2 as cInvIdAfter,c.iAVQuantity/c.iAVQuantity2 as iRate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		from VIEW_FabricLoss_AssemVouchs c,rdrecords08 b,rdrecord08 a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		where a.id=b.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and c.cinvcode+ccolor+cavbatch=b.cinvcode +isnull(b.cFree1,'')+isnull(b.cBatch,'') and a.cbustype= '其他入库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and b.iQuantity <> 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and c.cInvCode2+c.cColor2+c.cAVBatch2 in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<foreach  item="item" collection="invIdList" index="index"  open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		) union all ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		select  'rdrecords08' as cTableName,b.AutoId,a.cBusType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		b.cInvCode+isnull(b.cFree1,'')+isnull(b.cBatch,'') as cInvIdBefore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		c.cInvCode2+c.cColor2+c.cAVBatch2 as cInvIdAfter,c.iAVQuantity/c.iAVQuantity2 as iRate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		from VIEW_FabricLoss_AssemVouchs c,rdrecords08 b,rdrecord08 a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		where a.id=b.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and c.cinvcode+ccolor+cavbatch=b.cinvcode +isnull(b.cFree1,'')+isnull(b.cBatch,'') and a.cbustype = '转换入库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and b.iQuantity <> 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		and c.cInvCode2+c.cColor2+c.cAVBatch2 in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<foreach  item="item" collection="invIdList" index="index"  open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		select * from ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			select 'rdrecords01' as cTableName,b.AutoId,a.cBusType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			b.cInvCode+isnull(b.cFree1,'')+isnull(b.cBatch,'') as cInvIdBefore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			c.cInvCode2+c.cColor2+c.cAVBatch2 as cInvIdAfter,c.iAVQuantity/c.iAVQuantity2 as iRate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			from VIEW_FabricLoss_AssemVouchs c,rdrecords01 b,rdrecord01 a,Vendor d, VendorClass e 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			where a.id=b.id and d.cVenCode=a.cVenCode and d.cVCCode =e.cVCCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and c.cinvcode+ccolor+cavbatch=b.cinvcode +isnull(b.cFree1,'')+isnull(b.cBatch,'') and b.iQuantity <> 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and c.cInvCode2+c.cColor2+c.cAVBatch2 in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<foreach item="item" collection="invIdList" index="index" open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			) union all ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			select 'rdrecords08' as cTableName,b.AutoId,a.cBusType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			b.cInvCode+isnull(b.cFree1,'')+isnull(b.cBatch,'') as cInvIdBefore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			c.cInvCode2+c.cColor2+c.cAVBatch2 as cInvIdAfter,c.iAVQuantity/c.iAVQuantity2 as iRate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			from VIEW_FabricLoss_AssemVouchs c,rdrecords08 b,rdrecord08 a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			where a.id=b.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and c.cinvcode+ccolor+cavbatch=b.cinvcode +isnull(b.cFree1,'')+isnull(b.cBatch,'') and a.cbustype= '其他入库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and b.iQuantity <> 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and c.cInvCode2+c.cColor2+c.cAVBatch2 in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<foreach item="item" collection="invIdList" index="index" open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			) union all ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			select 'rdrecords08' as cTableName,b.AutoId,a.cBusType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			b.cInvCode+isnull(b.cFree1,'')+isnull(b.cBatch,'') as cInvIdBefore, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			c.cInvCode2+c.cColor2+c.cAVBatch2 as cInvIdAfter,c.iAVQuantity/c.iAVQuantity2 as iRate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			from VIEW_FabricLoss_AssemVouchs c,rdrecords08 b,rdrecord08 a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			where a.id=b.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and c.cinvcode+ccolor+cavbatch=b.cinvcode +isnull(b.cFree1,'')+isnull(b.cBatch,'') and a.cbustype = '转换入库' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and b.iQuantity <> 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			and c.cInvCode2+c.cColor2+c.cAVBatch2 in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<foreach item="item" collection="invIdList" index="index" open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				#{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		) as t1 order by ctablename,autoid,cbustype,cinvidbefore 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 根据入库单子表id获取采购入库价格 --> 
			 |