Commit 0136cb05 authored by Phạm Duy Phi's avatar Phạm Duy Phi

phipd commit

parent 281d22f3
...@@ -799,10 +799,10 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -799,10 +799,10 @@ public class CustomerServiceImpl implements CustomerService {
sb.append(" AND to_date(CREATE_AT, 'DD-MM-RR') >= to_date(:p_date_from, 'YYYYMMDD') AND to_date(CREATE_AT, 'DD-MM-RR') <= to_date(:p_date_to, 'YYYYMMDD')"); sb.append(" AND to_date(CREATE_AT, 'DD-MM-RR') >= to_date(:p_date_from, 'YYYYMMDD') AND to_date(CREATE_AT, 'DD-MM-RR') <= to_date(:p_date_to, 'YYYYMMDD')");
if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListCode())) { if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListCode())) {
sb.append(" AND CUSTOMER_LIST_CODE LIKE :p_list_code"); sb.append(" AND UPPER(CUSTOMER_LIST_CODE) LIKE UPPER(:p_list_code)");
} }
if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListName())) { if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListName())) {
sb.append(" AND CUSTOMER_LIST_NAME LIKE :p_list_name"); sb.append(" AND UPPER(CUSTOMER_LIST_NAME) LIKE UPPER(:p_list_name)");
} }
sb.append(" ORDER BY CREATE_AT DESC"); sb.append(" ORDER BY CREATE_AT DESC");
...@@ -815,7 +815,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -815,7 +815,7 @@ public class CustomerServiceImpl implements CustomerService {
if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListCode())) { if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListCode())) {
query.setParameter("p_list_code", "%" + query.setParameter("p_list_code", "%" +
searchCustomerRequestDTO.getCustomerListCode() searchCustomerRequestDTO.getCustomerListCode().trim()
.replace("\\", "\\\\") .replace("\\", "\\\\")
.replaceAll("%", "\\%") .replaceAll("%", "\\%")
.replaceAll("_", "\\_") .replaceAll("_", "\\_")
...@@ -824,7 +824,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -824,7 +824,7 @@ public class CustomerServiceImpl implements CustomerService {
if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListName())) { if (!DataUtil.isNullOrEmpty(searchCustomerRequestDTO.getCustomerListName())) {
query.setParameter("p_list_name", "%" + query.setParameter("p_list_name", "%" +
searchCustomerRequestDTO.getCustomerListName() searchCustomerRequestDTO.getCustomerListName().trim()
.replace("\\", "\\\\") .replace("\\", "\\\\")
.replaceAll("%", "\\%") .replaceAll("%", "\\%")
.replaceAll("_", "\\_") .replaceAll("_", "\\_")
......
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