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
52b3a013
Commit
52b3a013
authored
Jul 15, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加照片海康下载
parent
fcd63326
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
44 deletions
+54
-44
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/web/FeedbackController.java
...m/mortals/xhx/module/feedback/web/FeedbackController.java
+42
-32
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckAllRecordMapper.xml
...in/resources/sqlmap/module/check/CheckAllRecordMapper.xml
+12
-12
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/web/FeedbackController.java
View file @
52b3a013
package
com.mortals.xhx.module.feedback.web
;
package
com.mortals.xhx.module.feedback.web
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -19,8 +20,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -19,8 +20,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.module.feedback.service.FeedbackService
;
import
com.mortals.xhx.module.feedback.service.FeedbackService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
...
@@ -28,20 +31,22 @@ import com.mortals.framework.util.StringUtils;
...
@@ -28,20 +31,22 @@ import com.mortals.framework.util.StringUtils;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
/**
/**
*
* 绩效反馈记录信息
* 绩效反馈记录信息
*
*
* @author zxfei
* @author zxfei
* @date 2023-07-05
* @date 2023-07-05
*/
*/
@RestController
@RestController
@RequestMapping
(
"feedback"
)
@RequestMapping
(
"feedback"
)
public
class
FeedbackController
extends
BaseCRUDJsonBodyMappingController
<
FeedbackService
,
FeedbackEntity
,
Long
>
{
public
class
FeedbackController
extends
BaseCRUDJsonBodyMappingController
<
FeedbackService
,
FeedbackEntity
,
Long
>
{
@Autowired
@Autowired
private
ParamService
paramService
;
private
ParamService
paramService
;
...
@@ -52,41 +57,43 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -52,41 +57,43 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
@Autowired
@Autowired
private
FeedbackAnswerService
feedbackAnswerService
;
private
FeedbackAnswerService
feedbackAnswerService
;
public
FeedbackController
(){
public
FeedbackController
()
{
super
.
setModuleDesc
(
"绩效反馈记录信息"
);
super
.
setModuleDesc
(
"绩效反馈记录信息"
);
}
}
@Override
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
Map
<
String
,
String
>
backStatus
=
new
HashMap
<>();
Map
<
String
,
String
>
backStatus
=
new
HashMap
<>();
backStatus
.
put
(
"0"
,
"未反馈"
);
backStatus
.
put
(
"0"
,
"未反馈"
);
backStatus
.
put
(
"1"
,
"已反馈"
);
backStatus
.
put
(
"1"
,
"已反馈"
);
this
.
addDict
(
model
,
"processStatus"
,
paramService
.
getParamBySecondOrganize
(
"Feedback"
,
"processStatus"
));
this
.
addDict
(
model
,
"processStatus"
,
paramService
.
getParamBySecondOrganize
(
"Feedback"
,
"processStatus"
));
this
.
addDict
(
model
,
"weblink"
,
paramService
.
getParamBySecondOrganize
(
"Feedback"
,
"weblink"
));
this
.
addDict
(
model
,
"weblink"
,
paramService
.
getParamBySecondOrganize
(
"Feedback"
,
"weblink"
));
this
.
addDict
(
model
,
"backStatus"
,
backStatus
);
this
.
addDict
(
model
,
"backStatus"
,
backStatus
);
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
@Override
@Override
protected
int
infoAfter
(
Long
id
,
Map
<
String
,
Object
>
model
,
FeedbackEntity
entity
,
Context
context
)
throws
AppException
{
protected
int
infoAfter
(
Long
id
,
Map
<
String
,
Object
>
model
,
FeedbackEntity
entity
,
Context
context
)
throws
AppException
{
if
(
CollectionUtils
.
isNotEmpty
(
entity
.
getFeedbackQuestionList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
entity
.
getFeedbackQuestionList
()))
{
for
(
FeedbackQuestionEntity
item:
entity
.
getFeedbackQuestionList
())
{
for
(
FeedbackQuestionEntity
item
:
entity
.
getFeedbackQuestionList
())
{
List
<
FeedbackOptionEntity
>
optionEntities
=
feedbackOptionService
.
find
(
new
FeedbackOptionQuery
().
questionId
(
item
.
getId
()));
List
<
FeedbackOptionEntity
>
optionEntities
=
feedbackOptionService
.
find
(
new
FeedbackOptionQuery
().
questionId
(
item
.
getId
()));
item
.
setFeedbackOptionList
(
optionEntities
);
item
.
setFeedbackOptionList
(
optionEntities
);
}
}
}
}
List
<
FeedbackAnswerEntity
>
feedbackAnswerEntities
=
feedbackAnswerService
.
find
(
new
FeedbackAnswerQuery
().
feedbackId
(
entity
.
getFeedbackId
()));
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
if
(!
ObjectUtils
.
isEmpty
(
feedbackAnswerEntities
)){
List
<
FeedbackAnswerEntity
>
feedbackAnswerEntities
=
feedbackAnswerService
.
find
(
new
FeedbackAnswerQuery
().
feedbackId
(
entity
.
getFeedbackId
()).
staffId
(
context
.
getUser
().
getCustomerId
()));
if
(!
ObjectUtils
.
isEmpty
(
feedbackAnswerEntities
))
{
entity
.
setFeedbackAnswerList
(
feedbackAnswerEntities
);
entity
.
setFeedbackAnswerList
(
feedbackAnswerEntities
);
}
}
}
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
}
}
/**
/**
* 查询问卷反馈人员列表
* 查询问卷反馈人员列表
*
* @param query
* @param query
* @return
* @return
*/
*/
...
@@ -98,23 +105,23 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -98,23 +105,23 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询问卷反馈人员列表"
;
String
busiDesc
=
"查询问卷反馈人员列表"
;
int
code
=
1
;
int
code
=
1
;
try
{
try
{
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
Result
<
FeedbackStaffInfoVo
>
result
=
this
.
getService
().
getFeedbackStaffList
(
query
,
pageInfo
);
Result
<
FeedbackStaffInfoVo
>
result
=
this
.
getService
().
getFeedbackStaffList
(
query
,
pageInfo
);
if
(
CollectionUtils
.
isNotEmpty
(
result
.
getList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
result
.
getList
()))
{
Map
<
Integer
,
List
<
FeedbackStaffInfoVo
>>
groupMap
=
result
.
getList
().
stream
().
collect
(
Collectors
.
groupingBy
(
FeedbackStaffInfoVo:
:
getBackStatus
));
Map
<
Integer
,
List
<
FeedbackStaffInfoVo
>>
groupMap
=
result
.
getList
().
stream
().
collect
(
Collectors
.
groupingBy
(
FeedbackStaffInfoVo:
:
getBackStatus
));
if
(
groupMap
.
containsKey
(
1
))
{
if
(
groupMap
.
containsKey
(
1
))
{
model
.
put
(
"feedBack"
,
groupMap
.
get
(
1
).
size
());
model
.
put
(
"feedBack"
,
groupMap
.
get
(
1
).
size
());
}
else
{
}
else
{
model
.
put
(
"feedBack"
,
0
);
model
.
put
(
"feedBack"
,
0
);
}
}
if
(
groupMap
.
containsKey
(
0
))
{
if
(
groupMap
.
containsKey
(
0
))
{
model
.
put
(
"notBack"
,
groupMap
.
get
(
0
).
size
());
model
.
put
(
"notBack"
,
groupMap
.
get
(
0
).
size
());
}
else
{
}
else
{
model
.
put
(
"notBack"
,
0
);
model
.
put
(
"notBack"
,
0
);
}
}
}
else
{
}
else
{
model
.
put
(
"feedBack"
,
0
);
model
.
put
(
"feedBack"
,
0
);
model
.
put
(
"notBack"
,
0
);
model
.
put
(
"notBack"
,
0
);
}
}
...
@@ -138,10 +145,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -138,10 +145,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/**
/**
* 问卷单选多选反馈统计
* 问卷单选多选反馈统计
*
* @param feedbackId
* @param feedbackId
* @return
* @return
*/
*/
@RequestMapping
(
value
=
{
"getOptionSummaryList"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@RequestMapping
(
value
=
{
"getOptionSummaryList"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@UnAuth
@UnAuth
public
Rest
<
Object
>
getOptionSummaryList
(
Long
feedbackId
)
{
public
Rest
<
Object
>
getOptionSummaryList
(
Long
feedbackId
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Rest
<
Object
>
ret
=
new
Rest
();
...
@@ -149,11 +157,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -149,11 +157,11 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询问卷单选多选反馈统计"
;
String
busiDesc
=
"查询问卷单选多选反馈统计"
;
int
code
=
1
;
int
code
=
1
;
try
{
try
{
List
<
OptionSummaryVo
>
result
=
this
.
getService
().
getOptionSummaryList
(
feedbackId
);
List
<
OptionSummaryVo
>
result
=
this
.
getService
().
getOptionSummaryList
(
feedbackId
);
List
<
OptionSummaryVo
>
list
=
new
ArrayList
<>();
List
<
OptionSummaryVo
>
list
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
Map
<
Long
,
List
<
OptionSummaryVo
>>
groupMap
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
OptionSummaryVo:
:
getQuestionId
));
Map
<
Long
,
List
<
OptionSummaryVo
>>
groupMap
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
OptionSummaryVo:
:
getQuestionId
));
for
(
Long
key
:
groupMap
.
keySet
())
{
for
(
Long
key
:
groupMap
.
keySet
())
{
OptionSummaryVo
vo
=
new
OptionSummaryVo
();
OptionSummaryVo
vo
=
new
OptionSummaryVo
();
...
@@ -185,6 +193,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -185,6 +193,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/**
/**
* 问卷问题反馈详情
* 问卷问题反馈详情
*
* @param query
* @param query
* @return
* @return
*/
*/
...
@@ -222,6 +231,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -222,6 +231,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/**
/**
* 反馈记录整体情况统计
* 反馈记录整体情况统计
*
* @return
* @return
*/
*/
@PostMapping
({
"summary"
})
@PostMapping
({
"summary"
})
...
@@ -234,7 +244,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -234,7 +244,7 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
int
code
=
1
;
int
code
=
1
;
try
{
try
{
Map
<
String
,
Integer
>
result
=
this
.
getService
().
summaryFeedback
();
Map
<
String
,
Integer
>
result
=
this
.
getService
().
summaryFeedback
();
model
.
put
(
"data"
,
result
);
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
...
...
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckAllRecordMapper.xml
View file @
52b3a013
This diff is collapsed.
Click to expand it.
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