| | |
| | | sId = new SYSEntity { CN_S_TYPE = snType, CN_T_LAST = DateTime.Now, CN_S_PRE = prefix, CN_N_MAX = 0, CN_S_APP_TYPE = "WCS" }; |
| | | sysservice.Insert(sId); |
| | | } |
| | | sysservice.Disnull(); |
| | | } |
| | | return result; |
| | | } |
| | |
| | | |
| | | LogHelper.Info($"åå»ºä»»å¡ from:{from}>to {to}å¼å§å建>"); |
| | | var cntrInfo = string.Join(",", cntrs); |
| | | ILocRepository locc = new LocRepository(); |
| | | LocRepository locc = new LocRepository(); |
| | | var fromLoc = locc.FindEntity(x => x.S_LOC_CODE == from); |
| | | var endLoc = locc.FindEntity(x => x.S_LOC_CODE == to); |
| | | |
| | | string t = ""; |
| | | //string t = ""; |
| | | if (workMode == "AGV" && string.IsNullOrEmpty(S_INDEX)) |
| | | { |
| | | var s = Settings.deviceInfos.Find(x => x.location.Contains(from)) != null; |
| | | var e = Settings.deviceInfos.Find(x => x.location.Contains(to)) != null; |
| | | |
| | | t = "F01"; |
| | | if (s && !e) t = "A002"; |
| | | if (!s && e) t = "A003"; |
| | | if (s && e) t = "A004"; |
| | | S_INDEX = "F01"; |
| | | if (s && !e) S_INDEX = "A002"; |
| | | if (!s && e) S_INDEX = "A003"; |
| | | if (s && e) S_INDEX = "A004"; |
| | | } |
| | | try |
| | | { |
| | |
| | | N_START_LAYER = startLayer, |
| | | N_END_LAYER = endLayer, |
| | | N_CNTR_COUNT = cntrCount, |
| | | S_INDEX = t, |
| | | S_INDEX = S_INDEX, |
| | | }; |
| | | ITaskRepository taskserice = new TaskRepository(); |
| | | TaskRepository taskserice = new TaskRepository(); |
| | | taskserice.Insert(wmsTask); |
| | | |
| | | if (workMode == "AGV") |
| | |
| | | locc.Update(fromLoc); |
| | | locc.Update(endLoc); |
| | | } |
| | | |
| | | locc.Disnull(); |
| | | taskserice.Disnull(); |
| | | |
| | | LogHelper.Info($"åå»ºä»»å¡ from:{from}>to {to} å建{wmsTask.S_TASK_NO}æå"); |
| | | return true; |
| | |
| | | }; |
| | | TaskActRepository taskserice = new TaskActRepository(); |
| | | taskserice.Insert(action); |
| | | taskserice.Disnull(); |
| | | } |
| | | |
| | | public static System.String GenerateTaskNo(string snType = "ä»»å¡å·", string Snt = "TN") |