Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
7cf76af0
Commit
7cf76af0
authored
Jan 06, 2025
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(wealth): 创建/批量创建银行收款明细
parent
ff2841eb
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
169 additions
and
31 deletions
+169
-31
20250106.sql
sql/v2.2财务/20250106.sql
+0
-0
update_sys_data.sql
sql/v2.2财务/update_sys_data.sql
+0
-0
BpmProcessInstanceApi.java
...oder/yudao/module/bpm/api/task/BpmProcessInstanceApi.java
+2
-0
BpmProcessInstanceApiImpl.java
.../yudao/module/bpm/api/task/BpmProcessInstanceApiImpl.java
+11
-0
ReceivableWriteOffRecordDO.java
...dal/dataobject/receivable/ReceivableWriteOffRecordDO.java
+1
-1
ReceivableWriteOffRecordMapper.java
.../dal/mysql/receivable/ReceivableWriteOffRecordMapper.java
+4
-2
ReceiptItemService.java
...module/wealth/service/receiptItem/ReceiptItemService.java
+2
-1
ReceiptItemServiceImpl.java
...le/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+87
-20
ReceivableService.java
...o/module/wealth/service/receivable/ReceivableService.java
+6
-2
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+30
-3
FinanceReceiptItemVo.java
.../yudao/module/wealth/vo/receipt/FinanceReceiptItemVo.java
+2
-0
ReceiptItemUpdateReqVO.java
.../module/wealth/vo/receiptItem/ReceiptItemUpdateReqVO.java
+3
-1
ReceivableInItemVO.java
...yudao/module/wealth/vo/receivable/ReceivableInItemVO.java
+1
-1
ReceivableWriteOffReqVO.java
.../module/wealth/vo/receivable/ReceivableWriteOffReqVO.java
+4
-0
ReceivableController.java
...lth/controller/admin/receivable/ReceivableController.java
+6
-0
ReceivableWriteOffRecordMapper.xml
...rces/mapper/receivable/ReceivableWriteOffRecordMapper.xml
+4
-0
pom.xml
yudao-server/pom.xml
+6
-0
No files found.
sql/v2.2财务/20250106.sql
0 → 100644
View file @
7cf76af0
This diff is collapsed.
Click to expand it.
sql/v2.2财务/update_sys_data.sql
View file @
7cf76af0
This diff is collapsed.
Click to expand it.
yudao-module-bpm/yudao-module-bpm-api/src/main/java/cn/iocoder/yudao/module/bpm/api/task/BpmProcessInstanceApi.java
View file @
7cf76af0
...
...
@@ -41,4 +41,6 @@ public interface BpmProcessInstanceApi {
* @return 流程任务总数
*/
Long
getTodoTaskCount
(
Long
userId
);
void
approveTask
(
String
id
,
String
comment
);
}
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/api/task/BpmProcessInstanceApiImpl.java
View file @
7cf76af0
...
...
@@ -3,11 +3,13 @@ package cn.iocoder.yudao.module.bpm.api.task;
import
cn.hutool.json.JSONUtil
;
import
cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceCancelReqVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskApproveReqVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO
;
import
cn.iocoder.yudao.module.bpm.resp.TaskResp
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmTaskService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -80,4 +82,13 @@ public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
public
Long
getTodoTaskCount
(
Long
userId
)
{
return
bpmTaskService
.
getTodoTaskCount
(
getLoginUserId
());
}
@Override
@Async
public
void
approveTask
(
String
id
,
String
comment
)
{
BpmTaskApproveReqVO
bpmTaskApproveReqVO
=
new
BpmTaskApproveReqVO
();
bpmTaskApproveReqVO
.
setId
(
id
);
bpmTaskApproveReqVO
.
setComment
(
comment
);
bpmTaskService
.
approveTask
(
1L
,
bpmTaskApproveReqVO
);
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/receivable/ReceivableWriteOffRecord.java
→
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/receivable/ReceivableWriteOffRecord
DO
.java
View file @
7cf76af0
...
...
@@ -13,7 +13,7 @@ import java.math.BigDecimal;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ReceivableWriteOffRecord
extends
BaseDO
{
public
class
ReceivableWriteOffRecord
DO
extends
BaseDO
{
@TableId
private
Long
id
;
private
Long
receivableId
;
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receivable/ReceivableWriteOffRecordMapper.java
View file @
7cf76af0
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
dal
.
mysql
.
receivable
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableWriteOffRecord
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableWriteOffRecord
DO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.math.BigDecimal
;
...
...
@@ -10,6 +10,8 @@ import java.math.BigDecimal;
* 应收明细核销记录 Mapper
*/
@Mapper
public
interface
ReceivableWriteOffRecordMapper
extends
AbstractMapper
<
ReceivableWriteOffRecord
>
{
public
interface
ReceivableWriteOffRecordMapper
extends
AbstractMapper
<
ReceivableWriteOffRecord
DO
>
{
BigDecimal
getTotalAmountForReceivable
(
Long
id
);
void
deleteWriteOffRecord
(
Long
id
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java
View file @
7cf76af0
...
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.wealth.service.receiptItem;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptApproval.ReceiptApprovalDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemCancelVo
;
import
cn.iocoder.yudao.module.wealth.vo.receipt.FinanceReceiptItemVo
;
...
...
@@ -95,7 +96,7 @@ public interface ReceiptItemService extends IService<ReceiptItemDO> {
*
* @param financeReceiptItemVo
*/
void
createFinanceReceiptItemWriteOff
(
FinanceReceiptItemVo
financeReceiptItemVo
);
ReceiptApprovalDO
createFinanceReceiptItemWriteOff
(
FinanceReceiptItemVo
financeReceiptItemVo
);
/**
* 发起收款明细反核销
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
View file @
7cf76af0
This diff is collapsed.
Click to expand it.
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableService.java
View file @
7cf76af0
...
...
@@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.mybatis.core.service.IService;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableWriteOffRecord
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableWriteOffRecord
DO
;
import
cn.iocoder.yudao.module.wealth.vo.receivable.*
;
import
javax.validation.Valid
;
...
...
@@ -273,7 +273,11 @@ public interface ReceivableService extends IService<ReceivableDO> {
void
createWriteOffRecord
(
ReceivableWriteOffReqVO
receivableWriteOffReqVO
,
ReceiptItemDO
receiptItem
);
ReceivableWriteOffRecord
getReceivableWriteOffRecord
(
Long
receivableId
,
Long
receiptItemId
);
ReceivableWriteOffRecord
DO
getReceivableWriteOffRecord
(
Long
receivableId
,
Long
receiptItemId
);
List
<
ReceivableInItemVO
>
getListForCreateReceiptItem
(
Long
receiptId
);
void
deleteWriteOffRecord
(
ReceiptItemDO
receiptItemDO
);
List
<
ReceivableInItemVO
>
getReceivableByReceiptItem
(
Long
receiptItemId
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
7cf76af0
...
...
@@ -26,12 +26,14 @@ import cn.iocoder.yudao.module.wealth.convert.receivable.ReceivableConvert;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableWriteOffRecord
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivable.ReceivableWriteOffRecord
DO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receivableDiscount.ReceivableDiscountDO
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.ReceiptItemMapper
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receivable.ReceivableMapper
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receivable.ReceivableWriteOffRecordMapper
;
import
cn.iocoder.yudao.module.wealth.service.receipt.ReceiptService
;
import
cn.iocoder.yudao.module.wealth.service.receivableDiscount.ReceivableDiscountService
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemBackVO
;
import
cn.iocoder.yudao.module.wealth.vo.receivable.*
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -83,6 +85,8 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
private
OrderApi
orderApi
;
@Resource
private
ReceivableWriteOffRecordMapper
receivableWriteOffRecordMapper
;
@Resource
private
ReceiptItemMapper
receiptItemMapper
;
@Override
public
Long
createReceivable
(
ReceivableCreateReqVO
createReqVO
)
{
...
...
@@ -583,7 +587,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
if
(
receivableDO
==
null
)
{
throw
exception
(
RECEIVABLE_NOT_EXISTS
);
}
ReceivableWriteOffRecord
writeOffRecord
=
ReceivableWriteOffRecord
.
builder
()
ReceivableWriteOffRecord
DO
writeOffRecord
=
ReceivableWriteOffRecordDO
.
builder
()
.
receivableId
(
receivableWriteOffReqVO
.
getReceivableId
())
.
writeOffAmount
(
receivableWriteOffReqVO
.
getWriteOffAmount
())
.
receiptItemId
(
receiptItem
.
getId
())
...
...
@@ -592,7 +596,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
}
@Override
public
ReceivableWriteOffRecord
getReceivableWriteOffRecord
(
Long
receivableId
,
Long
receiptItemId
)
{
public
ReceivableWriteOffRecord
DO
getReceivableWriteOffRecord
(
Long
receivableId
,
Long
receiptItemId
)
{
return
receivableWriteOffRecordMapper
.
selectOne
(
"receivable_id"
,
receivableId
,
"receipt_item_id"
,
receiptItemId
);
}
...
...
@@ -611,4 +615,27 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
}
return
receivableInItemVOS
;
}
@Override
public
List
<
ReceivableInItemVO
>
getReceivableByReceiptItem
(
Long
receiptItemId
)
{
ReceiptItemDO
receiptItemDO
=
receiptItemMapper
.
selectById
(
receiptItemId
);
List
<
ReceivableDO
>
receivableDOS
=
this
.
selectList
(
"receipt_id"
,
receiptItemDO
.
getReceiptId
());
List
<
ReceivableInItemVO
>
receivableInItemVOS
=
ReceivableConvert
.
INSTANCE
.
convertToItemVOList
(
receivableDOS
);
for
(
ReceivableInItemVO
receivableInItemVO
:
receivableInItemVOS
)
{
receivableInItemVO
.
setActualAmount
(
receivableInItemVO
.
getTaxAmount
().
subtract
(
receivableInItemVO
.
getDiscountTotal
()
==
null
?
BigDecimal
.
ZERO
:
receivableInItemVO
.
getDiscountTotal
()));
ReceivableWriteOffRecordDO
receivableWriteOffRecordDO
=
this
.
getReceivableWriteOffRecord
(
receivableInItemVO
.
getId
(),
receiptItemId
);
if
(
null
==
receivableWriteOffRecordDO
)
{
receivableInItemVO
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
else
{
receivableInItemVO
.
setWriteOffAmount
(
receivableWriteOffRecordDO
.
getWriteOffAmount
());
}
}
return
receivableInItemVOS
;
}
@Override
public
void
deleteWriteOffRecord
(
ReceiptItemDO
receiptItemDO
)
{
receivableWriteOffRecordMapper
.
deleteWriteOffRecord
(
receiptItemDO
.
getId
());
}
}
\ No newline at end of file
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receipt/FinanceReceiptItemVo.java
View file @
7cf76af0
...
...
@@ -2,11 +2,13 @@ package cn.iocoder.yudao.module.wealth.vo.receipt;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Builder
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
@Data
@Builder
@ApiModel
(
"收款单明细审核"
)
public
class
FinanceReceiptItemVo
{
@ApiModelProperty
(
value
=
"收款单ID"
)
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/ReceiptItemUpdateReqVO.java
View file @
7cf76af0
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptItem
;
import
cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableWriteOffReqVO
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
...
...
@@ -14,5 +15,6 @@ public class ReceiptItemUpdateReqVO extends ReceiptItemBaseVO {
@ApiModelProperty
(
value
=
"主键"
,
required
=
true
)
@NotNull
(
message
=
"主键不能为空"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"应收核销信息"
)
private
List
<
ReceivableWriteOffReqVO
>
receivableWriteOffList
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableInItemVO.java
View file @
7cf76af0
...
...
@@ -62,5 +62,5 @@ public class ReceivableInItemVO {
private
Long
baseCurrencyId
;
@ApiModelProperty
(
value
=
"本次核销金额"
)
private
BigDecimal
writeOff
InCurrentItem
;
private
BigDecimal
writeOff
Amount
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableWriteOffReqVO.java
View file @
7cf76af0
...
...
@@ -2,8 +2,10 @@ package cn.iocoder.yudao.module.wealth.vo.receivable;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
...
...
@@ -11,6 +13,8 @@ import java.math.BigDecimal;
@Data
@ApiModel
(
"管理后台 - 应收款核销 Request VO"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
ReceivableWriteOffReqVO
{
@ApiModelProperty
(
value
=
"主键"
,
required
=
true
)
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receivable/ReceivableController.java
View file @
7cf76af0
...
...
@@ -116,6 +116,12 @@ public class ReceivableController {
public
CommonResult
<
List
<
ReceivableInItemVO
>>
getListForCreateReceiptItem
(
Long
receiptId
)
{
return
success
(
receivableService
.
getListForCreateReceiptItem
(
receiptId
));
}
@GetMapping
(
"/getReceivableByReceiptItem"
)
@ApiOperation
(
"财务-根据收款明细获取应收明细"
)
public
CommonResult
<
List
<
ReceivableInItemVO
>>
getReceivableByReceiptItem
(
Long
receiptItemId
)
{
return
success
(
receivableService
.
getReceivableByReceiptItem
(
receiptItemId
));
}
/*
@GetMapping("/list")
@ApiOperation("根据id集合获得应收款列表")
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableWriteOffRecordMapper.xml
View file @
7cf76af0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.wealth.dal.mysql.receivable.ReceivableWriteOffRecordMapper"
>
<delete
id=
"deleteWriteOffRecord"
>
DELETE FROM ecw_receivable_write_off_record
WHERE receipt_item_id = #{id} AND deleted = 0
</delete>
<select
id=
"getTotalAmountForReceivable"
resultType=
"java.math.BigDecimal"
>
SELECT SUM(erwor.write_off_amount)
...
...
yudao-server/pom.xml
View file @
7cf76af0
...
...
@@ -8,6 +8,12 @@
<version>
${revision}
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<java.version>
1.8
</java.version>
<maven.compiler.source>
${java.version}
</maven.compiler.source>
<maven.compiler.target>
${java.version}
</maven.compiler.target>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<artifactId>
yudao-server
</artifactId>
<packaging>
jar
</packaging>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment