Commit ef681616 authored by jshinde's avatar jshinde

Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100988 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c760d99c
......@@ -16264,8 +16264,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String serviceSymbol = "";
String carrierSymbol = "";
String carrierFriendlyName = "";
//Added by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[Start]
String shipArchive = "";
String archivePath = "";
String new_shipLabelArchive = "";
//Added by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
String value = "";
String pckgId = "";
String trackNo="";
......@@ -16318,17 +16321,30 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
sSQL = "UPDATE DESPATCH SET FREIGHT_AMT_ADD = ? WHERE PTCN = ?";
pstmtDesp = conn.prepareStatement(sSQL);
sql = "UPDATE CARTON_MASTER SET TRACKING_NO = ? , SHIP_LABEL= ? , MSN_NO =?,CARRIER_SYMBOL = ? , CARRIER_FRIENDLYNAME = ?"
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[Start]
/*sql = "UPDATE CARTON_MASTER SET TRACKING_NO = ? , SHIP_LABEL= ? , MSN_NO =?,CARRIER_SYMBOL = ? , CARRIER_FRIENDLYNAME = ?"
+ " WHERE CARTON_NO = ?";*/
sql = "UPDATE CARTON_MASTER SET TRACKING_NO = ? , SHIP_LABEL= ? ,SHIP_LABEL_ARCHIVE= ?, MSN_NO =?,CARRIER_SYMBOL = ? , CARRIER_FRIENDLYNAME = ?"
+ " WHERE CARTON_NO = ?";
pstmtCart = conn.prepareStatement(sql);
sqlInsertDt = "SELECT CARTON_NO,PICK_ORDER,LINE_NO__PICK,CARTON_TYPE,PACK_CODE,MASTER_CARTON,ITEM_CODE,TRACKING_NO,SHIP_LABEL FROM CARTON_MASTER WHERE PTCN = ? ORDER BY ITEM_CODE";
//sqlInsertDt = "SELECT CARTON_NO,PICK_ORDER,LINE_NO__PICK,CARTON_TYPE,PACK_CODE,MASTER_CARTON,ITEM_CODE,TRACKING_NO,SHIP_LABEL FROM CARTON_MASTER WHERE PTCN = ? ORDER BY ITEM_CODE";
sqlInsertData1 = "INSERT INTO WAVE_STATUS_ORG_DET (TRAN_ID, LINE_NO,PTCN,CARTON_NO," +
sqlInsertDt = "SELECT CARTON_NO,PICK_ORDER,LINE_NO__PICK,CARTON_TYPE,PACK_CODE,MASTER_CARTON,ITEM_CODE,TRACKING_NO,SHIP_LABEL ,SHIP_LABEL_ARCHIVE FROM CARTON_MASTER WHERE PTCN = ? ORDER BY ITEM_CODE";
/*sqlInsertData1 = "INSERT INTO WAVE_STATUS_ORG_DET (TRAN_ID, LINE_NO,PTCN,CARTON_NO," +
" PICK_ORDER, LINE_NO__PICK ,REF_SER, REF_ID, " +
" CARTON_TYPE,PACK_CODE,MASTER_CARTON,ITEM_CODE, " +
"WEIGHT,TRACKING_NO, SHIP_LABEL )"+
" VALUES (?,?, ?,?, ?,?, ?,?, ?,?, ?,? , ?,?, ?)";
" VALUES (?,?, ?,?, ?,?, ?,?, ?,?, ?,? , ?,?, ?)";*/
sqlInsertData1 = "INSERT INTO WAVE_STATUS_ORG_DET (TRAN_ID, LINE_NO,PTCN,CARTON_NO," +
" PICK_ORDER, LINE_NO__PICK ,REF_SER, REF_ID, " +
" CARTON_TYPE,PACK_CODE,MASTER_CARTON,ITEM_CODE, " +
"WEIGHT,TRACKING_NO, SHIP_LABEL ,SHIP_LABEL_ARCHIVE)"+
" VALUES (?,?, ?,?, ?,?, ?,?, ?,?, ?,? , ?,?, ?,?)";
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
pstmtInsertData1 = conn.prepareStatement(sqlInsertData1);
pstmtDt = conn.prepareStatement(sqlInsertDt);
......@@ -16424,7 +16440,28 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
cnumber = addValue;
}
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[Start]
else if(addName.equalsIgnoreCase("Base64ArchiveDoc"))
{
shipArchive = addValue;
byte[] imgBytes = decoder.decodeBuffer(addValue);
System.out.println("IMAGE Byte Length for Base64ArchiveDoc ["+imgBytes.length+"]");
BufferedImage bufImg = ImageIO.read(new ByteArrayInputStream(imgBytes));
File imgOutFile = new File(imagePath+ File.separator+"Ship_Label"+File.separator+ ptcn + File.separator + ptcn+"_"+cnumber +"_Archive" +".png");
archivePath = imgOutFile.getPath();
System.out.println("Get Path for Base64ArchiveDoc["+archivePath+"]");
File createFolder = new File(archivePath);
if(!createFolder.exists())
{
createFolder.mkdirs();
}
imgOutFile.createNewFile();
ImageIO.write(bufImg, "png", imgOutFile);
System.out.println("Write File Complete for Base64ArchiveDoc----");
}
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
}
......@@ -16459,10 +16496,13 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtCart.setString(1, trackNo);
pstmtCart.setString(2, path );
pstmtCart.setDouble(3, msnNo);
pstmtCart.setString(4, carrierSymbol);
pstmtCart.setString(5, carrierFriendlyName);
pstmtCart.setString(6, cnumber);
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[start]
pstmtCart.setString(3, archivePath);
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
pstmtCart.setDouble(4, msnNo);
pstmtCart.setString(5, carrierSymbol);
pstmtCart.setString(6, carrierFriendlyName);
pstmtCart.setString(7, cnumber);
System.out.println("carton number in for loop: "+cnumber);
System.out.println("msn no for pkg result is :" +msnNo);
int test = pstmtCart.executeUpdate();
......@@ -16571,6 +16611,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
new_shipLabel = rsD.getString("SHIP_LABEL");
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[Start]
new_shipLabelArchive = rsD.getString("SHIP_LABEL_ARCHIVE");
System.out.println("ship_label_archive in while loop :" +new_shipLabelArchive);
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
System.out.println("carton no in while loop :" +cartonNo);
System.out.println("tracking no in while loop :"+new_trackingNo);
System.out.println("ship_label in while loop :"+new_shipLabel);
......@@ -16592,12 +16636,18 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtInsertData1.setDouble(13,caseWeight);
pstmtInsertData1.setString(14,"");
pstmtInsertData1.setString(15,"");
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[Start]
pstmtInsertData1.setString(16,"");
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
}
else
{
pstmtInsertData1.setDouble(13,0.0);
pstmtInsertData1.setString(14,new_trackingNo);
pstmtInsertData1.setString(15,new_shipLabel);
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[Start]
pstmtInsertData1.setString(16,new_shipLabelArchive);
//Changed by Jagruti Shinde Request ID:[W15LKAT002] for Implementing and printing DHL Archive label.[End]
}
pstmtInsertData1.addBatch();
......
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