|
|
@ -96,7 +96,7 @@ public class IoStatDayServiceImpl implements IoStatDayService {
|
|
|
|
ew.eq("month", twoDay.monthBaseOne());
|
|
|
|
ew.eq("month", twoDay.monthBaseOne());
|
|
|
|
ew.eq("day", twoDay.dayOfMonth());
|
|
|
|
ew.eq("day", twoDay.dayOfMonth());
|
|
|
|
List<IoStatDayEntity> ioStatDayEntityList=statDayDao.selectList(ew);
|
|
|
|
List<IoStatDayEntity> ioStatDayEntityList=statDayDao.selectList(ew);
|
|
|
|
List<IoStatDayEntity> newOrOldDate=getNewOrOldDate(dataList,ioStatDayEntityList);
|
|
|
|
List<IoStatDayEntity> newOrOldDate=getNewOrOldDate(dataList,ioStatDayEntityList,yesterday);
|
|
|
|
dataList.addAll(newOrOldDate);
|
|
|
|
dataList.addAll(newOrOldDate);
|
|
|
|
//插入汇总记录
|
|
|
|
//插入汇总记录
|
|
|
|
saveData(yesterday, dataList);
|
|
|
|
saveData(yesterday, dataList);
|
|
|
@ -239,7 +239,7 @@ public class IoStatDayServiceImpl implements IoStatDayService {
|
|
|
|
return wrapper;
|
|
|
|
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()
|
|
|
|
List<IoStatDayEntity> IoStatDayEntityList = oldIoStatDayEntity.stream()
|
|
|
@ -252,10 +252,12 @@ public class IoStatDayServiceImpl implements IoStatDayService {
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
for (IoStatDayEntity ioStatDayEntity : IoStatDayEntityList) {
|
|
|
|
for (IoStatDayEntity ioStatDayEntity : IoStatDayEntityList) {
|
|
|
|
|
|
|
|
DateTime twoDay = DateUtil.offsetDay(new Date(), -2);
|
|
|
|
ioStatDayEntity.setId(null);
|
|
|
|
ioStatDayEntity.setId(null);
|
|
|
|
ioStatDayEntity.setBeginCount(ioStatDayEntity.getBalanceCount());
|
|
|
|
ioStatDayEntity.setBeginCount(ioStatDayEntity.getBalanceCount());
|
|
|
|
ioStatDayEntity.setBalanceAmount(ioStatDayEntity.getBalanceAmount());
|
|
|
|
ioStatDayEntity.setBalanceAmount(ioStatDayEntity.getBalanceAmount());
|
|
|
|
ioStatDayEntity.setBeginPrice(ioStatDayEntity.getBalancePrice());
|
|
|
|
ioStatDayEntity.setBeginPrice(ioStatDayEntity.getBalancePrice());
|
|
|
|
|
|
|
|
ioStatDayEntity.setDay(yesterday.dayOfMonth());
|
|
|
|
ioStatDayEntity.setInCount(0);
|
|
|
|
ioStatDayEntity.setInCount(0);
|
|
|
|
ioStatDayEntity.setOutCount(0);
|
|
|
|
ioStatDayEntity.setOutCount(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|