Commit ca7700de authored by dpingle's avatar dpingle

* updated sql ,xml , src and srd file

loanscheme11.xml
loanscheme21.xml
w_loanscheme.sql
d_loanscheme_brow.srd
d_loanscheme_edit.srd
LoanSchemeIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213426 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0aebe47e
......@@ -58,18 +58,21 @@
</table_column>
<table_column>
<type size="40">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>descr</name>
<dbname>loan_scheme.descr</dbname>
</table_column>
<table_column>
<type size="5">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>scheme_type</name>
<dbname>loan_scheme.scheme_type</dbname>
</table_column>
<table_column>
<type precision="3">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>min_amt</name>
<dbname>loan_scheme.min_amt</dbname>
......@@ -77,6 +80,7 @@
</table_column>
<table_column>
<type precision="3">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>max_amt</name>
<dbname>loan_scheme.max_amt</dbname>
......@@ -84,6 +88,7 @@
</table_column>
<table_column>
<type precision="2">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>interest</name>
<dbname>loan_scheme.interest</dbname>
......@@ -91,12 +96,14 @@
</table_column>
<table_column>
<type size="5">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>source_code</name>
<dbname>loan_scheme.source_code</dbname>
</table_column>
<table_column>
<type precision="0">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>term</name>
<dbname>loan_scheme.term</dbname>
......@@ -104,6 +111,7 @@
</table_column>
<table_column>
<type size="5">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>ad_code__ded</name>
<dbname>loan_scheme.ad_code__ded</dbname>
......@@ -122,24 +130,33 @@
<dbname>loan_scheme.chg_user</dbname>
</table_column>
<table_column>
<type size="15">char</type>
<type size="300">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>chg_term</name>
<dbname>loan_scheme.chg_term</dbname>
</table_column>
<table_column>
<type size="5">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>ad_code__source</name>
<dbname>loan_scheme.ad_code__source</dbname>
</table_column>
<table_column>
<type precision="3">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>adv_perc</name>
<dbname>loan_scheme.adv_perc</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;loan_scheme&quot; ) COLUMN(NAME=&quot;loan_scheme.scheme_no&quot;) COLUMN(NAME=&quot;loan_scheme.descr&quot;) COLUMN(NAME=&quot;loan_scheme.scheme_type&quot;) COLUMN(NAME=&quot;loan_scheme.min_amt&quot;) COLUMN(NAME=&quot;loan_scheme.max_amt&quot;) COLUMN(NAME=&quot;loan_scheme.interest&quot;) COLUMN(NAME=&quot;loan_scheme.source_code&quot;) COLUMN(NAME=&quot;loan_scheme.term&quot;) COLUMN(NAME=&quot;loan_scheme.ad_code__ded&quot;) COLUMN(NAME=&quot;loan_scheme.chg_date&quot;) COLUMN(NAME=&quot;loan_scheme.chg_user&quot;) COLUMN(NAME=&quot;loan_scheme.chg_term&quot;) COLUMN(NAME=&quot;loan_scheme.ad_code__source&quot;) COLUMN(NAME=&quot;loan_scheme.adv_perc&quot;)) </retrieve>
<table_column>
<type size="1">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>elig_check</name>
<dbname>loan_scheme.elig_check</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;loan_scheme&quot; ) COLUMN(NAME=&quot;loan_scheme.scheme_no&quot;) COLUMN(NAME=&quot;loan_scheme.descr&quot;) COLUMN(NAME=&quot;loan_scheme.scheme_type&quot;) COLUMN(NAME=&quot;loan_scheme.min_amt&quot;) COLUMN(NAME=&quot;loan_scheme.max_amt&quot;) COLUMN(NAME=&quot;loan_scheme.interest&quot;) COLUMN(NAME=&quot;loan_scheme.source_code&quot;) COLUMN(NAME=&quot;loan_scheme.term&quot;) COLUMN(NAME=&quot;loan_scheme.ad_code__ded&quot;) COLUMN(NAME=&quot;loan_scheme.chg_date&quot;) COLUMN(NAME=&quot;loan_scheme.chg_user&quot;) COLUMN(NAME=&quot;loan_scheme.chg_term&quot;) COLUMN(NAME=&quot;loan_scheme.ad_code__source&quot;) COLUMN(NAME=&quot;loan_scheme.adv_perc&quot;) COLUMN(NAME=&quot;loan_scheme.elig_check&quot;)) </retrieve>
<update>LOAN_SCHEME</update>
<updatewhere>1</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
......@@ -377,7 +394,7 @@
<x>514</x>
<y>2</y>
<height>16</height>
<width>57</width>
<width>78</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -402,10 +419,10 @@
<text>Src. Ad. Code</text>
<border>6</border>
<color>0</color>
<x>573</x>
<x>594</x>
<y>2</y>
<height>16</height>
<width>74</width>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -430,7 +447,7 @@
<text>Adv. Perc.</text>
<border>6</border>
<color>0</color>
<x>649</x>
<x>696</x>
<y>2</y>
<height>16</height>
<width>151</width>
......@@ -458,7 +475,7 @@
<text>change date</text>
<border>6</border>
<color>0</color>
<x>802</x>
<x>849</x>
<y>2</y>
<height>16</height>
<width>79</width>
......@@ -486,7 +503,7 @@
<text>change user</text>
<border>6</border>
<color>0</color>
<x>883</x>
<x>930</x>
<y>2</y>
<height>16</height>
<width>79</width>
......@@ -514,7 +531,7 @@
<text>change term</text>
<border>6</border>
<color>0</color>
<x>964</x>
<x>1011</x>
<y>2</y>
<height>16</height>
<width>79</width>
......@@ -536,6 +553,34 @@
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Elig Check</text>
<border>0</border>
<color>33554432</color>
<x>1092</x>
<y>2</y>
<height>16</height>
<width>63</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>elig_check_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>553648127</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
......@@ -668,7 +713,7 @@
<name>min_amt</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>12</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
......@@ -706,7 +751,7 @@
<name>max_amt</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>12</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
......@@ -744,7 +789,7 @@
<name>interest</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>4</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
......@@ -821,7 +866,7 @@
<tag>Maximum months for which the loan can be given</tag>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>3</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
......@@ -851,7 +896,7 @@
<x>514</x>
<y>2</y>
<height>16</height>
<width>57</width>
<width>78</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -886,10 +931,10 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>573</x>
<x>594</x>
<y>2</y>
<height>16</height>
<width>74</width>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -897,7 +942,7 @@
<name>ad_code__source</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>5</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
......@@ -922,7 +967,7 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>649</x>
<x>696</x>
<y>2</y>
<height>16</height>
<width>151</width>
......@@ -933,7 +978,7 @@
<name>adv_perc</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>14</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
......@@ -958,7 +1003,7 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>802</x>
<x>849</x>
<y>2</y>
<height>16</height>
<width>79</width>
......@@ -994,7 +1039,7 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>883</x>
<x>930</x>
<y>2</y>
<height>16</height>
<width>79</width>
......@@ -1030,7 +1075,7 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>964</x>
<x>1011</x>
<y>2</y>
<height>16</height>
<width>79</width>
......@@ -1059,6 +1104,42 @@
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>15</id>
<alignment>0</alignment>
<tabsequence>100</tabsequence>
<border>0</border>
<color>0</color>
<x>1092</x>
<y>2</y>
<height>16</height>
<width>63</width>
<format>[Yes/No]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>elig_check</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>1</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<HtmlTable>
<border>1</border>
</HtmlTable>
......
......@@ -84,6 +84,8 @@ public class LoanSchemeIC extends ValidatorEJB implements LoanSchemeLocal, LoanS
String adCodeSource = "";
String adCode = "";
String mVal2 = "";
String schemeNo = "";
String descr = "";
int currentFormNo = 0;
int noOfChilds = 0;
int counter;
......@@ -134,7 +136,45 @@ public class LoanSchemeIC extends ValidatorEJB implements LoanSchemeLocal, LoanS
childNodeName = childNode.getNodeName();
System.out.println("childNodeName.editFlag." + childNodeName + "" + editFlag);
System.out.println("@V@ Edit flag :- [" + editFlag + "");
if (childNodeName.trim().equalsIgnoreCase("ad_code__ded"))
if (childNodeName.trim().equalsIgnoreCase("scheme_no"))
{
schemeNo = checkNull(genericUtility.getColumnValue("scheme_no", dom));
if(schemeNo.length() == 0 || schemeNo == null)
{
errList.add("EMPSCHEME1");
errFields.add(childNodeName.toLowerCase());
}
else
{
cnt = 0 ;
sql="select count(*) as cnt from loan_scheme where scheme_no=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, schemeNo);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
System.out.println("cnt:::: " + cnt+editFlag);
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (cnt > 0 && !"E".equalsIgnoreCase(editFlag))
{
errList.add("EMPSCHEME2");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if (childNodeName.trim().equalsIgnoreCase("ad_code__ded"))
{
adCodeDed = checkNull(genericUtility.getColumnValue("ad_code__ded", dom));
sql = "select bal_opt, post_yn from allwdedn where ad_code = ?";
......@@ -279,7 +319,7 @@ public class LoanSchemeIC extends ValidatorEJB implements LoanSchemeLocal, LoanS
}
else if(childNodeName.trim().equalsIgnoreCase("cctr_code__loan") || childNodeName.trim().equalsIgnoreCase("cctr_code__pay"))
{
cctrCodeLoan = checkNull(genericUtility.getColumnValue("cctr_code__loan", dom));
cctrCodeLoan = checkNull(genericUtility.getColumnValue(childNodeName, dom));
if(cctrCodeLoan != null && cctrCodeLoan.trim().length() > 0)
{
sql="select count(*) as cnt from costctr where cctr_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