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 ...@@ -5172,7 +5172,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{ {
if(errString != null && errString.indexOf("ADSISRVERR") > -1) if(errString != null && errString.indexOf("ADSISRVERR") > -1)
{ {
holdSaleOrder(saleOrder, errString); holdSaleOrder(errString);
} }
} }
catch (Exception e) catch (Exception e)
...@@ -26375,7 +26375,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -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 04/12/2015 for handling special characters End
//Changed by samadhan on 23/02/2016 for hold sale order start //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 = ""; String sorderHoldSql = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -26383,14 +26383,25 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -26383,14 +26383,25 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
int updatedRows = 0; int updatedRows = 0;
String retString = "error"; String retString = "error";
String reason = ""; String reason = "";
Document dom = genericUtility.parseString(reasonErr); String saleOrder ="";
String descr = genericUtility.getColumnValue("description", dom); Document dom = null;
if(descr != null) String descr = "";
{
reason = descr.substring(descr.indexOf("]")+1, descr.length());
}
try 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(); ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false); conn.setAutoCommit(false);
...@@ -26401,7 +26412,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -26401,7 +26412,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmt.setString(2, reason); pstmt.setString(2, reason);
pstmt.setString(3, saleOrder); pstmt.setString(3, saleOrder);
updatedRows = pstmt.executeUpdate(); 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 ) if( pstmt != null )
{ {
pstmt.close(); 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