Commit c9f26629 authored by ppatro's avatar ppatro

close out and details taken from wave line items


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93513 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d49f9bd2
......@@ -285,6 +285,8 @@ public class ShipmentPrc extends ProcessEJB implements ShipmentPrcLocal,Shipment
" AND T.SERVICE_CODE IS NOT NULL " +
" AND C.TRACKING_NO IS NOT NULL " +
" AND D.PTCN IS NULL " +
// changed by sankara on 17/08/13 added join form carton_master for manual ship get data.
" AND P.CARTON_NO = C.CARTON_NO " +
" UNION " + //MANUAL SHIPMENT REF SER = "" AND INVENTORY
" SELECT DISTINCT D.PTCN, S.SHIPMENT_ID, T.TRAN_NAME FROM SHIP_DOCS D, SHIPMENT_CONTENT P, "+
" SHIPMENT S, TRANSPORTER T, CARTON_MASTER C " +
......@@ -299,6 +301,8 @@ public class ShipmentPrc extends ProcessEJB implements ShipmentPrcLocal,Shipment
" AND T.SHIPMENT_TYPE = ? " +
" AND C.SF_IDENTITY IS NULL " +
" AND T.SERVICE_CODE IS NOT NULL " +
// changed by sankara on 17/08/13 added join form carton_master for manual ship get data.
" AND P.CARTON_NO = C.CARTON_NO " +
" AND C.TRACKING_NO IS NOT NULL " ;
System.out.println("**************getDataSql="+getDataSql);
......@@ -432,6 +436,10 @@ public class ShipmentPrc extends ProcessEJB implements ShipmentPrcLocal,Shipment
String shipmentId = "";
String transporterName = "";
String tranId = "";
// changed by sankara on 17/08/13 define variables for manual ship start..
ResultSet rs1 = null;
String refser = "";
// changed by sankara on 17/08/13 define variables for manual ship end..
HashMap carrMap = new HashMap();
// Set shipmentSet = new java.util.TreeSet();
Set shipmentSet = new java.util.HashSet();
......@@ -548,13 +556,20 @@ public class ShipmentPrc extends ProcessEJB implements ShipmentPrcLocal,Shipment
// changed by sankara on 29-06-13 add join and sf_idenity
//sql = " SELECT CARRIER_FRIENDLYNAME FROM CARTON_MASTER WHERE PTCN IN (SELECT PTCN FROM SHIP_DOCS WHERE SHIPMENT_ID = ?) ORDER BY CARRIER_FRIENDLYNAME ";
//sql = " SELECT CARRIER_FRIENDLYNAME FROM CARTON_MASTER WHERE PTCN IN (SELECT PTCN FROM SHIP_DOCS WHERE SHIPMENT_ID = ?) AND SF_IDENTITY IS NULL ORDER BY CARRIER_FRIENDLYNAME ";
sql = " SELECT DISTINCT C.CARRIER_FRIENDLYNAME,T.SHIPMENT_TYPE FROM CARTON_MASTER C,SHIP_DOCS S,SHIPMENT P,TRANSPORTER T WHERE" +
/*sql = " SELECT DISTINCT C.CARRIER_FRIENDLYNAME,T.SHIPMENT_TYPE FROM CARTON_MASTER C,SHIP_DOCS S,SHIPMENT P,TRANSPORTER T WHERE" +
// Changed by sankara on 16-08-13 ptcn is not available in manual shipment case...
// " S.PTCN =C.PTCN AND S.SHIPMENT_ID = ? AND S.SHIPMENT_ID = P.SHIPMENT_ID AND P.TRAN_CODE = T.TRAN_CODE AND C.CARRIER_FRIENDLYNAME" +
" S.SHIPMENT_ID = ? AND S.SHIPMENT_ID = P.SHIPMENT_ID AND P.TRAN_CODE = T.TRAN_CODE AND C.CARRIER_FRIENDLYNAME " +
" IS NOT NULL ORDER BY C.CARRIER_FRIENDLYNAME ";
" IS NOT NULL ORDER BY C.CARRIER_FRIENDLYNAME ";*/
sql = " SELECT DISTINCT C.CARRIER_FRIENDLYNAME, T.SHIPMENT_TYPE FROM CARTON_MASTER C, SHIPMENT_CONTENT N, SHIPMENT P, TRANSPORTER T " +
" WHERE P.SHIPMENT_ID = ? AND P.SHIPMENT_ID = N.SHIPMENT_ID AND P.TRAN_CODE = T.TRAN_CODE AND C.CARRIER_FRIENDLYNAME IS NOT NULL " +
" UNION " +
" SELECT DISTINCT C.CARRIER_FRIENDLYNAME, T.SHIPMENT_TYPE FROM CARTON_MASTER C, SHIP_DOCS S, SHIPMENT P, TRANSPORTER T WHERE S.PTCN = C.PTCN " +
" AND S.SHIPMENT_ID = ? AND S.SHIPMENT_ID = P.SHIPMENT_ID AND S.REF_SER = 'S-DSP' AND P.TRAN_CODE = T.TRAN_CODE AND C.CARRIER_FRIENDLYNAME IS NOT NULL " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,shipmentId);
pstmt.setString(2,shipmentId);
rs = pstmt.executeQuery();
if( rs.next())
{
......@@ -580,9 +595,44 @@ public class ShipmentPrc extends ProcessEJB implements ShipmentPrcLocal,Shipment
// changed by sankara on 29-06-13 add join and sf_idenity
// updateSql= " UPDATE CARTON_MASTER SET SF_IDENTITY = ? WHERE PTCN IN (SELECT PTCN FROM SHIP_DOCS WHERE SHIPMENT_ID = ?)";
// changed by sankara on 17/08/13 for updation of sf_idenity in manual ship case start..
/* // changed by sankara on 29-06-13 add join and sf_idenity
// updateSql= " UPDATE CARTON_MASTER SET SF_IDENTITY = ? WHERE PTCN IN (SELECT PTCN FROM SHIP_DOCS WHERE SHIPMENT_ID = ?)";
updateSql= " UPDATE CARTON_MASTER SET SF_IDENTITY = ? WHERE PTCN IN (SELECT PTCN FROM SHIP_DOCS WHERE SHIPMENT_ID = ?) AND SF_IDENTITY IS NULL";
pstmt = conn.prepareStatement(updateSql); */
sql = " SELECT PTCN, REF_SER FROM SHIP_DOCS D, SHIPMENT S WHERE S.SHIPMENT_ID = D.SHIPMENT_ID AND D.SHIPMENT_ID = ? " ;
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,shipmentId);
rs1 = pstmt1.executeQuery();
if( rs1.next())
{
ptcn = rs1.getString("PTCN");
refser = rs1.getString("REF_SER");
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
if( ptcn !=null && refser.trim().equalsIgnoreCase("S-DSP") )
{
updateSql= " UPDATE CARTON_MASTER SET SF_IDENTITY = ? WHERE PTCN IN (SELECT PTCN FROM SHIP_DOCS WHERE SHIPMENT_ID = ?) AND SF_IDENTITY IS NULL " ;
pstmt = conn.prepareStatement(updateSql);
}
else
{
updateSql = " UPDATE CARTON_MASTER SET SF_IDENTITY = ? WHERE CARTON_NO IN ( SELECT CARTON_NO FROM SHIPMENT_CONTENT C, SHIP_DOCS D, SHIPMENT S " +
" WHERE S.SHIPMENT_ID = D.SHIPMENT_ID OR D.SHIPMENT_ID IS NULL AND S.SHIPMENT_ID = C.SHIPMENT_ID " +
" AND S.SHIPMENT_ID = ? ) AND SF_IDENTITY IS NULL " ;
pstmt = conn.prepareStatement(updateSql);
}
// changed by sankara on 17//08/13 for updation of sf_idenity in manual ship case end..
if(carrMap != null && carrMap.size() > 0)
{
......@@ -751,6 +801,14 @@ public class ShipmentPrc extends ProcessEJB implements ShipmentPrcLocal,Shipment
pstmt1.close();
pstmt1 = null;
}
//changed by sankara on 17/08/13 for closing result set start..
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
//changed by sankara on 17/08/13 for closing result set end..
conn.close();
}
conn = null;
......
......@@ -3605,7 +3605,7 @@
<tabsequence>300</tabsequence>
<border>5</border>
<color>0</color>
<x>101</x>
<x>103</x>
<y>537</y>
<height>16</height>
<width>95</width>
......@@ -4654,16 +4654,18 @@
<y>563</y>
<height>16</height>
<width>95</width>
<format>[general]</format>
<format>0.000</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>no_art</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>6</limit>
<case>any</case>
<autoselect>yes</autoselect>
<format>#########0.000</format>
<focusrectangle>no</focusrectangle>
<autoselect>no</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
......
......@@ -172,7 +172,7 @@ column(band=detail id=48 alignment="1" tabsequence=310 border="5" color="0" x="2
column(band=detail id=54 alignment="1" tabsequence=32766 border="5" color="255" x="452" y="536" height="16" width="82" format="[general]" html.valueishtml="0" name=net_amt visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=detail alignment="0" text="Net Weight:" border="0" color="0" x="381" y="537" height="16" width="68" html.valueishtml="0" name=net_weight_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=detail alignment="1" text="Tare Weight:" border="0" color="0" x="203" y="537" height="16" width="76" html.valueishtml="0" name=tare_weight_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=47 alignment="1" tabsequence=300 border="5" color="0" x="101" y="537" height="16" width="95" format="0.000" html.valueishtml="0" name=gross_weight visible="1" edit.limit=14 edit.case=any edit.format="#########0.000" edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=47 alignment="1" tabsequence=300 border="5" color="0" x="103" y="537" height="16" width="95" format="0.000" html.valueishtml="0" name=gross_weight visible="1" edit.limit=14 edit.case=any edit.format="#########0.000" edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=45 alignment="0" tabsequence=430 border="0" color="0" x="481" y="736" height="1" width="1" format="[general]" html.valueishtml="0" name=gencode_descr visible="0" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=49 alignment="0" tabsequence=370 border="5" color="0" x="100" y="614" height="16" width="434" format="[general]" html.valueishtml="0" name=remarks visible="1" edit.limit=200 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Remarks :" border="0" color="0" x="23" y="614" height="16" width="73" html.valueishtml="0" name=remarks_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
......@@ -204,14 +204,14 @@ column(band=detail id=63 alignment="1" tabsequence=330 border="5" color="0" x="2
column(band=detail id=72 alignment="1" tabsequence=340 border="5" color="0" x="455" y="563" height="16" width="79" format="########0.00" html.valueishtml="0" name=unit_value visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Unit Value :" border="0" color="0" x="381" y="563" height="16" width="68" html.valueishtml="0" name=unit_value_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=detail alignment="1" text="Pallet No :" border="0" color="0" x="203" y="563" height="16" width="76" html.valueishtml="0" name=no_pallet_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=62 alignment="1" tabsequence=320 border="5" color="0" x="101" y="563" height="16" width="95" format="[general]" html.valueishtml="0" name=no_art visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=62 alignment="1" tabsequence=320 border="5" color="0" x="101" y="563" height="16" width="95" format="0.000" html.valueishtml="0" name=no_art visible="1" edit.limit=6 edit.case=any edit.format="#########0.000" edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=71 alignment="0" tabsequence=290 border="5" color="0" x="138" y="514" height="16" width="398" format="[general]" html.valueishtml="0" name=pkg_descr visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=73 alignment="0" tabsequence=280 border="5" color="0" x="138" y="489" height="16" width="398" format="[general]" html.valueishtml="0" name=item_descr visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="City :" border="0" color="0" x="56" y="756" height="16" width="40" html.valueishtml="0" name=city_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=60 alignment="0" tabsequence=440 border="5" color="0" x="100" y="756" height="16" width="89" format="[general]" html.valueishtml="0" name=city visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Pin :" border="0" color="0" x="371" y="756" height="16" width="75" html.valueishtml="0" name=pin_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=61 alignment="0" tabsequence=450 border="5" color="0" x="451" y="756" height="16" width="83" format="[general]" html.valueishtml="0" name=pin visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=74 alignment="0" tabsequence=490 border="5" color="0" x="269" y="756" height="16" width="97" html.valueishtml="0" name=tele1 visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=74 alignment="0" tabsequence=490 border="5" color="0" x="269" y="756" height="16" width="97" format="[general]" html.valueishtml="0" name=tele1 visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="TELE1:" border="0" color="0" x="194" y="756" height="16" width="70" html.valueishtml="0" name=tele1_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
......
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