Commit e0d9c43c authored by msingh's avatar msingh

Changes in ConsolidatToDoc.java for DDUK


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99367 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e76858a6
...@@ -19,12 +19,12 @@ import org.w3c.dom.Document; ...@@ -19,12 +19,12 @@ import org.w3c.dom.Document;
public class ConsolidatToDoc { public class ConsolidatToDoc {
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
//Changed by Manish on 05/11/15 [Start] //Changed by Manish on 05/11/15 [Start]
String projectName = ""; String projectName = "";
DistCommon distCommon = new DistCommon(); DistCommon distCommon = new DistCommon();
//Changed by Manish on 05/11/15 [End] //Changed by Manish on 05/11/15 [End]
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
//Changed by Rohan on 10-06-12 to add xtraParams in process as argument for hazmap report to get chg user //Changed by Rohan on 10-06-12 to add xtraParams in process as argument for hazmap report to get chg user
...@@ -244,7 +244,9 @@ public class ConsolidatToDoc { ...@@ -244,7 +244,9 @@ public class ConsolidatToDoc {
{ {
String key = (String)it.next(); String key = (String)it.next();
System.out.println("CURRENT KEY ["+key+"]"); System.out.println("CURRENT KEY ["+key+"]");
projectName = distCommon.getDisparams("999999","PROJECT",conn);
System.out.println("projectName ========["+projectName+"]");
//if(key.equalsIgnoreCase("P-TASK")) //if(key.equalsIgnoreCase("P-TASK"))
//Changed By Pragyan 02/01/13 to check the consolidetion //Changed By Pragyan 02/01/13 to check the consolidetion
// 23/09/12 manoharan M-PICK and M-PACK to considered together and split accordingly to number of M-PACK // 23/09/12 manoharan M-PICK and M-PACK to considered together and split accordingly to number of M-PACK
...@@ -252,26 +254,54 @@ public class ConsolidatToDoc { ...@@ -252,26 +254,54 @@ public class ConsolidatToDoc {
//if("A-PICK".equalsIgnoreCase(key) || "C-PICK".equalsIgnoreCase(key)) //if("A-PICK".equalsIgnoreCase(key) || "C-PICK".equalsIgnoreCase(key))
if("A-PICK".equalsIgnoreCase(key) || "C-PICK".equalsIgnoreCase(key) || "P-PICK".equalsIgnoreCase(key) || "M-PICK".equalsIgnoreCase(key)) if("A-PICK".equalsIgnoreCase(key) || "C-PICK".equalsIgnoreCase(key) || "P-PICK".equalsIgnoreCase(key) || "M-PICK".equalsIgnoreCase(key))
{ {
//Changed by rohan on 10-08-12 // Changed by Manish on 07/12/15 for DDWMS merging [start]
//isPick = true; if("DDUK".equalsIgnoreCase(projectName))
//System.out.println(" inside M-PICK "); {
sql = "SELECT POD.PICK_ORDER AS ID, POD.LINE_NO AS LINE_NO__ORD, POD.SITE_CODE,"+ //sql added by Kunal On 03/08/12 as per S Monoharan Sir intruction //Changed by wasim to Despatch the order with the consolidated order line number on 01-07-2015 [START]
" POD.ITEM_CODE,P.ITEM_CODE, P.LOC_CODE, P.LOC_CODE__TO, P.LOT_NO, P.LOT_SL,"+ System.out.println("This is group by query.");
//Changed by sumit on 11/03/13 getting quantity = quantity - dealloc_qty sql = "SELECT POD.PICK_ORDER AS ID, POD.LINE_NO AS LINE_NO__ORD, POD.SITE_CODE,"+
//" POD.NO_ART, P.QUANTITY , POD.SALE_ORDER, POD.EXP_LEV, PO.WAVE_ID,"+ " POD.ITEM_CODE,P.ITEM_CODE, P.LOC_CODE, P.LOC_CODE__TO, P.LOT_NO, P.LOT_SL,"+
" POD.NO_ART, (P.QUANTITY - CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE P.DEALLOC_QTY END) AS QUANTITY , POD.SALE_ORDER, POD.EXP_LEV, PO.WAVE_ID,"+ " POD.NO_ART,SUM (P.QUANTITY - CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE P.DEALLOC_QTY END) AS QUANTITY, POD.SALE_ORDER, POD.EXP_LEV, PO.WAVE_ID,"+
" POD.LINE_NO__SORD,PH.PALLET_NO "+ // change done by Kunal on 03/08/12 select pallet no " POD.LINE_NO__SORD,PH.PALLET_NO "+
" FROM PICK_ISS_DET P, PICK_ORD_HDR PO , PICK_ORD_DET POD,PICK_ISS_HDR PH "+ " FROM PICK_ISS_DET P, PICK_ORD_HDR PO , PICK_ORD_DET POD,PICK_ISS_HDR PH "+
" WHERE POD.PICK_ORDER = PO.PICK_ORDER "+ " WHERE POD.PICK_ORDER = PO.PICK_ORDER "+
" AND POD.PICK_ORDER = P.PICK_ORDER "+ " AND POD.PICK_ORDER = P.PICK_ORDER "+
" AND POD.LINE_NO = P.LINE_NO__ORD "+ " AND POD.LINE_NO = P.LINE_NO__ORD "+
" AND PH.PICK_ORDER = P.PICK_ORDER "+ " AND PH.PICK_ORDER = P.PICK_ORDER "+
//Changed By Pragyan 26/12/12 to check the join with detail for valid records. " AND PH.TRAN_ID = P.TRAN_ID "+
" AND PH.TRAN_ID = P.TRAN_ID "+ " AND (P.QUANTITY - CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE P.DEALLOC_QTY END) > 0 "+
//Changed by sumit on 11/03/13 adding condition only quantity avilable record should be taken " AND PO.PICK_ORDER = ? "+
" AND (P.QUANTITY - CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE P.DEALLOC_QTY END) > 0 "+ " GROUP BY "+
" AND PO.PICK_ORDER = ? "; " POD.PICK_ORDER, POD.LINE_NO, POD.SITE_CODE,"+
" POD.ITEM_CODE,P.ITEM_CODE, P.LOC_CODE, P.LOC_CODE__TO, P.LOT_NO, P.LOT_SL,"+
" POD.NO_ART,POD.SALE_ORDER, POD.EXP_LEV, PO.WAVE_ID,"+
" POD.LINE_NO__SORD,PH.PALLET_NO";
//Changed by wasim to Despatch the order with the consolidated order line number on 01-07-2015 [END]
}
// Changed by Manish on 07/12/15 for DDWMS merging [END]
else
{
//Changed by rohan on 10-08-12
//isPick = true;
//System.out.println(" inside M-PICK ");
sql = "SELECT POD.PICK_ORDER AS ID, POD.LINE_NO AS LINE_NO__ORD, POD.SITE_CODE,"+ //sql added by Kunal On 03/08/12 as per S Monoharan Sir intruction
" POD.ITEM_CODE,P.ITEM_CODE, P.LOC_CODE, P.LOC_CODE__TO, P.LOT_NO, P.LOT_SL,"+
//Changed by sumit on 11/03/13 getting quantity = quantity - dealloc_qty
//" POD.NO_ART, P.QUANTITY , POD.SALE_ORDER, POD.EXP_LEV, PO.WAVE_ID,"+
" POD.NO_ART, (P.QUANTITY - CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE P.DEALLOC_QTY END) AS QUANTITY , POD.SALE_ORDER, POD.EXP_LEV, PO.WAVE_ID,"+
" POD.LINE_NO__SORD,PH.PALLET_NO "+ // change done by Kunal on 03/08/12 select pallet no
" FROM PICK_ISS_DET P, PICK_ORD_HDR PO , PICK_ORD_DET POD,PICK_ISS_HDR PH "+
" WHERE POD.PICK_ORDER = PO.PICK_ORDER "+
" AND POD.PICK_ORDER = P.PICK_ORDER "+
" AND POD.LINE_NO = P.LINE_NO__ORD "+
" AND PH.PICK_ORDER = P.PICK_ORDER "+
//Changed By Pragyan 26/12/12 to check the join with detail for valid records.
" AND PH.TRAN_ID = P.TRAN_ID "+
//Changed by sumit on 11/03/13 adding condition only quantity avilable record should be taken
" AND (P.QUANTITY - CASE WHEN P.DEALLOC_QTY IS NULL THEN 0 ELSE P.DEALLOC_QTY END) > 0 "+
" AND PO.PICK_ORDER = ? ";
}
//End changes by gulzar on 12/27/2011 //End changes by gulzar on 12/27/2011
} }
...@@ -374,9 +404,8 @@ public class ConsolidatToDoc { ...@@ -374,9 +404,8 @@ public class ConsolidatToDoc {
expLev = rs.getString("EXP_LEV"); expLev = rs.getString("EXP_LEV");
lineNoSord = rs.getString("LINE_NO__SORD");//Gulzar on 12/28/2011 lineNoSord = rs.getString("LINE_NO__SORD");//Gulzar on 12/28/2011
//Changed by sumit on 12/03/13 calculating number of art start //Changed by sumit on 12/03/13 calculating number of art start
// Changed by Manish on 05/11/15 for DDWMS merging [start] // Changed by Manish on 05/11/15 for DDWMS merging [start]
projectName = distCommon.getDisparams("999999","PROJECT",conn);
if("DDUK".equalsIgnoreCase(projectName)) if("DDUK".equalsIgnoreCase(projectName))
{ {
if(lotNo == null || lotNo.trim().length() == 0) if(lotNo == null || lotNo.trim().length() == 0)
...@@ -389,7 +418,7 @@ public class ConsolidatToDoc { ...@@ -389,7 +418,7 @@ public class ConsolidatToDoc {
} }
} }
// Changed by Manish on 05/11/15 for DDWMS merging [end] // Changed by Manish on 05/11/15 for DDWMS merging [end]
HashMap itmVolumeMap = new HashMap(); HashMap itmVolumeMap = new HashMap();
itmVolumeMap = getItemVoumeMap(itemCode,lotNo,conn); itmVolumeMap = getItemVoumeMap(itemCode,lotNo,conn);
shipperSize = (Double) itmVolumeMap.get("SHIPPER_SIZE"); shipperSize = (Double) itmVolumeMap.get("SHIPPER_SIZE");
...@@ -886,7 +915,7 @@ public class ConsolidatToDoc { ...@@ -886,7 +915,7 @@ public class ConsolidatToDoc {
pstmt1.setString(8, lotNo.trim()); pstmt1.setString(8, lotNo.trim());
pstmt1.setString(9, lotSl.trim()); pstmt1.setString(9, lotSl.trim());
} }
pstmt1.setDouble(10, quantityOrd); pstmt1.setDouble(10, quantityOrd);
//Changed by sumit on 01/02/13 inserting qty as per ordered unit //Changed by sumit on 01/02/13 inserting qty as per ordered unit
//pstmt1.setDouble(11, quantity); //pstmt1.setDouble(11, quantity);
......
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