Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
23c21216
Commit
23c21216
authored
Dec 05, 2023
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改排序规则
parent
3409ad35
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
17 行删除
+11
-17
InventorySummaryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventorySummaryServiceImpl.java
+11
-17
没有找到文件。
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/InventorySummaryServiceImpl.java
View file @
23c21216
...
...
@@ -102,12 +102,12 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
long
size
=
list
(
wp
).
size
();
//对该装备typeId进行排序
Collections
.
sort
(
list
,
new
Comparator
<
InventorySummary
>()
{
@Override
public
int
compare
(
InventorySummary
o1
,
InventorySummary
o2
)
{
return
o1
.
getTypeId
().
compareTo
(
o2
.
getTypeId
());
}
});
//
Collections.sort(list, new Comparator<InventorySummary>() {
//
@Override
//
public int compare(InventorySummary o1, InventorySummary o2) {
//
return o1.getTypeId().compareTo(o2.getTypeId());
//
}
//
});
Page
<
InventorySummary
>
page1
=
PageFactory
.
getDefaultPage
(
req
.
getPageNo
(),
req
.
getPageSize
());
page1
.
setRecords
(
list
);
...
...
@@ -407,10 +407,6 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
}
//根据组织机构号查询
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrgId
()),
InventorySummary:
:
getOrgId
,
req
.
getOrgId
());
// wrapper.and(qw -> {
// qw.eq(ObjectUtil.isNotEmpty(req.getOrgId()), InventorySummary::getOrgId, req.getOrgId());
// // 其他条件...
// });
//根据组织机构名模糊查询
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getOrgName
()),
InventorySummary:
:
getOrgName
,
req
.
getOrgName
());
//位置id(单警柜/仓库)
...
...
@@ -419,8 +415,6 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
wrapper
.
eq
(
ObjectUtil
.
isNotEmpty
(
req
.
getLocationType
()),
InventorySummary:
:
getLocationType
,
req
.
getLocationType
());
//位置信息
wrapper
.
like
(
ObjectUtil
.
isNotEmpty
(
req
.
getLocationName
()),
InventorySummary:
:
getLocationName
,
req
.
getLocationName
());
//装备类别名称
// wrapper.like(ObjectUtil.isNotEmpty(req.getTypeName()), InventorySummary::getTypeName, req.getTypeName());
//根据类别
if
(
ObjectUtil
.
isNotEmpty
(
req
.
typeIds
)
&&
req
.
typeIds
.
size
()>
0
)
{
wrapper
.
and
(
qw
->
req
.
typeIds
.
forEach
(
typeId
->
qw
.
or
().
eq
(
InventorySummary:
:
getTypeId
,
typeId
)));
...
...
@@ -429,14 +423,14 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getSizeNames
())
&&
req
.
getSizeNames
().
size
()>
0
)
{
wrapper
.
and
(
qw
->
req
.
getSizeNames
().
forEach
(
sizeName
->
qw
.
or
().
eq
(
InventorySummary:
:
getSizeName
,
sizeName
)));
}
//型号名称
// wrapper.like(ObjectUtil.isNotEmpty(req.getSizeName()), InventorySummary::getSizeName, req.getSizeName());
//号型
// wrapper.eq(ObjectUtil.isNotEmpty(req.getSizeId()), InventorySummary::getSizeId, req.getSizeId());
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getColumn
()))
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getColumn
())&&!
req
.
getColumn
().
equals
(
"create_time"
))
{
wrapper
.
last
(
"order by "
+
req
.
getColumn
()
+
" "
+
req
.
getOrder
());
}
else
{
wrapper
.
last
(
"order by type_id"
);
}
return
wrapper
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论