Commit ec5e423f authored by smestry's avatar smestry

W15LKAT004, Updated the servlet, for validation of size, color, dimension.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101359 ce508802-f39f-4f6c-b175-0d175dae99d5
parent eebf8fb2
......@@ -70,9 +70,16 @@ public class ProdWizItemChangeServlet extends HttpServlet
//Added by Prasad on 08/06/15 [for multiple action] END
// Changed by Sneha on 07-04-2016, for item description [Start]
String phyAttribute1 = "", phyAttribute2 = "", phyAttribute3 = "", itemCode = "", phyAttribute1DB = "", phyAttribute2DB = "", phyAttribute3DB = "";
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
String itemCode = request.getParameter("ITEMCODE");
itemCode = request.getParameter("ITEMCODE");
phyAttribute1 = request.getParameter("PHYATTRIBUTE1");
phyAttribute2 = request.getParameter("PHYATTRIBUTE2");
phyAttribute3 = request.getParameter("PHYATTRIBUTE3");
//System.out.println("PHYATTRIBUTE1 from request = ["+ phyAttribute1 +"] PHYATTRIBUTE2 = ["+ phyAttribute2 +"] PHYATTRIBUTE3 = ["+ phyAttribute3 +"]");
// Changed by Sneha on 07-04-2016, for item description [End]
/*sess = request.getSession();
......@@ -137,6 +144,58 @@ public class ProdWizItemChangeServlet extends HttpServlet
pstmt = null;
}
}
else if(action.equalsIgnoreCase( "GET_ITEM_ATTRIBUTE" ))
{
System.out.println("itemCode inside GET_ITEM_ATTRIBUTE ---------->>" + itemCode);
sql = " SELECT ITEM_PARNT FROM ITEM WHERE ITEM_CODE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs = pstmt.executeQuery();
if (rs.next())
{
sqlSel = "SELECT PHY_ATTRIB_1, PHY_ATTRIB_2, PHY_ATTRIB_3 FROM ITEM WHERE ITEM_PARNT = '"+checkNullAndTrim(rs.getString("ITEM_PARNT"))+"' ";
pstmtSel = conn.prepareStatement(sqlSel);
rsSel = pstmtSel.executeQuery();
while(rsSel.next())
{
phyAttribute1DB = checkNullAndTrim(rsSel.getString("PHY_ATTRIB_1"));
phyAttribute2DB = checkNullAndTrim(rsSel.getString("PHY_ATTRIB_2"));
phyAttribute3DB = checkNullAndTrim(rsSel.getString("PHY_ATTRIB_3"));
//System.out.println("PHYATTRIBUTE1 from Database = ["+ phyAttribute1DB +"] PHYATTRIBUTE2 = ["+ phyAttribute2DB +"] PHYATTRIBUTE3 = ["+ phyAttribute3DB +"]");
if(phyAttribute1DB.equalsIgnoreCase(phyAttribute1) && phyAttribute2DB.equalsIgnoreCase(phyAttribute2) && phyAttribute3DB.equalsIgnoreCase(phyAttribute3))
{
//System.out.println("----------- phyAttributes found same ------------------");
retStr = "Y";
}
else
{
retStr = "N";
}
}
if (rsSel != null)
{
rsSel.close();
rsSel = null;
}
if (pstmtSel != null )
{
pstmtSel.close();
pstmtSel = null;
}
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
// Changed by Sneha on 07-04-2016, for item description [End]
System.out.println("retStr ====>> ["+retStr+"]");
......
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