Commit e41ae498 authored by pbhosale's avatar pbhosale

* done Changes by Poonam B[04-OCT-2019]

arrears_deletion11.xml
ArrearsDeletePrc.java
ArrearsDeleteIC.java
PayarrToProc.java
ArrearsDeletion.sql
d_arrears_deletion_filt.srd


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208892 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 09eb5c77
update transetup set edit_expr = 'and payarr_to_proc.status not in('D')' where tran_window = 'w_payarr_to_proc';
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('DELRECO ',' Record Deleted !','You can not insert the record because record is already disable','E','Y',null,null,null,to_date('25-SEP-19','DD-MON-RR'),'BASE ','BASE ',null,null);
update SYSTEM_EVENTS set SERVICE_CODE = 'poic_default_ejb', COMP_TYPE = 'JB', COMP_NAME = 'ibase.webitm.ejb.adm.ArrearsDeleteIC' where OBJ_NAME = 'arrears_deletion' and EVENT_CODE = 'post_item_change';
update SYSTEM_EVENTS set SERVICE_CODE = 'prv_default_ejb', COMP_TYPE = 'JB', COMP_NAME = 'ibase.webitm.ejb.adm.ArrearsDeleteIC' where OBJ_NAME = 'arrears_deletion' and EVENT_CODE = 'pre_validate';
update SYSTEM_EVENTS set SERVICE_CODE = 'prc_default_ejb', COMP_TYPE = 'JB', COMP_NAME = 'ibase.webitm.ejb.adm.adv.ArrearsDeletePrc' where OBJ_NAME = 'arrears_deletion' and EVENT_CODE = 'process';
\ No newline at end of file
$PBExportHeader$d_arrears_deletion_filt.srd
release 9;
datawindow(units=1 timer_interval=0 color=79741120 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 24 print.margin.right = 24 print.margin.top = 24 print.margin.bottom = 24 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=250 color="536870912" )
table(column=(type=char(6) updatewhereclause=no name=prd_code__fr dbname="prd_code__fr" )
column=(type=char(6) updatewhereclause=no name=prd_code__to dbname="prd_code__to" )
column=(type=char(5) updatewhereclause=no name=site_code__fr dbname="site_code__fr" )
column=(type=char(5) updatewhereclause=no name=site_code__to dbname="site_code__to" )
column=(type=char(10) updatewhereclause=no name=emp_code__fr dbname="emp_code__fr" )
column=(type=char(10) updatewhereclause=no name=emp_code__to dbname="emp_code__to" )
column=(type=char(10) updatewhereclause=no name=proc_group__to dbname="proc_group__to" )
column=(type=char(6) updatewhereclause=no name=prd_code__acc dbname="prd_code__acc" )
column=(type=char(10) updatewhereclause=no name=type dbname="type" initial="AR" values="Arrears AR/Payroll PY/" )
column=(type=char(10) updatewhereclause=no name=proc_group__fr dbname="proc_group__fr" )
)
groupbox(band=detail text="Basic"border="5" color="33554432" x="23" y="18" height="197" width="463" name=gb_1 visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=detail alignment="1" text="Type :" border="5" color="0" x="59" y="38" height="16" width="100" html.valueishtml="0" name=type_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=9 alignment="0" tabsequence=10 border="5" color="0" x="166" y="38" height="16" width="66" format="[general]" html.valueishtml="0" name=type visible="1" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any ddlb.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=5 alignment="0" tabsequence=20 border="5" color="0" x="165" y="65" height="16" width="66" format="[general]" html.valueishtml="0" name=emp_code__fr visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Employee From :" border="5" color="0" x="59" y="64" height="15" width="100" html.valueishtml="0" name=emp_code__fr_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
text(band=detail alignment="1" text="Site From :" border="5" color="0" x="59" y="89" height="16" width="100" html.valueishtml="0" name=site_code__fr_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
column(band=detail id=3 alignment="0" tabsequence=40 border="5" color="0" x="165" y="89" height="16" width="66" format="[general]" html.valueishtml="0" name=site_code__fr visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=6 alignment="0" tabsequence=30 border="5" color="0" x="336" y="65" height="16" width="80" format="[general]" html.valueishtml="0" name=emp_code__to visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=2 alignment="0" tabsequence=60 border="5" color="0" x="336" y="114" height="16" width="80" format="" html.valueishtml="0" name=prd_code__to visible="1" edit.limit=6 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=7 alignment="0" tabsequence=80 border="5" color="0" x="336" y="139" height="16" width="80" format="[general]" html.valueishtml="0" name=proc_group__to visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="5" color="0" x="336" y="89" height="16" width="80" format="[general]" html.valueishtml="0" name=site_code__to visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
text(band=detail alignment="1" text="Employee To :" border="5" color="0" x="246" y="65" height="15" width="84" html.valueishtml="0" name=emp_code__to_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=detail alignment="1" text="Site To :" border="5" color="0" x="246" y="89" height="15" width="84" html.valueishtml="0" name=site_code__to_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=detail alignment="1" text="Period From :" border="5" color="0" x="60" y="114" height="16" width="100" html.valueishtml="0" name=prd_code__fr_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
text(band=detail alignment="1" text="Proc Group From :" border="5" color="0" x="59" y="139" height="15" width="100" html.valueishtml="0" name=proc_group__fr_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
text(band=detail alignment="1" text="Period Acc. :" border="5" color="0" x="59" y="163" height="16" width="100" html.valueishtml="0" name=prd_code__acc_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
column(band=detail id=1 alignment="0" tabsequence=50 border="5" color="0" x="165" y="114" height="16" width="66" format="" html.valueishtml="0" name=prd_code__fr visible="1" edit.limit=6 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=10 alignment="0" tabsequence=70 border="5" color="0" x="166" y="138" height="16" width="66" format="[general]" html.valueishtml="0" name=proc_group__fr visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=8 alignment="0" tabsequence=90 border="5" color="0" x="166" y="162" height="16" width="66" format="[general]" html.valueishtml="0" name=prd_code__acc visible="1" edit.limit=6 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
text(band=detail alignment="1" text="Period To :" border="5" color="0" x="246" y="114" height="15" width="84" html.valueishtml="0" name=prd_code__to_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=detail alignment="1" text="Proc Group To :" border="5" color="0" x="246" y="139" height="15" width="84" html.valueishtml="0" name=proc_group__to_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
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 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
......@@ -7,19 +7,12 @@ import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.ejb.CommonDBAccessEJB;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
......@@ -90,7 +83,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
parentNodeList = dom.getElementsByTagName("Detail1");
int parentNodeListLen = parentNodeList.getLength();
System.out.println("Number of node in parentNodeListLen : "+parentNodeListLen);
for ( int rowCnt=0; rowCnt < parentNodeListLen; rowCnt++ )
for ( int rowCnt = 0; rowCnt < parentNodeListLen; rowCnt++ )
{
parentNode = parentNodeList.item(rowCnt);
childNodeList = parentNode.getChildNodes();
......@@ -111,7 +104,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
}
else
{
columnCtr =getColumnValue("period", "code", prdCodeFr, conn);
columnCtr = getColumnValue("period", "code", prdCodeFr, conn);
if(columnCtr == 0)
{
errCode = "INVFRPRD";
......@@ -175,6 +168,10 @@ public class ArrearsDeleteIC extends ValidatorEJB
{
prdCodeAcc = E12GenericUtility.checkNull(genericUtility.getColumnValue("prd_code__acc", dom));
System.out.println("Period Code From:"+prdCodeAcc);
//Added by Poonam B[26-SEP-2019][START]
String type = E12GenericUtility.checkNull(genericUtility.getColumnValue("type", dom));
if("AR".equalsIgnoreCase(type))
{
if(E12GenericUtility.checkNull(prdCodeAcc).length() <= 0)
{
errCode = "NULLACPRD";
......@@ -185,7 +182,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
else if(E12GenericUtility.checkNull(prdCodeAcc).length() > 0)
{
columnCtr = getColumnValue("period", "code", prdCodeAcc , conn );
if(columnCtr==0)
if(columnCtr == 0)
{
errCode = "INVACCPRD";
errList.add(errCode);
......@@ -194,6 +191,9 @@ public class ArrearsDeleteIC extends ValidatorEJB
}
}
}
//Added by Poonam B[26-SEP-2019][START]
}
}
int errListSize = errList.size();
cnt =0;
......@@ -303,7 +303,8 @@ public class ArrearsDeleteIC extends ValidatorEJB
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
System.out.println("itemchanged on the ArrearsDelete");
String loginEmpCode = "",loginSiteCode="";
String loginEmpCode = "",loginSiteCode = "";
String type = ""; //Added By Poonam B[25-SEP-2019]
int currentFormNo = 0;
StringBuffer valueXmlString = new StringBuffer();
......@@ -325,12 +326,38 @@ public class ArrearsDeleteIC extends ValidatorEJB
case 1:
{
valueXmlString.append("<Detail1>\r\n");
if ("itm_default".equalsIgnoreCase(currentColumn))
{
System.out.println("currentColumn1:::::" + currentColumn);
valueXmlString.append( "<site_code__fr><![CDATA[" ).append(loginSiteCode).append( "]]></site_code__fr>\r\n" );
valueXmlString.append( "<site_code__to><![CDATA[" ).append(loginSiteCode).append( "]]></site_code__to>\r\n" );
}
//Added By Poonam B[25-SEP-2019][START]
if (currentColumn.trim().equalsIgnoreCase("type"))
{
type = E12GenericUtility.checkNull(genericUtility.getColumnValue("type", dom));
System.out.println("currentColumn2:::::" + currentColumn);
System.out.println("type ===>" +type);
if("PY".equalsIgnoreCase(type))
{
valueXmlString.append("<prd_code__acc protect=\"1\"><![CDATA[]]></prd_code__acc>\r\n");
}
else
{
String prdCodeAcc = E12GenericUtility.checkNull(genericUtility.getColumnValue("prd_code__acc", dom));
System.out.println("prdCodeAcc in IC===>" +prdCodeAcc);
valueXmlString.append("<prd_code__acc protect=\"0\"><![CDATA[]]></prd_code__acc>\r\n");
}
}
if (currentColumn.trim().equalsIgnoreCase("site_code__fr"))
{
System.out.println("currentColumn3:::::" + currentColumn);
String siteCodeFr = E12GenericUtility.checkNull(genericUtility.getColumnValue("site_code__fr", dom));
valueXmlString.append( "<site_code__to><![CDATA[" ).append(siteCodeFr).append( "]]></site_code__to>\r\n" );
}
//Added By Poonam B[25-SEP-2019][END]
valueXmlString.append("</Detail1>\r\n");
}
valueXmlString.append("</Root>\r\n");
......@@ -401,7 +428,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
}
return msgType;
}
public int getColumnValue(String tableName ,String columnName , String columnValue , Connection con)
public int getColumnValue(String tableName ,String columnName ,String columnValue , Connection con)
{
String sql = "";
int count=0;
......
......@@ -9,6 +9,7 @@ import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
//import javax.ejb.Stateless;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
......@@ -17,8 +18,9 @@ import org.w3c.dom.NodeList;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
//@Stateless
public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,PayarrToProcRemote
{
//modified by Shital on 12/07/2019 [Start]
......@@ -192,7 +194,19 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
}
//Modified by Ahmed on 31-AUG-2018[To break and return error message when validation fails]end
}
//Added By Poonam B [25-SEP-2019][START]
if(status.trim().equalsIgnoreCase("D"))
{
errCode = "DELRECO";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
msgType = errorType(conn, errCode);
if (msgType.equalsIgnoreCase("E"))
{
break;
}
}
//Added By Poonam B [25-SEP-2019][END]
sql = "select usr_lev from users where code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, loginCode);
......@@ -490,15 +504,13 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
errList = null;
errFields.clear();
errFields = null;
errStringXml.append("</Errors> </Root> \r\n");
}
else
{
errStringXml = new StringBuffer("");
}
}
errStringXml.append("</Errors> </Root> \r\n");
}
catch(SQLException se)
{
......@@ -724,6 +736,25 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
xmlString.append("<status protect=\"0\"><![CDATA[").append(checkNull(status)).append("]]></status>\r\n");
System.out.println("IN ELSE CONDITION::::::::::");
}
//Added by Poonam B[25-SEP-2019][START]
if((status.trim().equalsIgnoreCase("D") ))
{
System.out.println("IN IF CONDITION::::::::::");
xmlString.append("<status protect=\"1\"><![CDATA[").append(checkNull(status)).append("]]></status>\r\n");
xmlString.append("<emp_code protect=\"1\"><![CDATA[").append(checkNull(empCode)).append("]]></emp_code>\r\n");
xmlString.append("<site protect=\"1\"><![CDATA[").append(checkNull(site)).append("]]></site>\r\n");
xmlString.append("<descr protect=\"1\"><![CDATA[").append(checkNull(descr)).append("]]></descr>\r\n");
xmlString.append("<prd_code protect=\"1\"><![CDATA[").append(checkNull(prdCode)).append("]]></prd_code>\r\n");
xmlString.append("<prd_code__acc protect=\"1\"><![CDATA[").append(checkNull(prdCodeAcc)).append("]]></prd_code__acc>\r\n");
xmlString.append("<proc_date protect=\"1\"><![CDATA[").append(checkNull(procDate)).append("]]></proc_date>\r\n");
xmlString.append("<proc_type protect=\"1\"><![CDATA[").append(procType).append("]]></proc_type>\r\n");
xmlString.append("<tran_id protect=\"1\"><![CDATA[").append(checkNull(tranId)).append("]]></tran_id>\r\n");
xmlString.append("<chg_date><![CDATA[").append(checkNull(chgDate)).append("]]></chg_date>\r\n");
xmlString.append("<chg_user><![CDATA[").append(checkNull(chgUser)).append("]]></chg_user>\r\n");
xmlString.append("<chg_term><![CDATA[").append(checkNull(chgTerm)).append("]]></chg_term>\r\n");
}
//Added by Poonam B[25-SEP-2019][END]
}
//added emp_code itemchange by Varsha V on 24-08-18 [START] A17ESUN001
else if (currentColumn.trim().equalsIgnoreCase("emp_code"))
......@@ -849,7 +880,6 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
}
}
xmlString.append("</Root>\r\n");
}
catch (Exception ex)
{
......@@ -888,7 +918,7 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
}
}
System.out.println("value of xmlString::::" + xmlString);
xmlString.append("</Root>\r\n");
System.out.println("xmlString....[" + xmlString.toString());
return xmlString.toString();
}
......
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