Commit a00a8fd3 authored by dhirajchavan's avatar dhirajchavan

REQID-D15LSUN033 FOR DATAWARE HOUSE,IC updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101010 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e1829bdb
......@@ -181,7 +181,7 @@ public class DwhProdItemIC extends ValidatorEJB implements DwhProdItemICLocal,Dw
if(itemUnit != null && itemUnit.trim().length() > 0)
{
sql = "select count(1) from item where unit = ?";
sql = "select count(1) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemUnit);
rs = pstmt.executeQuery();
......@@ -240,6 +240,72 @@ public class DwhProdItemIC extends ValidatorEJB implements DwhProdItemICLocal,Dw
}
else if (childNodeName.equalsIgnoreCase("item_parent_unit"))
{
itemParentUnit = genericUtility.getColumnValue("item_parent_unit", dom);
if (itemParentUnit == null)
{
errString = getErrorString(" ", "VMITMPUCB", userId);
break;
}
if(itemParentUnit != null && itemParentUnit.trim().length() > 0)
{
sql = "select count(1) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemParentUnit);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
if (cnt == 0) {
errCode = "VMITMPUC";//item_family_unit
errString = getErrorString("item_parent_unit",
errCode, userId);
break;
}
}
}
else if (childNodeName.equalsIgnoreCase("item_family_unit"))
{
itemFamilyUnit = genericUtility.getColumnValue("item_family_unit", dom);
if (itemFamilyUnit == null)
{
errString = getErrorString(" ", "VMITMFUCB", userId);
break;
}
if(itemFamilyUnit != null && itemFamilyUnit.trim().length() > 0)
{
sql = "select count(1) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemFamilyUnit);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
if (cnt == 0) {
errCode = "VMITMFUC";
errString = getErrorString("item_family_unit",
errCode, userId);
break;
}
}
}
}
......@@ -386,13 +452,13 @@ public class DwhProdItemIC extends ValidatorEJB implements DwhProdItemICLocal,Dw
itemUnit = genericUtility.getColumnValue("item_unit", dom);
sql = " select distinct unit from item where unit = ? ";
sql = " select descr from uom where unit = ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, itemUnit);
rs = pStmt.executeQuery();
if (rs.next()) {
itemUnitDesc= (rs.getString("unit"));
itemUnitDesc= (rs.getString("descr"));
}
System.out.println("item Unit Description" + itemUnitDesc);
rs.close();
......
......@@ -283,7 +283,7 @@ public class DwhProdPlanIC extends ValidatorEJB implements DwhProdPlanICLocal,Dw
}
if(itmUnit != null && itmUnit.trim().length() > 0)
{
sql = "select count(1) from item where unit = ? ";
sql = "select count(1) from uom where unit = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itmUnit);
rs = pstmt.executeQuery();
......@@ -524,7 +524,8 @@ public class DwhProdPlanIC extends ValidatorEJB implements DwhProdPlanICLocal,Dw
valueXmlString.append("<unit>").append(itemUnitDesc).append("</unit>\r\n");
}
}
else if(currentColumn.trim().equalsIgnoreCase("grade")) {
itemGrade = genericUtility.getColumnValue("grade", dom);
//itemGrade = itemGrade == null ? "" : itemGrade.trim();
......
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