Commit c5761406 authored by ngadkari's avatar ngadkari

changes in E-INVOICE process

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217362 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8bc630ae
...@@ -170,6 +170,7 @@ public class EInvoiceIRNCancelPrc extends ProcessEJB { ...@@ -170,6 +170,7 @@ public class EInvoiceIRNCancelPrc extends ProcessEJB {
byte[] respJsonInBytes=null; byte[] respJsonInBytes=null;
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
Timestamp currDate=null,cancelDate=null; Timestamp currDate=null,cancelDate=null;
String errorString="";
try { try {
...@@ -697,7 +698,18 @@ public class EInvoiceIRNCancelPrc extends ProcessEJB { ...@@ -697,7 +698,18 @@ public class EInvoiceIRNCancelPrc extends ProcessEJB {
{ {
arrObj = object.getJSONArray("ErrorDetails"); arrObj = object.getJSONArray("ErrorDetails");
// System.out.println("ErrorDetails-------"+arrObj.toString()); // System.out.println("ErrorDetails-------"+arrObj.toString());
errString = utilMethods.getMsg(arrObj.toString(), "VTPROUNSU9", conn); errorString=arrObj.toString();
if(errorString==null || "null".equalsIgnoreCase(errorString) ||errorString.trim().length()==0)
{
errorString="";
}
errorString=errorString.replace("{", "").replace("}", "").replace("[", "").replace("]", "").replace("\"", "");
errString = utilMethods.getMsg(errorString, "VTPROUNSU9", conn);
return errString; return errString;
} }
......
...@@ -465,6 +465,7 @@ public class EInvoiceIRNGenPrc extends ProcessEJB { ...@@ -465,6 +465,7 @@ public class EInvoiceIRNGenPrc extends ProcessEJB {
byte[] respJsonInBytes=null; byte[] respJsonInBytes=null;
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
Timestamp currDate=null,ackDate=null; Timestamp currDate=null,ackDate=null;
String errorString="";
try { try {
...@@ -2062,10 +2063,20 @@ public class EInvoiceIRNGenPrc extends ProcessEJB { ...@@ -2062,10 +2063,20 @@ public class EInvoiceIRNGenPrc extends ProcessEJB {
{ {
arrObj = object.getJSONArray("ErrorDetails"); arrObj = object.getJSONArray("ErrorDetails");
// System.out.println("ErrorDetails-------"+arrObj.toString()); // System.out.println("ErrorDetails-------"+arrObj.toString());
printLog(refNo,refSer,"Response: "+ arrObj.toString() ,"ERROR"); errorString=arrObj.toString();
sql = " insert into gst_ir_info (tran_date,tran_type,ref_ser,ref_id,reg_stat)" + if(errorString==null || "null".equalsIgnoreCase(errorString) ||errorString.trim().length()==0)
" values (?,?,?,?,?) "; {
errorString="";
}
errorString=errorString.replace("{", "").replace("}", "").replace("[", "").replace("]", "").replace("\"", "");
printLog(refNo,refSer,"Response: "+ errorString ,"ERROR");
sql = " insert into gst_ir_info (tran_date,tran_type,ref_ser,ref_id,reg_stat,ir_no)" +
" values (?,?,?,?,?,?) ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, currDate); pstmt.setTimestamp(1, currDate);
...@@ -2073,7 +2084,7 @@ public class EInvoiceIRNGenPrc extends ProcessEJB { ...@@ -2073,7 +2084,7 @@ public class EInvoiceIRNGenPrc extends ProcessEJB {
pstmt.setString(3, refSer); pstmt.setString(3, refSer);
pstmt.setString(4, refNo); pstmt.setString(4, refNo);
pstmt.setString(5, "0"); pstmt.setString(5, "0");
pstmt.setString(6, errorString);
pstmt.executeUpdate(); pstmt.executeUpdate();
if (pstmt != null) { if (pstmt != null) {
pstmt.close(); pstmt.close();
......
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