Commit 4a17bb4f authored by rbhogale's avatar rbhogale

Changed by Rohan on 15-10-12 to add stock to dock condition in hazmat report


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91994 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a671fbf6
......@@ -143,7 +143,9 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
PreparedStatement pstmtitem = null;
ResultSet rsitem = null;
String sqlTran = "";
String pickOrd = "";
//Changed by Rohnan on 15-10-12 for bug fixing
//String pickOrd = "";
String replOrderS = "";
String transMode = "";
String itemCd = "";
String sqlptcn = "";
......@@ -1122,12 +1124,18 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
//Changed by sumit on 09/10/12 write this code in post save end.
}
//Changed by Rohan on 11-10-12 to add start hazmat validation in case of stock to dock.start
else if("item_code".equalsIgnoreCase( childNodeName ) && "repl_iss_dock".equalsIgnoreCase(getObjNameFromDom(currFormDataDom, "objName", objContext)) )
//Changed by Rohan on 15-10-12 for bug fixing
//else if("item_code".equalsIgnoreCase( childNodeName ) && "repl_iss_dock".equalsIgnoreCase(getObjNameFromDom(currFormDataDom, "objName", objContext)) )
else if("item_code".equalsIgnoreCase( childNodeName ))
{
//to check item is hazarous.start
itemCd = checkNull(genericUtility.getColumnValue("item_code", allFormDataDom, "3" ));
pickOrd = checkNull(genericUtility.getColumnValue("repl_order", allFormDataDom, "3" ));
//Chnaged by rohan on 15-10-12 for bug fixing
//pickOrd = checkNull(genericUtility.getColumnValue("repl_order", allFormDataDom, "3" ));
replOrderS = checkNull(genericUtility.getColumnValue("repl_order", allFormDataDom, "3" ));
//Changed by Rohan on 15-10-12 to check stock to dock present or not.satrt
/*
sqlitem = "SELECT HAZARDOUS FROM ITEM WHERE ITEM_CODE=? ";
pstmtitem = conn.prepareStatement(sqlitem);
......@@ -1150,22 +1158,25 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
rsitem.close();
rsitem = null;
}
*/
//to check item is hazarous.end
//to check transporter mode.start
//Changed by Rohan on 15-10-12 to check stock to dock present or not.end
sqlptcn ="SELECT PTCN,WAVE_ID FROM WAVE_TASK_DET WHERE REF_ID = ?";
//Changed by rohan on 15-10-12 to check order type of replanishment
//sqlptcn ="SELECT PTCN,WAVE_ID FROM WAVE_TASK_DET WHERE REF_ID = ?";
sqlptcn ="SELECT W.PTCN,W.WAVE_ID,R.ORDER_TYPE FROM WAVE_TASK_DET W,REPL_ORD_HDR R WHERE W.REF_ID = ?"
+ " AND R.REPL_ORDER = W.REF_ID";
pstmtitem = conn.prepareStatement(sqlptcn);
pstmtitem.setString(1,pickOrd);
pstmtitem.setString(1,replOrderS);
rsitem = pstmtitem.executeQuery();
if(rsitem.next())
{
ptcnHaz = rsitem.getString("PTCN") == null?"":rsitem.getString("PTCN");
waveIdHaz = rsitem.getString("WAVE_ID") == null?"":rsitem.getString("WAVE_ID");
//Changed by Rohan on 15-10-12 to get order type
orderType = rsitem.getString("ORDER_TYPE") == null?"":rsitem.getString("ORDER_TYPE");
System.out.println("ptcnHaz*"+ptcnHaz+"waveIdHaz"+waveIdHaz);
}
if(pstmtitem != null)
{
......@@ -1178,6 +1189,34 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
rsitem = null;
}
//Changed by Rohan on 15-10-12 to call validation in stock to dock case only.start
if("D".equalsIgnoreCase(orderType) || "L".equalsIgnoreCase(orderType))
{
//Changed by Rohan on 15-10-12 to call validation in stock to dock case only.end
//Changed by Rohan on 15-10-12 to check hazardous material.start
sqlitem = "SELECT HAZARDOUS FROM ITEM WHERE ITEM_CODE=? ";
pstmtitem = conn.prepareStatement(sqlitem);
pstmtitem.setString(1,itemCd);
rsitem = pstmtitem.executeQuery();
if(rsitem.next())
{
hazMaterial = rsitem.getString("HAZARDOUS") == null?"":rsitem.getString("HAZARDOUS");
}
if(pstmtitem != null)
{
pstmtitem.close();
pstmtitem = null;
}
if(rsitem != null)
{
rsitem.close();
rsitem = null;
}
//Changed by Rohan on 15-10-12 to check hazardous material.end
sqlTran = "SELECT TRANS_MODE FROM DESPATCH WHERE DESP_ID IN(SELECT REF_ID FROM WAVE_TASK_DET "
+" WHERE REF_SER = ? AND WAVE_ID = ? AND PTCN = ?)";
pstmtitem = conn.prepareStatement(sqlTran);
......@@ -1191,7 +1230,6 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
{
transMode = rsitem.getString("TRANS_MODE") == null?"":rsitem.getString("TRANS_MODE");
System.out.println("transMode*"+transMode);
}
if(pstmtitem != null)
{
......@@ -1209,7 +1247,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
errList.add( "VTHAZMAT" );
errFields.add( childNodeName.toLowerCase() );
}
//Changed by Rohan on 15-10-12 to call validation in stock to dock case only
}
}
//Changed by Rohan on 11-10-12 to add start hazmat validation in case of stock to dock.start
......
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