| | |
| | | const string preLog = "DEBUG:强制创建任务:"; |
| | | |
| | | try { |
| | | var startLoc = db.Queryable<TN_Location>().Where(DbExpr.StartLocUnbind(model.StartLoc, taskInfo.StartAreas)).First(); |
| | | var startLoc = db.Queryable<TN_Location>().Where(DbExpr.LocFilter(0, model.StartLoc, null, -1)).First(); |
| | | if (startLoc == null) { |
| | | return NewSimpleResult(2, preLog + LogMsg.StartLocUnbindNotFound(model.StartLoc, taskInfo.StartAreas)); |
| | | return NewSimpleResult(2, preLog + LogMsg.StartLocNotFound(model.StartLoc, null, -1)); |
| | | } |
| | | |
| | | var endLoc = db.Queryable<TN_Location>().Where(DbExpr.EndLoc(areas: taskInfo.EndAreas)) |
| | | .OrderBy(l => new { l.N_LAYER }).First(); |
| | | var endLoc = db.Queryable<TN_Location>().Where(DbExpr.LocFilter(0, model.EndLoc, null, -1)).First(); |
| | | if (endLoc == null) { |
| | | return NewSimpleResult(3, preLog + LogMsg.EndLocNotFound(areas: taskInfo.EndAreas)); |
| | | return NewSimpleResult(3, preLog + LogMsg.EndLocNotFound(model.EndLoc, null, -1)); |
| | | } |
| | | |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, model.CntId, taskInfo.TaskName); |