Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
7ed6079e
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1442
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看板
提交
7ed6079e
编写于
1月 05, 2019
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
问题删除逻辑删除和物理删除完成
上级
d26b3adb
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
8151 addition
and
5626 deletion
+8151
-5626
logs/skyeye.log
logs/skyeye.log
+2312
-5583
logs/skyeye.log.2019-01-04
logs/skyeye.log.2019-01-04
+5622
-0
skyeye-promote/src/main/java/com/skyeye/common/constans/QuType.java
...mote/src/main/java/com/skyeye/common/constans/QuType.java
+64
-25
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
+10
-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
+34
-0
skyeye-promote/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
...e/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
+70
-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/dwsurveydesign.js
...in/resources/template/js/dwsurveydesign/dwsurveydesign.js
+18
-18
未找到文件。
logs/skyeye.log
浏览文件 @
7ed6079e
此差异已折叠。
点击以展开。
logs/skyeye.log.2019-01-04
0 → 100644
浏览文件 @
7ed6079e
此差异已折叠。
点击以展开。
skyeye-promote/src/main/java/com/skyeye/common/constans/QuType.java
浏览文件 @
7ed6079e
...
...
@@ -2,40 +2,45 @@ package com.skyeye.common.constans;
public
enum
QuType
{
YESNO
(
"是非题"
,
"yesno"
,
0
),
RADIO
(
"单选题"
,
"radio"
,
1
),
CHECKBOX
(
"多选题"
,
"checkbox"
,
2
),
FILLBLANK
(
"填空题"
,
"fillblank"
,
3
),
MULTIFILLBLANK
(
"多项填空题"
,
"multi-fillblank"
,
4
),
// 组合填空题
ANSWER
(
"多行填空题"
,
"answer"
,
5
),
// 原问答题
BIGQU
(
"大题"
,
"bigqu"
,
6
),
ENUMQU
(
"枚举题"
,
"enumqu"
,
7
),
SCORE
(
"评分题"
,
"score"
,
8
),
ORDERQU
(
"排序题"
,
"orderby"
,
9
),
PROPORTION
(
"比重题"
,
"proportion"
,
10
),
CHENRADIO
(
"矩阵单选题"
,
"chen-radio"
,
11
),
CHENFBK
(
"矩阵填空题"
,
"chen-fbk"
,
12
),
CHENCHECKBOX
(
"矩阵多选题"
,
"chen-checkbox"
,
13
),
COMPCHENRADIO
(
"复合矩阵单选题"
,
"comp-chen-radio"
,
14
),
UPLOADFILE
(
"文件上传题"
,
"sendfile"
,
15
),
PAGETAG
(
"分页标记"
,
"pagetag"
,
16
),
PARAGRAPH
(
"段落说明"
,
"paragraph"
,
17
),
CHENSCORE
(
"矩阵评分题"
,
"chen-score"
,
18
),
YESNO
(
"是非题"
,
"yesno"
,
0
,
""
,
""
),
RADIO
(
"单选题"
,
"radio"
,
1
,
"dw_qu_radio"
,
"qu_id"
),
CHECKBOX
(
"多选题"
,
"checkbox"
,
2
,
"dw_qu_checkbox"
,
"qu_id"
),
FILLBLANK
(
"填空题"
,
"fillblank"
,
3
,
""
,
""
),
MULTIFILLBLANK
(
"多项填空题"
,
"multi-fillblank"
,
4
,
"dw_qu_multi_fillblank"
,
"qu_id"
),
// 组合填空题
ANSWER
(
"多行填空题"
,
"answer"
,
5
,
""
,
""
),
// 原问答题
BIGQU
(
"大题"
,
"bigqu"
,
6
,
""
,
""
),
ENUMQU
(
"枚举题"
,
"enumqu"
,
7
,
""
,
""
),
SCORE
(
"评分题"
,
"score"
,
8
,
"dw_qu_score"
,
"qu_id"
),
ORDERQU
(
"排序题"
,
"orderby"
,
9
,
"dw_qu_orderby"
,
"qu_id"
),
PROPORTION
(
"比重题"
,
"proportion"
,
10
,
""
,
""
),
CHENRADIO
(
"矩阵单选题"
,
"chen-radio"
,
11
,
"dw_qu_chen_column,dw_qu_chen_row"
,
"qu_id,qu_id"
),
CHENFBK
(
"矩阵填空题"
,
"chen-fbk"
,
12
,
"dw_qu_chen_column,dw_qu_chen_row"
,
"qu_id,qu_id"
),
CHENCHECKBOX
(
"矩阵多选题"
,
"chen-checkbox"
,
13
,
"dw_qu_chen_column,dw_qu_chen_row"
,
"qu_id,qu_id"
),
COMPCHENRADIO
(
"复合矩阵单选题"
,
"comp-chen-radio"
,
14
,
""
,
""
),
UPLOADFILE
(
"文件上传题"
,
"sendfile"
,
15
,
""
,
""
),
PAGETAG
(
"分页标记"
,
"pagetag"
,
16
,
""
,
""
),
PARAGRAPH
(
"段落说明"
,
"paragraph"
,
17
,
""
,
""
),
CHENSCORE
(
"矩阵评分题"
,
"chen-score"
,
18
,
"dw_qu_chen_column,dw_qu_chen_row"
,
"qu_id,qu_id"
),
COMPRADIO
(
"复合单选"
,
"comp-radio"
,
19
),
COMPCHECKBOX
(
"复合多选"
,
"comp-checkbox"
,
20
);
COMPRADIO
(
"复合单选"
,
"comp-radio"
,
19
,
""
,
""
),
COMPCHECKBOX
(
"复合多选"
,
"comp-checkbox"
,
20
,
""
,
""
);
private
String
cnName
;
private
String
actionName
;
private
int
index
;
private
String
tableName
;
private
String
questionId
;
QuType
(
String
cnName
,
String
actionName
,
int
index
)
{
QuType
(
String
cnName
,
String
actionName
,
int
index
,
String
tableName
,
String
questionId
)
{
this
.
cnName
=
cnName
;
this
.
actionName
=
actionName
;
this
.
index
=
index
;
this
.
tableName
=
tableName
;
this
.
questionId
=
questionId
;
}
public
String
getCnName
()
{
...
...
@@ -62,6 +67,22 @@ public enum QuType {
this
.
index
=
index
;
}
public
String
getTableName
()
{
return
tableName
;
}
public
void
setTableName
(
String
tableName
)
{
this
.
tableName
=
tableName
;
}
public
String
getQuestionId
()
{
return
questionId
;
}
public
void
setQuestionId
(
String
questionId
)
{
this
.
questionId
=
questionId
;
}
public
static
String
getActionName
(
int
index
){
for
(
QuType
q
:
QuType
.
values
()){
if
(
q
.
getIndex
()
==
index
){
...
...
@@ -71,6 +92,24 @@ public enum QuType {
return
null
;
}
public
static
String
getTableName
(
int
index
){
for
(
QuType
q
:
QuType
.
values
()){
if
(
q
.
getIndex
()
==
index
){
return
q
.
tableName
;
}
}
return
null
;
}
public
static
String
getQuestionId
(
int
index
){
for
(
QuType
q
:
QuType
.
values
()){
if
(
q
.
getIndex
()
==
index
){
return
q
.
questionId
;
}
}
return
null
;
}
public
static
int
getIndex
(
String
actionName
){
for
(
QuType
q
:
QuType
.
values
()){
if
(
q
.
getActionName
().
replaceAll
(
"-"
,
""
).
equals
(
actionName
.
toLowerCase
())){
...
...
skyeye-promote/src/main/java/com/skyeye/eve/controller/DwSurveyDirectoryController.java
浏览文件 @
7ed6079e
...
...
@@ -240,4 +240,20 @@ public class DwSurveyDirectoryController {
dwSurveyDirectoryService
.
addQuChenMation
(
inputObject
,
outputObject
);
}
/**
*
* @Title: deleteQuestionMationById
* @Description: 删除问题
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/DwSurveyDirectoryController/deleteQuestionMationById"
)
@ResponseBody
public
void
deleteQuestionMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dwSurveyDirectoryService
.
deleteQuestionMationById
(
inputObject
,
outputObject
);
}
}
skyeye-promote/src/main/java/com/skyeye/eve/dao/DwSurveyDirectoryDao.java
浏览文件 @
7ed6079e
...
...
@@ -60,4 +60,14 @@ public interface DwSurveyDirectoryDao {
public
int
addQuestionRowMationList
(
List
<
Map
<
String
,
Object
>>
quRow
)
throws
Exception
;
public
Map
<
String
,
Object
>
queryQuestionMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
deleteLogicQuestionMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
deleteQuestionMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
deleteQuestionOptionMationByQuId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
updateQuestionOrderByIdByQuId
(
Map
<
String
,
Object
>
question
)
throws
Exception
;
}
skyeye-promote/src/main/java/com/skyeye/eve/service/DwSurveyDirectoryService.java
浏览文件 @
7ed6079e
...
...
@@ -33,4 +33,6 @@ public interface DwSurveyDirectoryService {
public
void
addQuChenMation
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
deleteQuestionMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-promote/src/main/java/com/skyeye/eve/service/impl/DwSurveyDirectoryServiceImpl.java
浏览文件 @
7ed6079e
...
...
@@ -790,5 +790,39 @@ public class DwSurveyDirectoryServiceImpl implements DwSurveyDirectoryService{
}
outputObject
.
setBean
(
map
);
}
/**
*
* @Title: deleteQuestionMationById
* @Description: 删除问题
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public
void
deleteQuestionMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
question
=
dwSurveyDirectoryDao
.
queryQuestionMationById
(
map
);
if
(
question
!=
null
){
if
(
question
.
get
(
"surveyState"
).
toString
().
equals
(
"0"
)){
//设计状态
String
tableName
=
QuType
.
getTableName
(
Integer
.
parseInt
(
question
.
get
(
"quType"
).
toString
()));
if
(!
ToolUtil
.
isBlank
(
tableName
)){
String
[]
questionId
=
QuType
.
getQuestionId
(
Integer
.
parseInt
(
question
.
get
(
"quType"
).
toString
())).
split
(
","
);
String
[]
str
=
tableName
.
split
(
","
);
for
(
int
i
=
0
;
i
<
str
.
length
;
i
++){
map
.
put
(
"tableName"
,
str
[
i
]);
map
.
put
(
"key"
,
questionId
[
i
]);
dwSurveyDirectoryDao
.
deleteQuestionOptionMationByQuId
(
map
);
}
}
dwSurveyDirectoryDao
.
deleteQuestionMationById
(
map
);
//执行物理删除问题
}
else
{
//执行中或者结束
dwSurveyDirectoryDao
.
deleteLogicQuestionMationById
(
map
);
//执行逻辑删除问题
}
dwSurveyDirectoryDao
.
updateQuestionOrderByIdByQuId
(
question
);
//修改该问题排序后面的序号减1
}
}
}
skyeye-promote/src/main/resources/dbmapper/DwSurveyDirectoryMapper.xml
浏览文件 @
7ed6079e
...
...
@@ -403,4 +403,74 @@
</foreach>
</insert>
<select
id=
"queryQuestionMationById"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.answer_input_row answerInputRow,
a.answer_input_width answerInputWidth,
a.belong_id belongId,
a.cell_count cellCount,
a.check_type checkType,
a.contacts_attr contactsAttr,
a.contacts_field contactsField,
a.copy_from_id copyFromId,
a.create_time createTime,
a.hv,
a.is_required isRequired,
a.keywords,
a.order_by_id orderById,
a.param_int01 paramInt01,
a.param_int02 paramInt02,
a.parent_qu_id parentQuId,
a.qu_name quName,
a.qu_note quNote,
a.qu_tag quTag,
a.qu_title quTitle,
a.qu_type quType,
a.rand_order randOrder,
a.tag,
a.visibility,
a.yesno_option yesnoOption,
b.survey_state surveyState
FROM
dw_question a,
dw_survey_directory b
WHERE a.id = #{quId}
AND a.visibility = '1'
AND a.belong_id = b.id
</select>
<update
id=
"deleteLogicQuestionMationById"
parameterType=
"java.util.Map"
>
UPDATE dw_question
<set>
visibility = '0',
</set>
WHERE id = #{quId}
</update>
<delete
id=
"deleteQuestionMationById"
parameterType=
"java.util.Map"
>
DELETE
FROM
dw_question
WHERE
id = #{quId}
</delete>
<delete
id=
"deleteQuestionOptionMationByQuId"
parameterType=
"java.util.Map"
>
DELETE
FROM
${tableName}
WHERE
${key} = #{quId}
</delete>
<update
id=
"updateQuestionOrderByIdByQuId"
parameterType=
"java.util.Map"
>
UPDATE dw_question
<set>
order_by_id = (order_by_id - 1),
</set>
WHERE order_by_id > #{orderById}
AND belong_id = #{belongId}
</update>
</mapper>
\ No newline at end of file
skyeye-promote/src/main/resources/mapping/reqdwsurvey.xml
浏览文件 @
7ed6079e
...
...
@@ -160,6 +160,9 @@
<property
id=
"row"
name=
"row"
ref=
""
var=
"矩阵行选项td json串"
/>
<property
id=
"logic"
name=
"logic"
ref=
""
var=
"逻辑设置json串"
/>
</url>
<url
id=
"dwsurveydirectory015"
path=
"/post/DwSurveyDirectoryController/deleteQuestionMationById"
val=
"删除问题"
allUse=
"1"
>
<property
id=
"quId"
name=
"quId"
ref=
"required"
var=
"问题id"
/>
</url>
<!-- 问卷调查结束 -->
</controller>
\ No newline at end of file
skyeye-promote/src/main/resources/template/js/dwsurveydesign/dwsurveydesign.js
浏览文件 @
7ed6079e
...
...
@@ -419,27 +419,27 @@ layui.config({
$
(
"
.dwQuDelete
"
).
unbind
();
$
(
"
.dwQuDelete
"
).
click
(
function
(){
var
quBody
=
$
(
this
).
parents
(
"
.surveyQuItemBody
"
);
if
(
confirm
(
"
确认要删除此题吗?
"
)){
layer
.
confirm
(
"
确认要删除此题吗?
"
,
{
icon
:
3
,
title
:
'
删除系统菜单
'
},
function
(
index
)
{
layer
.
close
(
index
);
var
quId
=
quBody
.
find
(
"
input[name='quId']
"
).
val
();
if
(
quId
!=
""
){
var
url
=
reqBasePath
+
"
/design/question!ajaxDelete.action
"
;
var
data
=
"
quId=
"
+
quId
;
$
.
ajax
({
url
:
url
,
data
:
data
,
type
:
"
post
"
,
success
:
function
(
msg
){
if
(
msg
==
"
true
"
){
quBody
.
hide
(
"
slow
"
,
function
(){
$
(
this
).
parent
().
remove
();
resetQuItem
();});
}
else
{
alert
(
"
删除失败,请重试!
"
);
}
}
});
if
(
!
isNull
(
quId
)){
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
dwsurveydirectory015
"
,
params
:{
quId
:
quId
},
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
quBody
.
hide
(
"
slow
"
,
function
(){
$
(
this
).
parent
().
remove
();
resetQuItem
();
});
}
else
{
top
.
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
}
else
{
quBody
.
hide
(
"
slow
"
,
function
(){
$
(
this
).
parent
().
remove
();
resetQuItem
();});
quBody
.
hide
(
"
slow
"
,
function
(){
$
(
this
).
parent
().
remove
();
resetQuItem
();
});
}
}
}
);
return
false
;
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录