| | |
| | | /// <returns></returns> |
| | | internal static Result CreatTask(CreatTask model) |
| | | { |
| | | Result result = new Result() { code = "200", msg = "ç¹å¯¹ç¹ä»»å¡å建æå" }; |
| | | Result result = new Result() { code = "0", msg = "ç¹å¯¹ç¹ä»»å¡å建æå" }; |
| | | string Source = "MES"; |
| | | if (model == null) |
| | | { |
| | |
| | | if (startloc != null) |
| | | { |
| | | Start = model.InitialLocation; |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | result.code = "1"; |
| | | result.msg = $"æ ¹æ®èµ·ç¹{model.InitialLocation},æ¾ä¸å°å¯¹åºè´§ä½ï¼è¯·æ£æ¥è´§ä½è¡¨"; |
| | | AddErrorInfo("è´§ä½æ¥æ¾å¤±è´¥", result.msg, Source); |
| | | return result; |
| | | |
| | | } |
| | | endloc = db.Queryable<Location>().Where(a => a.S_CODE.Trim() == model.TargetLocation).First(); |
| | | if (endloc != null) |
| | |
| | | //LocationHelper.LockLoc(Start, 2); |
| | | //LocationHelper.LockLoc(End, 1); |
| | | LogHelper.Info("åå»ºä»»å¡æå"); |
| | | return result; |
| | | } |
| | | else |
| | | { |