作者 tangxvhui

日常保存

... ... @@ -36,6 +36,9 @@ func (srv TaskService) listTaskAnomaly2(param *command.ListTaskAnomalyCommand) (
})
limit := 500
offset := 0
if param.SubLevel < 2 {
param.SubLevel = 2
}
cnt, anomalyList, err := taskAnomalyDao.List2(param.UserId, param.CompanyId, param.TaskName, param.Category, param.LeaderId, param.DayTime, param.SubLevel, limit, offset)
if err != nil {
return 0, nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -340,6 +343,7 @@ func (srv TaskService) listTaskAnomaly3(param *command.ListTaskAnomalyCommand) (
return int64(cnt), listData, nil
}
// 与我有关的任务,异常列表
func (srv TaskService) ListTaskAnomaly3(param *command.ListTaskAnomalyCommand) (map[string]interface{}, error) {
cnt, listData, err := srv.listTaskAnomaly3(param)
if err != nil {
... ... @@ -349,6 +353,7 @@ func (srv TaskService) ListTaskAnomaly3(param *command.ListTaskAnomalyCommand) (
return result, nil
}
// 人员选择列表
func (srv TaskService) UserSelect(param *command.UserSelectCommand) []adapter.UserItem {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
... ... @@ -403,7 +408,6 @@ func (srv TaskService) UserSelect(param *command.UserSelectCommand) []adapter.Us
}
// 我负责的任务,异常列表
func (srv TaskService) ListTaskAnomaly1(param *command.ListTaskAnomalyCommand) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
... ... @@ -560,7 +564,7 @@ func (srv TaskService) ListTaskAnomaly1(param *command.ListTaskAnomalyCommand) (
return result, nil
}
// 对异常记录的操作标记
// 在 异常中心 对异常记录的操作标记
func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
... ... @@ -945,3 +949,22 @@ func (srv TaskService) TaskAnomalyInfo(param *command.GetTaskAnomalyCommand) (*a
}
return result, nil
}
// 任务列表中,对异常记录的操作标记
// 按照任务id 实则操作标记
func (srv TaskService) MarkTaskAnomalyByTask(param command.MarkTaskAnomalyCommand) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if err := transactionContext.StartTransaction(); err != nil {
return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
if err := transactionContext.CommitTransaction(); err != nil {
return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
return nil, nil
}
... ...
//go:build !local
// +build !local
package constant
import "os"
... ...