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
7661f1fa
Commit
7661f1fa
authored
Jan 13, 2025
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'jd_dev'
Release分支合并到jd分支0113 See merge request
!79
parents
788fd006
7bc11d44
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
86 additions
and
51 deletions
+86
-51
20250106.sql
sql/v2.2财务/20250106.sql
+0
-0
update_old_data.sql
sql/v2.2财务/update_old_data.sql
+3
-0
update_sys_data.sql
sql/v2.2财务/update_sys_data.sql
+7
-2
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+36
-2
BoxController.http
...yudao/module/shipment/controller/admin/BoxController.http
+1
-1
MyBoxController.http
...dao/module/shipment/controller/admin/MyBoxController.http
+8
-0
ReceiptStatusEnum.java
.../iocoder/yudao/module/wealth/enums/ReceiptStatusEnum.java
+2
-2
FinanceReceiptApproveService.java
...o/module/wealth/service/FinanceReceiptApproveService.java
+4
-21
ReceiptServiceImpl.java
...dao/module/wealth/service/receipt/ReceiptServiceImpl.java
+11
-15
ReceiptInvoiceServiceImpl.java
...lth/service/receiptInvoice/ReceiptInvoiceServiceImpl.java
+11
-2
ReceiptItemServiceImpl.java
...le/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+1
-4
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+2
-2
No files found.
sql/v2.2财务/20250106.sql
View file @
7661f1fa
This diff is collapsed.
Click to expand it.
sql/v2.2财务/update_old_data.sql
View file @
7661f1fa
...
...
@@ -50,3 +50,5 @@ UPDATE ecw_receivable er
SET
er
.
base_amount
=
er
.
exchange_rate
*
(
er
.
tax_amount
-
er
.
discount_total
)
WHERE
er
.
base_amount
IS
NULL
AND
er
.
receipt_id
IS
NOT
NULL
AND
er
.
exchange_rate
IS
NOT
NULL
;
#
修改收款单已核销待开票状态
UPDATE
`ecw_receipt`
SET
`state`
=
4
WHERE
`state`
=
5
;
\ No newline at end of file
sql/v2.2财务/update_sys_data.sql
View file @
7661f1fa
...
...
@@ -54,4 +54,9 @@ INSERT INTO `system_menu` (`name`, `permission`, `menu_type`, `sort`, `parent_id
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
,
`badge_field`
)
VALUES
(
'开票申请/修改'
,
''
,
2
,
1
,
1624
,
'invoiceOperate'
,
'bug'
,
'ecw/financial/invoiceOperate'
,
0
,
'1'
,
'2024-12-23 11:17:32'
,
'1'
,
'2024-12-23 11:17:32'
,
b
'0'
,
b
'0'
,
'invoice application/amendment'
,
b
'0'
,
NULL
,
NULL
);
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
,
`badge_field`
)
VALUES
(
'开票管理'
,
''
,
2
,
2
,
1624
,
'invoiceManagement'
,
'order'
,
'ecw/financial/invoiceManagement'
,
0
,
'1'
,
'2024-12-24 18:13:46'
,
'1'
,
'2024-12-24 18:13:46'
,
b
'0'
,
b
'1'
,
'invoiceManagement'
,
b
'0'
,
NULL
,
NULL
);
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
,
`badge_field`
)
VALUES
(
'收款数据审批列表'
,
''
,
2
,
2
,
1624
,
'collectionApprovalList'
,
'clipboard'
,
'ecw/financial/collectionApprovalList'
,
0
,
'1'
,
'2025-01-03 08:58:08'
,
'1'
,
'2025-01-03 08:58:08'
,
b
'0'
,
b
'1'
,
'collectionApprovalList'
,
b
'0'
,
NULL
,
NULL
);
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
,
`badge_field`
)
VALUES
(
'审批'
,
'ecw:collectionApprovalList:update'
,
3
,
1
,
2388
,
''
,
''
,
''
,
0
,
'1'
,
'2025-01-03 16:59:36'
,
'1'
,
'2025-01-03 16:59:36'
,
b
'0'
,
b
'1'
,
'approve'
,
b
'0'
,
NULL
,
NULL
);
\ No newline at end of file
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
,
`badge_field`
)
VALUES
(
'审批'
,
'ecw:collectionApprovalList:update'
,
3
,
1
,
2388
,
''
,
''
,
''
,
0
,
'1'
,
'2025-01-03 16:59:36'
,
'1'
,
'2025-01-03 16:59:36'
,
b
'0'
,
b
'1'
,
'approve'
,
b
'0'
,
NULL
,
NULL
);
UPDATE
`system_menu`
SET
`name`
=
'银行账户'
,
`permission`
=
''
,
`menu_type`
=
2
,
`sort`
=
9
,
`parent_id`
=
1624
,
`path`
=
'bank-account'
,
`icon`
=
'lock'
,
`component`
=
'ecw/bankAccount/index'
,
`status`
=
0
,
`creator`
=
''
,
`create_time`
=
'2022-05-09 11:40:51'
,
`updater`
=
'1'
,
`update_time`
=
'2024-12-20 13:36:45'
,
`deleted`
=
b
'0'
,
`is_show_in_menu_bar`
=
b
'1'
,
`name_en`
=
'Bank account management'
,
`keepalive`
=
b
'0'
,
`redirect`
=
NULL
,
`badge_field`
=
NULL
WHERE
`id`
=
1269
;
UPDATE
`system_dict_data`
SET
`status`
=
1
WHERE
`id`
=
1784
;
UPDATE
`system_dict_data`
SET
`label`
=
'审批拒绝'
WHERE
`id`
=
2096
;
\ No newline at end of file
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
7661f1fa
...
...
@@ -2298,11 +2298,12 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
List
<
Long
>
orderIdList2
=
guanlianList
.
stream
().
map
(
OrderGuanlianDO:
:
getRelateOrderId
).
collect
(
Collectors
.
toList
());
// 合并
orderIdList1
.
addAll
(
orderIdList2
);
// 去除orderId
orderIdList1
.
remove
(
orderId
);
// 去重
orderIdList1
=
orderIdList1
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
// 去除orderId
orderIdList1
.
remove
(
orderId
);
// 根据orderIdLists查询关联订单
List
<
BoxPreloadGoodsBackVO
>
goodsItemList
=
boxPreloadGoodsService
.
getGuanLianGoodItemList
(
orderIdList1
);
...
...
@@ -2760,6 +2761,39 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
public
BoxCabinetLoadVO
getBoxCabinetDetail
(
Long
shipmentId
)
{
List
<
BoxLoadSectionBackVO
>
boxLoadDetailBackVO
=
boxPreloadGoodsService
.
loadSecGoodsList
(
shipmentId
);
//查询所有库区库域信息
List
<
WarehouseAreaDO
>
areaList
=
warehouseAreaService
.
list
(
new
LambdaQueryWrapper
<>());
List
<
WarehouseAreaPositionDO
>
positionList
=
warehouseAreaPositionService
.
list
(
new
LambdaQueryWrapper
<>());
for
(
BoxLoadSectionBackVO
sectionBackVO
:
boxLoadDetailBackVO
)
{
List
<
BoxLoadOrderVO
>
orderList
=
sectionBackVO
.
getSectionOrderList
();
if
(
CollectionUtil
.
isEmpty
(
orderList
))
continue
;
for
(
BoxLoadOrderVO
orderVO
:
orderList
)
{
Long
orderId
=
orderVO
.
getOrderId
();
List
<
OrderLocationDO
>
orderLocationLists
=
orderLocationService
.
getOrderLocationListByOrderId
(
orderId
);
//按照订单纬度返回信息,分组
Map
<
String
,
List
<
OrderLocationDO
>>
positionMap
=
orderLocationLists
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
t
->
t
.
getOrderId
()
+
"_"
+
// t.getOrderItemId() + "_" +
t
.
getWareId
()
+
"_"
+
t
.
getAreaId
()
+
"_"
+
t
.
getLocationId
()));
List
<
OrderLocationDO
>
locationList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
List
<
OrderLocationDO
>>
entry
:
positionMap
.
entrySet
())
{
List
<
OrderLocationDO
>
orderLocationDOList
=
entry
.
getValue
();
locationList
.
add
(
orderLocationDOList
.
get
(
0
));
}
String
positionNo
=
matchLocation
(
areaList
,
positionList
,
locationList
);
orderVO
.
setPositionNo
(
positionNo
);
orderVO
.
setOrderLocationList
(
OrderLocationConvert
.
INSTANCE
.
convertList
(
locationList
));
List
<
BoxPreloadGoodsBackVO
>
orderGoodsItemList
=
orderVO
.
getGoodsList
();
for
(
BoxPreloadGoodsBackVO
itemVO
:
orderGoodsItemList
)
{
matchItemLocation
(
areaList
,
positionList
,
locationList
,
itemVO
);
}
}
}
BoxCabinetLoadVO
boxCabinetLoadVO
=
new
BoxCabinetLoadVO
();
boxCabinetLoadVO
.
setLoadDetail
(
boxLoadDetailBackVO
);
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxController.http
View file @
7661f1fa
...
...
@@ -7,7 +7,7 @@ Content-Type: application/json
### tallyListGuanlianOrder
POST {{baseUrl}}/shipment/box/tallyListGuanlianOrder?orderId=
3400
POST {{baseUrl}}/shipment/box/tallyListGuanlianOrder?orderId=
83785
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
...
...
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/MyBoxController.http
0 → 100644
View file @
7661f1fa
### 获得装柜详情 cabinetDetail
GET {{baseUrl}}/my/shipment/cabinetDetail?shipmentId=2497
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/ReceiptStatusEnum.java
View file @
7661f1fa
...
...
@@ -15,10 +15,10 @@ public enum ReceiptStatusEnum implements IntArrayValuable {
WRITE_OFF_WAITING
(
2
,
"待提交"
,
"write_off_waiting"
),
WRITE_OFF_PART_ING
(
3
,
"已部分核销"
,
"write_off_part_ing"
),
WRITE_OFF_ALL_SUCCESS
(
4
,
"已核销"
,
"WRITE_OFF_ALL_SUCCESS"
),
WRITE_OFF_ALL_OPENING
(
5
,
"已核销,待开票"
,
"WRITE_OFF_ALL_OPENING"
),
//
WRITE_OFF_ALL_OPENING(5, "已核销,待开票", "WRITE_OFF_ALL_OPENING"),
OPEN_BILL
(
6
,
"已开票"
,
"OPEN_BILL"
),
APPROVE_ING
(
7
,
"审核中"
,
"APPROVE_ING"
),
APPROVE_FAIL
(
8
,
"审
核失败
"
,
"APPROVE_FAIL"
),
APPROVE_FAIL
(
8
,
"审
批拒绝
"
,
"APPROVE_FAIL"
),
APPROVE_NEGATION
(
9
,
"反审核中"
,
"APPROVE_NEGATION"
),
WRITE_OFF_ALL_ING
(
10
,
"全部核销中"
,
"WRITE_OFF_ALL_ING"
),
WRITE_OFF_ALL_NEGATION
(
11
,
"反核销审核中"
,
"WRITE_OFF_ALL_NEGATION"
),
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java
View file @
7661f1fa
...
...
@@ -136,13 +136,7 @@ public class FinanceReceiptApproveService {
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
//需要根据是否要开票变成已核销,还是已核销待开票
if
(
receiptDO
.
getOpenInvoice
()
==
0
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
}
if
(
receiptDO
.
getOpenInvoice
()
==
1
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_OPENING
.
getValue
());
}
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
//更新收该收款单下的应收为收款完成状态
LambdaUpdateWrapper
<
ReceivableDO
>
lambdaUpdateWrapper
=
new
LambdaUpdateWrapper
();
...
...
@@ -207,21 +201,10 @@ public class FinanceReceiptApproveService {
List
orderIds
=
orderList
.
stream
().
map
(
ReceivableDO:
:
getOrderId
).
distinct
().
collect
(
Collectors
.
toList
());
receivableService
.
orderReceivableCancelWriteOffLogAdd
(
orderIds
,
receiptDO
.
getReceiptNo
());
}
else
if
(
result
==
BpmProcessInstanceResultEnum
.
REJECT
.
getResult
())
{
//需要根据是否要开票变成已核销,还是已核销待开票
if
(
receiptDO
.
getOpenInvoice
()
==
0
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
}
if
(
receiptDO
.
getOpenInvoice
()
==
1
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_OPENING
.
getValue
());
}
//已核销待开票状态已取消
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
}
else
if
(
result
==
BpmProcessInstanceResultEnum
.
CANCEL
.
getResult
())
{
//需要根据是否要开票变成已核销,还是已核销待开票
if
(
receiptDO
.
getOpenInvoice
()
==
0
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
}
if
(
receiptDO
.
getOpenInvoice
()
==
1
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_OPENING
.
getValue
());
}
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
}
updateReceipt
.
setComment
(
comment
);
receiptMapper
.
updateById
(
updateReceipt
);
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
View file @
7661f1fa
...
...
@@ -1027,13 +1027,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
// updateReceipt.setOrderId(receiptDO.getOrderId());
updateReceipt
.
setId
(
receiptDO
.
getId
());
//需要根据是否要开票变成已核销,还是已核销待开票
if
(
receiptDO
.
getOpenInvoice
()
==
0
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
}
if
(
receiptDO
.
getOpenInvoice
()
==
1
)
{
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_OPENING
.
getValue
());
}
updateReceipt
.
setState
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
());
updateReceipt
.
setWriteOffAt
(
new
Date
());
updateReceipt
.
setWriteOffProportion
(
new
BigDecimal
(
"100"
));
//设置核销比例
...
...
@@ -1103,16 +1097,18 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
List
<
ReceiptLogBackVO
>
receiptLogVOS
=
ReceiptConvert
.
INSTANCE
.
convertLogList
(
receiptLogDOS
);
backVO
.
setLogList
(
receiptLogVOS
);
}
if
(
receiptDO
.
getInvoiceId
()
!=
null
)
{
if
(
receiptDO
.
get
OpenInvoice
()
!=
null
&&
receiptDO
.
getOpenInvoice
()
==
1
&&
receiptDO
.
get
InvoiceId
()
!=
null
)
{
ReceiptInvoiceDO
receiptInvoiceDO
=
receiptInvoiceMapper
.
selectById
(
receiptDO
.
getInvoiceId
());
InvoiceInReceiptRespVO
invoiceInReceiptRespVO
=
ReceiptInvoiceConvert
.
INSTANCE
.
convertRespVO
(
receiptInvoiceDO
);
if
(
receiptInvoiceDO
.
getInvoicerId
()
!=
null
)
{
invoiceInReceiptRespVO
.
setInvoicerName
(
adminUserApi
.
getUserName
(
receiptInvoiceDO
.
getInvoicerId
().
toString
()));
if
(
receiptInvoiceDO
!=
null
)
{
InvoiceInReceiptRespVO
invoiceInReceiptRespVO
=
ReceiptInvoiceConvert
.
INSTANCE
.
convertRespVO
(
receiptInvoiceDO
);
if
(
receiptInvoiceDO
.
getInvoicerId
()
!=
null
)
{
invoiceInReceiptRespVO
.
setInvoicerName
(
adminUserApi
.
getUserName
(
receiptInvoiceDO
.
getInvoicerId
().
toString
()));
}
invoiceInReceiptRespVO
.
setInvoice
(
receiptInvoiceDO
.
getInvoiceHeader
());
invoiceInReceiptRespVO
.
setAddressPhone
(
receiptInvoiceDO
.
getInvoiceAddress
());
invoiceInReceiptRespVO
.
setProjectName
(
receiptInvoiceDO
.
getInvoiceItem
());
backVO
.
setInvoiceVO
(
invoiceInReceiptRespVO
);
}
invoiceInReceiptRespVO
.
setInvoice
(
receiptInvoiceDO
.
getInvoiceHeader
());
invoiceInReceiptRespVO
.
setAddressPhone
(
receiptInvoiceDO
.
getInvoiceAddress
());
invoiceInReceiptRespVO
.
setProjectName
(
receiptInvoiceDO
.
getInvoiceItem
());
backVO
.
setInvoiceVO
(
invoiceInReceiptRespVO
);
}
backVO
.
setCreator
(
adminUserApi
.
getUserName
(
receiptDO
.
getCreator
()));
backVO
.
setUpdater
(
adminUserApi
.
getUserName
(
receiptDO
.
getUpdater
()));
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptInvoice/ReceiptInvoiceServiceImpl.java
View file @
7661f1fa
...
...
@@ -31,6 +31,7 @@ import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO;
import
cn.iocoder.yudao.module.wealth.vo.receivable.WealthMoneyAmountVO
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -86,6 +87,13 @@ public class ReceiptInvoiceServiceImpl extends AbstractService<ReceiptInvoiceMap
}
// 校验收款单状态
checkReceiptForCreateInvoice
(
receiptDO
);
// 检查之前是否有取消的开票信息
ReceiptInvoiceDO
canceledInvoice
=
receiptInvoiceMapper
.
selectOne
(
Wrappers
.
lambdaQuery
(
ReceiptInvoiceDO
.
class
)
.
eq
(
ReceiptInvoiceDO:
:
getReceiptId
,
receiptDO
.
getId
())
.
isNotNull
(
ReceiptInvoiceDO:
:
getCancelUserId
));
if
(
canceledInvoice
!=
null
)
{
receiptInvoiceMapper
.
deleteById
(
canceledInvoice
.
getId
());
}
// 创建开票资料
ReceiptInvoiceDO
receiptInvoiceDO
=
ReceiptInvoiceConvert
.
INSTANCE
.
convert
(
createReqVO
);
receiptInvoiceDO
.
setInvoiceNo
(
wealthGenCodeUtils
.
generateInvoiceCode
());
...
...
@@ -278,6 +286,7 @@ public class ReceiptInvoiceServiceImpl extends AbstractService<ReceiptInvoiceMap
receiptDO
.
setId
(
receiptInvoiceDO
.
getReceiptId
());
receiptDO
.
setOpenInvoice
(
0
);
receiptDO
.
setInvoicingStatus
(
CANCELLED
.
getValue
());
receiptDO
.
setInvoiceDataStatus
(
REJECT
.
getValue
());
receiptMapper
.
updateById
(
receiptDO
);
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
receiptInvoiceDO
.
setCancelUserId
(
loginUser
.
getId
());
...
...
@@ -312,8 +321,8 @@ public class ReceiptInvoiceServiceImpl extends AbstractService<ReceiptInvoiceMap
receiptDO
.
setId
(
receiptInvoiceDO
.
getReceiptId
());
receiptDO
.
setInvoicingStatus
(
InvoicingStatusEnum
.
WAIT
.
getValue
());
receiptMapper
.
updateById
(
receiptDO
);
recordLog
(
receiptInvoiceDO
.
get
Receipt
Id
(),
InvoicingLinkEnum
.
DELETE_INVOICE_INFO
,
reqVO
.
getRemark
(),
null
);
return
null
;
recordLog
(
receiptInvoiceDO
.
getId
(),
InvoicingLinkEnum
.
DELETE_INVOICE_INFO
,
reqVO
.
getRemark
(),
null
);
return
true
;
}
/**
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
View file @
7661f1fa
...
...
@@ -577,9 +577,6 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
if
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
()
==
receiptDO
.
getState
())
{
throw
exception
(
RECEIPT_WRITE_OFF_ALL_SUCCESS_ITEM_NOT_APPROVE
);
}
if
(
ReceiptStatusEnum
.
WRITE_OFF_ALL_OPENING
.
getValue
()
==
receiptDO
.
getState
())
{
throw
exception
(
RECEIPT_WRITE_OFF_ALL_SUCCESS_ITEM_NOT_APPROVE
);
}
if
(
ReceiptStatusEnum
.
OPEN_BILL
.
getValue
()
==
receiptDO
.
getState
())
{
throw
exception
(
RECEIPT_WRITE_OFF_ALL_SUCCESS_ITEM_NOT_APPROVE
);
}
...
...
@@ -839,7 +836,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
Map
<
Long
,
List
<
ReceivableDO
>>
receivableCollect
=
receivableDOS
.
stream
().
filter
(
receivableDO
->
receivableDO
.
getReceiptId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
ReceivableDO:
:
getReceiptId
));
ReceiptDO
matchReceiptDO
=
receivableCollect
.
keySet
().
stream
()
.
map
(
receiptId
->
receiptService
.
selectOne
(
"id"
,
receiptId
))
.
filter
(
receivableDO
->
!
Objects
.
equals
(
receivableDO
.
getState
(),
ReceiptStatusEnum
.
DRAFT
.
getValue
())
&&
!
Objects
.
equals
(
receivableDO
.
getState
(),
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
())
&&
!
Objects
.
equals
(
receivableDO
.
getState
(),
ReceiptStatusEnum
.
WRITE_OFF_ALL_OPENING
.
getValue
())
)
.
filter
(
receivableDO
->
!
Objects
.
equals
(
receivableDO
.
getState
(),
ReceiptStatusEnum
.
DRAFT
.
getValue
())
&&
!
Objects
.
equals
(
receivableDO
.
getState
(),
ReceiptStatusEnum
.
WRITE_OFF_ALL_SUCCESS
.
getValue
()))
.
max
(
Comparator
.
comparingLong
(
r
->
r
.
getCreateTime
().
getTime
()))
.
orElse
(
null
);
if
(
null
==
matchReceiptDO
)
{
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
7661f1fa
...
...
@@ -634,7 +634,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
receivableInItemVO
.
setWriteOffAmountUsd
(
totalWriteOffAmount
);
receivableInItemVO
.
setNotWriteOffAmountUsd
(
receivableInItemVO
.
getBaseAmount
().
subtract
(
totalWriteOffAmount
));
}
receivableInItemVOS
.
sort
(
Comparator
.
comparing
(
ReceivableInItemVO:
:
getNotWriteOffAmountUsd
)
.
reversed
()
);
receivableInItemVOS
.
sort
(
Comparator
.
comparing
(
ReceivableInItemVO:
:
getNotWriteOffAmountUsd
));
return
receivableInItemVOS
;
}
...
...
@@ -660,7 +660,7 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
}
receivableInItemVO
.
setNotWriteOffAmountUsd
(
receivableInItemVO
.
getBaseAmount
().
subtract
(
receivableInItemVO
.
getWriteOffAmountUsd
()));
}
receivableInItemVOS
.
sort
(
Comparator
.
comparing
(
ReceivableInItemVO:
:
getNotWriteOffAmountUsd
)
.
reversed
()
);
receivableInItemVOS
.
sort
(
Comparator
.
comparing
(
ReceivableInItemVO:
:
getNotWriteOffAmountUsd
));
return
receivableInItemVOS
;
}
...
...
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