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
cefac10b
Commit
cefac10b
authored
Jul 13, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/attendance-performance-platform
parents
41d7cbda
72c6da3f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
279 additions
and
50 deletions
+279
-50
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/req/PerformReq.java
...r/src/main/java/com/mortals/xhx/busiz/req/PerformReq.java
+4
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/rsp/InspectStatInfo.java
.../main/java/com/mortals/xhx/busiz/rsp/InspectStatInfo.java
+21
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/web/InspectApiController.java
.../java/com/mortals/xhx/busiz/web/InspectApiController.java
+130
-7
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/FeedbackDao.java
...java/com/mortals/xhx/module/feedback/dao/FeedbackDao.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/ibatis/FeedbackDaoImpl.java
...rtals/xhx/module/feedback/dao/ibatis/FeedbackDaoImpl.java
+27
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/FeedbackVo.java
.../com/mortals/xhx/module/feedback/model/vo/FeedbackVo.java
+5
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/OptionSummaryVo.java
...mortals/xhx/module/feedback/model/vo/OptionSummaryVo.java
+4
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/FeedbackService.java
.../mortals/xhx/module/feedback/service/FeedbackService.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/impl/FeedbackServiceImpl.java
...xhx/module/feedback/service/impl/FeedbackServiceImpl.java
+6
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/web/FeedbackController.java
...m/mortals/xhx/module/feedback/web/FeedbackController.java
+28
-15
attendance-performance-manager/src/main/resources/sqlmap/module/feedback/FeedbackMapperExt.xml
...in/resources/sqlmap/module/feedback/FeedbackMapperExt.xml
+50
-18
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/req/PerformReq.java
View file @
cefac10b
...
@@ -19,5 +19,9 @@ public class PerformReq extends BaseReq {
...
@@ -19,5 +19,9 @@ public class PerformReq extends BaseReq {
private
Long
id
;
private
Long
id
;
private
Integer
processStatus
;
private
Integer
scoreType
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/rsp/InspectStatInfo.java
0 → 100644
View file @
cefac10b
package
com.mortals.xhx.busiz.rsp
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
InspectStatInfo
{
/**
* 累计次数
*/
private
Integer
totalTimes
;
/**
* 今日次数
*/
private
Integer
todayTimes
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/web/InspectApiController.java
View file @
cefac10b
...
@@ -9,10 +9,15 @@ import com.mortals.framework.model.PageInfo;
...
@@ -9,10 +9,15 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.busiz.req.*
;
import
com.mortals.xhx.busiz.req.*
;
import
com.mortals.xhx.busiz.rsp.AppealStatInfo
;
import
com.mortals.xhx.busiz.rsp.AppealStatInfo
;
import
com.mortals.xhx.busiz.rsp.InspectStatInfo
;
import
com.mortals.xhx.busiz.rsp.PerformInfo
;
import
com.mortals.xhx.busiz.rsp.PerformStatInfo
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.ProcessStatusEnum
;
import
com.mortals.xhx.common.code.ProcessStatusEnum
;
import
com.mortals.xhx.common.code.SubAddTypeEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.*
;
import
com.mortals.xhx.module.check.model.*
;
import
com.mortals.xhx.module.check.model.vo.CheckAllRecordVo
;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.perform.model.*
;
import
com.mortals.xhx.module.perform.model.*
;
import
com.mortals.xhx.module.perform.service.*
;
import
com.mortals.xhx.module.perform.service.*
;
...
@@ -31,7 +36,9 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -31,7 +36,9 @@ import org.springframework.web.bind.annotation.RestController;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED
;
...
@@ -48,9 +55,6 @@ import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
...
@@ -48,9 +55,6 @@ import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
@RequestMapping
(
"/api/v1/inspect"
)
@RequestMapping
(
"/api/v1/inspect"
)
public
class
InspectApiController
extends
AbstractBaseController
<
PerformReq
>
{
public
class
InspectApiController
extends
AbstractBaseController
<
PerformReq
>
{
@Autowired
@Autowired
private
PerformAttendRecordService
attendRecordService
;
private
PerformAttendRecordService
attendRecordService
;
@Autowired
@Autowired
...
@@ -68,6 +72,129 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
...
@@ -68,6 +72,129 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
@Autowired
@Autowired
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
private
CheckAllRecordService
checkAllRecordService
;
/**
* 个人巡查效统计
*/
@PostMapping
(
value
=
"stat"
)
public
Rest
<
InspectStatInfo
>
inspectStat
()
{
String
busiDesc
=
"H5 个人巡查统计"
;
Rest
<
InspectStatInfo
>
rest
=
Rest
.
ok
(
busiDesc
+
" 【成功】"
);
Context
context
=
this
.
getContext
();
if
(
ObjectUtils
.
isEmpty
(
context
)
||
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
throw
new
AppException
(
ERROR_TOKEN_EXPIRED
,
ERROR_TOKEN_EXPIRED_CONTENT
);
}
log
.
info
(
"【{}】【请求体】--> 用户:{}"
,
busiDesc
,
context
.
getUser
().
getRealName
());
try
{
//todo
InspectStatInfo
performStatInfo
=
new
InspectStatInfo
();
performStatInfo
.
setTotalTimes
(
12
);
performStatInfo
.
setTodayTimes
(
4
);
rest
.
setData
(
performStatInfo
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
/**
* 个人巡查列表
*/
@PostMapping
(
value
=
"list"
)
public
Rest
<
Object
>
performList
(
@RequestBody
PerformReq
performReq
)
{
String
busiDesc
=
"个人巡查列表"
;
log
.
info
(
"【{}】【请求体】--> {}"
,
busiDesc
,
JSONObject
.
toJSONString
(
performReq
));
Rest
<
Object
>
rest
=
Rest
.
ok
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Context
context
=
this
.
getContext
();
if
(
ObjectUtils
.
isEmpty
(
context
)
||
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
throw
new
AppException
(
ERROR_TOKEN_EXPIRED
,
ERROR_TOKEN_EXPIRED_CONTENT
);
}
try
{
if
(
ObjectUtils
.
isEmpty
(
performReq
.
getPerformStartDate
()))
{
//未设置时间的情况,默认为当月
performReq
.
setPerformStartDate
(
DateUtil
.
beginOfMonth
(
new
Date
()).
toDateStr
());
performReq
.
setPerformEndDate
(
DateUtil
.
today
());
}
else
{
performReq
.
setPerformStartDate
(
DateUtil
.
beginOfMonth
(
DateUtil
.
parse
(
performReq
.
getPerformStartDate
()).
toJdkDate
()).
toDateStr
());
performReq
.
setPerformEndDate
(
DateUtil
.
endOfMonth
(
DateUtil
.
parse
(
performReq
.
getPerformStartDate
()).
toJdkDate
()).
toDateStr
());
}
CheckAllRecordQuery
query
=
new
CheckAllRecordQuery
();
query
.
setCheckTimeStart
(
performReq
.
getPerformStartDate
());
query
.
setCheckTimeEnd
(
performReq
.
getPerformEndDate
());
query
.
setCreateUserId
(
context
.
getUser
().
getId
());
if
(
PerformTypeEnum
.
全部
.
getValue
().
equals
(
performReq
.
getPerformType
()))
{
List
<
CheckAllRecordVo
>
allCheckRecord
=
checkAllRecordService
.
getAllCheckRecord
(
query
);
List
<
PerformInfo
>
collect
=
allCheckRecord
.
stream
().
map
(
item
->
{
PerformInfo
performInfo
=
new
PerformInfo
();
BeanUtils
.
copyProperties
(
item
,
performInfo
,
BeanUtil
.
getNullPropertyNames
(
item
));
return
performInfo
;
}).
collect
(
Collectors
.
toList
());
model
.
put
(
KEY_RESULT_DATA
,
collect
);
PageInfo
pageAllInfo
=
new
PageInfo
();
pageAllInfo
.
setTotalResult
(
collect
.
size
());
pageAllInfo
.
setCurrPage
(
1
);
pageAllInfo
.
setPrePageResult
(-
1
);
model
.
put
(
PAGEINFO_KEY
,
pageAllInfo
);
parsePageInfo
(
model
,
pageAllInfo
);
}
if
(!
ObjectUtils
.
isEmpty
(
performReq
.
getProcessStatus
())){
query
.
setCheckStatus
(
performReq
.
getProcessStatus
());
List
<
CheckAllRecordVo
>
allCheckRecord
=
checkAllRecordService
.
getAllCheckRecord
(
query
);
List
<
PerformInfo
>
collect
=
allCheckRecord
.
stream
().
map
(
item
->
{
PerformInfo
performInfo
=
new
PerformInfo
();
BeanUtils
.
copyProperties
(
item
,
performInfo
,
BeanUtil
.
getNullPropertyNames
(
item
));
return
performInfo
;
}).
collect
(
Collectors
.
toList
());
model
.
put
(
KEY_RESULT_DATA
,
collect
);
PageInfo
pageAllInfo
=
new
PageInfo
();
pageAllInfo
.
setTotalResult
(
collect
.
size
());
pageAllInfo
.
setCurrPage
(
1
);
pageAllInfo
.
setPrePageResult
(-
1
);
model
.
put
(
PAGEINFO_KEY
,
pageAllInfo
);
parsePageInfo
(
model
,
pageAllInfo
);
}
if
(!
ObjectUtils
.
isEmpty
(
performReq
.
getScoreType
())){
query
.
setSubMethod
(
performReq
.
getScoreType
());
List
<
CheckAllRecordVo
>
allCheckRecord
=
checkAllRecordService
.
getAllCheckRecord
(
query
);
List
<
PerformInfo
>
collect
=
allCheckRecord
.
stream
().
map
(
item
->
{
PerformInfo
performInfo
=
new
PerformInfo
();
BeanUtils
.
copyProperties
(
item
,
performInfo
,
BeanUtil
.
getNullPropertyNames
(
item
));
return
performInfo
;
}).
collect
(
Collectors
.
toList
());
model
.
put
(
KEY_RESULT_DATA
,
collect
);
PageInfo
pageAllInfo
=
new
PageInfo
();
pageAllInfo
.
setTotalResult
(
collect
.
size
());
pageAllInfo
.
setCurrPage
(
1
);
pageAllInfo
.
setPrePageResult
(-
1
);
model
.
put
(
PAGEINFO_KEY
,
pageAllInfo
);
parsePageInfo
(
model
,
pageAllInfo
);
}
// model.put(KEY_RESULT_DATA, result.getList());
// model.put(PAGEINFO_KEY, result.getPageInfo());
// parsePageInfo(model, result.getPageInfo());
rest
.
setData
(
model
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
/**
/**
* 巡查新增
* 巡查新增
...
@@ -81,9 +208,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
...
@@ -81,9 +208,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
try
{
try
{
//根据状态 查询 当前是否已经存在正在进行的申诉
//根据状态 查询 当前是否已经存在正在进行的申诉
if
(
ObjectUtils
.
isEmpty
(
req
.
getPerformType
()))
throw
new
AppException
(
"绩效类型不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
req
.
getPerformType
()))
throw
new
AppException
(
"绩效类型不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
req
.
getPhone
()))
throw
new
AppException
(
"手机号码不能为空!"
);
if
(
ObjectUtils
.
isEmpty
(
req
.
getRuleCode
()))
throw
new
AppException
(
"绩效规则编码不能为空!"
);
if
(
PerformTypeEnum
.
考勤绩效
.
getValue
().
equals
(
req
.
getPerformType
()))
{
if
(
PerformTypeEnum
.
考勤绩效
.
getValue
().
equals
(
req
.
getPerformType
()))
{
boolean
bool
=
attend
(
req
);
boolean
bool
=
attend
(
req
);
...
@@ -290,7 +414,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
...
@@ -290,7 +414,6 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
}
}
protected
void
parsePageInfo
(
Map
<
String
,
Object
>
model
,
PageInfo
pageInfo
)
{
protected
void
parsePageInfo
(
Map
<
String
,
Object
>
model
,
PageInfo
pageInfo
)
{
model
.
put
(
TOTAL
,
pageInfo
.
getTotalResult
());
model
.
put
(
TOTAL
,
pageInfo
.
getTotalResult
());
model
.
put
(
PER_PAGE
,
pageInfo
.
getPrePageResult
());
model
.
put
(
PER_PAGE
,
pageInfo
.
getPrePageResult
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/FeedbackDao.java
View file @
cefac10b
...
@@ -21,10 +21,10 @@ public interface FeedbackDao extends ICRUDDao<FeedbackEntity,Long>{
...
@@ -21,10 +21,10 @@ public interface FeedbackDao extends ICRUDDao<FeedbackEntity,Long>{
/***
/***
* 问卷反馈人员列表
* 问卷反馈人员列表
* @param
feedbackId
* @param
query
* @return
* @return
*/
*/
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
);
Result
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
FeedbackEntity
query
,
PageInfo
pageInfo
);
/**
/**
* 问卷单选多选反馈统计
* 问卷单选多选反馈统计
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/dao/ibatis/FeedbackDaoImpl.java
View file @
cefac10b
...
@@ -28,8 +28,29 @@ public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> imp
...
@@ -28,8 +28,29 @@ public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> imp
@Override
@Override
public
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
)
{
public
Result
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
FeedbackEntity
query
,
PageInfo
pageInfo
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getFeedbackStaffList"
),
feedbackId
);
String
sqlId
=
"getFeedbackStaffList"
;
Result
result
=
new
Result
();
List
list
=
null
;
int
count
=
this
.
getFeedbackStaffListCount
(
query
);
if
(
count
==
0
)
{
list
=
new
ArrayList
();
}
else
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
sqlId
),
query
);
}
else
{
if
(
pageInfo
.
getBeginIndex
()
>
count
)
{
pageInfo
.
setCurrPage
(
1
);
}
RowBounds
rowBounds
=
new
RowBounds
(
pageInfo
.
getBeginIndex
(),
pageInfo
.
getPrePageResult
());
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
sqlId
),
query
,
rowBounds
);
}
pageInfo
.
setTotalResult
(
count
);
result
.
setPageInfo
(
pageInfo
);
result
.
setList
((
List
)
list
);
return
result
;
}
}
@Override
@Override
...
@@ -66,4 +87,8 @@ public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> imp
...
@@ -66,4 +87,8 @@ public class FeedbackDaoImpl extends BaseCRUDDaoMybatis<FeedbackEntity,Long> imp
private
int
getQuestionAnswerListCount
(
Long
questionId
)
{
private
int
getQuestionAnswerListCount
(
Long
questionId
)
{
return
(
Integer
)
this
.
getSqlSession
().
selectOne
(
this
.
getSqlId
(
"getQuestionAnswerListCount"
),
questionId
);
return
(
Integer
)
this
.
getSqlSession
().
selectOne
(
this
.
getSqlId
(
"getQuestionAnswerListCount"
),
questionId
);
}
}
private
int
getFeedbackStaffListCount
(
FeedbackEntity
query
)
{
return
(
Integer
)
this
.
getSqlSession
().
selectOne
(
this
.
getSqlId
(
"getFeedbackStaffListCount"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/FeedbackVo.java
View file @
cefac10b
...
@@ -17,6 +17,10 @@ import java.util.Date;
...
@@ -17,6 +17,10 @@ import java.util.Date;
public
class
FeedbackVo
extends
BaseEntityLong
{
public
class
FeedbackVo
extends
BaseEntityLong
{
private
List
<
Long
>
staffList
;
private
List
<
Long
>
staffList
;
/** 问题Id */
private
Long
questionId
;
private
Long
questionId
;
/** 反馈Id */
private
Long
feedbackId
;
/** 反馈状态 */
private
Integer
backStatus
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/model/vo/OptionSummaryVo.java
View file @
cefac10b
...
@@ -2,6 +2,8 @@ package com.mortals.xhx.module.feedback.model.vo;
...
@@ -2,6 +2,8 @@ package com.mortals.xhx.module.feedback.model.vo;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* 问卷单选多选反馈统计视图
* 问卷单选多选反馈统计视图
*/
*/
...
@@ -36,4 +38,6 @@ public class OptionSummaryVo {
...
@@ -36,4 +38,6 @@ public class OptionSummaryVo {
* 选项统计
* 选项统计
*/
*/
private
Integer
optionCount
;
private
Integer
optionCount
;
List
<
OptionSummaryVo
>
optionList
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/FeedbackService.java
View file @
cefac10b
...
@@ -25,10 +25,10 @@ public interface FeedbackService extends ICRUDService<FeedbackEntity,Long>{
...
@@ -25,10 +25,10 @@ public interface FeedbackService extends ICRUDService<FeedbackEntity,Long>{
/***
/***
* 问卷反馈人员列表
* 问卷反馈人员列表
* @param
feedbackId
* @param
query
* @return
* @return
*/
*/
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
)
throws
AppException
;
Result
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
FeedbackEntity
query
,
PageInfo
pageInfo
)
throws
AppException
;
/**
/**
* 问卷单选多选反馈统计
* 问卷单选多选反馈统计
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/service/impl/FeedbackServiceImpl.java
View file @
cefac10b
...
@@ -110,11 +110,14 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
...
@@ -110,11 +110,14 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
}
}
@Override
@Override
public
List
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
Long
feedbackId
)
throws
AppException
{
public
Result
<
FeedbackStaffInfoVo
>
getFeedbackStaffList
(
FeedbackEntity
query
,
PageInfo
pageInfo
)
throws
AppException
{
if
(
feedbackId
==
null
){
if
(
query
.
getFeedbackId
()
==
null
){
throw
new
AppException
(
"绩效反馈记录Id不能为空"
);
throw
new
AppException
(
"绩效反馈记录Id不能为空"
);
}
}
return
dao
.
getFeedbackStaffList
(
feedbackId
);
if
(
pageInfo
==
null
){
pageInfo
=
new
PageInfo
();
}
return
dao
.
getFeedbackStaffList
(
query
,
pageInfo
);
}
}
@Override
@Override
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/feedback/web/FeedbackController.java
View file @
cefac10b
...
@@ -23,12 +23,10 @@ import com.mortals.xhx.module.feedback.model.FeedbackEntity;
...
@@ -23,12 +23,10 @@ import com.mortals.xhx.module.feedback.model.FeedbackEntity;
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
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.*
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
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
.*;
...
@@ -63,12 +61,12 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -63,12 +61,12 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
/**
/**
* 查询问卷反馈人员列表
* 查询问卷反馈人员列表
* @param
feedbackId
* @param
query
* @return
* @return
*/
*/
@
RequestMapping
(
value
=
{
"getStaffList"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@
PostMapping
({
"getStaffList"
})
@UnAuth
@UnAuth
public
Rest
<
Object
>
getFeedbackStaffList
(
Long
feedbackId
)
{
public
Rest
<
Object
>
getFeedbackStaffList
(
@RequestBody
FeedbackEntity
query
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
...
@@ -76,9 +74,10 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -76,9 +74,10 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
int
code
=
1
;
int
code
=
1
;
try
{
try
{
List
<
FeedbackStaffInfoVo
>
result
=
this
.
getService
().
getFeedbackStaffList
(
feedbackId
);
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
Result
<
FeedbackStaffInfoVo
>
result
=
this
.
getService
().
getFeedbackStaffList
(
query
,
pageInfo
);
Map
<
Integer
,
List
<
FeedbackStaffInfoVo
>>
groupMap
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
FeedbackStaffInfoVo:
:
getBackStatus
));
if
(
CollectionUtils
.
isNotEmpty
(
result
.
getList
()))
{
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
{
...
@@ -93,8 +92,9 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -93,8 +92,9 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
model
.
put
(
"feedBack"
,
0
);
model
.
put
(
"feedBack"
,
0
);
model
.
put
(
"notBack"
,
0
);
model
.
put
(
"notBack"
,
0
);
}
}
model
.
put
(
"data"
,
result
);
model
.
put
(
"data"
,
result
.
getList
());
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
model
.
put
(
"pageInfo"
,
result
.
getPageInfo
());
this
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
}
...
@@ -126,7 +126,21 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -126,7 +126,21 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
int
code
=
1
;
int
code
=
1
;
try
{
try
{
List
<
OptionSummaryVo
>
result
=
this
.
getService
().
getOptionSummaryList
(
feedbackId
);
List
<
OptionSummaryVo
>
result
=
this
.
getService
().
getOptionSummaryList
(
feedbackId
);
model
.
put
(
"data"
,
result
);
List
<
OptionSummaryVo
>
list
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
Map
<
Long
,
List
<
OptionSummaryVo
>>
groupMap
=
result
.
stream
().
collect
(
Collectors
.
groupingBy
(
OptionSummaryVo:
:
getQuestionId
));
for
(
Long
key
:
groupMap
.
keySet
())
{
OptionSummaryVo
vo
=
new
OptionSummaryVo
();
OptionSummaryVo
temp
=
groupMap
.
get
(
key
).
get
(
0
);
vo
.
setQuestionId
(
key
);
vo
.
setQuestion
(
temp
.
getQuestion
());
vo
.
setFeedbackId
(
temp
.
getFeedbackId
());
vo
.
setQuestionType
(
temp
.
getQuestionType
());
vo
.
setOptionList
(
groupMap
.
get
(
key
));
list
.
add
(
vo
);
}
}
model
.
put
(
"data"
,
list
);
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
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
...
@@ -156,14 +170,13 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
...
@@ -156,14 +170,13 @@ 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
<
QuestionAnswerVo
>
result
=
this
.
getService
().
getQuestionAnswerList
(
query
.
getQuestionId
(),
pageInfo
);
Result
<
QuestionAnswerVo
>
result
=
this
.
getService
().
getQuestionAnswerList
(
query
.
getQuestionId
(),
pageInfo
);
model
.
put
(
"data"
,
result
.
getList
());
model
.
put
(
"data"
,
result
.
getList
());
model
.
put
(
"pageInfo"
,
result
.
getPageInfo
());
model
.
put
(
"pageInfo"
,
result
.
getPageInfo
());
this
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
this
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
code
=
this
.
doListAfter
(
query
,
(
Map
)
model
,
context
);
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
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
...
...
attendance-performance-manager/src/main/resources/sqlmap/module/feedback/FeedbackMapperExt.xml
View file @
cefac10b
...
@@ -4,24 +4,56 @@
...
@@ -4,24 +4,56 @@
<mapper
namespace=
"com.mortals.xhx.module.feedback.dao.ibatis.FeedbackDaoImpl"
>
<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
id=
"getFeedbackStaffList"
parameterType=
"com.mortals.xhx.module.feedback.model.FeedbackEntity"
resultType=
"com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo"
>
SELECT
SELECT * FROM (
s.feedbackId,
SELECT
s.staffId,
s.feedbackId,
s1.`name`,
s.staffId,
s1.deptId,
s1.`name`,
s1.deptName,
s1.deptId,
s1.positionName,
s1.deptName,
CASE IFNULL(a.id, 0) WHEN 0 THEN 0 ELSE 1 END AS backStatus,
s1.positionName,
MAX(a.createTime) AS backTime
CASE IFNULL(a.id, 0) WHEN 0 THEN 0 ELSE 1 END AS backStatus,
FROM
MAX(a.createTime) AS backTime
mortals_xhx_feedback_staff s
FROM
LEFT JOIN mortals_xhx_feedback_answer a ON s.staffId = a.staffId AND s.feedbackId = a.feedbackId
mortals_xhx_feedback_staff s
LEFT JOIN mortals_xhx_staff s1 ON s.staffId = s1.id
LEFT JOIN mortals_xhx_feedback_answer a ON s.staffId = a.staffId AND s.feedbackId = a.feedbackId
WHERE
LEFT JOIN mortals_xhx_staff s1 ON s.staffId = s1.id
s.feedbackId = #{feedbackId}
WHERE
GROUP BY
s.feedbackId = #{feedbackId}
s.staffId;
GROUP BY
s.staffId
) AS t WHERE 1=1
<if
test=
"backStatus != null"
>
AND t.backStatus = #{backStatus}
</if>
</select>
<select
id=
"getFeedbackStaffListCount"
parameterType=
"com.mortals.xhx.module.feedback.model.FeedbackEntity"
resultType=
"int"
>
select count(1) from (
SELECT * FROM (
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
) AS t WHERE 1=1
<if
test=
"backStatus != null"
>
AND t.backStatus = #{backStatus}
</if>
) as tt
</select>
</select>
<!-- 问卷单选多选反馈统计 -->
<!-- 问卷单选多选反馈统计 -->
...
...
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