Commit 278fffc8 authored by caluka's avatar caluka

setting change user and change term in Physical Count Scheduler Process


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95834 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 53ba5d93
......@@ -76,7 +76,7 @@ public String process(Document headerDom, Document detailDom, String windowName,
conn.setAutoCommit(false);
PhysicalCountSchedule phycntprc = new PhysicalCountSchedule();
resultString = phycntprc.insertSchedule(loginSiteCode, loginEmpCode,userInfo);
resultString = phycntprc.insertSchedule(loginSiteCode, loginEmpCode,userInfo,windowName,xtraParams);
} // end of try code
catch(Exception e)
{
......
......@@ -160,7 +160,7 @@ public class PhysicalCountSchedule implements Schedule
{
loginSiteCode = rs.getString(1);
System.out.println("Site code======**************====> "+loginSiteCode);
insertSchedule(loginSiteCode,userInfo.getEmpCode(),userInfo);
insertSchedule(loginSiteCode,userInfo.getEmpCode(),userInfo,"","");
}
if(pstmt!=null)
{
......@@ -183,7 +183,7 @@ public class PhysicalCountSchedule implements Schedule
if(isExist(conn, "site", "site_code" ,loginSiteCode))
{
System.out.println("Site code from actualLoginSiteCode======**************====> "+loginSiteCode);
insertSchedule(loginSiteCode,userInfo.getEmpCode(),userInfo);
insertSchedule(loginSiteCode,userInfo.getEmpCode(),userInfo,"","");
}
}
}
......@@ -202,7 +202,7 @@ public class PhysicalCountSchedule implements Schedule
}
return "";
}
public String insertSchedule(String loginSiteCode,String empCode,UserInfoBean userInfo)
public String insertSchedule(String loginSiteCode,String empCode,UserInfoBean userInfo,String windowName,String xtraParams)
{
String errString = null;
Connection conn = null;
......@@ -235,6 +235,7 @@ public class PhysicalCountSchedule implements Schedule
String lotNo="";
String lotSl="";
String cycleCriteria="";
String chgUser1="",chgTerm1="";
int cycleCount=0;
int currentMonth=0;
......@@ -524,7 +525,17 @@ public class PhysicalCountSchedule implements Schedule
pstmt.executeUpdate();
pstmt.close();
pstmt=null;
System.out.println("windowName["+windowName+"]");
if(windowName.trim().length()>0)
{
chgUser1 = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
chgTerm1 = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId");
}
else
{
chgUser1="SYSTEM";
chgTerm1="SYSTEM";
}
System.out.println("currentMonthInString="+currentMonthInString);
queryString="insert into physcan (tran_id,tran_date,site_code,chg_date,chg_user,chg_term,tran_type) values(?,?,?,?,?,?,?)";
pstmt=conn.prepareStatement(queryString);
......@@ -534,8 +545,10 @@ public class PhysicalCountSchedule implements Schedule
pstmt.setTimestamp(4,dts);
// pstmt.setString(5,userInfo.getLoginCode());
// pstmt.setString(6,userInfo.getRemoteHost());
pstmt.setString(5,"SYSTEM"); // ADDED BY RITESH ON 28/MAR/2014
pstmt.setString(6,"SYSTEM"); // ADDED BY RITESH ON 28/MAR/2014
//pstmt.setString(5,"SYSTEM"); // ADDED BY RITESH ON 28/MAR/2014
//pstmt.setString(6,"SYSTEM"); // ADDED BY RITESH ON 28/MAR/2014
pstmt.setString(5,chgUser1); // ADDED BY CHANDRASHEKAR ON 07/AUG/2014
pstmt.setString(6,chgTerm1); // ADDED BY CHANDRASHEKAR ON 07/AUG/2014
pstmt.setString(7,"A");
pstmt.executeUpdate();
pstmt.close();
......
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