Commit 99cb927c authored by prane's avatar prane

closed cursors and corrected error returns and bug fixed

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@198576 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 66f5453d
......@@ -94,7 +94,7 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
public String process(Document dom, Document dom2, String windowName, String xtraParams)
throws RemoteException, ITMException {
BaseLogger.log("9", null, null, "enter in process(dom)");
BaseLogger.log("2", null, null, "enter in process(dom)");
String chgTerm = "", chgUser = "";
PreparedStatement pstmt = null;
......@@ -316,7 +316,7 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
BaseLogger.log("9", null, null, "\n dom2 ************* " + dom2.toString());
}
BaseLogger.log("9", null, null, conorder + "here11");
BaseLogger.log("3", null, null, conorder + "here11");
sqldet = "SELECT LINE_NO FROM CONSUME_ORD_DET WHERE CONS_ORDER = '" + conorder + "'";
BaseLogger.log("9", null, null, sqldet);
PreparedStatement pstmtm = conn.prepareStatement(sqldet);
......@@ -396,19 +396,19 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
// xmlBuffer.append("</DocumentRoot>");
lineNo = new ArrayList<Integer>(0);
// lineNo = new ArrayList<Integer>(0);
BaseLogger.log("0", null, null, "out of for loop line size" + lineNo.size());
BaseLogger.log("3", null, null, "out of for loop line size" + lineNo.size());
xmlBuffer.append("</Header0>");
xmlBuffer.append("</group0>");
xmlBuffer.append("</DocumentRoot>");
BaseLogger.log("0", null, null, "allocated check here " + allocateStr + "allocated check here");
BaseLogger.log("3", null, null, "allocated check here " + allocateStr + "allocated check here");
BaseLogger.log("0", null, null, "^^^^^^After document root endffff^^^^^^^^");
BaseLogger.log("3", null, null, "^^^^^^After document root endffff^^^^^^^^");
// xmlString=itemChgXmlString.toString();
//BaseLogger.log("9", null, null, "xml beff here" + xmlBuffer + "xml beff here");
//BaseLogger.log("9", null, null, "xml ceff here" + xmlBuffer.toString() + "xml ceff here");
//BaseLogger.log("9", null, null, "xml string here" + xmlString + "xml string here");
BaseLogger.log("0", null, null, SiteCodeReq + "code codefff");
BaseLogger.log("3", null, null, SiteCodeReq + "code codefff");
xmlString = xmlBuffer.toString();
if (xmlString.indexOf("POCONSTRA") > -1) {
......@@ -446,11 +446,11 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
xmlString = "";
continue;
}
BaseLogger.log("0", null, null, "saveData(SiteCodeReq, xmlString, conn, xtraParams)"+xmlString+"]");
BaseLogger.log("3", null, null, "saveData(SiteCodeReq, xmlString, conn, xtraParams)"+xmlString+"]");
xmlString = xmlString.replaceAll("DETERROR", "");
BaseLogger.log("0", null, null, "out continue >>>>FFFFFF[" + xmlString + "]");
BaseLogger.log("3", null, null, "out continue >>>>FFFFFF[" + xmlString + "]");
retString = saveData(SiteCodeReq, xmlString, xtraParams, conn);
BaseLogger.log("0", null, null, "@@@@@@3: retString from despatch" + retString);
BaseLogger.log("3", null, null, "@@@@@@3: retString from despatch" + retString);
conn.commit();
BaseLogger.log("3", null, null, "retstring check here" + retString);
if (retString.indexOf("Success") > -1) {
......@@ -473,7 +473,7 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
xmlBuffer = new StringBuffer("");
xmlString = "";
itemChgRetStr = "";
BaseLogger.log("0", null, null, "xmlbuffer1" + xmlBuffer1 + "xmlBufferD" + xmlBufferD + "xmlBuffer" + xmlBuffer
BaseLogger.log("9", null, null, "xmlbuffer1" + xmlBuffer1 + "xmlBufferD" + xmlBufferD + "xmlBuffer" + xmlBuffer
+ "xmlString" + xmlString + "end here");
}
......@@ -3527,21 +3527,20 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
pstmt1.setString(4, locCode);
rs11 = pstmt1.executeQuery();
BaseLogger.log("9", null, null, "CNT CNT ----->>" + CNT);
BaseLogger.log("3", null, null, "CNT CNT ----->>" + CNT);
if (rs11.next()) {
BaseLogger.log("9", null, null, "CNT CNT --IN-->>" + CNT);
CNT = rs11.getInt(1);
BaseLogger.log("9", null, null, "checkkkkkk ______DD" + CNT);
}
BaseLogger.log("9", null, null, "CNT CNT ----1->>" + CNT);
if (CNT > 0) {
return true;
}
pstmt1.close();
rs11.close();
pstmt1 = null;
rs11 = null;
BaseLogger.log("9", null, null, "CNT CNT ----1->>" + CNT);
if (CNT > 0) {
return true;
}
} catch (Exception E) {
BaseLogger.log("0", null, null, "Exception in is StockAvailable");
E.printStackTrace();
......@@ -3560,14 +3559,14 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
java.util.Date expDate = new java.util.Date();
java.util.Date retDate = new java.util.Date();
String retStrInDate = "";
BaseLogger.log("9", null, null, "tranDate :" + tranDate + "\nmonths :" + months);
BaseLogger.log("3", null, null, "tranDate :" + tranDate + "\nmonths :" + months);
try {
// GenericUtility genericUtility = GenericUtility.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
if (months > 0) {
Calendar cal = Calendar.getInstance();
expDate = sdf.parse(tranDate);
BaseLogger.log("9", null, null, "expDate :" + expDate);
BaseLogger.log("3", null, null, "expDate :" + expDate);
cal.setTime(expDate);
cal.add(Calendar.MONTH, months);
......@@ -3582,15 +3581,15 @@ public class GenConsIssuePrc extends ProcessEJB implements GenConsIssuePrcLocal,
} catch (Exception e) {
BaseLogger.log("0", null, null, "The Exception occurs in calcExpiry :" + e);
}
BaseLogger.log("9", null, null, "retStrInDate :" + retStrInDate);
BaseLogger.log("3", null, null, "retStrInDate :" + retStrInDate);
return retStrInDate;
}
private String acctDetrTType(String itemCode, String itemSer, String purpose, String tranType) throws Exception {
BaseLogger.log("9", null, null, "acctDetrTType Calling................");
BaseLogger.log("9", null, null, "The values of parameters are :\n itemCode :" + itemCode + " \n itemSer :" + itemSer
BaseLogger.log("2", null, null, "acctDetrTType Calling................");
BaseLogger.log("3", null, null, "The values of parameters are :\n itemCode :" + itemCode + " \n itemSer :" + itemSer
+ " \n purpose :" + purpose + " \n tranType :" + tranType);
String sql = "", stkOption = "", acctCode = "", cctrCode = "", itemSer1 = "", retStr = "";
Statement stmt = 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