Commit b2d1e9d0 authored by ppatro's avatar ppatro

issue tracker 12 new points


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93321 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d061a8aa
...@@ -1568,6 +1568,9 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal, ...@@ -1568,6 +1568,9 @@ public class DeallocArtPrc extends ProcessEJB implements WaveGenerationPrcLocal,
sql = " SELECT DT.DESP_ID, DT.LINE_NO, DT.LOC_CODE FROM DESPATCH D, DESPATCHDET DT , PICK_ORD_DET POD , WAVE_TASK_DET WTD " + sql = " SELECT DT.DESP_ID, DT.LINE_NO, DT.LOC_CODE FROM DESPATCH D, DESPATCHDET DT , PICK_ORD_DET POD , WAVE_TASK_DET WTD " +
" WHERE POD.PICK_ORDER = ? AND POD.LINE_NO = ? AND POD.PICK_ORDER = WTD.REF_ID " + " WHERE POD.PICK_ORDER = ? AND POD.LINE_NO = ? AND POD.PICK_ORDER = WTD.REF_ID " +
" AND POD.SALE_ORDER = WTD.SALE_ORDER " + " AND POD.SALE_ORDER = WTD.SALE_ORDER " +
// Changed by Sankara on 04-07-13 added new join for getting correct location[Start..]
" AND DT.SORD_NO = WTD.SALE_ORDER " +
// Changed by Sankara on 04-07-13 added new join for getting correct location[End..]
" AND WTD.WAVE_ID = D.WAVE_ID " + " AND WTD.WAVE_ID = D.WAVE_ID " +
" AND D.DESP_ID = DT.DESP_ID "; " AND D.DESP_ID = DT.DESP_ID ";
......
...@@ -472,6 +472,83 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -472,6 +472,83 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
} }
*/ */
} }
//Changed by sankara on 07-02-13 validations required for state, station, country[Start...]
else if ( childNodeName.equalsIgnoreCase("state_code") )
{
columnValue = genericUtility.getColumnValue("state_code",dom);
if(columnValue != null && columnValue.trim().length() > 0)
{
sql = "SELECT COUNT(*) FROM STATE WHERE STATE_CODE = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
cnt = rs.getInt(1);
if(cnt == 0)
{
errCode = "INVSTATE";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
else if ( childNodeName.equalsIgnoreCase("stan_code") )
{
columnValue = genericUtility.getColumnValue("stan_code",dom);
if(columnValue != null && columnValue.trim().length() > 0)
{
sql = "SELECT COUNT(*) FROM STATION WHERE STAN_CODE = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
cnt = rs.getInt(1);
if(cnt == 0)
{
errCode = "INVSTATION";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
else if ( childNodeName.equalsIgnoreCase("count_code") )
{
columnValue = genericUtility.getColumnValue("count_code",dom);
if(columnValue != null && columnValue.trim().length() > 0)
{
sql = " SELECT COUNT(*) FROM COUNTRY WHERE COUNT_CODE = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
cnt = rs.getInt(1);
if(cnt == 0)
{
errCode = "INVCOUNTRY";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
//Changed by sankara on 07-02-13 validations required for state,station country[End...]
} }
} }
break; break;
...@@ -1479,7 +1556,92 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob ...@@ -1479,7 +1556,92 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob
amt3 = amt1 + amt2 ; amt3 = amt1 + amt2 ;
valueXmlString.append( "<total_freight><![CDATA[" ).append( amt3 ).append( "]]></total_freight>\r\n" ); valueXmlString.append( "<total_freight><![CDATA[" ).append( amt3 ).append( "]]></total_freight>\r\n" );
} }
//Changed by sankara on 05-07-13 getting state code,station code,country code descriptions in item change[start....]
if(currentColumn.trim().equalsIgnoreCase( "itm_defaultedit" ))
{
columnValue = genericUtility.getColumnValue("stan_code__from",dom);
sql = "select descr from station WHERE stan_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
descr = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
columnValue = genericUtility.getColumnValue("stan_code__to",dom);
sql = "select descr from station WHERE stan_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
descr1 = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<station_a_descr><![CDATA[" ).append( checkNull( descr) ).append( "]]></station_a_descr>\r\n" );
valueXmlString.append( "<station_b_descr><![CDATA[" ).append( checkNull( descr1) ).append( "]]></station_b_descr>\r\n" );
}
else if( currentColumn.trim().equalsIgnoreCase( "stan_code" ) )
{
columnValue = genericUtility.getColumnValue("stan_code",dom);
sql = "select descr from station where stan_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
descr = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<station_c_descr><![CDATA[" ).append( checkNull( descr) ).append( "]]></station_c_descr>\r\n" );
}
else if( currentColumn.trim().equalsIgnoreCase( "state_code" ) )
{
columnValue = genericUtility.getColumnValue("state_code",dom);
sql = "select descr from state where state_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
descr = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<state_descr><![CDATA[" ).append( checkNull( descr) ).append( "]]></state_descr>\r\n" );
}
else if( currentColumn.trim().equalsIgnoreCase( "count_code" ) )
{
columnValue = genericUtility.getColumnValue("count_code",dom);
sql = "select descr from country where count_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
descr = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<country_descr><![CDATA[" ).append( checkNull( descr) ).append( "]]></country_descr>\r\n" );
}
//Changed by sankara on 05-07-13 getting state code,station code,country code descriptions in item change[End.....]
valueXmlString.append( "</Detail1>\r\n" ); valueXmlString.append( "</Detail1>\r\n" );
break; break;
......
...@@ -2297,6 +2297,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -2297,6 +2297,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tempMapReplenishment.put("QTY_AVAIL",stkQuantity); tempMapReplenishment.put("QTY_AVAIL",stkQuantity);
}*/ }*/
//Changed By Pragyan as It is not reuired actives are treated separately. //Changed By Pragyan as It is not reuired actives are treated separately.
stkQuantity = Math.floor(stkQuantity/itemPackSize) * itemPackSize;
tempMapReplenishment.put("QTY_ACTUAL", qtyActual); tempMapReplenishment.put("QTY_ACTUAL", qtyActual);
tempMapReplenishment.put("LAST_REPL_ID", lastReplenishmentID); tempMapReplenishment.put("LAST_REPL_ID", lastReplenishmentID);
tempMapReplenishment.put("REPL_LINE_NO", lineNoRepl); tempMapReplenishment.put("REPL_LINE_NO", lineNoRepl);
...@@ -3255,10 +3256,56 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -3255,10 +3256,56 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
invStat = invStat != null?invStat.trim():""; invStat = invStat != null?invStat.trim():"";
System.out.println("allocQty"+allocQty+"qtyAvailAlloc:::"+qtyAvailAlloc); System.out.println("allocQty"+allocQty+"qtyAvailAlloc:::"+qtyAvailAlloc);
if(((invStat.equalsIgnoreCase(resrvLoc) || invStat.equalsIgnoreCase(deepStoreLoc) || invStat.equalsIgnoreCase(casePickLoc) )) && "N".equalsIgnoreCase(isActivePickChecked)) //if(((invStat.equalsIgnoreCase(resrvLoc) || invStat.equalsIgnoreCase(deepStoreLoc) || invStat.equalsIgnoreCase(casePickLoc) )) && "N".equalsIgnoreCase(isActivePickChecked))
if(((invStat.equalsIgnoreCase(resrvLoc) || invStat.equalsIgnoreCase(deepStoreLoc) || invStat.equalsIgnoreCase(casePickLoc) )))
{ {
qtyAvailAlloc = Math.floor(qtyAvailAlloc/packSizeActive) * packSizeActive; if("N".equalsIgnoreCase(isActivePickChecked))
System.out.println("Only Case avilable Quantity["+qtyAvailAlloc+"]"); {
qtyAvailAlloc = Math.floor(qtyAvailAlloc/packSizeActive) * packSizeActive;
System.out.println("Only Case avilable Quantity["+qtyAvailAlloc+"]");
}
else
{
/*double avilbleActives = qtyAvailAlloc % packSizeActive;
double quantiAvilableAsCase = Math.floor(qtyAvailAlloc/packSizeActive) * packSizeActive;
double requiredCases = Math.floor(allocQty/packSizeActive) * packSizeActive;
double requiredActives = allocQty % packSizeActive;
System.out.println("From Stock Avilable Actives["+avilbleActives+"]");
System.out.println("From Stock quantiAvilableAsCase["+avilbleActives+"]");
System.out.println("Required Actives ["+avilbleActives+"]");
System.out.println("Required Cases ["+avilbleActives+"]");
*/
/*if(allocQty < packSizeActive && quantiAvilableAsCase <= 0 && allocQty > avilbleActives)
{
System.out.println("case1 --["+(allocQty < packSizeActive && quantiAvilableAsCase <= 0 && allocQty > avilbleActives)+"]");
qtyAvailAlloc = avilbleActives;
}
else if(allocQty > packSizeActive && allocQty >= qtyAvailAlloc && requiredCases >= quantiAvilableAsCase)
{
qtyAvailAlloc = quantiAvilableAsCase * packSizeActive;
System.out.println("case2 --["+(allocQty > packSizeActive && allocQty >= qtyAvailAlloc && requiredCases >= quantiAvilableAsCase)+"]");
}
else if( requiredCases <= quantiAvilableAsCase && avilbleActives > requiredActives)
{
System.out.println("case3 --["+(requiredCases <= quantiAvilableAsCase && avilbleActives > requiredActives)+"]");
if((requiredCases + 1 ) != quantiAvilableAsCase)
{
System.out.println("case3.4 --["+((requiredCases + 1 ) != quantiAvilableAsCase)+"]");
qtyAvailAlloc = quantiAvilableAsCase * packSizeActive;
}
}
*/
}
} }
...@@ -3397,7 +3444,36 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -3397,7 +3444,36 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
else else
{ {
tempMapReplenishment.put("QTY_AVAIL",qtyAvailAlloc); if("N".equalsIgnoreCase(isActivePickChecked))
{
tempMapReplenishment.put("QTY_AVAIL",qtyAvailAlloc);
}
else
{
double avilbleActives = qtyAvailAlloc % packSizeActive;
double quantiAvilableAsCase = Math.floor(qtyAvailAlloc/packSizeActive) * packSizeActive;
double requiredCases = Math.floor(lotQtyToBeAllocated/packSizeActive) * packSizeActive;
double requiredActives = lotQtyToBeAllocated % packSizeActive;
System.out.println("From Stock Avilable Actives["+avilbleActives+"]");
System.out.println("From Stock quantiAvilableAsCase["+avilbleActives+"]");
System.out.println("Required Actives ["+avilbleActives+"]");
System.out.println("Required Cases ["+avilbleActives+"]");
if(requiredActives <= avilbleActives)
{
qtyAvailAlloc = quantiAvilableAsCase;
System.out.println("Quantity avilable sets on ifblock"+quantiAvilableAsCase+"]");
}
/*else
{
qtyAvailAlloc = quantiAvilableAsCase - packSizeActive;
}*/
tempMapReplenishment.put("QTY_AVAIL",qtyAvailAlloc);
}
} }
tempMapReplenishment.put("QTY_ACTUAL", qtyActual); tempMapReplenishment.put("QTY_ACTUAL", qtyActual);
......
...@@ -41708,5 +41708,257 @@ VALUES ( ...@@ -41708,5 +41708,257 @@ VALUES (
'BASE', 'BASE',
NULL, NULL,
NULL); NULL);
////sankara 05-07-13 -------------
alter table shipment add state_code char(5);
alter table shipment add stan_code char(5);
alter table shipment add count_code char(5);
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 (
'INVCOUNTRY',
'Invalid Country',
'Please enter valid Country',
'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 (
'INVSTATE ',
'Invalid State',
'Please enter valid State',
'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 (
'INVSTATION',
'Invalid Station',
'Please enter valid Station',
'E',
'Y',
NULL,
NULL,
NULL,
fn_sysdate(),
'Base ',
'Base ',
NULL,
NULL);
INSERT INTO pophelp(
field_name ,
mod_name ,
sql_str ,
dw_object ,
msg_title ,
width ,
height ,
chg_date ,
chg_user ,
chg_term ,
dist_opt ,
filter_string ,
sql_input ,
default_col ,
pop_align ,
query_mode ,
page_context ,
pophelp_cols ,
pophelp_source ,
multi_opt ,
help_option )
VALUES (
'STAN_CODE',
'W_SHIPMENT',
'SELECT STAN_CODE,DESCR FROM STATION',
NULL,
'STATION CODE',
0,
0,
fn_sysdate(),
'Base ',
'Base ',
'1',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
INSERT INTO pophelp(
field_name ,
mod_name ,
sql_str ,
dw_object ,
msg_title ,
width ,
height ,
chg_date ,
chg_user ,
chg_term ,
dist_opt ,
filter_string ,
sql_input ,
default_col ,
pop_align ,
query_mode ,
page_context ,
pophelp_cols ,
pophelp_source ,
multi_opt ,
help_option )
VALUES (
'COUNT_CODE',
'W_SHIPMENT',
'SELECT COUNT_CODE,DESCR FROM COUNTRY',
NULL,
'COUNTRY CODE',
0,
0,
fn_sysdate(),
'Base ',
'Base ',
'1',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
INSERT INTO pophelp(
field_name ,
mod_name ,
sql_str ,
dw_object ,
msg_title ,
width ,
height ,
chg_date ,
chg_user ,
chg_term ,
dist_opt ,
filter_string ,
sql_input ,
default_col ,
pop_align ,
query_mode ,
page_context ,
pophelp_cols ,
pophelp_source ,
multi_opt ,
help_option )
VALUES (
'STATE_CODE',
'W_SHIPMENT',
'SELECT STATE_CODE,DESCR FROM STATE',
NULL,
'STATE CODE',
0,
0,
fn_sysdate(),
'Base ',
'Base ',
'1',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
INSERT INTO OBJ_ITEMCHANGE(
obj_name,
form_no ,
field_name ,
mandatory )
VALUES (
'shipment',
'1 ',
'count_code',
NULL);
INSERT INTO OBJ_ITEMCHANGE(
obj_name,
form_no ,
field_name ,
mandatory )
VALUES (
'shipment',
'1 ',
'stan_code',
NULL);
INSERT INTO OBJ_ITEMCHANGE(
obj_name,
form_no ,
field_name ,
mandatory )
VALUES (
'shipment',
'1 ',
'state_code',
NULL);
commit;
This source diff could not be displayed because it is too large. You can view the blob instead.
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