| | |
| | | { |
| | | var model = db.Queryable<Location>().Where(a => a.S_LOC_CODE == task.S_TWO_END_LOC).First(); |
| | | //先解锁终点 在锁定 |
| | | db.Ado.BeginTran(); |
| | | try |
| | | //db.Ado.BeginTran(); |
| | | //try |
| | | //{ |
| | | // model.S_LOCK_STATE = "无"; |
| | | // var res = db.Updateable(model).UpdateColumns(it => new { it.S_LOCK_STATE }).ExecuteCommand() > 0; |
| | | // LogHelper.Info(task.S_TWO_END_LOC + "LockLoc:锁结果" + res); |
| | | // db.Ado.CommitTran(); |
| | | //} |
| | | //catch (Exception ex) |
| | | //{ |
| | | // db.Ado.RollbackTran(); |
| | | // LogHelper.Info("CreateTask 失败 " + ex.Message); |
| | | //} |
| | | if (model != null) |
| | | { |
| | | model.S_LOCK_STATE = "无"; |
| | | var res = db.Updateable(model).UpdateColumns(it => new { it.S_LOCK_STATE }).ExecuteCommand() > 0; |
| | | LogHelper.Info(task.S_TWO_END_LOC + "LockLoc:锁结果" + res); |
| | | db.Ado.CommitTran(); |
| | | LogHelper.Info(task.S_TWO_END_LOC + "二段任务 开始。 "); |
| | | var b = TaskProcess.CreateTransport(task.S_SRC_NO, task.S_END_LOC, task.S_TWO_END_LOC, "原物料搬运-纸箱", task.S_CNTRS.Split(',').ToList(), task.N_START_LAYER, 1, task.N_CNTR_COUNT, task.N_PRIORITY); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | db.Ado.RollbackTran(); |
| | | LogHelper.Info("CreateTask 失败 " + ex.Message); |
| | | } |
| | | var b = TaskProcess.CreateTransport(task.S_SRC_NO, task.S_END_LOC, task.S_TWO_END_LOC, "原物料搬运-纸箱", task.S_CNTRS.Split(',').ToList(), task.N_START_LAYER, 1, task.N_CNTR_COUNT, task.N_PRIORITY); |
| | | } |
| | | } |
| | | internal static void Fail(WMSTask task) |