切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
郑周
2 years ago
提交
25c0fdbc994b5a8f2f1135bb5e0c51ac6ee73f5d
2 个父辈
d7104d73
b479eca9
Merge branch 'test' into dev-zhengzhou
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
45 行增加
和
15 行删除
pkg/application/notify/app_message_test.go
pkg/application/staff_assess/service/export.go
pkg/application/staff_assess/service/export_data_1.go
pkg/application/summary_evaluation/service/export.go
pkg/application/summary_evaluation/service/service.go
pkg/infrastructure/dao/staff_assess_dao_2.go
pkg/infrastructure/serviceGateway/httplib_test.go
pkg/application/notify/app_message_test.go
0 → 100644
查看文件 @
25c0fdb
package
notify
import
"testing"
func
TestXxx
(
t
*
testing
.
T
)
{
err
:=
appMessageSend
()
if
err
!=
nil
{
t
.
Error
(
err
)
}
}
...
...
pkg/application/staff_assess/service/export.go
查看文件 @
25c0fdb
...
...
@@ -205,7 +205,10 @@ func (e *exportData3) FormatListValue(param []dao.DataStaffAssessContent2) {
e
.
data
[
key
]
=
&
strings
.
Builder
{}
e
.
data
[
key
]
.
WriteString
(
val
.
Value
+
"
\n
"
)
//填写的等级
for
_
,
vv
:=
range
val
.
Remark
{
e
.
data
[
key
]
.
WriteString
(
vv
.
Title
+
"
\n
"
)
vv
.
Title
=
strings
.
TrimSpace
(
vv
.
Title
)
if
vv
.
Title
!=
"填写自评反馈"
{
e
.
data
[
key
]
.
WriteString
(
vv
.
Title
+
"
\n
"
)
}
e
.
data
[
key
]
.
WriteString
(
vv
.
RemarkText
+
"
\n
"
)
}
dayKey
:=
val
.
TargetUserId
+
val
.
EvaluationProjectId
+
val
.
BeginDay
...
...
pkg/application/staff_assess/service/export_data_1.go
查看文件 @
25c0fdb
...
...
@@ -174,7 +174,10 @@ func (e *exportData2) setData(param []dao.ExportData1) {
e
.
data
[
key
]
=
&
strings
.
Builder
{}
e
.
data
[
key
]
.
WriteString
(
v
.
Value
+
"
\n
"
)
for
_
,
v2
:=
range
v
.
Remark
{
e
.
data
[
key
]
.
WriteString
(
v2
.
Title
+
"
\n
"
)
v2
.
Title
=
strings
.
TrimSpace
(
v2
.
Title
)
if
v2
.
Title
!=
"填写自评反馈"
{
e
.
data
[
key
]
.
WriteString
(
v2
.
Title
+
"
\n
"
)
}
e
.
data
[
key
]
.
WriteString
(
v2
.
RemarkText
+
"
\n
"
)
}
}
...
...
pkg/application/summary_evaluation/service/export.go
查看文件 @
25c0fdb
...
...
@@ -50,18 +50,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu
positionRepo
:=
factory
.
CreatePositionRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
limit
:=
param
.
PageSize
offset
:=
(
param
.
PageNumber
-
1
)
*
param
.
PageSize
// limit := param.PageSize
// offset := (param.PageNumber - 1) * param.PageSize
//获取评估列表信息
condition1
:=
map
[
string
]
interface
{}{
"cycleId"
:
param
.
CycleId
,
"types"
:
int
(
domain
.
EvaluationFinish
),
"limit"
:
limit
,
}
if
offset
>
0
{
condition1
[
"offset"
]
=
offset
"limit"
:
5000
,
}
// if offset > 0 {
// condition1["offset"] = offset
// }
if
len
(
param
.
TargetUserName
)
>
0
{
condition1
[
"targetUserName"
]
=
"%"
+
param
.
TargetUserName
+
"%"
}
...
...
@@ -147,6 +147,8 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu
firstSheetName
:=
xlsxFile
.
GetSheetName
(
sheetIndex
)
tableHead
:=
[]
string
{
"姓名"
,
"部门"
,
"职位"
,
"最终绩效得分"
}
tableHead
=
append
(
tableHead
,
ratingHeader
...
)
// 最后一列
tableHead
=
append
(
tableHead
,
"备注"
)
if
len
(
evaluationList
)
>
0
{
xlsxFile
.
SetSheetRow
(
firstSheetName
,
"A1"
,
&
[]
string
{
evaluationList
[
0
]
.
CycleName
+
"最终成绩"
})
if
len
(
tableHead
)
>
1
{
...
...
@@ -171,7 +173,7 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu
}
}
}
dataR
a
w
:=
[]
string
{
dataR
o
w
:=
[]
string
{
v
.
TargetUser
.
UserName
,
departmentName
,
positinName
,
...
...
@@ -179,12 +181,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu
}
for
_
,
v2
:=
range
ratingHeader
{
if
num
,
ok
:=
evaluationRatingMap
[
v
.
Id
][
v2
];
ok
{
dataR
aw
=
append
(
dataRa
w
,
fmt
.
Sprintf
(
"%d"
,
num
))
dataR
ow
=
append
(
dataRo
w
,
fmt
.
Sprintf
(
"%d"
,
num
))
}
else
{
dataR
aw
=
append
(
dataRa
w
,
"0"
)
dataR
ow
=
append
(
dataRo
w
,
"0"
)
}
}
xlsxFile
.
SetSheetRow
(
firstSheetName
,
fmt
.
Sprintf
(
"A%d"
,
i
+
firstDataRow
),
&
dataRaw
)
if
v
.
CheckResult
==
domain
.
EvaluationCheckCompleted
{
dataRow
=
append
(
dataRow
,
"已确认"
)
}
else
{
dataRow
=
append
(
dataRow
,
"未确认"
)
}
//最后一列
xlsxFile
.
SetSheetRow
(
firstSheetName
,
fmt
.
Sprintf
(
"A%d"
,
i
+
firstDataRow
),
&
dataRow
)
}
return
xlsxFile
,
nil
}
...
...
pkg/application/summary_evaluation/service/service.go
查看文件 @
25c0fdb
...
...
@@ -810,7 +810,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSuper(param *domain
if
len
(
evaluationList
)
>
0
{
//上级评估的结束时间
evaluationList
[
0
]
.
BeginTime
=
param
.
EndTime
// evaluationList[0].BeginTime = param.EndTime
nowTime
:=
time
.
Now
()
if
evaluationList
[
0
]
.
BeginTime
.
After
(
nowTime
)
{
evaluationList
[
0
]
.
BeginTime
=
nowTime
}
evaluationList
[
0
]
.
Status
=
domain
.
EvaluationCompleted
err
=
evaluationRepo
.
Save
(
evaluationList
[
0
])
if
err
!=
nil
{
...
...
pkg/infrastructure/dao/staff_assess_dao_2.go
查看文件 @
25c0fdb
...
...
@@ -104,7 +104,7 @@ where 1=1
and staff_assess.cycle_id =? and "types" ='self'
and staff_assess.evaluation_project_id in (
select t_project_4.project_id from t_project_4
) `
)
order by evaluation_item_used.sort_by
`
condition
:=
[]
interface
{}{
cycleId
}
if
len
(
exportUserIds
)
>
0
{
sqlStr
+=
` and staff_assess.target_user->>'userId' in(?) `
...
...
pkg/infrastructure/serviceGateway/httplib_test.go
查看文件 @
25c0fdb
...
...
@@ -5,7 +5,9 @@ import "testing"
func
TestPushInfo
(
t
*
testing
.
T
)
{
//测试消息推送
c
:=
NewHttplibMmmOpenApiServiceGateway
()
resp
,
err
:=
c
.
PushInfo
(
0
,
"mmm.ability.performance"
,
[]
int64
{
3422174102828544
},
"ceshi推送一个消息233"
,
"消息内容xxxx332"
)
//3436890424617728
//3422173870118400
resp
,
err
:=
c
.
PushInfo
(
0
,
"mmm.ability.performance"
,
[]
int64
{
3436890424617728
},
"ceshi推送一个消息233"
,
"消息内容xxxx332"
)
if
err
!=
nil
{
t
.
Error
(
err
)
}
...
...
请
注册
或
登录
后发表评论