作者 tangxvhui

周期列表 周期列表输出

@@ -5,5 +5,5 @@ package adapter @@ -5,5 +5,5 @@ package adapter
5 type CycleListAdapter struct { 5 type CycleListAdapter struct {
6 CycleId string `json:"cycleId"` //周期id 6 CycleId string `json:"cycleId"` //周期id
7 CycleName string `json:"cycleName"` // 7 CycleName string `json:"cycleName"` //
8 - SummaryEvaluationId string `json:"summaryEvaluationId"` 8 +
9 } 9 }
@@ -540,7 +540,6 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query @@ -540,7 +540,6 @@ func (srv *SummaryEvaluationService) GetTargetUserCycleList(param *command.Query
540 cycleList := []adapter.CycleListAdapter{} 540 cycleList := []adapter.CycleListAdapter{}
541 for _, v := range cycleData { 541 for _, v := range cycleData {
542 m := adapter.CycleListAdapter{ 542 m := adapter.CycleListAdapter{
543 - SummaryEvaluationId: v.SummaryEvaluationId,  
544 CycleId: v.CycleId, 543 CycleId: v.CycleId,
545 CycleName: v.CycleName, 544 CycleName: v.CycleName,
546 } 545 }
@@ -1350,7 +1349,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue( @@ -1350,7 +1349,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue(
1350 evaluationItems []*domain.EvaluationItemUsed, 1349 evaluationItems []*domain.EvaluationItemUsed,
1351 updatedValue []command.UpdatedItemValue, 1350 updatedValue []command.UpdatedItemValue,
1352 defaultItemValue []*domain.SummaryEvaluationValue, 1351 defaultItemValue []*domain.SummaryEvaluationValue,
1353 - IsTemporary bool, 1352 + isTemporary bool,
1354 ) error { 1353 ) error {
1355 evaluationItemMap := map[int]*domain.EvaluationItemUsed{} 1354 evaluationItemMap := map[int]*domain.EvaluationItemUsed{}
1356 evaluationValueMap := map[int]*domain.SummaryEvaluationValue{} 1355 evaluationValueMap := map[int]*domain.SummaryEvaluationValue{}
@@ -1358,7 +1357,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue( @@ -1358,7 +1357,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue(
1358 for _, v := range evaluationItems { 1357 for _, v := range evaluationItems {
1359 newValue := &domain.SummaryEvaluationValue{} 1358 newValue := &domain.SummaryEvaluationValue{}
1360 newValue.SetBlankValue(evaluationData, v) 1359 newValue.SetBlankValue(evaluationData, v)
1361 - if IsTemporary { 1360 + if isTemporary {
1362 newValue.IsTemporary = 1 1361 newValue.IsTemporary = 1
1363 } 1362 }
1364 evaluationValueMap[v.Id] = newValue 1363 evaluationValueMap[v.Id] = newValue
@@ -1366,6 +1365,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue( @@ -1366,6 +1365,7 @@ func (srv *SummaryEvaluationService) editEvaluationValue(
1366 //重置计数 1365 //重置计数
1367 evaluationData.ResetTotalRating(v) 1366 evaluationData.ResetTotalRating(v)
1368 } 1367 }
  1368 + //如果存在旧值
1369 //新值的id 替换为旧值id 1369 //新值的id 替换为旧值id
1370 for _, v := range *itemValueList { 1370 for _, v := range *itemValueList {
1371 if mValue, ok := evaluationValueMap[v.EvaluationItemId]; ok { 1371 if mValue, ok := evaluationValueMap[v.EvaluationItemId]; ok {
@@ -23,7 +23,6 @@ func NewSummaryEvaluationDao(options map[string]interface{}) *SummaryEvaluationD @@ -23,7 +23,6 @@ func NewSummaryEvaluationDao(options map[string]interface{}) *SummaryEvaluationD
23 type PersonalCycle struct { 23 type PersonalCycle struct {
24 CycleId string `pg:"cycle_id" ` //周期id 24 CycleId string `pg:"cycle_id" ` //周期id
25 CycleName string `pg:"cycle_name"` //周期名称 25 CycleName string `pg:"cycle_name"` //周期名称
26 - SummaryEvaluationId string `pg:"summary_evaluation_id"` //评估任务id  
27 } 26 }
28 27
29 // GetExecutorCycleList 获取执行人拥有的周期列表 28 // GetExecutorCycleList 获取执行人拥有的周期列表
@@ -82,7 +81,6 @@ func (d *SummaryEvaluationDao) CountExecutorCycleList(executorId int, evaluation @@ -82,7 +81,6 @@ func (d *SummaryEvaluationDao) CountExecutorCycleList(executorId int, evaluation
82 func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]PersonalCycle, error) { 81 func (d *SummaryEvaluationDao) GetTargetUserCycleList(executorId int, offset int, limit int, evaluationType int) ([]PersonalCycle, error) {
83 sqlStr := `select 82 sqlStr := `select
84 distinct 83 distinct
85 - summary_evaluation.id as summary_evaluation_id,  
86 summary_evaluation.cycle_id , 84 summary_evaluation.cycle_id ,
87 summary_evaluation.cycle_name 85 summary_evaluation.cycle_name
88 from summary_evaluation 86 from summary_evaluation