| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Security.Cryptography; |
| | | |
| | | using HH.WCS.Mobox3.DSZSH.core; |
| | | using HH.WCS.Mobox3.DSZSH.models; |
| | |
| | | using HH.WCS.Mobox3.DSZSH.wms; |
| | | |
| | | using Newtonsoft.Json; |
| | | |
| | | using SqlSugar; |
| | | |
| | | using Swashbuckle.Swagger; |
| | |
| | | } |
| | | |
| | | // 更新[起点/终点]锁状态,创建任务 |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | // 删除/更新旧[货位/容器/物料]信息 |
| | | if (old.LocCntrRel != null && db.Deleteable(old.LocCntrRel).ExecuteCommand() <= 0) { |
| | |
| | | } |
| | | |
| | | // 起点终点上锁,创建任务 |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | if (old.CgDetail != null && db.Deleteable(old.CgDetail).ExecuteCommand() <= 0) { |
| | |
| | | return NewSimpleResult(3, preLog + $"没有找到合适的终点货位!要求:锁状态='无';当前容器数量=0;所在库区={LogObject(taskInfo.EndAreas)}"); |
| | | } |
| | | |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | if (old.CgDetail != null && db.Deleteable(old.CgDetail).ExecuteCommand() <= 0) { |
| | |
| | | return NewSimpleResult(5, preLog + $"没有找到合适的终点货位!要求:锁状态='无';当前容器数量=0;所在库区={LogObject(taskInfo.EndAreas)}"); |
| | | } |
| | | |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, model.CntId, taskInfo.TaskName); |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, model.CntId, taskInfo.TaskName); |
| | | |
| | | cntr.S_SOURCE = task.S_CODE; // 用任务号作为容器更新的依据 |
| | | cntr.T_MODIFY = DateTime.Now; |
| | |
| | | return NewSimpleResult(3, preLog + $"没有找到合适的终点货位!要求:锁状态='无',当前容器数量=0,所在库区={LogObject(taskInfo.EndAreas)}"); |
| | | } |
| | | |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, model.CntId, taskInfo.TaskName); |
| | | |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, model.CntId, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | // 更新[起点/终点]锁状态,创建任务 |
| | | if (db.Updateable(startLoc).UpdateColumns(it => new { it.N_LOCK_STATE, it.S_LOCK_STATE, it.S_LOCK_OP, it.T_MODIFY, it.N_CURRENT_NUM, }).ExecuteCommand() <= 0) { |
| | |
| | | cgDetail.T_MODIFY = DateTime.Now; |
| | | |
| | | var cntId = locCntrRel.S_CNTR_CODE; |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskInfo.TaskName); |
| | | |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, cntId, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | if (db.Updateable(cgDetail).UpdateColumns(it => new { it.N_ITEM_STATE, it.S_ITEM_STATE, it.T_MODIFY }).ExecuteCommand() <= 0) { |
| | |
| | | cgDetail.N_ITEM_STATE = 2; |
| | | cgDetail.S_ITEM_STATE = "不合格"; |
| | | |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, locCntrRel.S_CNTR_CODE, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | if (db.Updateable(cgDetail).UpdateColumns(it => new { it.N_ITEM_STATE, it.S_ITEM_STATE }).ExecuteCommand() <= 0) { |
| | |
| | | |
| | | var cntId = locCntrRel.S_CNTR_CODE; |
| | | |
| | | WCSHelper.LockStartLoc(ref startLoc); |
| | | WCSHelper.LockEndLoc(ref endLoc); |
| | | var task = WCSHelper.BuildTask(startLoc, endLoc, cntId, taskInfo.TaskName); |
| | | var task = WCSHelper.BuildTaskWithLocLock(startLoc, endLoc, cntId, taskInfo.TaskName); |
| | | |
| | | using (var tran = db.Ado.UseTran()) { |
| | | //if (db.Insertable(locCntrRel).ExecuteCommand() <= 0) { |