Commit 1939ec30 authored by pchavan's avatar pchavan

Revert on click of confirm button development.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@181961 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a735e750
...@@ -178,6 +178,75 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -178,6 +178,75 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
return retString; return retString;
} else } else
{ {
/*//Added By PriyankaC 05/03/2018.[START]
System.out.println("tran_id : " +tranId);
sql ="SELECT ITEM_CODE FROM PORCPDET WHERE TRAN_ID= ? ";
pstmtSql = conn.prepareStatement(sql);
pstmtSql.setString(1, tranId);
rs = pstmtSql.executeQuery();
while (rs.next())
{
itemCode = checkNull(rs.getString("ITEM_CODE"));
sh.add(itemCode);
}
System.out.println("itemCode :" +itemCode +"Hashset" +sh);
if (pstmtSql != null)
{
pstmtSql.close();
pstmtSql = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(sh.isEmpty() == false)
{
Iterator itr = sh.iterator();
while(itr.hasNext())
{
sItem = sItem + "'"+(String) itr.next() + "'"+",";
}
}
if(sItem != null && sItem.length() != 0)
{
sItem = sItem.substring(0,sItem.length()-1);
}
else
{
sItem = "''";
}
System.out.println("sItem : " +sItem);
sql ="SELECT INV_SRNO_REQD FROM ITEM WHERE ITEM_CODE in ("+sItem+") ";
pstmtSql = conn.prepareStatement(sql);
// pstmtSql.setString(1, itemCode);
rs = pstmtSql.executeQuery();
while (rs.next())
{
invserialNo = checkNull(rs.getString("INV_SRNO_REQD"));
System.out.println("invserialNo : "+invserialNo);
if ("Y".equalsIgnoreCase(invserialNo))
{
retString = itmDBAccessLocal.getErrorString("", "VTINVSRNRQ", "");
return retString;
}
}
if (pstmtSql != null)
{
pstmtSql.close();
pstmtSql = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
//Added By PriyankaC on 05/03/2018.. [END]
*/
retString = retrieveReceipt(tranId, 1, conn, xtraParams); retString = retrieveReceipt(tranId, 1, conn, xtraParams);
if (retString == null || retString.trim().length() == 0) if (retString == null || retString.trim().length() == 0)
{ {
...@@ -227,72 +296,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp ...@@ -227,72 +296,6 @@ public class PoRcpConf extends ActionHandlerEJB implements PoRcpConfLocal, PoRcp
conn.rollback(); conn.rollback();
} }
} }
//Added By PriyankaC 05/03/2018.[START]
System.out.println("tran_id : " +tranId);
sql ="SELECT ITEM_CODE FROM PORCPDET WHERE TRAN_ID= ? ";
pstmtSql = conn.prepareStatement(sql);
pstmtSql.setString(1, tranId);
rs = pstmtSql.executeQuery();
while (rs.next())
{
itemCode = checkNull(rs.getString("ITEM_CODE"));
sh.add(itemCode);
}
System.out.println("itemCode :" +itemCode +"Hashset" +sh);
if (pstmtSql != null)
{
pstmtSql.close();
pstmtSql = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if(sh.isEmpty() == false)
{
Iterator itr = sh.iterator();
while(itr.hasNext())
{
sItem = sItem + "'"+(String) itr.next() + "'"+",";
}
}
if(sItem != null && sItem.length() != 0)
{
sItem = sItem.substring(0,sItem.length()-1);
}
else
{
sItem = "''";
}
System.out.println("sItem : " +sItem);
sql ="SELECT INV_SRNO_REQD FROM ITEM WHERE ITEM_CODE in ("+sItem+") ";
pstmtSql = conn.prepareStatement(sql);
// pstmtSql.setString(1, itemCode);
rs = pstmtSql.executeQuery();
while (rs.next())
{
invserialNo = checkNull(rs.getString("INV_SRNO_REQD"));
System.out.println("invserialNo : "+invserialNo);
if ("Y".equalsIgnoreCase(invserialNo))
{
retString = itmDBAccessLocal.getErrorString("", "VTINVSRNRQ", "");
return retString;
}
}
if (pstmtSql != null)
{
pstmtSql.close();
pstmtSql = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
//Added By PriyankaC on 05/03/2018.. [END]
} catch (Exception e) } catch (Exception e)
{ {
try try
......
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