切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
7663abb409d2bc4f810aa1ce69f2cd8aa28229eb
1 个父辈
3a6bccd8
暂存
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
24 行增加
和
3 行删除
pkg/application/staff_assess/service/service_3.go
pkg/infrastructure/dao/staff_assess_dao.go
pkg/application/staff_assess/service/service_3.go
查看文件 @
7663abb
...
...
@@ -2,6 +2,7 @@ package service
import
(
"fmt"
"strconv"
"strings"
"github.com/linmadan/egglib-go/core/application"
...
...
@@ -382,7 +383,7 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy
xlsxFile
:=
excelize
.
NewFile
()
sheetIndex
:=
xlsxFile
.
GetActiveSheetIndex
()
sheetName
:=
xlsxFile
.
GetSheetName
(
sheetIndex
)
//
写入第一行
//写入第一行
xlsxFile
.
SetCellStr
(
sheetName
,
"A1"
,
"每日绩效汇总"
)
//写入二到五行
for
k
,
v
:=
range
headerList
{
...
...
@@ -393,5 +394,25 @@ func (srv StaffAssessServeice) ExportUserAssess(param *query.ListAssessContentCy
xlsxFile
.
SetCellStr
(
sheetName
,
colName
+
"5"
,
v
.
Level4
)
}
//从第六行开始写入用户填写的评估数据
for
k
,
v
:=
range
tableRowSort
{
rowNum
:=
strconv
.
Itoa
(
k
+
6
)
row
:=
tableRows
[
v
]
for
k2
,
v2
:=
range
headerList
{
if
k2
==
0
{
xlsxFile
.
SetCellStr
(
sheetName
,
"A"
+
rowNum
,
row
[
"BeginDay"
])
continue
}
if
k2
==
1
{
xlsxFile
.
SetCellStr
(
sheetName
,
"B"
+
rowNum
,
row
[
"TargetUserName"
])
continue
}
colName
,
_
:=
excelize
.
ColumnNumberToName
(
k2
+
1
)
key
:=
v2
.
Level1
+
"+"
+
v2
.
Level3
if
mVal
,
ok
:=
row
[
key
];
ok
{
xlsxFile
.
SetCellStr
(
sheetName
,
colName
+
rowNum
,
mVal
)
}
}
}
return
nil
,
nil
}
...
...
pkg/infrastructure/dao/staff_assess_dao.go
查看文件 @
7663abb
...
...
@@ -124,7 +124,7 @@ func (d *StaffAssessDao) AllAssessCycleList(companyId int) ([]AssessCycle, error
companyId
,
}
result
:=
[]
AssessCycle
{}
_
,
err
:=
tx
.
Query
One
(
&
result
,
sqlStr
,
condition
...
)
_
,
err
:=
tx
.
Query
(
&
result
,
sqlStr
,
condition
...
)
return
result
,
err
}
...
...
@@ -149,7 +149,7 @@ func (d *StaffAssessDao) AllAssessCycleDayList(companyId int, cycleId int) ([]As
cycleId
,
companyId
,
}
result
:=
[]
AssessCycleDay
{}
_
,
err
:=
tx
.
Query
One
(
&
result
,
sqlStr
,
condition
...
)
_
,
err
:=
tx
.
Query
(
&
result
,
sqlStr
,
condition
...
)
return
result
,
err
}
...
...
请
注册
或
登录
后发表评论