Commit 9fd0216b authored by prahate's avatar prahate

EJB updated for Request Id [D14JSUN004].


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98027 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b3c78b50
[Dolphin]
Timestamp=2015,2,20,14,51,1
Timestamp=2015,5,26,11,50,19
Version=3
ViewMode=1
......@@ -77,7 +77,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
String tranDate = "";
String lotNo = "",updateStatus="";
String lotSl="";
String locCode = "";
String locCode = "",tranCode="";
String quantity = "",lrDateStr="";
String keyFlag="",confirmed="",fldValue="";
String tranIdRcp="",tranId="",qtyactual="",reasCode="",status="";
......@@ -226,6 +226,32 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("tran_code"))
{
tranCode = genericUtility.getColumnValue("tran_code", dom);
if(tranCode != null && (tranCode.trim().length() > 0))
{
sql = " select count(*) from transporter where tran_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
if(cnt == 0)
{
errCode = "VTTRANCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
......@@ -396,7 +422,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
}
}
//Added by Pankaj R. on 13/MAY/2015 [START]
else if(childNodeName.equalsIgnoreCase("remarks2"))
{
remarks2=genericUtility.getColumnValue("remarks2", dom);
......@@ -404,18 +430,19 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
qtyRcp=Double.valueOf(genericUtility.getColumnValue("qty_rcp", dom)==null?"0":genericUtility.getColumnValue("qty_rcp", dom));
qtyActual = Double.valueOf(genericUtility.getColumnValue("qty_actual", dom)==null?"0":genericUtility.getColumnValue("qty_actual", dom));
System.out.println("Status@@@@@@@@@@@@@ :"+status);
if(( (qtyRcp-qtyActual) > 0) && (!(status.equalsIgnoreCase("O"))) && ((remarks2==null || remarks2.trim().length()<=0)))
if(( (qtyRcp-qtyActual) < 0) && (!(status.equalsIgnoreCase("O"))) && ((remarks2==null || remarks2.trim().length()<=0)))
{
System.out.println("Inside if of REMARKS2@@@@@@@");
errCode = "VMREMARK";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
System.out.println("Completed of REMARKS2@@@@@@@");
}
else
{
System.out.println("Status is : "+status);
}
}//Added by Pankaj R. on 13/MAY/2015 [END]
}
}
......@@ -537,7 +564,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
String chgTerm = "";
String sql = "";
String siteDescr = "",remarks2="";
String locCode = "",lrDateStr="",tranDatedStr="",gpDateStr="",status="";
String locCode = "",lrDateStr="",tranDatedStr="",gpDateStr="";
String locDescr = "";
String siteCodeMfg="",suppCodeMfg="";
String tranIdRcp="",distOrder="",tranId="",tranCode="",lrNo="",transMode="",grossWeight="";
......@@ -596,12 +623,11 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
{
if(childNode.getFirstChild() != null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
columnValue = childNode.getFirstChild().getNodeValue().trim(); //added by cpatil
}
}
ctr++;
}while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn));
System.out.println("currentColumn>>>>> :"+currentColumn);
if(currentColumn.trim().equalsIgnoreCase("itm_default"))
{
System.out.println("@@@@@@ itm_default itemchange called");
......@@ -613,17 +639,23 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
valueXmlString.append("<site_code>").append("<![CDATA[" + siteCode + "]]>").append("</site_code>");
valueXmlString.append("<descr>").append("<![CDATA[" + siteDescr + "]]>").append("</descr>"); // 25/3/15end
System.out.println("Receipt Date@@@@@@@@@@@@@@@@@:"+currDate);
//valueXmlString.append("<tran_date>").append("<![CDATA[" + tranDate + "]]>").append("</tran_date>");
valueXmlString.append("<tran_date>").append("<![CDATA[" + currDate + "]]>").append("</tran_date>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currDate + "]]>").append("</add_date>");
valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>");
valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>");
System.out.println("Effective Date@@@@@@@@@@@@@@@@@:"+currDate);
}
}//end of if
if(currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
{
System.out.println("currDate>>>"+currDate);
valueXmlString.append("<chg_date>").append("<![CDATA[" + currDate + "]]>").append("</chg_date>");
}
else if(currentColumn.trim().equalsIgnoreCase("tran_id__rcp"))
......@@ -653,7 +685,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
valueXmlString.append("<tran_code>").append("<![CDATA[" + tranCode + "]]>").append("</tran_code>");
valueXmlString.append("<tran_name>").append("<![CDATA[" + tranName+ "]]>").append("</tran_name>");
sql = "select tran_date,lr_no,lr_date,gp_date,gp_no,trans_mode,gross_weight,tare_weight,net_weight,no_art,tran_id__iss from distord_rcp where tran_id=?";
sql = "select tran_date,lr_no,lr_date,gp_date,gp_no,trans_mode,gross_weight,tare_weight,net_weight,no_art,case when DISTORD_RCP.tran_id__iss is null then DISTORD_RCP.issue_ref else DISTORD_RCP.tran_id__iss end as issue_ref from distord_rcp where tran_id=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
......@@ -669,7 +701,8 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
tareWeight = rs.getString("tare_weight");
netWeight = rs.getString("net_weight");
noArt = rs.getString("no_art");
tranIdIss = rs.getString("tran_id__iss");
// tranIdIss = rs.getString("tran_id__iss");
tranIdIss = rs.getString("issue_ref");
}
rs.close();
rs = null;
......@@ -681,6 +714,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
System.out.println("In side iff>>>>>>>");
lrDateStr=sdf.format(lrDate).toString();
System.out.println("lrDateStr@@@@@@@"+lrDateStr);
}
else
{
......@@ -696,6 +730,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
System.out.println("In side iff>>>>>>>");
gpDateStr=sdf.format(gpDate).toString();
System.out.println("gpDateStr@@@@@@@"+gpDateStr);
}
else
{
......@@ -724,7 +759,10 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
valueXmlString.append("<no_art>").append("<![CDATA[" + noArt + "]]>").append("</no_art>");
valueXmlString.append("<site_code__ship>").append("<![CDATA[" + siteCodeShip + "]]>").append("</site_code__ship>");
valueXmlString.append("<descr_1>").append("<![CDATA[" + siteCodeShipDescr + "]]>").append("</descr_1>");
valueXmlString.append("<tran_id__iss>").append("<![CDATA[" + tranIdIss + "]]>").append("</tran_id__iss>");
// valueXmlString.append("<tran_id__iss>").append("<![CDATA[" + tranIdIss + "]]>").append("</tran_id__iss>");
valueXmlString.append("<issue_ref>").append("<![CDATA[" + tranIdIss + "]]>").append("</issue_ref>");
}
else if(currentColumn.trim().equalsIgnoreCase("site_code"))
......@@ -735,7 +773,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
System.out.println("@@@@@ siteCode["+siteCode+"]siteDescr["+siteDescr+"]");
valueXmlString.append("<descr>").append("<![CDATA[" + siteDescr + "]]>").append("</descr>");
}
//Added by Pankaj R. on 13/MAY/2015 [START]
else if(currentColumn.trim().equalsIgnoreCase("tran_code"))
{
System.out.println("@@@@@@ tran_code itemchange called");
......@@ -746,7 +784,10 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
System.out.println("Completed");
}
//Added by Pankaj R. on 13/MAY/2015 [END]
valueXmlString.append("</Detail1>");
break;
......@@ -768,21 +809,25 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
}
}
ctr ++;
}
while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn));
}while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn));
System.out.println("Entered in CASE2");
tranId = genericUtility.getColumnValue("tran_id", dom1);
tranIdRcp=genericUtility.getColumnValue("tran_id__rcp", dom1);
System.out.println("tranID >>>>>>>> "+tranId);
System.out.println("TRANIDRCP@ >>>>>>>> "+tranIdRcp);
System.out.println("currentColumn>>>>> :"+currentColumn);
if(currentColumn.trim().equalsIgnoreCase("itm_default"))
{
status = genericUtility.getColumnValue("status", dom);
String status = genericUtility.getColumnValue("status", dom);
valueXmlString.append("<remarks2 protect = \"1\">").append("<![CDATA[" + remarks2 + "]]>").append("</remarks2>");
tranIdRcp = genericUtility.getColumnValue("tran_id__rcp", dom1, "1");
//valueXmlString.append("<tran_id__rcp>").append("<![CDATA[" + tranIdRcp + "]]>").append("</tran_id__rcp>");
valueXmlString.append("<tran_id__rcp protect = \"1\">").append("<![CDATA[" + tranIdRcp + "]]>").append("</tran_id__rcp>");
}//end of if
else if(currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
{
}
else if(currentColumn.trim().equalsIgnoreCase("line_no__rcp"))
{
......@@ -817,7 +862,7 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
suppCodeMfg= rs.getString("supp_code__mfg");
itemCode=rs.getString("item_code");
locCode=rs.getString("loc_code");
rate=rs.getString("rate"); //Added by Pankaj R on 13/MAY/2015
rate=rs.getString("rate");
itemDescr = findValue(conn, "descr" ,"item", "item_code", itemCode);
locDescr=findValue(conn, "descr", "location", "loc_code", locCode);
......@@ -860,13 +905,13 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
valueXmlString.append("<net_weight>").append("<![CDATA[" + netWeight + "]]>").append("</net_weight>");
valueXmlString.append("<trans_mode>").append("<![CDATA[" + transMode + "]]>").append("</trans_mode>");
valueXmlString.append("<supp_code__mfg>").append("<![CDATA[" + suppCodeMfg + "]]>").append("</supp_code__mfg>");
valueXmlString.append("<rate>").append("<![CDATA[" + rate + "]]>").append("</rate>"); //Added by Pankaj R on 13/MAY/2015
valueXmlString.append("<rate>").append("<![CDATA[" + rate + "]]>").append("</rate>");
}
}
}//Added by Pankaj R. on 13/MAY/2015 [START]
else if(currentColumn.trim().equalsIgnoreCase("status"))
{
System.out.println("@@@@@@ status itemchange called");
status = genericUtility.getColumnValue("status", dom);
String status = genericUtility.getColumnValue("status", dom);
System.out.println("Status is : "+status);
remarks2="";
if(status != null && status.equalsIgnoreCase("O"))
......@@ -881,7 +926,6 @@ public class DistRcpExShIC extends ValidatorEJB implements DistRcpExShICLocal, D
valueXmlString.append("<remarks2 protect = \"0\">").append("<![CDATA[" + remarks2 + "]]>").append("</remarks2>");
}
}
//Added by Pankaj R. on 13/MAY/2015 [END]
valueXmlString.append("</Detail2>");
break;
......
[Dolphin]
Timestamp=2015,2,24,16,16,59
Timestamp=2015,5,26,11,50,50
Version=3
ViewMode=1
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