Replace DocumentUploadBulkProcessAction.java

parent 5e31814f
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/* */ extends DispatchAction /* */ extends DispatchAction
/* */ { /* */ {
/* 45 */ private static final Logger logger = Logger.getLogger(DocumentUploadBulkProcessAction.class.getName()); /* 45 */ private static final Logger logger = Logger.getLogger(DocumentUploadBulkProcessAction.class.getName());
/* 46 */ static ResourceBundle resource = ResourceBundle.getBundle("com.yourcompany.struts.utill"); /* 46 */ static ResourceBundle resource = ResourceBundle.getBundle("com.yourcompany.struts.utill.....");
/* 47 */ List<String> fileList = new ArrayList<>(); /* 47 */ List<String> fileList = new ArrayList<>();
/* 48 */ List<String> filesListInDir = null; /* 48 */ List<String> filesListInDir = null;
/* 49 */ String dateFormat = resource.getString("lbl.dateInDao"); /* 49 */ String dateFormat = resource.getString("lbl.dateInDao");
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/* */ /* */
/* */ /* */
/* */ public ActionForward callDocUploadInBulk(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { /* */ public ActionForward callDocUploadInBulk(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
/* 54 */ logger.info("the method is in callDocUploadInBulk"); /* 54 */ logger.info("the method is in callDocUploadInBulk called..... ");
/* 55 */ HttpSession session = request.getSession(); /* 55 */ HttpSession session = request.getSession();
/* 56 */ boolean flag = false; /* 56 */ boolean flag = false;
/* 57 */ UserObject userobj = (UserObject)session.getAttribute("userobject"); /* 57 */ UserObject userobj = (UserObject)session.getAttribute("userobject");
...@@ -98,14 +98,16 @@ ...@@ -98,14 +98,16 @@
/* */ } /* */ }
// create a method isFileNamedvalid(filename) --return type is boolean // create a method isFileNamedvalid(filename) --return type is boolean
boolean isValid = isFileNamedvalid(filename); boolean isValid = isFileNamedvalid(filename);
logger.info("isValid value :: " + isValid); logger.info("isValid value... :: " + isValid);
if (isValid) { if (isValid) {
logger.info(" inside the if block.... " ); logger.info(" inside the if block :: " );
/* 135 */ String loan_no = filename.substring(0, 20); /* 135 */ String loan_no = filename.substring(0, 20);
/* 136 */ String getloanId = " SELECT loan_id FROM cr_loan_dtl WHERE loan_no ='" + loan_no + "' "; /* 136 */ String getloanId = " SELECT loan_id FROM cr_loan_dtl WHERE loan_no ='" + loan_no + "' ";
/* 137 */ String LOANID = ConnectionDAO.singleReturn(getloanId); /* 137 */ String LOANID = ConnectionDAO.singleReturn(getloanId);
logger.info("LOANID : " + LOANID);
/* 138 */ String filewithpath = files[i].getCanonicalPath(); /* 138 */ String filewithpath = files[i].getCanonicalPath();
/* */ /* */
/* 140 */ String fcount = "select count(*) from CR_UPLOADED_DOCUMENTS where FILE_NAME='" + filename + "' and txn_type='LGL' "; /* 140 */ String fcount = "select count(*) from CR_UPLOADED_DOCUMENTS where FILE_NAME='" + filename + "' and txn_type='LGL' ";
...@@ -205,7 +207,7 @@ ...@@ -205,7 +207,7 @@
//Method Added by Amol S on 12-Nov to check the , valid file -strt //Method Added by Amol S on 12-Nov to check the , valid file -strt
public boolean isFileNamedvalid(String filename) public boolean isFileNamedvalid(String filename)
{ {
logger.info(" Method called... " ); logger.info(" isFileNamedvalid Method called... " );
logger.info(" filename :--> " + filename); logger.info(" filename :--> " + filename);
if (filename.contains("'") || filename.length() < 20) { if (filename.contains("'") || filename.length() < 20) {
return false; return false;
......
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