作者 tangxvhui

日常保存

package adapter
type TaskAnomalyItem struct {
Id int `json:"id"`
TaskId int `json:"taskId,string"` // 任务id
Category int `json:"category"` // 异常分类
Leader string `json:"leader"` // 任务负责人
CurrentStage TaskStage `json:"currentStage"` // 计划进度的里程碑
LastStage TaskStage `json:"lastStage"` // 实际进度完成的里程碑
TaskStageCheck TaskStage `json:"taskStageCheck"`
AssessFlag int `json:"anomaly"` // 异常反馈的次数
WarnFlag int `json:"warnFlag"` // 里程碑异常次数
AssistFlag int `json:"assistFlag"` // 辅导异常次数
TaskLevel string `json:"taskLevel"` // 任务类型
TaskName string `json:"taskName"` // 任务名称
TaskAlias string `json:"taskAlias"` // 任务别名
TaskEndTime int64 `json:"taskEndTime"` // 任务截止的时间戳,单位:秒;等于0时表示未设置时间
TaskSortBy int `json:"taskSortBy"` // 优先级排序;值越小优先级越高
RecordBegin int64 `json:"recordBegin"` //
MarkA string `json:"markA"` // 去更新
MarkB string `json:"markB"` // 去反馈
MarkC string `json:"markC"` // 去求助
MarkD string `json:"markD"` // 去辅导
AnomalyDesc string `json:"anomalyDesc"` // 异常状况描述
}
// func (t *TaskAnomalyItem) GenAnomalyDesc() {
// nowTime := time.Now()
// var str string
// switch t.Category {
// case 1:
// //里程碑异常
// {
// if t.TaskStageCheck.RealCompletedAt == 0 {
// //逾期未完成
// planCompletedAt := time.Unix(t.TaskStageCheck.PlanCompletedAt, 0)
// subDay := xtime.SubDayAbs(nowTime, planCompletedAt)
// str = fmt.Sprintf("里程碑%s已逾期%d天", t.TaskStageCheck.Name, subDay)
// } else {
// //逾期完成
// planCompletedAt := time.Unix(t.TaskStageCheck.PlanCompletedAt, 0)
// realCompletedAt := time.Unix(t.TaskStageCheck.RealCompletedAt, 0)
// subDay := xtime.SubDayAbs(realCompletedAt, planCompletedAt)
// str = fmt.Sprintf("里程碑%s逾期%d天完成", t.TaskStageCheck.Name, subDay)
// }
// }
// case 2:
// //反馈异常
// {
// recordBegin := time.Unix(t.RecordBegin, 0)
// subDay := xtime.SubDayAbs(nowTime, recordBegin)
// str = fmt.Sprintf(
// "本任务自%s未正常反馈项目进度,已异常%d天",
// recordBegin.Local().Format("2006-01-02"),
// subDay,
// )
// }
// case 3:
// // 辅导异常
// {
// recordBegin := time.Unix(t.RecordBegin, 0)
// subDay := xtime.SubDayAbs(nowTime, recordBegin)
// str = fmt.Sprintf(
// "本任务计划于%s完成辅导,已逾期%d天",
// recordBegin.Local().Format("2006-01-02"),
// subDay,
// )
// }
// }
// }
... ...
package command
type ListTaskAnomalyCommand struct {
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
UserId int `json:"-"`
CompanyId int `json:"-"`
DayTime string `json:"DayTime"`
TaskLeader int `json:"taskLeader,string"`
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
UserId int `json:"-"`
CompanyId int `json:"-"`
TaskName string `json:"taskName"`
DayTime string `json:"dayTime"` //发生异常的日期
Category int `json:"category"` //异常分类
TaskLeaderId string `json:"taskLeaderId"` //任务负责人id
}
... ...
... ... @@ -147,11 +147,6 @@ func isWarnFlag(transactionContext application.TransactionContext, taskData *dom
WarnFlag: int(taskData.WarnFlag),
AssistFlag: 0,
IsLast: 1,
TaskLevel: taskData.LevelName,
TaskName: taskData.Name,
TaskAlias: taskData.Alias,
TaskSortBy: taskData.SortBy,
TaskEndTime: taskData.EndTime,
RecordBegin: taskRecord.CreatedAt.Unix(),
NoticeWho: []map[string]string{},
Marks: map[string]string{
... ... @@ -253,11 +248,6 @@ func isAssistFlag(transactionContext application.TransactionContext, taskData *d
WarnFlag: 0,
AssistFlag: taskData.AssistFlag,
IsLast: 1,
TaskLevel: taskData.LevelName,
TaskName: taskData.Name,
TaskAlias: taskData.Alias,
TaskSortBy: taskData.SortBy,
TaskEndTime: taskData.EndTime,
RecordBegin: taskRecord.CreatedAt.Unix(),
NoticeWho: []map[string]string{},
Marks: map[string]string{
... ... @@ -369,11 +359,6 @@ func isAssessFlag(transactionContext application.TransactionContext, taskData *d
WarnFlag: 0,
AssistFlag: 0,
IsLast: 1,
TaskLevel: taskData.LevelName,
TaskName: taskData.Name,
TaskAlias: taskData.Alias,
TaskSortBy: taskData.SortBy,
TaskEndTime: taskData.EndTime,
RecordBegin: taskRecord.CreatedAt.Unix(),
NoticeWho: []map[string]string{},
Marks: map[string]string{
... ...
package service
import (
"fmt"
"time"
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/tool_funs"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/task/adapter"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/task/command"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/utils/xtime"
)
// 异常中心查看
// 我负责的任务,异常列表
func (srv TaskService) ListTaskAnomaly1(param command.ListTaskAnomalyCommand) (map[string]interface{}, error) {
transactionContext, err := factory.CreateTransactionContext(nil)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
if err := transactionContext.StartTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
defer func() {
_ = transactionContext.RollbackTransaction()
}()
taskAnomalyDao := dao.NewTaskAnomalyDao(map[string]interface{}{
"transactionContext": transactionContext,
})
limit := 500
offset := 0
cnt, anomalyList, err := taskAnomalyDao.List1(param.UserId, param.CompanyId, param.TaskName, param.Category, param.DayTime, limit, offset)
if err != nil {
return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
listData := []adapter.TaskAnomalyItem{}
nowTime := time.Now()
for _, val := range anomalyList {
item := adapter.TaskAnomalyItem{
Id: val.Id,
TaskId: val.TaskId,
Category: val.Category,
Leader: val.LeaderName,
CurrentStage: adapter.TaskStage{
Id: val.CurrentStage.Id,
Name: val.CurrentStage.Name,
StatusDescription: val.CurrentStage.StatusDescription(),
SortBy: val.CurrentStage.SortBy,
PlanCompletedAt: time.Unix(val.CurrentStage.PlanCompletedAt, 0).Local().Format("2006-01-02"),
RealCompletedAt: "",
},
LastStage: adapter.TaskStage{
Id: val.LastStage.Id,
Name: val.LastStage.Name,
StatusDescription: val.LastStage.StatusDescription(),
SortBy: val.LastStage.SortBy,
PlanCompletedAt: time.Unix(val.LastStage.PlanCompletedAt, 0).Local().Format("2006-01-02"),
RealCompletedAt: "",
},
AssessFlag: val.AssessFlag,
WarnFlag: val.WarnFlag,
AssistFlag: val.AssistFlag,
TaskLevel: val.LevelName,
TaskName: val.TaskName,
TaskAlias: val.TaskAlias,
TaskEndTime: int64(val.TaskEndTime),
TaskSortBy: val.TaskSortBy,
RecordBegin: val.RecordBegin,
MarkA: "",
MarkB: "",
MarkC: "",
MarkD: "",
}
if len(val.Marks) > 0 {
item.MarkA = val.Marks["a"]
item.MarkB = val.Marks["b"]
item.MarkC = val.Marks["c"]
item.MarkD = val.Marks["d"]
}
if val.TaskStageCheck.RealCompletedAt > 0 {
item.TaskStageCheck.RealCompletedAt = time.Unix(val.TaskStageCheck.RealCompletedAt, 0).Local().Format("2006-01-02")
}
if val.CurrentStage.RealCompletedAt > 0 {
item.CurrentStage.RealCompletedAt = time.Unix(val.CurrentStage.RealCompletedAt, 0).Local().Format("2006-01-02")
}
if val.LastStage.RealCompletedAt > 0 {
item.LastStage.RealCompletedAt = time.Unix(val.LastStage.RealCompletedAt, 0).Local().Format("2006-01-02")
}
switch val.Category {
case 1:
{
//里程碑异常
if val.TaskStageCheck.RealCompletedAt == 0 {
//逾期未完成
planCompletedAt := time.Unix(val.TaskStageCheck.PlanCompletedAt, 0)
subDay := xtime.SubDayAbs(nowTime, planCompletedAt)
item.AnomalyDesc = fmt.Sprintf("里程碑%s已逾期%d天", val.TaskStageCheck.Name, subDay)
} else {
//逾期完成
planCompletedAt := time.Unix(val.TaskStageCheck.PlanCompletedAt, 0)
realCompletedAt := time.Unix(val.TaskStageCheck.RealCompletedAt, 0)
subDay := xtime.SubDayAbs(realCompletedAt, planCompletedAt)
item.AnomalyDesc = fmt.Sprintf("里程碑%s逾期%d天完成", val.TaskStageCheck.Name, subDay)
}
}
case 2:
//反馈异常
{
recordBegin := time.Unix(val.RecordBegin, 0)
subDay := xtime.SubDayAbs(nowTime, recordBegin)
item.AnomalyDesc = fmt.Sprintf(
"本任务自%s未正常反馈项目进度,已异常%d天",
recordBegin.Local().Format("2006-01-02"),
subDay,
)
}
case 3:
//辅导异常
{
recordBegin := time.Unix(val.RecordBegin, 0)
subDay := xtime.SubDayAbs(nowTime, recordBegin)
item.AnomalyDesc = fmt.Sprintf(
"本任务计划于%s完成辅导,已逾期%d天",
recordBegin.Local().Format("2006-01-02"),
subDay,
)
}
}
listData = append(listData, item)
}
result := tool_funs.SimpleWrapGridMap(int64(cnt), listData)
return result, nil
}
// 我的下级负责任务,异常列表
func (srv TaskService) ListTaskAnomaly2() {}
// 与我有关的任务,异常列表
func (srv TaskService) ListTaskAnomaly3() {}
// 对异常记录的操作标记
func (srv TaskService) MarkTaskAnomaly() {}
... ...
... ... @@ -14,7 +14,7 @@ type TaskAnomaly struct {
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
CompanyId int `json:"companyId,string"`
TaskId int `jsom:"taskId,string"` // 任务id
TaskId int `json:"taskId,string"` // 任务id
TaskRecordId int `json:"taskRecordId,string"` // 任务反馈的进度
Category int `json:"category"` // 异常记录的分类 1 里程碑异常;2反馈异常 ;3 辅导异常
CurrentStage TaskStage `json:"currentStage"` // 计划进度的里程碑
... ... @@ -24,11 +24,6 @@ type TaskAnomaly struct {
WarnFlag int `json:"warnFlag"` // 里程碑异常次数
AssistFlag int `json:"assistFlag"` // 辅导异常次数
IsLast int `json:"isLast"` // 是否是最新的一条记录 1 是最新的记录 2 不是最新的记录
TaskLevel string `json:"taskLevel"` // 任务类型
TaskName string `json:"taskName"` // 任务名称
TaskAlias string `json:"taskAlias"` // 任务别名
TaskSortBy TaskSortBy `json:"taskSortBy"` // 优先级排序;值越小优先级越高
TaskEndTime int64 `json:"taskEndTime"` // 任务截止的时间戳,单位:秒;等于0时表示未设置时间
RecordBegin int64 `json:"recordBegin"` // 异常记录的开始时间
NoticeWho []map[string]string `json:"noticeWho"` // 异常记录消息通知的人
Marks map[string]string `json:"marks"` // 已经操作的标记
... ...
package dao
import (
"fmt"
"github.com/go-pg/pg/v10"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
)
... ... @@ -20,27 +23,104 @@ func NewTaskAnomalyDao(options map[string]interface{}) *TaskAnomalyDao {
}
}
type ListTaskAnomaly struct {
Id int `pg:"id"`
TaskId int `pg:"task_id"`
Category int `pg:"category"`
CurrentStage domain.TaskStage `pg:"current_stage"` // 计划执行的里程碑
LastStage domain.TaskStage `pg:"last_stage"` // 上一个完成的里程碑
TaskStageCheck domain.TaskStage `pg:"task_stage_check"` //
AssessFlag int `pg:"assess_flag"`
WarnFlag int `pg:"warn_flag"`
AssistFlag int `pg:"assist_flag"`
RecordBegin int64 `pg:"record_begin"`
Marks map[string]string `pg:"marks"`
NoticeWho []map[string]string `pg:"notice_who"`
TaskAlias string `pg:"task_alias"`
TaskName string `pg:"task_name"`
TaskEndTime int `pg:"task_end_time"`
TaskSortBy int `pg:"task_sort_by"`
LeaderName string `pg:"leader_name"`
LevelName string `pg:"level_name"`
}
// 异常的任务记录, 获取我负责的任务
// userId 谁要查看数据
// companyId 公司id
// dayTime 搜索条件日期 ,例:"2006-01-02"
// pageSize 分页大小
// pageNumber 分页页码
func (d *TaskAnomalyDao) List1(userId int, companyId int, dayTime string, pageSize int, pageNumber int) (int, []*domain.Task, error) {
// with t_task_ignore as (
// select task_ignore.id ,task_ignore.task_id
// from task_ignore
// where user_id = 0
// )
// select *
// from task as task_anomaly
// left join t_task_ignore on task_anomaly.id=t_task_ignore.task_id
// where t_task_ignore.id isnull and task_anomaly.company_id =?
// order by task_anomaly.id desc
// limit 20
return 0, nil, nil
func (d *TaskAnomalyDao) List1(userId int, companyId int, taskName string, category int, dayTime string, limit int, offset int) (int, []ListTaskAnomaly, error) {
sqlStr1 := ` with t_task_ignore as (
select task_ignore.id ,task_ignore.task_id
from task_ignore
where user_id = ?
)select
task_anomaly.id,
task_anomaly.task_id,
task_anomaly.category,
task_anomaly.current_stage,
task_anomaly.last_stage,
task_anomaly.task_stage_check,
task_anomaly.assess_flag,
task_anomaly.warn_flag,
task_anomaly.assist_flag,
task_anomaly.record_begin,
task_anomaly.marks,
task_anomaly.notice_who,
task.alias as "task_alias",
task."name" as "task_name",
task.end_time as "task_end_time",
task.sort_by as "task_sort_by",
task.leader->>'name' as "leader_name",
task.level_name
from task_anomaly
join task on task.id = task_anomaly.task_id
left join t_task_ignore on task_anomaly.task_id=t_task_ignore.task_id
where t_task_ignore.id isnull and task.deleted_at isnull
and task_anomaly.company_id = ?
and task.leader->>'id'='?' `
sqlStr2 := ` with t_task_ignore as (
select task_ignore.id ,task_ignore.task_id
from task_ignore
where user_id = ?
)select count(*) as cnt
from task_anomaly
join task on task.id = task_anomaly.task_id
left join t_task_ignore on task_anomaly.task_id=t_task_ignore.task_id
where t_task_ignore.id isnull and task.deleted_at isnull
and task_anomaly.company_id = ?
and task.leader->>'id'='?' `
condition := []interface{}{userId, companyId, userId}
if len(dayTime) > 0 {
condition = append(condition, dayTime)
sqlStr2 += ` and to_char(task_anomaly.created_at,'yyyy-MM-dd') =? `
sqlStr1 += ` and to_char(task_anomaly.created_at,'yyyy-MM-dd') =? `
}
if len(taskName) > 0 {
condition = append(condition, "%"+taskName+"%")
sqlStr2 += ` and task.alias like ? `
sqlStr1 += ` and task.alias like ? `
}
if category > 0 {
condition = append(condition, category)
sqlStr1 += ` and task_anomaly.category=? `
sqlStr2 += ` and task_anomaly.category=? `
}
condition = append(condition, limit, offset)
sqlStr1 += ` order by task_anomaly.id desc limit ? offset ? `
result := []ListTaskAnomaly{}
tx := d.transactionContext.PgTx
_, err := tx.Query(&result, sqlStr1, condition...)
if err != nil {
return 0, result, err
}
var cnt int
_, err = tx.QueryOne(pg.Scan(&cnt), sqlStr2, condition...)
return cnt, result, err
}
// 异常的任务记录,获取我的下级负责的任务
... ... @@ -49,7 +129,7 @@ func (d *TaskAnomalyDao) List1(userId int, companyId int, dayTime string, pageSi
// dayTime 搜索条件日期 ,例:"2006-01-02"
// pageSize 分页大小
// pageNumber 分页页码
func (d *TaskAnomalyDao) List2(userId int, companyId int, dayTime string, pageSize int, pageNumber int) error {
func (d *TaskAnomalyDao) List2(userId int, companyId int, leaderId string, dayTime string, pageSize int, pageNumber int) error {
return nil
}
... ... @@ -60,6 +140,81 @@ func (d *TaskAnomalyDao) List2(userId int, companyId int, dayTime string, pageSi
// dayTime 搜索条件日期 ,例:"2006-01-02"
// pageSize 分页大小
// pageNumber 分页页码
func (d *TaskAnomalyDao) List3(userId int, companyId int, dayTime string, pageSize int, pageNumber int) error {
return nil
func (d *TaskAnomalyDao) List3(userId int, companyId int, taskName string, category int, dayTime string, leaderId string, limit int, offset int) (int, []ListTaskAnomaly, error) {
sqlStr1 := ` with t_task_ignore as (
select task_ignore.id ,task_ignore.task_id
from task_ignore
where user_id = ?
)select
task_anomaly.id,
task_anomaly.task_id,
task_anomaly.category,
task_anomaly.current_stage,
task_anomaly.last_stage,
task_anomaly.task_stage_check,
task_anomaly.assess_flag,
task_anomaly.warn_flag,
task_anomaly.assist_flag,
task_anomaly.record_begin,
task_anomaly.marks,
task_anomaly.notice_who,
task.alias as "task_alias",
task."name" as "task_name",
task.end_time as "task_end_time",
task.sort_by as "task_sort_by",
task.leader->>'name' as "leader_name",
task.level_name
from task_anomaly
join task on task.id = task_anomaly.task_id
left join t_task_ignore on task_anomaly.task_id=t_task_ignore.task_id
where t_task_ignore.id isnull and task.deleted_at isnull
and task_anomaly.company_id = ?
and task.related_user@> ? `
sqlStr2 := ` with t_task_ignore as (
select task_ignore.id ,task_ignore.task_id
from task_ignore
where user_id = ?
)select count(*) as cnt
from task_anomaly
join task on task.id = task_anomaly.task_id
left join t_task_ignore on task_anomaly.task_id=t_task_ignore.task_id
where t_task_ignore.id isnull and task.deleted_at isnull
and task_anomaly.company_id = ?
and task.related_user@> ? `
condition := []interface{}{userId, companyId, fmt.Sprintf("[%d]", userId)}
if len(dayTime) > 0 {
condition = append(condition, dayTime)
sqlStr2 += ` and to_char(task_anomaly.created_at,'yyyy-MM-dd') =? `
sqlStr1 += ` and to_char(task_anomaly.created_at,'yyyy-MM-dd') =? `
}
if len(taskName) > 0 {
condition = append(condition, "%"+taskName+"%")
sqlStr2 += ` and task.alias like ? `
sqlStr1 += ` and task.alias like ? `
}
if category > 0 {
condition = append(condition, category)
sqlStr1 += ` and task_anomaly.category=? `
sqlStr2 += ` and task_anomaly.category=? `
}
if len(leaderId) > 0 {
condition = append(condition, fmt.Sprintf(`{"id":"%s"}`, leaderId))
sqlStr1 += ` and task.leader@>? `
sqlStr2 += ` and task.leader@>? `
}
condition = append(condition, limit, offset)
sqlStr1 += ` order by task_anomaly.id desc limit ? offset ? `
result := []ListTaskAnomaly{}
tx := d.transactionContext.PgTx
_, err := tx.Query(&result, sqlStr1, condition...)
if err != nil {
return 0, result, err
}
var cnt int
_, err = tx.QueryOne(pg.Scan(&cnt), sqlStr2, condition...)
return cnt, result, err
}
... ...
... ... @@ -9,25 +9,20 @@ import (
// 任务的异常记录
type TaskAnomaly struct {
tableName struct{} `comment:"任务的异常记录" pg:"task_anomaly"`
Id int `pg:"id"` //
CreatedAt time.Time `pg:"created_at"` //
UpdatedAt time.Time `pg:"updated_at"` //
CompanyId int `pg:"company_id"` //
TaskId int `pg:"task_id"` // 任务id
Category int `pg:"category"` // 异常任务的分类
CurrentStage domain.TaskStage `pg:"current_stage"` // 计划完成的里程碑
LastStage domain.TaskStage `pg:"last_stage"` // 实际完成的里程碑
TaskStageCheck domain.TaskStage `pg:"task_stage_check"` // 当天任务反馈操作里程碑记录
AssessFlag int `pg:"assess_flag,use_zero"` // 异常反馈的次数
WarnFlag int `pg:"warn_flag,use_zero"` // 里程碑异常次数
AssistFlag int `pg:"assist_flag,use_zero"` // 辅导异常次数
IsLast int `pg:"is_last"` // 是否是最新的一条记录 1 是最新的记录 2 不是最新的记录
TaskLevel string `pg:"task_level"` // 任务类型
TaskName string `pg:"task_name"` // 任务名称
TaskAlias string `pg:"task_alias"` // 任务别名
TaskSortBy int `pg:"task_sort_by"` // 优先级排序;值越小优先级越高
TaskEndTime int64 `pg:"task_end_time,use_zero"` // 任务截止的时间戳,单位:秒;等于0时表示未设置时间
RecordBegin int64 `pg:"record_begin"` // 异常记录的开始时间
NoticeWho []map[string]string `pg:"notice_who"` // 异常记录消息通知的人
Marks map[string]string `pg:"marks"` // 已经操作的标记
Id int `pg:"id"` //
CreatedAt time.Time `pg:"created_at"` //
UpdatedAt time.Time `pg:"updated_at"` //
CompanyId int `pg:"company_id"` //
TaskId int `pg:"task_id"` // 任务id
Category int `pg:"category"` // 异常任务的分类
CurrentStage domain.TaskStage `pg:"current_stage"` // 计划完成的里程碑
LastStage domain.TaskStage `pg:"last_stage"` // 实际完成的里程碑
TaskStageCheck domain.TaskStage `pg:"task_stage_check"` // 当天任务反馈操作里程碑记录
AssessFlag int `pg:"assess_flag,use_zero"` // 异常反馈的次数
WarnFlag int `pg:"warn_flag,use_zero"` // 里程碑异常次数
AssistFlag int `pg:"assist_flag,use_zero"` // 辅导异常次数
IsLast int `pg:"is_last"` // 是否是最新的一条记录 1 是最新的记录 2 不是最新的记录
RecordBegin int64 `pg:"record_begin"` // 异常记录的开始时间
NoticeWho []map[string]string `pg:"notice_who"` // 异常记录消息通知的人
Marks map[string]string `pg:"marks"` // 已经操作的标记
}
... ...
... ... @@ -38,11 +38,6 @@ func (repo *TaskAnomalyRepository) TransformToDomain(d *models.TaskAnomaly) *dom
WarnFlag: d.WarnFlag,
AssistFlag: d.AssistFlag,
IsLast: d.IsLast,
TaskLevel: d.TaskLevel,
TaskName: d.TaskName,
TaskAlias: d.TaskAlias,
TaskSortBy: domain.TaskSortBy(d.TaskSortBy),
TaskEndTime: d.TaskEndTime,
RecordBegin: d.RecordBegin,
NoticeWho: d.NoticeWho,
Marks: d.Marks,
... ... @@ -64,11 +59,6 @@ func (repo *TaskAnomalyRepository) Save(param *domain.TaskAnomaly) error {
WarnFlag: param.WarnFlag,
AssistFlag: param.AssistFlag,
IsLast: param.IsLast,
TaskLevel: param.TaskLevel,
TaskName: param.TaskName,
TaskAlias: param.TaskAlias,
TaskSortBy: int(param.TaskSortBy),
TaskEndTime: param.TaskEndTime,
RecordBegin: param.RecordBegin,
NoticeWho: param.NoticeWho,
Marks: param.Marks,
... ...
... ... @@ -34,8 +34,4 @@ func init() {
web.NSCtrlPost("/ignore/cancel", (*controllers.TaskController).CancelIgnore),
)
web.AddNamespace(taskFontNS)
t := web.NewNamespace("/test/task",
web.NSCtrlPost("/", (*controllers.TaskController).CreateTask),
)
web.AddNamespace(t)
}
... ...