Commit 505bd6a6 authored by manohar's avatar manohar

Bug fixing, getting of value from correct dom done


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@34836 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 98ce25c2
......@@ -317,8 +317,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
if("E".equalsIgnoreCase(editFlag))
{
addUser = genericUtility.getColumnValue("add_user",dom2);
chgUser = genericUtility.getColumnValue("chg_user",dom2);
addUser = genericUtility.getColumnValue("add_user",dom);
chgUser = genericUtility.getColumnValue("chg_user",dom);
System.out.println("addUser><><"+addUser+"chgUserDD"+chgUser);
if ((addUser != null && addUser.trim().length() > 0) && (chgUser != null && chgUser.trim().length() > 0))
{
......@@ -333,7 +333,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
if(childNodeName.equalsIgnoreCase("tran_code"))
{
tranCode = checkNull(genericUtility.getColumnValue("tran_code",dom2));
tranCode = checkNull(genericUtility.getColumnValue("tran_code",dom));
if(childNode.getFirstChild()!= null)
{
tranCode = childNode.getFirstChild().getNodeValue();
......@@ -412,7 +412,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
{
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no",dom));
siteCode = genericUtility.getColumnValue("site_code",dom2,"2");
lotSl=checkNull(genericUtility.getColumnValue("lot_sl", dom2,"3"));
lotSl=checkNull(genericUtility.getColumnValue("lot_sl", dom));
//distOrder = genericUtility.getColumnValue("dist_order",dom2);
if (lotSl == null || lotSl.trim().length() == 0)
......@@ -452,7 +452,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
System.out.println("----------in wfvaldata of item_code............");
qcLockValue="";
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no", dom1));
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom2,"3"));
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
//lotSlL=checkNull(genericUtility.getColumnValue("lot_sl", dom2,"3"));
avalyn=getColumnDescr(conn, "available_yn", "sorder", "sale_order", sorderNo);
......@@ -496,14 +496,14 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
{
System.out.println("-------------wfvalData..quantity.............");
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no", dom1));
squantity = genericUtility.getColumnValue("quantity",dom2);
squantity = genericUtility.getColumnValue("quantity",dom);
siteCode = genericUtility.getColumnValue("site_code",dom2,"2");
//lotSl = genericUtility.getColumnValue("lot_sl",dom2);
lotSl=checkNull(genericUtility.getColumnValue("lot_sl", dom2,"3"));
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom2,"3"));
locCodeL = checkNull(genericUtility.getColumnValue("loc_code", dom2,"3"));
lotNo = checkNull(genericUtility.getColumnValue("lot_no", dom2,"3"));
despId = checkNull(genericUtility.getColumnValue("desp_id", dom2,"3"));
lotSl=checkNull(genericUtility.getColumnValue("lot_sl", dom));
itemCode = checkNull(genericUtility.getColumnValue("item_code", dom));
locCodeL = checkNull(genericUtility.getColumnValue("loc_code", dom));
lotNo = checkNull(genericUtility.getColumnValue("lot_no", dom));
despId = checkNull(genericUtility.getColumnValue("desp_id", dom));
avalyn=getColumnDescr(conn, "available_yn", "sorder", "sale_order", sorderNo);
avalyn=avalyn==null ? "N" : avalyn.trim();
......@@ -600,7 +600,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
String availYN = ""; // Added by Sandesh 29-Sep-2014
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no", dom1));
locCode = genericUtility.getColumnValue("loc_code",dom2,"3");
locCode = genericUtility.getColumnValue("loc_code",dom);
//tranId = genericUtility.getColumnValue("tran_id",dom2);
System.out.println("sorderNo---loc_code---->>["+sorderNo+"]");
......@@ -1146,13 +1146,13 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
break;
case 3 :
System.out.println("------Case 3 called or form 3 called------@@-----------");
System.out.println("dom in form3---->>["+genericUtility.serializeDom(dom)+"]");
System.out.println("dom111 in form3---->>["+genericUtility.serializeDom(dom1)+"]");
System.out.println("dom222 in form3---->>["+genericUtility.serializeDom(dom2)+"]");
//System.out.println("------Case 3 called or form 3 called------@@-----------");
//System.out.println("dom in form3---->>["+genericUtility.serializeDom(dom)+"]");
//System.out.println("dom111 in form3---->>["+genericUtility.serializeDom(dom1)+"]");
//System.out.println("dom222 in form3---->>["+genericUtility.serializeDom(dom2)+"]");
tranDate = getCurrdateAppFormat() ;
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no", dom2));
sorderNo = checkNull(genericUtility.getColumnValue("sale_order_no", dom1));
despId = checkNull(genericUtility.getColumnValue("desp_id", dom2,"2"));
String domID = checkNull(getColumnValueMy("Detail3", dom2, "3"));
System.out.println("sorderNo---->>["+sorderNo+"]");
......
......@@ -67,11 +67,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
String childNodeName = "";
try {
System.out.println("Distribution Issue Wizard xmlString [" + xmlString + "] \r\n xmlString1 [" + xmlString1 + "]" );
dom = parseString(xmlString);
dom1 = parseString(xmlString1);
if (xmlString2.trim().length() > 0)
{
dom2 = parseString("<Root>" + xmlString2 + "</Root>");
System.out.println("Distribution Issue Wizard xmlString2 [" + xmlString2 + "]" );
}
if (objContext != null && Integer.parseInt(objContext) == 1)
{
......@@ -242,13 +244,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
case 2:
System.out.println("DOM>>>> Elements>>["+genericUtility.serializeDom(dom).toString()+"]");
System.out.println("DOM1>> Elements>>["+genericUtility.serializeDom(dom1).toString()+"]");
System.out.println("DOM2>> Elements>>["+genericUtility.serializeDom(dom2).toString()+"]");
//System.out.println("DOM>>>> Elements>>["+genericUtility.serializeDom(dom).toString()+"]");
//System.out.println("DOM1>> Elements>>["+genericUtility.serializeDom(dom1).toString()+"]");
//System.out.println("DOM2>> Elements>>["+genericUtility.serializeDom(dom2).toString()+"]");
parentNodeList = dom2.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0);
System.out.println("parentNode >>>{"+parentNode+"}");
//System.out.println("parentNode >>>{"+parentNode+"}");
childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength();
......@@ -383,13 +385,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
System.out.println("value of child node : "+childNode);
System.out.println("Distribution Issue Wizard validation for [" + childNodeName + "]" );
if(childNodeName.equalsIgnoreCase("lot_sl"))
{
siteCode = genericUtility.getColumnValue("site_code",dom2);
lotSl = genericUtility.getColumnValue("lot_sl",dom2);
distOrder = genericUtility.getColumnValue("dist_order",dom2);
siteCode = genericUtility.getColumnValue("site_code",dom2,"2");
lotSl = genericUtility.getColumnValue("lot_sl",dom);
distOrder = genericUtility.getColumnValue("dist_order",dom);
if (lotSl == null || lotSl.trim().length() == 0)
{
......@@ -420,10 +422,6 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
errFields.add( childNodeName.toLowerCase() );
}
}
sql = "select qty_confirm,qty_shipped from distorder_det where dist_order = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,distOrder);
......@@ -450,9 +448,9 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
}
else if(childNodeName.equalsIgnoreCase("item_code"))
{
itemCode = genericUtility.getColumnValue("item_code",dom2);
tranId = genericUtility.getColumnValue("tran_id",dom2);
distOrder = genericUtility.getColumnValue("dist_order",dom2);
itemCode = genericUtility.getColumnValue("item_code",dom);
tranId = genericUtility.getColumnValue("tran_id",dom);
distOrder = genericUtility.getColumnValue("dist_order",dom);
System.out.println("itemCode>>"+itemCode+"tranId>"+tranId+"distOrder>"+distOrder);
String itemCodeH="";
......@@ -492,14 +490,14 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
else if(childNodeName.equalsIgnoreCase("quantity"))
{
distOrder = genericUtility.getColumnValue("dist_order",dom2);
squantity = genericUtility.getColumnValue("quantity",dom2);
siteCode = genericUtility.getColumnValue("site_code",dom2);
itemCode = genericUtility.getColumnValue("item_code",dom2);
lotSl = genericUtility.getColumnValue("lot_sl",dom2);
locCode = genericUtility.getColumnValue("loc_code",dom2);
lotno = genericUtility.getColumnValue("lot_no",dom2);
tranId = genericUtility.getColumnValue("tran_id",dom2);
distOrder = genericUtility.getColumnValue("dist_order",dom);
squantity = genericUtility.getColumnValue("quantity",dom);
siteCode = genericUtility.getColumnValue("site_code",dom2,"2");
itemCode = genericUtility.getColumnValue("item_code",dom);
lotSl = genericUtility.getColumnValue("lot_sl",dom);
locCode = genericUtility.getColumnValue("loc_code",dom);
lotno = genericUtility.getColumnValue("lot_no",dom);
tranId = genericUtility.getColumnValue("tran_id",dom);
ArrayList<String> lockList=new ArrayList<String>();
HashMap<String,String>invHoldMap=new HashMap<String,String>();
......@@ -512,7 +510,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
avalyn=getColumnDescr(conn, "available_yn", "distord_iss", "tran_id", tranId);
avalyn=avalyn==null ? "N" : avalyn.trim();
System.out.println("squantity"+squantity+"workOrder<><><>"+distOrder+">>D"+siteCode+"FDFf"+lotSl);
System.out.println("distIssWiz 3 validate squantity ["+squantity+"] distOrder ["+distOrder+"] siteCode ["+siteCode+"]itemCode [" + itemCode + "] locCode [" + locCode + "] lotno [" + lotno + "] lotSl ["+lotSl);
if (squantity == null || squantity.trim().length() == 0)
{
quantity = 0;
......@@ -566,13 +564,9 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
rs.close();
pstmt = null;
rs = null;
System.out.println("detquantity>>trsn"+detquantity+">>>"+tranId+"<VCXCXc"+tranId.trim().length()+"}}");
totquantity = detquantity + quantity;
//System.out.println("detquantity>>trsn"+detquantity+">>>"+tranId+"<VCXCXc"+tranId.trim().length()+"}}");
System.out.println("distIssWiz 3 validate squantity ["+squantity+"] detquantity ["+detquantity+"] siteCode ["+siteCode+"]itemCode [" + itemCode + "] locCode [" + locCode + "] lotno [" + lotno + "] lotSl ["+lotSl + "]");
totquantity = detquantity + quantity;
sql = "select sum(qty_order) from distorder_det where dist_order = ? and item_code = ?";
pstmt=conn.prepareStatement(sql);
......@@ -587,8 +581,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
rs.close();
pstmt = null;
rs = null;
System.out.println("distIssWiz 3 validate squantity ["+squantity+"] detquantity ["+detquantity+"] dodetquantity ["+dodetquantity+"]");
if(totquantity > dodetquantity)
{
errCode = "DIDOQUANDT";
......@@ -636,9 +629,9 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
else if(childNodeName.equalsIgnoreCase("loc_code"))
{
locCode = genericUtility.getColumnValue("loc_code",dom2);
tranId = genericUtility.getColumnValue("tran_id",dom2);
distOrder = genericUtility.getColumnValue("dist_order",dom2);
locCode = genericUtility.getColumnValue("loc_code",dom);
tranId = genericUtility.getColumnValue("tran_id",dom);
distOrder = genericUtility.getColumnValue("dist_order",dom);
if (locCode == null || locCode.trim().length() == 0)
{
errCode = "DIDOLCNULL";
......@@ -822,9 +815,9 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
System.out.println("xtraParams"+xtraParams);
System.out.println("xmlString111>>"+xmlString);
System.out.println("xmlString222>>"+xmlString1);
System.out.println("xmlString333>>"+xmlString2);
System.out.println("xmlString ["+xmlString + "]");
System.out.println("xmlString1 ["+xmlString1 + "]");
System.out.println("xmlString2 ["+xmlString2 + "]");
dom = parseString(xmlString);
dom1 = parseString(xmlString1);
if (xmlString2.trim().length() > 0) {
......@@ -927,9 +920,9 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
break;
case 2 :
System.out.println("DOM2 Elements["+genericUtility.serializeDom(dom2).toString()+"]");
//System.out.println("DOM2 Elements["+genericUtility.serializeDom(dom2).toString()+"]");
System.out.println("itm_default >>>>> 2>>");
//System.out.println("itm_default >>>>> 2>>");
distOrder = genericUtility.getColumnValue("dist_order1", dom1);
......@@ -1377,10 +1370,10 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
break;
case 3 :
tranDate = getCurrdateAppFormat() ;
tranid = genericUtility.getColumnValue("tran_id", dom1);
tranid = genericUtility.getColumnValue("tran_id", dom);
distOrder = genericUtility.getColumnValue("dist_order1", dom1);
siteCodeDlv = genericUtility.getColumnValue("site_code__dlv",dom2);
System.out.println("tran val"+tranid+"dist_order1>>>"+distOrder);
siteCodeDlv = genericUtility.getColumnValue("site_code__dlv",dom2, "2");
//System.out.println("tran val"+tranid+"dist_order1>>>"+distOrder);
sql = "select add_user,dist_order from distord_iss where CASE WHEN confirmed IS NULL THEN 'N' ELSE CONFIRMED END = 'N' and dist_order = ?";
......@@ -1627,8 +1620,8 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
rs = null;
lineNo++;
System.out.println("lineNo IN ITM DEFAULT ADD"+lineNo);
System.out.println(">>>>>>>>>>>>>..dom"+lineNo+">><><"+tranid);
//System.out.println("lineNo IN ITM DEFAULT ADD"+lineNo);
//System.out.println(">>>>>>>>>>>>>..dom"+lineNo+">><><"+tranid);
valueXmlString.append("<Detail3 domID='" + lineNo + "' objContext = '"+currentFormNo+"' selected=\"N\">\r\n");
valueXmlString.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>\r\n");
......
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