Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
723b4a61
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1430
Star
162
Fork
130
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
723b4a61
编写于
1月 10, 2019
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分析报告完成
上级
9a15ff17
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
6458 addition
and
3421 deletion
+6458
-3421
logs/skyeye.log
logs/skyeye.log
+2161
-3344
logs/skyeye.log.2019-01-09
logs/skyeye.log.2019-01-09
+3861
-0
skyeye-promote/src/main/java/com/skyeye/common/util/ToolUtil.java
...romote/src/main/java/com/skyeye/common/util/ToolUtil.java
+51
-0
skyeye-promote/src/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
...rc/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
+1
-1
skyeye-promote/src/main/java/com/skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
...skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
+20
-5
skyeye-promote/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
...e/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
+0
-1
skyeye-promote/src/main/resources/static/toolUtil.txt
skyeye-promote/src/main/resources/static/toolUtil.txt
+2
-0
skyeye-promote/src/main/resources/template/js/dwsurveydesign/surveyReport.js
...main/resources/template/js/dwsurveydesign/surveyReport.js
+20
-20
skyeye-promote/src/main/resources/template/tpl/dwsurveydesign/surveyReport.tpl
...in/resources/template/tpl/dwsurveydesign/surveyReport.tpl
+342
-50
未找到文件。
logs/skyeye.log
浏览文件 @
723b4a61
此差异已折叠。
点击以展开。
logs/skyeye.log.2019-01-09
0 → 100644
浏览文件 @
723b4a61
此差异已折叠。
点击以展开。
skyeye-promote/src/main/java/com/skyeye/common/util/ToolUtil.java
浏览文件 @
723b4a61
...
...
@@ -932,6 +932,57 @@ public class ToolUtil {
return
dateStr
;
}
/**
*
* @Title: removeTagFromText
* @Description: 过滤html内容
* @param @param htmlStr
* @param @return 参数
* @return String 返回类型
* @throws
*/
public
static
String
removeTagFromText
(
String
htmlStr
)
{
if
(
htmlStr
==
null
||
""
.
equals
(
htmlStr
))
return
""
;
String
textStr
=
""
;
java
.
util
.
regex
.
Pattern
pattern
;
java
.
util
.
regex
.
Matcher
matcher
;
try
{
String
regEx_remark
=
"<!--.+?-->"
;
// 定义script的正则表达式{或<script[^>]*?>[\\s\\S]*?<\\/script>
String
regEx_script
=
"<[\\s]*?script[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?script[\\s]*?>"
;
// 定义style的正则表达式{或<style[^>]*?>[\\s\\S]*?<\\/style>
String
regEx_style
=
"<[\\s]*?style[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?style[\\s]*?>"
;
String
regEx_html
=
"<[^>]+>"
;
// 定义HTML标签的正则表达式
String
regEx_html1
=
"<[^>]+"
;
htmlStr
=
htmlStr
.
replaceAll
(
"\n"
,
""
);
htmlStr
=
htmlStr
.
replaceAll
(
"\t"
,
""
);
htmlStr
=
htmlStr
.
replaceAll
(
"\r"
,
""
);
pattern
=
Pattern
.
compile
(
regEx_remark
);
// 过滤注释标签
matcher
=
pattern
.
matcher
(
htmlStr
);
htmlStr
=
matcher
.
replaceAll
(
""
);
pattern
=
Pattern
.
compile
(
regEx_script
,
Pattern
.
CASE_INSENSITIVE
);
matcher
=
pattern
.
matcher
(
htmlStr
);
htmlStr
=
matcher
.
replaceAll
(
""
);
// 过滤script标签
pattern
=
Pattern
.
compile
(
regEx_style
,
Pattern
.
CASE_INSENSITIVE
);
matcher
=
pattern
.
matcher
(
htmlStr
);
htmlStr
=
matcher
.
replaceAll
(
""
);
// 过滤style标签
pattern
=
Pattern
.
compile
(
regEx_html
,
Pattern
.
CASE_INSENSITIVE
);
matcher
=
pattern
.
matcher
(
htmlStr
);
htmlStr
=
matcher
.
replaceAll
(
""
);
// 过滤html标签
pattern
=
Pattern
.
compile
(
regEx_html1
,
Pattern
.
CASE_INSENSITIVE
);
matcher
=
pattern
.
matcher
(
htmlStr
);
htmlStr
=
matcher
.
replaceAll
(
""
);
// 过滤html标签
htmlStr
=
htmlStr
.
replaceAll
(
"\n[\\s| ]*\r"
,
""
);
htmlStr
=
htmlStr
.
replaceAll
(
"<(.*)>(.*)<\\/(.*)>|<(.*)\\/>"
,
""
);
textStr
=
htmlStr
.
trim
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
textStr
;
// 返回文本字符串
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
data
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
skyeye-promote/src/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
浏览文件 @
723b4a61
...
...
@@ -157,5 +157,5 @@ public interface DwSurveyDirectoryDao {
public
List
<
Map
<
String
,
Object
>>
queryScoreGroupStat
(
Map
<
String
,
Object
>
question
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
queryOrderQuGroupStat
(
Map
<
String
,
Object
>
question
)
throws
Exception
;
}
skyeye-promote/src/main/java/com/skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
浏览文件 @
723b4a61
...
...
@@ -1346,8 +1346,11 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
}
for
(
Map
<
String
,
Object
>
row
:
rows
){
row
.
put
(
"anAllCount"
,
count
);
List
<
Map
<
String
,
Object
>>
columns
=
(
List
<
Map
<
String
,
Object
>>)
row
.
get
(
"questionChenColumn"
);
for
(
Map
<
String
,
Object
>
column
:
columns
){
column
.
put
(
"anChenRadios"
,
beans
);
}
}
question
.
put
(
"anChenRadios"
,
beans
);
}
else
if
(
quType
.
equals
(
QuType
.
CHENFBK
.
getActionName
())){
//矩阵填空题
List
<
Map
<
String
,
Object
>>
beans
=
dwSurveyDirectoryDao
.
queryChenFbkGroupStat
(
question
);
List
<
Map
<
String
,
Object
>>
rows
=
(
List
<
Map
<
String
,
Object
>>)
question
.
get
(
"questionChenRow"
);
...
...
@@ -1363,8 +1366,11 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
}
for
(
Map
<
String
,
Object
>
row
:
rows
){
row
.
put
(
"anAllCount"
,
count
);
List
<
Map
<
String
,
Object
>>
columns
=
(
List
<
Map
<
String
,
Object
>>)
row
.
get
(
"questionChenColumn"
);
for
(
Map
<
String
,
Object
>
column
:
columns
){
column
.
put
(
"anChenFbks"
,
beans
);
}
}
question
.
put
(
"anChenFbks"
,
beans
);
}
else
if
(
quType
.
equals
(
QuType
.
CHENCHECKBOX
.
getActionName
())){
//矩阵多选题
List
<
Map
<
String
,
Object
>>
beans
=
dwSurveyDirectoryDao
.
queryChenCheckBoxGroupStat
(
question
);
List
<
Map
<
String
,
Object
>>
rows
=
(
List
<
Map
<
String
,
Object
>>)
question
.
get
(
"questionChenRow"
);
...
...
@@ -1380,11 +1386,20 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
}
for
(
Map
<
String
,
Object
>
row
:
rows
){
row
.
put
(
"anAllCount"
,
count
);
List
<
Map
<
String
,
Object
>>
columns
=
(
List
<
Map
<
String
,
Object
>>)
row
.
get
(
"questionChenColumn"
);
for
(
Map
<
String
,
Object
>
column
:
columns
){
column
.
put
(
"anChenCheckboxs"
,
beans
);
}
}
question
.
put
(
"anChenCheckboxs"
,
beans
);
}
else
if
(
quType
.
equals
(
QuType
.
CHENSCORE
.
getActionName
())){
//矩阵评分题
List
<
Map
<
String
,
Object
>>
beans
=
dwSurveyDirectoryDao
.
queryChenScoreGroupStat
(
question
);
question
.
put
(
"anChenScores"
,
beans
);
List
<
Map
<
String
,
Object
>>
rows
=
(
List
<
Map
<
String
,
Object
>>)
question
.
get
(
"questionChenRow"
);
for
(
Map
<
String
,
Object
>
row
:
rows
){
List
<
Map
<
String
,
Object
>>
columns
=
(
List
<
Map
<
String
,
Object
>>)
row
.
get
(
"questionChenColumn"
);
for
(
Map
<
String
,
Object
>
column
:
columns
){
column
.
put
(
"anChenScores"
,
beans
);
}
}
}
else
if
(
quType
.
equals
(
QuType
.
SCORE
.
getActionName
()))
{
//评分题
List
<
Map
<
String
,
Object
>>
beans
=
dwSurveyDirectoryDao
.
queryScoreGroupStat
(
question
);
List
<
Map
<
String
,
Object
>>
scores
=
(
List
<
Map
<
String
,
Object
>>)
question
.
get
(
"quScores"
);
...
...
@@ -1416,5 +1431,5 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
}
return
question
;
}
}
skyeye-promote/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
浏览文件 @
723b4a61
...
...
@@ -1060,5 +1060,4 @@
sumOrderNum
</select>
</mapper>
\ No newline at end of file
skyeye-promote/src/main/resources/static/toolUtil.txt
浏览文件 @
723b4a61
...
...
@@ -33,4 +33,6 @@ readCpu(); 读取CPU信息
listToTree(); 将JSONArray数组转为树状结构
javaBean2Map(); 实体类转map
randomStr(); 获取指定的随机值
removeTagFromText(); 过滤html内容
skyeye-promote/src/main/resources/template/js/dwsurveydesign/surveyReport.js
浏览文件 @
723b4a61
...
...
@@ -47,6 +47,14 @@ layui.config({
}
});
hdb
.
registerHelper
(
'
compare8
'
,
function
(
v1
,
v2
,
v31
,
v4
,
options
)
{
if
(
v1
==
v3
&&
v2
==
v4
){
return
options
.
fn
(
this
);
}
else
{
return
options
.
inverse
(
this
);
}
});
},
ajaxSendAfter
:
function
(
json
){
...
...
@@ -72,25 +80,17 @@ layui.config({
if
(
amchartdivId
!=
null
)
{
var
amchartdivObj
=
$
(
"
#
"
+
amchartdivId
);
if
(
!
amchartdivObj
[
0
])
{
var
url
=
"
${ctx}/da/survey-report!chartData.action
"
;
var
data
=
"
quId=
"
+
quId
;
$
.
ajax
({
url
:
url
,
data
:
data
,
type
:
"
post
"
,
success
:
function
(
msg
)
{
$
(
"
#amchart_
"
+
quId
).
find
(
"
.higChartSvg
"
).
hide
();
if
(
thClass
.
indexOf
(
"
linechart_pic
"
)
>
0
)
{
higLineChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
piechart_pic
"
)
>
0
)
{
higPieChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
barchart_pic
"
)
>
0
)
{
higBarChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
columnchart_pic
"
)
>
0
)
{
higColumnChart
(
msg
,
quId
);
}
}
});
var
msg
=
{};
$
(
"
#amchart_
"
+
quId
).
find
(
"
.higChartSvg
"
).
hide
();
if
(
thClass
.
indexOf
(
"
linechart_pic
"
)
>
0
)
{
higLineChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
piechart_pic
"
)
>
0
)
{
higPieChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
barchart_pic
"
)
>
0
)
{
higBarChart
(
msg
,
quId
);
}
else
if
(
thClass
.
indexOf
(
"
columnchart_pic
"
)
>
0
)
{
higColumnChart
(
msg
,
quId
);
}
}
else
{
$
(
"
#amchart_
"
+
quId
).
find
(
"
.higChartSvg
"
).
hide
();
amchartdivObj
.
show
();
...
...
@@ -121,7 +121,7 @@ layui.config({
if
(
charType
===
"
Line
"
)
{
seriesType
=
'
line
'
;
}
if
(
quType
===
"
CHENRADIO
"
||
quType
===
"
CHENCHECKBOX
"
||
quType
===
"
CHENSCORE
"
)
{
if
(
quType
===
"
11
"
||
quType
===
"
13
"
||
quType
===
"
18
"
)
{
if
(
charType
===
"
PIE
"
)
{
seriesData
=
new
Array
();
var
rowItemTrs
=
quItemBody
.
find
(
"
.rowItemTr
"
);
...
...
skyeye-promote/src/main/resources/template/tpl/dwsurveydesign/surveyReport.tpl
浏览文件 @
723b4a61
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录