Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
b3d7dc54
Commit
b3d7dc54
authored
Aug 16, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.安全追溯详情接口开发,自测bug修改
parent
d9286d5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
14 deletions
+28
-14
SafetyProblemTracingDto.java
...ot/module/statistics/api/dto/SafetyProblemTracingDto.java
+15
-3
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+13
-11
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/dto/SafetyProblemTracingDto.java
View file @
b3d7dc54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDateDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -25,6 +22,21 @@ public class SafetyProblemTracingDto extends DPFilterParamForDetailDto {
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键ID"
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"更新时间"
)
protected
Date
recDate
;
@ApiModelProperty
(
value
=
"更新人id"
)
protected
String
recUserId
;
@ApiModelProperty
(
value
=
"更新人"
)
protected
String
recUserName
;
@ApiModelProperty
(
value
=
"问题编号"
)
private
String
problemNum
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
View file @
b3d7dc54
...
...
@@ -1093,8 +1093,8 @@ public class AQZSDPStatisticsServiceImpl {
dto
.
setStrValue
(
"0"
);
}
else
{
List
<
CountDto
>
dtoList
=
statisticsMapper
.
selectByOrgAndMainBody
(
orgCode
,
null
,
sourceTypeCode
);
Long
allProblemNum
=
dtoList
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
equals
(
sourceTypeCode
)).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
Long
handledProblemNum
=
dtoList
.
stream
().
filter
(
c
->
c
.
get
KeyStr
().
equals
(
sourceTypeCode
)
&&
c
.
get
Label
().
equals
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
Long
allProblemNum
=
dtoList
.
stream
().
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
Long
handledProblemNum
=
dtoList
.
stream
().
filter
(
c
->
c
.
getLabel
().
equals
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
dto
.
setStrValue
(
calPercent
(
allProblemNum
,
handledProblemNum
));
}
return
dto
;
...
...
@@ -1115,34 +1115,36 @@ public class AQZSDPStatisticsServiceImpl {
public
Page
<
SafetyProblemTracingDto
>
getProblemRecords
(
Page
<
SafetyProblemTracingDto
>
page
,
SafetyProblemTracingDto
problemModel
)
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
problemModel
.
getCityCode
());
if
(
orgCode
==
null
){
if
(
orgCode
==
null
)
{
return
new
Page
<>();
}
problemModel
.
setGoverningBodyOrgCode
(
orgCode
);
// 使用orgCode过滤
problemModel
.
setRegionCode
(
null
);
// 将单位类型从code转化为value
if
(!
ValidationUtil
.
isEmpty
(
problemModel
.
getPrincipalUnitType
())){
if
(!
ValidationUtil
.
isEmpty
(
problemModel
.
getPrincipalUnitType
()))
{
Collection
<
DataDictionary
>
unitTypeList
=
dataDictionaryMapper
.
selectList
(
new
QueryWrapper
<
DataDictionary
>()
.
eq
(
"type"
,
"UNIT_TYPE_NEW"
)
.
eq
(
"is_delete"
,
false
)
.
orderByAsc
(
"sort_num"
));
Map
<
String
,
String
>
unitTypeMap
=
unitTypeList
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
problemModel
.
setPrincipalUnitType
(
unitTypeMap
.
getOrDefault
(
problemModel
.
getPrincipalUnitType
(),
null
));
problemModel
.
setPrincipalUnitType
(
unitTypeMap
.
getOrDefault
(
problemModel
.
getPrincipalUnitType
(),
null
));
}
if
(
problemModel
.
getTimeSearchOne
()
!=
null
)
{
if
(
problemModel
.
getTimeSearchOne
()
!=
null
)
{
problemModel
.
setProblemTimeStart
(
problemModel
.
getTimeSearchOne
().
getBeginDate
());
problemModel
.
setProblemTimeEnd
(
problemModel
.
getTimeSearchOne
().
getEndDate
());
}
// 前端详情固定给的treeValue,后端进行进行字段转换
problemModel
.
setSourceTypeCode
(
problemModel
.
getTreeValue
());
return
statisticsMapper
.
queryForSafetyProblemTracingPage
(
page
,
problemModel
);
}
public
List
<
Map
<
String
,
Object
>>
getYhType
()
{
public
List
<
Map
<
String
,
Object
>>
getYhType
()
{
List
<
DataDictionary
>
dictionaries
=
dataDictionaryMapper
.
selectList
(
new
LambdaQueryWrapper
<
DataDictionary
>().
eq
(
DataDictionary:
:
getType
,
"ISSUE_TYPE"
));
return
dictionaries
.
stream
().
map
(
d
->
{
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
item
.
put
(
"value"
,
d
.
getCode
());
item
.
put
(
"label"
,
d
.
getName
());
return
dictionaries
.
stream
().
map
(
d
->
{
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
item
.
put
(
"value"
,
d
.
getCode
());
item
.
put
(
"label"
,
d
.
getName
());
return
item
;
}).
collect
(
Collectors
.
toList
());
}
...
...
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