Commit 9a32f07d authored by Vu Duy Anh's avatar Vu Duy Anh

anhvd commit fix bug campaign mng

parent ad46b6ea
...@@ -131,16 +131,16 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom { ...@@ -131,16 +131,16 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
sb.append(" AND a.STATUS IN (:p_statuses) "); sb.append(" AND a.STATUS IN (:p_statuses) ");
} }
if (!DataUtil.isNullOrEmpty(requestDto.getFromDateFr())) { if (!DataUtil.isNullOrEmpty(requestDto.getFromDateFr())) {
sb.append(" AND TO_DATE(a.START_TIME, 'DD/MM/YYYY') >= :p_frDateFr"); sb.append(" AND TO_DATE(a.START_TIME, 'DD-MM-RR') >= TO_DATE(:p_frDateFr, 'YYYYMMDD')");
} }
if (!DataUtil.isNullOrEmpty(requestDto.getToDateFr())) { if (!DataUtil.isNullOrEmpty(requestDto.getToDateFr())) {
sb.append(" AND TO_DATE(a.START_TIME, 'DD/MM/YYYY') <= :p_toDateFr"); sb.append(" AND TO_DATE(a.START_TIME, 'DD-MM-RR') <= TO_DATE(:p_toDateFr, 'YYYYMMDD')");
} }
if (!DataUtil.isNullOrEmpty(requestDto.getFromDateTo())) { if (!DataUtil.isNullOrEmpty(requestDto.getFromDateTo())) {
sb.append(" AND TO_DATE(a.END_TIME, 'DD/MM/YYYY') >= :p_frDateTo"); sb.append(" AND TO_DATE(a.END_TIME, 'DD-MM-RR') >= TO_DATE(:p_frDateTo, 'YYYYMMDD')");
} }
if (!DataUtil.isNullOrEmpty(requestDto.getToDateTo())) { if (!DataUtil.isNullOrEmpty(requestDto.getToDateTo())) {
sb.append(" AND TO_DATE(a.END_TIME, 'DD/MM/YYYY') <= :p_toDateTo"); sb.append(" AND TO_DATE(a.END_TIME, 'DD-MM-RR') <= TO_DATE(:p_toDateTo, 'YYYYMMDD')");
} }
if (!DataUtil.isNullOrZero(requestDto.getNumOfCusFr())) { if (!DataUtil.isNullOrZero(requestDto.getNumOfCusFr())) {
sb.append(" AND a.CUSTOMER_NUMBER >= :p_cusNumFr"); sb.append(" AND a.CUSTOMER_NUMBER >= :p_cusNumFr");
...@@ -165,7 +165,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom { ...@@ -165,7 +165,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
SQLQuery query = session.createSQLQuery(sb.toString()); SQLQuery query = session.createSQLQuery(sb.toString());
if (!DataUtil.isNullOrEmpty(requestDto.getCampaignCode())) { if (!DataUtil.isNullOrEmpty(requestDto.getCampaignCode())) {
String[] lstCode = requestDto.getCampaignCode().split(","); String[] lstCode = requestDto.getCampaignCode().trim().split(",");
query.setParameterList("p_code", lstCode); query.setParameterList("p_code", lstCode);
} }
......
...@@ -215,6 +215,7 @@ public class ScenarioServiceImpl implements ScenarioService { ...@@ -215,6 +215,7 @@ public class ScenarioServiceImpl implements ScenarioService {
CellRangeAddressList typeCellRangeAddressList = new CellRangeAddressList(3, 9999, 1, 1); CellRangeAddressList typeCellRangeAddressList = new CellRangeAddressList(3, 9999, 1, 1);
DataValidation typeValidation = dataValidationHelper.createValidation(questionType, typeCellRangeAddressList); DataValidation typeValidation = dataValidationHelper.createValidation(questionType, typeCellRangeAddressList);
typeValidation.setSuppressDropDownArrow(true); typeValidation.setSuppressDropDownArrow(true);
typeValidation.setShowErrorBox(true);
sheet.addValidationData(typeValidation); sheet.addValidationData(typeValidation);
//HashInputCombobox //HashInputCombobox
...@@ -222,6 +223,7 @@ public class ScenarioServiceImpl implements ScenarioService { ...@@ -222,6 +223,7 @@ public class ScenarioServiceImpl implements ScenarioService {
CellRangeAddressList hasInputCellRangeAddressList = new CellRangeAddressList(3, 9999, 4, 4); CellRangeAddressList hasInputCellRangeAddressList = new CellRangeAddressList(3, 9999, 4, 4);
DataValidation hasInputValidation = dataValidationHelper.createValidation(hasInput, hasInputCellRangeAddressList); DataValidation hasInputValidation = dataValidationHelper.createValidation(hasInput, hasInputCellRangeAddressList);
hasInputValidation.setSuppressDropDownArrow(true); hasInputValidation.setSuppressDropDownArrow(true);
hasInputValidation.setShowErrorBox(true);
sheet.addValidationData(hasInputValidation); sheet.addValidationData(hasInputValidation);
//Required //Required
...@@ -229,6 +231,7 @@ public class ScenarioServiceImpl implements ScenarioService { ...@@ -229,6 +231,7 @@ public class ScenarioServiceImpl implements ScenarioService {
CellRangeAddressList requiredCellRangeAddressList = new CellRangeAddressList(3, 9999, 5, 5); CellRangeAddressList requiredCellRangeAddressList = new CellRangeAddressList(3, 9999, 5, 5);
DataValidation requiredValidation = dataValidationHelper.createValidation(required, requiredCellRangeAddressList); DataValidation requiredValidation = dataValidationHelper.createValidation(required, requiredCellRangeAddressList);
requiredValidation.setSuppressDropDownArrow(true); requiredValidation.setSuppressDropDownArrow(true);
requiredValidation.setShowErrorBox(true);
sheet.addValidationData(requiredValidation); sheet.addValidationData(requiredValidation);
//Required //Required
...@@ -236,6 +239,7 @@ public class ScenarioServiceImpl implements ScenarioService { ...@@ -236,6 +239,7 @@ public class ScenarioServiceImpl implements ScenarioService {
CellRangeAddressList defaultValueCellRangeAddressList = new CellRangeAddressList(3, 9999, 6, 6); CellRangeAddressList defaultValueCellRangeAddressList = new CellRangeAddressList(3, 9999, 6, 6);
DataValidation defaultValueValidation = dataValidationHelper.createValidation(defaultValue, defaultValueCellRangeAddressList); DataValidation defaultValueValidation = dataValidationHelper.createValidation(defaultValue, defaultValueCellRangeAddressList);
defaultValueValidation.setSuppressDropDownArrow(true); defaultValueValidation.setSuppressDropDownArrow(true);
defaultValueValidation.setShowErrorBox(true);
sheet.addValidationData(defaultValueValidation); sheet.addValidationData(defaultValueValidation);
......
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