Commit 50246c31 authored by pjain's avatar pjain

changed by sankara on 28/08/14 update wavegeneraionprc and generatelabelsprc


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96109 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ed944e69
......@@ -817,6 +817,9 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
if( test > 0)
{
System.out.println(" WAVE_STATUS_ORG table updated ");
//changed by pragyan on 28/08/14 update master carton in wave status org det
int wavOrgUpdCount = reUpdateWaveOrgMasterCartonNo(ptcn, conn);
System.out.println(" WAVE_STATUS_ORG_DET table updated ["+wavOrgUpdCount+"]");
}
else
{
......@@ -1794,7 +1797,58 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
}
}
}
//changed by pragyan on 28/08/14 for update wave_status_org_det start.
private int reUpdateWaveOrgMasterCartonNo(String PTCN,Connection conn) throws ITMException
{
String sql = "";
String cartonNo = "";
String orgMasterCarton = "";
String newMasterCarton = "";
int update = 0;
PreparedStatement pstmt = null;
try
{
sql = "UPDATE WAVE_STATUS_ORG_DET W SET (MASTER_CARTON,TRACKING_NO,SHIP_LABEL) = "
+ "( SELECT MASTER_CARTON,TRACKING_NO,SHIP_LABEL FROM CARTON_MASTER B WHERE "
+ " W.PTCN = B.PTCN AND W.CARTON_NO = B.CARTON_NO AND B.PTCN = ?) WHERE W.PTCN = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, PTCN);
pstmt.setString(2, PTCN);
update = pstmt.executeUpdate();
if( update > 0 )
{
System.out.println("update successfully in WAVE_STATUS_ORG DET ["+update+"]");
}
pstmt.close(); pstmt = null;
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(pstmt != null )
{
pstmt.close(); pstmt = null;
}
}
catch(Exception es)
{
es.printStackTrace();
throw new ITMException(es);
}
}
return 0;
}
//changed by pragyan on 28/08/14 for update wave_status_org_det end.
}
......@@ -7066,7 +7066,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//if( tranCodeInput != null && tranCodeInput.trim().length() > 0 && transPorterInfoMap != null & transPorterInfoMap.size() > 0)
if( tranCodeInput != null && tranCodeInput.trim().length() > 0 && transPorterInfoMap != null & transPorterInfoMap.size() > 0 && tranCode.length() > 0)
{
String chkDistADSIFlag = "",chkDistADSIFlagIn = "",distShipType = "";
String chkDistADSIFlag = "",chkDistADSIFlagIn = "",distShipType = "",newServiceCode ="";
System.out.println("Transporter Info from dist Route1 ["+transPorterInfoMap.toString()+"]");
chkDistADSIFlag = (String)transPorterInfoMap.get("ADSI_FLAG");
......@@ -7080,6 +7082,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tranCode = (String)tempTtransPorterInfoMap.get("TRAN_CODE");
transMode = (String)tempTtransPorterInfoMap.get("TRANS_MODE");
newServiceCode = (String)tempTtransPorterInfoMap.get("SERVICE_CODE");
System.out.println("chkDistADSIFlagIn1 ["+chkDistADSIFlagIn+"]");
chkDistADSIFlagIn = chkDistADSIFlagIn != null && chkDistADSIFlagIn.trim().length() > 0 ?chkDistADSIFlagIn:"N";
System.out.println("chkDistADSIFlagIn1 ["+chkDistADSIFlagIn+"]");
......@@ -7103,6 +7107,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
transPorterInfoMap.put("TRAN_MODE", transMode);
}
if(newServiceCode != null && newServiceCode.length() > 0)
{
transPorterInfoMap.put("SERVICE_CODE", newServiceCode);
}
}
//Changed By Pragyan 25-aug-14 changed logic for getting transporter.end
......
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