Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sybzc
cloud-syb
Commits
7df404b7
Commit
7df404b7
authored
3 months ago
by
陈 挺
Browse files
Options
Download
Email Patches
Plain Diff
【销售台账】销售报表,借货订单的采购出现过转售的采购订单号单元格数据会显示为空
parent
9f3d9080
bug-SYB-9
P2.3.2024.07.01.qzjf
P2.3.2024.12.26
P2025.03.12
V2024.12.26
V2025.03.12
No related merge requests found
Pipeline
#12951
passed with stages
in 12 minutes and 51 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
server/cloud-syb/src/main/java/com/shusi/modules/financial/service/impl/FinancialLedgerServiceImpl.java
+9
-0
...es/financial/service/impl/FinancialLedgerServiceImpl.java
server/cloud-syb/src/main/java/com/shusi/modules/order/service/OrdersService.java
+7
-0
...n/java/com/shusi/modules/order/service/OrdersService.java
server/cloud-syb/src/main/java/com/shusi/modules/order/service/impl/OrdersServiceImpl.java
+22
-0
...m/shusi/modules/order/service/impl/OrdersServiceImpl.java
with
38 additions
and
0 deletions
+38
-0
server/cloud-syb/src/main/java/com/shusi/modules/financial/service/impl/FinancialLedgerServiceImpl.java
+
9
-
0
View file @
7df404b7
...
...
@@ -539,7 +539,14 @@ public class FinancialLedgerServiceImpl extends ServiceImpl<FinancialLedgerDao,
String
orderNo
=
originalOrder
.
stream
().
map
(
Orders:
:
getOrderNo
).
collect
(
Collectors
.
joining
(
","
));
excel
.
setOrderNo
(
orderNo
);
buyOrder
=
BeanUtil
.
copyProperties
(
originalOrder
.
get
(
0
),
OrdersDTO
.
class
);
}
else
{
Orders
orders
=
ordersService
.
recurseOriginalOrder
(
order
.
getOrderId
());
if
(
Objects
.
nonNull
(
orders
)){
excel
.
setOrderNo
(
orders
.
getOrderNo
());
buyOrder
=
BeanUtil
.
copyProperties
(
orders
,
OrdersDTO
.
class
);
}
}
// 计算买出售一笔所还的保证金
BigDecimal
bondPrice
=
BigDecimal
.
ZERO
;
if
(
buyOrder
!=
null
)
{
...
...
@@ -552,6 +559,8 @@ public class FinancialLedgerServiceImpl extends ServiceImpl<FinancialLedgerDao,
bondPrice
=
MoneyUtil
.
divide
(
bondAmount
,
buyOrder
.
getNum
());
}
}
excel
.
setSellOrderNo
(
ordersDTO
.
getOrderNo
());
// 缩写获取
List
<
GoodsProduct
>
collect
=
list
.
stream
().
filter
(
n
->
n
.
getGoodsProductId
().
equals
(
ordersDTO
.
getGoodsProductId
())).
collect
(
Collectors
.
toList
());
...
...
This diff is collapsed.
Click to expand it.
server/cloud-syb/src/main/java/com/shusi/modules/order/service/OrdersService.java
+
7
-
0
View file @
7df404b7
...
...
@@ -1049,5 +1049,12 @@ public interface OrdersService extends IService<Orders> {
* @return
*/
List
<
String
>
batchNoTicketMark
(
OrdersTicketDTO
dto
);
/**
* 多级订单递归查找一个原始采购单
* @param orderId
* @return
*/
Orders
recurseOriginalOrder
(
String
orderId
);
}
This diff is collapsed.
Click to expand it.
server/cloud-syb/src/main/java/com/shusi/modules/order/service/impl/OrdersServiceImpl.java
+
22
-
0
View file @
7df404b7
...
...
@@ -10,6 +10,7 @@ import cn.hutool.json.JSONUtil;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
...
...
@@ -1378,6 +1379,27 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
return
notMarkOrderNos
;
}
@Override
public
Orders
recurseOriginalOrder
(
String
orderId
)
{
List
<
OrderRelation
>
list
=
orderRelationService
.
list
(
new
LambdaQueryWrapper
<
OrderRelation
>().
eq
(
OrderRelation:
:
getAfterOrderId
,
orderId
));
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
OrderRelation
relation
=
list
.
get
(
0
);
String
orderIds
=
relation
.
getOriginalOrderId
();
String
preOrderId
=
relation
.
getPreOrderId
();
String
afterOrderId
=
relation
.
getAfterOrderId
();
if
(
StringUtils
.
isBlank
(
orderIds
))
{
return
recurseOriginalOrder
(
preOrderId
);
}
else
if
(
preOrderId
.
equals
(
afterOrderId
))
{
return
null
;
}
else
{
String
[]
split
=
orderIds
.
split
(
","
);
orderId
=
split
[
0
];
return
getById
(
orderId
);
}
}
return
null
;
}
@Override
public
List
<
OilTransferVO
>
oilTransferList
(
OilTransferDTO
oilTransferDTO
)
{
return
this
.
baseMapper
.
oilTransferList
(
oilTransferDTO
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets