Commit 13d5d8dd authored by neo's avatar neo

[bugfix] use queryDto same as Query body param

parent 98a01c03
package pwc.taxtech.atms.dto.vatdto;
public class QueryEvidenceDto {
private Integer queryType;
private String queryString;
private Boolean isCurrentPeriod;
private Integer periodId;
public Integer getQueryType() {
return queryType;
}
public void setQueryType(Integer queryType) {
this.queryType = queryType;
}
public String getQueryString() {
return queryString;
}
public void setQueryString(String queryString) {
this.queryString = queryString;
}
public Boolean getCurrentPeriod() {
return isCurrentPeriod;
}
public void setCurrentPeriod(Boolean currentPeriod) {
isCurrentPeriod = currentPeriod;
}
public Integer getPeriodId() {
return periodId;
}
public void setPeriodId(Integer periodId) {
this.periodId = periodId;
}
public Integer QueryType;
public String QueryString;
public Boolean IsCurrentPeriod;
public Integer PeriodId;
}
......@@ -69,17 +69,17 @@ public class OutputInvoiceServiceImpl extends VatAbstractService {
public List<ImportFile> getEvidenceList(QueryEvidenceDto queryDto) {
ImportFileExample example = new ImportFileExample();
if (queryDto.getCurrentPeriod()) {
if (Utils.isEmpty(queryDto.getQueryString())) {
example.createCriteria().andFileImportTypeEqualTo(2).andPeriodIDEqualTo(queryDto.getPeriodId().intValue());
if (queryDto.IsCurrentPeriod) {
if (Utils.isEmpty(queryDto.QueryString)) {
example.createCriteria().andFileImportTypeEqualTo(2).andPeriodIDEqualTo(queryDto.PeriodId.intValue());
} else {
example.createCriteria().andFileImportTypeEqualTo(2).andPeriodIDEqualTo(queryDto.getPeriodId().intValue()).andFileNameLike(queryDto.getQueryString());
example.createCriteria().andFileImportTypeEqualTo(2).andPeriodIDEqualTo(queryDto.PeriodId.intValue()).andFileNameLike(queryDto.QueryString);
}
} else {
if (Utils.isEmpty(queryDto.getQueryString())) {
if (Utils.isEmpty(queryDto.QueryString)) {
example.createCriteria().andFileImportTypeEqualTo(2);
} else {
example.createCriteria().andFileImportTypeEqualTo(2).andFileNameLike(queryDto.getQueryString());
example.createCriteria().andFileImportTypeEqualTo(2).andFileNameLike(queryDto.QueryString);
}
}
return importFileMapper.selectByExample(example);
......
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