diff --git a/screen-vue/src/api/bizApi.js b/screen-vue/src/api/bizApi.js index 03aa403..aedac8c 100644 --- a/screen-vue/src/api/bizApi.js +++ b/screen-vue/src/api/bizApi.js @@ -31,4 +31,26 @@ export function getErpAccountList(params) { method: 'get', params: params }) +} + +/** + * 获取交易分类信息列表 + */ +export function getErpCategoryList(params) { + return request({ + url: '/biz/erpCategory/list', + method: 'get', + params: params + }) +} + +/** + * 获取明细信息列表 + */ +export function getErpTransactionFlowList(params) { + return request({ + url: '/biz/erpTransactionFlow/list', + method: 'get', + params: params + }) } \ No newline at end of file diff --git a/screen-vue/src/assets/images/banzu.png b/screen-vue/src/assets/images/banzu.png deleted file mode 100644 index e212073..0000000 Binary files a/screen-vue/src/assets/images/banzu.png and /dev/null differ diff --git a/screen-vue/src/assets/images/deptk1.png b/screen-vue/src/assets/images/deptk1.png deleted file mode 100644 index 1f4b918..0000000 Binary files a/screen-vue/src/assets/images/deptk1.png and /dev/null differ diff --git a/screen-vue/src/views/desktop/screen/Erp/components/ChartV01.vue b/screen-vue/src/views/desktop/screen/Erp/components/ChartV01.vue index 44e5a82..5a65d01 100644 --- a/screen-vue/src/views/desktop/screen/Erp/components/ChartV01.vue +++ b/screen-vue/src/views/desktop/screen/Erp/components/ChartV01.vue @@ -6,12 +6,24 @@
+ + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/mini/mybigscreen/Model/PageResult.java b/src/main/java/com/mini/mybigscreen/Model/PageResult.java new file mode 100644 index 0000000..ad179b8 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/Model/PageResult.java @@ -0,0 +1,15 @@ +package com.mini.mybigscreen.Model; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class PageResult implements Serializable { + + private List list; // 当前页数据 + private Integer currentPage; // 当前页码 + private Integer pageSize; // 每页条数 + private Integer total; // 总记录数 +} diff --git a/src/main/java/com/mini/mybigscreen/biz/controller/ErpCategoryController.java b/src/main/java/com/mini/mybigscreen/biz/controller/ErpCategoryController.java new file mode 100644 index 0000000..206c4c0 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/controller/ErpCategoryController.java @@ -0,0 +1,33 @@ +package com.mini.mybigscreen.biz.controller; + +import com.mini.mybigscreen.Model.Result; +import com.mini.mybigscreen.biz.domain.ErpCategory; +import com.mini.mybigscreen.biz.service.ErpCategoryService; +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; + +/** + *

+ * 收支分类 前端控制器 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +@RestController +@RequestMapping("/biz/erpCategory") +public class ErpCategoryController { + + + @Resource + private ErpCategoryService categoryService; + + @GetMapping("list") + public Result> getList() { + return Result.success(categoryService.list()); + } +} diff --git a/src/main/java/com/mini/mybigscreen/biz/controller/ErpTransactionFlowController.java b/src/main/java/com/mini/mybigscreen/biz/controller/ErpTransactionFlowController.java new file mode 100644 index 0000000..dde55cc --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/controller/ErpTransactionFlowController.java @@ -0,0 +1,52 @@ +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; + +/** + *

+ * 收支流水总表 前端控制器 + *

+ * + * @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 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 flowList = flowService.list(query); + PageUtil pageUtil = new PageUtil<>(pageNum, pageSize, flowList); + List pageData = pageUtil.OkData(); + PageResult result = new PageResult<>(); + result.setList(pageData); // 当前页数据 + result.setCurrentPage(pageNum); // 当前页码 + result.setPageSize(pageSize); // 每页条数 + result.setTotal(flowList.size()); // 总条数 + return Result.success(result); + } +} diff --git a/src/main/java/com/mini/mybigscreen/biz/domain/ErpCategory.java b/src/main/java/com/mini/mybigscreen/biz/domain/ErpCategory.java new file mode 100644 index 0000000..6902676 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/domain/ErpCategory.java @@ -0,0 +1,92 @@ +package com.mini.mybigscreen.biz.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; + +/** + *

+ * 收支分类 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +@Getter +@Setter +@TableName("erp_category") +public class ErpCategory implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 分类标识 + */ + @TableId(value = "category_id", type = IdType.AUTO) + private String categoryId; + + /** + * 分类名称 + */ + @TableField("category_name") + private String categoryName; + + /** + * 分类类型 + */ + @TableField("category_type") + private String categoryType; + + /** + * 父分类ID(0-一级分类) + */ + @TableField("parent_id") + private String parentId; + + /** + * 排序序号 + */ + @TableField("sort_order") + private String sortOrder; + + /** + * 是否启用 + */ + @TableField("is_active") + private String isActive; + + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 租户id + */ + @TableField("f_tenant_id") + private String fTenantId; + + /** + * 流程id + */ + @TableField("f_flow_id") + private String fFlowId; + + /** + * 流程任务主键 + */ + @TableField("f_flow_task_id") + private String fFlowTaskId; + + /** + * 流程任务状态 + */ + @TableField("f_flow_state") + private Integer fFlowState; +} diff --git a/src/main/java/com/mini/mybigscreen/biz/domain/ErpTransactionFlow.java b/src/main/java/com/mini/mybigscreen/biz/domain/ErpTransactionFlow.java new file mode 100644 index 0000000..18418e1 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/domain/ErpTransactionFlow.java @@ -0,0 +1,102 @@ +package com.mini.mybigscreen.biz.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import lombok.Getter; +import lombok.Setter; + +/** + *

+ * 收支流水总表 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +@Getter +@Setter +@TableName("erp_transaction_flow_view") +public class ErpTransactionFlow implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 流水ID + */ + @TableId(value = "flow_id", type = IdType.AUTO) + private String flowId; + + /** + * 交易名称 + */ + @TableField("flow_name") + private String flowName; + + /** + * 交易类型 + */ + @TableField("transaction_type") + private String transactionType; + + /** + * 交易金额(正数) + */ + @TableField("amount") + private BigDecimal amount; + + /** + * 交易时间 + */ + @TableField("transaction_time") + private String transactionTime; + + /** + * 交易账户 + */ + @TableField("account_id") + private String accountId; + + /** + * 交易分类 + */ + @TableField("category_id") + private String categoryId; + + /** + * 交易备注 + */ + @TableField("remark") + private String remark; + + /** + * 是否记账 + */ + @TableField("is_finish") + private String isFinish; + + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 账户名称 + */ + @TableField("account_name") + private String accountName; + + /** + * 分类名称 + */ + @TableField("category_name") + private String categoryName; + + @TableField("tran_type") + private String tranType; +} diff --git a/src/main/java/com/mini/mybigscreen/biz/mapper/ErpCategoryMapper.java b/src/main/java/com/mini/mybigscreen/biz/mapper/ErpCategoryMapper.java new file mode 100644 index 0000000..bbb7a58 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/mapper/ErpCategoryMapper.java @@ -0,0 +1,16 @@ +package com.mini.mybigscreen.biz.mapper; + +import com.mini.mybigscreen.biz.domain.ErpCategory; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 收支分类 Mapper 接口 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +public interface ErpCategoryMapper extends BaseMapper { + +} diff --git a/src/main/java/com/mini/mybigscreen/biz/mapper/ErpTransactionFlowMapper.java b/src/main/java/com/mini/mybigscreen/biz/mapper/ErpTransactionFlowMapper.java new file mode 100644 index 0000000..111daaa --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/mapper/ErpTransactionFlowMapper.java @@ -0,0 +1,16 @@ +package com.mini.mybigscreen.biz.mapper; + +import com.mini.mybigscreen.biz.domain.ErpTransactionFlow; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 收支流水总表 Mapper 接口 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +public interface ErpTransactionFlowMapper extends BaseMapper { + +} diff --git a/src/main/java/com/mini/mybigscreen/biz/service/ErpCategoryService.java b/src/main/java/com/mini/mybigscreen/biz/service/ErpCategoryService.java new file mode 100644 index 0000000..f827f09 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/service/ErpCategoryService.java @@ -0,0 +1,16 @@ +package com.mini.mybigscreen.biz.service; + +import com.mini.mybigscreen.biz.domain.ErpCategory; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 收支分类 服务类 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +public interface ErpCategoryService extends IService { + +} diff --git a/src/main/java/com/mini/mybigscreen/biz/service/ErpTransactionFlowService.java b/src/main/java/com/mini/mybigscreen/biz/service/ErpTransactionFlowService.java new file mode 100644 index 0000000..fa61d92 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/service/ErpTransactionFlowService.java @@ -0,0 +1,16 @@ +package com.mini.mybigscreen.biz.service; + +import com.mini.mybigscreen.biz.domain.ErpTransactionFlow; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 收支流水总表 服务类 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +public interface ErpTransactionFlowService extends IService { + +} diff --git a/src/main/java/com/mini/mybigscreen/biz/service/impl/ErpCategoryServiceImpl.java b/src/main/java/com/mini/mybigscreen/biz/service/impl/ErpCategoryServiceImpl.java new file mode 100644 index 0000000..eb03275 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/service/impl/ErpCategoryServiceImpl.java @@ -0,0 +1,20 @@ +package com.mini.mybigscreen.biz.service.impl; + +import com.mini.mybigscreen.biz.domain.ErpCategory; +import com.mini.mybigscreen.biz.mapper.ErpCategoryMapper; +import com.mini.mybigscreen.biz.service.ErpCategoryService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 收支分类 服务实现类 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +@Service +public class ErpCategoryServiceImpl extends ServiceImpl implements ErpCategoryService { + +} diff --git a/src/main/java/com/mini/mybigscreen/biz/service/impl/ErpTransactionFlowServiceImpl.java b/src/main/java/com/mini/mybigscreen/biz/service/impl/ErpTransactionFlowServiceImpl.java new file mode 100644 index 0000000..4afb025 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/biz/service/impl/ErpTransactionFlowServiceImpl.java @@ -0,0 +1,20 @@ +package com.mini.mybigscreen.biz.service.impl; + +import com.mini.mybigscreen.biz.domain.ErpTransactionFlow; +import com.mini.mybigscreen.biz.mapper.ErpTransactionFlowMapper; +import com.mini.mybigscreen.biz.service.ErpTransactionFlowService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 收支流水总表 服务实现类 + *

