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
546ae57d
Commit
546ae57d
authored
Oct 30, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
2bccf2fa
a9018979
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
18 deletions
+25
-18
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+16
-6
QualityController.java
...wise/sc/cement/business/controller/QualityController.java
+1
-1
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+0
-1
NormProductionServiceImpl.java
...ment/business/service/impl/NormProductionServiceImpl.java
+4
-10
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 @
546ae57d
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
;
...
@@ -9,12 +10,14 @@ import cn.wise.sc.cement.business.model.PageQuery;
...
@@ -9,12 +10,14 @@ import cn.wise.sc.cement.business.model.PageQuery;
import
cn.wise.sc.cement.business.model.vo.NormProductionVo
;
import
cn.wise.sc.cement.business.model.vo.NormProductionVo
;
import
cn.wise.sc.cement.business.model.vo.ProductionVo
;
import
cn.wise.sc.cement.business.model.vo.ProductionVo
;
import
cn.wise.sc.cement.business.model.vo.WorkloadStatisticsVo
;
import
cn.wise.sc.cement.business.model.vo.WorkloadStatisticsVo
;
import
cn.wise.sc.cement.business.service.INonStandardValueService
;
import
cn.wise.sc.cement.business.service.INormProductionService
;
import
cn.wise.sc.cement.business.service.INormProductionService
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -29,6 +32,7 @@ import java.util.Date;
...
@@ -29,6 +32,7 @@ import java.util.Date;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
/**
* <p>
* <p>
...
@@ -45,7 +49,8 @@ public class NormProductionController {
...
@@ -45,7 +49,8 @@ public class NormProductionController {
final
final
INormProductionService
iNormProductionService
;
INormProductionService
iNormProductionService
;
@Autowired
INonStandardValueService
inonStandardValueService
;
public
NormProductionController
(
INormProductionService
iNormProductionService
)
{
public
NormProductionController
(
INormProductionService
iNormProductionService
)
{
this
.
iNormProductionService
=
iNormProductionService
;
this
.
iNormProductionService
=
iNormProductionService
;
}
}
...
@@ -114,7 +119,7 @@ public class NormProductionController {
...
@@ -114,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"
)
...
@@ -128,11 +133,16 @@ public class NormProductionController {
...
@@ -128,11 +133,16 @@ public class NormProductionController {
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
}
}
List
<
NormProduction
.
NormProductionDetail
>
data
=
iNormProductionService
.
normProductionDetails
(
userId
,
startTime
,
endTime
);
List
<
NormProduction
.
NormProductionDetail
>
data
=
iNormProductionService
.
normProductionDetails
(
userId
,
startTime
,
endTime
);
if
(
data
.
size
()
!=
0
)
{
Page
<
NormProduction
.
NormProductionDetail
>
rts
=
PageUtil
.
listConvertToPage
(
data
,
pageQuery
);
List
<
NormProduction
.
NormProductionDetail
>
collect
=
data
.
stream
()
.
filter
(
arg
->
arg
.
getUserId
().
intValue
()
==
userId
)
.
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()
!=
0
)
{
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"
)
...
@@ -147,7 +157,7 @@ public class NormProductionController {
...
@@ -147,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 @
546ae57d
...
@@ -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/controller/ReportController.java
View file @
546ae57d
...
@@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.PathVariable;
...
@@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NormProductionServiceImpl.java
View file @
546ae57d
...
@@ -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
;
}
}
...
@@ -346,22 +346,13 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -346,22 +346,13 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
* 1.获取处理派发表数据,获取标准产值配置,查询处理项。
* 1.获取处理派发表数据,获取标准产值配置,查询处理项。
* */
* */
//获取标准产值数据
//获取标准产值数据
QueryWrapper
<
SampleDistribution
>
qwDis
=
new
QueryWrapper
<>();
QueryWrapper
<
SampleHandle
>
qwHan
=
new
QueryWrapper
<>();
QueryWrapper
<
SampleCheckTeam
>
qwCT
=
new
QueryWrapper
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
2
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
2
);
if
(
userId
!=
null
&&
userId
>
0
)
{
if
(
userId
!=
null
&&
userId
>
0
)
{
qwDis
.
eq
(
"user_id"
,
userId
);
qwHan
.
eq
(
"user_id"
,
userId
);
qwCT
.
eq
(
"user_id"
,
userId
);
params
.
put
(
"user_id"
,
userId
);
params
.
put
(
"user_id"
,
userId
);
}
}
if
(
start
!=
null
&&
end
!=
null
)
{
if
(
start
!=
null
&&
end
!=
null
)
{
DateTime
startTime
=
DateUtil
.
date
(
start
);
DateTime
startTime
=
DateUtil
.
date
(
start
);
DateTime
endTime
=
DateUtil
.
date
(
end
);
DateTime
endTime
=
DateUtil
.
date
(
end
);
qwDis
.
between
(
"finish_time"
,
startTime
,
endTime
);
qwHan
.
between
(
"finish_time"
,
startTime
,
endTime
);
qwCT
.
between
(
"finish_time"
,
startTime
,
endTime
);
params
.
put
(
"start_time"
,
DateUtil
.
format
(
startTime
,
"yyyy-MM-dd"
));
params
.
put
(
"start_time"
,
DateUtil
.
format
(
startTime
,
"yyyy-MM-dd"
));
params
.
put
(
"end_time"
,
DateUtil
.
format
(
endTime
,
"yyyy-MM-dd"
));
params
.
put
(
"end_time"
,
DateUtil
.
format
(
endTime
,
"yyyy-MM-dd"
));
}
}
...
@@ -444,6 +435,9 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
...
@@ -444,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 @
546ae57d
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