Commit 74268119 authored by Nagaraju Kattanguru's avatar Nagaraju Kattanguru

Merge branch 'main' into 'master'

Initial changes

See merge request !1
parents fcd6b5f6 4e550a1d
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
This diff is collapsed.
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.nisum</groupId>
<artifactId>statisticsutils</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Statistics Utils</name>
<description>Database Statistics Utils &amp; Send Mails</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
<version>3.12.7</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.12.7</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>com.j2html</groupId>
<artifactId>j2html</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.nisum.statisticsutils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class StatisticsUtilsApplication {
public static void main(String[] args) {
SpringApplication.run(StatisticsUtilsApplication.class, args);
}
}
package com.nisum.statisticsutils.models;
import java.util.HashMap;
public class ExcelCells {
private Integer rowNum;
private HashMap<Integer,String> hmColumnValues;
public ExcelCells(Integer rowNum, HashMap<Integer, String> hmColumnValues) {
this.rowNum = rowNum;
this.hmColumnValues = hmColumnValues;
}
public Integer getRowNum() {
return rowNum;
}
public void setRowNum(Integer rowNum) {
this.rowNum = rowNum;
}
public HashMap<Integer, String> getHmColumnValues() {
return hmColumnValues;
}
public void setHmColumnValues(HashMap<Integer, String> hmColumnValues) {
this.hmColumnValues = hmColumnValues;
}
}
package com.nisum.statisticsutils.models;
public class TaxRates {
public String taxA="";
public String taxB="";
public String taxC="";
public String taxD="";
public String taxDescription="";
public String getTaxDescription() {
return taxDescription;
}
public void setTaxDescription(String taxDescription) {
this.taxDescription = taxDescription;
}
public String getTaxA() {
if (this.taxA == null ||this.taxA.trim().equals("")) {
return "0";
}else{
return taxA;
}
}
public void setTaxA(String taxA) {
this.taxA = taxA;
}
public String getTaxB() {
if (this.taxB == null ||this.taxB.trim().equals("")) {
return "0";
}else{
return taxB;
}
}
public void setTaxB(String taxB) {
this.taxB = taxB;
}
public String getTaxC() {
if (this.taxC == null ||this.taxC.trim().equals("")) {
return "0";
}else{
return taxC;
}
}
public void setTaxC(String taxC) {
this.taxC = taxC;
}
public String getTaxD() {
if (this.taxD == null ||this.taxD.trim().equals("")) {
return "0";
}else{
return taxD;
}
}
public void setTaxD(String taxD) {
this.taxD = taxD;
}
public TaxRates(String taxA, String taxB, String taxC, String taxD, String taxDescription) {
this.taxA = taxA;
this.taxB = taxB;
this.taxC = taxC;
this.taxD = taxD;
this.taxDescription = taxDescription;
}
}
\ No newline at end of file
package com.nisum.statisticsutils.programs;
import com.nisum.statisticsutils.models.TaxRates;
import com.nisum.statisticsutils.utils.CsvUtils;
import com.nisum.statisticsutils.utils.FileUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
public class CompareSimsStoreData {
public static void compareHashMaps(HashMap<String, TaxRates> hm1, HashMap<String, TaxRates> hm3)throws Exception{
FileUtils fu = new FileUtils("/Users/nisum/Downloads/FileCompare/3217/taxCompare-3217.csv");
Set<String> k = hm1.keySet();
System.out.println("UPC\tDB\tDB\tDB\tDB\tSTORE\tSTORE\tSTORE\tSTORE");
fu.writeLineToFile("UPC\tDB\tDB\tDB\tDB\tSTORE\tSTORE\tSTORE\tSTORE");
fu.writeLineToFile("UPC\tTax A\tTax B\tTax C\tTax D\tTax A\tTax B\tTax C\tTax D");
for(String s:k){
if(hm1.get(s)!=null && hm3.get(s)!=null) {
System.out.println(s + "\t" +
hm1.get(s).getTaxA() + "\t" + hm1.get(s).getTaxB() + "\t" + hm1.get(s).getTaxC() + "\t" + hm1.get(s).getTaxD() + "\t" +
hm3.get(s).getTaxA() + "\t" + hm3.get(s).getTaxB() + "\t" + hm3.get(s).getTaxC() + "\t" + hm3.get(s).getTaxD()
);
fu.writeLineToFile(s + "\t" +
hm1.get(s).getTaxA() + "\t" + hm1.get(s).getTaxB() + "\t" + hm1.get(s).getTaxC() + "\t" + hm1.get(s).getTaxD() + "\t" +
hm3.get(s).getTaxA() + "\t" + hm3.get(s).getTaxB() + "\t" + hm3.get(s).getTaxC() + "\t" + hm3.get(s).getTaxD()
);
}
}
fu.closeFileWriter();
}
public static void main(String[] args) throws Exception {
CsvUtils csvSims = new CsvUtils("/Users/nisum/Downloads/FileCompare/3217/sims-3217.csv");
ArrayList<String> lines = csvSims.readAllLines(true);
ArrayList<TaxRates> ltrDbSims = new ArrayList<TaxRates>();
HashMap<String,TaxRates> hmSims = new HashMap<String, TaxRates>();
for(String s: lines){
String fsa = csvSims.getColumnValue(s,",",11);
if(fsa.toLowerCase().contains("flex spending account") || fsa.toLowerCase().contains("sales restrict")||fsa.toLowerCase().contains("wic") || fsa.toLowerCase().contains("milk bottle deposit")){
continue;
}
String upc = csvSims.getColumnValue(s,",",1);
String taxA = csvSims.getColumnValue(s,",",12) + "";
String taxB = csvSims.getColumnValue(s,",",13) + "";
String taxC = csvSims.getColumnValue(s,",",14) + "";
String taxD = csvSims.getColumnValue(s,",",15) + "";
/*System.out.println("UPC :" + upc);
System.out.println("Tax A:" + taxA);
System.out.println("Tax B:" + taxB);
System.out.println("Tax C:" + taxC);
System.out.println("Tax D:" + taxD);*/
TaxRates tr = new TaxRates(taxA,taxB,taxC,taxD,"");
hmSims.put(String.format("%013d",(new BigDecimal(upc).toBigInteger())),tr);
}
csvSims.closeBufferedReader();
CsvUtils csvStore = new CsvUtils("/Users/nisum/Downloads/FileCompare/3217/store-3217.csv");
lines = csvStore.readAllLines(false);
HashMap<String,TaxRates> hmStore = new HashMap<String,TaxRates>();
for(String s: lines){
String upc = csvStore.getColumnValue(s,"\\|",0);
String taxA= csvStore.getColumnValue(s,"\\|",13) + "";
String taxB= csvStore.getColumnValue(s,"\\|",14) + "";
String taxC= csvStore.getColumnValue(s,"\\|",15) + "";
String taxD= csvStore.getColumnValue(s,"\\|",16) + "";
/*System.out.println("UPC :" + upc);
System.out.println("Tax A:" + taxA);
System.out.println("Tax B:" + taxB);
System.out.println("Tax C:" + taxC);
System.out.println("Tax D:" + taxD);*/
TaxRates tr = new TaxRates(taxA,taxB,taxC,taxD,"");
hmStore.put(String.format("%013d",(new BigDecimal(upc).toBigInteger())),tr);
}
csvStore.closeBufferedReader();
CompareSimsStoreData.compareHashMaps(hmSims,hmStore);
}
}
package com.nisum.statisticsutils.programs;
import com.mongodb.client.FindIterable;
import com.mongodb.client.model.Filters;
import com.nisum.statisticsutils.utils.*;
import org.bson.Document;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Properties;
public class DailyReport {
public class Mail{
private String storeNumbers;
private String reportSinceDate;
private String sendTo;
private String sendFrom;
private String smtpServer;
private int smtpPort;
public String getSendTo() {
return sendTo;
}
public void setSendTo(String sendTo) {
this.sendTo = sendTo;
}
public String getSendFrom() {
return sendFrom;
}
public void setSendFrom(String sendFrom) {
this.sendFrom = sendFrom;
}
public void setReportSinceDate(String sinceDate) {
this.reportSinceDate = sinceDate;
}
public String getSmtpServer() {
return smtpServer;
}
public void setSmtpServer(String smtpServer) {
this.smtpServer = smtpServer;
}
public int getSmtpPort() {
return smtpPort;
}
public void setSmtpPort(int smtpPort) {
this.smtpPort = smtpPort;
}
public String getReportSinceDate() {
return this.reportSinceDate;
}
public String getStoreNumbers() {
return storeNumbers;
}
public void setStoreNumbers(String storeNumbers) {
this.storeNumbers = storeNumbers;
}
}
public Mail getProperties() throws Exception {
Properties prop = new Properties();
String propFile = "config.properties";
InputStream input = getClass().getClassLoader().getResourceAsStream(propFile);
if(input==null){
throw new FileNotFoundException("config.properties file not found");
}else{
prop.load(input);
}
Mail m = new Mail();
m.setSendFrom(prop.getProperty("sendFrom"));
m.setSendTo(prop.getProperty("sendTo"));
m.setSmtpServer(prop.getProperty("smtpServer"));
m.setSmtpPort(Integer.parseInt(prop.getProperty("smtpPort")));
m.setReportSinceDate(prop.getProperty("reportSinceDate"));
m.setStoreNumbers(prop.getProperty("storeNumbers"));
return m;
}
public static void main(String[] args) throws Exception {
Mail m = new DailyReport().getProperties();
String sinceDate=m.getReportSinceDate();
String[] stores = m.getStoreNumbers().split(",");
MongoUtils mo = new MongoUtils();
JsonUtils ju = new JsonUtils();
//number of records after date
System.out.println("Fetching number of transactions since date "+ sinceDate +" for each store");
String emailBody="";
Long numOfTxns=0l ;
emailBody = emailBody + ("Report of transactions since date: " + sinceDate);
emailBody = emailBody + ("\n\nNumber of Taxation Calls for stores");
for(String store:stores) {
numOfTxns = mo.getCountOfMatchingRecords(Filters.and(Filters.gte("timestamp",sinceDate),Filters.eq("storeId",store)));
emailBody = emailBody + ("\n\tStore# " + store + "\t:" + numOfTxns);
}
System.out.println("Fetching errors since date "+ sinceDate +" for all given stores");
//number of records after date with exceptions in response
numOfTxns = mo.getCountOfMatchingRecords(Filters.and(Filters.gte("timestamp",sinceDate),Filters.regex("response", "exception")));
emailBody = emailBody + ("\n\nNumber of Transactions with Exceptions: " + numOfTxns);
FindIterable<Document> errors = mo.getAllMatchingDocuments(Filters.and(Filters.gte("timestamp",sinceDate),Filters.regex("response", "exception")));
for(Document d: errors) {
String error = (ju.searchJsonStringByJsonPath(d.toJson(), "$.response"));
String[] errorz = error.split(":");
String traceId = errorz[errorz.length-1].replace("\"", "").replace("}", "");
Document errorDoc = mo.getMatchingDocument(Filters.eq("_id",traceId));
emailBody = emailBody + ("\n" + ju.searchJsonStringByJsonPath(errorDoc.toJson(),"$.timestamp") + "::" + error );
}
//PRINTOUT THE ERRORS
System.out.println("Fetching error counts since date "+ sinceDate +" for all given stores");
//number of records after date with errors in response and percentage > 25.
numOfTxns = mo.getCountOfMatchingRecords(Filters.and(Filters.gte("timestamp",sinceDate),Filters.gt("percentage",25)));
emailBody = emailBody + ("\n\nNumber of Erroneous Transactions with 25% or more missing UPCs: " + numOfTxns);
System.out.println("Missing UPS "+ sinceDate +" for all given stores");
//list of unique missing UPCs from the records since date
FindIterable<Document> allMissingUPCs = mo.getAllMatchingDocuments(Filters.and(Filters.gte("timestamp",sinceDate),Filters.exists("upc_bpn")));
ArrayList<String> UPCs = new ArrayList<String>();
emailBody = emailBody + ("\n\nMissing UPCs:\n");
for(Document d:allMissingUPCs) {
String upc = ju.searchJsonStringByJsonPath(d.toJson(), "$.upc_bpn");
String[] arrupc = upc.split(",");
for(String s:arrupc) {
if(!UPCs.contains(s)) {
UPCs.add(s);
emailBody = emailBody + (s + "," ) ;
}
}
}
emailBody = emailBody + ("\n\nNumber of UPCs missing product classes: " + UPCs.size());
emailBody = emailBody + ("\n\nTaxation Report generated at : " + new java.util.Date());
mo.closeConnection();
System.out.println("Generating Emails");
EmailUtils.sendMail(m.getSmtpServer(),m.getSmtpPort(),m.sendFrom,m.sendTo,"Taxation Report: " + new java.util.Date(),emailBody,"");
System.out.println("Process Complete " + new java.util.Date());
}
}
package com.nisum.statisticsutils.programs;
import com.mongodb.client.FindIterable;
import com.mongodb.client.model.Filters;
import com.nisum.statisticsutils.models.ExcelCells;
import com.nisum.statisticsutils.utils.*;
import org.bson.Document;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Properties;
public class DailyReportInExcelAndEmail {
public class Mail{
private String storeNumbers;
private String reportSinceDate;
private String sendTo;
private String sendFrom;
private String smtpServer;
private int smtpPort;
public String getSendTo() {
return sendTo;
}
public void setSendTo(String sendTo) {
this.sendTo = sendTo;
}
public String getSendFrom() {
return sendFrom;
}
public void setSendFrom(String sendFrom) {
this.sendFrom = sendFrom;
}
public void setReportSinceDate(String sinceDate) {
this.reportSinceDate = sinceDate;
}
public String getSmtpServer() {
return smtpServer;
}
public void setSmtpServer(String smtpServer) {
this.smtpServer = smtpServer;
}
public int getSmtpPort() {
return smtpPort;
}
public void setSmtpPort(int smtpPort) {
this.smtpPort = smtpPort;
}
public String getReportSinceDate() {
return this.reportSinceDate;
}
public String getStoreNumbers() {
return storeNumbers;
}
public void setStoreNumbers(String storeNumbers) {
this.storeNumbers = storeNumbers;
}
}
public Mail getProperties() throws Exception {
Properties prop = new Properties();
String propFile = "config.properties";
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream input = getClass().getClassLoader().getResourceAsStream(propFile);
if(input==null){
throw new FileNotFoundException("config.properties file not found");
}else{
prop.load(input);
}
Mail m = new Mail();
m.setSendFrom(prop.getProperty("sendFrom"));
m.setSendTo(prop.getProperty("sendTo"));
m.setSmtpServer(prop.getProperty("smtpServer"));
m.setSmtpPort(Integer.parseInt(prop.getProperty("smtpPort")));
m.setReportSinceDate(prop.getProperty("reportSinceDate"));
m.setStoreNumbers(prop.getProperty("storeNumbers"));
return m;
}
public static void main(String[] args) throws Exception {
String reportPath = System.getProperty("user.dir") + "/AllStoreUPCandErrorReport.xlsx";
ExcelWriteUtils ewu = new ExcelWriteUtils();
try{
Mail m = new DailyReportInExcelAndEmail().getProperties();
String sinceDate=m.getReportSinceDate();
String[] stores = m.getStoreNumbers().split(",");
MongoUtils mo = new MongoUtils();
JsonUtils ju = new JsonUtils();
//number of records after date
System.out.println("Fetching number of transactions since date "+ sinceDate +" for each store");
String emailBody="";
Long numOfTxns=0l ;
emailBody = emailBody + ("Report of transactions since date: " + sinceDate);
emailBody = emailBody + ("\n\nNumber of Taxation Calls for stores");
for(String store:stores) {
ewu.createSheet(store);
numOfTxns = mo.getCountOfMatchingRecords(Filters.and(Filters.gte("timestamp",sinceDate),Filters.eq("storeId",store)));
emailBody = emailBody + ("\n\tStore# " + store + "\t:" + numOfTxns);
}
System.out.println("Fetching errors since date "+ sinceDate +" for all given stores");
//number of records after date with exceptions in response
for(String store:stores){
ewu.setSheet(store);
HashMap<Integer,String> hm = new HashMap<Integer,String>();
hm.put(0,"Date");
hm.put(1,"Error");
ExcelCells ec = new ExcelCells(-1,hm);
ArrayList<ExcelCells> aec = new ArrayList<ExcelCells>();
aec.add(ec);
FindIterable<Document> errors = mo.getAllMatchingDocuments(Filters.and(Filters.gte("timestamp",sinceDate),Filters.regex("response", "exception"),Filters.eq("storeId",store)));
for(Document d: errors) {
String error = (ju.searchJsonStringByJsonPath(d.toJson(), "$.response"));
String[] errorz = error.split(":");
String traceId = errorz[errorz.length-1].replace("\"", "").replace("}", "");
Document errorDoc = mo.getMatchingDocument(Filters.eq("_id",traceId));
String dt = ju.searchJsonStringByJsonPath(errorDoc.toJson(),"$.timestamp");
hm = new HashMap<Integer,String>();
hm.put(0,dt);
hm.put(1,error);
ec = new ExcelCells(-1,hm);
aec.add(ec);
//emailBody = emailBody + ("\n" + dt + "::" + error );
}
ewu.populateCells(aec);
}
numOfTxns = mo.getCountOfMatchingRecords(Filters.and(Filters.gte("timestamp",sinceDate),Filters.regex("response", "exception")));
emailBody = emailBody + ("\n\nNumber of Transactions with Exceptions: " + numOfTxns);
ewu.saveWorkBook(reportPath);
//PRINTOUT THE ERRORS
System.out.println("Fetching error counts since date "+ sinceDate +" for all given stores");
//number of records after date with errors in response and percentage > 25.
System.out.println("Missing UPC "+ sinceDate +" for all given stores");
numOfTxns = mo.getCountOfMatchingRecords(Filters.and(Filters.gte("timestamp",sinceDate),Filters.gt("percentage",25)));
emailBody = emailBody + ("\n\nNumber of Erroneous Transactions with 25% or more missing UPCs: " + numOfTxns);
//list of unique missing UPCs from the records since date
System.out.println("Missing UPC "+ sinceDate +" for all given stores");
ewu.createSheet("MissingUPC");
HashMap<Integer,String> hm = new HashMap<Integer,String>();
hm.put(0,"Missing UPC");
ExcelCells ec = new ExcelCells(-1,hm);
ArrayList<ExcelCells> aec = new ArrayList<ExcelCells>();
aec.add(ec);
FindIterable<Document> allMissingUPCs = mo.getAllMatchingDocuments(Filters.and(Filters.gte("timestamp",sinceDate),Filters.exists("upc_bpn")));
ArrayList<String> UPCs = new ArrayList<String>();
//emailBody = emailBody + ("\n\nMissing UPCs:\n");
for(Document d:allMissingUPCs) {
String upc = ju.searchJsonStringByJsonPath(d.toJson(), "$.upc_bpn");
String[] arrupc = upc.split(",");
for(String s:arrupc) {
if(!UPCs.contains(s)) {
UPCs.add(s);
hm=new HashMap<Integer, String>();
hm.put(0,s);
ec = new ExcelCells(-1,hm);
aec.add(ec);
//emailBody = emailBody + (s + "," ) ;
}
}
}
ewu.populateCells(aec);
emailBody = emailBody + ("\n\nNumber of UPCs missing product classes: " + UPCs.size());
emailBody = emailBody + ("\n\nTaxation Report generated at : " + new java.util.Date());
mo.closeConnection();
//System.out.println("Generating Emails" + emailBody);
ewu.saveWorkBook(reportPath);
ewu.closeWorkBook();
EmailUtils.sendMail(m.getSmtpServer(),m.getSmtpPort(),m.sendFrom,m.sendTo,"Taxation Report: " + new java.util.Date(),emailBody,reportPath);
System.out.println("Process Complete " + new java.util.Date());
}catch(Exception e){
ewu.saveWorkBook(reportPath);
ewu.closeWorkBook();
}
}
}
package com.nisum.statisticsutils.programs;
import com.mongodb.client.model.Filters;
import com.nisum.statisticsutils.utils.*;
import gherkin.deps.com.google.gson.JsonArray;
import gherkin.deps.com.google.gson.JsonElement;
import org.bson.Document;
import java.util.ArrayList;
public class FindPercentageZero {
public static void main(String[] args) throws Exception {
JsonUtils ju = new JsonUtils();
MongoUtils mo = new MongoUtils();
String taxProdJson = ju.jsonFileToString("/Users/nisum/Downloads/octx-snoflake/taxprodchk.json");
JsonArray txnArray = ju.jsonFileToJsonArray(taxProdJson);
ArrayList<String> orderIds = new ArrayList<String>();
for(JsonElement je: txnArray) {
orderIds.add(ju.searchJsonStringByJsonPath(je.toString(), "$._id"));
}
for(String oId:orderIds) {
Document dc = mo.getAllMatchingDocumentsSorted(Filters.eq("orderId",oId),false,"timestamp").first();
if(Float.parseFloat(ju.searchJsonStringByJsonPath(dc.toJson(), "$.percentage"))==0.0f) {
System.out.println(oId);
}
}
mo.closeConnection();
}
}
package com.nisum.statisticsutils.utils;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class CsvUtils {
BufferedReader br=null;
public CsvUtils(String filePath) throws FileNotFoundException {
this.br = new BufferedReader(new FileReader(filePath));
}
public ArrayList<String> readAllLines(Boolean containsHeading) throws IOException{
ArrayList<String> ls = new ArrayList<String>();
String line;
while ((line = br.readLine()) != null) {
if(containsHeading) {
containsHeading=false;
continue;
}else {
ls.add(line);
}
}
return ls;
}
public String getColumnValue(String line, String delimiterRegex,Integer columnNumber) {
return line.split(delimiterRegex)[columnNumber];
}
public void closeBufferedReader() throws IOException{
br.close();
br = null;
}
public static void main(String[] args) throws IOException {
CsvUtils cu = new CsvUtils("/Users/nisum/Downloads/FileCompare/SIMS.csv");
ArrayList<String> ls = cu.readAllLines(true);
for(String s:ls) {
System.out.println(cu.getColumnValue(s, ",", 3));
System.out.println(cu.getColumnValue(s, ",", 7));
System.out.println(cu.getColumnValue(s, ",", 8));
}
cu.closeBufferedReader();
}
}
package com.nisum.statisticsutils.utils;
import org.apache.commons.mail.EmailAttachment;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.MultiPartEmail;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import java.io.IOException;
import java.util.Date;
import java.util.Properties;
public class EmailUtils {
public static void sendMail(String smtpAddress, int smtpPort, String sendFrom, String sendTo, String subject, String textBody,String attachmentPath) throws EmailException {
// Create the attachment
EmailAttachment attachment = new EmailAttachment();
attachment.setPath(attachmentPath);
attachment.setDisposition(EmailAttachment.ATTACHMENT);
attachment.setDescription("All Store Error And UPC Report");
attachment.setName("AllStoreReport.xlsx");
// Create the email message
MultiPartEmail email = new MultiPartEmail();
email.setHostName(smtpAddress);
//email.setAuthentication(userName,"Blabla@1234");
email.setSmtpPort(smtpPort);
email.addTo(sendTo);
email.setFrom(sendTo);
email.setSubject(subject);
email.setMsg(textBody);
// add the attachment
email.attach(attachment);
// send the email
email.send();
}
public static void sendHtmlMail(String smtpAddress, int smtpPort, String sendFrom, String sendTo, String subject, String textBody, String attachmentPath) throws EmailException, MessagingException, IOException {
// sets SMTP server properties
Properties properties = new Properties();
properties.put("mail.smtp.host", smtpAddress);
properties.put("mail.smtp.port", smtpPort);
//properties.put("mail.smtp.auth", "false");
//properties.put("mail.smtp.starttls.enable", "true");
//properties.put("mail.user", userName);
//properties.put("mail.password", password);
// creates a new session with an authenticator
/*Authenticator auth = new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(userName, password);
}
};*/
Session session = Session.getInstance(properties);
// creates a new e-mail message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(sendFrom));
InternetAddress[] toAddresses = { new InternetAddress(sendTo) };
msg.setRecipients(Message.RecipientType.TO, toAddresses);
msg.setSubject(subject);
msg.setSentDate(new Date());
// creates message part
MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent(textBody, "text/html");
// creates multi-part
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
MimeBodyPart attachPart = new MimeBodyPart();
attachPart.attachFile(attachmentPath);
multipart.addBodyPart(attachPart);
// sets the multi-part as e-mail's content
msg.setContent(multipart);
// sends the e-mail
Transport.send(msg);
}
public static void main(String[] args) throws EmailException {
EmailUtils.sendMail("smtp.gmail.com",465,"kattanguru@gmail.com","kattanguru@gmail.com","Test Subject","TextBody",System.getProperty("user.dir")+"/TestErrorReport.xlsx");
}
}
package com.nisum.statisticsutils.utils;
import com.nisum.statisticsutils.models.ExcelCells;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
public class ExcelWriteUtils {
XSSFWorkbook workbook;
XSSFSheet sheet,readfiles;
public ExcelWriteUtils() throws Exception {
workbook = new XSSFWorkbook();
}
public void createSheet(String sheetName){
sheet = workbook.createSheet(sheetName);
}
public void setSheet(String sheetName){
sheet = workbook.getSheet(sheetName);
}
public void populateCells(ArrayList<ExcelCells> aEC) {
for(ExcelCells c: aEC){
if(c.getRowNum()==-1){
Row row = sheet.createRow(getLastRowNum());
Set<Integer> colKeys = c.getHmColumnValues().keySet();
for(Integer i:colKeys){
row.createCell(i).setCellValue(c.getHmColumnValues().get(i));
}
}
}
}
public void saveWorkBook(String FilePath) throws FileNotFoundException, IOException {
FileOutputStream fop = new FileOutputStream(new File(FilePath));
workbook.write(fop);
fop.close();
}
public void closeWorkBookWithoutSaving() throws IOException{
workbook.close();
}
public void closeWorkBook() throws IOException {
workbook.close();
}
public Integer getLastRowNum() {
return (sheet.getPhysicalNumberOfRows());
}
public Integer getLastColNum() {
int i = 0;
for (Row row : sheet) {
while(row.getCell(i)!=null) {
i++;
}
break;
}
return i;
}
public Row getRowByNumber(Integer rownum) {
return sheet.getRow(rownum);
}
public Cell getCellByRowColNumber(Row row, Integer colNum) {
return row.getCell(colNum);
}
public static void main(String[] args) throws Exception {
ExcelWriteUtils eu = new ExcelWriteUtils();
eu.createSheet("abc");
eu.createSheet("def");
eu.setSheet("abc");
HashMap<Integer, String> hmCells = new HashMap<Integer,String>();
hmCells.put(0, "cell0");
hmCells.put(1, "cell1");
ExcelCells ec = new ExcelCells(-1,hmCells);
ArrayList<ExcelCells> aec = new ArrayList<ExcelCells>();
aec.add(ec);
eu.populateCells(aec);
eu.setSheet("def");
ec = new ExcelCells(-1,hmCells);
eu.populateCells(aec);
eu.saveWorkBook("/Users/nisum/Downloads/test.xlsx");
}
}
package com.nisum.statisticsutils.utils;
import java.io.FileWriter;
import java.io.IOException;
public class FileUtils {
FileWriter fw=null;
public FileUtils(String filePath) throws IOException {
this.fw = new FileWriter(filePath);
}
public void writeLineToFile(String line) throws IOException {
fw.write(line + "\r\n");
}
public void appendLineToFile(String line) throws IOException {
fw.append(line + "\r\n");
}
public void closeFileWriter() throws IOException {
fw.close();
}
}
package com.nisum.statisticsutils.utils;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
import gherkin.deps.com.google.gson.JsonArray;
import gherkin.deps.com.google.gson.JsonElement;
import gherkin.deps.com.google.gson.JsonObject;
import gherkin.deps.com.google.gson.JsonParser;
import gherkin.deps.com.google.gson.JsonSyntaxException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class JsonUtils {
public String jsonFileToString(String jsonFilePath) throws IOException {
BufferedReader br = new BufferedReader(new FileReader(jsonFilePath));
String str = "";
String st;
while (true) {
st = br.readLine();
if(st==null) {
break;
}else {
str = str + st;
}
}
br.close();
return str;
}
public JsonArray jsonFileToJsonArray(String json) {
JsonParser jsonParser = new JsonParser();
return jsonParser.parse(json).getAsJsonArray();
}
public JsonObject jsonFileToJsonObject(String jsonFilePath) throws JsonSyntaxException, IOException {
JsonParser jp = new JsonParser();
return jp.parse(jsonFileToString(jsonFilePath)).getAsJsonObject();
}
public String modifyJsonWithJsonPathFromFile(String jsonFilePath,String jsonPath,String newValue ) throws JsonSyntaxException, IOException {
DocumentContext parsedDataContext = JsonPath.parse(jsonFileToString(jsonFilePath));
parsedDataContext.set(jsonPath, newValue);
return (parsedDataContext.jsonString());
}
public String modifyJsonWithJsonPathFromJsonString(String jsonString,String jsonPath,String newValue ) throws JsonSyntaxException, IOException {
DocumentContext parsedDataContext = JsonPath.parse(jsonString);
parsedDataContext.set(jsonPath, newValue);
return (parsedDataContext.jsonString());
}
public String searchJsonFileByJsonPath(String jsonFilePath,String jsonPath) throws JsonSyntaxException, IOException {
DocumentContext parsedDataContext = JsonPath.parse(jsonFileToString(jsonFilePath));
parsedDataContext.read(jsonPath);
return (parsedDataContext.read(jsonPath).toString());
}
public String searchJsonStringByJsonPath(String jsonString ,String jsonPath) throws JsonSyntaxException, IOException {
DocumentContext parsedDataContext = JsonPath.parse(jsonString);
parsedDataContext.read(jsonPath);
return (parsedDataContext.read(jsonPath).toString());
}
public JsonArray jsonStringtoJsonArray(String jsonFullString ,String jsonPathOfArrayNode) throws JsonSyntaxException, IOException {
jsonFullString = searchJsonStringByJsonPath(jsonFullString, jsonPathOfArrayNode);
JsonParser parser = new JsonParser();
JsonElement elements = parser.parse(jsonFullString);
JsonArray jsonArray = elements.getAsJsonArray();
return jsonArray;
}
public static void main(String[] args) throws IOException {
}
}
package com.nisum.statisticsutils.utils;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientURI;
import com.mongodb.client.FindIterable;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.Filters;
import com.mongodb.client.model.Sorts;
import org.bson.Document;
import org.bson.conversions.Bson;
public class MongoUtils {
MongoClient mongoClient=null;
MongoDatabase database = null;
MongoCollection<Document> mc = null;
public MongoUtils() {
MongoClientURI mcuri = new MongoClientURI("mongodb://mongodb-octx-taxation-prod:WA3F1ZSKyq8vqLwNf06fNVmBR2UBYCMrQP5kn6VwJ6z2c6xNkcnMb0aaFoz4tRWEFoy4o35yljBzl3xir1LDEA==@mongodb-octx-taxation-prod.mongo.cosmos.azure.com:10255/?ssl=true&replicaSet=globaldb&retrywrites=false&maxIdleTimeMS=120000&appName=@mongodb-octx-taxation-prod@");
this.mongoClient = new MongoClient(mcuri);
this.database = mongoClient.getDatabase("octx-taxation");
this.mc = database.getCollection("octx-log");
}
public FindIterable<Document> getAllMatchingDocuments(Bson filter) throws InterruptedException {
FindIterable<Document> ml = null;
try{
if(filter==null) {
ml = this.mc.find();
}else {
ml = this.mc.find(filter);
}
}catch(Exception e){
Thread.sleep(5000);
if(filter==null) {
ml = this.mc.find();
}else {
ml = this.mc.find(filter);
}
}
return ml;
}
public FindIterable<Document> getAllMatchingDocumentsSorted(Bson filter, Boolean isAscending, String SortBy) throws InterruptedException {
FindIterable<Document> ml=null;
try{
if(isAscending) {
ml = this.mc.find(filter).sort(Sorts.ascending(SortBy));
}else {
ml = this.mc.find(filter).sort(Sorts.descending(SortBy));
}
}catch(Exception e) {
Thread.sleep(5000);
if(isAscending) {
ml = this.mc.find(filter).sort(Sorts.ascending(SortBy));
}else {
ml = this.mc.find(filter).sort(Sorts.descending(SortBy));
}
}
return ml;
}
public Document getMatchingDocument(Bson filter) throws InterruptedException {
try{
return this.mc.find(filter).first();
}catch(Exception e){
Thread.sleep(5000);
return this.mc.find(filter).first();
}
}
public Long getCountOfMatchingRecords(Bson filter) throws InterruptedException {
try{
return mc.countDocuments(filter);
}catch(Exception e){
Thread.sleep(5000);
return mc.countDocuments(filter);
}
}
public void closeConnection() {
mongoClient.close();
}
public static void main( String args[] ) throws Exception {
MongoClientURI uri = new MongoClientURI("mongodb://mongodb-octx-taxation-prod:WA3F1ZSKyq8vqLwNf06fNVmBR2UBYCMrQP5kn6VwJ6z2c6xNkcnMb0aaFoz4tRWEFoy4o35yljBzl3xir1LDEA==@mongodb-octx-taxation-prod.mongo.cosmos.azure.com:10255/?ssl=true&replicaSet=globaldb&retrywrites=false&maxIdleTimeMS=120000&appName=@mongodb-octx-taxation-prod@");
MongoClient mongoClient = new MongoClient(uri);
MongoDatabase database = mongoClient.getDatabase("octx-taxation");
MongoCollection<Document> mc = database.getCollection("octx-log");
// Document myDoc = mc.find().first();
// System.out.println(myDoc.toJson());
//
// FindIterable<Document> ml = mc.find(Filters.eq("percentage",0.0));
// for(Document d:ml) {
// System.out.println(d.toString());
// }
//
MongoUtils mo = new MongoUtils();
FindIterable<Document> ml = mo.getAllMatchingDocuments(Filters.and(Filters.eq("orderId","12715178"),Filters.eq("percentage",0.0)));
for(Document d:ml) {
System.out.println(d.toString());
}
//
// for(Document d:ml) {
// System.out.println(d.toString());
// Document myDoc = (Document) mo.getAllMatchingDocuments(Filters.and(Filters.eq("orderId", d.toString()),Filters.eq("percentage",0.0))).first();
//
// System.out.println(myDoc.toJson());
// }
}
}
reportSinceDate=12/04/2020
storeNumbers=2,90,93,101,103,118,126,130,138,145,154,155,156,159,160,161,162,164,165,166,168,169,171,176,177,180,182,184,189,193,199,212,332,460,611,1276,1470,1517,1602,1795,1970,2511,2614,2804,3174,3195,3205,3206,3337,3339,3360,3366,3489,4004,4009,4011,4139
smtpServer=smtp.gmail.com
smtpPort=465
sendTo=kattanguru@gmail.com
sendFrom=kattanguru@gmail.com
\ No newline at end of file
package com.nisum.statisticsutils;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class StatisticsUtilsApplicationTests {
@Test
void contextLoads() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment