|
@@ -447,8 +447,31 @@ func (srv TaskService) UserSelect(param *command.UserSelectCommand) []adapter.Us |
|
@@ -447,8 +447,31 @@ func (srv TaskService) UserSelect(param *command.UserSelectCommand) []adapter.Us |
447
|
|
447
|
|
448
|
// 对异常记录的操作标记
|
448
|
// 对异常记录的操作标记
|
449
|
func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (map[string]string, error) {
|
449
|
func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (map[string]string, error) {
|
|
|
450
|
+ transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
451
|
+ if err != nil {
|
|
|
452
|
+ return map[string]string{}, nil
|
|
|
453
|
+ }
|
|
|
454
|
+ if err := transactionContext.StartTransaction(); err != nil {
|
|
|
455
|
+ return map[string]string{}, nil
|
|
|
456
|
+ }
|
|
|
457
|
+ defer func() {
|
|
|
458
|
+ _ = transactionContext.RollbackTransaction()
|
|
|
459
|
+ }()
|
|
|
460
|
+ // taskAnomalyRepo := factory.CreateTaskAnomalyRepository(map[string]interface{}{
|
|
|
461
|
+ // "transactionContext": transactionContext,
|
|
|
462
|
+ // })
|
450
|
//MarkType= "a" 或者 MarkType= "b"
|
463
|
//MarkType= "a" 或者 MarkType= "b"
|
451
|
//检查最新的异常记录,进行标记
|
464
|
//检查最新的异常记录,进行标记
|
452
|
- // 检查是否有任务相关连的每日评估
|
465
|
+ //检查是否有任务相关连的每日评估
|
|
|
466
|
+ if param.MarkType == "a" || param.MarkType == "b" {
|
|
|
467
|
+
|
|
|
468
|
+ }
|
|
|
469
|
+
|
|
|
470
|
+ //MarkTYpe="c" 或者 MarkType = "d"
|
|
|
471
|
+ //检查最新的异常记录,进行标记
|
|
|
472
|
+
|
|
|
473
|
+ if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
474
|
+ return map[string]string{}, nil
|
|
|
475
|
+ }
|
453
|
return nil, nil
|
476
|
return nil, nil
|
454
|
} |
477
|
} |