+ * + * @author gaoxq + * @since 2026-02-27 + */ +@Service +public class ErpTransactionFlowServiceImpl extends ServiceImpl implements ErpTransactionFlowService { + +} diff --git a/src/main/java/com/mini/mybigscreen/mybatis/demo.java b/src/main/java/com/mini/mybigscreen/mybatis/demo.java index 7ec6951..ab07076 100644 --- a/src/main/java/com/mini/mybigscreen/mybatis/demo.java +++ b/src/main/java/com/mini/mybigscreen/mybatis/demo.java @@ -29,7 +29,7 @@ public class demo { .pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper")); }) .strategyConfig(builder -> { - builder.addInclude("biz_home_user") + builder.addInclude("erp_category") .addTablePrefix("biz_") .entityBuilder() .enableLombok() diff --git a/src/main/java/com/mini/mybigscreen/utils/PageUtil.java b/src/main/java/com/mini/mybigscreen/utils/PageUtil.java new file mode 100644 index 0000000..e4a3b41 --- /dev/null +++ b/src/main/java/com/mini/mybigscreen/utils/PageUtil.java @@ -0,0 +1,45 @@ +package com.mini.mybigscreen.utils; + + +import java.util.ArrayList; +import java.util.List; + +public class PageUtil { + + + private List data; + private Integer curPage;// 当前页 + private int totalCount;// 总条数 + private int pageSize; // 每页显示的条数 + + //构造数据 + public PageUtil(int curPage, int pageSize, List data) { + this.data = data; + this.curPage = curPage; + this.pageSize = pageSize; + this.totalCount = data.size(); + } + + //求当前页的第一条数据的索引 + public int beginIndex(int pageSize, int curPage) { + Integer begin = pageSize * (curPage - 1); + return begin; + } + + //求当前页的最后一条数据的索引 + public int endIndex(int pageSize, int curPage) { + Integer end = (pageSize * curPage) - 1; + return end; + } + + //拿到分页后的数据 + public List OkData() { + List list = new ArrayList(); + for (int i = beginIndex(pageSize, curPage); i <= endIndex(pageSize, curPage); i++) { + if (i < totalCount) { + list.add(data.get(i)); + } + } + return list; + } +} diff --git a/src/main/resources/mapper/ErpCategoryMapper.xml b/src/main/resources/mapper/ErpCategoryMapper.xml new file mode 100644 index 0000000..a314cce --- /dev/null +++ b/src/main/resources/mapper/ErpCategoryMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + create_time, category_id, category_name, category_type, parent_id, sort_order, is_active, update_time, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state + + + diff --git a/src/main/resources/mapper/ErpTransactionFlowMapper.xml b/src/main/resources/mapper/ErpTransactionFlowMapper.xml new file mode 100644 index 0000000..01ef012 --- /dev/null +++ b/src/main/resources/mapper/ErpTransactionFlowMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + create_time, flow_id, flow_name, transaction_type, amount, transaction_time, account_id, category_id, remark, is_finish, update_time, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state + + +