Commit b5aa4978 authored by cpatil's avatar cpatil

return error code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93799 ce508802-f39f-4f6c-b175-0d175dae99d5
parent eb2d3a4e
......@@ -49,13 +49,13 @@ POrderAmdConfLocal, POrderAmdConfRemote
String sql = "";
//String sql1 = "";
//int status = 0;
double frtAmt = 0.0;
//double frtAmt = 0.0;
//Date lrDate = null;
Connection conn = null;
PreparedStatement pstmt = null;
//PreparedStatement pstmt1 = null;
ITMDBAccessEJB itmDBAccessEJB = null;
String errString = null;
String errString = null,errCode="";
ResultSet rs = null;
//ResultSet rs1 = null;
String purcOrder = "", poStatus = "", amdNo = "", workflowStatus = "";
......@@ -83,6 +83,8 @@ POrderAmdConfLocal, POrderAmdConfRemote
if ("C".equalsIgnoreCase(poStatus) || "X".equalsIgnoreCase(poStatus) )
{
errString = "VTPOCX";
errString = itmDBAccessLocal.getErrorString("",errString,"");
return errString;
}
sql = " select confirmed, (case when workflow_status is null then '0' else workflow_status end) "
......@@ -120,15 +122,17 @@ POrderAmdConfLocal, POrderAmdConfRemote
pstmt.setString(1, amdNo);
pstmt.setString(2, purcOrder);
rs = pstmt.executeQuery();
if (rs.next()) {
if (rs.next())
{
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (cnt > 0) {
System.out.println("@@@@@@@@111 cnt["+cnt+"]");
if (cnt > 0)
{
errString = "VTPOHRDT";
errString = itmDBAccessLocal.getErrorString("",errString,"");
return errString;
......@@ -147,6 +151,7 @@ POrderAmdConfLocal, POrderAmdConfRemote
rs = null;
pstmt.close();
pstmt = null;
System.out.println("@@@@@@@@222 cnt["+cnt+"]");
if (cnt > 0)
{
errString = "VTPOHRDT";
......@@ -198,6 +203,7 @@ POrderAmdConfLocal, POrderAmdConfRemote
throw new ITMException(e);
}
}
System.out.println("errString["+errString+"]:::::::::::errCode["+errCode+"]");
return errString;
}
......
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