作者 tangxvhui

更新

... ... @@ -160,7 +160,7 @@ func (srv StaffAssessServeice) ListUserAssessContentCycleDay(param *query.ListAs
headerMap := map[string]string{}
// 获取已经填报的内容
changeableRows := map[string]map[string]string{}
tableSort := []string{} //确定列表数据的顺序
tableSort := []string{} //确定列表数据的顺序
for i, v := range contentList {
name := fmt.Sprintf("%s-%s", v.Category, v.ContentName)
key := fmt.Sprintf("k%d", i)
... ... @@ -181,6 +181,12 @@ func (srv StaffAssessServeice) ListUserAssessContentCycleDay(param *query.ListAs
}
list := []map[string]string{}
for _, v := range tableSort {
for _, v2 := range changeableHeader {
if _, ok := changeableRows[v][v2.Key]; ok {
continue
}
changeableRows[v][v2.Key] = ""
}
list = append(list, changeableRows[v])
}
result := adapter.ListUserAssessContent{
... ...
... ... @@ -168,6 +168,7 @@ type UserAssessContent struct {
type SearchConditin1 struct {
CompanyId int //公司id
AssessId int //评估任务id
CycleId int //周期id
BeginDay string //评估的日期
TargetUserName string //被评估人的名称
... ... @@ -194,6 +195,7 @@ func (d *StaffAssessDao) SearchUserAssessContent(param SearchConditin1) ([]UserA
}
sqlStr := ` select
t_staff_assess_1.target_user_id,t_staff_assess_1.target_user_name,t_staff_assess_1.begin_day,
t_staff_assess_1.assess_id,
staff_assess_content.value ,staff_assess_content.sort_by ,
staff_assess_content.category ,staff_assess_content."name" as content_name ,
staff_assess_content.weight
... ...