Commit bb6a24bb authored by ajadhav's avatar ajadhav

call nfCheckPeriod using finCommon object

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176854 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e70ab3fe
...@@ -26,7 +26,7 @@ public class AutoPmtGen extends ValidatorEJB implements AutoPmtGenLocal,AutoPmtG ...@@ -26,7 +26,7 @@ public class AutoPmtGen extends ValidatorEJB implements AutoPmtGenLocal,AutoPmtG
// GenericUtility genericUtility = GenericUtility.getInstance(); // GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
FinCommon finCommon = new FinCommon();
/*public void ejbCreate() throws RemoteException, CreateException /*public void ejbCreate() throws RemoteException, CreateException
{ {
System.out.println("Entering into AutoPmtGenEJB............."); System.out.println("Entering into AutoPmtGenEJB.............");
...@@ -375,7 +375,10 @@ conn = getConnection(); ...@@ -375,7 +375,10 @@ conn = getConnection();
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
sdf = new SimpleDateFormat(genericUtility.getDBDateFormat()); sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
Date payDt = sdf.parse(genericUtility.getValidDateString(payDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat())); Date payDt = sdf.parse(genericUtility.getValidDateString(payDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));
errCode = itmDBAccessEJB.nfCheckPeriod("FIN",payDt,siteCode,conn); //Changes and Commented By Ajay on 21-12-2017:START
//errCode = itmDBAccessEJB.nfCheckPeriod("FIN",payDt,siteCode,conn);
errCode=finCommon.nfCheckPeriod("FIN",payDt,siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != "") if(errCode != "")
{ {
errString = getErrorString("site_code__fr",errCode,userId); errString = getErrorString("site_code__fr",errCode,userId);
......
...@@ -149,7 +149,10 @@ conn = getConnection(); ...@@ -149,7 +149,10 @@ conn = getConnection();
//Transtr = this.genericUtility.getColumnValue("TranDate", dom); //Transtr = this.genericUtility.getColumnValue("TranDate", dom);
siteCode =this.genericUtility.getColumnValue("site_code", dom); siteCode =this.genericUtility.getColumnValue("site_code", dom);
tranDate = dateFormat.parse(this.genericUtility.getColumnValue("tran_date", dom)); tranDate = dateFormat.parse(this.genericUtility.getColumnValue("tran_date", dom));
errCode = this.nfCheckPeriod("FIN", tranDate, siteCode); //Changes and Commented By Ajay on 21-12-2017:START
//errCode = this.nfCheckPeriod("FIN", tranDate, siteCode);
errCode=finCommon.nfCheckPeriod("FIN", tranDate, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != null && errCode.trim().length() >0) if(errCode != null && errCode.trim().length() >0)
{ {
errList.add(errCode); errList.add(errCode);
......
...@@ -28,6 +28,7 @@ import javax.ejb.Stateless; ...@@ -28,6 +28,7 @@ import javax.ejb.Stateless;
@Stateless @Stateless
public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, EcollectionICRemote { public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, EcollectionICRemote {
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException, ITMException { public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException, ITMException {
String errString = ""; String errString = "";
...@@ -145,7 +146,10 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E ...@@ -145,7 +146,10 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
errCode = nfCheckPeriod("FIN", tranDate, siteCode); //Changes and Commented By Ajay on 21-12-2017:START
//errCode = nfCheckPeriod("FIN", tranDate, siteCode);
errCode=finCommon.nfCheckPeriod("FIN", tranDate, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if (errCode != null && errCode.trim().length() > 0) { if (errCode != null && errCode.trim().length() > 0) {
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
......
...@@ -25,6 +25,7 @@ import javax.ejb.Stateless; // added for ejb3 ...@@ -25,6 +25,7 @@ import javax.ejb.Stateless; // added for ejb3
public class MiscPayAuto extends ValidatorEJB implements MiscPayAutoLocal,MiscPayAutoRemote // SessionBean public class MiscPayAuto extends ValidatorEJB implements MiscPayAutoLocal,MiscPayAutoRemote // SessionBean
{ {
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
/*public void ejbCreate() throws RemoteException,CreateException{ /*public void ejbCreate() throws RemoteException,CreateException{
} }
...@@ -232,7 +233,10 @@ public class MiscPayAuto extends ValidatorEJB implements MiscPayAutoLocal,MiscPa ...@@ -232,7 +233,10 @@ public class MiscPayAuto extends ValidatorEJB implements MiscPayAutoLocal,MiscPa
} }
tranDate = sdf.parse(columnValue.substring(0,8)); tranDate = sdf.parse(columnValue.substring(0,8));
siteCode = genericUtility.getColumnValue("site_code__fr",dom); siteCode = genericUtility.getColumnValue("site_code__fr",dom);
errCode = nfCheckPeriod("FIN",tranDate , siteCode); //Changes and Commented By Ajay on 21-12-2017:START
//errCode = nfCheckPeriod("FIN",tranDate , siteCode);
errCode = finCommon.nfCheckPeriod("FIN",tranDate , siteCode,conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != null && errCode.trim().length() > 0){ if(errCode != null && errCode.trim().length() > 0){
errString = itmDBAccess.getErrorString("date__pay",errCode,userId); errString = itmDBAccess.getErrorString("date__pay",errCode,userId);
break; break;
......
...@@ -32,6 +32,7 @@ public class MiscVchEmpIC extends ValidatorEJB implements MiscVchEmpICLocal,Misc ...@@ -32,6 +32,7 @@ public class MiscVchEmpIC extends ValidatorEJB implements MiscVchEmpICLocal,Misc
{ {
// GenericUtility genericUtility = GenericUtility.getInstance(); // GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2,String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException public String wfValData(String xmlString, String xmlString1, String xmlString2,String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
System.out.println("------------ wfvalData method called-----------------"); System.out.println("------------ wfvalData method called-----------------");
...@@ -263,8 +264,11 @@ conn = getConnection(); ...@@ -263,8 +264,11 @@ conn = getConnection();
}else{ }else{
if(tranDate.length() > 0){ if(tranDate.length() > 0){
tranDateL=simpleDateFormatObj.parse(tranDate); tranDateL=simpleDateFormatObj.parse(tranDate);
String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode)); //Changes and Commented By Ajay on 21-12-2017:START
System.out.println("Period check111--->>["+code+"]"); //String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode));
String code=finCommon.nfCheckPeriod("FIN", tranDateL, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
System.out.println("Period check111--->>["+code+"]");
if(code.length() > 0){ if(code.length() > 0){
errCode = code; errCode = code;
errList.add( errCode ); errList.add( errCode );
......
...@@ -189,7 +189,10 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -189,7 +189,10 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
try try
{ {
tranPdate = simpleDateFormat.parse(tranDate); tranPdate = simpleDateFormat.parse(tranDate);
errCode = validator.nfCheckPeriod("FIN",new java.util.Date(tranPdate.getTime()),siteCode); //Changes and Commented By Ajay on 21-12-2017:START
//errCode = validator.nfCheckPeriod("FIN",new java.util.Date(tranPdate.getTime()),siteCode);
errCode=finCommon.nfCheckPeriod("FIN",new java.util.Date(tranPdate.getTime()),siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
} }
catch (ParseException e) catch (ParseException e)
{ {
......
...@@ -371,7 +371,10 @@ conn = getConnection(); ...@@ -371,7 +371,10 @@ conn = getConnection();
System.out.println("prioddddddddd"); System.out.println("prioddddddddd");
tranDate = dateFormat2.parse(this.genericUtility.getColumnValue("tran_date", dom)); tranDate = dateFormat2.parse(this.genericUtility.getColumnValue("tran_date", dom));
errCode = this.nfCheckPeriod("FIN", tranDate, siteCode); //Changes and Commented By Ajay on 21-12-2017:START
//errCode = this.nfCheckPeriod("FIN", tranDate, siteCode);
errCode = finCommon.nfCheckPeriod("FIN", tranDate, siteCode, conn);
//Changes and Commented By Ajay on 21-12-2017:END
if(errCode != null && errCode.trim().length() >0) if(errCode != null && errCode.trim().length() >0)
{ {
errList.add(errCode); errList.add(errCode);
......
...@@ -37,7 +37,7 @@ import org.w3c.dom.NodeList; ...@@ -37,7 +37,7 @@ import org.w3c.dom.NodeList;
public class SalesBudgetCustIC extends ValidatorEJB implements SalesBudgetCustICLocal,SalesBudgetCustICRemote public class SalesBudgetCustIC extends ValidatorEJB implements SalesBudgetCustICLocal,SalesBudgetCustICRemote
{ {
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1, String xmlString2,String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException public String wfValData(String xmlString, String xmlString1, String xmlString2,String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
System.out.println("------------ wfvalData method called-----------------"); System.out.println("------------ wfvalData method called-----------------");
...@@ -153,7 +153,10 @@ conn = getConnection(); ...@@ -153,7 +153,10 @@ conn = getConnection();
}else{ }else{
if(tranDate.length() > 0){ if(tranDate.length() > 0){
tranDateL=simpleDateFormatObj.parse(tranDate); tranDateL=simpleDateFormatObj.parse(tranDate);
String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode)); //Changes and Commented By Ajay on 21-12-2017:START
//String code = checkNull(this.nfCheckPeriod("FIN", tranDateL, siteCode));
String code = checkNull(finCommon.nfCheckPeriod("FIN", tranDateL, siteCode, conn));
//Changes and Commented By Ajay on 21-12-2017:END
System.out.println("Period check111--->>["+code+"]"); System.out.println("Period check111--->>["+code+"]");
if(code.length() > 0){ if(code.length() > 0){
errCode = code; errCode = code;
......
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