Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
600b42e0
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1438
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看板
提交
600b42e0
编写于
1月 12, 2019
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
问卷调查除了样式设置,其他功能性问题完成
上级
4558db0e
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
603 addition
and
33 deletion
+603
-33
logs/skyeye.log
logs/skyeye.log
+509
-0
skyeye-promote/src/main/java/com/skyeye/eve/controller/DwSurveyDirectoryController.java
...om/skyeye/eve/controller/DwSurveyDirectoryController.java
+16
-0
skyeye-promote/src/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
...rc/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
+2
-0
skyeye-promote/src/main/java/com/skyeye/eve/service/DwSurveyDirectoryService.java
...java/com/skyeye/eve/service/DwSurveyDirectoryService.java
+2
-0
skyeye-promote/src/main/java/com/skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
...skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
+48
-23
skyeye-promote/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
...e/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
+10
-0
skyeye-promote/src/main/resources/mapping/reqdwsurvey.xml
skyeye-promote/src/main/resources/mapping/reqdwsurvey.xml
+3
-0
skyeye-promote/src/main/resources/template/js/dwsurveydesign/dwsurveydesignlist.js
...esources/template/js/dwsurveydesign/dwsurveydesignlist.js
+8
-8
skyeye-promote/src/main/resources/template/js/dwsurveydesign/surveyReport.js
...main/resources/template/js/dwsurveydesign/surveyReport.js
+4
-0
skyeye-promote/src/main/resources/template/tpl/dwsurveydesign/dwsurveydesignlist.html
...urces/template/tpl/dwsurveydesign/dwsurveydesignlist.html
+0
-1
skyeye-promote/src/main/resources/template/tpl/dwsurveydesign/surveyReport.tpl
...in/resources/template/tpl/dwsurveydesign/surveyReport.tpl
+1
-1
未找到文件。
logs/skyeye.log
浏览文件 @
600b42e0
此差异已折叠。
点击以展开。
skyeye-promote/src/main/java/com/skyeye/eve/controller/DwSurveyDirectoryController.java
浏览文件 @
600b42e0
...
...
@@ -480,4 +480,20 @@ public class DwSurveyDirectoryController {
dwSurveyDirectoryService
.
insertAnswerSurveyMationByIp
(
inputObject
,
outputObject
);
}
/**
*
* @Title: updateSurveyMationEndById
* @Description: 手动结束问卷
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DwSurveyDirectoryController/updateSurveyMationEndById"
)
@ResponseBody
public
void
updateSurveyMationEndById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dwSurveyDirectoryService
.
updateSurveyMationEndById
(
inputObject
,
outputObject
);
}
}
skyeye-promote/src/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
浏览文件 @
600b42e0
...
...
@@ -238,4 +238,6 @@ public interface DwSurveyDirectoryDao {
public
int
editSurveyStateToEndNumZdById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
updateSurveyMationEndById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-promote/src/main/java/com/skyeye/eve/service/DwSurveyDirectoryService.java
浏览文件 @
600b42e0
...
...
@@ -63,4 +63,6 @@ public interface DwSurveyDirectoryService {
public
void
insertAnswerSurveyMationByIp
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
updateSurveyMationEndById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-promote/src/main/java/com/skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
浏览文件 @
600b42e0
...
...
@@ -1587,32 +1587,37 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
public
void
queryAnswerSurveyMationByIp
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
surveyMation
=
dwSurveyDirectoryDao
.
querySurveyMationById
(
map
);
//获取问卷信息
if
(
"4"
.
equals
(
surveyMation
.
get
(
"effective"
).
toString
())
||
"1"
.
equals
(
surveyMation
.
get
(
"effectiveIp"
).
toString
())){
//每台电脑或手机只能答一次
Map
<
String
,
Object
>
answerMation
=
dwSurveyDirectoryDao
.
querySurveyAnswerMationByIp
(
map
);
if
(
answerMation
!=
null
&&
!
answerMation
.
isEmpty
()){
outputObject
.
setreturnMessage
(
"您已参与过该问卷,请休息一会儿。"
);
return
;
}
}
else
{
//不做ip限制,则默认每五分钟才能答一次
List
<
Map
<
String
,
Object
>>
answerMation
=
dwSurveyDirectoryDao
.
querySurveyAnswerMationOverFiveMinByIp
(
map
);
if
(
answerMation
!=
null
&&
!
answerMation
.
isEmpty
()){
outputObject
.
setreturnMessage
(
"您已参与过该问卷,请休息一会儿。"
);
return
;
if
(
"2"
.
equals
(
surveyMation
.
get
(
"surveyState"
).
toString
())){
if
(
"4"
.
equals
(
surveyMation
.
get
(
"effective"
).
toString
())
||
"1"
.
equals
(
surveyMation
.
get
(
"effectiveIp"
).
toString
())){
//每台电脑或手机只能答一次
Map
<
String
,
Object
>
answerMation
=
dwSurveyDirectoryDao
.
querySurveyAnswerMationByIp
(
map
);
if
(
answerMation
!=
null
&&
!
answerMation
.
isEmpty
()){
outputObject
.
setreturnMessage
(
"您已参与过该问卷,请休息一会儿。"
);
return
;
}
}
else
{
//不做ip限制,则默认每五分钟才能答一次
List
<
Map
<
String
,
Object
>>
answerMation
=
dwSurveyDirectoryDao
.
querySurveyAnswerMationOverFiveMinByIp
(
map
);
if
(
answerMation
!=
null
&&
!
answerMation
.
isEmpty
()){
outputObject
.
setreturnMessage
(
"您已参与过该问卷,请休息一会儿。"
);
return
;
}
}
}
if
(
"1"
.
equals
(
surveyMation
.
get
(
"ynEndNum"
).
toString
())){
//是否依据收到的份数结束
if
(
Integer
.
parseInt
(
surveyMation
.
get
(
"answerNum"
).
toString
())
+
1
>
Integer
.
parseInt
(
surveyMation
.
get
(
"endNum"
).
toString
())){
outputObject
.
setreturnMessage
(
"问卷已结束。"
)
;
return
;
if
(
"1"
.
equals
(
surveyMation
.
get
(
"ynEndNum"
).
toString
())){
//是否依据收到的份数结束
if
(
Integer
.
parseInt
(
surveyMation
.
get
(
"answerNum"
).
toString
())
+
1
>
Integer
.
parseInt
(
surveyMation
.
get
(
"endNum"
).
toString
())){
outputObject
.
setreturnMessage
(
"问卷已结束。"
);
return
;
}
}
}
if
(
"1"
.
equals
(
surveyMation
.
get
(
"ynEndTime"
).
toString
())){
//是否依据时间结束
if
(
ToolUtil
.
compare
(
surveyMation
.
get
(
"endTime"
).
toString
(),
ToolUtil
.
getTimeAndToString
())){
//当前时间和设置的结束时间作比较
outputObject
.
setreturnMessage
(
"问卷已结束。"
)
;
return
;
if
(
"1"
.
equals
(
surveyMation
.
get
(
"ynEndTime"
).
toString
())){
//是否依据时间结束
if
(
ToolUtil
.
compare
(
surveyMation
.
get
(
"endTime"
).
toString
(),
ToolUtil
.
getTimeAndToString
())){
//当前时间和设置的结束时间作比较
outputObject
.
setreturnMessage
(
"问卷已结束。"
);
return
;
}
}
}
else
{
outputObject
.
setreturnMessage
(
"问卷已结束。"
);
return
;
}
outputObject
.
setBean
(
surveyMation
);
}
...
...
@@ -2460,4 +2465,24 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
return
answerQuCount
;
}
/**
*
* @Title: updateSurveyMationEndById
* @Description: 手动结束问卷
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
updateSurveyMationEndById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
surveyMation
=
dwSurveyDirectoryDao
.
querySurveyMationById
(
map
);
//获取问卷信息
if
(
"1"
.
equals
(
surveyMation
.
get
(
"surveyState"
).
toString
())){
//执行中
map
.
put
(
"realEndTime"
,
ToolUtil
.
getTimeAndToString
());
dwSurveyDirectoryDao
.
updateSurveyMationEndById
(
map
);
}
}
}
skyeye-promote/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
浏览文件 @
600b42e0
...
...
@@ -1541,4 +1541,14 @@
WHERE id = #{id}
</update>
<update
id=
"updateSurveyMationEndById"
parameterType=
"java.util.Map"
>
UPDATE dw_survey_directory
<set>
real_end_time = #{realEndTime},
survey_state = '2',
end_type = '1',
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
skyeye-promote/src/main/resources/mapping/reqdwsurvey.xml
浏览文件 @
600b42e0
...
...
@@ -209,6 +209,9 @@
<property
id=
"ip"
name=
"ip"
ref=
"required,ip"
var=
"ip"
/>
<property
id=
"bgAnDate"
name=
"bgAnDate"
ref=
"required"
var=
"答卷开始时间"
/>
</url>
<url
id=
"dwsurveydirectory030"
path=
"/post/DwSurveyDirectoryController/updateSurveyMationEndById"
val=
"手动结束问卷"
allUse=
"0"
>
<property
id=
"surveyId"
name=
"id"
ref=
"required"
var=
"问卷id"
/>
</url>
<!-- 问卷调查结束 -->
</controller>
\ No newline at end of file
skyeye-promote/src/main/resources/template/js/dwsurveydesign/dwsurveydesignlist.js
浏览文件 @
600b42e0
...
...
@@ -175,14 +175,14 @@ layui.config({
layer
.
confirm
(
msg
,
{
icon
:
3
,
title
:
'
结束调查
'
},
function
(
index
)
{
layer
.
close
(
index
);
//向服务端发送删除指令
// AjaxPostUtil.request({url:reqBasePath + "planproject003", params:{row
Id: data.id}, type:'json', callback:function(json){
//
if(json.returnCode == 0){
// top.winui.window.msg("发布
成功", {icon: 1,time: 2000});
//
loadTable();
//
}else{
//
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
//
}
//
}});
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory030
"
,
params
:{
survey
Id
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
top
.
winui
.
window
.
msg
(
"
结束
成功
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
...
...
skyeye-promote/src/main/resources/template/js/dwsurveydesign/surveyReport.js
浏览文件 @
600b42e0
...
...
@@ -50,6 +50,10 @@ layui.config({
},
ajaxSendAfter
:
function
(
json
){
if
(
json
.
bean
.
surveyState
==
'
2
'
){
$
(
"
#surveyState
"
).
html
(
"
结束
"
);
}
/**
* 统计图切换
*/
...
...
skyeye-promote/src/main/resources/template/tpl/dwsurveydesign/dwsurveydesignlist.html
浏览文件 @
600b42e0
...
...
@@ -55,7 +55,6 @@
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
resolveWj
"
>
收集问卷
<
/a
>
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
fxWj
"
>
分析报告
<
/a
>
{{
#
}
else
if
(
d
.
state
==
2
){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
resolveWj
"
>
收集问卷
<
/a
>
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
fxWj
"
>
分析报告
<
/a
>
{{
#
}
}}
</script>
...
...
skyeye-promote/src/main/resources/template/tpl/dwsurveydesign/surveyReport.tpl
浏览文件 @
600b42e0
...
...
@@ -6,7 +6,7 @@
</div>
<div
class=
"surveyCollectInfoDiv"
>
<span
class=
"surveyCollectInfoLeft"
>
状态:
<span
class=
"collectInfoSpan"
>
收集中
</span>
参与人数:
状态:
<span
class=
"collectInfoSpan"
id=
"surveyState"
>
收集中
</span>
参与人数:
<span
class=
"collectInfoSpan"
>
{
{
answerNum
}
}
</span>
</span>
<span
class=
"surveyCollectInfoRight"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录