Commit 8ab07f22 authored by piyush's avatar piyush

chanegd by sankara on 16/06/14 updated wavegenerationprc,shipmentic,shipmentconf,

deallocartprc,dealocartconf,pickissic,generatelablesprc,replissconf and home screen metadata and sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95268 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 779ab8df
...@@ -3084,12 +3084,22 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -3084,12 +3084,22 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if( rs1.next()) if( rs1.next())
{ {
confirmed = rs1.getString("CONFIRMED"); //changed by sankara on 12/06/14 checked null for confirmed.
if( "N".equalsIgnoreCase(confirmed)) //confirmed = rs1.getString("CONFIRMED");
confirmed = checkNull(rs1.getString("CONFIRMED"));
if( "N".equalsIgnoreCase(confirmed) || confirmed.trim().length() == 0 )
{ {
break; break;
} }
} }
//chnaged by sankara on 16/06/14 update status in wave task det start.
else
{
confirmed = "N";
System.out.println("inside else confimed::::"+confirmed);
break;
}
//chnaged by sankara on 16/06/14 update status in wave task det end.
rs1.close(); rs1 = null; rs1.close(); rs1 = null;
pstmt1.clearParameters(); pstmt1.clearParameters();
} }
...@@ -3352,6 +3362,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -3352,6 +3362,7 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
String sql = ""; String sql = "";
double quantity = 0.0; double quantity = 0.0;
double realQty = 0.0; double realQty = 0.0;
int replcount = 0;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() ); java.sql.Timestamp currDate = new java.sql.Timestamp( System.currentTimeMillis() );
...@@ -3399,16 +3410,32 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo ...@@ -3399,16 +3410,32 @@ public class DeallocArtConf extends ActionHandlerEJB implements DeallocArtConfLo
System.out.println(" confirmed sussccessfully "); System.out.println(" confirmed sussccessfully ");
} }
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
//changed by sankara on 16/06/14 for wave_task_det status update from active repl start.
sql = " UPDATE WAVE_TASK_DET SET STATUS ='Y' WHERE REF_ID = ? AND STATUS = 'N'"; sql = " SELECT COUNT(*) AS COUNT FROM REPL_ORD_DET RO WHERE RO.REPL_ORDER = ? AND ( RO.CANCEL_MODE <> ? OR RO.CANCEL_MODE IS NULL ) " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, replOrder); pstmt.setString(1, replOrder);
if ( pstmt.executeUpdate() > 0) pstmt.setString(2, "Y");
rs = pstmt.executeQuery();
if( rs.next())
{ {
System.out.println(" wave_task_det updated succesfully"); replcount = rs.getInt("COUNT");
System.out.println("repl count["+replcount+"]");
} }
rs.close(); rs = null;
pstmt.close(); pstmt = null; pstmt.close(); pstmt = null;
if(replcount == 0)
{
//changed by sankara on 16/06/14 for wave_task_det status update from active repl end.
sql = " UPDATE WAVE_TASK_DET SET STATUS ='Y' WHERE REF_ID = ? AND STATUS = 'N'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, replOrder);
if ( pstmt.executeUpdate() > 0)
{
System.out.println(" wave_task_det updated succesfully");
}
pstmt.close(); pstmt = null;
} // 16/06/14 end.
if(parentReplOrder.trim().length() > 0) if(parentReplOrder.trim().length() > 0)
{ {
......
...@@ -1383,7 +1383,9 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -1383,7 +1383,9 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
try try
{ {
sql = " SELECT PIH.PICK_ORDER, PIH.PICK_TYPE, PIH.CONFIRMED, PID.LOC_CODE__TO FROM PICK_ISS_HDR PIH, PICK_ISS_DET PID WHERE PIH.PICK_ORDER = ? " + sql = " SELECT PIH.PICK_ORDER, PIH.PICK_TYPE, PIH.CONFIRMED, PID.LOC_CODE__TO FROM PICK_ISS_HDR PIH, PICK_ISS_DET PID WHERE PIH.PICK_ORDER = ? " +
" AND PIH.PICK_ORDER = PID.PICK_ORDER"; //changed by sankara on 12/06/14 added tran_id join
//" AND PIH.PICK_ORDER = PID.PICK_ORDER";
" AND PIH.PICK_ORDER = PID.PICK_ORDER AND PIH.TRAN_ID = PID.TRAN_ID ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder); pstmt.setString(1, pickOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
......
...@@ -320,6 +320,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -320,6 +320,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
com.adsionline.ADSIShippingWS.Service service = new com.adsionline.ADSIShippingWS.Service(); com.adsionline.ADSIShippingWS.Service service = new com.adsionline.ADSIShippingWS.Service();
service = shipment2.getService(); service = shipment2.getService();
System.out.println("Retriving the Package For update ["+packages2.toString()+"]");
if( !"NO".equalsIgnoreCase(serviceCode)) if( !"NO".equalsIgnoreCase(serviceCode))
{ {
...@@ -339,7 +340,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -339,7 +340,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
while(rsMaster.next()) while(rsMaster.next())
{ {
linkedMap.clear();
masterCarton = rsMaster.getString("MASTER_CARTON"); masterCarton = rsMaster.getString("MASTER_CARTON");
System.out.println("masterCarton ["+masterCarton+"]"); System.out.println("masterCarton ["+masterCarton+"]");
parcelCartonNo = rsMaster.getString("CARTON_NO"); parcelCartonNo = rsMaster.getString("CARTON_NO");
...@@ -407,12 +408,19 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -407,12 +408,19 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
weight = weight + packSize; weight = weight + packSize;
linkedMap.put(itemCode, weight); linkedMap.put(itemCode, weight);
} }
System.out.println("Map data ["+linkedMap.toString()+"]");
rs1.close(); rs1 = null; rs1.close(); rs1 = null;
pstmt1.close(); pstmt1 = null; pstmt1.close(); pstmt1 = null;
if("R".equalsIgnoreCase(cartonStatus)) if("R".equalsIgnoreCase(cartonStatus))
{ {
if(packages2[count] != null)
{
System.out.println("UPDATING For MSN NO R ["+packages2[count].getTrackingNumber()+"]");
System.out.println("UPDATING For MSN NO R ["+packages2[count].getWeight()+"]");
}
packages2[count] = null; packages2[count] = null;
System.out.println("CHANGES NOT EXIST[" +count+"]Master Carton ["+masterCarton+"]chgStatus["+chgStatus+"]"); System.out.println("CHANGES NOT EXIST[" +count+"]Master Carton ["+masterCarton+"]chgStatus["+chgStatus+"]");
...@@ -473,6 +481,12 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -473,6 +481,12 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
if( weight > 0.0) if( weight > 0.0)
{ {
if(packages2[count] != null)
{
System.out.println("UPDATING For MSN NO weight ["+packages2[count].getTrackingNumber()+"]");
System.out.println("UPDATING For MSN NO weight ["+packages2[count].getWeight()+"]");
}
arryOuterCartonNo.add(masterCarton); arryOuterCartonNo.add(masterCarton);
CommodityInfo[] comInfo = new CommodityInfo[linkedMap.size()]; CommodityInfo[] comInfo = new CommodityInfo[linkedMap.size()];
comInfo = setCommodityInfos(linkedMap, masterCarton, saleOrder, soap,refType, conn); comInfo = setCommodityInfos(linkedMap, masterCarton, saleOrder, soap,refType, conn);
...@@ -487,6 +501,11 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -487,6 +501,11 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
{ {
if(packages2[count] != null)
{
System.out.println("UPDATING For MSN NO void ["+packages2[count].getTrackingNumber()+"]");
System.out.println("UPDATING For MSN NO void ["+packages2[count].getWeight()+"]");
}
System.out.println("In case of weight zero ["+weight+"]"); System.out.println("In case of weight zero ["+weight+"]");
packages2[count] = null; packages2[count] = null;
...@@ -552,8 +571,9 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -552,8 +571,9 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
else else
{ {
arryOuterCartonNo.add(parcelCartonNo); arryOuterCartonNo.add(parcelCartonNo);
System.out.println("for ref typ["+refType+"]");
if("A".equalsIgnoreCase(refType) && "Y".equalsIgnoreCase(chgStatus)) //if("A".equalsIgnoreCase(refType) && "Y".equalsIgnoreCase(chgStatus))
if("A".equalsIgnoreCase(refType) )
{ {
sql = "SELECT ITEM_CODE,SUM(QUANTITY - CASE WHEN DEALLOC_QTY IS NULL THEN 0 ELSE CASE WHEN DEALLOC_QTY IS NULL" sql = "SELECT ITEM_CODE,SUM(QUANTITY - CASE WHEN DEALLOC_QTY IS NULL THEN 0 ELSE CASE WHEN DEALLOC_QTY IS NULL"
...@@ -576,6 +596,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -576,6 +596,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
rs1.close(); rs1 = null; rs1.close(); rs1 = null;
pstmt1.close(); pstmt1 = null; pstmt1.close(); pstmt1 = null;
System.out.println("Map data A ["+linkedMap.toString()+"]");
CommodityInfo[] comInfo = new CommodityInfo[linkedMap.size()]; CommodityInfo[] comInfo = new CommodityInfo[linkedMap.size()];
comInfo = setCommodityInfos(linkedMap, masterCarton, saleOrder, soap,refType, conn); comInfo = setCommodityInfos(linkedMap, masterCarton, saleOrder, soap,refType, conn);
...@@ -625,8 +646,9 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -625,8 +646,9 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
} }
else else
{ {
System.out.println("arryOuterCartonNo ["+arryOuterCartonNo.toString()+"]");
System.out.println("actual package size ["+packages2.length+"]");
Collections.sort(arryOuterCartonNo); Collections.sort(arryOuterCartonNo);
shipment2.setPackages2(packages2); shipment2.setPackages2(packages2);
...@@ -1242,6 +1264,13 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -1242,6 +1264,13 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
} }
else else
{ {
HashMap itmVolumeMap = getItemVoumeMap(itemCode, "", conn);
harmonizDescr = (String)itmVolumeMap.get("HARMONIZATION_DESCR");
harmonizCode = (String)itmVolumeMap.get("HARMONIZATION_NO");
caseWeight = (Double)itmVolumeMap.get("ITEM_WEIGHT");
originCountry = (String)itmVolumeMap.get("ORIGIN_COUNTRY");
packSizeCase = (Double)itmVolumeMap.get("PACK_SIZE");
noArt = (Double)linkMap.get(itemCode); noArt = (Double)linkMap.get(itemCode);
comInfo.setQuantity(noArt); comInfo.setQuantity(noArt);
} }
...@@ -1259,7 +1288,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo ...@@ -1259,7 +1288,7 @@ public class GenerateLabelsPrc extends ProcessEJB implements GenerateLabelsPrcLo
//comInfo.setNaftaFlag(false);//False as Per Taro Need To change canda/Mexico as true. //comInfo.setNaftaFlag(false);//False as Per Taro Need To change canda/Mexico as true.
HashMap sordMap = getSordInfo(saleOrder,conn); HashMap sordMap = getSordInfo(saleOrder,conn);
shipCountry = sordMap.get("COUNT_CODE").toString(); shipCountry = sordMap.get("COUNT_CODE").toString();
System.out.println(" shipCountry ["+shipCountry+"]"); System.out.println(" shipCountry ["+shipCountry+"]harmonizDescr["+harmonizDescr);
if(nafFlag.indexOf(shipCountry) != -1) if(nafFlag.indexOf(shipCountry) != -1)
{ {
comInfo.setNaftaFlag(true); comInfo.setNaftaFlag(true);
......
...@@ -1810,6 +1810,30 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC ...@@ -1810,6 +1810,30 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
//changed by sankara on 10/06/14 for picking not allowed if pick deallocation done start.
String lineNo = genericUtility.getColumnValue("line_no__ord", currFormDataDom, objContext );
System.out.println("lineNo:::::::"+lineNo);
sql = " SELECT COUNT(*) AS COUNT FROM PICK_ORD_DET PO WHERE (PO.QUANTITY - (CASE WHEN PO.DEALLOC_QTY IS NULL THEN 0 ELSE PO.DEALLOC_QTY END )) > 0 "+
" AND PO.PICK_ORDER = ? AND PO.LINE_NO = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder);
pstmt.setString(2, lineNo);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt("COUNT");
System.out.println("pickCount::::::"+cnt);
}
if(cnt == 0)
{
errList.add( "VTINVQUNAT" );
errFields.add( childNodeName.toLowerCase() );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//changed by sankara on 10/06/14 for picking not allowed if pick deallocation done end.
} }
//Changed by Rohan on 06-10-12 to generate hazardous material report.start //Changed by Rohan on 06-10-12 to generate hazardous material report.start
else if("item_code".equalsIgnoreCase( childNodeName )) else if("item_code".equalsIgnoreCase( childNodeName ))
......
...@@ -492,7 +492,8 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -492,7 +492,8 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
updateRowMap.put("loc_code", locCodeTo); updateRowMap.put("loc_code", locCodeTo);
updateRowMap.put("lot_sl", lotSlNew);//added by akhilesh on 23/jun/2012 // 24/06/12 manoharan it should be lot_sl not lot_sl__new updateRowMap.put("lot_sl", lotSlNew);//added by akhilesh on 23/jun/2012 // 24/06/12 manoharan it should be lot_sl not lot_sl__new
updateRowMap.put("tran_type", "R");//Creating receipt updateRowMap.put("tran_type", "R");//Creating receipt
noArt = Math.floor((quantity) / shipperSize) ; //changed by pragyan on 12/06/14 already declared in above
//noArt = Math.floor((quantity) / shipperSize) ;
updateRowMap.put("no_art", noArt); updateRowMap.put("no_art", noArt);
updateRowMap.put("gross_weight", caseGrossWeight * noArt); updateRowMap.put("gross_weight", caseGrossWeight * noArt);
updateRowMap.put("net_weight", caseNetWeight * noArt); updateRowMap.put("net_weight", caseNetWeight * noArt);
...@@ -1461,7 +1462,22 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -1461,7 +1462,22 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
//Changed by sumit on 11/09/12 updating wave_status of pick_order of wave_task_det end. //Changed by sumit on 11/09/12 updating wave_status of pick_order of wave_task_det end.
updCnt= 0; updCnt= 0;
updCnt = waveStatusUpdate(pickOrder, conn); //changed by sankara on 12/06/14 in case of pick order blank start.
//updCnt = waveStatusUpdate(pickOrder, conn);
if(pickOrder !=null && pickOrder.trim().length() > 0 )
{
updCnt = waveStatusUpdate(pickOrder, conn);
}
else
{
updCnt = waveStatusUpdate(replOrder, conn);
}
//changed by sankara on 12/06/14 in case of pick order balnk end.
if( updCnt > 0)
{
System.out.println( updCnt + " row of wave_status updated successfully" );
}
//Changed by sumit on 31/07/12 for updating wave_status for next task end.
if( updCnt > 0) if( updCnt > 0)
{ {
System.out.println( updCnt + " row of wave_status updated successfully" ); System.out.println( updCnt + " row of wave_status updated successfully" );
...@@ -1980,7 +1996,9 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -1980,7 +1996,9 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
{ {
sql= "SELECT QUANTITY,ALLOC_QTY,(CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END) AS HOLD_QTY " + sql= "SELECT QUANTITY,ALLOC_QTY,(CASE WHEN STOCK.HOLD_QTY IS NULL THEN 0 ELSE STOCK.HOLD_QTY END) AS HOLD_QTY " +
" FROM STOCK WHERE ITEM_CODE = ? AND SITE_CODE = ? " " FROM STOCK WHERE ITEM_CODE = ? AND SITE_CODE = ? "
+" AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ?"; //changed by sankara on 12/06/14 for replenishment transaction slow
// +" AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ? ";
+" AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ? AND QUANTITY > 0 ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
pstmt.setString(2, siteCode); pstmt.setString(2, siteCode);
...@@ -2013,8 +2031,9 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote, ...@@ -2013,8 +2031,9 @@ public class ReplIssConf extends ActionHandlerEJB implements ReplIssConfRemote,
stockQty = quantity - (allocQty - qtyAllocate); stockQty = quantity - (allocQty - qtyAllocate);
System.out.println("For stockQty ["+stockQty+"]"); System.out.println("For stockQty ["+stockQty+"]");
stockQty = stockQty - holdQty;*/ stockQty = stockQty - holdQty;*/
//changed by sankara on 12/06/14 for replenishment transaction slow
sql= "SELECT SUM(QTY_ALLOC) as QTY_ALLOC FROM SORDALLOC WHERE ITEM_CODE = ? AND SITE_CODE = ? AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ?"; //sql= "SELECT SUM(QTY_ALLOC) as QTY_ALLOC FROM SORDALLOC WHERE ITEM_CODE = ? AND SITE_CODE = ? AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ?";
sql= "SELECT SUM(QTY_ALLOC) as QTY_ALLOC FROM SORDALLOC WHERE ITEM_CODE = ? AND SITE_CODE = ? AND LOC_CODE = ? AND LOT_NO = ? AND LOT_SL = ? AND QTY_ALLOC > 0 ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
pstmt.setString(2, siteCode); pstmt.setString(2, siteCode);
......
...@@ -1130,7 +1130,46 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1130,7 +1130,46 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
} }
} }
//changed by sankara on 16/06/14 duplicate pro number validation start.
String proNumber = "";
sql = " SELECT PRO_NO FROM SHIPMENT WHERE SHIPMENT_ID = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if( rs.next() )
{
proNumber = checkNull( rs.getString("PRO_NO"));
System.out.println("proNumber::::::"+proNumber);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
if( proNumber != null && proNumber.trim().length() > 0 )
{
System.out.println("proNumber1::::::"+proNumber);
sql = " SELECT COUNT(*) AS COUNT FROM SHIPMENT WHERE PRO_NO = ? AND SHIPMENT_ID <> ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, proNumber);
pstmt.setString(2, tranId);
rs = pstmt.executeQuery();
if( rs.next() )
{
count = rs.getInt("COUNT");
System.out.println("count::::::"+count);
}
if(count > 0)
{
errString = itmDBAccessLocal.getErrorString("","VTINVPRONO","");
return errString;
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
}
//changed by sankara on 16/06/14 duplicate pro number validation end.
if(conn != null) if(conn != null)
{ {
conn.commit(); conn.commit();
......
...@@ -88,9 +88,9 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -88,9 +88,9 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
String errString = ""; String errString = "";
//Changed by sumit on 22/09/12 create refSer variable. //Changed by sumit on 22/09/12 create refSer variable.
String refSer = ""; String refSer = "";
ResultSet rs = null; ResultSet rs = null,rs1=null;
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null,pstmt1=null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -120,6 +120,11 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -120,6 +120,11 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
String palletNo = ""; String palletNo = "";
String cartonNo = ""; String cartonNo = "";
String refId = ""; String refId = "";
//changed by sankara on 16/06/14 for duplicate pro number.
String pronumber = "";
String shipmentid = "";
java.util.Date tranDate = null;
String prdCode = "",siteCode="";
//Chnaged by Rohan on 31-07-13 for define variable.end //Chnaged by Rohan on 31-07-13 for define variable.end
int currentFormNo = 0; int currentFormNo = 0;
long pronoFromAmt = 0; long pronoFromAmt = 0;
...@@ -128,17 +133,11 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -128,17 +133,11 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
ConnDriver connDriver = null; ConnDriver connDriver = null;
//changed by sankara on 15/10/13 for clubing multiple ptcn //changed by sankara on 15/10/13 for clubing multiple ptcn
ibase.webitm.utility.wms.CommonWmsUtil.ALL_PTCN_EX_COUNT = 0; ibase.webitm.utility.wms.CommonWmsUtil.ALL_PTCN_EX_COUNT = 0;
//changed by sankara on 07/jun/14 for period stat
String prdCode = "",siteCode="";
java.util.Date tranDate = null;
PreparedStatement pstmt1 = null;
ResultSet rs1 = null;
try try
{ {
connDriver = new ConnDriver(); connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
connDriver = null; connDriver = null;
//changed by sankara on 07/jun/14 for period stat
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getApplDateFormat());
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ); userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
...@@ -255,14 +254,17 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -255,14 +254,17 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
}//end }//end
} }
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
} }
}
}//End of site_code validation
/* /*
else if ( childNodeName.equalsIgnoreCase("tran_code") ) else if ( childNodeName.equalsIgnoreCase("tran_code") )
{ {
...@@ -501,6 +503,58 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -501,6 +503,58 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
else if ( childNodeName.equalsIgnoreCase("pro_no") ) //changes lr_no to pro_no as per manoharan sir else if ( childNodeName.equalsIgnoreCase("pro_no") ) //changes lr_no to pro_no as per manoharan sir
{ {
//changed by sankara on 16/06/14 for pro number duplicates start.
System.out.println("cc");
pronumber = checkNull(genericUtility.getColumnValue("pro_no", dom));
shipmentid = checkNull(genericUtility.getColumnValue("shipment_id", dom));
System.out.println("pronumber::::::"+columnValue);
System.out.println("tranid:::::::"+shipmentid);
System.out.println("editFlag:::::"+editFlag);
sql = " SELECT COUNT(*) AS COUNT FROM SHIPMENT WHERE PRO_NO = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pronumber);
rs = pstmt.executeQuery();
if( rs.next() )
{
cnt = rs.getInt("COUNT");
System.out.println("cnt::::::::"+cnt);
}
if( cnt > 0 && !editFlag.equalsIgnoreCase("E") )
{
errCode = "VTINVPRONO";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
System.out.println("sankara:::::::");
if( cnt > 0 && editFlag.equalsIgnoreCase("E") )
{
System.out.println("inside editFlag:::::"+editFlag);
sql = " SELECT COUNT(*) AS COUNT FROM SHIPMENT WHERE PRO_NO = ? AND SHIPMENT_ID <> ? " ;
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, pronumber);
pstmt1.setString(2, shipmentid);
rs1 = pstmt1.executeQuery();
if( rs1.next() )
{
cnt = rs1.getInt("COUNT");
System.out.println("cnt1::::::::"+cnt);
}
if( cnt > 0 )
{
errCode = "VTINVPRONO";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//changed by sankara on 11/06/14 for pro number duplicates end.
/* columnValue = checkNull(genericUtility.getColumnValue("tran_code", dom)); /* columnValue = checkNull(genericUtility.getColumnValue("tran_code", dom));
columnValue1 = checkNull(genericUtility.getColumnValue("pro_no", dom)); columnValue1 = checkNull(genericUtility.getColumnValue("pro_no", dom));
if(columnValue1.trim().length() > 0) if(columnValue1.trim().length() > 0)
......
...@@ -12721,30 +12721,40 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -12721,30 +12721,40 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
System.out.println("DSO exceed..."); System.out.println("DSO exceed...");
isReplHdrDSO = false; isReplHdrDSO = false;
dsoLocationset.clear(); dsoLocationset.clear();
//Changed By Pragyan 12/JUN/14 To re assign the line no
rplCntDSO = 1;
} }
if(pndLocationset.size() >= Integer.parseInt(activeReplSplitCnt)) if(pndLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{ {
System.out.println("pnd exceed..."); System.out.println("pnd exceed...");
isReplHdrPND = false; isReplHdrPND = false;
pndLocationset.clear(); pndLocationset.clear();
//Changed By Pragyan 12/JUN/14 To re assign the line no
rplCntPND = 1;
} }
if(caspkLocationset.size() >= Integer.parseInt(activeReplSplitCnt)) if(caspkLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{ {
System.out.println("caspk exceed...."); System.out.println("caspk exceed....");
isReplHdr = false; isReplHdr = false;
caspkLocationset.clear(); caspkLocationset.clear();
//Changed By Pragyan 12/JUN/14 To re assign the line no
replCnt = 1;
} }
if(psoLocationset.size() >= Integer.parseInt(activeReplSplitCnt)) if(psoLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{ {
System.out.println("pso exceed..."); System.out.println("pso exceed...");
isReplHdrPSO = false; isReplHdrPSO = false;
psoLocationset.clear(); psoLocationset.clear();
//Changed By Pragyan 12/JUN/14 To re assign the line no
rplCntPSO = 1;
} }
if(prsvLocationset.size() >= Integer.parseInt(activeReplSplitCnt)) if(prsvLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{ {
System.out.println("prsv exceed...."); System.out.println("prsv exceed....");
isReplHdrRSV = false; isReplHdrRSV = false;
prsvLocationset.clear(); prsvLocationset.clear();
//Changed By Pragyan 12/JUN/14 To re assign the line no
rplCntRSV = 1;
} }
......
...@@ -45618,6 +45618,112 @@ VALUES ( ...@@ -45618,6 +45618,112 @@ VALUES (
NULL, NULL,
NULL); NULL);
commit; commit;
--chanegd by sankara on 16/06/14 update function and messages sql
--changed by sankara on 10/06/14 updated messages for picking not allowed
INSERT INTO messages (
msg_no,
msg_str ,
msg_descr ,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source ,
chg_date ,
chg_user ,
chg_term ,
override_input ,
mail_option )
VALUES (
'VTINVQUNAT',
'Picking not allowed',
'Pick Deallocation Done Picking not allowed',
'E',
'Y',
NULL,
NULL,
NULL,
fn_sysdate(),
'BASE ',
'BASE ',
NULL,
NULL);
INSERT INTO messages (
msg_no,
msg_str ,
msg_descr ,
msg_type ,
msg_opt ,
msg_time ,
alarm ,
err_source ,
chg_date ,
chg_user ,
chg_term ,
override_input ,
mail_option )
VALUES (
'VTINVPRONO',
'Duplicate Pro Number',
'The Pro Number already used for another shipment Transaction.',
'E',
'Y',
NULL,
NULL,
NULL,
fn_sysdate(),
'Base',
'Base',
NULL,
NULL);
CREATE OR REPLACE FUNCTION FN_WAVE_DEALLOCATED(VI_REF_SER IN CHAR ,VI_REF_Id IN VARCHAR)
RETURN VARCHAR2 IS DEALLOCATED VARCHAR2(5);
flagRepl BOOLEAN := true;
flagPick BOOLEAN := true;
cursor C1 is SELECT nvl(repl_ord_det.cancel_mode,'N') as DEALLOCATIOM1 from repl_ord_det where repl_ord_det.repl_order = VI_REF_Id;
cursor C2 is SELECT (nvl(Quantity,0)-nvl(dealloc_qty,0)) as DEALLOCATIOM1 from pick_ord_det where pick_ord_det.pick_order = VI_REF_Id;
BEGIN
--FOR PICK
IF(VI_REF_SER = 'P-PICK' OR VI_REF_SER = 'C-PICK' OR VI_REF_SER = 'A-PICK' OR VI_REF_SER = 'M-PICK') THEN
FOR deallcatTaskPick in C2
LOOP
IF(flagPick) Then
IF(deallcatTaskPick.DEALLOCATIOM1>0) Then
DEALLOCATED :='N';
flagPick := false;
ELSE
DEALLOCATED :='Y';
End IF;
End IF;
END LOOP;
RETURN DEALLOCATED;
ELSIF(VI_REF_SER = 'R-TASK' OR VI_REF_SER = 'RP-PND' OR VI_REF_SER = 'R-CPA' OR VI_REF_SER = 'R-PND' OR VI_REF_SER = 'S-DOC' OR VI_REF_SER = 'RP-ACT' OR VI_REF_SER = 'RR-DSA' OR VI_REF_SER = 'RD-DSA' OR VI_REF_SER = 'R-DSO' OR VI_REF_SER = 'RS-DSO' OR VI_REF_SER = 'RN-DSA') THEN
--FOR REPL
FOR deallcatTaskRepl in C1
LOOP
IF( flagRepl) Then
IF(deallcatTaskRepl.DEALLOCATIOM1='Y') Then
DEALLOCATED :='Y';
ELSE
DEALLOCATED := 'N';
flagRepl :=false;
End IF;
End IF;
END LOOP;
RETURN DEALLOCATED;
ELSE
DEALLOCATED := ' ';
RETURN DEALLOCATED;
End IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DEALLOCATED :=' ';
RETURN DEALLOCATED;
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