Commit 0b1c2ca0 authored by prane's avatar prane

Changed the signature of sendMail() method passed userInfo and fixed issue...

Changed the signature of sendMail() method passed userInfo and fixed issue added condtion if indexofAdplement(0 method return -1 while adding suppSite 

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@193976 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7725749b
......@@ -21,6 +21,8 @@ package ibase.webitm.ejb.mfg;
//import ibase.system.config.ConnDriver;//commented by pavan R on 12nov18 [to get conn from getConnection() instead of ConnDriver]
import ibase.utility.CommonConstants;
import ibase.utility.EMail;
import ibase.utility.UserInfoBean;
import ibase.webitm.ejb.DBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.ejb.dis.DistCommon;
......@@ -4698,6 +4700,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
String tranIdDet = null;
String tranSerDet = null;
String siteCodeDEt = null;
String SuppSour = "";
String suppSite = "";
//Pavan R on 09/oct/17 end
try
{
......@@ -5212,14 +5216,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
demandSupplyMap.put(14, siteCodeDEt);
//pavan R on 28nov18 [to get siteCodeSupplier if suppSour is D]
indxCnt = indexOfADPElement(siteCodeDEt, itemCodeDet);
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
if("D".equals(checkNull(adpEle.getSuppSour())))
if(adpeList.size() >= indxCnt && indxCnt > 0)
{
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
SuppSour = adpEle.getSuppSour() == null ? "" : adpEle.getSuppSour();
suppSite = adpEle.getSiteCodeSupp() == null ? "" : adpEle.getSiteCodeSupp();
}
if("D".equals(checkNull(SuppSour)))
{
demandSupplyMap.put(15, adpEle.getSiteCodeSupp());
demandSupplyMap.put(15, suppSite);
}else{
demandSupplyMap.put(15, " ");
}
System.out.println("5221 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+adpEle.getSuppSour()+"]adpEle.getSiteCodeSupp()["+adpEle.getSiteCodeSupp()+"]");
System.out.println("5235 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+SuppSour+"]adpEle.getSiteCodeSupp()["+suppSite+"]");
//pavan R on 28nov18
demandSupplyList.add(demandSupplyMap);
......@@ -5289,14 +5298,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
demandSupplyMap.put(13, siteCodeDEt);
//pavan R on 28nov18 [to get siteCodeSupplier if suppSour is D]
indxCnt = indexOfADPElement(siteCodeDEt, itemCodeDet);
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
if("D".equals(checkNull(adpEle.getSuppSour())))
if(adpeList.size() >= indxCnt && indxCnt > 0)
{
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
SuppSour = adpEle.getSuppSour() == null ? "" : adpEle.getSuppSour();
suppSite = adpEle.getSiteCodeSupp() == null ? "" : adpEle.getSiteCodeSupp();
}
if("D".equals(checkNull(SuppSour)))
{
demandSupplyMap.put(14, adpEle.getSiteCodeSupp());
demandSupplyMap.put(14, suppSite);
}else{
demandSupplyMap.put(14, " ");
}
System.out.println("5295 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+adpEle.getSuppSour()+"]adpEle.getSiteCodeSupp()["+adpEle.getSiteCodeSupp()+"]");
System.out.println("5321 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+SuppSour+"]adpEle.getSiteCodeSupp()["+suppSite+"]");
//pavan R on 28nov18
demandSupplyList.add(demandSupplyMap);
} else
......@@ -5331,14 +5345,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
demandSupplyMap.put(13, siteCodeDEt);
//pavan R on 28nov18 [to get siteCodeSupplier if suppSour is D]
indxCnt = indexOfADPElement(siteCodeDEt, itemCodeDet);
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
if("D".equals(checkNull(adpEle.getSuppSour())))
if(adpeList.size() >= indxCnt && indxCnt > 0)
{
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
SuppSour = adpEle.getSuppSour() == null ? "" : adpEle.getSuppSour();
suppSite = adpEle.getSiteCodeSupp() == null ? "" : adpEle.getSiteCodeSupp();
}
if("D".equals(checkNull(SuppSour)))
{
demandSupplyMap.put(14, adpEle.getSiteCodeSupp());
demandSupplyMap.put(14, suppSite);
}else{
demandSupplyMap.put(14, " ");
}
System.out.println("5334 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+adpEle.getSuppSour()+"]adpEle.getSiteCodeSupp()["+adpEle.getSiteCodeSupp()+"]");
System.out.println("5372 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+SuppSour+"]adpEle.getSiteCodeSupp()["+suppSite+"]");
//pavan R on 28nov18
demandSupplyList.add(demandSupplyMap);
}
......@@ -5920,6 +5939,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//Added by Pavan R on 09/oct/17 start
String adpDetQuery = null;
String SuppSour = "";
String suppSite = "";
//Pavan R on 09/oct/17 end
try
......@@ -6427,14 +6448,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
demandSupplyMap.put(14, siteCodeDEt);
//pavan R on 28nov18 [to get siteCodeSupplier if suppSour is D]
indxCnt = indexOfADPElement(siteCodeDEt, itemCodeDet);
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
if("D".equals(checkNull(adpEle.getSuppSour())))
if(adpeList.size() >= indxCnt && indxCnt > 0)
{
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
SuppSour = adpEle.getSuppSour() == null ? "" : adpEle.getSuppSour();
suppSite = adpEle.getSiteCodeSupp() == null ? "" : adpEle.getSiteCodeSupp();
}
if("D".equals(checkNull(SuppSour)))
{
demandSupplyMap.put(15, checkNull(adpEle.getSiteCodeSupp()));
demandSupplyMap.put(15, suppSite);
}else{
demandSupplyMap.put(15, " ");
}
System.out.println("6427 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+adpEle.getSuppSour()+"]adpEle.getSiteCodeSupp()["+adpEle.getSiteCodeSupp()+"]");
}
System.out.println("6479 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+SuppSour+"]adpEle.getSiteCodeSupp()["+suppSite+"]");
//pavan R on 28nov18
demandSupplyList.add(demandSupplyMap);
}
......@@ -6504,14 +6530,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
demandSupplyMap.put(13, siteCodeDEt);
//pavan R on 28nov18 [to get siteCodeSupplier if suppSour is D]
indxCnt = indexOfADPElement(siteCodeDEt, itemCodeDet);
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
if("D".equals(checkNull(adpEle.getSuppSour())))
if(adpeList.size() >= indxCnt && indxCnt > 0)
{
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
SuppSour = adpEle.getSuppSour() == null ? "" : adpEle.getSuppSour();
suppSite = adpEle.getSiteCodeSupp() == null ? "" : adpEle.getSiteCodeSupp();
}
if("D".equals(checkNull(SuppSour)))
{
demandSupplyMap.put(14, checkNull(adpEle.getSiteCodeSupp()));
demandSupplyMap.put(14, suppSite);
}else{
demandSupplyMap.put(14, " ");
}
System.out.println("6502 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+adpEle.getSuppSour()+"]adpEle.getSiteCodeSupp()["+adpEle.getSiteCodeSupp()+"]");
}
System.out.println("6565 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+SuppSour+"]adpEle.getSiteCodeSupp()["+suppSite+"]");
//pavan R on 28nov18
demandSupplyList.add(demandSupplyMap);
......@@ -6547,15 +6578,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
demandSupplyMap.put(12, tranSerDet);
demandSupplyMap.put(13, siteCodeDEt);
//pavan R on 28nov18 [to get siteCodeSupplier if suppSour is D]
indxCnt = indexOfADPElement(siteCodeDEt, itemCodeDet);
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
if("D".equals(checkNull(adpEle.getSuppSour())))
if(adpeList.size() >= indxCnt && indxCnt > 0)
{
ADPElement adpEle = (ADPElement) adpeList.get(indxCnt);
SuppSour = adpEle.getSuppSour() == null ? "" : adpEle.getSuppSour();
suppSite = adpEle.getSiteCodeSupp() == null ? "" : adpEle.getSiteCodeSupp();
}
if("D".equals(checkNull(SuppSour)))
{
demandSupplyMap.put(14, checkNull(adpEle.getSiteCodeSupp()));
demandSupplyMap.put(14, suppSite);
}else{
demandSupplyMap.put(14, " ");
}
System.out.println("6544 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+adpEle.getSuppSour()+"]adpEle.getSiteCodeSupp()["+adpEle.getSiteCodeSupp()+"]");
}
System.out.println("6617 indxCnt["+indxCnt+"]adpeList["+adpeList.size()+"]adpEle.getSuppSour()["+SuppSour+"]adpEle.getSiteCodeSupp()["+suppSite+"]");
//pavan R on 28nov18
demandSupplyList.add(demandSupplyMap);
......@@ -13836,7 +13871,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
commInfo.append("<EMAIL_TYPE>page</EMAIL_TYPE><XML_DATA_FILE_PATH>"+fileName+"</XML_DATA_FILE_PATH><ENTITY_CODE></ENTITY_CODE>");
commInfo.append("</ROOT>");
EMail email = new EMail();
mailRetStr=email.sendMail(commInfo.toString(), "ITM");
//Added by Pavan R on 03dec18
DBAccessEJB dbAccess = new DBAccessEJB();
String loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
UserInfoBean userInfo = dbAccess.createUserInfo(loginCode);
//mailRetStr=email.sendMail(commInfo.toString(), "ITM");
mailRetStr=email.sendMail(commInfo.toString(), "ITM", userInfo);
//Pavan R on 03dec18 end
System.out.println("@V@ Mail return String :- ["+mailRetStr+"]");
if(mailRetStr.contains("S"))
......@@ -15130,7 +15171,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
+"</XML_DATA_FILE_PATH><ENTITY_CODE></ENTITY_CODE>");
commInfo.append("</ROOT>");
EMail email = new EMail();
mailRetStr=email.sendMail(commInfo.toString(), "ITM");
//Added by Pavan R on 03dec18
DBAccessEJB dbAccess = new DBAccessEJB();
String loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
UserInfoBean userInfo = dbAccess.createUserInfo(loginCode);
//mailRetStr=email.sendMail(commInfo.toString(), "ITM");
mailRetStr=email.sendMail(commInfo.toString(), "ITM", userInfo);
//Pavan R on 03dec18 end
System.out.println("@V@ Mail return String :- ["+mailRetStr+"]");
if(mailRetStr.contains("S"))
......
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