| 
														
															@@ -554,7 +554,8 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	<select id="getOmInDetailList" resultType="org.jeecg.modules.report.entity.FabricMoOrderRK"> 
														 | 
														
														 | 
														
															 	<select id="getOmInDetailList" resultType="org.jeecg.modules.report.entity.FabricMoOrderRK"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		select a.cCode, 
														 | 
														
														 | 
														
															 		select a.cCode, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			 x.cInvCode as cInvCode,y.cInvName as cInvName,x.cFree1 as cColor,x.cBatch as cBatch, 
														 | 
														
														 | 
														
															 			 x.cInvCode as cInvCode,y.cInvName as cInvName,x.cFree1 as cColor,x.cBatch as cBatch, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			 isnull(x.iQuantity,0) as iQuantityIn,isnull(x.iProcessFee,0) as iProcessFee, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			 isnull(x.iQuantity,0) as iQuantityIn, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			 isnull(isnull((select  sum(n.iSum) from  PurBillVouchs  n where n.RdsId =x.autoid),x.iProcessFee),0) as iProcessFee, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			 isnull(x.iSumBillQuantity,0) as iSumBillQuantity,isnull(x.iSQuantity,0) as iSQuantity, 
														 | 
														
														 | 
														
															 			 isnull(x.iSumBillQuantity,0) as iSumBillQuantity,isnull(x.iSQuantity,0) as iSQuantity, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			 (select sum(isnull(iquantity,0)) as iQuantityOut from rdrecords11 d where d.iOMoDID=b.MODetailsID) as iQuantityOut 
														 | 
														
														 | 
														
															 			 (select sum(isnull(iquantity,0)) as iQuantityOut from rdrecords11 d where d.iOMoDID=b.MODetailsID) as iQuantityOut 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		FROM 
														 | 
														
														 | 
														
															 		FROM 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -623,12 +624,10 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		group by b.MODetailsID, 
														 | 
														
														 | 
														
															 		group by b.MODetailsID, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			 d.cInvCode,z.cInvName,d.cFree1,d.cBatch 
														 | 
														
														 | 
														
															 			 d.cInvCode,z.cInvName,d.cFree1,d.cBatch 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	</select> 
														 | 
														
														 | 
														
															 	</select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	<!-- 获取委外订单出库物料的入库物料信息:包含采购入库、委外入库、其他入库 --> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	<!-- 获取委外订单出库物料的入库物料信息:包含采购入库、委外入库 --> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	<select id="getOmRowInList" resultType="map"> 
														 | 
														
														 | 
														
															 	<select id="getOmRowInList" resultType="map"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		select * from ( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			select e.autoid,f.cBusType,f.cCode,g.cVenName,g.cVenAbbName, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			select f.cBusType,f.cCode,g.cVenName,g.cVenAbbName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
														
														 | 
														
															 			e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			e.iQuantity, 
														 | 
														
														 | 
														
															 			e.iQuantity, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			isnull((select sum(iSum) from PurBillVouchs  x where x.RdsId =e.autoid and f.cbustype='普通采购'),0) as iPurchuseMoney, 
														 | 
														
														 | 
														
															 			isnull((select sum(iSum) from PurBillVouchs  x where x.RdsId =e.autoid and f.cbustype='普通采购'),0) as iPurchuseMoney, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -650,38 +649,36 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					AND a.cCode like CONCAT(#{code},'%') 
														 | 
														
														 | 
														
															 					AND a.cCode like CONCAT(#{code},'%') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				) and e.iQuantity>0 
														 | 
														
														 | 
														
															 				) and e.iQuantity>0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		) union all( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			select e.autoid,f.cBusType,f.cCode,'' as cVenName,'' as cVenAbbName, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	</select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	<!-- 获取委外订单出库物料的入库物料信息:包含其他入库 --> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	<select id="getOmRowInList2" resultType="map"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		select f.cBusType,f.cCode,'' as cVenName,'' as cVenAbbName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
														
														 | 
														
															 			e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			e.iQuantity, 
														 | 
														
														 | 
														
															 			e.iQuantity, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			isnull(e.iPrice,0) as iPurchuseMoney, 
														 | 
														
														 | 
														
															 			isnull(e.iPrice,0) as iPurchuseMoney, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			null as MODetailsID 
														 | 
														
														 | 
														
															 			null as MODetailsID 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			from rdrecords08 e 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		from rdrecords08 e 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				inner join rdrecord08 f on e.id=f.id 
														 | 
														
														 | 
														
															 				inner join rdrecord08 f on e.id=f.id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				where e.cinvcode+isnull(e.cfree1,'')+isnull(cbatch,'') in ( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		where e.cinvcode+isnull(e.cfree1,'')+isnull(cbatch,'') in ( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					select 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-						 d.cInvCode+isnull(d.cFree1,'')+isnull(d.cBatch,'') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					FROM 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					om_momain a 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					INNER JOIN OM_MODetails b ON a.moid = b.moid 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					INNER JOIN Inventory c ON b.cinvcode = c.cinvcode 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					inner join rdrecords11 d on d.iOMoDID=b.MODetailsID 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					WHERE 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					f.cbustype='其他入库' 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					and c.cInvCCode NOT LIKE '19%' 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					AND a.cCode like CONCAT(#{code},'%') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			select 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				 d.cInvCode+isnull(d.cFree1,'')+isnull(d.cBatch,'') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			FROM 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			om_momain a 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			INNER JOIN OM_MODetails b ON a.moid = b.moid 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			INNER JOIN Inventory c ON b.cinvcode = c.cinvcode 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			inner join rdrecords11 d on d.iOMoDID=b.MODetailsID 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			WHERE 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			f.cbustype='其他入库' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			and c.cInvCCode NOT LIKE '19%' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			AND a.cCode like CONCAT(#{code},'%') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				)  and e.iQuantity>0 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		) as t1 order by autoid desc 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		)  and e.iQuantity>0 order by e.autoid desc 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	</select> 
														 | 
														
														 | 
														
															 	</select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	<!-- 根据形态转换物料获取采购入库、其他入库信息 --> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	<!-- 根据形态转换物料获取采购入库 --> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	<select id="getOmRowInListWithAV" resultType="map"> 
														 | 
														
														 | 
														
															 	<select id="getOmRowInListWithAV" resultType="map"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	select * from ( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	select e.autoid,f.cBusType,f.cCode,g.cVenName,g.cVenAbbName, 
														 | 
														
														 | 
														
															 	select e.autoid,f.cBusType,f.cCode,g.cVenName,g.cVenAbbName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
														
														 | 
														
															 		e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		e.iQuantity, 
														 | 
														
														 | 
														
															 		e.iQuantity, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -722,8 +719,10 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		) 
														 | 
														
														 | 
														
															 		) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		and e.iQuantity>0 
														 | 
														
														 | 
														
															 		and e.iQuantity>0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	) union all( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		select e.autoid,f.cBusType,f.cCode,'' as cVenName,'' as cVenAbbName, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	</select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	<!-- 根据形态转换物料获取其他入库信息 --> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	<select id="getOmRowInListWithAV2" resultType="map"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	select e.autoid,f.cBusType,f.cCode,'' as cVenName,'' as cVenAbbName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
														
														 | 
														
															 		e.cInvCode,isnull(e.cFree1,'') as cColor,isnull(e.cBatch,'') as cBatch, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		e.iQuantity, 
														 | 
														
														 | 
														
															 		e.iQuantity, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		isnull(e.iPrice,0) as iPurchuseMoney, 
														 | 
														
														 | 
														
															 		isnull(e.iPrice,0) as iPurchuseMoney, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -759,8 +758,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				) 
														 | 
														
														 | 
														
															 				) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		) 
														 | 
														
														 | 
														
															 		) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		and e.iQuantity>0 and f.cbustype in ('其他入库','转换入库') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	)) as t1 order by autoid desc 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		and e.iQuantity>0 and f.cbustype in ('其他入库','转换入库') order by e.autoid desc 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	</select> 
														 | 
														
														 | 
														
															 	</select> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	<!-- 获取销售订单附件 --> 
														 | 
														
														 | 
														
															 	<!-- 获取销售订单附件 --> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	<select id="getSoAccList" resultType="org.jeecg.modules.report.entity.AccessorItem"> 
														 | 
														
														 | 
														
															 	<select id="getSoAccList" resultType="org.jeecg.modules.report.entity.AccessorItem"> 
														 |