Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
zlmy-cloud
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
zlmy
zlmy-cloud
Commits
502c834f
Commit
502c834f
authored
Jan 29, 2026
by
鲁鸿波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教育bug修改
parent
36df4199
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
1 deletion
+64
-1
TrainProjectStatisticsAllServiceImpl.java
...ct/service/impl/TrainProjectStatisticsAllServiceImpl.java
+64
-1
No files found.
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/train/project/service/impl/TrainProjectStatisticsAllServiceImpl.java
View file @
502c834f
...
@@ -151,7 +151,7 @@ public class TrainProjectStatisticsAllServiceImpl implements TrainProjectStatist
...
@@ -151,7 +151,7 @@ public class TrainProjectStatisticsAllServiceImpl implements TrainProjectStatist
return
null
;
return
null
;
}
}
@Override
/*
@Override
public List<ProjectStatTotalVo> findTrainTimeByOrgOrVisitType(String orgId, String startTime, String endTime, String type) {
public List<ProjectStatTotalVo> findTrainTimeByOrgOrVisitType(String orgId, String startTime, String endTime, String type) {
List<ProjectStatTotalVo> voList = new ArrayList<>();
List<ProjectStatTotalVo> voList = new ArrayList<>();
...
@@ -211,6 +211,69 @@ public class TrainProjectStatisticsAllServiceImpl implements TrainProjectStatist
...
@@ -211,6 +211,69 @@ public class TrainProjectStatisticsAllServiceImpl implements TrainProjectStatist
item.setFanChartSort(sort.getAndIncrement());
item.setFanChartSort(sort.getAndIncrement());
});
});
return sortList;
}*/
@Override
public
List
<
ProjectStatTotalVo
>
findTrainTimeByOrgOrVisitType
(
String
orgId
,
String
startTime
,
String
endTime
,
String
type
)
{
List
<
ProjectStatTotalVo
>
voList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
type
)
&&
ChartTypeEnum
.
ORG
.
getValue
().
equals
(
type
))
{
List
<
NewSysOrg
>
sysOrgList
=
findChildOrgListByParentId
(
orgId
);
if
(
CollectionUtils
.
isEmpty
(
sysOrgList
))
{
return
voList
;
}
for
(
NewSysOrg
sysOrg
:
sysOrgList
)
{
List
<
String
>
orgIdList
=
findOrgIdList
(
sysOrg
.
getOrgId
());
String
projectNum
=
safeFindTrainTimeSumByOrgId
(
orgIdList
,
startTime
,
endTime
);
if
(
StringUtils
.
isNotBlank
(
projectNum
)
&&
!
"0"
.
equals
(
projectNum
))
{
ProjectStatTotalVo
projectStatTotalVo
=
new
ProjectStatTotalVo
();
projectStatTotalVo
.
setFanChartKey
(
sysOrg
.
getOrgName
());
projectStatTotalVo
.
setFanChartValue
(
projectNum
);
projectStatTotalVo
.
setOrgId
(
sysOrg
.
getOrgId
());
voList
.
add
(
projectStatTotalVo
);
}
}
}
if
(
StringUtils
.
isNotBlank
(
type
)
&&
ChartTypeEnum
.
ROLE
.
getValue
().
equals
(
type
))
{
if
(
StringUtils
.
isBlank
(
orgId
))
{
orgId
=
ContextUtils
.
getLoginUser
().
getOrgId
();
}
List
<
String
>
orgIdList
=
findOrgIdList
(
orgId
);
voList
=
tTrainProjectDao
.
findTrainTimeByOrgOrVisitType
(
orgIdList
,
startTime
,
endTime
,
ChartTypeEnum
.
ROLE
.
getValue
());
voList
.
forEach
(
item
->
{
String
fanChartKey
=
item
.
getFanChartKey
();
if
(
StringUtils
.
isNotBlank
(
fanChartKey
))
{
String
name
=
VisitTypeEnum
.
getName
(
fanChartKey
);
item
.
setFanChartKey
(
name
);
}
});
}
String
trainTimeTotal
=
tTrainProjectDao
.
findTrainTimeTotal
(
startTime
,
endTime
);
if
(
StringUtils
.
isBlank
(
trainTimeTotal
))
{
trainTimeTotal
=
"1"
;
}
// 修复:使用Double.parseDouble()而不是Integer.parseInt()
List
<
ProjectStatTotalVo
>
sortList
=
voList
.
stream
()
.
sorted
(
Comparator
.
comparingDouble
(
item
->
Double
.
parseDouble
(
item
.
getFanChartValue
())))
.
collect
(
Collectors
.
toList
());
Collections
.
reverse
(
sortList
);
AtomicInteger
sort
=
new
AtomicInteger
(
1
);
String
finalTrainTimeTotal
=
trainTimeTotal
;
sortList
.
forEach
(
item
->
{
String
ratio
=
getRatio
(
Double
.
parseDouble
(
item
.
getFanChartValue
()),
Double
.
parseDouble
(
finalTrainTimeTotal
)
);
item
.
setFanChartRatio
(
ratio
);
item
.
setFanChartSort
(
sort
.
getAndIncrement
());
});
return
sortList
;
return
sortList
;
}
}
...
...
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