Commit 6853e898 authored by msingh's avatar msingh

Changed by Manish on 28/06/16 for printing and status tracking update in...

Changed by Manish on 28/06/16 for printing and status tracking update in magento system after commit.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102169 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 25f92f2a
......@@ -4933,13 +4933,13 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
//Changed by sumit on 24/11/12 calling report label printing start.
System.out.println(" waveMode ["+waveMode+"] printLabel ["+printLabel+"] printer ["+printer+"]");
if( waveId != null && waveId.trim().length() > 0 && "P".equalsIgnoreCase(waveMode) && "Y".equalsIgnoreCase(printLabel))
/*if( waveId != null && waveId.trim().length() > 0 && "P".equalsIgnoreCase(waveMode) && "Y".equalsIgnoreCase(printLabel))
{
long startTime8 = System.currentTimeMillis();
generatedLabelPrint(waveId,printer, conn);
long endTime8 = System.currentTimeMillis();
System.out.println("DIFFERANCE IN TIME FOR GET GENERATE LABLE PRINT SQL IN SECONDS:::["+(endTime8-startTime8)/1000+"]");
}
}*/
//Changed by sumit on 24/11/12 calling report label printing end.
if(waveId == null || waveId.trim().length() == 0)
......@@ -4978,7 +4978,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed By Pragyan WM3DSUN015 To update status in Sorder as InProcess after .end
*/
if("DDUK".equals(projectName.trim()))
/*if("DDUK".equals(projectName.trim()))
{
System.out.println("@@Project is DDUK");
//Changed by samadhan on 29/05/2015 for status tracking update in magento system.start
......@@ -5019,7 +5019,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
}
//Changed by samadhan on 29/05/2015 for status tracking update in magento system.end
}
}*/
}
//Changed by sumit on 25/08/12 .end
......@@ -5088,6 +5088,58 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
System.out.println("SUCCESS...>>>>>>>>>>>>>>>>>>");
conn.commit();
// Changed by Manish on 24/06/16 for printing and status tracking update in magento system after commit.[start]
if( waveId != null && waveId.trim().length() > 0 && "P".equalsIgnoreCase(waveMode) && "Y".equalsIgnoreCase(printLabel))
{
long startTime8 = System.currentTimeMillis();
generatedLabelPrint(waveId,printer, conn);
long endTime8 = System.currentTimeMillis();
System.out.println("DIFFERANCE IN TIME FOR GET GENERATE LABLE PRINT SQL IN SECONDS:::["+(endTime8-startTime8)/1000+"]");
}
if("DDUK".equals(projectName.trim()))
{
System.out.println("@@Project is DDUK");
//Changed by samadhan on 29/05/2015 for status tracking update in magento system.start
if("P".equalsIgnoreCase(waveMode))
{
ShipmentStatus objShipment = new ShipmentStatus();
CommonWmsUtil wmsUtil = new CommonWmsUtil();
String apiShipUrl = wmsUtil.getDDSalesConfig("SHIP_STATUS_URL");
//Changed by wasim on 14-08-2015 to get apiKey for magento [START]
String apiKey = wmsUtil.getDDSalesConfig("API_KEY");
objShipment.setApiKey(apiKey);
//Changed by wasim on 14-08-2015 to set apiKey for magento [END]
String trackingNo = "";
sql="SELECT distinct sale_order,ptcn FROM WAVE_TASK_DET WHERE wave_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, waveId);
rs = pstmt.executeQuery();
while(rs.next())
{
objShipment.setOrderID(rs.getString(1));
trackingNo= wmsUtil.getTrackingNo(rs.getString(2),conn);
objShipment.setStatus("processing");
objShipment.setTrackingNumbers(trackingNo);
objShipment.setComment("Wave genaration done");
wmsUtil.CallTrackShipStatus(objShipment, apiShipUrl);
}
if( rs != null)
{
rs.close();
rs = null;
}
if( pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
//Changed by samadhan on 29/05/2015 for status tracking update in magento system.end
}
// Changed by Manish on 24/06/16 for printing and status tracking update in magento system after commit.[end]
} else {
/*int i = 0;
while(i < savePointList.size())
......
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