|  |  |  | @ -96,7 +96,7 @@ public class IoStatDayServiceImpl implements IoStatDayService { | 
			
		
	
		
			
				
					|  |  |  |  |             ew.eq("month", twoDay.monthBaseOne()); | 
			
		
	
		
			
				
					|  |  |  |  |             ew.eq("day", twoDay.dayOfMonth()); | 
			
		
	
		
			
				
					|  |  |  |  |             List<IoStatDayEntity> ioStatDayEntityList=statDayDao.selectList(ew); | 
			
		
	
		
			
				
					|  |  |  |  |             List<IoStatDayEntity> newOrOldDate=getNewOrOldDate(dataList,ioStatDayEntityList); | 
			
		
	
		
			
				
					|  |  |  |  |             List<IoStatDayEntity> newOrOldDate=getNewOrOldDate(dataList,ioStatDayEntityList,yesterday); | 
			
		
	
		
			
				
					|  |  |  |  |             dataList.addAll(newOrOldDate); | 
			
		
	
		
			
				
					|  |  |  |  |             //插入汇总记录
 | 
			
		
	
		
			
				
					|  |  |  |  |             saveData(yesterday, dataList); | 
			
		
	
	
		
			
				
					|  |  |  | @ -229,7 +229,7 @@ public class IoStatDayServiceImpl implements IoStatDayService { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private static QueryWrapper<IoStatDayEntity> buildQueryWrapper(IoOrderDetailResultEntity orderDetailResultEntity, DateTime yesterday) { | 
			
		
	
		
			
				
					|  |  |  |  |         QueryWrapper<IoStatDayEntity> wrapper = new QueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         DateTime dateTime = DateUtil.offsetDay(yesterday, -1); //取前天的时间
 | 
			
		
	
		
			
				
					|  |  |  |  |         DateTime dateTime =DateUtil.offsetDay(yesterday, -1); //取前天的时间
 | 
			
		
	
		
			
				
					|  |  |  |  |         wrapper.eq("year", dateTime.year()) | 
			
		
	
		
			
				
					|  |  |  |  |                 .eq("month", dateTime.monthBaseOne()) | 
			
		
	
		
			
				
					|  |  |  |  |                 .eq("day", dateTime.dayOfMonth()) //取前天的数据
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -239,7 +239,7 @@ public class IoStatDayServiceImpl implements IoStatDayService { | 
			
		
	
		
			
				
					|  |  |  |  |         return wrapper; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private List<IoStatDayEntity> getNewOrOldDate(List<IoStatDayEntity> newIoStatDayEntity, List<IoStatDayEntity> oldIoStatDayEntity){ | 
			
		
	
		
			
				
					|  |  |  |  |     private List<IoStatDayEntity> getNewOrOldDate(List<IoStatDayEntity> newIoStatDayEntity, List<IoStatDayEntity> oldIoStatDayEntity,DateTime yesterday){ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         // 计算出两个集合之间产品批次号组成的差异
 | 
			
		
	
		
			
				
					|  |  |  |  |         List<IoStatDayEntity> IoStatDayEntityList = oldIoStatDayEntity.stream() | 
			
		
	
	
		
			
				
					|  |  |  | @ -252,10 +252,12 @@ public class IoStatDayServiceImpl implements IoStatDayService { | 
			
		
	
		
			
				
					|  |  |  |  |                 }).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         for (IoStatDayEntity ioStatDayEntity : IoStatDayEntityList) { | 
			
		
	
		
			
				
					|  |  |  |  |             DateTime twoDay = DateUtil.offsetDay(new Date(), -2); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setId(null); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setBeginCount(ioStatDayEntity.getBalanceCount()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setBalanceAmount(ioStatDayEntity.getBalanceAmount()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setBeginPrice(ioStatDayEntity.getBalancePrice()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setDay(yesterday.dayOfMonth()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setInCount(0); | 
			
		
	
		
			
				
					|  |  |  |  |             ioStatDayEntity.setOutCount(0); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |