2026-02-27 23:52:07 +08:00
|
|
|
package com.mini.mybigscreen.biz.controller;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.mini.mybigscreen.Model.PageResult;
|
|
|
|
|
import com.mini.mybigscreen.Model.Result;
|
|
|
|
|
import com.mini.mybigscreen.biz.domain.ErpTransactionFlow;
|
|
|
|
|
import com.mini.mybigscreen.biz.service.ErpTransactionFlowService;
|
|
|
|
|
import com.mini.mybigscreen.utils.PageUtil;
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <p>
|
|
|
|
|
* 收支流水总表 前端控制器
|
|
|
|
|
* </p>
|
|
|
|
|
*
|
|
|
|
|
* @author gaoxq
|
|
|
|
|
* @since 2026-02-27
|
|
|
|
|
*/
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/biz/erpTransactionFlow")
|
|
|
|
|
public class ErpTransactionFlowController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private ErpTransactionFlowService flowService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("list")
|
|
|
|
|
public Result<?> getList(Integer pageNum, Integer pageSize,
|
|
|
|
|
String accountId, String flowName, String transactionType, String categoryId) {
|
|
|
|
|
QueryWrapper<ErpTransactionFlow> query = new QueryWrapper<>();
|
|
|
|
|
query.like(StrUtil.isNotBlank(flowName), "flow_name", flowName)
|
|
|
|
|
.eq(StrUtil.isNotBlank(accountId), "account_id", accountId)
|
|
|
|
|
.eq(StrUtil.isNotBlank(categoryId), "category_id", categoryId)
|
|
|
|
|
.eq(StrUtil.isNotBlank(transactionType), "transaction_type", transactionType)
|
|
|
|
|
.orderByDesc("create_time");
|
|
|
|
|
List<ErpTransactionFlow> flowList = flowService.list(query);
|
2026-03-01 21:28:05 +08:00
|
|
|
PageUtil<ErpTransactionFlow> util = new PageUtil<>(pageNum, pageSize, flowList);
|
|
|
|
|
PageResult<?> result = new PageResult<>(util.OkData(), pageNum, pageSize, flowList.size());
|
2026-02-27 23:52:07 +08:00
|
|
|
return Result.success(result);
|
|
|
|
|
}
|
|
|
|
|
}
|