Commit cec3c6ca authored by skumbhar's avatar skumbhar

defect log work(Dadaso)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95107 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fe72db94
......@@ -162,6 +162,38 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
}
}
firstValue = null;
} else if ("sundry_code_fr".equalsIgnoreCase(childNodeName)) {
firstValue = genericUtility.getColumnValue("sundry_code_fr", dom);
firstValue = firstValue == null ? "" : firstValue.trim();
if (firstValue.length() == 0) {
errCode = "NULLSITECD";
errString = getErrorString("sundry_code_fr", errCode, userId);
break;
} else {
cnt = getDBRowCount(conn, "site", "site_code", firstValue);
if (cnt == 0) {
errCode = "INVDSITECD";
errString = getErrorString("sundry_code_fr", errCode, userId);
break;
}
}
firstValue = null;
} else if ("sundry_code_to".equalsIgnoreCase(childNodeName)) {
firstValue = genericUtility.getColumnValue("sundry_code_to", dom);
firstValue = firstValue == null ? "" : firstValue.trim();
if (firstValue.length() == 0) {
errCode = "NULLSITECD";
errString = getErrorString("sundry_code_to", errCode, userId);
break;
} else {
cnt = getDBRowCount(conn, "site", "site_code", firstValue);
if (cnt == 0) {
errCode = "INVDSITECD";
errString = getErrorString("sundry_code_to", errCode, userId);
break;
}
}
firstValue = null;
} else if ("from_tran_date".equalsIgnoreCase(childNodeName) || "to_tran_date".equalsIgnoreCase(childNodeName)) {
firstValue = genericUtility.getColumnValue("from_tran_date", dom);
secondValue = genericUtility.getColumnValue("to_tran_date", dom);
......@@ -233,6 +265,7 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException {
String siteCodeTo = "", siteCodeFr = "", fromTranDate = "", toTranDate = "", insertQuery = "", path = "", objName = "intercomp_reconcile";
String sundryTypeFr = "", sundryTypeTo = "", sundryCodeFr = "", sundryCodeTo = "";
StringBuffer valueXmlString = new StringBuffer();
int currentFormNo = 0;
NodeList parentNodeList = null;
......@@ -276,15 +309,19 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
d = cal.getTime();
String fromDate = simpleDateFormat.format(d);
cal.setTime(d);
cal.add(Calendar.MONTH,3);
cal.add(Calendar.MONTH,1);
cal.set(Calendar.DATE,0);
d = cal.getTime();
String toDate = simpleDateFormat.format(d);
System.out.println("From Date :" + fromDate + " To Date :" + toDate);
valueXmlString.append("<from_tran_date>").append(fromDate).append("</from_tran_date>");
valueXmlString.append("<to_tran_date>").append(toDate).append("</to_tran_date>");
valueXmlString.append("<site_code_fr>").append("00").append("</site_code_fr>");
valueXmlString.append("<site_code_to>").append("ZZ").append("</site_code_to>");
valueXmlString.append("<from_tran_date><![CDATA[").append(fromDate).append("]]></from_tran_date>");
valueXmlString.append("<to_tran_date><![CDATA[").append(toDate).append("]]></to_tran_date>");
valueXmlString.append("<site_code_fr><![CDATA[").append("").append("]]></site_code_fr>");
valueXmlString.append("<site_code_to><![CDATA[").append("").append("]]></site_code_to>");
valueXmlString.append("<sundry_type_fr><![CDATA[").append("").append("]]></sundry_type_fr>");
valueXmlString.append("<sundry_type_to><![CDATA[").append("").append("]]></sundry_type_to>");
valueXmlString.append("<sundry_code_fr><![CDATA[").append("").append("]]></sundry_code_fr>");
valueXmlString.append("<sundry_code_to><![CDATA[").append("").append("]]></sundry_code_to>");
}
valueXmlString.append("</Detail1>");
break;
......@@ -300,6 +337,11 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
siteCodeFr = genericUtility.getColumnValue("site_code_fr",dom1);
fromTranDate = genericUtility.getColumnValue("from_tran_date", dom1);
toTranDate = genericUtility.getColumnValue("to_tran_date", dom1);
sundryTypeFr = genericUtility.getColumnValue("sundry_type_fr", dom1);
sundryTypeTo = genericUtility.getColumnValue("sundry_type_to", dom1);
sundryCodeFr = genericUtility.getColumnValue("sundry_code_fr", dom1);
sundryCodeTo = genericUtility.getColumnValue("sundry_code_to", dom1);
System.out.println("siteCodeTo="+siteCodeTo+ " siteCodeFr ="+siteCodeFr);
path = CommonConstants.JBOSSHOME + File.separator + "sql" + File.separator + "oracle/relatePartyConsoleSupply.sql";
......@@ -313,6 +355,10 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
valueXmlString.append("<site_code_to><![CDATA[").append(siteCodeTo).append("]]></site_code_to>");
valueXmlString.append("<chg_user><![CDATA[").append(chgUser).append("]]></chg_user>");
valueXmlString.append("<chg_term><![CDATA[").append(chgTerm).append("]]></chg_term>");
valueXmlString.append("<sundry_type_fr><![CDATA[").append(sundryTypeFr).append("]]></sundry_type_fr>");
valueXmlString.append("<sundry_type_to><![CDATA[").append(sundryTypeTo).append("]]></sundry_type_to>");
valueXmlString.append("<sundry_code_fr><![CDATA[").append(sundryCodeFr).append("]]></sundry_code_fr>");
valueXmlString.append("<sundry_code_to><![CDATA[").append(sundryCodeTo).append("]]></sundry_code_to>");
valueXmlString.append("</Detail1>");
valueXmlString.append("<Detail2>");
valueXmlString.append(getXMLTransData(conn,adpQuery,"",objName,new StringBuffer(""),"CallByItemChange"));
......@@ -474,7 +520,7 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
return count;
}
public String preSaveForm(String xmlString1 )throws ITMException
public String preSaveForm(String xmlString1,String reconcileType)throws ITMException
{
Document dom = null;
System.out.println("@@@@@@@@@---------preSaveForm EJB called...");
......@@ -486,7 +532,7 @@ public class InterCompReconcile extends ValidatorEJB implements InterCompReconci
conn.setAutoCommit(false);
connDriver = null;
System.out.println("@@@@@@@xmlString1["+xmlString1+"]@@@@@@@");
System.out.println("@@@@@@@xmlString1["+xmlString1+"]@@@@@@@ reconcileType"+reconcileType);
if (xmlString1 != null && xmlString1.trim().length() > 0)
{
dom = GenericUtility.getInstance().parseString(xmlString1);
......
......@@ -118,15 +118,28 @@ public class InterCompReconcileProcess extends ProcessEJB implements InterCompRe
ResultSet rs = null;
errString = "";
String adpQuery = null;
String adpQuery = null,fromSiteCode="",toSiteCode="",fromTranDate="",toTranDate="",
sundryTypeFr="",sundryTypeTo="",sundryCodeFr="",sundryCodeTo="";
PreparedStatement pstmt = null;
StringBuffer valueXmlString = new StringBuffer("");
try
{
String fromSiteCode = genericUtility.getColumnValue("site_code_fr", dom);
String toSiteCode = genericUtility.getColumnValue("site_code_to", dom);
String fromTranDate = genericUtility.getColumnValue("from_tran_date", dom);
String toTranDate = genericUtility.getColumnValue("to_tran_date", dom);
fromSiteCode = genericUtility.getColumnValue("site_code_fr", dom);
toSiteCode = genericUtility.getColumnValue("site_code_to", dom);
fromTranDate = genericUtility.getColumnValue("from_tran_date", dom);
toTranDate = genericUtility.getColumnValue("to_tran_date", dom);
//Added by Dadaso pawar on 20/MAY/14 [Start]
sundryTypeFr = genericUtility.getColumnValue("sundry_type_fr", dom);
sundryTypeTo = genericUtility.getColumnValue("sundry_type_to", dom);
sundryCodeFr = genericUtility.getColumnValue("sundry_code_fr", dom);
sundryCodeTo = genericUtility.getColumnValue("sundry_code_to", dom);
sundryTypeFr = sundryTypeFr == null ? "" : sundryTypeFr.trim();
sundryTypeTo = sundryTypeTo == null ? "" : sundryTypeTo.trim();
sundryCodeFr = sundryCodeFr == null ? "" : sundryCodeFr.trim();
sundryCodeTo = sundryCodeTo == null ? "" : sundryCodeTo.trim();
//Added by Dadaso pawar on 20/MAY/14 [Start]
fromSiteCode = fromSiteCode == null ? "" : fromSiteCode.trim();
toSiteCode = toSiteCode == null ? "" : toSiteCode.trim();
......@@ -154,6 +167,12 @@ public class InterCompReconcileProcess extends ProcessEJB implements InterCompRe
adpQuery = adpQuery.replaceAll("@trandateupto@", toTranDate);
adpQuery = adpQuery.replaceAll("@trandatefrom@", fromTranDate);
adpQuery = adpQuery.replaceAll("@sundrytypefrom@", sundryTypeFr);
adpQuery = adpQuery.replaceAll("@sundrytypeto@", sundryTypeTo);
adpQuery = adpQuery.replaceAll("@sundrycodefrom@", sundryCodeFr);
adpQuery = adpQuery.replaceAll("@sundrycodeto@", sundryCodeTo);
} else if ((CommonConstants.DB_NAME).equalsIgnoreCase("oracle"))
{
String adpQueryOriginal = readFile(path + sqlFileName + "Oracle.sql");
......@@ -163,6 +182,11 @@ public class InterCompReconcileProcess extends ProcessEJB implements InterCompRe
adpQuery = adpQuery.replaceAll("@sitecodeto@", toSiteCode);
adpQuery = adpQuery.replaceAll("@trandateupto@", toTranDate);
adpQuery = adpQuery.replaceAll("@trandatefrom@", fromTranDate);
adpQuery = adpQuery.replaceAll("@sundrytypefrom@", sundryTypeFr);
adpQuery = adpQuery.replaceAll("@sundrytypeto@", sundryTypeTo);
adpQuery = adpQuery.replaceAll("@sundrycodefrom@", sundryCodeFr);
adpQuery = adpQuery.replaceAll("@sundrycodeto@", sundryCodeTo);
}
writeFile(adpQuery,path + "oracle/relatePartyConsoleSupply.sql");
......
......@@ -20,6 +20,35 @@
var global_date_format ="dd/MM/yy";
var global_date_type= "date";
var fieldName;
var objCur = "";
var preObj="";
function gotFocus(obj)
{
var str="";
var srv=obj.getAttribute("SRVCALLONCHANGE");
var name=obj.getAttribute("name");
if(srv =="true")
{
document.getElementById(name+"__img").style.visibility="visible";
}
document.getElementById("Detail1..sundry_type_fr").select();
}
function gotBlur(obj)
{
preObj = obj;
var blur=obj.getAttribute("name");
document.getElementById(blur+"__img").style.visibility="hidden";
}
function assignDate( date )
{
......@@ -33,6 +62,10 @@
var toTranDate = document.getElementById( "Detail1..to_tran_date" ).value;
var siteCodeFr = document.getElementById( "Detail1..site_code_fr" ).value;
var siteCodeTo = document.getElementById( "Detail1..site_code_to" ).value;
var sundryTypeFr = document.getElementById( "Detail1..sundry_type_fr" ).value;
var sundryTypeTo = document.getElementById( "Detail1..sundry_type_to" ).value;
var sundryCodeFr = document.getElementById( "Detail1..sundry_code_fr" ).value;
var sundryCodeTo = document.getElementById( "Detail1..sundry_code_to" ).value;
if (fromTranDate.length <= 0)
{
......@@ -50,6 +83,22 @@
{
alert("Please enter to Site Code");
return false;
} else if (sundryTypeFr.length <= 0)
{
alert("Please enter from Sundry Type");
return false;
} else if (sundryTypeTo.length <= 0)
{
alert("Please enter to Sundry Type");
return false;
} else if (sundryCodeFr.length <= 0)
{
alert("Please enter from Sundry Code");
return false;
} else if (sundryCodeTo.length <= 0)
{
alert("Please enter to Sundry Code");
return false;
} else {
return true;
}
......@@ -60,10 +109,11 @@
var url = '/ibase/webitm/jsp/PopUp.jsp?OBJ_NAME=intercomp_reconcile&FIELDNAME='+fieldName;
var win = window.open( url, '_blank', 'toolbar=no,status=yes,resizable=no,scrollbars=yes,left=200,top=100,width=500,height=406' );
}
function assignValue(text) {
function assignValue(text){
document.getElementById('Detail1..'+fieldName).value = text;
}
]]>
</script>
<style type="text/css">
......@@ -99,6 +149,12 @@
<xsl:variable name="to_tran_date"><xsl:value-of select="to_tran_date"/></xsl:variable>
<xsl:variable name="site_code_fr"><xsl:value-of select="site_code_fr"/></xsl:variable>
<xsl:variable name="site_code_to"><xsl:value-of select="site_code_to"/></xsl:variable>
<xsl:variable name="site_code_to"><xsl:value-of select="site_code_to"/></xsl:variable>
<xsl:variable name="sundry_type_fr"><xsl:value-of select="sundry_type_fr"/></xsl:variable>
<xsl:variable name="sundry_type_to"><xsl:value-of select="sundry_type_to"/></xsl:variable>
<xsl:variable name="sundry_code_fr"><xsl:value-of select="sundry_code_fr"/></xsl:variable>
<xsl:variable name="sundry_code_to"><xsl:value-of select="sundry_code_to"/></xsl:variable>
<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
......@@ -137,6 +193,45 @@
<a href="javascript:callPopUpJSP( 'site_code_to' );"> <img src="/ibase/webitm/images/Standard/e12_pophelp_16.jpg" border="0"/> </a>
</td>
</tr>
<!-- Added by Dadaso pawar [Start]-->
<tr>
<td class="td_leftAlign" nowrap="true">
<strong>Sundry Type From :</strong>
</td>
<td class="td_leftAlign">
<input type="text" class="input_editable" size="15" value="{$sundry_type_fr}" name="Detail1.{normalize-space($dbID)}.sundry_type_fr" id="Detail1.{normalize-space($dbID)}.sundry_type_fr" maxlength="05" ISCHANGED="false" />
<a href="javascript:callPopUpJSP( 'sundry_type_fr' );"> <img src="/ibase/webitm/images/Standard/e12_pophelp_16.jpg" id="sundry_type_fr__img" border="0"/> </a>
</td>
<td class="td_leftAlign" nowrap="true">
<strong>Sundry Type To :</strong>
</td>
<td class="td_leftAlign">
<input type="text" class="input_editable" size="15" value="{$sundry_type_to}" name="Detail1.{normalize-space($dbID)}.sundry_type_to" id="Detail1.{normalize-space($dbID)}.sundry_type_to" maxlength="05" ISCHANGED="false" />
<a href="javascript:callPopUpJSP( 'sundry_type_to' );"> <img src="/ibase/webitm/images/Standard/e12_pophelp_16.jpg" id="sundry_type_to__img" border="0"/> </a>
</td>
</tr>
<tr>
<td class="td_leftAlign" nowrap="true">
<strong>Sundry Code From:</strong>
</td>
<td class="td_leftAlign">
<input type="text" class="input_editable" size="15" value="{$sundry_code_fr}" name="Detail1.{normalize-space($dbID)}.sundry_code_fr" id="Detail1.{normalize-space($dbID)}.sundry_code_fr" maxlength="05" ISCHANGED="false"/>
<a href="javascript:callPopUpJSP( 'sundry_code' );"> <img src="/ibase/webitm/images/Standard/e12_pophelp_16.jpg" border="0"/> </a>
</td>
<td class="td_leftAlign" nowrap="true">
<strong>Sundry Code To:</strong>
</td>
<td class="td_leftAlign">
<input type="text" class="input_editable" size="15" value="{$sundry_code_to}" name="Detail1.{normalize-space($dbID)}.sundry_code_to" id="Detail1.{normalize-space($dbID)}.sundry_code_to" maxlength="05" ISCHANGED="false" />
<a href="javascript:callPopUpJSP( 'sundry_code' );"> <img src="/ibase/webitm/images/Standard/e12_pophelp_16.jpg" border="0"/> </a>
</td>
</tr>
<!-- Added by Dadaso pawar [End]-->
</xsl:for-each>
<tr>
<td colspan="2">
......
......@@ -10,17 +10,20 @@
//System.out.println("request.getParameter(\"SELECTED_ITEM\") "+request.getParameter("SELECTED_ITEM"));
System.out.println("request.getParameter(\"SAVE_SAMPLE_DATA\") "+request.getParameter("SAVE_SAMPLE_DATA"));
System.out.println("request.getParameter(\"RECONCILETYPE\") "+request.getParameter("RECONCILETYPE"));
// StrgCode passed for future implementation of strgCustmer wise itemList
// String salesPers = ( String ) request.getParameter("SALES_PERS");
// String strgCode = ( String ) request.getParameter("STRG_CODE");
//String selectedItems = ( String ) request.getParameter("SELECTED_ITEM");
String saveSampleData = ( String ) request.getParameter("SAVE_SAMPLE_DATA");
String reconcileType = ( String ) request.getParameter("RECONCILETYPE");
//String divData = ( String ) request.getParameter("div_data");// div_data
//String xslFileName = getXSLFileName("mrp_run_wiz4_wiz_en_US_A.xsl");
System.out.println("@@@@@@@@@@@@saveSampleData["+saveSampleData+"]");
//String htmlData = ( new ibase.webitm.utility.GenericUtility() ).transformToString( xslFileName, selectedSampleItems, CommonConstants.APPLICATION_CONTEXT + File.separator + "temp", "Output", ".html" );
// String htmlData = MRPWizardBean.getSalesPersSampleItemList( salesPers, strgCode, selectedItems, selectedSampleItems );
icrWizPrsSave.preSaveForm(saveSampleData);
icrWizPrsSave.preSaveForm(saveSampleData,reconcileType);
System.out.println("@@@@@@@@@@@@complete--------------");
%>
ss
\ No newline at end of file
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