Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
32795867
提交
32795867
authored
8月 12, 2024
作者:
jiangwujie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v20.9_settlement_20240805' into test
上级
f5ddc946
4405b3be
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
75 行增加
和
4 行删除
+75
-4
OwnerAccountServiceImpl.java
...clx/performance/service/impl/OwnerAccountServiceImpl.java
+3
-2
SettlementOwnerDetailServiceImpl.java
...service/impl/settle/SettlementOwnerDetailServiceImpl.java
+0
-2
OwnerAccountServiceImplTest.java
...java/com/clx/performance/OwnerAccountServiceImplTest.java
+72
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/service/impl/OwnerAccountServiceImpl.java
浏览文件 @
32795867
...
...
@@ -1296,7 +1296,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override
public
SXSSFWorkbook
exportPrepaidFreightList
(
PageOwnerAccountListParam
param
)
{
param
.
setPage
(
1
);
param
.
setPageSize
(
1000000
);
IPage
<
OwnerAccountVO
>
page
=
ownerAccountDao
.
pageList
(
param
);
List
<
OwnerAccountVO
>
list
=
page
.
getRecords
();
...
...
@@ -1306,7 +1307,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
fieldList
.
add
(
new
ExcelField
(
1
,
"货主名称"
,
"ownerUserNo"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
2
,
"联系电话"
,
"ownerName"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
3
,
"账户类型"
,
"mobile"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
4
,
"账户余额"
,
"accountType"
,
1
5000
));
fieldList
.
add
(
new
ExcelField
(
4
,
"账户余额"
,
"accountType"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
5
,
"可用余额"
,
"runningWaterType"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
6
,
"冻结余额"
,
"orderNo"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
7
,
"创建人"
,
"alterationBalance"
,
5000
));
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementOwnerDetailServiceImpl.java
浏览文件 @
32795867
...
...
@@ -92,8 +92,6 @@ public class SettlementOwnerDetailServiceImpl implements SettlementOwnerDetailS
@Autowired
private
FileUploadFeign
fileUploadFeign
;
@Override
public
Integer
saveSettlementDetail
(
OrderChild
orderChild
,
OrderGoods
orderGoods
,
SettlementDriverDetail
settlementDriverDetail
)
{
...
...
performance-web/src/test/java/com/clx/performance/OwnerAccountServiceImplTest.java
0 → 100644
浏览文件 @
32795867
package
com
.
clx
.
performance
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO
;
import
com.clx.performance.dao.OwnerAccountDao
;
import
com.clx.performance.param.pc.PageOwnerAccountListParam
;
import
com.clx.performance.service.impl.OwnerAccountServiceImpl
;
import
com.clx.performance.vo.pc.OwnerAccountVO
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.InjectMocks
;
import
org.mockito.Mock
;
import
org.mockito.junit.MockitoJUnitRunner
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
org
.
mockito
.
Mockito
.
when
;
@RunWith
(
MockitoJUnitRunner
.
class
)
public
class
OwnerAccountServiceImplTest
{
@Mock
private
OwnerAccountDao
ownerAccountDao
;
@InjectMocks
private
OwnerAccountServiceImpl
ownerAccountService
;
private
PageOwnerAccountListParam
param
;
@Before
public
void
setUp
()
{
param
=
new
PageOwnerAccountListParam
();
// Assuming there's a default page size set in PageOwnerAccountListParam
param
.
setPageSize
(
10
);
param
.
setPage
(
1
);
}
@Test
public
void
testExportPrepaidFreightList
()
throws
IOException
{
List
<
OwnerAccountVO
>
records
=
new
ArrayList
<>();
OwnerAccountVO
accountVO
=
new
OwnerAccountVO
();
accountVO
.
setId
(
18
);
accountVO
.
setOwnerUserNo
(
"188888"
);
accountVO
.
setOwnerUserName
(
"owner88"
);
accountVO
.
setMobile
(
"18888888888"
);
accountVO
.
setAccountType
(
1
);
accountVO
.
setAccountBalance
(
new
BigDecimal
(
"8888.88"
));
accountVO
.
setUsableBalance
(
new
BigDecimal
(
"8888.88"
));
accountVO
.
setFrozenBalance
(
new
BigDecimal
(
"8888.88"
));
accountVO
.
setCreateBy
(
"domino.j"
);
accountVO
.
setCreateTime
(
"2024-08-07 14:15:18"
);
accountVO
.
setModifiedTime
(
"2024-08-07 14:15:18"
);
records
.
add
(
accountVO
);
PageDTO
page
=
new
PageDTO
(
1
,
10000
);
page
.
setRecords
(
records
);
// Mock the behavior of the ownerAccountDao
when
(
ownerAccountDao
.
pageList
(
param
)).
thenReturn
(
page
);
// Perform the test
SXSSFWorkbook
workbook
=
ownerAccountService
.
exportPrepaidFreightList
(
param
);
workbook
.
write
(
new
java
.
io
.
FileOutputStream
(
"ccc.xlsx"
));
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论