Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
590a2955
Commit
590a2955
authored
Jun 18, 2024
by
军师中郎将
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 实现读取后端接口返回的数据并且 提供查询功能展示数据。
2 使用vue界面访问 后端管理 设计好的报表。
parent
6955d785
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
1 deletion
+200
-1
pom.xml
pom.xml
+1
-0
context.xml
zh-baseversion-admin/src/main/resources/context.xml
+1
-0
ITComplainDealService.java
...java/com/zehong/system/service/ITComplainDealService.java
+10
-0
TComplainDealServiceImpl.java
.../zehong/system/service/impl/TComplainDealServiceImpl.java
+188
-1
No files found.
pom.xml
View file @
590a2955
...
...
@@ -226,6 +226,7 @@
<groupId>
com.bstek.ureport
</groupId>
<artifactId>
ureport2-console
</artifactId>
<version>
2.2.9
</version>
<!-- <version>2.3.0-SNAPSHOT</version>-->
</dependency>
</dependencies>
...
...
zh-baseversion-admin/src/main/resources/context.xml
View file @
590a2955
...
...
@@ -10,4 +10,5 @@
<value>
classpath:ureport.properties
</value>
</property>
</bean>
<bean
id=
"complainDealServiceImpl"
class=
"com.zehong.system.service.impl.TComplainDealServiceImpl"
></bean>
</beans>
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/ITComplainDealService.java
View file @
590a2955
...
...
@@ -78,6 +78,16 @@ public interface ITComplainDealService
public
ComplainDealSummaryAnalysisVo
complainDealSummaryAnalysisMethod
();
/**
*
* @param dataSourceName ureport2配置数据源名称
* @param dataSetName ureport2配置数据集明恒
* @param map 参数map
* @return
*/
public
List
<
ComplainDealSummaryAnalysisTableVo
>
complainDealSummaryAnalysisMethodTableViewsForUrepore2
(
String
dataSourceName
,
String
dataSetName
,
Map
<
String
,
String
>
map
);
public
List
<
ComplainDealSummaryAnalysisTableVo
>
complainDealSummaryAnalysisMethodTableViews
(
ComplainDealSummaryAnalysisTableVo
complainDealSummaryAnalysisTableVo
);
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TComplainDealServiceImpl.java
View file @
590a2955
...
...
@@ -33,7 +33,7 @@ import javax.servlet.http.HttpServletResponse;
* @author zehong
* @date 2022-02-15
*/
@Service
@Service
(
"complainDealServiceImpl"
)
public
class
TComplainDealServiceImpl
implements
ITComplainDealService
{
@Autowired
...
...
@@ -640,4 +640,191 @@ public class TComplainDealServiceImpl implements ITComplainDealService
return
complainDealSummaryAnalysisVo
;
}
/**
*
* @param dataSourceName ureport2配置数据源名称
* @param dataSetName ureport2配置数据集明恒
* @param map 参数map
* @return
*/
@Override
public
List
<
ComplainDealSummaryAnalysisTableVo
>
complainDealSummaryAnalysisMethodTableViewsForUrepore2
(
String
dataSourceName
,
String
dataSetName
,
Map
<
String
,
String
>
map
)
{
String
date
=
map
.
get
(
"date"
);
String
complaintCategory
=
map
.
get
(
"complaintCategory"
);
// 管理制度
List
<
TComplainDealManSysSet
>
tComplainDealManSysSets
=
tComplainDealManSysSetMapper
.
selectTComplainDealManSysSetList
(
new
TComplainDealManSysSet
());
//1-投诉举报 管理制度时间
long
fType1
=
0
;
//2-服务申请 管理制度时间
long
fType2
=
0
;
//3-咨询建议 管理制度时间
long
fType3
=
0
;
//总发生量
BigDecimal
totalAmount
=
BigDecimal
.
ZERO
;
//总办结量
BigDecimal
totalCompletionRate
=
BigDecimal
.
ZERO
;
//总及时办结量
BigDecimal
totalTimelyCompletionRate
=
BigDecimal
.
ZERO
;
for
(
TComplainDealManSysSet
tComplainDealManSysSet
:
tComplainDealManSysSets
)
{
Long
days
=
tComplainDealManSysSet
.
getfDay
();
Long
hours
=
tComplainDealManSysSet
.
getfHours
();
Long
minutes
=
tComplainDealManSysSet
.
getfMinutes
();
Long
seconds
=
tComplainDealManSysSet
.
getfSeconds
();
Long
allTime
=
days
*
24L
*
60
*
60
*
1000
+
hours
*
60
*
60
*
1000
+
minutes
*
60
*
1000
+
seconds
*
1000
;
if
(
"1"
.
equals
(
tComplainDealManSysSet
.
getfType
()))
{
fType1
=
allTime
;
}
else
if
(
"2"
.
equals
(
tComplainDealManSysSet
.
getfType
()))
{
fType2
=
allTime
;
}
else
if
(
"3"
.
equals
(
tComplainDealManSysSet
.
getfType
()))
{
fType3
=
allTime
;
}
}
if
(
StringUtils
.
isEmpty
(
date
))
{
return
initEmptyList
();
}
//查询当前年的开始时间和结束时间
Date
startOfMonth
=
DateUtils
.
parseDate
(
date
+
"-01-01 00:00:00"
);
Date
endOfMonth
=
DateUtils
.
parseDate
(
date
+
"-12-31 23:59:59"
);
//所有所有发生的投诉
List
<
TComplainDealDTO
>
tComplainDeals
=
tComplainDealMapper
.
queryAllByNotDeleteAndCreateTime
(
startOfMonth
,
endOfMonth
,
complaintCategory
);
List
<
ComplainDealSummaryAnalysisTableVo
>
complainDealSummaryAnalysisTableVos
=
new
ArrayList
<>();
//先初始化一个空的,然后再循环往里面放值
List
<
ComplainDealSummaryAnalysisTableVo
>
complainDealSummaryAnalysisTableVosEmpty
=
initEmptyList
();
//如果没数据,就返回一个都是null的数据的集合
if
(
tComplainDeals
.
size
()
==
0
)
{
return
complainDealSummaryAnalysisTableVosEmpty
;
}
Map
<
String
,
List
<
TComplainDealDTO
>>
collect
=
tComplainDeals
.
stream
().
collect
(
Collectors
.
groupingBy
(
TComplainDealDTO:
:
getCreateTimeYear
));
ComplainDealSummaryAnalysisTableVo
complainDealSummaryAnalysisTableVo1
;
for
(
Map
.
Entry
<
String
,
List
<
TComplainDealDTO
>>
stringListEntry
:
collect
.
entrySet
())
{
String
key
=
stringListEntry
.
getKey
();
List
<
TComplainDealDTO
>
value
=
stringListEntry
.
getValue
();
BigDecimal
count
=
new
BigDecimal
(
value
.
size
());
// 发生量统计
totalAmount
=
totalAmount
.
add
(
count
);
complainDealSummaryAnalysisTableVo1
=
new
ComplainDealSummaryAnalysisTableVo
();
complainDealSummaryAnalysisTableVo1
.
setDate
(
key
+
"月"
);
// 发生量
complainDealSummaryAnalysisTableVo1
.
setAmount
(
value
.
size
()
+
""
);
// 如果有发生量
if
(
value
.
size
()
>
0
)
{
//办结率
List
<
TComplainDealDTO
>
completionRateCollect
=
value
.
stream
().
filter
(
item
->
"3"
.
equals
(
item
.
getComplainStatus
())).
collect
(
Collectors
.
toList
());
if
(
completionRateCollect
.
size
()
==
0
)
{
complainDealSummaryAnalysisTableVo1
.
setCompletionRate
(
"0"
);
}
else
{
BigDecimal
completedCount
=
new
BigDecimal
(
completionRateCollect
.
size
());
BigDecimal
divide
=
completedCount
.
multiply
(
new
BigDecimal
(
100
)).
divide
(
count
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
//统计 发生率
totalCompletionRate
=
totalCompletionRate
.
add
(
completedCount
);
complainDealSummaryAnalysisTableVo1
.
setCompletionRate
(
divide
.
toString
());
}
// 及时办结率
if
(
completionRateCollect
.
size
()
==
0
)
{
complainDealSummaryAnalysisTableVo1
.
setTimelyCompletionRate
(
"0"
);
}
else
{
int
timelyCompletionRateInt
=
0
;
for
(
TComplainDealDTO
tComplainDealDTO
:
completionRateCollect
)
{
String
complainType
=
tComplainDealDTO
.
getComplainType
();
Date
createTime
=
tComplainDealDTO
.
getCreateTime
();
Date
updateTime
=
tComplainDealDTO
.
getUpdateTime
();
if
(
complainType
!=
null
&&
!
""
.
equals
(
complainType
)
&&
createTime
!=
null
&&
updateTime
!=
null
)
{
long
diff
=
updateTime
.
getTime
()
-
createTime
.
getTime
();
// 是类型1 并且小于 类型1的管理制度
if
(
"1"
.
equals
(
complainType
))
{
if
(
diff
-
fType1
<
0
)
{
timelyCompletionRateInt
++;
}
}
else
if
(
"2"
.
equals
(
complainType
))
{
if
(
diff
-
fType2
<
0
)
{
timelyCompletionRateInt
++;
}
}
else
if
(
"3"
.
equals
(
complainType
))
{
if
(
diff
-
fType3
<
0
)
{
timelyCompletionRateInt
++;
}
}
}
}
if
(
timelyCompletionRateInt
>
0
)
{
BigDecimal
CompletionRateIntDecimal
=
new
BigDecimal
(
timelyCompletionRateInt
);
BigDecimal
divide
=
CompletionRateIntDecimal
.
multiply
(
new
BigDecimal
(
100
)).
divide
(
count
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
//统计 及时办结率
totalTimelyCompletionRate
=
totalTimelyCompletionRate
.
add
(
CompletionRateIntDecimal
);
complainDealSummaryAnalysisTableVo1
.
setTimelyCompletionRate
(
divide
.
toString
());
}
else
{
complainDealSummaryAnalysisTableVo1
.
setTimelyCompletionRate
(
"0"
);
}
}
// 如果没有发生量则别的都是0
}
else
{
complainDealSummaryAnalysisTableVo1
.
setCompletionRate
(
"0"
);
complainDealSummaryAnalysisTableVo1
.
setTimelyCompletionRate
(
"0"
);
}
complainDealSummaryAnalysisTableVos
.
add
(
complainDealSummaryAnalysisTableVo1
);
}
// 如果有数据,则往 empty集合里面放值
if
(
complainDealSummaryAnalysisTableVos
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
complainDealSummaryAnalysisTableVosEmpty
.
size
();
i
++)
{
ComplainDealSummaryAnalysisTableVo
dealSummaryAnalysisTableVo
=
complainDealSummaryAnalysisTableVosEmpty
.
get
(
i
);
for
(
ComplainDealSummaryAnalysisTableVo
summaryAnalysisTableVo
:
complainDealSummaryAnalysisTableVos
)
{
if
(
dealSummaryAnalysisTableVo
.
getDate
().
equals
(
summaryAnalysisTableVo
.
getDate
()))
{
dealSummaryAnalysisTableVo
.
setAmount
(
summaryAnalysisTableVo
.
getAmount
());
dealSummaryAnalysisTableVo
.
setCompletionRate
(
summaryAnalysisTableVo
.
getCompletionRate
());
dealSummaryAnalysisTableVo
.
setTimelyCompletionRate
(
summaryAnalysisTableVo
.
getTimelyCompletionRate
());
}
}
//说明是 统计
if
(
i
==
12
)
{
dealSummaryAnalysisTableVo
.
setAmount
(
totalAmount
.
toString
());
// 统计 办结率
BigDecimal
divide
=
totalCompletionRate
.
multiply
(
new
BigDecimal
(
100
)).
divide
(
totalAmount
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
dealSummaryAnalysisTableVo
.
setCompletionRate
(
divide
.
toString
());
// 统计 及时办结率
BigDecimal
divide1
=
totalTimelyCompletionRate
.
multiply
(
new
BigDecimal
(
100
)).
divide
(
totalAmount
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
dealSummaryAnalysisTableVo
.
setTimelyCompletionRate
(
divide1
.
toString
());
}
}
}
return
complainDealSummaryAnalysisTableVosEmpty
;
}
}
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