Commit 2fc35342 authored by pgole's avatar pgole

Updated EJB for [F16ASUN006].


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101564 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 56346d43
...@@ -196,40 +196,13 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo ...@@ -196,40 +196,13 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(acctPrd != null && finEntity != null )
{
//System.out.println(" finEntity.trim() =====> [" + finEntity.trim() + "]" + "acctPrd.trim()"+acctPrd.trim());
if ("A".equalsIgnoreCase(editFlag) && childNode.getFirstChild() != null )
{
sqlfin = "SELECT COUNT(1) FROM RELA_PARTY_APPL WHERE FIN_ENTITY = ? AND ACCT_PRD = ?";
pstmt = conn.prepareStatement( sqlfin );
pstmt.setString(1,finEntity.trim());
pstmt.setString(2,acctPrd.trim());
finrs = pstmt.executeQuery();
if( finrs.next() )
{
cntfin = finrs.getInt( 1 );
}
System.out.println(" COUNT =====> [" + cntfin + "]");
if( cntfin > 0 )
{
errCode = "VTDUFINENT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
finrs.close();
finrs = null;
pstmt.close();
pstmt = null;
}
}
} }
} }
if ( childNodeName.equalsIgnoreCase( "tran_cat" ) ) if ( childNodeName.equalsIgnoreCase( "tran_cat" ) )
{ {
//System.out.println("Inside wfval tran_cat>>>"); System.out.println("Inside wfval tran_cat>>>");
tranCat= checkNull(genericUtility.getColumnValue("tran_cat",dom)); tranCat= checkNull(genericUtility.getColumnValue("tran_cat",dom));
if ( tranCat == null || tranCat.trim().length() == 0) if ( tranCat == null || tranCat.trim().length() == 0)
{ {
...@@ -239,6 +212,11 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo ...@@ -239,6 +212,11 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo
} }
else else
{ {
//System.out.println("Inside wfval fin_entity else>>>"+finEntity);
acctPrd = genericUtility.getColumnValue( "acct_prd", dom);
finEntity = genericUtility.getColumnValue( "fin_entity", dom);
sql = " SELECT COUNT(*) FROM TRANSACTION_CAT WHERE TRAN_CAT ='" + tranCat.trim() + "' AND ACTIVE = 'Y'"; sql = " SELECT COUNT(*) FROM TRANSACTION_CAT WHERE TRAN_CAT ='" + tranCat.trim() + "' AND ACTIVE = 'Y'";
pstmt = conn.prepareStatement( sql ); pstmt = conn.prepareStatement( sql );
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -257,6 +235,36 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo ...@@ -257,6 +235,36 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(acctPrd != null && finEntity != null && tranCat != null )
{
//System.out.println(" finEntity.trim() =====> [" + finEntity.trim() + "]" + "acctPrd.trim()"+acctPrd.trim());
if ("A".equalsIgnoreCase(editFlag) && childNode.getFirstChild() != null )
{
sqlfin = "SELECT COUNT(1) FROM RELA_PARTY_APPL WHERE FIN_ENTITY = ? AND ACCT_PRD = ? AND TRAN_CAT = ?";
pstmt = conn.prepareStatement( sqlfin );
pstmt.setString(1,finEntity.trim());
pstmt.setString(2,acctPrd.trim());
pstmt.setString(3,tranCat.trim());
finrs = pstmt.executeQuery();
if( finrs.next() )
{
cntfin = finrs.getInt( 1 );
}
System.out.println(" COUNT =====> [" + cntfin + "]");
if( cntfin > 0 )
{
errCode = "VTDUFINENT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
finrs.close();
finrs = null;
pstmt.close();
pstmt = null;
}
}
} }
} }
if ( childNodeName.equalsIgnoreCase( "proj_turnover" ) ) if ( childNodeName.equalsIgnoreCase( "proj_turnover" ) )
...@@ -480,7 +488,7 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo ...@@ -480,7 +488,7 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo
sql = "SELECT F.DESCR FINENT_DESCR FROM FINENT F WHERE F.FIN_ENTITY = ? "; sql = "SELECT F.DESCR FINENT_DESCR FROM FINENT F WHERE F.FIN_ENTITY = ? ";
pStmt = conn.prepareStatement( sql ); pStmt = conn.prepareStatement( sql );
pStmt.setString(1,finEntity); pStmt.setString(1,finEntity.toUpperCase());
rs = pStmt.executeQuery(); rs = pStmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
...@@ -499,7 +507,7 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo ...@@ -499,7 +507,7 @@ public class RelaPartyApplIC extends ValidatorEJB implements RelaPartyApplICRemo
sql = "SELECT T.DESCR DESCR FROM TRANSACTION_CAT T WHERE T.TRAN_CAT = ? "; sql = "SELECT T.DESCR DESCR FROM TRANSACTION_CAT T WHERE T.TRAN_CAT = ? ";
pStmt = conn.prepareStatement( sql ); pStmt = conn.prepareStatement( sql );
pStmt.setString(1,tranCat); pStmt.setString(1,tranCat.toUpperCase());
rs = pStmt.executeQuery(); rs = pStmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
......
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