using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using yunneiWCS.ORM; namespace yunneiWCS.DataAccess { public class PositionHandler { /// /// 修改有货状态 /// /// /// /// /// public static void Free(bool isFree, position _position, string remark, string _lastModifier, task _task) { if (_position == null) return; _position.isfree = isFree; var freeName = isFree ? "设置该库位有货" : "设置该库位无货"; remark = remark + "," + freeName; if (_task != null) { remark = remark + ",任务号" + _task.taskId + ",任务名称:" + _task.taskName + ",createListCode:" + _task.createListCode; } _position.remark = remark; _position.lastModifier = _lastModifier; _position.LastModifyTime = DateTime.Now; } /// /// 修改锁定状态 /// /// /// /// /// public static void Lock(bool isLock, position _position, string remark, string _lastModifier, task _task) { if (_position == null) return; _position.isLock = isLock; var lockName = isLock ? "锁定该库位" : "解锁该库位"; remark = remark + "," + lockName; if (_task != null) { remark = remark + ",任务号" + _task.taskId + ",任务名称:" + _task.taskName + ",createListCode:" + _task.createListCode; } _position.remark = remark; _position.lastModifier = _lastModifier; _position.LastModifyTime = DateTime.Now; } /// /// 修改锁定,有货状态 /// /// /// /// /// public static void LockAndFree(bool isLock, bool isFree, position _position, string remark, string _lastModifier, task _task) { if (_position == null) return; _position.isLock = isLock; _position.isfree = isFree; var lockName = isLock ? "锁定该库位" : "解锁该库位"; var freeName = isFree ? "设置该库位有货" : "设置该库位无货"; remark = remark + "," + lockName + "," + freeName; if (_task != null) { remark = remark + ",任务号" + _task.taskId + ",任务名称:" + _task.taskName + ",createListCode:" + _task.createListCode; } _position.remark = remark; _position.lastModifier = _lastModifier; _position.LastModifyTime = DateTime.Now; } } }