From f6c0619742846703a95fad82dfbac06ecaec46cc Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Thu, 16 Feb 2023 07:52:37 +0000
Subject: [PATCH] Merge branch 'master' of http://192.168.1.110:5678/r/pms-upgrade into weicd
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java | 47 +
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowQueryCriteria.java | 38
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java | 4
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowServiceImpl.java | 163 ++++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeQueryCriteria.java | 37
eladmin-web-master/src/api/capitalFlow/capitalFlowExpend.js | 35
eladmin-web-master/src/api/capitalFlow/capitalFlow.js | 35
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowIncomeRepository.java | 47 +
eladmin-web-master/src/utils/constant.js | 23
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowService.java | 83 ++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowIncomeServiceImpl.java | 145 +++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java | 4
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowRepository.java | 28
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowDto.java | 64 +
eladmin-web-master/src/views/capitalFlow/capitalFlowIncome/index.vue | 162 ++++
eladmin-web-master/src/views/capitalFlow/capitalFlowExpend/index.vue | 162 ++++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlow.java | 63 +
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowExpendController.java | 95 ++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowIncome.java | 69 +
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowIncomeController.java | 95 ++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java | 14
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowController.java | 95 ++
eladmin-web-master/src/views/capitalFlow/capitalFlow/index.vue | 182 ++++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowExpendServiceImpl.java | 146 +++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowIncomeService.java | 83 ++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeDto.java | 51 +
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowExpendService.java | 83 ++
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowExpend.java | 69 +
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendQueryCriteria.java | 37
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowMapper.java | 32
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowExpendMapper.java | 32
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendDto.java | 51 +
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowIncomeMapper.java | 32
eladmin-web-master/src/api/capitalFlow/capitalFlowIncome.js | 35
34 files changed, 2,336 insertions(+), 5 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlow.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlow.java
new file mode 100644
index 0000000..c44b615
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlow.java
@@ -0,0 +1,63 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.domain;
+
+import lombok.Data;
+import cn.hutool.core.bean.BeanUtil;
+import io.swagger.annotations.ApiModelProperty;
+import cn.hutool.core.bean.copier.CopyOptions;
+import me.zhengjie.base.BaseEntity;
+
+import javax.persistence.*;
+import javax.validation.constraints.*;
+import java.sql.Timestamp;
+import java.io.Serializable;
+
+/**
+* @website https://eladmin.vip
+* @description /
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Entity
+@Data
+@Table(name="capital_flow")
+public class CapitalFlow extends BaseEntity implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "`id`")
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @Column(name = "`flow_year_month`",nullable = false)
+ @NotNull
+ @ApiModelProperty(value = "流水年月")
+ private Timestamp flowYearMonth;
+
+ @Column(name = "`company_id`",nullable = false)
+ @NotNull
+ @ApiModelProperty(value = "所属公司")
+ private Long companyId;
+
+ @Column(name = "`remarks`")
+ @ApiModelProperty(value = "备注")
+ private String remarks;
+
+ public void copy(CapitalFlow source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowExpend.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowExpend.java
new file mode 100644
index 0000000..c26a271
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowExpend.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.domain;
+
+import lombok.Data;
+import cn.hutool.core.bean.BeanUtil;
+import io.swagger.annotations.ApiModelProperty;
+import cn.hutool.core.bean.copier.CopyOptions;
+import me.zhengjie.base.BaseEntity;
+
+import javax.persistence.*;
+import javax.validation.constraints.*;
+import java.sql.Timestamp;
+import java.math.BigDecimal;
+import java.io.Serializable;
+
+/**
+* @website https://eladmin.vip
+* @description /
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Entity
+@Data
+@Table(name="capital_flow_expend")
+public class CapitalFlowExpend extends BaseEntity implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "`id`")
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @Column(name = "`flow_id`",nullable = false)
+ @NotNull
+ @ApiModelProperty(value = "所属流水")
+ private Long flowId;
+
+ @Column(name = "`title`",nullable = false)
+ @NotBlank
+ @ApiModelProperty(value = "标题")
+ private String title;
+
+ @Column(name = "`amount`",nullable = false)
+ @NotNull
+ @ApiModelProperty(value = "金额")
+ private BigDecimal amount;
+
+ @Column(name = "`remarks`")
+ @ApiModelProperty(value = "备注")
+ private String remarks;
+
+ public void copy(CapitalFlowExpend source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowIncome.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowIncome.java
new file mode 100644
index 0000000..a9f86f9
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/domain/CapitalFlowIncome.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.domain;
+
+import lombok.Data;
+import cn.hutool.core.bean.BeanUtil;
+import io.swagger.annotations.ApiModelProperty;
+import cn.hutool.core.bean.copier.CopyOptions;
+import me.zhengjie.base.BaseEntity;
+
+import javax.persistence.*;
+import javax.validation.constraints.*;
+import java.sql.Timestamp;
+import java.math.BigDecimal;
+import java.io.Serializable;
+
+/**
+* @website https://eladmin.vip
+* @description /
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Entity
+@Data
+@Table(name="capital_flow_income")
+public class CapitalFlowIncome extends BaseEntity implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "`id`")
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @Column(name = "`flow_id`",nullable = false)
+ @NotNull
+ @ApiModelProperty(value = "所属流水")
+ private Long flowId;
+
+ @Column(name = "`title`",nullable = false)
+ @NotBlank
+ @ApiModelProperty(value = "标题")
+ private String title;
+
+ @Column(name = "`amount`",nullable = false)
+ @NotNull
+ @ApiModelProperty(value = "金额")
+ private BigDecimal amount;
+
+ @Column(name = "`remarks`")
+ @ApiModelProperty(value = "备注")
+ private String remarks;
+
+ public void copy(CapitalFlowIncome source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java
new file mode 100644
index 0000000..b77b839
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java
@@ -0,0 +1,47 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.repository;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import org.apache.poi.hpsf.Decimal;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+public interface CapitalFlowExpendRepository extends JpaRepository<CapitalFlowExpend, Long>, JpaSpecificationExecutor<CapitalFlowExpend> {
+
+ /**
+ * 根据流水ID查询
+ * @param flowId
+ * @return
+ */
+ List<CapitalFlowExpend> findByFlowId(Long flowId);
+
+ /**
+ * 根据流水ID查询金额总和
+ * @return
+ */
+ @Query(value = "SELECT SUM(amount) FROM capital_flow_expend WHERE flow_id = ?1", nativeQuery = true)
+ BigDecimal sumAmountByFlowId(Long flowId);
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowIncomeRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowIncomeRepository.java
new file mode 100644
index 0000000..14b26fa
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowIncomeRepository.java
@@ -0,0 +1,47 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.repository;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import org.apache.poi.hpsf.Decimal;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+public interface CapitalFlowIncomeRepository extends JpaRepository<CapitalFlowIncome, Long>, JpaSpecificationExecutor<CapitalFlowIncome> {
+
+ /**
+ * 根据流水ID查询
+ * @param flowId
+ * @return
+ */
+ List<CapitalFlowIncome> findByFlowId(Long flowId);
+
+ /**
+ * 根据流水ID查询金额总和
+ * @return
+ */
+ @Query(value = "SELECT SUM(amount) FROM capital_flow_income WHERE flow_id = ?1", nativeQuery = true)
+ BigDecimal sumAmountByFlowId(Long flowId);
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowRepository.java
new file mode 100644
index 0000000..db8abee
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowRepository.java
@@ -0,0 +1,28 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.repository;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlow;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+public interface CapitalFlowRepository extends JpaRepository<CapitalFlow, Long>, JpaSpecificationExecutor<CapitalFlow> {
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowController.java
new file mode 100644
index 0000000..9b42ace
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowController.java
@@ -0,0 +1,95 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.rest;
+
+import me.zhengjie.annotation.Log;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlow;
+import me.zhengjie.modules.capitalFlow.service.CapitalFlowService;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import io.swagger.annotations.*;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "资金流水管理")
+@RequestMapping("/api/capitalFlow")
+public class CapitalFlowController {
+
+ private final CapitalFlowService capitalFlowService;
+
+ @Log("导出数据")
+ @ApiOperation("导出数据")
+ @GetMapping(value = "/download")
+ @PreAuthorize("@el.check('capitalFlow:download')")
+ public void exportCapitalFlow(HttpServletResponse response, CapitalFlowQueryCriteria criteria) throws IOException {
+ capitalFlowService.download(capitalFlowService.queryAll(criteria), response);
+ }
+
+ @GetMapping
+ @Log("查询资金流水")
+ @ApiOperation("查询资金流水")
+ @PreAuthorize("@el.check('capitalFlow:list')")
+ public ResponseEntity<Object> queryCapitalFlow(CapitalFlowQueryCriteria criteria, Pageable pageable){
+ return new ResponseEntity<>(capitalFlowService.queryAll(criteria,pageable),HttpStatus.OK);
+ }
+
+ @GetMapping(value = "/all")
+ @Log("查询资金流水")
+ @ApiOperation("查询资金流水")
+ @PreAuthorize("@el.check('capitalFlow:list')")
+ public ResponseEntity<Object> queryCapitalFlow(CapitalFlowQueryCriteria criteria){
+ return new ResponseEntity<>(capitalFlowService.queryAll(criteria),HttpStatus.OK);
+ }
+
+ @PostMapping
+ @Log("新增资金流水")
+ @ApiOperation("新增资金流水")
+ @PreAuthorize("@el.check('capitalFlow:add')")
+ public ResponseEntity<Object> createCapitalFlow(@Validated @RequestBody CapitalFlow resources){
+ return new ResponseEntity<>(capitalFlowService.create(resources),HttpStatus.CREATED);
+ }
+
+ @PutMapping
+ @Log("修改资金流水")
+ @ApiOperation("修改资金流水")
+ @PreAuthorize("@el.check('capitalFlow:edit')")
+ public ResponseEntity<Object> updateCapitalFlow(@Validated @RequestBody CapitalFlow resources){
+ capitalFlowService.update(resources);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @DeleteMapping
+ @Log("删除资金流水")
+ @ApiOperation("删除资金流水")
+ @PreAuthorize("@el.check('capitalFlow:del')")
+ public ResponseEntity<Object> deleteCapitalFlow(@RequestBody Long[] ids) {
+ capitalFlowService.deleteAll(ids);
+ return new ResponseEntity<>(HttpStatus.OK);
+ }
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowExpendController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowExpendController.java
new file mode 100644
index 0000000..c791258
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowExpendController.java
@@ -0,0 +1,95 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.rest;
+
+import me.zhengjie.annotation.Log;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import me.zhengjie.modules.capitalFlow.service.CapitalFlowExpendService;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowExpendQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import io.swagger.annotations.*;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "资金流水支出管理")
+@RequestMapping("/api/capitalFlowExpend")
+public class CapitalFlowExpendController {
+
+ private final CapitalFlowExpendService capitalFlowExpendService;
+
+ @Log("导出数据")
+ @ApiOperation("导出数据")
+ @GetMapping(value = "/download")
+ @PreAuthorize("@el.check('capitalFlowExpend:download')")
+ public void exportCapitalFlowExpend(HttpServletResponse response, CapitalFlowExpendQueryCriteria criteria) throws IOException {
+ capitalFlowExpendService.download(capitalFlowExpendService.queryAll(criteria), response);
+ }
+
+ @GetMapping
+ @Log("查询资金流水支出")
+ @ApiOperation("查询资金流水支出")
+ @PreAuthorize("@el.check('capitalFlowExpend:list')")
+ public ResponseEntity<Object> queryCapitalFlowExpend(CapitalFlowExpendQueryCriteria criteria, Pageable pageable){
+ return new ResponseEntity<>(capitalFlowExpendService.queryAll(criteria,pageable),HttpStatus.OK);
+ }
+
+ @GetMapping(value = "/all")
+ @Log("查询资金流水支出")
+ @ApiOperation("查询资金流水支出")
+ @PreAuthorize("@el.check('capitalFlowExpend:list')")
+ public ResponseEntity<Object> queryCapitalFlowExpend(CapitalFlowExpendQueryCriteria criteria){
+ return new ResponseEntity<>(capitalFlowExpendService.queryAll(criteria),HttpStatus.OK);
+ }
+
+ @PostMapping
+ @Log("新增资金流水支出")
+ @ApiOperation("新增资金流水支出")
+ @PreAuthorize("@el.check('capitalFlowExpend:add')")
+ public ResponseEntity<Object> createCapitalFlowExpend(@Validated @RequestBody CapitalFlowExpend resources){
+ return new ResponseEntity<>(capitalFlowExpendService.create(resources),HttpStatus.CREATED);
+ }
+
+ @PutMapping
+ @Log("修改资金流水支出")
+ @ApiOperation("修改资金流水支出")
+ @PreAuthorize("@el.check('capitalFlowExpend:edit')")
+ public ResponseEntity<Object> updateCapitalFlowExpend(@Validated @RequestBody CapitalFlowExpend resources){
+ capitalFlowExpendService.update(resources);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @DeleteMapping
+ @Log("删除资金流水支出")
+ @ApiOperation("删除资金流水支出")
+ @PreAuthorize("@el.check('capitalFlowExpend:del')")
+ public ResponseEntity<Object> deleteCapitalFlowExpend(@RequestBody Long[] ids) {
+ capitalFlowExpendService.deleteAll(ids);
+ return new ResponseEntity<>(HttpStatus.OK);
+ }
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowIncomeController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowIncomeController.java
new file mode 100644
index 0000000..b4f62e6
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/rest/CapitalFlowIncomeController.java
@@ -0,0 +1,95 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.rest;
+
+import me.zhengjie.annotation.Log;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import me.zhengjie.modules.capitalFlow.service.CapitalFlowIncomeService;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowIncomeQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import io.swagger.annotations.*;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@RestController
+@RequiredArgsConstructor
+@Api(tags = "资金流水收入管理")
+@RequestMapping("/api/capitalFlowIncome")
+public class CapitalFlowIncomeController {
+
+ private final CapitalFlowIncomeService capitalFlowIncomeService;
+
+ @Log("导出数据")
+ @ApiOperation("导出数据")
+ @GetMapping(value = "/download")
+ @PreAuthorize("@el.check('capitalFlowIncome:download')")
+ public void exportCapitalFlowIncome(HttpServletResponse response, CapitalFlowIncomeQueryCriteria criteria) throws IOException {
+ capitalFlowIncomeService.download(capitalFlowIncomeService.queryAll(criteria), response);
+ }
+
+ @GetMapping
+ @Log("查询资金流水收入")
+ @ApiOperation("查询资金流水收入")
+ @PreAuthorize("@el.check('capitalFlowIncome:list')")
+ public ResponseEntity<Object> queryCapitalFlowIncome(CapitalFlowIncomeQueryCriteria criteria, Pageable pageable){
+ return new ResponseEntity<>(capitalFlowIncomeService.queryAll(criteria,pageable),HttpStatus.OK);
+ }
+
+ @GetMapping(value = "/all")
+ @Log("查询资金流水收入")
+ @ApiOperation("查询资金流水收入")
+ @PreAuthorize("@el.check('capitalFlowIncome:list')")
+ public ResponseEntity<Object> queryCapitalFlowIncome(CapitalFlowIncomeQueryCriteria criteria){
+ return new ResponseEntity<>(capitalFlowIncomeService.queryAll(criteria),HttpStatus.OK);
+ }
+
+ @PostMapping
+ @Log("新增资金流水收入")
+ @ApiOperation("新增资金流水收入")
+ @PreAuthorize("@el.check('capitalFlowIncome:add')")
+ public ResponseEntity<Object> createCapitalFlowIncome(@Validated @RequestBody CapitalFlowIncome resources){
+ return new ResponseEntity<>(capitalFlowIncomeService.create(resources),HttpStatus.CREATED);
+ }
+
+ @PutMapping
+ @Log("修改资金流水收入")
+ @ApiOperation("修改资金流水收入")
+ @PreAuthorize("@el.check('capitalFlowIncome:edit')")
+ public ResponseEntity<Object> updateCapitalFlowIncome(@Validated @RequestBody CapitalFlowIncome resources){
+ capitalFlowIncomeService.update(resources);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @DeleteMapping
+ @Log("删除资金流水收入")
+ @ApiOperation("删除资金流水收入")
+ @PreAuthorize("@el.check('capitalFlowIncome:del')")
+ public ResponseEntity<Object> deleteCapitalFlowIncome(@RequestBody Long[] ids) {
+ capitalFlowIncomeService.deleteAll(ids);
+ return new ResponseEntity<>(HttpStatus.OK);
+ }
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowExpendService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowExpendService.java
new file mode 100644
index 0000000..dd9b55d
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowExpendService.java
@@ -0,0 +1,83 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowExpendDto;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowExpendQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import java.util.Map;
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://eladmin.vip
+* @description 服务接口
+* @author 赵士淞
+* @date 2023-02-13
+**/
+public interface CapitalFlowExpendService {
+
+ /**
+ * 查询数据分页
+ * @param criteria 条件
+ * @param pageable 分页参数
+ * @return Map<String,Object>
+ */
+ Map<String,Object> queryAll(CapitalFlowExpendQueryCriteria criteria, Pageable pageable);
+
+ /**
+ * 查询所有数据不分页
+ * @param criteria 条件参数
+ * @return List<CapitalFlowExpendDto>
+ */
+ List<CapitalFlowExpendDto> queryAll(CapitalFlowExpendQueryCriteria criteria);
+
+ /**
+ * 根据ID查询
+ * @param id ID
+ * @return CapitalFlowExpendDto
+ */
+ CapitalFlowExpendDto findById(Long id);
+
+ /**
+ * 创建
+ * @param resources /
+ * @return CapitalFlowExpendDto
+ */
+ CapitalFlowExpendDto create(CapitalFlowExpend resources);
+
+ /**
+ * 编辑
+ * @param resources /
+ */
+ void update(CapitalFlowExpend resources);
+
+ /**
+ * 多选删除
+ * @param ids /
+ */
+ void deleteAll(Long[] ids);
+
+ /**
+ * 导出数据
+ * @param all 待导出的数据
+ * @param response /
+ * @throws IOException /
+ */
+ void download(List<CapitalFlowExpendDto> all, HttpServletResponse response) throws IOException;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowIncomeService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowIncomeService.java
new file mode 100644
index 0000000..cdf09e8
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowIncomeService.java
@@ -0,0 +1,83 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowIncomeDto;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowIncomeQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import java.util.Map;
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://eladmin.vip
+* @description 服务接口
+* @author 赵士淞
+* @date 2023-02-13
+**/
+public interface CapitalFlowIncomeService {
+
+ /**
+ * 查询数据分页
+ * @param criteria 条件
+ * @param pageable 分页参数
+ * @return Map<String,Object>
+ */
+ Map<String,Object> queryAll(CapitalFlowIncomeQueryCriteria criteria, Pageable pageable);
+
+ /**
+ * 查询所有数据不分页
+ * @param criteria 条件参数
+ * @return List<CapitalFlowIncomeDto>
+ */
+ List<CapitalFlowIncomeDto> queryAll(CapitalFlowIncomeQueryCriteria criteria);
+
+ /**
+ * 根据ID查询
+ * @param id ID
+ * @return CapitalFlowIncomeDto
+ */
+ CapitalFlowIncomeDto findById(Long id);
+
+ /**
+ * 创建
+ * @param resources /
+ * @return CapitalFlowIncomeDto
+ */
+ CapitalFlowIncomeDto create(CapitalFlowIncome resources);
+
+ /**
+ * 编辑
+ * @param resources /
+ */
+ void update(CapitalFlowIncome resources);
+
+ /**
+ * 多选删除
+ * @param ids /
+ */
+ void deleteAll(Long[] ids);
+
+ /**
+ * 导出数据
+ * @param all 待导出的数据
+ * @param response /
+ * @throws IOException /
+ */
+ void download(List<CapitalFlowIncomeDto> all, HttpServletResponse response) throws IOException;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowService.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowService.java
new file mode 100644
index 0000000..7b91335
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/CapitalFlowService.java
@@ -0,0 +1,83 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlow;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowDto;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowQueryCriteria;
+import org.springframework.data.domain.Pageable;
+import java.util.Map;
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @website https://eladmin.vip
+* @description 服务接口
+* @author 赵士淞
+* @date 2023-02-13
+**/
+public interface CapitalFlowService {
+
+ /**
+ * 查询数据分页
+ * @param criteria 条件
+ * @param pageable 分页参数
+ * @return Map<String,Object>
+ */
+ Map<String,Object> queryAll(CapitalFlowQueryCriteria criteria, Pageable pageable);
+
+ /**
+ * 查询所有数据不分页
+ * @param criteria 条件参数
+ * @return List<CapitalFlowDto>
+ */
+ List<CapitalFlowDto> queryAll(CapitalFlowQueryCriteria criteria);
+
+ /**
+ * 根据ID查询
+ * @param id ID
+ * @return CapitalFlowDto
+ */
+ CapitalFlowDto findById(Long id);
+
+ /**
+ * 创建
+ * @param resources /
+ * @return CapitalFlowDto
+ */
+ CapitalFlowDto create(CapitalFlow resources);
+
+ /**
+ * 编辑
+ * @param resources /
+ */
+ void update(CapitalFlow resources);
+
+ /**
+ * 多选删除
+ * @param ids /
+ */
+ void deleteAll(Long[] ids);
+
+ /**
+ * 导出数据
+ * @param all 待导出的数据
+ * @param response /
+ * @throws IOException /
+ */
+ void download(List<CapitalFlowDto> all, HttpServletResponse response) throws IOException;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowDto.java
new file mode 100644
index 0000000..d5a7187
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowDto.java
@@ -0,0 +1,64 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.dto;
+
+import lombok.Data;
+import me.zhengjie.base.BaseDTO;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import org.apache.poi.hpsf.Decimal;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @website https://eladmin.vip
+* @description /
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Data
+public class CapitalFlowDto extends BaseDTO implements Serializable {
+
+ /** ID */
+ private Long id;
+
+ /** 流水年月 */
+ private Timestamp flowYearMonth;
+
+ /** 所属公司 */
+ private Long companyId;
+
+ /** 备注 */
+ private String remarks;
+
+ /** 公司名称 */
+ private String companyName;
+
+ /** 流水支出 */
+ private List<CapitalFlowExpend> capitalFlowExpends;
+
+ /** 流水支出金额 */
+ private BigDecimal capitalFlowExpendsAmount;
+
+ /** 流水收入 */
+ private List<CapitalFlowIncome> capitalFlowIncomes;
+
+ /** 流水收入金额 */
+ private BigDecimal capitalFlowIncomesAmount;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendDto.java
new file mode 100644
index 0000000..815c4e7
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendDto.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.dto;
+
+import lombok.Data;
+import me.zhengjie.base.BaseDTO;
+
+import java.sql.Timestamp;
+import java.math.BigDecimal;
+import java.io.Serializable;
+
+/**
+* @website https://eladmin.vip
+* @description /
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Data
+public class CapitalFlowExpendDto extends BaseDTO implements Serializable {
+
+ /** ID */
+ private Long id;
+
+ /** 所属流水 */
+ private Long flowId;
+
+ /** 标题 */
+ private String title;
+
+ /** 金额 */
+ private BigDecimal amount;
+
+ /** 备注 */
+ private String remarks;
+
+ /** 流水名称 */
+ private String flowName;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendQueryCriteria.java
new file mode 100644
index 0000000..e7e80c9
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowExpendQueryCriteria.java
@@ -0,0 +1,37 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.dto;
+
+import lombok.Data;
+import java.util.List;
+import me.zhengjie.annotation.Query;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Data
+public class CapitalFlowExpendQueryCriteria{
+
+ /** 精确 */
+ @Query
+ private Long flowId;
+
+ /** 模糊 */
+ @Query(type = Query.Type.INNER_LIKE)
+ private String title;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeDto.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeDto.java
new file mode 100644
index 0000000..f17e476
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeDto.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.dto;
+
+import lombok.Data;
+import me.zhengjie.base.BaseDTO;
+
+import java.sql.Timestamp;
+import java.math.BigDecimal;
+import java.io.Serializable;
+
+/**
+* @website https://eladmin.vip
+* @description /
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Data
+public class CapitalFlowIncomeDto extends BaseDTO implements Serializable {
+
+ /** ID */
+ private Long id;
+
+ /** 所属流水 */
+ private Long flowId;
+
+ /** 标题 */
+ private String title;
+
+ /** 金额 */
+ private BigDecimal amount;
+
+ /** 备注 */
+ private String remarks;
+
+ /** 流水名称 */
+ private String flowName;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeQueryCriteria.java
new file mode 100644
index 0000000..571f9ef
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowIncomeQueryCriteria.java
@@ -0,0 +1,37 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.dto;
+
+import lombok.Data;
+import java.util.List;
+import me.zhengjie.annotation.Query;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Data
+public class CapitalFlowIncomeQueryCriteria{
+
+ /** 精确 */
+ @Query
+ private Long flowId;
+
+ /** 模糊 */
+ @Query(type = Query.Type.INNER_LIKE)
+ private String title;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowQueryCriteria.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowQueryCriteria.java
new file mode 100644
index 0000000..127a0e5
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/dto/CapitalFlowQueryCriteria.java
@@ -0,0 +1,38 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.dto;
+
+import lombok.Data;
+import java.sql.Timestamp;
+import java.util.List;
+import me.zhengjie.annotation.Query;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Data
+public class CapitalFlowQueryCriteria{
+
+ /** 精确 */
+ @Query(type = Query.Type.INNER_LIKE)
+ private String flowYearMonth;
+
+ /** 精确 */
+ @Query
+ private Long companyId;
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowExpendServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowExpendServiceImpl.java
new file mode 100644
index 0000000..e4172f4
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowExpendServiceImpl.java
@@ -0,0 +1,146 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.impl;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowDto;
+import me.zhengjie.modules.system.service.dto.SysCompanyDto;
+import me.zhengjie.modules.system.service.impl.SysCompanyServiceImpl;
+import me.zhengjie.utils.ValidationUtil;
+import me.zhengjie.utils.FileUtil;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.modules.capitalFlow.repository.CapitalFlowExpendRepository;
+import me.zhengjie.modules.capitalFlow.service.CapitalFlowExpendService;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowExpendDto;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowExpendQueryCriteria;
+import me.zhengjie.modules.capitalFlow.service.mapstruct.CapitalFlowExpendMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import me.zhengjie.utils.PageUtil;
+import me.zhengjie.utils.QueryHelp;
+
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.function.Function;
+
+/**
+* @website https://eladmin.vip
+* @description 服务实现
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Service
+@RequiredArgsConstructor
+public class CapitalFlowExpendServiceImpl implements CapitalFlowExpendService {
+
+ private final CapitalFlowExpendRepository capitalFlowExpendRepository;
+ private final CapitalFlowExpendMapper capitalFlowExpendMapper;
+ private final CapitalFlowServiceImpl capitalFlowServiceImpl;
+ private final SysCompanyServiceImpl sysCompanyServiceImpl;
+
+ @Override
+ public Map<String,Object> queryAll(CapitalFlowExpendQueryCriteria criteria, Pageable pageable){
+ Page<CapitalFlowExpend> page = capitalFlowExpendRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
+ // 将实体类转换为DTO(重写)
+ Function<CapitalFlowExpend, CapitalFlowExpendDto> func = new Function<CapitalFlowExpend, CapitalFlowExpendDto>(){
+ @Override
+ public CapitalFlowExpendDto apply(CapitalFlowExpend t) {
+ // 将实体类转换成DTO
+ CapitalFlowExpendDto capitalFlowExpendDto = capitalFlowExpendMapper.toDto(t);
+ // 流水名称
+ capitalFlowExpendDto.setFlowName(flowName(t));
+ // 返回处理好的DTO
+ return capitalFlowExpendDto;
+ }
+ };
+ return PageUtil.toPage(page.map(func));
+ }
+
+ @Override
+ public List<CapitalFlowExpendDto> queryAll(CapitalFlowExpendQueryCriteria criteria){
+ return capitalFlowExpendMapper.toDto(capitalFlowExpendRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
+ }
+
+ @Override
+ @Transactional
+ public CapitalFlowExpendDto findById(Long id) {
+ CapitalFlowExpend capitalFlowExpend = capitalFlowExpendRepository.findById(id).orElseGet(CapitalFlowExpend::new);
+ ValidationUtil.isNull(capitalFlowExpend.getId(),"CapitalFlowExpend","id",id);
+ return capitalFlowExpendMapper.toDto(capitalFlowExpend);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public CapitalFlowExpendDto create(CapitalFlowExpend resources) {
+ return capitalFlowExpendMapper.toDto(capitalFlowExpendRepository.save(resources));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(CapitalFlowExpend resources) {
+ CapitalFlowExpend capitalFlowExpend = capitalFlowExpendRepository.findById(resources.getId()).orElseGet(CapitalFlowExpend::new);
+ ValidationUtil.isNull( capitalFlowExpend.getId(),"CapitalFlowExpend","id",resources.getId());
+ capitalFlowExpend.copy(resources);
+ capitalFlowExpendRepository.save(capitalFlowExpend);
+ }
+
+ @Override
+ public void deleteAll(Long[] ids) {
+ for (Long id : ids) {
+ capitalFlowExpendRepository.deleteById(id);
+ }
+ }
+
+ @Override
+ public void download(List<CapitalFlowExpendDto> all, HttpServletResponse response) throws IOException {
+ List<Map<String, Object>> list = new ArrayList<>();
+ for (CapitalFlowExpendDto capitalFlowExpend : all) {
+ String flowName = flowName(capitalFlowExpendMapper.toEntity(capitalFlowExpend));
+ Map<String,Object> map = new LinkedHashMap<>();
+ map.put("所属流水", flowName);
+ map.put("标题", capitalFlowExpend.getTitle());
+ map.put("金额", capitalFlowExpend.getAmount());
+ map.put("备注", capitalFlowExpend.getRemarks());
+ map.put("创建者", capitalFlowExpend.getCreateBy());
+ map.put("创建时间", capitalFlowExpend.getCreateTime());
+ map.put("更新者", capitalFlowExpend.getUpdateBy());
+ map.put("更新时间", capitalFlowExpend.getUpdateTime());
+ list.add(map);
+ }
+ FileUtil.downloadExcel(list, response);
+ }
+
+ /**
+ * 流水名称
+ * @param resources
+ * @return
+ */
+ private String flowName(CapitalFlowExpend resources) {
+ // 查询资金流水数据
+ CapitalFlowDto capitalFlowDto = capitalFlowServiceImpl.findById(resources.getFlowId());
+ // 查询公司数据
+ SysCompanyDto sysCompanyDto = sysCompanyServiceImpl.findById(capitalFlowDto.getCompanyId());
+ return new SimpleDateFormat("yyyy-MM").format(capitalFlowDto.getFlowYearMonth()) + " - " + sysCompanyDto.getLabel();
+ }
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowIncomeServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowIncomeServiceImpl.java
new file mode 100644
index 0000000..106989d
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowIncomeServiceImpl.java
@@ -0,0 +1,145 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.impl;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowDto;
+import me.zhengjie.modules.system.service.dto.SysCompanyDto;
+import me.zhengjie.modules.system.service.impl.SysCompanyServiceImpl;
+import me.zhengjie.utils.ValidationUtil;
+import me.zhengjie.utils.FileUtil;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.modules.capitalFlow.repository.CapitalFlowIncomeRepository;
+import me.zhengjie.modules.capitalFlow.service.CapitalFlowIncomeService;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowIncomeDto;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowIncomeQueryCriteria;
+import me.zhengjie.modules.capitalFlow.service.mapstruct.CapitalFlowIncomeMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import me.zhengjie.utils.PageUtil;
+import me.zhengjie.utils.QueryHelp;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.function.Function;
+
+/**
+* @website https://eladmin.vip
+* @description 服务实现
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Service
+@RequiredArgsConstructor
+public class CapitalFlowIncomeServiceImpl implements CapitalFlowIncomeService {
+
+ private final CapitalFlowIncomeRepository capitalFlowIncomeRepository;
+ private final CapitalFlowIncomeMapper capitalFlowIncomeMapper;
+ private final CapitalFlowServiceImpl capitalFlowServiceImpl;
+ private final SysCompanyServiceImpl sysCompanyServiceImpl;
+
+ @Override
+ public Map<String,Object> queryAll(CapitalFlowIncomeQueryCriteria criteria, Pageable pageable){
+ Page<CapitalFlowIncome> page = capitalFlowIncomeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
+ // 将实体类转换为DTO(重写)
+ Function<CapitalFlowIncome, CapitalFlowIncomeDto> func = new Function<CapitalFlowIncome, CapitalFlowIncomeDto>(){
+ @Override
+ public CapitalFlowIncomeDto apply(CapitalFlowIncome t) {
+ // 将实体类转换成DTO
+ CapitalFlowIncomeDto capitalFlowIncomeDto = capitalFlowIncomeMapper.toDto(t);
+ // 流水名称
+ capitalFlowIncomeDto.setFlowName(flowName(t));
+ // 返回处理好的DTO
+ return capitalFlowIncomeDto;
+ }
+ };
+ return PageUtil.toPage(page.map(func));
+ }
+
+ @Override
+ public List<CapitalFlowIncomeDto> queryAll(CapitalFlowIncomeQueryCriteria criteria){
+ return capitalFlowIncomeMapper.toDto(capitalFlowIncomeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
+ }
+
+ @Override
+ @Transactional
+ public CapitalFlowIncomeDto findById(Long id) {
+ CapitalFlowIncome capitalFlowIncome = capitalFlowIncomeRepository.findById(id).orElseGet(CapitalFlowIncome::new);
+ ValidationUtil.isNull(capitalFlowIncome.getId(),"CapitalFlowIncome","id",id);
+ return capitalFlowIncomeMapper.toDto(capitalFlowIncome);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public CapitalFlowIncomeDto create(CapitalFlowIncome resources) {
+ return capitalFlowIncomeMapper.toDto(capitalFlowIncomeRepository.save(resources));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(CapitalFlowIncome resources) {
+ CapitalFlowIncome capitalFlowIncome = capitalFlowIncomeRepository.findById(resources.getId()).orElseGet(CapitalFlowIncome::new);
+ ValidationUtil.isNull( capitalFlowIncome.getId(),"CapitalFlowIncome","id",resources.getId());
+ capitalFlowIncome.copy(resources);
+ capitalFlowIncomeRepository.save(capitalFlowIncome);
+ }
+
+ @Override
+ public void deleteAll(Long[] ids) {
+ for (Long id : ids) {
+ capitalFlowIncomeRepository.deleteById(id);
+ }
+ }
+
+ @Override
+ public void download(List<CapitalFlowIncomeDto> all, HttpServletResponse response) throws IOException {
+ List<Map<String, Object>> list = new ArrayList<>();
+ for (CapitalFlowIncomeDto capitalFlowIncome : all) {
+ String flowName = flowName(capitalFlowIncomeMapper.toEntity(capitalFlowIncome));
+ Map<String,Object> map = new LinkedHashMap<>();
+ map.put("所属流水", flowName);
+ map.put("标题", capitalFlowIncome.getTitle());
+ map.put("金额", capitalFlowIncome.getAmount());
+ map.put("备注", capitalFlowIncome.getRemarks());
+ map.put("创建者", capitalFlowIncome.getCreateBy());
+ map.put("创建时间", capitalFlowIncome.getCreateTime());
+ map.put("更新者", capitalFlowIncome.getUpdateBy());
+ map.put("更新时间", capitalFlowIncome.getUpdateTime());
+ list.add(map);
+ }
+ FileUtil.downloadExcel(list, response);
+ }
+
+ /**
+ * 流水名称
+ * @param resources
+ * @return
+ */
+ private String flowName(CapitalFlowIncome resources) {
+ // 查询资金流水数据
+ CapitalFlowDto capitalFlowDto = capitalFlowServiceImpl.findById(resources.getFlowId());
+ // 查询公司数据
+ SysCompanyDto sysCompanyDto = sysCompanyServiceImpl.findById(capitalFlowDto.getCompanyId());
+ return new SimpleDateFormat("yyyy-MM").format(capitalFlowDto.getFlowYearMonth()) + " - " + sysCompanyDto.getLabel();
+ }
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowServiceImpl.java
new file mode 100644
index 0000000..a1aa79c
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/impl/CapitalFlowServiceImpl.java
@@ -0,0 +1,163 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.impl;
+
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlow;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import me.zhengjie.modules.capitalFlow.repository.CapitalFlowExpendRepository;
+import me.zhengjie.modules.capitalFlow.repository.CapitalFlowIncomeRepository;
+import me.zhengjie.modules.system.service.dto.SysCompanyDto;
+import me.zhengjie.modules.system.service.impl.SysCompanyServiceImpl;
+import me.zhengjie.utils.*;
+import lombok.RequiredArgsConstructor;
+import me.zhengjie.modules.capitalFlow.repository.CapitalFlowRepository;
+import me.zhengjie.modules.capitalFlow.service.CapitalFlowService;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowDto;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowQueryCriteria;
+import me.zhengjie.modules.capitalFlow.service.mapstruct.CapitalFlowMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.function.Function;
+
+/**
+* @website https://eladmin.vip
+* @description 服务实现
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Service
+@RequiredArgsConstructor
+public class CapitalFlowServiceImpl implements CapitalFlowService {
+
+ private final CapitalFlowRepository capitalFlowRepository;
+ private final CapitalFlowMapper capitalFlowMapper;
+ private final SysCompanyServiceImpl sysCompanyServiceImpl;
+ private final CapitalFlowExpendRepository capitalFlowExpendRepository;
+ private final CapitalFlowIncomeRepository capitalFlowIncomeRepository;
+
+ @Override
+ public Map<String,Object> queryAll(CapitalFlowQueryCriteria criteria, Pageable pageable){
+ // 判断资金流水查询类流水年月是否为空
+ if (criteria.getFlowYearMonth() != null && !"".equals(criteria.getFlowYearMonth())) {
+ // 流水年月:国际时间转中国时间
+ criteria.setFlowYearMonth(DateUtil.internationalTimeToChinaTime(criteria.getFlowYearMonth()));
+ }
+ Page<CapitalFlow> page = capitalFlowRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
+ // 将实体类转换为DTO(重写)
+ Function<CapitalFlow, CapitalFlowDto> func = new Function<CapitalFlow, CapitalFlowDto>(){
+ @Override
+ public CapitalFlowDto apply(CapitalFlow t) {
+ // 将实体类转换成DTO
+ CapitalFlowDto capitalFlowDto = capitalFlowMapper.toDto(t);
+ // 公司名称
+ capitalFlowDto.setCompanyName(companyName(t));
+ // 流水支出
+ capitalFlowDto.setCapitalFlowExpends(capitalFlowExpendRepository.findByFlowId(t.getId()));
+ // 流水支出金额
+ capitalFlowDto.setCapitalFlowExpendsAmount(capitalFlowExpendRepository.sumAmountByFlowId(t.getId()));
+ // 流水收入
+ capitalFlowDto.setCapitalFlowIncomes(capitalFlowIncomeRepository.findByFlowId(t.getId()));
+ // 流水收入金额
+ capitalFlowDto.setCapitalFlowIncomesAmount(capitalFlowIncomeRepository.sumAmountByFlowId(t.getId()));
+ // 返回处理好的DTO
+ return capitalFlowDto;
+ }
+ };
+ return PageUtil.toPage(page.map(func));
+ }
+
+ @Override
+ public List<CapitalFlowDto> queryAll(CapitalFlowQueryCriteria criteria){
+ List<CapitalFlowDto> capitalFlowDtoList = capitalFlowMapper.toDto(capitalFlowRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
+ // 循环资金流水列表
+ for (int i = 0; i < capitalFlowDtoList.size(); i ++) {
+ // 资金流水
+ CapitalFlowDto capitalFlowDto = capitalFlowDtoList.get(i);
+ // DTO赋值
+ capitalFlowDto.setCompanyName(companyName(capitalFlowMapper.toEntity(capitalFlowDto)));
+ }
+ return capitalFlowDtoList;
+ }
+
+ @Override
+ @Transactional
+ public CapitalFlowDto findById(Long id) {
+ CapitalFlow capitalFlow = capitalFlowRepository.findById(id).orElseGet(CapitalFlow::new);
+ ValidationUtil.isNull(capitalFlow.getId(),"CapitalFlow","id",id);
+ return capitalFlowMapper.toDto(capitalFlow);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public CapitalFlowDto create(CapitalFlow resources) {
+ return capitalFlowMapper.toDto(capitalFlowRepository.save(resources));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(CapitalFlow resources) {
+ CapitalFlow capitalFlow = capitalFlowRepository.findById(resources.getId()).orElseGet(CapitalFlow::new);
+ ValidationUtil.isNull( capitalFlow.getId(),"CapitalFlow","id",resources.getId());
+ capitalFlow.copy(resources);
+ capitalFlowRepository.save(capitalFlow);
+ }
+
+ @Override
+ public void deleteAll(Long[] ids) {
+ for (Long id : ids) {
+ capitalFlowRepository.deleteById(id);
+ }
+ }
+
+ @Override
+ public void download(List<CapitalFlowDto> all, HttpServletResponse response) throws IOException {
+ List<Map<String, Object>> list = new ArrayList<>();
+ for (CapitalFlowDto capitalFlow : all) {
+ String companyName = companyName(capitalFlowMapper.toEntity(capitalFlow));
+ Map<String,Object> map = new LinkedHashMap<>();
+ map.put("流水年月", capitalFlow.getFlowYearMonth());
+ map.put("所属公司", companyName);
+ map.put("备注", capitalFlow.getRemarks());
+ map.put("创建者", capitalFlow.getCreateBy());
+ map.put("创建时间", capitalFlow.getCreateTime());
+ map.put("更新者", capitalFlow.getUpdateBy());
+ map.put("更新时间", capitalFlow.getUpdateTime());
+ list.add(map);
+ }
+ FileUtil.downloadExcel(list, response);
+ }
+
+ /**
+ * 公司名称
+ * @param resources
+ * @return
+ */
+ private String companyName(CapitalFlow resources) {
+ // 查询公司数据
+ SysCompanyDto sysCompanyDto = sysCompanyServiceImpl.findById(resources.getCompanyId());
+ return sysCompanyDto.getLabel();
+ }
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowExpendMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowExpendMapper.java
new file mode 100644
index 0000000..76b2415
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowExpendMapper.java
@@ -0,0 +1,32 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.mapstruct;
+
+import me.zhengjie.base.BaseMapper;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowExpend;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowExpendDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface CapitalFlowExpendMapper extends BaseMapper<CapitalFlowExpendDto, CapitalFlowExpend> {
+
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowIncomeMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowIncomeMapper.java
new file mode 100644
index 0000000..4af4fb5
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowIncomeMapper.java
@@ -0,0 +1,32 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.mapstruct;
+
+import me.zhengjie.base.BaseMapper;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlowIncome;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowIncomeDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface CapitalFlowIncomeMapper extends BaseMapper<CapitalFlowIncomeDto, CapitalFlowIncome> {
+
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowMapper.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowMapper.java
new file mode 100644
index 0000000..22959a4
--- /dev/null
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/service/mapstruct/CapitalFlowMapper.java
@@ -0,0 +1,32 @@
+/*
+* Copyright 2019-2020 Zheng Jie
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package me.zhengjie.modules.capitalFlow.service.mapstruct;
+
+import me.zhengjie.base.BaseMapper;
+import me.zhengjie.modules.capitalFlow.domain.CapitalFlow;
+import me.zhengjie.modules.capitalFlow.service.dto.CapitalFlowDto;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+
+/**
+* @website https://eladmin.vip
+* @author 赵士淞
+* @date 2023-02-13
+**/
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
+public interface CapitalFlowMapper extends BaseMapper<CapitalFlowDto, CapitalFlow> {
+
+}
\ No newline at end of file
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
index 8de6454..a15fc84 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/Constant.java
@@ -177,6 +177,10 @@
public static final String TASK_STATUS_NOT_STARTED = "task_status_not_started";
// 任务状态:进行中
public static final String TASK_STATUS_IN_HAND = "task_status_in_hand";
+ // 任务状态:待测试
+ public static final String TASK_STATUS_TEST = "task_status_test";
+ // 任务状态:已暂停
+ public static final String TASK_STATUS_STOP = "task_status_stop";
// 任务状态:已完成
public static final String TASK_STATUS_COMPLETED = "task_status_completed";
@@ -249,6 +253,16 @@
// 合同状态
public static final String CONTRACT_STATUS = "contract_status";
+ // 合同状态: 未开始
+ public static final String CONTRACT_STATUS_NOT_STARTED = "contract_not_started";
+ // 合同状态:进行中
+ public static final String CONTRACT_STATUS_HAVE_HAND = "contract_have_hand";
+ // 合同状态:服务中
+ public static final String CONTRACT_STATUS_IN_SERVICE = "contract_in_service";
+ // 合同状态:已终止
+ public static final String CONTRACT_STATUS_TERMINATED = "contract_terminated";
+ // 合同状态:已结束
+ public static final String CONTRACT_STATUS_IS_OVER = "contract_is_over";
// key iv
public static final String key = "1234567890123456";
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
index 0f708f8..47332ff 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
@@ -74,12 +74,12 @@
Double findSumConsumedWorkloadByProjectIdAndTaskId(Long projectId, Long taskId);
/**
- * 根据项目ID、任务ID查询
+ * 根据项目ID、任务ID、用户ID查询
* @param projectId
* @param taskId
* @return
*/
- List<TaskDaliy> findByProjectIdAndTaskId(Long projectId, Long taskId);
+ List<TaskDaliy> findByProjectIdAndTaskIdAndUserId(Long projectId, Long taskId, Long userId);
/**
* 根据项目ID查询任务日报信息
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java
index bf1149d..8610fd3 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/service/impl/TaskUserServiceImpl.java
@@ -195,8 +195,8 @@
// 根据ID查询
TaskUser taskUser = taskUserRepository.findById(id).orElseGet(TaskUser::new);
ValidationUtil.isNull(taskUser.getId(),"TaskUser","id",id);
- // 根据项目ID、任务ID查询项目日报列表
- List<TaskDaliy> taskDaliyList = taskDaliyRepository.findByProjectIdAndTaskId(taskUser.getProjectId(), taskUser.getTaskId());
+ // 根据项目ID、任务ID、用户ID查询项目日报列表
+ List<TaskDaliy> taskDaliyList = taskDaliyRepository.findByProjectIdAndTaskIdAndUserId(taskUser.getProjectId(), taskUser.getTaskId(), taskUser.getUserId());
// 判断项目日报列表长度
if (taskDaliyList.size() > 0) {
throw new BadRequestException("已填过项目日报的项目分配无法删除!");
diff --git a/eladmin-web-master/src/api/capitalFlow/capitalFlow.js b/eladmin-web-master/src/api/capitalFlow/capitalFlow.js
new file mode 100644
index 0000000..9c0650e
--- /dev/null
+++ b/eladmin-web-master/src/api/capitalFlow/capitalFlow.js
@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+export function getAll(params) {
+ return request({
+ url: 'api/capitalFlow/all',
+ method: 'get',
+ params
+ })
+}
+
+export function add(data) {
+ return request({
+ url: 'api/capitalFlow',
+ method: 'post',
+ data
+ })
+}
+
+export function del(ids) {
+ return request({
+ url: 'api/capitalFlow/',
+ method: 'delete',
+ data: ids
+ })
+}
+
+export function edit(data) {
+ return request({
+ url: 'api/capitalFlow',
+ method: 'put',
+ data
+ })
+}
+
+export default { getAll, add, edit, del }
diff --git a/eladmin-web-master/src/api/capitalFlow/capitalFlowExpend.js b/eladmin-web-master/src/api/capitalFlow/capitalFlowExpend.js
new file mode 100644
index 0000000..68913d9
--- /dev/null
+++ b/eladmin-web-master/src/api/capitalFlow/capitalFlowExpend.js
@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+export function getAll(params) {
+ return request({
+ url: 'api/capitalFlowExpend/all',
+ method: 'get',
+ params
+ })
+}
+
+export function add(data) {
+ return request({
+ url: 'api/capitalFlowExpend',
+ method: 'post',
+ data
+ })
+}
+
+export function del(ids) {
+ return request({
+ url: 'api/capitalFlowExpend/',
+ method: 'delete',
+ data: ids
+ })
+}
+
+export function edit(data) {
+ return request({
+ url: 'api/capitalFlowExpend',
+ method: 'put',
+ data
+ })
+}
+
+export default { getAll, add, edit, del }
diff --git a/eladmin-web-master/src/api/capitalFlow/capitalFlowIncome.js b/eladmin-web-master/src/api/capitalFlow/capitalFlowIncome.js
new file mode 100644
index 0000000..5bcf556
--- /dev/null
+++ b/eladmin-web-master/src/api/capitalFlow/capitalFlowIncome.js
@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+export function getAll(params) {
+ return request({
+ url: 'api/capitalFlowIncome/all',
+ method: 'get',
+ params
+ })
+}
+
+export function add(data) {
+ return request({
+ url: 'api/capitalFlowIncome',
+ method: 'post',
+ data
+ })
+}
+
+export function del(ids) {
+ return request({
+ url: 'api/capitalFlowIncome/',
+ method: 'delete',
+ data: ids
+ })
+}
+
+export function edit(data) {
+ return request({
+ url: 'api/capitalFlowIncome',
+ method: 'put',
+ data
+ })
+}
+
+export default { getAll, add, edit, del }
diff --git a/eladmin-web-master/src/utils/constant.js b/eladmin-web-master/src/utils/constant.js
index a0e0269..285e3ac 100644
--- a/eladmin-web-master/src/utils/constant.js
+++ b/eladmin-web-master/src/utils/constant.js
@@ -210,6 +210,10 @@
export const TASK_STATUS_NOT_STARTED = 'task_status_not_started'
// 任务状态:进行中
export const TASK_STATUS_IN_HAND = 'task_status_in_hand'
+// 任务状态:待测试
+export const TASK_STATUS_TEST = 'task_status_test'
+// 任务状态:已暂停
+export const TASK_STATUS_STOP = 'task_status_stop'
// 任务状态:已完成
export const TASK_STATUS_COMPLETED = 'task_status_completed'
@@ -299,6 +303,16 @@
// 合同状态
export const CONTRACT_STATUS = 'contract_status'
+// 合同状态: 未开始
+export const CONTRACT_STATUS_NOT_STARTED = 'contract_not_started'
+// 合同状态:进行中
+export const CONTRACT_STATUS_HAVE_HAND = 'contract_have_hand'
+// 合同状态:服务中
+export const CONTRACT_STATUS_IN_SERVICE = 'contract_in_service'
+// 合同状态:已终止
+export const CONTRACT_STATUS_TERMINATED = 'contract_terminated'
+// 合同状态:已结束
+export const CONTRACT_STATUS_IS_OVER = 'contract_is_over'
export default {
ROLE_LEVEL_SUPER,
@@ -398,6 +412,8 @@
TASK_STATUS,
TASK_STATUS_NOT_STARTED,
TASK_STATUS_IN_HAND,
+ TASK_STATUS_STOP,
+ TASK_STATUS_TEST,
TASK_STATUS_COMPLETED,
CONFIGURATION_TYPE,
CONFIGURATION_TYPE_PERCENTAGE,
@@ -435,5 +451,10 @@
CONTRACT_SERVICE,
CONTRACT_DEVELOP_SERVICE,
PAYMENT_STATE,
- CONTRACT_STATUS
+ CONTRACT_STATUS,
+ CONTRACT_STATUS_NOT_STARTED,
+ CONTRACT_STATUS_HAVE_HAND,
+ CONTRACT_STATUS_IN_SERVICE,
+ CONTRACT_STATUS_TERMINATED,
+ CONTRACT_STATUS_IS_OVER
}
diff --git a/eladmin-web-master/src/views/capitalFlow/capitalFlow/index.vue b/eladmin-web-master/src/views/capitalFlow/capitalFlow/index.vue
new file mode 100644
index 0000000..f636f5c
--- /dev/null
+++ b/eladmin-web-master/src/views/capitalFlow/capitalFlow/index.vue
@@ -0,0 +1,182 @@
+<template>
+ <div class="app-container">
+ <!--工具栏-->
+ <div class="head-container">
+ <div v-if="crud.props.searchToggle">
+ <!-- 搜索 -->
+ <el-date-picker v-model="query.flowYearMonth" type="month" clearable placeholder="流水年月" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
+ <el-select v-model="query.companyId" filterable clearable placeholder="所属公司" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery">
+ <el-option
+ v-for="item in companyList"
+ :key="item.id"
+ :label="item.label"
+ :value="item.id"
+ />
+ </el-select>
+ <rrOperation :crud="crud" />
+ </div>
+ <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
+ <crudOperation :permission="permission" />
+ <!--表单组件-->
+ <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
+ <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
+ <el-form-item label="流水年月" prop="flowYearMonth">
+ <el-date-picker v-model="form.flowYearMonth" type="month" style="width: 370px;" placeholder="请选择" value-format="yyyy-MM-dd HH:mm:ss" />
+ </el-form-item>
+ <el-form-item label="所属公司" prop="companyId">
+ <el-select v-model="form.companyId" filterable clearable placeholder="请选择" style="width: 370px;">
+ <el-option
+ v-for="item in companyList"
+ :key="item.id"
+ :label="item.label"
+ :value="item.id"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="备注">
+ <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 370px;" />
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="text" @click="crud.cancelCU">取消</el-button>
+ <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
+ </div>
+ </el-dialog>
+ <!--表格渲染-->
+ <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
+ <el-table-column type="selection" width="55" />
+ <el-table-column type="expand">
+ <template slot-scope="props">
+ <div style="margin-left: 264px;">
+ <el-form label-position="left" class="my-demo-table-expand">
+ <el-form-item>
+ <span slot="label" class="flow-label">流水支出</span>
+ </el-form-item>
+ <template v-for="item in props.row.capitalFlowExpends">
+ <el-form-item :key="item.id" :label="item.title">
+ <span>{{ crud.toMoney(item.amount) }}</span>
+ </el-form-item>
+ </template>
+ </el-form>
+ <el-form label-position="left" class="my-demo-table-expand">
+ <el-form-item>
+ <span slot="label" class="flow-label">流水收入</span>
+ </el-form-item>
+ <template v-for="item in props.row.capitalFlowIncomes">
+ <el-form-item :key="item.id" :label="item.title">
+ <span>{{ crud.toMoney(item.amount) }}</span>
+ </el-form-item>
+ </template>
+ </el-form>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column prop="flowYearMonth" label="流水年月">
+ <template slot-scope="scope">
+ {{ crud.toMonth(scope.row.flowYearMonth) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="companyName" label="所属公司">
+ <template slot-scope="scope">
+ <el-tag>{{ scope.row.companyName }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="capitalFlowExpendsAmount" label="支出总金额">
+ <template slot-scope="scope">
+ {{ crud.toMoney(scope.row.capitalFlowExpendsAmount) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="capitalFlowIncomesAmount" label="收入总金额">
+ <template slot-scope="scope">
+ {{ crud.toMoney(scope.row.capitalFlowIncomesAmount) }}
+ </template>
+ </el-table-column>
+ <el-table-column label="结余总金额">
+ <template slot-scope="scope">
+ {{ crud.toMoney(scope.row.capitalFlowIncomesAmount - scope.row.capitalFlowExpendsAmount) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="remarks" label="备注" />
+ <el-table-column prop="createTime" label="创建时间" />
+ <el-table-column v-if="checkPer(['admin','capitalFlow:edit','capitalFlow:del'])" label="操作" width="150px" align="center">
+ <template slot-scope="scope">
+ <udOperation
+ :data="scope.row"
+ :permission="permission"
+ />
+ </template>
+ </el-table-column>
+ </el-table>
+ <!--分页组件-->
+ <pagination />
+ </div>
+ </div>
+</template>
+
+<script>
+import crudCapitalFlow from '@/api/capitalFlow/capitalFlow'
+import CRUD, { presenter, header, form, crud } from '@crud/crud'
+import rrOperation from '@crud/RR.operation'
+import crudOperation from '@crud/CRUD.operation'
+import udOperation from '@crud/UD.operation'
+import pagination from '@crud/Pagination'
+import crudSysCompany from '@/api/system/sysCompany'
+
+const defaultForm = { id: null, flowYearMonth: null, companyId: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
+export default {
+ name: 'CapitalFlow',
+ components: { pagination, crudOperation, rrOperation, udOperation },
+ mixins: [presenter(), header(), form(defaultForm), crud()],
+ cruds() {
+ return CRUD({ title: '资金流水', url: 'api/capitalFlow', idField: 'id', sort: 'id,desc', crudMethod: { ...crudCapitalFlow }})
+ },
+ data() {
+ return {
+ permission: {
+ add: ['admin', 'capitalFlow:add'],
+ edit: ['admin', 'capitalFlow:edit'],
+ del: ['admin', 'capitalFlow:del'],
+ download: ['admin', 'capitalFlow:download']
+ },
+ rules: {
+ flowYearMonth: [
+ { required: true, message: '流水年月不能为空', trigger: 'change' }
+ ],
+ companyId: [
+ { required: true, message: '所属公司不能为空', trigger: 'change' }
+ ]
+ },
+ queryTypeOptions: [
+ { key: 'flowYearMonth', display_name: '流水年月' },
+ { key: 'companyId', display_name: '所属公司' }
+ ],
+ // 公司列表
+ companyList: []
+ }
+ },
+ methods: {
+ // 钩子:在获取表格数据之前执行,false 则代表不获取数据
+ [CRUD.HOOK.beforeRefresh]() {
+ // 获取公司数据
+ this.getCompanyList()
+ return true
+ },
+ // 获取公司数据
+ getCompanyList() {
+ // 获取公司数据
+ crudSysCompany.getAll().then(res => {
+ // 公司列表
+ this.companyList = res
+ })
+ }
+ }
+}
+</script>
+
+<style scoped>
+.flow-label {
+ color: deeppink;
+ font-weight: bold;
+ font-size: 14px;
+}
+</style>
diff --git a/eladmin-web-master/src/views/capitalFlow/capitalFlowExpend/index.vue b/eladmin-web-master/src/views/capitalFlow/capitalFlowExpend/index.vue
new file mode 100644
index 0000000..e798b9d
--- /dev/null
+++ b/eladmin-web-master/src/views/capitalFlow/capitalFlowExpend/index.vue
@@ -0,0 +1,162 @@
+<template>
+ <div class="app-container">
+ <!--工具栏-->
+ <div class="head-container">
+ <div v-if="crud.props.searchToggle">
+ <!-- 搜索 -->
+ <el-select v-model="query.flowId" filterable clearable placeholder="所属流水" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery">
+ <el-option
+ v-for="item in capitalFlowList"
+ :key="item.id"
+ :label="item.flowYearMonth.substring(0,7) + ' - ' + item.companyName"
+ :value="item.id"
+ />
+ </el-select>
+ <el-input v-model="query.title" clearable placeholder="标题" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
+ <rrOperation :crud="crud" />
+ </div>
+ <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
+ <crudOperation :permission="permission" />
+ <!--表单组件-->
+ <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
+ <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
+ <el-form-item label="所属流水" prop="flowId">
+ <el-select v-model="form.flowId" filterable clearable placeholder="请选择" style="width: 370px;">
+ <el-option
+ v-for="item in capitalFlowList"
+ :key="item.id"
+ :label="item.flowYearMonth.substring(0,7) + ' - ' + item.companyName"
+ :value="item.id"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="标题" prop="title">
+ <el-input v-model="form.title" style="width: 370px;" />
+ </el-form-item>
+ <el-form-item label="金额" prop="amount">
+ <money-input :key="random" v-model="form.amount" :width="370" />
+ </el-form-item>
+ <el-form-item label="备注">
+ <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 370px;" />
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="text" @click="crud.cancelCU">取消</el-button>
+ <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
+ </div>
+ </el-dialog>
+ <!--表格渲染-->
+ <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
+ <el-table-column type="selection" width="55" />
+ <el-table-column prop="flowName" label="所属流水">
+ <template slot-scope="scope">
+ <el-tag>{{ scope.row.flowName }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="title" label="标题" />
+ <el-table-column prop="amount" label="金额">
+ <template slot-scope="scope">
+ {{ crud.toMoney(scope.row.amount) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="remarks" label="备注" />
+ <el-table-column prop="createTime" label="创建时间" />
+ <el-table-column v-if="checkPer(['admin','capitalFlowExpend:edit','capitalFlowExpend:del'])" label="操作" width="150px" align="center">
+ <template slot-scope="scope">
+ <udOperation
+ :data="scope.row"
+ :permission="permission"
+ />
+ </template>
+ </el-table-column>
+ </el-table>
+ <!--分页组件-->
+ <pagination />
+ </div>
+ </div>
+</template>
+
+<script>
+import crudCapitalFlowExpend from '@/api/capitalFlow/capitalFlowExpend'
+import CRUD, { presenter, header, form, crud } from '@crud/crud'
+import rrOperation from '@crud/RR.operation'
+import crudOperation from '@crud/CRUD.operation'
+import udOperation from '@crud/UD.operation'
+import pagination from '@crud/Pagination'
+import moneyInput from '../../assembly/moneyInput/index.vue'
+import crudCapitalFlow from '@/api/capitalFlow/capitalFlow'
+
+const defaultForm = { id: null, flowId: null, title: null, amount: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
+export default {
+ name: 'CapitalFlowExpend',
+ components: { pagination, crudOperation, rrOperation, udOperation, moneyInput },
+ mixins: [presenter(), header(), form(defaultForm), crud()],
+ cruds() {
+ return CRUD({ title: '流水支出', url: 'api/capitalFlowExpend', idField: 'id', sort: 'id,desc', crudMethod: { ...crudCapitalFlowExpend }})
+ },
+ data() {
+ // 金额(千万内)验证
+ var amountValidate = (rule, value, callback) => {
+ if (value != null && value !== '' && (isNaN(value) || Number(value) < 0 || Number(value) > 1000000000)) {
+ callback(new Error('请输入 十亿 以内的正整数或两位小数'))
+ } else {
+ callback()
+ }
+ }
+ return {
+ permission: {
+ add: ['admin', 'capitalFlowExpend:add'],
+ edit: ['admin', 'capitalFlowExpend:edit'],
+ del: ['admin', 'capitalFlowExpend:del'],
+ download: ['admin', 'capitalFlowExpend:download']
+ },
+ rules: {
+ flowId: [
+ { required: true, message: '所属流水不能为空', trigger: 'change' }
+ ],
+ title: [
+ { required: true, message: '标题不能为空', trigger: 'blur' },
+ { max: 50, message: '最大长度 50 个字符', trigger: 'blur' }
+ ],
+ amount: [
+ { required: true, message: '金额不能为空', trigger: 'blur' },
+ { validator: amountValidate, trigger: 'blur' }
+ ]
+ },
+ queryTypeOptions: [
+ { key: 'flowId', display_name: '所属流水' },
+ { key: 'title', display_name: '标题' }
+ ],
+ // 随机数
+ random: 0,
+ // 资金流水列表
+ capitalFlowList: []
+ }
+ },
+ methods: {
+ // 钩子:在获取表格数据之前执行,false 则代表不获取数据
+ [CRUD.HOOK.beforeRefresh]() {
+ // 获取资金流水数据
+ this.getCapitalFlow()
+ return true
+ },
+ // 获取资金流水数据
+ getCapitalFlow() {
+ // 获取资金流水数据
+ crudCapitalFlow.getAll().then(res => {
+ // 资金流水列表
+ this.capitalFlowList = res
+ })
+ },
+ // 钩子: 开始 "新建/编辑" - 之前
+ [CRUD.HOOK.beforeToCU]() {
+ // 随机数
+ this.random = Math.random()
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/eladmin-web-master/src/views/capitalFlow/capitalFlowIncome/index.vue b/eladmin-web-master/src/views/capitalFlow/capitalFlowIncome/index.vue
new file mode 100644
index 0000000..8b7c35d
--- /dev/null
+++ b/eladmin-web-master/src/views/capitalFlow/capitalFlowIncome/index.vue
@@ -0,0 +1,162 @@
+<template>
+ <div class="app-container">
+ <!--工具栏-->
+ <div class="head-container">
+ <div v-if="crud.props.searchToggle">
+ <!-- 搜索 -->
+ <el-select v-model="query.flowId" filterable clearable placeholder="所属流水" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery">
+ <el-option
+ v-for="item in capitalFlowList"
+ :key="item.id"
+ :label="item.flowYearMonth.substring(0,7) + ' - ' + item.companyName"
+ :value="item.id"
+ />
+ </el-select>
+ <el-input v-model="query.title" clearable placeholder="标题" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
+ <rrOperation :crud="crud" />
+ </div>
+ <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
+ <crudOperation :permission="permission" />
+ <!--表单组件-->
+ <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
+ <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
+ <el-form-item label="所属流水" prop="flowId">
+ <el-select v-model="form.flowId" filterable clearable placeholder="请选择" style="width: 370px;">
+ <el-option
+ v-for="item in capitalFlowList"
+ :key="item.id"
+ :label="item.flowYearMonth.substring(0,7) + ' - ' + item.companyName"
+ :value="item.id"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="标题" prop="title">
+ <el-input v-model="form.title" style="width: 370px;" />
+ </el-form-item>
+ <el-form-item label="金额" prop="amount">
+ <money-input :key="random" v-model="form.amount" :width="370" />
+ </el-form-item>
+ <el-form-item label="备注">
+ <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 370px;" />
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="text" @click="crud.cancelCU">取消</el-button>
+ <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
+ </div>
+ </el-dialog>
+ <!--表格渲染-->
+ <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
+ <el-table-column type="selection" width="55" />
+ <el-table-column prop="flowName" label="所属流水">
+ <template slot-scope="scope">
+ <el-tag>{{ scope.row.flowName }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="title" label="标题" />
+ <el-table-column prop="amount" label="金额">
+ <template slot-scope="scope">
+ {{ crud.toMoney(scope.row.amount) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="remarks" label="备注" />
+ <el-table-column prop="createTime" label="创建时间" />
+ <el-table-column v-if="checkPer(['admin','capitalFlowIncome:edit','capitalFlowIncome:del'])" label="操作" width="150px" align="center">
+ <template slot-scope="scope">
+ <udOperation
+ :data="scope.row"
+ :permission="permission"
+ />
+ </template>
+ </el-table-column>
+ </el-table>
+ <!--分页组件-->
+ <pagination />
+ </div>
+ </div>
+</template>
+
+<script>
+import crudCapitalFlowIncome from '@/api/capitalFlow/capitalFlowIncome'
+import CRUD, { presenter, header, form, crud } from '@crud/crud'
+import rrOperation from '@crud/RR.operation'
+import crudOperation from '@crud/CRUD.operation'
+import udOperation from '@crud/UD.operation'
+import pagination from '@crud/Pagination'
+import moneyInput from '../../assembly/moneyInput/index.vue'
+import crudCapitalFlow from '@/api/capitalFlow/capitalFlow'
+
+const defaultForm = { id: null, flowId: null, title: null, amount: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null }
+export default {
+ name: 'CapitalFlowIncome',
+ components: { pagination, crudOperation, rrOperation, udOperation, moneyInput },
+ mixins: [presenter(), header(), form(defaultForm), crud()],
+ cruds() {
+ return CRUD({ title: '流水收入', url: 'api/capitalFlowIncome', idField: 'id', sort: 'id,desc', crudMethod: { ...crudCapitalFlowIncome }})
+ },
+ data() {
+ // 金额(千万内)验证
+ var amountValidate = (rule, value, callback) => {
+ if (value != null && value !== '' && (isNaN(value) || Number(value) < 0 || Number(value) > 1000000000)) {
+ callback(new Error('请输入 十亿 以内的正整数或两位小数'))
+ } else {
+ callback()
+ }
+ }
+ return {
+ permission: {
+ add: ['admin', 'capitalFlowIncome:add'],
+ edit: ['admin', 'capitalFlowIncome:edit'],
+ del: ['admin', 'capitalFlowIncome:del'],
+ download: ['admin', 'capitalFlowIncome:download']
+ },
+ rules: {
+ flowId: [
+ { required: true, message: '所属流水不能为空', trigger: 'change' }
+ ],
+ title: [
+ { required: true, message: '标题不能为空', trigger: 'blur' },
+ { max: 50, message: '最大长度 50 个字符', trigger: 'blur' }
+ ],
+ amount: [
+ { required: true, message: '金额不能为空', trigger: 'blur' },
+ { validator: amountValidate, trigger: 'blur' }
+ ]
+ },
+ queryTypeOptions: [
+ { key: 'flowId', display_name: '所属流水' },
+ { key: 'title', display_name: '标题' }
+ ],
+ // 随机数
+ random: 0,
+ // 资金流水列表
+ capitalFlowList: []
+ }
+ },
+ methods: {
+ // 钩子:在获取表格数据之前执行,false 则代表不获取数据
+ [CRUD.HOOK.beforeRefresh]() {
+ // 获取资金流水数据
+ this.getCapitalFlow()
+ return true
+ },
+ // 获取资金流水数据
+ getCapitalFlow() {
+ // 获取资金流水数据
+ crudCapitalFlow.getAll().then(res => {
+ // 资金流水列表
+ this.capitalFlowList = res
+ })
+ },
+ // 钩子: 开始 "新建/编辑" - 之前
+ [CRUD.HOOK.beforeToCU]() {
+ // 随机数
+ this.random = Math.random()
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
--
Gitblit v1.9.3