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
a1c3e20c
Commit
a1c3e20c
authored
Jan 30, 2024
by
姬鋆屾
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/attendance-performance-platform
parents
a5cd4efa
fd32a241
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
336 additions
and
19 deletions
+336
-19
attendance-performance-manager-ui/admin/src/router.js
attendance-performance-manager-ui/admin/src/router.js
+1
-0
attendance-performance-manager-ui/admin/src/views/parameter/view.vue
...performance-manager-ui/admin/src/views/parameter/view.vue
+102
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
...m/mortals/xhx/base/system/param/service/ParamService.java
+2
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
.../xhx/base/system/param/service/impl/ParamServiceImpl.java
+7
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/param/web/ParamController.java
...om/mortals/xhx/base/system/param/web/ParamController.java
+32
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
...er/src/main/java/com/mortals/xhx/common/key/Constant.java
+1
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/ParamKey.java
...er/src/main/java/com/mortals/xhx/common/key/ParamKey.java
+2
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/common/pdu/WeightPdu.java
...r/src/main/java/com/mortals/xhx/common/pdu/WeightPdu.java
+37
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckWindowWorkmanPerformDao.java
...ls/xhx/module/check/dao/CheckWindowWorkmanPerformDao.java
+9
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckWindowWorkmanPerformDaoImpl.java
...le/check/dao/ibatis/CheckWindowWorkmanPerformDaoImpl.java
+6
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/model/vo/StaffCheckSummaryQuery.java
...als/xhx/module/check/model/vo/StaffCheckSummaryQuery.java
+5
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
...odule/check/service/impl/CheckOtherRecordServiceImpl.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckWindowWorkmanPerformServiceImpl.java
...ck/service/impl/CheckWindowWorkmanPerformServiceImpl.java
+92
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowOwnerServiceImpl.java
...hx/module/window/service/impl/WindowOwnerServiceImpl.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowWorkmanPerformServiceImpl.java
.../window/service/impl/WindowWorkmanPerformServiceImpl.java
+10
-10
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckWindowWorkmanPerformMapperExt.xml
...qlmap/module/check/CheckWindowWorkmanPerformMapperExt.xml
+26
-0
No files found.
attendance-performance-manager-ui/admin/src/router.js
View file @
a1c3e20c
...
@@ -37,6 +37,7 @@ const router = new Router({
...
@@ -37,6 +37,7 @@ const router = new Router({
...
restBuilder
(
"
user
"
,
"
system/user
"
),
// 用户管理 -- 管理用户
...
restBuilder
(
"
user
"
,
"
system/user
"
),
// 用户管理 -- 管理用户
...
restBuilder
(
"
param
"
,
"
system/param
"
),
// 系统管理--参数管理
...
restBuilder
(
"
param
"
,
"
system/param
"
),
// 系统管理--参数管理
...
restBuilder
(
"
task
"
,
"
system/task
"
),
// 系统管理--任务管理
...
restBuilder
(
"
task
"
,
"
system/task
"
),
// 系统管理--任务管理
...
restBuilder
(
"
parameter
"
,
"
parameter
"
),
// 系统管理--任务管理
// 绩效负责人
// 绩效负责人
...
restBuilder
(
"
workman
"
,
"
workman
"
),
...
restBuilder
(
"
workman
"
,
"
workman
"
),
...
restBuilder
(
"
holiday
"
,
"
holiday
"
),
...
restBuilder
(
"
holiday
"
,
"
holiday
"
),
...
...
attendance-performance-manager-ui/admin/src/views/parameter/view.vue
0 → 100644
View file @
a1c3e20c
<
template
>
<div
class=
"layout"
>
<div
class=
"page"
>
<div
class=
"form-box"
>
<div>
<h2
style=
"text-align: center;padding-bottom: 40px;"
>
累计权重:
<span
style=
"color: red;"
>
100%
</span></h2>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
>
<el-form-item
label=
"自评权重"
>
<el-input
v-model.number=
"form.selfWeight"
>
<template
slot=
"append"
>
%
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"考勤权重"
>
<el-input
v-model.number=
"form.attendWeight"
>
<
template
slot=
"append"
>
%
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"效能权重"
>
<el-input
v-model.number=
"form.effectWeight"
>
<
template
slot=
"append"
>
%
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"办件权重"
>
<el-input
v-model.number=
"form.goworkWeight"
>
<
template
slot=
"append"
>
%
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"评价权重"
>
<el-input
v-model.number=
"form.reviewWeight"
>
<
template
slot=
"append"
>
%
</
template
>
</el-input>
</el-form-item>
<el-form-item
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
立即保存
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
</template>
<
style
lang=
"less"
scoped
>
.form-box{
width: 700px;
margin: 0 auto;
padding-top: 10vh;
&>div{
background-color: rgba(246, 246, 246, 1);
padding: 20px;
}
}
</
style
>
<
script
>
export
default
{
data
(){
return
{
form
:{
selfWeight
:
0
,
attendWeight
:
0
,
effectWeight
:
0
,
goworkWeight
:
0
,
reviewWeight
:
0
,
}
}
},
created
()
{
this
.
onView
()
},
methods
:
{
//提交
onSubmit
(){
const
form
=
{...
this
.
form
}
let
num
=
0
for
(
const
iterator
in
form
)
{
num
=
form
[
iterator
]
+
num
}
if
(
num
!=
100
){
this
.
$message
.
error
(
`权重比例
${
num
}
%,请检查是否正确`
);
return
}
this
.
$post
(
"
/param/save
"
,{
paramKey
:
'
weight
'
,
paramValue
:
JSON
.
stringify
(
this
.
form
)}).
then
(
res
=>
{
const
{
code
,
msg
}
=
res
if
(
code
==
1
){
this
.
$message
.
success
(
'
保存成功
'
);
}
else
{
this
.
$message
.
error
(
msg
);
}
})
},
//查询
onView
(){
this
.
$post
(
"
/param/key?key=weight
"
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
==
1
){
this
.
form
=
JSON
.
parse
(
data
)
}
})
}
},
}
</
script
>
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
View file @
a1c3e20c
...
@@ -25,6 +25,8 @@ public interface ParamService extends ICRUDCacheService<ParamEntity, Long>, IPar
...
@@ -25,6 +25,8 @@ public interface ParamService extends ICRUDCacheService<ParamEntity, Long>, IPar
*/
*/
String
getValueByKey
(
String
key
);
String
getValueByKey
(
String
key
);
Long
getIdByKey
(
String
key
);
/**
/**
* 通过firstOrganize获取配置参数key-value
* 通过firstOrganize获取配置参数key-value
*
*
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
View file @
a1c3e20c
...
@@ -39,6 +39,13 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
...
@@ -39,6 +39,13 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
return
keyValueMap
.
getOrDefault
(
key
,
""
);
return
keyValueMap
.
getOrDefault
(
key
,
""
);
}
}
@Override
public
Long
getIdByKey
(
String
key
)
{
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
Map
<
String
,
Long
>
keyValueMap
=
list
.
parallelStream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getParamKey
(),
y
->
y
.
getId
(),
(
o
,
n
)
->
n
));
return
keyValueMap
.
get
(
key
);
}
@Override
@Override
public
Map
<
String
,
String
>
getParamByFirstOrganize
(
String
firstOrganize
,
String
...
excludeParamKeys
)
{
public
Map
<
String
,
String
>
getParamByFirstOrganize
(
String
firstOrganize
,
String
...
excludeParamKeys
)
{
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/param/web/ParamController.java
View file @
a1c3e20c
...
@@ -3,15 +3,16 @@ package com.mortals.xhx.base.system.param.web;
...
@@ -3,15 +3,16 @@ package com.mortals.xhx.base.system.param.web;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.RepeatSubmit
;
import
com.mortals.framework.annotation.RepeatSubmit
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.code.PageDisplayType
;
import
com.mortals.framework.common.code.PageDisplayType
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.util.FileUtil
;
import
com.mortals.framework.util.FileUtil
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.mortals.framework.web.BaseCRUDJsonMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonMappingController
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
...
@@ -24,6 +25,8 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -24,6 +25,8 @@ import javax.servlet.http.HttpServletResponse;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
/**
/**
* 参数信息
* 参数信息
*
*
...
@@ -59,6 +62,32 @@ public class ParamController extends BaseCRUDJsonBodyMappingController<ParamServ
...
@@ -59,6 +62,32 @@ public class ParamController extends BaseCRUDJsonBodyMappingController<ParamServ
return
result
;
return
result
;
}
}
@RequestMapping
(
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
value
=
"key"
)
@UnAuth
public
String
getValueByKey
(
@RequestParam
(
name
=
"key"
)
String
key
)
{
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
"通过key查询参数值"
+
this
.
getModuleDesc
();
try
{
String
value
=
this
.
service
.
getValueByKey
(
key
);
if
(
ObjectUtils
.
isEmpty
(
value
)
&&
key
.
equals
(
SYS_PARAM_WEIGHT
))
{
WeightPdu
weightPdu
=
new
WeightPdu
();
value
=
JSONObject
.
toJSONString
(
weightPdu
);
}
Long
id
=
this
.
service
.
getIdByKey
(
key
);
jsonObject
.
put
(
KEY_RESULT_DATA
,
value
);
jsonObject
.
put
(
"id"
,
id
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
busiDesc
+
"成功!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"获取异常"
,
e
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
}
return
jsonObject
.
toJSONString
();
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
FileUtil
.
delete
(
"E:\\pic\\1.png"
);
FileUtil
.
delete
(
"E:\\pic\\1.png"
);
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
View file @
a1c3e20c
...
@@ -114,4 +114,5 @@ public final class Constant {
...
@@ -114,4 +114,5 @@ public final class Constant {
public
static
final
String
DISTRIBUTE_PATH
=
"distribute_path"
;
public
static
final
String
DISTRIBUTE_PATH
=
"distribute_path"
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/ParamKey.java
View file @
a1c3e20c
...
@@ -25,4 +25,6 @@ public class ParamKey {
...
@@ -25,4 +25,6 @@ public class ParamKey {
public
static
String
SYS_PARAM_USER_URL
=
"user_url"
;
public
static
String
SYS_PARAM_USER_URL
=
"user_url"
;
public
static
String
SYS_PARAM_WEIGHT
=
"weight"
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/common/pdu/WeightPdu.java
0 → 100644
View file @
a1c3e20c
package
com.mortals.xhx.common.pdu
;
import
lombok.Data
;
/**
* 权重pdu
*/
@Data
public
class
WeightPdu
{
/**
* 自评权重
*/
private
Integer
selfWeight
=
20
;
/**
* 考勤权重
*/
private
Integer
attendWeight
=
20
;
/**
* 效能权重
*/
private
Integer
effectWeight
=
20
;
/**
* 办件权重
*/
private
Integer
goworkWeight
=
20
;
/**
* 评价权重
*/
private
Integer
reviewWeight
=
20
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/CheckWindowWorkmanPerformDao.java
View file @
a1c3e20c
...
@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
...
@@ -2,6 +2,9 @@ package com.mortals.xhx.module.check.dao;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 窗口人员考核汇总核查Dao
* 窗口人员考核汇总核查Dao
...
@@ -13,5 +16,10 @@ import java.util.List;
...
@@ -13,5 +16,10 @@ import java.util.List;
public
interface
CheckWindowWorkmanPerformDao
extends
ICRUDDao
<
CheckWindowWorkmanPerformEntity
,
Long
>{
public
interface
CheckWindowWorkmanPerformDao
extends
ICRUDDao
<
CheckWindowWorkmanPerformEntity
,
Long
>{
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/dao/ibatis/CheckWindowWorkmanPerformDaoImpl.java
View file @
a1c3e20c
package
com.mortals.xhx.module.check.dao.ibatis
;
package
com.mortals.xhx.module.check.dao.ibatis
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.check.dao.CheckWindowWorkmanPerformDao
;
import
com.mortals.xhx.module.check.dao.CheckWindowWorkmanPerformDao
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
...
@@ -17,5 +19,8 @@ import java.util.List;
...
@@ -17,5 +19,8 @@ import java.util.List;
public
class
CheckWindowWorkmanPerformDaoImpl
extends
BaseCRUDDaoMybatis
<
CheckWindowWorkmanPerformEntity
,
Long
>
implements
CheckWindowWorkmanPerformDao
{
public
class
CheckWindowWorkmanPerformDaoImpl
extends
BaseCRUDDaoMybatis
<
CheckWindowWorkmanPerformEntity
,
Long
>
implements
CheckWindowWorkmanPerformDao
{
@Override
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"getSummaryCheckList"
),
query
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/model/vo/StaffCheckSummaryQuery.java
View file @
a1c3e20c
...
@@ -15,4 +15,9 @@ public class StaffCheckSummaryQuery {
...
@@ -15,4 +15,9 @@ public class StaffCheckSummaryQuery {
private
String
checkTimeStart
;
private
String
checkTimeStart
;
/** 结束 核查时间 */
/** 结束 核查时间 */
private
String
checkTimeEnd
;
private
String
checkTimeEnd
;
/** 年 */
private
Integer
year
;
/** 月 */
private
Integer
month
;
private
Long
recordId
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
View file @
a1c3e20c
...
@@ -111,7 +111,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -111,7 +111,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
summaryCheck
(
query
);
//
summaryCheck(query);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
}
...
@@ -183,7 +183,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -183,7 +183,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
sendCheckDingTalk
(
temp
);
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
//
summaryCheck(query);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckWindowWorkmanPerformServiceImpl.java
View file @
a1c3e20c
package
com.mortals.xhx.module.check.service.impl
;
package
com.mortals.xhx.module.check.service.impl
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformEntity
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -11,7 +26,11 @@ import com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity;
...
@@ -11,7 +26,11 @@ import com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity;
import
com.mortals.xhx.module.check.service.CheckWindowWorkmanPerformService
;
import
com.mortals.xhx.module.check.service.CheckWindowWorkmanPerformService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* CheckWindowWorkmanPerformService
* CheckWindowWorkmanPerformService
...
@@ -24,6 +43,9 @@ import java.util.Date;
...
@@ -24,6 +43,9 @@ import java.util.Date;
@Slf4j
@Slf4j
public
class
CheckWindowWorkmanPerformServiceImpl
extends
AbstractCRUDServiceImpl
<
CheckWindowWorkmanPerformDao
,
CheckWindowWorkmanPerformEntity
,
Long
>
implements
CheckWindowWorkmanPerformService
{
public
class
CheckWindowWorkmanPerformServiceImpl
extends
AbstractCRUDServiceImpl
<
CheckWindowWorkmanPerformDao
,
CheckWindowWorkmanPerformEntity
,
Long
>
implements
CheckWindowWorkmanPerformService
{
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Override
@Override
public
void
examine
(
CheckWindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
public
void
examine
(
CheckWindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getId
()
==
null
)
{
if
(
entity
.
getId
()
==
null
)
{
...
@@ -43,5 +65,75 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
...
@@ -43,5 +65,75 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
entity
.
setUpdateTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
dao
.
update
(
entity
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setRecordId
(
temp
.
getRecordId
());
query
.
setYear
(
temp
.
getYear
());
query
.
setMonth
(
temp
.
getMonth
());
summaryCheck
(
query
);
}
private
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
{
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
for
(
StaffCheckSummaryVo
vo
:
summaryVoList
)
{
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
vo
,
staffPerformSummaryEntity
,
BeanUtil
.
getNullPropertyNames
(
vo
));
staffPerformSummaryEntity
.
setOtherScore
(
vo
.
getSumScore
());
StaffPerformSummaryQuery
summaryQuery
=
new
StaffPerformSummaryQuery
();
summaryQuery
.
setStaffId
(
vo
.
getStaffId
());
summaryQuery
.
setYear
(
vo
.
getYear
());
summaryQuery
.
setMonth
(
vo
.
getMonth
());
StaffPerformSummaryEntity
temp
=
staffPerformSummaryService
.
selectOne
(
summaryQuery
);
if
(
temp
!=
null
)
{
if
(
temp
.
getReviewScore
()
!=
null
)
{
staffPerformSummaryEntity
.
setReviewScore
(
temp
.
getReviewScore
());
}
if
(
temp
.
getAttendScore
()
!=
null
)
{
staffPerformSummaryEntity
.
setAttendScore
(
temp
.
getAttendScore
());
}
if
(
temp
.
getGoworkScore
()
!=
null
)
{
staffPerformSummaryEntity
.
setGoworkScore
(
temp
.
getGoworkScore
());
}
if
(
temp
.
getEffectScore
()
!=
null
)
{
staffPerformSummaryEntity
.
setEffectScore
(
temp
.
getEffectScore
());
}
if
(
temp
.
getComplainScore
()
!=
null
)
{
staffPerformSummaryEntity
.
setComplainScore
(
temp
.
getComplainScore
());
}
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
erro
));
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
}
else
{
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setReviewScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setGoworkScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setErrorScore
(
vo
.
getSumScore
());
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
vo
.
getSumScore
()));
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
}
}
}
return
summaryVoList
;
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowOwnerServiceImpl.java
View file @
a1c3e20c
...
@@ -133,8 +133,6 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
...
@@ -133,8 +133,6 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
StaffEntity
staffEntity
=
staffService
.
selectOne
(
new
StaffQuery
().
phoneNumber
(
mobile
));
StaffEntity
staffEntity
=
staffService
.
selectOne
(
new
StaffQuery
().
phoneNumber
(
mobile
));
if
(!
ObjectUtils
.
isEmpty
(
staffEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
staffEntity
))
{
return
staffEntity
;
return
staffEntity
;
}
else
{
}
}
return
getStaffEntityByName
(
name
);
return
getStaffEntityByName
(
name
);
}
else
if
(!
ObjectUtils
.
isEmpty
(
name
))
{
}
else
if
(!
ObjectUtils
.
isEmpty
(
name
))
{
...
@@ -146,6 +144,8 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
...
@@ -146,6 +144,8 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
}
}
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
return
Rest
.
ok
(
staffEntityList
);
return
Rest
.
ok
(
staffEntityList
);
}
else
{
}
}
return
Rest
.
fail
(
"获取窗口工作人员失败"
);
return
Rest
.
fail
(
"获取窗口工作人员失败"
);
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowWorkmanPerformServiceImpl.java
View file @
a1c3e20c
...
@@ -59,7 +59,7 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
...
@@ -59,7 +59,7 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
@Override
@Override
protected
void
saveBefore
(
WindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
WindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
buildWindowInfo
(
entity
);
//
buildWindowInfo(entity);
StaffEntity
staff
=
staffService
.
get
(
entity
.
getOwnerId
());
StaffEntity
staff
=
staffService
.
get
(
entity
.
getOwnerId
());
if
(
staff
!=
null
){
if
(
staff
!=
null
){
entity
.
setDeptId
(
staff
.
getDeptId
());
entity
.
setDeptId
(
staff
.
getDeptId
());
...
@@ -67,13 +67,13 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
...
@@ -67,13 +67,13 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
entity
.
setSalaId
(
staff
.
getSalaId
());
entity
.
setSalaId
(
staff
.
getSalaId
());
entity
.
setSalaName
(
staff
.
getSalaName
());
entity
.
setSalaName
(
staff
.
getSalaName
());
}
}
if
(
entity
.
getWindowId
()!=
null
)
{
//
if(entity.getWindowId()!=null) {
WindowOwnerDetailEntity
windowOwnerDetailEntity
=
windowOwnerDetailService
.
selectOne
(
new
WindowOwnerDetailQuery
().
windowId
(
entity
.
getWindowId
()));
//
WindowOwnerDetailEntity windowOwnerDetailEntity = windowOwnerDetailService.selectOne(new WindowOwnerDetailQuery().windowId(entity.getWindowId()));
if
(
windowOwnerDetailEntity
!=
null
){
//
if(windowOwnerDetailEntity!=null){
entity
.
setWindowCode
(
windowOwnerDetailEntity
.
getWindowCode
());
//
entity.setWindowCode(windowOwnerDetailEntity.getWindowCode());
entity
.
setWindowName
(
windowOwnerDetailEntity
.
getWindowName
());
//
entity.setWindowName(windowOwnerDetailEntity.getWindowName());
}
//
}
}
//
}
super
.
saveBefore
(
entity
,
context
);
super
.
saveBefore
(
entity
,
context
);
}
}
...
@@ -89,7 +89,7 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
...
@@ -89,7 +89,7 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
@Override
@Override
protected
void
updateBefore
(
WindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateBefore
(
WindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
buildWindowInfo
(
entity
);
//
buildWindowInfo(entity);
super
.
updateBefore
(
entity
,
context
);
super
.
updateBefore
(
entity
,
context
);
}
}
...
@@ -144,7 +144,7 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
...
@@ -144,7 +144,7 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
BeanUtils
.
copyProperties
(
entity
,
perform
,
BeanUtil
.
getNullPropertyNames
(
entity
));
BeanUtils
.
copyProperties
(
entity
,
perform
,
BeanUtil
.
getNullPropertyNames
(
entity
));
perform
.
setId
(
null
);
perform
.
setId
(
null
);
perform
.
setRecordId
(
entity
.
getId
());
perform
.
setRecordId
(
entity
.
getId
());
perform
.
setWindowName
(
entity
.
getWindowName
()+
"("
+
entity
.
getWindowCode
()+
")"
);
//
perform.setWindowName(entity.getWindowName()+"("+entity.getWindowCode()+")");
perform
.
setFromName
(
"市政务服务大厅窗口工作人员考核汇总表"
);
perform
.
setFromName
(
"市政务服务大厅窗口工作人员考核汇总表"
);
perform
.
setSubmitDate
(
entity
.
getFillDate
());
perform
.
setSubmitDate
(
entity
.
getFillDate
());
perform
.
setUpdateTime
(
null
);
perform
.
setUpdateTime
(
null
);
...
...
attendance-performance-manager/src/main/resources/sqlmap/module/check/CheckWindowWorkmanPerformMapperExt.xml
0 → 100644
View file @
a1c3e20c
<?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.check.dao.ibatis.CheckWindowWorkmanPerformDaoImpl"
>
<!-- 汇总已审核的核查记录 -->
<select
id=
"getSummaryCheckList"
parameterType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery"
resultType=
"com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo"
>
SELECT
p.`year`,p.`month`,d.staffId,d.staffName,s.deptId,s.deptName,sum(d.sumScore) as sumScore
FROM
mortals_xhx_check_window_workman_perform p,
mortals_xhx_window_workman_perform w,
mortals_xhx_window_workman_perform_detail d,
mortals_xhx_staff s
WHERE
p.recordId = w.id
AND d.performId = w.id
AND s.id = d.staffId
AND checkStatus = 2
AND manageCheckResult = 1
<if
test=
"recordId != null and recordId!=''"
>
AND p.recordId = #{recordId}
</if>
<if
test=
"year != null and year!=''"
>
AND p.`year` = #{year}
</if>
<if
test=
"month != null and month!=''"
>
AND p.`month` = #{month}
</if>
GROUP BY p.`year`,p.`month`,d.staffId,d.staffName,s.deptId,s.deptName
</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