Commit 0df90707 authored by smane's avatar smane

In PoRcpConf.java file added code for LOCK_GROUP column value by sagar


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95031 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 36ab9d30
...@@ -56,7 +56,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -56,7 +56,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
* @param xtraParams contais additional information such as loginEmpCode,loginCode,chgTerm etc * @param xtraParams contais additional information such as loginEmpCode,loginCode,chgTerm etc
* @param forcedFlag (true or false) * @param forcedFlag (true or false)
*/ */
String userId = "", termId = ""; String userId = "", termId = "",lckGroup="" ;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
CommonConstants commonConstants = new CommonConstants(); CommonConstants commonConstants = new CommonConstants();
...@@ -842,11 +842,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -842,11 +842,13 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
if (retString == null || retString.trim().length() == 0 ) if (retString == null || retString.trim().length() == 0 )
{ {
System.out.println(">>>>>>>>>>>>>>>Lock group for updation:"+lckGroup);
confDate = new java.sql.Timestamp(System.currentTimeMillis()); confDate = new java.sql.Timestamp(System.currentTimeMillis());
sql = "UPDATE PORCP SET CONFIRMED = 'Y',CONF_DATE = ? WHERE TRAN_ID = ? "; sql = "UPDATE PORCP SET CONFIRMED = 'Y',CONF_DATE = ?, LOCK_GROUP=? WHERE TRAN_ID = ? "; //add LOCK_GROUP by Sagar M. 03/MAy/14
pstmtUpd = conn.prepareStatement(sql); pstmtUpd = conn.prepareStatement(sql);
pstmtUpd.setTimestamp(1, confDate); pstmtUpd.setTimestamp(1, confDate);
pstmtUpd.setString(2, tranId); pstmtUpd.setString(2, lckGroup);
pstmtUpd.setString(3, tranId);
updCnt = pstmtUpd.executeUpdate(); updCnt = pstmtUpd.executeUpdate();
pstmtUpd.close(); pstmtUpd.close();
pstmtUpd = null; pstmtUpd = null;
...@@ -900,6 +902,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -900,6 +902,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
} }
catch(Exception e) catch(Exception e)
{ {
try try
{ {
conn.rollback(); conn.rollback();
...@@ -913,6 +916,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -913,6 +916,8 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
} }
finally finally
{ {
lckGroup="";
System.out.println(">>>>>>>>>>>>>>>>>Finaly lckGroup vaalue:"+lckGroup);
try try
{ {
if(pstmtSql != null) if(pstmtSql != null)
...@@ -1085,6 +1090,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -1085,6 +1090,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
///////////////////////////////////////////////// /////////////////////////////////////////////////
// populate the supplier lock list // populate the supplier lock list
System.out.println(">>>>>>>>>>>>>>>>>>>Before add to lckGroup in supplier:"+lckGroup);
sql = "select lock_group From supplier " sql = "select lock_group From supplier "
+ " where supp_code = ? " ; + " where supp_code = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1093,6 +1099,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -1093,6 +1099,7 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
if ( rs.next() ) if ( rs.next() )
{ {
lockGroup = rs.getString("lock_group"); lockGroup = rs.getString("lock_group");
System.out.println(">>>>>>>>lockGroup in supplier:"+lockGroup);
} }
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
...@@ -1225,14 +1232,28 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -1225,14 +1232,28 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
if ( rs1.next() ) if ( rs1.next() )
{ {
tempLockGroup = rs1.getString("lock_group"); tempLockGroup = rs1.getString("lock_group");
System.out.println(">>>>>>>>>>Lock Group in supplieritem:"+tempLockGroup);
} }
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
itemLockList = null; itemLockList = null;
//Added by Sagar M. on 06/05/14 start
if(tempLockGroup != null && tempLockGroup.trim().length() > 0)
{
lckGroup=tempLockGroup;
System.out.println(">>>>>>>>Add to lckGroup for supplieritem:"+lckGroup);
}
else if(lockGroup != null && lockGroup.trim().length() > 0)
{
lckGroup=lockGroup;
System.out.println(">>>>>>>>Add to lckGroup for supplier:"+lckGroup);
}
//Added by Sagar M. on 06/05/14 end
if (tempLockGroup != null && tempLockGroup.trim().length() > 0) if (tempLockGroup != null && tempLockGroup.trim().length() > 0)
{ {
itemLockList = new ArrayList(); itemLockList = new ArrayList();
sql = "select lock_code from lock_group " sql = "select lock_code from lock_group "
+ " where lock_group = ? " ; + " where lock_group = ? " ;
...@@ -1248,7 +1269,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -1248,7 +1269,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
pstmt1 = null; pstmt1 = null;
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
} }
else if(suppLockList.size() > 0) else if(suppLockList.size() > 0)
{ {
......
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