Commit 0f29f95c authored by rtelang's avatar rtelang

*Added updated SQL, SRD, metadata and components of Change Bond Details menu [07-01-2020]

employee_bond_def11.xml
employee_bond_def12.xml
employee_bond_def21.xml
employee_bond_def22.xml
d_employee_bond_def11.srd
d_employee_bond_def12.srd
d_employee_bond_def21.srd
d_employee_bond_def22.srd
EmpBondDefault.java
EmpBondDefaultLocal.java
EmpBondDefConfirm.java
EmpBondDefinition.java
EmpBondDefinitionLocal.java
EmpBondDefinitionPrs.java
EmpBondDefinitionRemote.java
w_employee_bond_def.sql
ChangeBondDetails.png
ChangeBondDetailswht.png


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214726 ce508802-f39f-4f6c-b175-0d175dae99d5
parent deb22b95
This diff is collapsed.
......@@ -30,6 +30,10 @@
<overrideprintjob>no</overrideprintjob>
</print>
</BaseDefinition>
<Header>
<height>2</height>
<color>536870912</color>
</Header>
<Summary>
<height>0</height>
<color>536870912</color>
......@@ -39,7 +43,7 @@
<color>536870912</color>
</Footer>
<Detail>
<height>206</height>
<height>378</height>
<color>536870912</color>
</Detail>
<TableDefinition>
......@@ -104,9 +108,9 @@
<text>Basic</text>
<border>2</border>
<color>0</color>
<x>9</x>
<y>0</y>
<height>199</height>
<x>10</x>
<y>22</y>
<height>149</height>
<width>523</width>
<name>gb_1</name>
<visible>1</visible>
......@@ -162,44 +166,6 @@
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>153</x>
<y>123</y>
<height>16</height>
<width>108</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>4</id>
......@@ -294,34 +260,6 @@
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Transaction Id:</text>
<border>0</border>
<color>33554432</color>
<x>56</x>
<y>123</y>
<height>16</height>
<width>93</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
......@@ -381,17 +319,17 @@
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Line No:</text>
<text>Line No Reference:</text>
<border>0</border>
<color>33554432</color>
<x>83</x>
<x>275</x>
<y>60</y>
<height>16</height>
<width>66</width>
<width>139</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no_t</name>
<name>line_no__ref_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
......@@ -408,27 +346,27 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<id>7</id>
<alignment>1</alignment>
<tabsequence>32766</tabsequence>
<tabsequence>10</tabsequence>
<border>5</border>
<color>255</color>
<x>153</x>
<color>0</color>
<x>418</x>
<y>60</y>
<height>16</height>
<width>72</width>
<format>[general]</format>
<format>##0</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no</name>
<name>line_no__ref</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>3</limit>
<case>any</case>
<format>##0</format>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<autoselect>no</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -440,25 +378,35 @@
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>1</alignment>
<text>Line No Reference:</text>
<border>0</border>
<color>33554432</color>
<x>274</x>
<y>60</y>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>417</x>
<y>81</y>
<height>16</height>
<width>139</width>
<width>72</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>t_1</name>
<name>bond_amt__curr</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
......@@ -471,30 +419,31 @@
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<id>5</id>
<alignment>1</alignment>
<tabsequence>10</tabsequence>
<tabsequence>30</tabsequence>
<border>5</border>
<color>0</color>
<x>417</x>
<y>60</y>
<y>102</y>
<height>16</height>
<width>72</width>
<format>##0</format>
<format>##,###,##0.00</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no__ref</name>
<name>bond_amt</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>3</limit>
<limit>13</limit>
<case>any</case>
<format>##0</format>
<format>##,###,##0.00</format>
<focusrectangle>no</focusrectangle>
<autoselect>no</autoselect>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -512,23 +461,23 @@
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>1</alignment>
<id>1</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>417</x>
<y>81</y>
<x>152</x>
<y>123</y>
<height>16</height>
<width>72</width>
<width>108</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>bond_amt__curr</name>
<name>tran_id</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
......@@ -548,27 +497,82 @@
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Transaction Id:</text>
<border>0</border>
<color>33554432</color>
<x>55</x>
<y>123</y>
<height>16</height>
<width>93</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Line No:</text>
<border>0</border>
<color>33554432</color>
<x>84</x>
<y>59</y>
<height>16</height>
<width>66</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<id>2</id>
<alignment>1</alignment>
<tabsequence>30</tabsequence>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>417</x>
<y>102</y>
<color>255</color>
<x>154</x>
<y>59</y>
<height>16</height>
<width>72</width>
<format>##,###,##0.00</format>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>bond_amt</name>
<name>line_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>13</limit>
<limit>0</limit>
<case>any</case>
<format>##,###,##0.00</format>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
......@@ -583,8 +587,8 @@
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<HtmlTable>
......
......@@ -21,12 +21,12 @@ text(band=header alignment="1" text="Bond Amount" border="6" color="33554432" x=
text(band=header alignment="1" text="Bond Period" border="6" color="33554432" x="526" y="2" height="16" width="81" html.valueishtml="0" name=bond_prd_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="1" text="Line No Reference" border="6" color="33554432" x="609" y="2" height="16" width="114" html.valueishtml="0" name=line_no__ref_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=1 alignment="0" tabsequence=10 border="5" color="33554432" x="2" y="2" height="16" width="90" format="[general]" html.valueishtml="0" name=tran_id visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=5 alignment="1" tabsequence=50 border="5" color="33554432" x="422" y="2" height="16" width="102" format="[general]" html.valueishtml="0" name=bond_amt visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=3 alignment="1" tabsequence=30 border="5" color="33554432" x="153" y="2" height="16" width="137" format="[general]" html.valueishtml="0" name=bond_amt__curr visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=2 alignment="1" tabsequence=20 border="5" color="33554432" x="94" y="2" height="16" width="57" format="[general]" html.valueishtml="0" name=line_no visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=4 alignment="1" tabsequence=40 border="5" color="33554432" x="292" y="2" height="16" width="128" format="[general]" html.valueishtml="0" name=bond_prd__curr visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=6 alignment="1" tabsequence=60 border="5" color="33554432" x="526" y="2" height="16" width="81" format="[general]" html.valueishtml="0" name=bond_prd visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=7 alignment="1" tabsequence=70 border="5" color="33554432" x="609" y="2" height="16" width="114" format="[general]" html.valueishtml="0" name=line_no__ref visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=5 alignment="1" tabsequence=50 border="5" color="33554432" x="422" y="2" height="16" width="102" format="[general]" html.valueishtml="0" name=bond_amt visible="1" edit.limit=13 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=3 alignment="1" tabsequence=30 border="5" color="33554432" x="153" y="2" height="16" width="137" format="[general]" html.valueishtml="0" name=bond_amt__curr visible="1" edit.limit=13 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=2 alignment="1" tabsequence=20 border="5" color="33554432" x="94" y="2" height="16" width="57" format="[general]" html.valueishtml="0" name=line_no visible="1" edit.limit=3 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=4 alignment="1" tabsequence=40 border="5" color="33554432" x="292" y="2" height="16" width="128" format="[general]" html.valueishtml="0" name=bond_prd__curr visible="1" edit.limit=2 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=6 alignment="1" tabsequence=60 border="5" color="33554432" x="526" y="2" height="16" width="81" format="[general]" html.valueishtml="0" name=bond_prd visible="1" edit.limit=2 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=7 alignment="1" tabsequence=70 border="5" color="33554432" x="609" y="2" height="16" width="114" format="[general]" html.valueishtml="0" name=line_no__ref visible="1" edit.limit=3 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
......
package ibase.webitm.ejb.adm;
import ibase.webitm.ejb.dis.DistCommon;
import java.rmi.RemoteException;
import org.w3c.dom.*;
//import javax.ejb.EJBObject;
import javax.ejb.Local;
import org.w3c.dom.Document;
import ibase.webitm.ejb.*;
//import javax.ejb.EJBObject;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local;
@Local
public interface EmpBondDefinitionLocal extends ValidatorLocal {
public String wfValData() throws RemoteException,ITMException;
......
......@@ -293,9 +293,7 @@ public class EmpBondDefinitionPrs extends ValidatorEJB implements EmpBondDefinit
//Added by RAHUL SHENOY on 21/08/2015 [Validation for duplicate value in the same transaction].Start
private boolean checkDuplicateBondPeriod(Document dom)
{
NodeList parentList = null;
NodeList childList = null;
Node parentNode = null;
......
package ibase.webitm.ejb.adm;
import ibase.webitm.ejb.dis.DistCommon;
import java.rmi.RemoteException;
import org.w3c.dom.*;
//import javax.ejb.EJBObject;
import javax.ejb.Remote;
import org.w3c.dom.Document;
import ibase.webitm.ejb.*;
//import javax.ejb.EJBObject;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; // added for ejb3
@Remote
public interface EmpBondDefinitionRemote extends ValidatorLocal{
public String wfValData() throws RemoteException,ITMException;
......
......@@ -5,6 +5,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.ejb.Stateless;
......@@ -65,6 +66,14 @@ public class EmpBondDefConfirm extends ActionHandlerEJB implements EmpBondDefCon
E12GenericUtility genericUtility = new E12GenericUtility();
// Modified by Dipesh P on [17/12/2019]End [CCF No: IT2018-015][Request ID: A19ISUN011]
//Added by Yashwant S.on 18-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
Timestamp changeDate = null;
String chgUser = "";
String chgTerm = "";
String refNo = "";
//Added by Yashwant S.on 18-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
double bondamt=0.0;
int lineno=0,bondprd=0,updCnt=0;
......@@ -88,6 +97,28 @@ public class EmpBondDefConfirm extends ActionHandlerEJB implements EmpBondDefCon
{
userId = "SYSTEM";
}
//Added by Yashwant S.on 23-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
Date todate = new Date();
changeDate =new java.sql.Timestamp(todate.getTime());
System.out.println("changeDate -->"+changeDate);
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chg_user");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chg_term");
System.out.println("chgUser -->"+chgUser);
System.out.println("chgTerm -->"+chgTerm);
if(chgUser == null || chgUser.trim().length() == 0)
{
chgUser = "SYSTEM";
}
if(chgTerm == null || chgTerm.trim().length() == 0)
{
chgTerm = "SYSTEM";
}
//Added by Yashwant S.on 23-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
/*ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator");*/
conn=getConnection();
......@@ -150,6 +181,34 @@ public class EmpBondDefConfirm extends ActionHandlerEJB implements EmpBondDefCon
conn.rollback();
return errString;
}
//Added by Yashwant S.on 27-12-19[Start][Validation against cancel voucher][CCF No: IT2018-015 / Request ID: A18CSUN011]
else if(tranIdPvouch != null && tranIdPvouch.trim().length() > 0)
{
sql = "select REF_NO from PAYR_VOUCHER where TRAN_ID = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranIdPvouch);
rs = pstmt.executeQuery();
if (rs.next())
{
refNo = checkNull(rs.getString("REF_NO"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(refNo != null && refNo.toUpperCase().startsWith("RV-"))
{
errString = itmdbAccess.getErrorString("", "VTEBNDDF15", userId, "", conn); //You can't do recovery against cancel voucher
return errString;
}
}
//Added by Yashwant S.on 27-12-19[Start][Validation against cancel voucher][CCF No: IT2018-015 / Request ID: A18CSUN011]
// Modified by Dipesh P on [17/12/2019]Start [CCF No: IT2018-015][Request ID: A19ISUN011]
if (tranIdBond == null || tranIdBond.trim().length() == 0)
......@@ -225,7 +284,11 @@ public class EmpBondDefConfirm extends ActionHandlerEJB implements EmpBondDefCon
pstmt = conn.prepareStatement(sql);
//sqlInsert = "Insert into employee_bond ( EMP_CODE , LINE_NO , BOND_PRD , BOND_AMT) values ( ? , ? , ? , ? )";
sqlInsert = "Insert into employee_bond ( EMP_CODE , LINE_NO , BOND_PRD , BOND_AMT , TRAN_ID , TRAN_ID__PVOUCH , LINE_NO__PVOUCH , AD_CODE) values ( ? , ? , ? , ? , ? , ? , ? , ?)";
//Added by Yashwant S.on 23-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
//sqlInsert = "Insert into employee_bond ( EMP_CODE , LINE_NO , BOND_PRD , BOND_AMT , TRAN_ID , TRAN_ID__PVOUCH , LINE_NO__PVOUCH , AD_CODE) values ( ? , ? , ? , ? , ? , ? , ? , ?)";
sqlInsert = "Insert into employee_bond ( EMP_CODE , LINE_NO , BOND_PRD , BOND_AMT , TRAN_ID , TRAN_ID__PVOUCH , LINE_NO__PVOUCH , AD_CODE, CHG_DATE, CHG_USER, CHG_TERM) values ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )";
//Added by Yashwant S.on 23-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
pstmtInsert = conn.prepareStatement(sqlInsert);
//sqlMaxLineNo="select max(line_no) as max_line_no from employee_bond where emp_code = ? ";
......@@ -299,6 +362,13 @@ public class EmpBondDefConfirm extends ActionHandlerEJB implements EmpBondDefCon
pstmtInsert.setString(8, adCode);
// Modified by Dipesh P on [19/12/2019]End [CCF No: IT2018-015][Request ID: A19ISUN011]
//Added by Yashwant S.on 23-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
pstmtInsert.setTimestamp(9, changeDate);
pstmtInsert.setString(10, chgUser);
pstmtInsert.setString(11, chgTerm);
//Added by Yashwant S.on 23-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
insertCnt = pstmtInsert.executeUpdate();
totUpdCnt = totUpdCnt + insertCnt;
System.out.println("Value of insertCnt is : ["+insertCnt+"]");
......@@ -569,4 +639,3 @@ public class EmpBondDefConfirm extends ActionHandlerEJB implements EmpBondDefCon
}
\ No newline at end of file
package ibase.webitm.ejb.adm.adv;
import java.io.StringWriter;
//import java.io.StringWriter;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
//import java.util.ArrayList;
import javax.ejb.Stateless;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
//import javax.xml.transform.OutputKeys;
//import javax.xml.transform.Transformer;
//import javax.xml.transform.TransformerException;
//import javax.xml.transform.TransformerFactory;
//import javax.xml.transform.dom.DOMSource;
//import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.system.config.ConnDriver;
import ibase.webitm.utility.GenericUtility;
//import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
......@@ -31,7 +32,11 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException, ITMException
{
Document dom = null;
GenericUtility genericUtility = GenericUtility.getInstance();
//Added by Yashwant S. on 19-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
//Added by Yashwant S. on 19-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
String retString = "";
try
......@@ -53,11 +58,13 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
private String actionHandler(String actionType, Document dom, String objContext, String xtraParams) throws ITMException
{
System.out.println(":::: Inside Default ::::");
String sql = "", childNodeName = "";
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
//ConnDriver connDriver = new ConnDriver();
NodeList parentNodeList = null, childNodeList = null;
Node parentNode = null, childNode = null;
......@@ -65,9 +72,16 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
NodeList parentNodeListDet2 = null;
int bondAmt=0,bondPrd=0;
GenericUtility genericUtility;
//Added by Yashwant S. on 19-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
//GenericUtility genericUtility;
E12GenericUtility genericUtility = null;
String tranIdBond = "";
//Added by Yashwant S. on 19-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
StringBuffer valueXmlBuff;
String retString = "",empcode="", userId = "";
ValidatorEJB validatorEJB;
int lineNo=0;
......@@ -78,8 +92,11 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
validatorEJB = new ValidatorEJB();
userId = validatorEJB.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
valueXmlBuff = new StringBuffer();
genericUtility = GenericUtility.getInstance();
//Added by Yashwant S. on 19-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
//genericUtility = GenericUtility.getInstance();
genericUtility = new E12GenericUtility();
//Added by Yashwant S. on 19-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
valueXmlBuff.append("<?xml version=\"1.0\"?>\r\n");
valueXmlBuff.append("<Root>\r\n");
......@@ -101,10 +118,12 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
}
}
conn = connDriver.getConnectDB("DriverITM");
//Added by Yashwant S. on 19-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
/*conn = connDriver.getConnectDB("DriverITM");
connDriver = null;*/
conn = getConnection();
conn.setAutoCommit(false);
connDriver = null;
//Added by Yashwant S. on 19-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
//Modified by RAHUL SHENOY on 19/08/2015 [Fetch and display data only if no rows are present in detail2].Start
......@@ -119,18 +138,25 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
{
System.out.println("*** ParentNodeListDet2 Length==>>" + parentNodeListDet2.getLength() +" ***");
empcode = genericUtility.getColumnValue("emp_code",dom);
sql="select line_no,bond_prd,bond_amt from employee_bond where emp_code= ? ";
//Added by Yashwant S. on 19-12-19[Start][Added TranId Bond][CCF No: IT2018-015 / Request ID: A18CSUN011]
//empcode = genericUtility.getColumnValue("emp_code",dom);
empcode = checkNull(genericUtility.getColumnValue("emp_code", dom, "1"));
tranIdBond = checkNull(genericUtility.getColumnValue("tran_id__bond", dom, "1"));
if((empcode != null && empcode.trim().length() > 0) && (tranIdBond != null && tranIdBond.trim().length() > 0))
{
//sql="select line_no,bond_prd,bond_amt from employee_bond where emp_code= ? ";
sql = "select line_no, bond_prd, bond_amt from employee_bond where emp_code = ? and tran_id = ? order by bond_prd ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empcode);
pstmt.setString(2, tranIdBond);
//Added by Yashwant S. on 19-12-19[End][Added TranId Bond][CCF No: IT2018-015 / Request ID: A18CSUN011]
rs = pstmt.executeQuery();
while (rs.next())
{
// lineNo++;
lineNo=rs.getInt("LINE_NO");
lineNo = rs.getInt("LINE_NO");
bondAmt = rs.getInt("BOND_AMT");
bondPrd = rs.getInt("BOND_PRD");
......@@ -152,9 +178,8 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
valueXmlBuff.append("</Detail>\r\n");
System.out.println("------->>>>Line no :"+lineNo+" Bond Amt :"+bondAmt+" bond period : "+bondPrd);
}
}//End If
}
valueXmlBuff.append("</Root>\r\n");
......@@ -261,4 +286,16 @@ public class EmpBondDefault extends ActionHandlerEJB implements EmpBondDefaultL
}
//Added by RAHUL SHENOY on 20/08/2015 [Getting the deleted Row count].End
//Added by Yashwant S. on 19-12-19[Start][CCF No: IT2018-015 / Request ID: A18CSUN011]
private String checkNull(String input)
{
if (input == null)
{
input = "";
}
return input;
}
//Added by Yashwant S. on 19-12-19[End][CCF No: IT2018-015 / Request ID: A18CSUN011]
}
\ No newline at end of file
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import javax.ejb.Remote;
import javax.ejb.Local;
import ibase.webitm.ejb.ActionHandlerLocal;
import ibase.webitm.ejb.ActionHandlerRemote;
import ibase.webitm.utility.ITMException;
@Local
public interface EmpBondDefaultLocal extends ActionHandlerLocal
{
public String actionHandler(String actionType, String xmlString, String objContext, String xtraParams) throws RemoteException, ITMException;
......
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