| | |
| | | } |
| | | #endregion [èªå®ä¹ç±»][20250323144531864][Settings] |
| | | } |
| | | public static class ExtendClass |
| | | { |
| | | public static void Disnull(this TaskRepository repository) |
| | | { |
| | | repository.dbcontext.Dispose(); |
| | | repository = null; |
| | | } |
| | | public static void Disnull(this LocRepository repository) |
| | | { |
| | | repository.dbcontext.Dispose(); |
| | | repository = null; |
| | | } |
| | | public static void Disnull(this TaskActRepository repository) |
| | | { |
| | | repository.dbcontext.Dispose(); |
| | | repository = null; |
| | | } |
| | | public static void Disnull(this SYSRepository repository) |
| | | { |
| | | repository.dbcontext.Dispose(); |
| | | repository = null; |
| | | } |
| | | } |
| | | public class LogHelper |
| | | { |
| | | #region [èªå®ä¹ç±»][20250323145442478][LogHelper] |
| | |
| | | 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); |
| | | |
| | |
| | | N_CNTR_COUNT = cntrCount, |
| | | 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; |
| | |
| | | N_CREATEMETHOD = 0 |
| | | }; |
| | | TaskActRepository taskserice = new TaskActRepository(); |
| | | taskserice.Insert(action); |
| | | |
| | | taskserice.Disnull(); |
| | | } |
| | | |
| | | public static System.String GenerateTaskNo(string snType = "ä»»å¡å·", string Snt = "TN") |