Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
markliu2013 committed Mar 18, 2024
1 parent ae8de50 commit bf83954
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main/java/cn/biq/mn/TestController.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TestController {

@RequestMapping(method = RequestMethod.GET, value = "/version")
public BaseResponse handleVersion() {
return new DataResponse<>("93.36");
return new DataResponse<>("93.37");
}

@GetMapping("/test3")
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/cn/biq/mn/report/CategoryReportQueryForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
public class CategoryReportQueryForm {

@NotNull
private Integer bookId;
private Integer book;
private Long minTime;
private Long maxTime;
private String title;
private Set<Integer> payees;
private Set<Integer> categories;
private Set<Integer> tags;
private Integer accountId;
private Integer account;

public void buildPredicate(BooleanBuilder booleanBuilder, QBalanceFlow balanceFlow) {
if (minTime != null) {
Expand All @@ -43,9 +43,9 @@ public void buildPredicate(BooleanBuilder booleanBuilder, QBalanceFlow balanceFl
if (payees != null) {
booleanBuilder.and(balanceFlow.payee.id.in(payees));
}
if (accountId != null) {
BooleanBuilder builder1 = new BooleanBuilder(balanceFlow.account.id.eq(accountId));
BooleanBuilder builder2 = new BooleanBuilder(balanceFlow.to.id.eq(accountId));
if (account != null) {
BooleanBuilder builder1 = new BooleanBuilder(balanceFlow.account.id.eq(account));
BooleanBuilder builder2 = new BooleanBuilder(balanceFlow.to.id.eq(account));
booleanBuilder.and(builder1.or(builder2));
}
// if (categories != null) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/cn/biq/mn/report/ReportService.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class ReportService {

public List<ChartVO> reportCategory(CategoryReportQueryForm form, CategoryType type) {
List<ChartVO> result = new ArrayList<>();
Book book = baseService.getBookInGroup(form.getBookId());
Book book = baseService.getBookInGroup(form.getBook());
List<Category> categories = categoryRepository.findAllByBookAndType(book, type);
Category requestCategory = null;
List<Category> rootCategories = new ArrayList<>();
Expand Down Expand Up @@ -104,7 +104,7 @@ public List<ChartVO> reportCategory(CategoryReportQueryForm form, CategoryType t

public List<ChartVO> reportTag(CategoryReportQueryForm form, FlowType type) {
List<ChartVO> result = new ArrayList<>();
Book book = baseService.getBookInGroup(form.getBookId());
Book book = baseService.getBookInGroup(form.getBook());
List<Tag> tags = new ArrayList<>();
if (type == FlowType.EXPENSE) {
tags = tagRepository.findByBookAndEnableAndCanExpense(book, true, true);
Expand Down

0 comments on commit bf83954

Please sign in to comment.