Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
竹天卫
tianjin-cement
Commits
a9018979
Commit
a9018979
authored
Oct 30, 2020
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产值条件判断
parent
7fd10547
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+4
-3
QualityController.java
...wise/sc/cement/business/controller/QualityController.java
+1
-1
NormProductionServiceImpl.java
...ment/business/service/impl/NormProductionServiceImpl.java
+4
-1
PageUtil.java
...c/main/java/cn/wise/sc/cement/business/util/PageUtil.java
+4
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NormProductionController.java
View file @
a9018979
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.NormProduction
;
import
cn.wise.sc.cement.business.entity.NormProduction
;
...
@@ -118,7 +119,7 @@ public class NormProductionController {
...
@@ -118,7 +119,7 @@ public class NormProductionController {
return
BaseResponse
.
okData
(
rts
);
return
BaseResponse
.
okData
(
rts
);
}
}
}
}
return
BaseResponse
.
errorMsg
(
"没有找到相关数据!"
);
return
BaseResponse
.
okData
(
null
);
}
}
@GetMapping
(
"/statistics/detail"
)
@GetMapping
(
"/statistics/detail"
)
...
@@ -141,7 +142,7 @@ public class NormProductionController {
...
@@ -141,7 +142,7 @@ public class NormProductionController {
Page
<
NormProduction
.
NormProductionDetail
>
rts
=
PageUtil
.
listConvertToPage
(
collect
,
pageQuery
);
Page
<
NormProduction
.
NormProductionDetail
>
rts
=
PageUtil
.
listConvertToPage
(
collect
,
pageQuery
);
return
BaseResponse
.
okData
(
rts
);
return
BaseResponse
.
okData
(
rts
);
}
}
return
BaseResponse
.
errorMsg
(
"没有找到相关数据!"
);
return
BaseResponse
.
okData
(
null
);
}
}
@GetMapping
(
"/total/production"
)
@GetMapping
(
"/total/production"
)
...
@@ -156,7 +157,7 @@ public class NormProductionController {
...
@@ -156,7 +157,7 @@ public class NormProductionController {
}
}
List
<
ProductionVo
>
rts
=
iNormProductionService
.
production
(
name
,
startTime
,
endTime
,
groupId
);
List
<
ProductionVo
>
rts
=
iNormProductionService
.
production
(
name
,
startTime
,
endTime
,
groupId
);
if
(!
rts
.
isEmpty
(
))
{
if
(!
CollectionUtil
.
isEmpty
(
rts
))
{
Set
<
Integer
>
ids
=
new
HashSet
<>();
Set
<
Integer
>
ids
=
new
HashSet
<>();
for
(
ProductionVo
productionVo
:
rts
)
{
for
(
ProductionVo
productionVo
:
rts
)
{
Integer
groupId1
=
productionVo
.
getGroupId
();
Integer
groupId1
=
productionVo
.
getGroupId
();
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/QualityController.java
View file @
a9018979
...
@@ -61,7 +61,7 @@ public class QualityController {
...
@@ -61,7 +61,7 @@ public class QualityController {
List
<
EntrustVo
>
records
=
baseResponse
.
getData
().
getRecords
();
List
<
EntrustVo
>
records
=
baseResponse
.
getData
().
getRecords
();
if
(
records
.
size
()
==
0
)
{
if
(
records
.
size
()
==
0
)
{
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
return
BaseResponse
.
okData
(
null
);
}
}
List
<
Integer
>
projectIds
=
records
.
stream
().
map
(
EntrustVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
projectIds
=
records
.
stream
().
map
(
EntrustVo:
:
getId
).
collect
(
Collectors
.
toList
());
Set
<
Integer
>
qualityApplyIds
=
iQualityApplyService
.
selectQualityApplyStatusByProIds
(
projectIds
);
Set
<
Integer
>
qualityApplyIds
=
iQualityApplyService
.
selectQualityApplyStatusByProIds
(
projectIds
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NormProductionServiceImpl.java
View file @
a9018979
...
@@ -250,7 +250,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -250,7 +250,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
normProductionDetails
(
null
,
start
,
end
);
normProductionDetails
(
null
,
start
,
end
);
if
(
normProductionDetails
.
size
()
==
0
)
{
if
(
normProductionDetails
.
size
()
==
0
)
{
BaseResponse
<
List
<
NormProductionStatistics
>>
rts
=
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
BaseResponse
<
List
<
NormProductionStatistics
>>
rts
=
BaseResponse
.
okData
(
null
);
rts
.
setData
(
new
ArrayList
<>());
rts
.
setData
(
new
ArrayList
<>());
return
rts
;
return
rts
;
}
}
...
@@ -435,6 +435,9 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -435,6 +435,9 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
//处理非标准产值没有用名职位信息
//处理非标准产值没有用名职位信息
QueryWrapper
<
SysUser
>
qw
=
new
QueryWrapper
<>();
QueryWrapper
<
SysUser
>
qw
=
new
QueryWrapper
<>();
qw
.
in
(
"id"
,
userIds
);
qw
.
in
(
"id"
,
userIds
);
if
(
CollectionUtil
.
isEmpty
(
userIds
)){
return
null
;
}
List
<
SysUser
>
users
=
iSysUserService
.
list
(
qw
);
List
<
SysUser
>
users
=
iSysUserService
.
list
(
qw
);
List
<
SysPost
>
sysPosts
=
iSysPostService
.
list
();
List
<
SysPost
>
sysPosts
=
iSysPostService
.
list
();
List
<
SysGroup
>
sysGroups
=
iSysGroupService
.
list
();
List
<
SysGroup
>
sysGroups
=
iSysGroupService
.
list
();
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/PageUtil.java
View file @
a9018979
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -13,6 +14,9 @@ import java.util.List;
...
@@ -13,6 +14,9 @@ import java.util.List;
public
class
PageUtil
{
public
class
PageUtil
{
public
static
<
T
>
Page
<
T
>
listConvertToPage
(
List
<
T
>
list
,
PageQuery
pageQuery
)
{
public
static
<
T
>
Page
<
T
>
listConvertToPage
(
List
<
T
>
list
,
PageQuery
pageQuery
)
{
if
(
CollectionUtil
.
isEmpty
(
list
)){
return
null
;
}
int
start
=
pageQuery
.
getPageNo
()
>
0
?
pageQuery
.
getPageNo
()
:
1
;
int
start
=
pageQuery
.
getPageNo
()
>
0
?
pageQuery
.
getPageNo
()
:
1
;
int
pageSize
=
pageQuery
.
getPageSize
()
>
0
?
pageQuery
.
getPageSize
()
:
10
;
int
pageSize
=
pageQuery
.
getPageSize
()
>
0
?
pageQuery
.
getPageSize
()
:
10
;
int
end
=
Math
.
min
((
start
*
pageSize
),
list
.
size
());
int
end
=
Math
.
min
((
start
*
pageSize
),
list
.
size
());
...
...
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