Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
8112ae12
Commit
8112ae12
authored
Jul 13, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
09d52492
7138d154
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
728 additions
and
90 deletions
+728
-90
attendance-performance-manager-ui/admin/src/assets/images/fileImg.png
...erformance-manager-ui/admin/src/assets/images/fileImg.png
+0
-0
attendance-performance-manager-ui/admin/src/components/Header.vue
...ce-performance-manager-ui/admin/src/components/Header.vue
+2
-2
attendance-performance-manager-ui/admin/src/components/tools/TableButtons.vue
...ce-manager-ui/admin/src/components/tools/TableButtons.vue
+14
-0
attendance-performance-manager-ui/admin/src/views/feedback/addQuestion/list.vue
...-manager-ui/admin/src/views/feedback/addQuestion/list.vue
+3
-3
attendance-performance-manager-ui/admin/src/views/perform/attend/appeal/drawershow.vue
...r-ui/admin/src/views/perform/attend/appeal/drawershow.vue
+156
-13
attendance-performance-manager-ui/admin/src/views/perform/attend/appeal/list.vue
...manager-ui/admin/src/views/perform/attend/appeal/list.vue
+43
-69
attendance-performance-manager-ui/admin/src/views/perform/rules/attend/components/AttendIndex.vue
...src/views/perform/rules/attend/components/AttendIndex.vue
+6
-1
attendance-performance-manager-ui/admin/src/views/perform/rules/attend/drawershow.vue
...er-ui/admin/src/views/perform/rules/attend/drawershow.vue
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/FeedbackDao.java
...java/com/mortals/xhx/module/feedback/dao/FeedbackDao.java
+26
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/ibatis/FeedbackDaoImpl.java
...rtals/xhx/module/feedback/dao/ibatis/FeedbackDaoImpl.java
+48
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/FeedbackStaffInfoVo.java
...als/xhx/module/feedback/model/vo/FeedbackStaffInfoVo.java
+44
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/FeedbackVo.java
.../com/mortals/xhx/module/feedback/model/vo/FeedbackVo.java
+1
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/OptionSummaryVo.java
...mortals/xhx/module/feedback/model/vo/OptionSummaryVo.java
+39
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/QuestionAnswerVo.java
...ortals/xhx/module/feedback/model/vo/QuestionAnswerVo.java
+44
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/FeedbackService.java
.../mortals/xhx/module/feedback/service/FeedbackService.java
+31
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/impl/FeedbackQuestionServiceImpl.java
...le/feedback/service/impl/FeedbackQuestionServiceImpl.java
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/impl/FeedbackServiceImpl.java
...xhx/module/feedback/service/impl/FeedbackServiceImpl.java
+32
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/web/FeedbackController.java
...m/mortals/xhx/module/feedback/web/FeedbackController.java
+133
-0
attendance-performance-manager/src/main/resources/sqlmap/module/feedback/FeedbackMapperExt.xml
...in/resources/sqlmap/module/feedback/FeedbackMapperExt.xml
+104
-0
No files found.
attendance-performance-manager-ui/admin/src/assets/images/fileImg.png
0 → 100644
View file @
8112ae12
126 KB
attendance-performance-manager-ui/admin/src/components/Header.vue
View file @
8112ae12
...
...
@@ -35,13 +35,13 @@
</ul>
</div>
<div
class=
"controllBar"
>
<
!--
<
div
class=
"controllBar"
>
<el-badge
:value=
"12"
class=
"item"
>
<i
class=
"el-icon-bell"
style=
"font-size: 15px;margin-right: 10px"
>
消息
</i
>
</el-badge>
</div>
</div>
-->
<div
class=
"controllBar"
@
click=
"returnHome"
>
<i
class=
"el-icon-s-home"
style=
"font-size: 15px;margin-right: 10px"
>
首页
</i
...
...
attendance-performance-manager-ui/admin/src/components/tools/TableButtons.vue
View file @
8112ae12
...
...
@@ -39,6 +39,16 @@
>
核查
</el-button
>
<span>
</span>
<el-button
v-if=
"chuli"
type=
"text"
icon=
"el-icon-edit"
size=
"mini"
@
click=
"$emit('edit', row)"
title=
"处理"
>
处理
</el-button
>
<span>
</span>
<Confirm
@
confirm=
"$emit('del', row.id)"
message=
"确定要删除该条记录吗?"
>
<el-button
v-if=
"!noDel"
...
...
@@ -72,6 +82,10 @@ export default {
type
:
Boolean
,
default
:
false
,
},
chuli
:
{
type
:
Boolean
,
default
:
false
,
},
switchBtn
:
{
type
:
Boolean
,
default
:
false
,
...
...
attendance-performance-manager-ui/admin/src/views/feedback/addQuestion/list.vue
View file @
8112ae12
...
...
@@ -260,11 +260,11 @@ export default {
i
.
remark
=
i
.
field
i
.
questionType
=
formType
(
i
.
type
)
i
.
require
=
formatNum
(
i
.
$required
)
i
.
content
=
i
.
info
||
''
i
.
content
=
i
.
title
if
(
formType
(
i
.
type
)
==
1
||
formType
(
i
.
type
)
==
2
)
{
i
.
options
.
forEach
(
j
=>
{
j
.
content
=
j
.
value
j
.
remark
=
j
.
label
j
.
content
=
j
.
label
j
.
remark
=
j
.
value
})
}
if
(
formType
(
i
.
type
)
==
1
||
formType
(
i
.
type
)
==
2
)
{
...
...
attendance-performance-manager-ui/admin/src/views/perform/attend/appeal/drawershow.vue
View file @
8112ae12
...
...
@@ -50,7 +50,9 @@
}}
</el-col
>
<el-col
:span=
"9"
>
异常结果:
{{
form
.
errorTime
?
form
.
errorTime
:
"
--
"
}}
</el-col
>
异常结果:
{{
form
.
errorResult
?
form
.
errorResult
:
"
--
"
}}
</el-col
>
<el-col
:span=
"5"
>
扣分方式:
{{
form
.
subMethod
?
form
.
subMethod
:
"
--
"
}}
</el-col
...
...
@@ -81,7 +83,9 @@
>
绩效规则:
{{
form
.
ruleName
?
form
.
ruleName
:
"
--
"
}}
</el-col
>
<el-col
:span=
"8"
>
加分/扣除分值:
{{
form
.
score
?
form
.
score
:
"
--
"
}}
</el-col
>
加分/扣除分值:
<span
style=
"color:#ff0000"
>
{{
form
.
score
?
form
.
score
:
"
--
"
}}
</span></el-col
>
</el-row>
<el-row>
...
...
@@ -104,20 +108,78 @@
<div
class=
"content"
>
<el-row>
<el-col
:span=
"24"
>
申诉说明:
{{
form
.
appealDesc
?
form
.
appealDesc
:
"
--
"
}}
</el-col
>
申诉说明:
{{
form
.
appealDesc
?
form
.
appealDesc
:
"
--
"
}}
</el-col
>
<el-col
:span=
"24"
>
申诉时间:
{{
form
.
appealTime
?
form
.
appealTime
:
"
--
"
}}
</el-col
>
<el-col
:span=
"24"
>
申诉附件:
{{
form
.
performAttendAppealFilesList
?
form
.
performAttendAppealFilesList
:
"
--
"
}}
</el-col
>
申诉附件:
<span
v-if=
"!form.performAttendAppealFilesList"
>
--
</span>
<div
class=
"img_content"
v-else
>
<div
class=
"imgBox"
v-for=
"val in form.performAttendAppealFilesList"
:key=
"val.id"
@
click=
"hanldeDownloadFile(val)"
>
<img
src=
"../../../../assets/images/fileImg.png"
alt=
""
/>
{{
val
.
fileName
}}
</div>
</div>
</el-col>
</el-row>
</div>
</div>
<div
class=
"box"
v-if=
"form.view == '查看' || form.processStatus == 2"
>
<div
class=
"title"
>
申诉结果
</div>
<div
class=
"content"
>
<el-row>
<el-col
:span=
"8"
>
申诉结果:
{{
form
.
appealResult
?
form
.
appealResult
:
"
--
"
}}
</el-col
>
<el-col
:span=
"8"
>
处理人员:
{{
form
.
updateUserId
?
form
.
updateUserId
:
"
--
"
}}
</el-col
>
<el-col
:span=
"8"
>
处理时间:
{{
form
.
appealTime
?
form
.
appealTime
:
"
--
"
}}
</el-col
>
</el-row>
<el-row>
<el-col
:span=
"24"
>
说明:
{{
form
.
remark
?
form
.
remark
:
"
--
"
}}
</el-col
>
</el-row>
</div>
</div>
<div
class=
"box"
></div>
<div
class=
"box"
v-else
>
<div
class=
"title"
>
申诉结果
</div>
<div
class=
"content"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"申诉结果:"
>
<el-radio-group
v-model=
"form.appealResult"
>
<el-radio
:label=
"1"
>
通过
</el-radio>
<el-radio
:label=
"2"
>
不通过
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"说明:"
>
<el-input
type=
"textarea"
v-model=
"form.remark"
></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<form-buttons
@
submit=
"submitForm"
v-if=
"pageInfo.type != 'view'"
...
...
@@ -393,6 +455,9 @@
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
{
timestampToTime
}
from
"
@/assets/utils/dateFormat.js
"
;
import
{
downloadFile
}
from
"
@/assets/utils/index
"
;
export
default
{
name
:
"
PerformAttendAppealDetail
"
,
mixins
:
[
form
],
...
...
@@ -433,6 +498,26 @@ export default {
},
methods
:
{
// 下载附件
hanldeDownloadFile
(
val
)
{
console
.
log
(
val
);
downloadFile
(
val
.
filePath
,
val
.
fileName
);
},
picMatter
(
val
)
{
if
(
val
||
val
!==
"
--
"
)
{
return
(
<
el
-
image
src
=
{
val
.
indexOf
(
"
http
"
)
==
-
1
?
this
.
baseUrl
+
val
:
val
}
preview
-
src
-
list
=
{
val
.
indexOf
(
"
http
"
)
==
-
1
?
this
.
baseUrl
+
val
:
val
}
style
=
"
width: 100px
"
><
/el-image
>
);
}
else
{
return
val
;
}
},
/** 绩效记录申诉附件信息序号 */
rowPerformAttendAppealFilesIndex
({
row
,
rowIndex
})
{
row
.
index
=
rowIndex
+
1
;
...
...
@@ -472,9 +557,8 @@ export default {
},
// 渲染前置处理
beforeRender
(
data
)
{
if
(
data
.
entity
.
performAttendAppealFilesList
)
{
this
.
performAttendAppealFilesList
=
data
.
entity
.
performAttendAppealFilesList
;
if
(
data
.
performAttendAppealFilesList
)
{
this
.
performAttendAppealFilesList
=
data
.
performAttendAppealFilesList
;
}
return
data
;
},
...
...
@@ -482,10 +566,47 @@ export default {
edit
(
row
)
{
this
.
reset
();
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
perform/attend/appeal/edit
"
;
this
.
getData
();
// this.urls.currUrl = "/perform/attend/appeal/info";
// this.getData();
this
.
$get
(
"
/perform/attend/appeal/info
"
,
{
id
:
row
.
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
form
=
res
.
data
;
}
else
{
this
.
reset
();
}
for
(
let
key
in
this
.
form
)
{
key
==
"
actualAttendTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
attendanceDate
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
createTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
errorTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
updateTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
checkTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
reviewTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
appealTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
complainTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
happenTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
alarmTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
key
==
"
alarmTime
"
?
(
this
.
form
[
key
]
=
timestampToTime
(
this
.
form
[
key
],
6
))
:
""
;
}
this
.
form
.
appealResult
=
""
;
this
.
form
.
remark
=
""
;
this
.
open
=
true
;
});
this
.
pageInfo
.
type
=
"
edit
"
;
this
.
title
=
"
修改
绩效记录申诉信息
"
;
this
.
title
=
"
处理
绩效记录申诉信息
"
;
},
/** 新增 */
add
(
row
)
{
...
...
@@ -501,6 +622,7 @@ export default {
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
perform/attend/appeal/view
"
;
this
.
getData
();
this
.
form
.
view
=
"
查看
"
;
this
.
pageInfo
.
type
=
"
view
"
;
this
.
title
=
"
绩效记录申诉信息详细
"
;
},
...
...
@@ -603,6 +725,27 @@ export default {
/deep/.el-row {
margin-bottom: 20px;
}
.img_content {
width: 100%;
height: auto;
display: flex;
flex-wrap: wrap;
padding: 10px 0 0 10px;
}
.imgBox {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 60px;
height: 80px;
cursor: pointer;
img {
width: 50px;
height: 50px;
margin-top: 10px;
}
}
}
}
}
...
...
attendance-performance-manager-ui/admin/src/views/perform/attend/appeal/list.vue
View file @
8112ae12
...
...
@@ -13,8 +13,17 @@
<div
class=
"content"
>
<div
class=
"search_box"
>
<div
class=
"search"
>
<el-select
v-model=
"dateValue"
placeholder=
"请选择"
style=
"margin: 0 10px;"
>
<el-option
v-for=
"item in optionsMonths"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
<el-select
v-model=
"dateValue"
placeholder=
"请选择"
style=
"margin: 0 10px;"
>
<el-option
v-for=
"item in optionsMonths"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-button
type=
"primary"
>
搜索
</el-button>
...
...
@@ -23,17 +32,29 @@
<div
class=
"data_box"
>
<div
class=
"top"
>
<div
class=
"box"
>
<bar-charts
:title=
"'申诉次数部门排名TOP20'"
:id=
"'dept_20'"
:legendName=
"'申诉次数'"
:styleObj=
"
{ width: '800px', height: '360px' }" />
<bar-charts
:title=
"'申诉次数部门排名TOP20'"
:id=
"'dept_20'"
:legendName=
"'申诉次数'"
:styleObj=
"
{ width: '800px', height: '360px' }"
/>
</div>
<div
class=
"box"
>
<bar-charts
:title=
"'申诉次数个人排名TOP20'"
:id=
"'person_20'"
:legendName=
"'申诉次数'"
:styleObj=
"
{ width: '800px', height: '360px' }" />
<bar-charts
:title=
"'申诉次数个人排名TOP20'"
:id=
"'person_20'"
:legendName=
"'申诉次数'"
:styleObj=
"
{ width: '800px', height: '360px' }"
/>
</div>
</div>
<div
class=
"down"
>
<bar-charts
:title=
"'申诉次数规则排名TOP20'"
:id=
"'rule_20'"
:legendName=
"'申诉次数'"
:styleObj=
"
{ width: '1800px', height: '320px' }" />
<bar-charts
:title=
"'申诉次数规则排名TOP20'"
:id=
"'rule_20'"
:legendName=
"'申诉次数'"
:styleObj=
"
{ width: '1800px', height: '320px' }"
/>
</div>
</div>
</div>
...
...
@@ -197,7 +218,7 @@ export default {
{
label
:
"
操作
"
,
formatter
:
(
row
)
=>
{
return
(
return
row
.
processStatus
==
2
?
(
<
table
-
buttons
noAdd
noDel
...
...
@@ -207,74 +228,27 @@ export default {
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
)
:
(
<
table
-
buttons
noAdd
noDel
noView
noEdit
chuli
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
},
},
],
},
activeName
:
"
1
"
,
optionsMonths
:
[
{
value
:
"
2023-01-00 00:00:00
"
,
label
:
"
1月
"
,
},
{
value
:
"
2023-02-00 00:00:00
"
,
label
:
"
2月
"
,
},
{
value
:
"
2023-03-00 00:00:00
"
,
label
:
"
3月
"
,
},
{
value
:
"
2023-04-00 00:00:00
"
,
label
:
"
4月
"
,
},
{
value
:
"
2023-05-00 00:00:00
"
,
label
:
"
5月
"
,
},
{
value
:
"
2023-06-00 00:00:00
"
,
label
:
"
6月
"
,
},
{
value
:
"
2023-07-00 00:00:00
"
,
label
:
"
7月
"
,
},
{
value
:
"
2023-08-00 00:00:00
"
,
label
:
"
8月
"
,
},
{
value
:
"
2023-09-00 00:00:00
"
,
label
:
"
9月
"
,
},
{
value
:
"
2023-10-00 00:00:00
"
,
label
:
"
10月
"
,
},
{
value
:
"
2023-11-00 00:00:00
"
,
label
:
"
11月
"
,
},
{
value
:
"
2023-12-00 00:00:00
"
,
label
:
"
12月
"
,
},
],
dateValue
:
'
2023-01-00 00:00:00
'
,
dateValue
:
"
2023-01-00 00:00:00
"
,
};
},
mounted
()
{
// this.$post('/perform/attend/appeal/stat', { appealTimeStart: this.dateValue }).then(res => {
// console.log(res)
// })
},
methods
:
{
}
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
attendance-performance-manager-ui/admin/src/views/perform/rules/attend/components/AttendIndex.vue
View file @
8112ae12
...
...
@@ -24,7 +24,12 @@
<h3>
规则管理
</h3>
<div
class=
"search_box"
>
<div
class=
"left_search"
>
<el-button
type=
"primary"
style=
"margin:20px 0"
@
click=
"addRules"
>
<el-button
type=
"primary"
style=
"margin:20px 0"
@
click=
"addRules"
v-if=
"cateObj && cateObj.type"
>
+ 新增规则
</el-button
>
<el-switch
...
...
attendance-performance-manager-ui/admin/src/views/perform/rules/attend/drawershow.vue
View file @
8112ae12
...
...
@@ -156,6 +156,7 @@ export default {
this
.
reset
();
// this.urls.currUrl = "perform/rules/add";
// this.getData();
this
.
form
.
type
=
obj
.
type
;
this
.
dict
=
{
subAddType
:
{
"
1
"
:
"
增加
"
,
...
...
@@ -222,7 +223,6 @@ export default {
assoOwner
:
""
,
ownerScore
:
0.0
,
remark
:
""
,
type
:
""
,
};
this
.
resetForm
(
"
form
"
);
},
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/FeedbackDao.java
View file @
8112ae12
package
com.mortals.xhx.module.feedback.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.module.feedback.model.FeedbackEntity
;
import
com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo
;
import
com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo
;
import
com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo
;
import
java.util.List
;
/**
* 绩效反馈记录信息Dao
...
...
@@ -13,5 +19,25 @@ import java.util.List;
public
interface
FeedbackDao
extends
ICRUDDao
<
FeedbackEntity
,
Long
>{
/***
* 问卷反馈人员列表
* @param feedbackId
* @return
*/
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
);
/**
* 问卷单选多选反馈统计
* @param feedbackId
* @return
*/
List
<
OptionSummaryVo
>
getOptionSummaryList
(
Long
feedbackId
);
/**
* 问卷问题反馈详情
* @param questionId
* @param pageInfo
* @return
*/
Result
<
QuestionAnswerVo
>
getQuestionAnswerList
(
Long
questionId
,
PageInfo
pageInfo
);
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/ibatis/FeedbackDaoImpl.java
View file @
8112ae12
package
com.mortals.xhx.module.feedback.dao.ibatis
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.ParamDto
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo
;
import
com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo
;
import
com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo
;
import
org.apache.ibatis.session.RowBounds
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.feedback.dao.FeedbackDao
;
import
com.mortals.xhx.module.feedback.model.FeedbackEntity
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
...
...
@@ -17,5 +27,43 @@ import java.util.List;
public
class
FeedbackDaoImpl
extends
BaseCRUDDaoMybatis
<
FeedbackEntity
,
Long
>
implements
FeedbackDao
{
@Override
public
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getFeedbackStaffList"
),
feedbackId
);
}
@Override
public
List
<
OptionSummaryVo
>
getOptionSummaryList
(
Long
feedbackId
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getOptionSummaryList"
),
feedbackId
);
}
@Override
public
Result
<
QuestionAnswerVo
>
getQuestionAnswerList
(
Long
questionId
,
PageInfo
pageInfo
)
{
String
sqlId
=
"getQuestionAnswerList"
;
Result
result
=
new
Result
();
List
list
=
null
;
int
count
=
this
.
getQuestionAnswerListCount
(
questionId
);
if
(
count
==
0
)
{
list
=
new
ArrayList
();
}
else
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
sqlId
),
questionId
);
}
else
{
if
(
pageInfo
.
getBeginIndex
()
>
count
)
{
pageInfo
.
setCurrPage
(
1
);
}
RowBounds
rowBounds
=
new
RowBounds
(
pageInfo
.
getBeginIndex
(),
pageInfo
.
getPrePageResult
());
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
sqlId
),
questionId
,
rowBounds
);
}
pageInfo
.
setTotalResult
(
count
);
result
.
setPageInfo
(
pageInfo
);
result
.
setList
((
List
)
list
);
return
result
;
}
private
int
getQuestionAnswerListCount
(
Long
questionId
)
{
return
(
Integer
)
this
.
getSqlSession
().
selectOne
(
this
.
getSqlId
(
"getQuestionAnswerListCount"
),
questionId
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/FeedbackStaffInfoVo.java
0 → 100644
View file @
8112ae12
package
com.mortals.xhx.module.feedback.model.vo
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 问卷反馈人员信息视图
*/
@Data
public
class
FeedbackStaffInfoVo
{
/**
* 反馈问卷id号
*/
private
Long
feedbackId
;
/**
* 用户id
*/
private
Long
staffId
;
/**
* 员工姓名
*/
private
String
name
;
/**
* 所属部门Id
*/
private
Long
deptId
;
/**
* 所属部门名称
*/
private
String
deptName
;
/**
* 职位名称
*/
private
String
positionName
;
/**
* 反馈状态,0:未反馈,1:已反馈
*/
private
Integer
backStatus
;
/**
* 反馈时间
*/
private
Date
backTime
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/FeedbackVo.java
View file @
8112ae12
...
...
@@ -18,4 +18,5 @@ public class FeedbackVo extends BaseEntityLong {
private
List
<
Long
>
staffList
;
private
Long
questionId
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/OptionSummaryVo.java
0 → 100644
View file @
8112ae12
package
com.mortals.xhx.module.feedback.model.vo
;
import
lombok.Data
;
/**
* 问卷单选多选反馈统计视图
*/
@Data
public
class
OptionSummaryVo
{
/**
* 问题id号
*/
private
Long
questionId
;
/**
* 反馈问卷id号
*/
private
Long
feedbackId
;
/**
* 问题内容
*/
private
String
question
;
/**
* 问题类型 (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
*/
private
Integer
questionType
;
/**
* 选项id号
*/
private
Long
optionId
;
/**
* 选项内容
*/
private
String
optionContent
;
/**
* 选项统计
*/
private
Integer
optionCount
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/QuestionAnswerVo.java
0 → 100644
View file @
8112ae12
package
com.mortals.xhx.module.feedback.model.vo
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 问卷问题反馈详情视图
*/
@Data
public
class
QuestionAnswerVo
{
/**
* 问题id号
*/
private
Long
questionId
;
/**
* 反馈问卷id号
*/
private
Long
feedbackId
;
/**
* 问题内容
*/
private
String
question
;
/**
* 问题类型 (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
*/
private
Integer
questionType
;
/**
* 用户id
*/
private
Long
staffId
;
/**
* 员工姓名
*/
private
String
name
;
/**
* 回答内容
*/
private
String
answer
;
/**
* 反馈时间
*/
private
Date
backTime
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/FeedbackService.java
View file @
8112ae12
package
com.mortals.xhx.module.feedback.service
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.feedback.model.FeedbackEntity
;
import
com.mortals.xhx.module.feedback.dao.FeedbackDao
;
import
com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo
;
import
com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo
;
import
com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo
;
import
java.util.List
;
/**
* FeedbackService
*
...
...
@@ -13,4 +22,26 @@ import com.mortals.xhx.module.feedback.dao.FeedbackDao;
public
interface
FeedbackService
extends
ICRUDService
<
FeedbackEntity
,
Long
>{
FeedbackDao
getDao
();
/***
* 问卷反馈人员列表
* @param feedbackId
* @return
*/
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
)
throws
AppException
;
/**
* 问卷单选多选反馈统计
* @param feedbackId
* @return
*/
List
<
OptionSummaryVo
>
getOptionSummaryList
(
Long
feedbackId
)
throws
AppException
;
/**
* 问卷问题反馈详情
* @param questionId
* @param pageInfo
* @return
*/
Result
<
QuestionAnswerVo
>
getQuestionAnswerList
(
Long
questionId
,
PageInfo
pageInfo
)
throws
AppException
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/impl/FeedbackQuestionServiceImpl.java
View file @
8112ae12
...
...
@@ -35,8 +35,8 @@ public class FeedbackQuestionServiceImpl extends AbstractCRUDServiceImpl<Feedbac
item
.
setQuestionId
(
entity
.
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
feedbackOptionService
.
save
(
item
);
}).
count
();
feedbackOptionService
.
save
(
entity
.
getFeedbackOptionList
());
}
super
.
saveAfter
(
entity
,
context
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/impl/FeedbackServiceImpl.java
View file @
8112ae12
package
com.mortals.xhx.module.feedback.service.impl
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.module.feedback.model.*
;
import
com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo
;
import
com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo
;
import
com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo
;
import
com.mortals.xhx.module.feedback.service.FeedbackStaffService
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
...
...
@@ -103,4 +108,31 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
feedbackStaffService
.
removeList
(
staffEntityList
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
@Override
public
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
)
throws
AppException
{
if
(
feedbackId
==
null
){
throw
new
AppException
(
"绩效反馈记录Id不能为空"
);
}
return
dao
.
getFeedbackStaffList
(
feedbackId
);
}
@Override
public
List
<
OptionSummaryVo
>
getOptionSummaryList
(
Long
feedbackId
)
throws
AppException
{
if
(
feedbackId
==
null
){
throw
new
AppException
(
"绩效反馈记录Id不能为空"
);
}
return
dao
.
getOptionSummaryList
(
feedbackId
);
}
@Override
public
Result
<
QuestionAnswerVo
>
getQuestionAnswerList
(
Long
questionId
,
PageInfo
pageInfo
)
throws
AppException
{
if
(
questionId
==
null
){
throw
new
AppException
(
"绩效反馈记录问题Id不能为空"
);
}
if
(
pageInfo
==
null
){
pageInfo
=
new
PageInfo
();
}
return
dao
.
getQuestionAnswerList
(
questionId
,
pageInfo
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/web/FeedbackController.java
View file @
8112ae12
package
com.mortals.xhx.module.feedback.web
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.feedback.model.FeedbackAnswerEntity
;
import
com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo
;
import
com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo
;
import
com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -42,10 +52,133 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
Map
<
String
,
String
>
backStatus
=
new
HashMap
<>();
backStatus
.
put
(
"0"
,
"未反馈"
);
backStatus
.
put
(
"1"
,
"已反馈"
);
this
.
addDict
(
model
,
"processStatus"
,
paramService
.
getParamBySecondOrganize
(
"Feedback"
,
"processStatus"
));
this
.
addDict
(
model
,
"weblink"
,
paramService
.
getParamBySecondOrganize
(
"Feedback"
,
"weblink"
));
this
.
addDict
(
model
,
"backStatus"
,
backStatus
);
super
.
init
(
model
,
context
);
}
/**
* 查询问卷反馈人员列表
* @param feedbackId
* @return
*/
@RequestMapping
(
value
=
{
"getStaffList"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@UnAuth
public
Rest
<
Object
>
getFeedbackStaffList
(
Long
feedbackId
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询问卷反馈人员列表"
;
int
code
=
1
;
try
{
List
<
FeedbackStaffInfoVo
>
result
=
this
.
getService
().
getFeedbackStaffList
(
feedbackId
);
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
Map
<
Integer
,
List
<
FeedbackStaffInfoVo
>>
groupMap
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
FeedbackStaffInfoVo:
:
getBackStatus
));
if
(
groupMap
.
containsKey
(
1
))
{
model
.
put
(
"feedBack"
,
groupMap
.
get
(
1
).
size
());
}
else
{
model
.
put
(
"feedBack"
,
0
);
}
if
(
groupMap
.
containsKey
(
0
))
{
model
.
put
(
"notBack"
,
groupMap
.
get
(
0
).
size
());
}
else
{
model
.
put
(
"notBack"
,
0
);
}
}
else
{
model
.
put
(
"feedBack"
,
0
);
model
.
put
(
"notBack"
,
0
);
}
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
this
.
init
(
model
,
context
);
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
/**
* 问卷单选多选反馈统计
* @param feedbackId
* @return
*/
@RequestMapping
(
value
=
{
"getOptionSummaryList"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@UnAuth
public
Rest
<
Object
>
getOptionSummaryList
(
Long
feedbackId
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询问卷单选多选反馈统计"
;
int
code
=
1
;
try
{
List
<
OptionSummaryVo
>
result
=
this
.
getService
().
getOptionSummaryList
(
feedbackId
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
this
.
init
(
model
,
context
);
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
/**
* 问卷问题反馈详情
* @param query
* @return
*/
@PostMapping
({
"getQuestionAnswerList"
})
@UnAuth
public
Rest
<
Object
>
getQuestionAnswerList
(
@RequestBody
FeedbackEntity
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询问卷问题反馈详情"
;
int
code
=
1
;
try
{
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
Result
<
QuestionAnswerVo
>
result
=
this
.
getService
().
getQuestionAnswerList
(
query
.
getQuestionId
(),
pageInfo
);
model
.
put
(
"data"
,
result
.
getList
());
model
.
put
(
"pageInfo"
,
result
.
getPageInfo
());
this
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
code
=
this
.
doListAfter
(
query
,
(
Map
)
model
,
context
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
this
.
init
(
model
,
context
);
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/resources/sqlmap/module/feedback/FeedbackMapperExt.xml
0 → 100644
View file @
8112ae12
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.module.feedback.dao.ibatis.FeedbackDaoImpl"
>
<!-- 问卷反馈人员列表 -->
<select
id=
"getFeedbackStaffList"
parameterType=
"long"
resultType=
"com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo"
>
SELECT
s.feedbackId,
s.staffId,
s1.`name`,
s1.deptId,
s1.deptName,
s1.positionName,
CASE IFNULL(a.id, 0) WHEN 0 THEN 0 ELSE 1 END AS backStatus,
MAX(a.createTime) AS backTime
FROM
mortals_xhx_feedback_staff s
LEFT JOIN mortals_xhx_feedback_answer a ON s.staffId = a.staffId AND s.feedbackId = a.feedbackId
LEFT JOIN mortals_xhx_staff s1 ON s.staffId = s1.id
WHERE
s.feedbackId = #{feedbackId}
GROUP BY
s.staffId;
</select>
<!-- 问卷单选多选反馈统计 -->
<select
id=
"getOptionSummaryList"
parameterType=
"long"
resultType=
"com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo"
>
SELECT
q.id AS questionId,
q.feedbackId,
q.content AS question,
q.questionType,
o.optionId,
o.optionContent,
count(o.id) optionCount
FROM
mortals_xhx_feedback_question q,
mortals_xhx_feedback_answer a,
mortals_xhx_feedback_answer_option o
WHERE
q.id = a.questionId
AND q.feedbackId = a.feedbackId
AND a.id = o.answerId
AND (q.questionType = 1 OR q.questionType = 2)
AND q.feedbackId = #{feedbackId}
GROUP BY
q.id,
o.optionId;
</select>
<!-- 问卷问题反馈详情 -->
<select
id=
"getQuestionAnswerList"
parameterType=
"long"
resultType=
"com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo"
>
SELECT
q.id AS questionId,
q.feedbackId,
q.content AS question,
q.questionType,
a.staffId,
s.`name`,
a.content AS answer,
a.createTime AS backTime
FROM
mortals_xhx_feedback_question q,
mortals_xhx_feedback_answer a,
mortals_xhx_staff s
WHERE
q.id = a.questionId
AND q.feedbackId = a.feedbackId
AND a.staffId = s.id
AND q.questionType != 1
AND q.questionType != 2
AND q.id = #{questionId}
</select>
<!-- 获取 -->
<select
id=
"getQuestionAnswerListCount"
parameterType=
"long"
resultType=
"int"
>
select count(1)
from
(
SELECT
q.id AS questionId,
q.feedbackId,
q.content AS question,
q.questionType,
a.staffId,
s.`name`,
a.content AS answer,
a.createTime AS backTime
FROM
mortals_xhx_feedback_question q,
mortals_xhx_feedback_answer a,
mortals_xhx_staff s
WHERE
q.id = a.questionId
AND q.feedbackId = a.feedbackId
AND a.staffId = s.id
AND q.questionType != 1
AND q.questionType != 2
AND q.id = #{questionId}
) as a
</select>
</mapper>
\ No newline at end of file
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