Subversion Repositories SmartDukaan

Rev

Rev 28563 | Rev 28623 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28563 Rev 28622
Line 16... Line 16...
16
import java.util.HashSet;
16
import java.util.HashSet;
17
import java.util.List;
17
import java.util.List;
18
import java.util.Map;
18
import java.util.Map;
19
import java.util.Set;
19
import java.util.Set;
20
import java.util.concurrent.TimeUnit;
20
import java.util.concurrent.TimeUnit;
-
 
21
import java.util.stream.Collector;
21
import java.util.stream.Collectors;
22
import java.util.stream.Collectors;
22
 
23
 
23
import org.apache.commons.io.output.ByteArrayOutputStream;
24
import org.apache.commons.io.output.ByteArrayOutputStream;
24
import org.apache.commons.lang.StringUtils;
25
import org.apache.commons.lang.StringUtils;
25
import org.apache.logging.log4j.LogManager;
26
import org.apache.logging.log4j.LogManager;
Line 1305... Line 1306...
1305
				}
1306
				}
1306
			}
1307
			}
1307
			offer.setPartnerCriteria(gson.toJson(partnerCriteria));
1308
			offer.setPartnerCriteria(gson.toJson(partnerCriteria));
1308
		}
1309
		}
1309
	}
1310
	}
-
 
1311
	
-
 
1312
	public void reverseMaa() throws Exception {
-
 
1313
		Set<Integer> inventoryItemIds = inventoryItemRepository.selectByPurchaseId(28877).stream().map(x->x.getId()).collect(Collectors.toSet());
-
 
1314
			double totalAmount = schemeInOutRepository.selectByInventoryItemIds(inventoryItemIds).stream().filter(x->x.getRolledBackTimestamp()!=null || x.getSchemeType().equals(SchemeType.INVESTMENT))
-
 
1315
					//.map(x->x.setRolledBackTimestamp(null))
-
 
1316
					.collect(Collectors.summingDouble(x->x.getAmount()));
-
 
1317
			LOGGER.info("Total Deduction is around Rs. {}", totalAmount);
-
 
1318
	}
1310
 
1319
 
1311
}
1320
}
1312
 
1321
 
1313
//7015845171
1322
//7015845171
1314
1323