Commit e1982a52 authored by neo's avatar neo

[bugfix] split space with \s+ for sql more blank where condition

parent e6e4c719
...@@ -601,77 +601,77 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer ...@@ -601,77 +601,77 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
for (QueryConditionDto queryConditionDto : listQueryCondition) { for (QueryConditionDto queryConditionDto : listQueryCondition) {
switch (queryConditionDto.getConditionName()) { switch (queryConditionDto.getConditionName()) {
case VoucherSelect.S_CorpAcctCoding: case VoucherSelect.S_CorpAcctCoding:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`AcctCode`" , "`AcctCode`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_CorpAcctName: case VoucherSelect.S_CorpAcctName:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "EnterpriseAccount.`Name`" , "EnterpriseAccount.`Name`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_VoucherType: case VoucherSelect.S_VoucherType:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`Group`" , "`Group`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_VoucherVID: case VoucherSelect.S_VoucherVID:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`VID`" , "`VID`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_VoucherSummary: case VoucherSelect.S_VoucherSummary:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`Summary`" , "`Summary`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_Period: case VoucherSelect.S_Period:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`Period`" , "`Period`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_Debit: case VoucherSelect.S_Debit:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`Debit`" , "`Debit`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_Credit: case VoucherSelect.S_Credit:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`Credit`" , "`Credit`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_Date: case VoucherSelect.S_Date:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "`Date`" , "`Date`"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_CustomerCode: case VoucherSelect.S_CustomerCode:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "Voucher.CustomerCode" , "Voucher.CustomerCode"
, mainRelation , mainRelation
, null)); , null));
break; break;
case VoucherSelect.S_CustomerName: case VoucherSelect.S_CustomerName:
tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().split(" ")) tmpls.add(createQueryScriptByTmplList(Arrays.asList(queryConditionDto.getSearchValue().trim().split("\\s+"))
, VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1] , VoucherSearchEnum.values()[queryConditionDto.getSearchKeyWord() - 1]
, "Voucher.CustomerName" , "Voucher.CustomerName"
, mainRelation , mainRelation
......
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