Commit 075808f9 authored by msingh's avatar msingh

Changed by Manish on 28/02/2016 for hold sale order start


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100284 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6e2ea0ff
......@@ -5172,7 +5172,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
if(errString != null && errString.indexOf("ADSISRVERR") > -1)
{
holdSaleOrder(saleOrder, errString);
holdSaleOrder(errString);
}
}
catch (Exception e)
......@@ -26375,7 +26375,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed by samadhan on 04/12/2015 for handling special characters End
//Changed by samadhan on 23/02/2016 for hold sale order start
private String holdSaleOrder(String saleOrder,String reasonErr) throws ITMException, Exception
private String holdSaleOrder(String reasonErr) throws ITMException, Exception
{
String sorderHoldSql = "";
PreparedStatement pstmt = null;
......@@ -26383,14 +26383,25 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
int updatedRows = 0;
String retString = "error";
String reason = "";
Document dom = genericUtility.parseString(reasonErr);
String descr = genericUtility.getColumnValue("description", dom);
if(descr != null)
{
reason = descr.substring(descr.indexOf("]")+1, descr.length());
}
String saleOrder ="";
Document dom = null;
String descr = "";
try
{
dom = genericUtility.parseString(reasonErr);
descr = genericUtility.getColumnValue("description", dom);
if(descr != null && descr.indexOf("[") != -1 && descr.indexOf("]") != -1)
{
saleOrder = descr.substring(descr.indexOf("[")+1 ,descr.indexOf("]"));
reason = descr.substring(descr.indexOf("]")+1, descr.length());
}
System.out.println("Sale Order: ["+saleOrder+"]");
System.out.println("Reason: ["+reason+"]");
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
......@@ -26401,7 +26412,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmt.setString(2, reason);
pstmt.setString(3, saleOrder);
updatedRows = pstmt.executeUpdate();
System.out.println(updatedRows+" Rows Updated for Sale Order: "+saleOrder);
if(updatedRows > 0)
{
System.out.println(updatedRows+" Rows Updated for Sale Order: "+saleOrder);
}
if( pstmt != null )
{
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