Commit 88c2a9fe authored by sanashaikh's avatar sanashaikh

Sana S: Modified on 28/02/20

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217298 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fef25d03
......@@ -144,7 +144,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
{
//HRLogWriter logWriter = new HRLogWriter();//Modified by Sana S on 28/11/19
EmpLeaveConf empLeaveConf=new EmpLeaveConf();
SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yy");
SimpleDateFormat sdf=null;
ResultSet rs = null;
PreparedStatement pstmt = null;
......@@ -188,6 +188,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
try
{
sdf=new SimpleDateFormat(genericUtility.getApplDateFormat());
userId=genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
System.out.println("User Id in Process:"+userId);
......@@ -525,7 +527,6 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
System.out.print("insertcount:"+insertcount);
if(pstmt != null)
{
pstmt.close();
......@@ -657,7 +658,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
String resignEmp = null;
String procGroupTo = null;
String procGroupFrom = null;
String relieveDate= null;
String relieveDate= "";
String expDate= null;
String upToDate=null;
String effDate= null;
......@@ -666,7 +667,6 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
String fName= null,lName= null,mName= null,balDays= null,paySite= null,temp= null,procDate = null;
Timestamp ldProcess=null;//Added by Sana S on 31/12/19
SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yy");
Map dwDataMap = null;
Map dataMap = null;
......@@ -675,6 +675,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
try
{
SimpleDateFormat sdf=new SimpleDateFormat(genericUtility.getApplDateFormat());
StringBuffer valueXmlString1 = new StringBuffer("<?xml version = \"1.0\"?>");
valueXmlString1.append("<DocumentRoot>");
valueXmlString1.append("<description>").append("Datawindow Root").append("</description>");
......@@ -835,21 +837,27 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
dwDataMap.put("emp_fname", checkNull(rs.getString("emp_fname")));
dwDataMap.put("emp_mname", checkNull(rs.getString("emp_mname")));
dwDataMap.put("emp_lname", checkNull(rs.getString("emp_lname")));
dwDataMap.put("relieve_date", rs.getDate("relieve_date"));
//Modifed by Sana S on [27/02/20] [start]
dwDataMap.put("relieve_date", sdf.format(rs.getDate("relieve_date")));
//dwDataMap.put("relieve_date", rs.getString("relieve_date"));
System.out.print("Relieve Date:"+rs.getString("relieve_date"));
dwDataMap.put("eff_date", rs.getDate("eff_date"));
/*dwDataMap.put("eff_date", rs.getDate("eff_date"));
dwDataMap.put("upto_date", rs.getDate("upto_date"));
dwDataMap.put("exp_date", rs.getDate("exp_date"));
dwDataMap.put("exp_date", rs.getDate("exp_date"));*/
dwDataMap.put("eff_date", sdf.format(rs.getDate("eff_date")));
dwDataMap.put("upto_date", sdf.format(rs.getDate("upto_date")));
dwDataMap.put("exp_date", sdf.format(rs.getDate("exp_date")));
//Modifed by Sana S on [27/02/20] [end]
dwDataMap.put("bal_days", checkNull(rs.getString("bal_days")));
dwDataMap.put("pay_site", checkNull(rs.getString("pay_site")));
//dwDataMap.put("temp"," ");
dataMap.put(rowCnt, dwDataMap);
dwDataMap = null;
System.out.println("MAP Data :::::::::::"+dataMap);
}
System.out.println("MAP Data :::::::::::"+dataMap);
if (rs != null)
{
rs.close();
......@@ -862,12 +870,14 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
}
sql="select lve_tblno from grade_site_lvetbl where site_code = ? and grade_code= ? ";
//pstmt1 = conn.prepareStatement(sql);//Modifed by Sana S on [27/02/20]
pstmt1 = conn.prepareStatement(sql);
System.out.print("dataMap.size():"+dataMap.size());
for(int i=1; i <= dataMap.size(); i++)
{
rowMap=(Map) dataMap.get(i);
System.out.print("rowMap Data:"+rowMap);
empCode=(String)rowMap.get("emp_code");
grade = (String) rowMap.get("grade");
......@@ -881,19 +891,23 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
//relieveDate = sdf.format(rowMap.get("relieve_date"));
relieveDate = (String) rowMap.get("relieve_date");
System.out.print("relieveDate:"+relieveDate);
System.out.println("relieveDate>>>"+relieveDate);
//Date rDate=sdf.parse(relieveDate);
effDate = sdf.format(rowMap.get("eff_date"));
expDate = sdf.format(rowMap.get("exp_date"));
/*effDate = sdf.format(rowMap.get("eff_date"));
expDate = sdf.format(rowMap.get("exp_date"));*/
effDate = (String) rowMap.get("eff_date");
expDate = (String)rowMap.get("exp_date");
balDays = (String) rowMap.get("bal_days");
paySite = (String) rowMap.get("pay_site");
upToDate =sdf.format(rowMap.get("upto_date"));
// upToDate =sdf.format(rowMap.get("upto_date"));
upToDate = (String)rowMap.get("upto_date");
//temp = (String) rowMap.get("temp");
System.out.println("effDate:["+effDate+"]");
pstmt1 = conn.prepareStatement(sql);//Modifed by Sana S on [27/02/20]
pstmt1.setString(1, workSite);
pstmt1.setString(2, grade);
rs1 = pstmt1.executeQuery();
......@@ -961,14 +975,12 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
dwDataMap.put("temp", "D");
dataMap.put(i, dwDataMap);
System.out.println("MAP Data after encashable:::::::::::"+dataMap);
}
//////////////xml///////
valueXmlString1.append("<Detail2>\r\n");
valueXmlString1.append("<attribute updateFlag='N' selected='N' />\r\n");
valueXmlString1.append("<emp_code><![CDATA[").append((empCode == null ) ? " ":empCode).append("]]></emp_code>\r\n");
valueXmlString1.append("<emp_fname><![CDATA[").append((fName == null) ? " ":fName).append("]]></emp_fname>\r\n");
valueXmlString1.append("<emp_mname><![CDATA[").append((mName == null ) ? " ":mName).append("]]></emp_mname>\r\n");
valueXmlString1.append("<emp_lname><![CDATA[").append((lName == null ) ? " ":lName).append("]]></emp_lname>\r\n");
......@@ -988,12 +1000,9 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
valueXmlString1.append("<work_site><![CDATA[").append((workSite == null ) ? " ":workSite).append("]]></work_site>\r\n");
valueXmlString1.append("<pay_site><![CDATA[").append((paySite == null ) ? " ":paySite).append("]]></pay_site>\r\n");
valueXmlString1.append("<temp><![CDATA[").append((temp == null ) ? " ":temp).append("]]></temp>\r\n");
valueXmlString1.append("</Detail2>\r\n");
///////////////////////
}
valueXmlString1.append("</Header0>\r\n");
valueXmlString1.append("</group0>\r\n");
valueXmlString1.append("</DocumentRoot>\r\n");
......@@ -1001,7 +1010,6 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
System.out.println("ResultString....." + resultString);
System.out.println("ResultString....." + valueXmlString1);
////
if(dataMap.size() <= 0)
{
resultString = itmDBAccessEJB.getErrorString("","VTPOST0", userId, "", conn);
......
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