Commit b8995d4d authored by nkhan's avatar nkhan

[S15IBAS003] Updated Sources For Adding Validation From MSI And removing extra validation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103443 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 936047a6
...@@ -1444,7 +1444,8 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1444,7 +1444,8 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
} }
} }
else if(childNodeName.equalsIgnoreCase("phy_attrib_1") || childNodeName.equalsIgnoreCase("phy_attrib_2") || /* Changed By Nasruddin 19-SEP-16 Start
else if(childNodeName.equalsIgnoreCase("phy_attrib_1") || childNodeName.equalsIgnoreCase("phy_attrib_2") ||
childNodeName.equalsIgnoreCase("phy_attrib_3") || childNodeName.equalsIgnoreCase("phy_attrib_4") || childNodeName.equalsIgnoreCase("phy_attrib_3") || childNodeName.equalsIgnoreCase("phy_attrib_4") ||
childNodeName.equalsIgnoreCase("phy_attrib_5")) childNodeName.equalsIgnoreCase("phy_attrib_5"))
{ {
...@@ -1462,10 +1463,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1462,10 +1463,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
} }
} }
} }*/
// // Changed By Nasruddin 19-SEP-16 END // // Changed By Nasruddin 19-SEP-16 END
} }
...@@ -1581,12 +1579,15 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1581,12 +1579,15 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (objContext != null && objContext.trim().length() > 0) { if (objContext != null && objContext.trim().length() > 0) {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
} }
switch (currentFormNo) { switch (currentFormNo)
case 1: { {
case 1:
{
valueXmlString.append("<Detail1>"); valueXmlString.append("<Detail1>");
System.out.println("currentColumn detail 1::: " + currentColumn); System.out.println("currentColumn detail 1::: " + currentColumn);
if (currentColumn != null) { if (currentColumn != null) {
if (currentColumn.equalsIgnoreCase("apr_code")) { if (currentColumn.equalsIgnoreCase("apr_code"))
{
aprCode = checkNullAndTrim(genericUtility.getColumnValue("apr_code", dom)); aprCode = checkNullAndTrim(genericUtility.getColumnValue("apr_code", dom));
System.out.println(":::: aprCode ::: " + aprCode); System.out.println(":::: aprCode ::: " + aprCode);
sql = "select descr from aprlev where apr_code = ?"; sql = "select descr from aprlev where apr_code = ?";
...@@ -1599,11 +1600,13 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1599,11 +1600,13 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
System.out.println("descrAprlev:::: " + descrAprlev); System.out.println("descrAprlev:::: " + descrAprlev);
valueXmlString.append("<aprlev_descr><![CDATA[" + descrAprlev + "]]></aprlev_descr>"); valueXmlString.append("<aprlev_descr><![CDATA[" + descrAprlev + "]]></aprlev_descr>");
} }
if (currentColumn.equalsIgnoreCase("grp_code")) { if (currentColumn.equalsIgnoreCase("grp_code"))
{
grpCode = checkNullAndTrim(genericUtility.getColumnValue("grp_code", dom)); grpCode = checkNullAndTrim(genericUtility.getColumnValue("grp_code", dom));
System.out.println("grpCode:::: " + grpCode); System.out.println("grpCode:::: " + grpCode);
if (grpCode.length() == 0) { if (grpCode.length() == 0)
{
valueXmlString.append("<sgrp_code><![CDATA[]]></sgrp_code>"); valueXmlString.append("<sgrp_code><![CDATA[]]></sgrp_code>");
} }
} }
...@@ -1620,7 +1623,8 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1620,7 +1623,8 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
System.out.println("::: descritemSer" + descrItemSer); System.out.println("::: descritemSer" + descrItemSer);
valueXmlString.append("<itemser_descr><![CDATA[" + descrItemSer + "]]></itemser_descr>"); valueXmlString.append("<itemser_descr><![CDATA[" + descrItemSer + "]]></itemser_descr>");
} }
if (currentColumn.equalsIgnoreCase("item_type")) { if (currentColumn.equalsIgnoreCase("item_type"))
{
itemType = checkNullAndTrim(genericUtility.getColumnValue("item_type", dom)); itemType = checkNullAndTrim(genericUtility.getColumnValue("item_type", dom));
System.out.println(":::itemtype " + itemType); System.out.println(":::itemtype " + itemType);
setAttrbVal(itemType, conn, valueXmlString); setAttrbVal(itemType, conn, valueXmlString);
...@@ -1694,7 +1698,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1694,7 +1698,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
apprSupp = checkNullAndTrim(genericUtility.getColumnValue("appr_supp", dom)); apprSupp = checkNullAndTrim(genericUtility.getColumnValue("appr_supp", dom));
noConsUnaprv = checkNullAndTrim(genericUtility.getColumnValue("no_cons_unaprv", dom)); noConsUnaprv = checkNullAndTrim(genericUtility.getColumnValue("no_cons_unaprv", dom));
disapprvOnRej = checkNullAndTrim(genericUtility.getColumnValue("disapprv_on_rej", dom)); disapprvOnRej = checkNullAndTrim(genericUtility.getColumnValue("disapprv_on_rej", dom));
if("Y".equalsIgnoreCase(apprSupp.trim())) { if("Y".equalsIgnoreCase(apprSupp.trim())) {
valueXmlString.append("<no_cons_unaprv protect = \"0\"><![CDATA[" + noConsUnaprv + "]]></no_cons_unaprv>"); valueXmlString.append("<no_cons_unaprv protect = \"0\"><![CDATA[" + noConsUnaprv + "]]></no_cons_unaprv>");
valueXmlString.append("<disapprv_on_rej protect = \"0\"><![CDATA[" + disapprvOnRej + "]]></disapprv_on_rej>"); valueXmlString.append("<disapprv_on_rej protect = \"0\"><![CDATA[" + disapprvOnRej + "]]></disapprv_on_rej>");
...@@ -1702,9 +1706,10 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1702,9 +1706,10 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
valueXmlString.append("<no_cons_unaprv protect = \"1\"><![CDATA[" + noConsUnaprv + "]]></no_cons_unaprv>"); valueXmlString.append("<no_cons_unaprv protect = \"1\"><![CDATA[" + noConsUnaprv + "]]></no_cons_unaprv>");
valueXmlString.append("<disapprv_on_rej protect = \"1\"><![CDATA[" + disapprvOnRej + "]]></disapprv_on_rej>"); valueXmlString.append("<disapprv_on_rej protect = \"1\"><![CDATA[" + disapprvOnRej + "]]></disapprv_on_rej>");
} }
} }
if (currentColumn.equalsIgnoreCase("loc_code")) { if (currentColumn.equalsIgnoreCase("loc_code"))
{
locCode = checkNullAndTrim(genericUtility.getColumnValue("loc_code", dom)); locCode = checkNullAndTrim(genericUtility.getColumnValue("loc_code", dom));
System.out.println("locCode:: " + locCode); System.out.println("locCode:: " + locCode);
...@@ -1719,7 +1724,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1719,7 +1724,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
valueXmlString.append("<location_descr><![CDATA[" + descrLocCode + "]]></location_descr>"); valueXmlString.append("<location_descr><![CDATA[" + descrLocCode + "]]></location_descr>");
} }
if (currentColumn.equalsIgnoreCase("phy_attrib_3")) { /* Comment By Nasruddin Start 23-SEP-16 Start
* if (currentColumn.equalsIgnoreCase("phy_attrib_3"))
{
phyAttribThree = checkNullAndTrim(genericUtility.getColumnValue("phy_attrib_3", dom)); phyAttribThree = checkNullAndTrim(genericUtility.getColumnValue("phy_attrib_3", dom));
...@@ -1746,8 +1753,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1746,8 +1753,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
String valueFour = setDescr(itemType, phyAttribThree,phyAttribFour, conn); String valueFour = setDescr(itemType, phyAttribThree,phyAttribFour, conn);
valueXmlString.append("<descr><![CDATA[" + valueFour + "]]></descr>"); valueXmlString.append("<descr><![CDATA[" + valueFour + "]]></descr>");
} }Comment By Nasruddin Start 23-SEP-16 END */
if (currentColumn.equalsIgnoreCase("site_code")) { if (currentColumn.equalsIgnoreCase("site_code"))
{
siteCode = checkNullAndTrim(genericUtility.getColumnValue("site_code", dom)); siteCode = checkNullAndTrim(genericUtility.getColumnValue("site_code", dom));
...@@ -1828,23 +1836,23 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1828,23 +1836,23 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
} }
} }
//added on 21/MAY/16 after cross checking on live server[START] //added on 21/MAY/16 after cross checking on live server[START]
if (currentColumn.equalsIgnoreCase("item_code")) { if (currentColumn.equalsIgnoreCase("item_code")) {
itemCode = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom)); itemCode = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom));
System.out.println("itemCode:: " + itemCode); System.out.println("itemCode:: " + itemCode);
valueXmlString.append("<item_code__plan><![CDATA[" + itemCode + "]]></item_code__plan>"); valueXmlString.append("<item_code__plan><![CDATA[" + itemCode + "]]></item_code__plan>");
} }
if (currentColumn.equalsIgnoreCase("unit")) { if (currentColumn.equalsIgnoreCase("unit")) {
unit = checkNullAndTrim(genericUtility.getColumnValue("unit", dom)); unit = checkNullAndTrim(genericUtility.getColumnValue("unit", dom));
System.out.println("Unit :: " + unit); System.out.println("Unit :: " + unit);
valueXmlString.append("<unit__pur><![CDATA[" + unit + "]]></unit__pur>"); valueXmlString.append("<unit__pur><![CDATA[" + unit + "]]></unit__pur>");
valueXmlString.append("<unit__rate><![CDATA[" + unit + "]]></unit__rate>"); valueXmlString.append("<unit__rate><![CDATA[" + unit + "]]></unit__rate>");
} }
if (currentColumn.equalsIgnoreCase("site_code__ship")) { if (currentColumn.equalsIgnoreCase("site_code__ship")) {
siteCodeShip = checkNullAndTrim(genericUtility.getColumnValue("site_code__ship", dom)); siteCodeShip = checkNullAndTrim(genericUtility.getColumnValue("site_code__ship", dom));
...@@ -1863,7 +1871,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1863,7 +1871,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
valueXmlString.append("<site_descr_ship><![CDATA[" + descrSiteCodeShip + "]]></site_descr_ship>"); valueXmlString.append("<site_descr_ship><![CDATA[" + descrSiteCodeShip + "]]></site_descr_ship>");
} }
if(currentColumn.equalsIgnoreCase("sale_option")) { if(currentColumn.equalsIgnoreCase("sale_option")) {
saleOption = checkNullAndTrim(genericUtility.getColumnValue("sale_option", dom)); saleOption = checkNullAndTrim(genericUtility.getColumnValue("sale_option", dom));
contractReq = checkNullAndTrim(genericUtility.getColumnValue("contract_req", dom)); contractReq = checkNullAndTrim(genericUtility.getColumnValue("contract_req", dom));
...@@ -1873,22 +1881,24 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote { ...@@ -1873,22 +1881,24 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
valueXmlString.append("<contract_req protect = '1'><![CDATA[" + contractReq + "]]></contract_req>"); valueXmlString.append("<contract_req protect = '1'><![CDATA[" + contractReq + "]]></contract_req>");
} }
} }
//[END] //[END]
} }
} }
} }
} catch (Exception e) { }
catch (Exception e)
{
System.out.println(":::: " + this.getClass().getSimpleName() System.out.println(":::: " + this.getClass().getSimpleName()
+ ":::" + e.getMessage()); + ":::" + e.getMessage());
e.printStackTrace(); e.printStackTrace();
} finally { }
try { finally
{
if (pstmt != null) { try
{
if (pstmt != null)
{
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
......
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