...
|
...
|
@@ -2,6 +2,7 @@ package service |
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/utils/excel"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture"
|
...
|
...
|
@@ -98,7 +99,7 @@ func (data ExportCompanyUserData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportCooperationUserData 导出共创用户数据
|
|
|
// ExportCooperationUserData 导出共创用户数据
|
|
|
type ExportCooperationUserData struct {
|
|
|
SourceData []allied_creation_user.UserDetail
|
|
|
SelectedField []string
|
...
|
...
|
@@ -179,7 +180,7 @@ func (data ExportCooperationUserData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportProductsData 导出产品数据
|
|
|
// ExportProductsData 导出产品数据
|
|
|
type ExportProductsData struct {
|
|
|
SourceData []allied_creation_manufacture.SearchProductItem
|
|
|
SelectedField []string
|
...
|
...
|
@@ -241,7 +242,7 @@ func (data ExportProductsData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportEmployeeProductiveData 导出员工产能数据
|
|
|
// ExportEmployeeProductiveData 导出员工产能数据
|
|
|
type ExportEmployeeProductiveData struct {
|
|
|
SourceData []allied_creation_manufacture.EmployeeProductiveItem
|
|
|
SelectedField []string
|
...
|
...
|
@@ -327,7 +328,7 @@ func (data ExportEmployeeProductiveData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportWorkshopProductiveData 导出员工产能数据
|
|
|
// ExportWorkshopProductiveData 导出员工产能数据
|
|
|
type ExportWorkshopProductiveData struct {
|
|
|
SourceData []allied_creation_manufacture.WorkshopProductiveItem
|
|
|
SelectedField []string
|
...
|
...
|
@@ -409,7 +410,7 @@ func (data ExportWorkshopProductiveData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportEmployeeAttendanceStaticsData 导出员工产能数据
|
|
|
// ExportEmployeeAttendanceStaticsData 导出员工产能数据
|
|
|
type ExportEmployeeAttendanceStaticsData struct {
|
|
|
SourceData []allied_creation_manufacture.SearchEmployeeAttendanceStaticsItem
|
|
|
SelectedField []string
|
...
|
...
|
@@ -486,7 +487,7 @@ func (data ExportEmployeeAttendanceStaticsData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportWorkshopAttendanceStaticsData 导出车间工时统计
|
|
|
// ExportWorkshopAttendanceStaticsData 导出车间工时统计
|
|
|
type ExportWorkshopAttendanceStaticsData struct {
|
|
|
SourceData []allied_creation_manufacture.SearchWorkshopWorkTimeStaticsItem
|
|
|
SelectedField []string
|
...
|
...
|
@@ -557,7 +558,7 @@ func (data ExportWorkshopAttendanceStaticsData) TableTitle() []string { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
//ExportWorkshopProductiveData 导出员工产能数据
|
|
|
// ExportWorkshopProductiveData 导出员工产能数据
|
|
|
type ExportSecondLevelData struct {
|
|
|
SourceData []allied_creation_manufacture.SecondLevelRecordItem
|
|
|
SelectedField []string
|
...
|
...
|
@@ -636,3 +637,63 @@ func (data ExportSecondLevelData) DataListLen() int { |
|
|
func (data ExportSecondLevelData) TableTitle() []string {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
// ExportRewardSummaryData 导出奖惩明细数据
|
|
|
type ExportRewardSummaryData struct {
|
|
|
SourceData []allied_creation_manufacture.RewardSummaryItem
|
|
|
}
|
|
|
|
|
|
var _ excel.ExcelMaker = (*ExportRewardSummaryData)(nil)
|
|
|
|
|
|
func (data ExportRewardSummaryData) CellValue(index int, enName string) (value interface{}) {
|
|
|
switch enName {
|
|
|
case "workshopName":
|
|
|
return data.SourceData[index].WorkshopName
|
|
|
case "recordDate":
|
|
|
return data.SourceData[index].RecordDate
|
|
|
case "sectionName":
|
|
|
return data.SourceData[index].SectionName
|
|
|
case "workerName":
|
|
|
return data.SourceData[index].WorkerName
|
|
|
case "upToStandard":
|
|
|
return data.SourceData[index].UpToStandard
|
|
|
case "yield":
|
|
|
return data.SourceData[index].Yield
|
|
|
case "accident1":
|
|
|
return data.SourceData[index].Accident1
|
|
|
case "accident2":
|
|
|
return data.SourceData[index].Accident2
|
|
|
case "accident3":
|
|
|
return data.SourceData[index].Accident3
|
|
|
case "summaryResult":
|
|
|
return data.SourceData[index].SummaryResult
|
|
|
case "resultDesc":
|
|
|
return data.SourceData[index].ResultDesc
|
|
|
}
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
func (data ExportRewardSummaryData) DataFieldList() []excel.DataField {
|
|
|
fields := []excel.DataField{
|
|
|
{EnName: "recordDate", CnName: "日期"},
|
|
|
{EnName: "workshopName", CnName: "车间"},
|
|
|
{EnName: "sectionName", CnName: "工段"},
|
|
|
{EnName: "workerName", CnName: "姓名"},
|
|
|
{EnName: "yield", CnName: "产效"},
|
|
|
{EnName: "upToStandard", CnName: "合格率"},
|
|
|
{EnName: "accident1", CnName: "质量事故"},
|
|
|
{EnName: "accident2", CnName: "安全事故"},
|
|
|
{EnName: "accident3", CnName: "异物"},
|
|
|
{EnName: "summaryResult", CnName: "奖惩结果(元)"},
|
|
|
{EnName: "resultDesc", CnName: "产效结果"},
|
|
|
}
|
|
|
return fields
|
|
|
}
|
|
|
|
|
|
func (data ExportRewardSummaryData) DataListLen() int {
|
|
|
return len(data.SourceData)
|
|
|
}
|
|
|
|
|
|
func (data ExportRewardSummaryData) TableTitle() []string {
|
|
|
return nil
|
|
|
} |
...
|
...
|
|