فهرست منبع

面料损耗更新

fenghaifu 2 سال پیش
والد
کامیت
eb41237172

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml

@@ -184,7 +184,7 @@
 		(
 		select cInvCode,isnull(cFree1,'') as cColor,comcode as cCode,isnull(iSQuantity,iquantity) as iQuantity,iUnitCost as iPrice
 		from rdrecords11 where
-		trim(comcode) not like CONCAT(#{code},'%') and comcode not like '%样%'
+		trim(comcode) not like CONCAT(#{code},'%')
 		and (cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
 			select b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') from RdRecords01 b
 			inner join PO_Podetails  c on b.iposid=c.id

+ 7 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java

@@ -1781,6 +1781,13 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 				}
 			}
 		}
+		// 入排序
+		Collections.sort(allInList, new Comparator<FabricPoOrderIn>() {
+			@Override
+			public int compare(FabricPoOrderIn o1, FabricPoOrderIn o2) {
+				return (int)((o1.getIPrice() == null ?0 : o1.getIPrice())-(o2.getIPrice() == null ?0 : o2.getIPrice()));
+			}
+		});
 		// 转入数量有负数的,从正数扣除
 		List<FabricPoOrderIn> nList = allInList.stream().filter(e->e.getIQuantity()<0).collect(Collectors.toList());// 负数
 		allInList = allInList.stream().filter(e->e.getIQuantity()>=0).collect(Collectors.toList());// 正数