Commit c45d2c89 authored by ppatro's avatar ppatro

changed by sankara on 20/01/2014 updated wavegeneprc,shipmentconf,replissic...

changed by sankara on 20/01/2014 updated wavegeneprc,shipmentconf,replissic and messages sql given by pragyan


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94141 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cdebcca6
......@@ -410,14 +410,15 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
}
else
{
errList.add( "ACTIVEPICK" );
errList.add( "VTACTREPLO" );
errFields.add( childNodeName.toLowerCase() );
}
}
//Changed By Pragyan
//else if ( "repl_iss".equalsIgnoreCase(objName) && ! orderType.trim().equalsIgnoreCase("C") && ! orderType.trim().equalsIgnoreCase("M") && ! orderType.trim().equalsIgnoreCase("E") && ! orderType.trim().equalsIgnoreCase("F") && ! orderType.trim().equalsIgnoreCase("G") && ! orderType.trim().equalsIgnoreCase("H") && ! orderType.trim().equalsIgnoreCase("J") && ! orderType.trim().equalsIgnoreCase("K") && ! orderType.trim().equalsIgnoreCase("I") )//added by akhilesh on 23/jun/2012 put upper condition(orderType.trim().equalsIgnoreCase("I")) in this if
//Changed by Rohan on 05-09-12 for stock to dock replanishment
else if ( "repl_iss".equalsIgnoreCase(objName) && ! orderType.trim().equalsIgnoreCase("C") && ! orderType.trim().equalsIgnoreCase("M") && ! orderType.trim().equalsIgnoreCase("E") && ! orderType.trim().equalsIgnoreCase("F") && ! orderType.trim().equalsIgnoreCase("G") && ! orderType.trim().equalsIgnoreCase("H") && ! orderType.trim().equalsIgnoreCase("J") && ! orderType.trim().equalsIgnoreCase("K") && ! orderType.trim().equalsIgnoreCase("I") && ! orderType.trim().equalsIgnoreCase("Q") && ! orderType.trim().equalsIgnoreCase("D") && ! orderType.trim().equalsIgnoreCase("L"))//added by akhilesh on 23/jun/2012 put upper condition(orderType.trim().equalsIgnoreCase("I")) in this if
//else if ( "repl_iss".equalsIgnoreCase(objName) && ! orderType.trim().equalsIgnoreCase("C") && ! orderType.trim().equalsIgnoreCase("M") && ! orderType.trim().equalsIgnoreCase("E") && ! orderType.trim().equalsIgnoreCase("F") && ! orderType.trim().equalsIgnoreCase("G") && ! orderType.trim().equalsIgnoreCase("H") && ! orderType.trim().equalsIgnoreCase("J") && ! orderType.trim().equalsIgnoreCase("K") && ! orderType.trim().equalsIgnoreCase("I") && ! orderType.trim().equalsIgnoreCase("Q") && ! orderType.trim().equalsIgnoreCase("D") && ! orderType.trim().equalsIgnoreCase("L"))//added by akhilesh on 23/jun/2012 put upper condition(orderType.trim().equalsIgnoreCase("I")) in this if
else if ( "repl_iss".equalsIgnoreCase(objName) && ! orderType.trim().equalsIgnoreCase("C") && ! orderType.trim().equalsIgnoreCase("M") && ! orderType.trim().equalsIgnoreCase("E") && ! orderType.trim().equalsIgnoreCase("F") && ! orderType.trim().equalsIgnoreCase("G") && ! orderType.trim().equalsIgnoreCase("H") && ! orderType.trim().equalsIgnoreCase("J") && ! orderType.trim().equalsIgnoreCase("K") && ! orderType.trim().equalsIgnoreCase("I") && ! orderType.trim().equalsIgnoreCase("D") && ! orderType.trim().equalsIgnoreCase("L"))//added by akhilesh on 23/jun/2012 put upper condition(orderType.trim().equalsIgnoreCase("I")) in this if
{
/*System.out.println("equals ignores case");
errList.add( "CASEPICK" );
......@@ -433,7 +434,7 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
else
{
System.out.println("equals ignores case");
errList.add( "CASEPICK" );
errList.add( "VTCASREPLO" );
errFields.add( childNodeName.toLowerCase() );
}
}
......
......@@ -302,7 +302,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pstmt.close();
pstmt = null;
}
}//if(("".equalsIgnoreCase(refSer.trim())) || ("D-ISS".equalsIgnoreCase(refSer.trim()) || "C-ISS".equalsIgnoreCase(refSer.trim()) || "P-RET".equalsIgnoreCase(refSer.trim()) ))
sql = "SELECT COUNT(*) as COUNT FROM SHIPMENT_CONTENT WHERE SHIPMENT_ID = ?";
pstmt = conn.prepareStatement(sql);
......@@ -3065,7 +3065,10 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
ResultSet rs = null;
//changed by sankara on 03/01/14 for update pro_no
String shiprono = "";
String adsiFlag = "N";
System.out.println(" sumit inside update shipment ");
try
{
......@@ -3087,6 +3090,49 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pstmt.close();
pstmt = null;
}
//changed by sankara on 03/01/14 for update pro_no end.
sql = "SELECT tran_name, PRONO_LAST , PRONO_FROM, PREFIX,ADSI_FLAG FROM transporter WHERE tran_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranCode);
rs = pstmt.executeQuery();
if( rs.next() )
{
descr = rs.getString(1);
descr1 = rs.getString(2);
prefix = rs.getString(4);
adsiFlag = rs.getString(5);
if(descr1 == null || descr1.trim().length() == 0)
{
descr1 = checkNull(rs.getString(3));
}
}
if( rs != null)
{
rs.close();
rs = null;
}
if( pstmt != null)
{
pstmt.close();
pstmt = null;
}
if("Y".equalsIgnoreCase(adsiFlag))
{
return 0;
}
if(descr1.trim().length() > 0)
{
pronoLast = Long.parseLong(descr1) + 1;
}
//changed by sankara on 03/01/14 for update pro_no start.
sql = " SELECT PRO_NO FROM SHIPMENT WHERE SHIPMENT_ID = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -3106,7 +3152,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pstmt.close();
pstmt = null;
}
//changed by sankara on 03/01/14 for update pro_no end.
/*//changed by sankara on 03/01/14 for update pro_no end.
sql = "SELECT tran_name, PRONO_LAST , PRONO_FROM, PREFIX FROM transporter WHERE tran_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranCode);
......@@ -3136,7 +3182,7 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
{
pronoLast = Long.parseLong(descr1) + 1;
}
// changed by sankara on 03/01/14 for update pro_no
*/ // changed by sankara on 03/01/14 for update pro_no
//if(pronoLast != 0)
//{
//valueXmlString.append( "<lr_no><![CDATA[" ).append( pronoLast ).append( "]]></lr_no>\r\n" ); // commented to generate SSCC18 complaint number
......
......@@ -2839,7 +2839,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String invSt = "";
//Changed by Rohan on 7/6/12 To set Reason detai null.start
String SqlSord = "";
PreparedStatement pstmtSord = null;
PreparedStatement pstmtSord = null,pstmtMan = null,pstmtInv=null;
ResultSet rsMan = null,rsInv = null;
//Changed by Rohan on 7/6/12 To set Reason detai null.end
double qtyAllocate = 0;
double noOfArticals = 0;
......@@ -3928,7 +3929,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(rs.next())
{
waveFlag = rs.getString("WAVE_FLAG");
if(waveFlag == null)
/* if(waveFlag == null)
waveFlag = "N";
}
if( rs != null)
......@@ -3943,12 +3944,15 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
System.out.print("Current Wave Flag ["+waveFlag+"]");
*/
waveFlag = waveFlag != null?waveFlag:"N";
if("N".equalsIgnoreCase(waveFlag))
{
manualStock = true;
if(pstmt != null)
/*if(pstmt != null)
{
pstmt.close();
pstmt = null;
......@@ -3957,7 +3961,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
rs.close();
rs = null;
}
}*/
sodreAlloc = "SELECT S.QTY_ALLOC AS QTY_ALLOC,S.QUANTITY AS QUANTITY,S.LOT_SL AS LOT_SL,S.LOT_NO AS LOT_NO,"+
" S.LOC_CODE AS LOC_CODE,I.LOC_TYPE__PARENT AS LOC_TYPE__PARENT,I.LOC_TYPE AS LOC_TYPE,I.LOC_ZONE__PREF " +
......@@ -3968,51 +3972,51 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
" AND S.EXP_LEV = ? "+
" AND S.ALLOC_MODE <> ?";
pstmt = conn.prepareStatement(sodreAlloc);
pstmt.setString(1,saleOrder);
pstmt.setString(2, lineNo);
pstmt.setString(3,itemCode);
pstmt.setString(4,expLev);
pstmt.setString(5,"W");
pstmtMan = conn.prepareStatement(sodreAlloc);
pstmtMan.setString(1,saleOrder);
pstmtMan.setString(2, lineNo);
pstmtMan.setString(3,itemCode);
pstmtMan.setString(4,expLev);
pstmtMan.setString(5,"W");
rs = pstmt.executeQuery();
if(rs.next())
rsMan = pstmtMan.executeQuery();
while(rsMan.next())
{
qtyAllocate = rs.getInt("QTY_ALLOC");
noOfArticals = rs.getInt("QUANTITY");
lotSl = rs.getString("LOT_SL");
lotNo = rs.getString("LOT_NO");
locCd = rs.getString("LOC_CODE");
locTypeParent = rs.getString("LOC_TYPE__PARENT");
locType = rs.getString("LOC_TYPE");
locZonePref = rs.getInt("LOC_ZONE__PREF");
qtyAllocate = rsMan.getInt("QTY_ALLOC");
noOfArticals = rsMan.getInt("QUANTITY");
lotSl = rsMan.getString("LOT_SL");
lotNo = rsMan.getString("LOT_NO");
locCd = rsMan.getString("LOC_CODE");
locTypeParent = rsMan.getString("LOC_TYPE__PARENT");
locType = rsMan.getString("LOC_TYPE");
locZonePref = rsMan.getInt("LOC_ZONE__PREF");
System.out.println("lotSl===<"+lotSl);
System.out.println("lot_no===<"+lotNo);
System.out.println("locCd===<"+locCd);
System.out.println("locType===<"+locType);
System.out.println("locTypeParent===<"+locTypeParent);
}
//}
sqlinvStat = "SELECT INV_STAT FROM LOCATION WHERE LOC_CODE= ?";
pstmt = conn.prepareStatement(sqlinvStat);
pstmt.setString(1,locCd);
rs = pstmt.executeQuery();
if(rs.next())
pstmtInv = conn.prepareStatement(sqlinvStat);
pstmtInv.setString(1,locCd);
rsInv = pstmtInv.executeQuery();
if(rsInv.next())
{
invSt= rs.getString("INV_STAT");
invSt= rsInv.getString("INV_STAT");
System.out.println("INV STATSSS"+invSt);
}
if(pstmt != null)
if(pstmtInv != null)
{
pstmt.close();
pstmt = null;
pstmtInv.close();
pstmtInv = null;
}
if(rs != null)
if(rsInv != null)
{
rs.close();
rs = null;
rsInv.close();
rsInv = null;
}
String resvInvStat = "";
resvInvStat = discommon.getDisparams("999999","RESERV_LOCATION",conn);
......@@ -4229,24 +4233,52 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
}//if(rs.next())
if( rsMan != null)
{
rsMan.close();
rsMan = null;
}
if( pstmtMan != null)
{
pstmtMan.close();
pstmtMan = null;
}
if(manualStock)
{
int update = 0;
sql= "UPDATE SORDALLOC SET WAVE_FLAG = 'Y' WHERE SALE_ORDER = ? AND LINE_NO = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, saleOrder);
pstmt.setString(2, lineNoSord);
update = pstmt.executeUpdate();
pstmtInv = conn.prepareStatement(sql);
pstmtInv.setString(1, saleOrder);
pstmtInv.setString(2, lineNoSord);
update = pstmtInv.executeUpdate();
if(update > 0)
{
System.out.println(" SORD_ALLOC updated ["+update+"]");
}
if( pstmt!= null)
if( pstmtInv!= null)
{
pstmtInv.close();
pstmtInv = null;
}
}
}
if( rs != null)
{
rs.close();
rs = null;
}
if( pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
System.out.print("Current Wave Flag ["+waveFlag+"]");
if(allocQty > 0)
{
......
......@@ -44992,3 +44992,63 @@ commit;
NULL,
NULL);
commit;
-- changed by sankara on 20/01/2014 update messages sql given by pragyan.
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 (
'VTACTREPLO',
'Invalid Replineshment Order',
'Entered Replenishment order is not an Active Replenishment Order',
'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 (
'VTCASREPLO',
'Invalid Replenishment Order',
'Entered Replenishment order is an Active Replenishment Order',
'E',
'Y',
NULL,
NULL,
NULL,
fn_sysdate(),
'Base ',
'Base ',
NULL,
NULL);
commit;
\ No newline at end of file
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