using System; using System.Collections.Generic; using System.Text; using WIDESEA.Entity.DomainModels; using WIDESEA.Services.Repositories; namespace WIDESEA.Services.Services { public partial class CommonFunction { /// /// 将任务移动到历史表 /// /// /// public static void AddWMSTaskToHistory(Dt_taskinfo taskInfo) { Dt_taskinfo_hty taskinfoHty = new Dt_taskinfo_hty() { task_id = Guid.NewGuid(), task_areaid = taskInfo.task_areaid, task_bak_1 = taskInfo.task_bak_1, task_bak_2 = taskInfo.task_bak_2, task_bak_3 = taskInfo.task_bak_3, task_bak_4 = taskInfo.task_bak_4, task_bak_5 = taskInfo.task_bak_5, task_barcode = taskInfo.task_barcode, task_beginstation = taskInfo.task_beginstation, task_createtime = taskInfo.task_createtime, task_creator = taskInfo.task_creator, task_endstation = taskInfo.task_endstation, task_finishedtime = DateTime.Now, task_fromlocationid = taskInfo.task_fromlocationid, task_grade = taskInfo.task_grade, task_instation = taskInfo.task_instation, task_isunpacked = taskInfo.task_isunpacked, task_materielid = taskInfo.task_materielid, task_materielType = taskInfo.task_materielType, task_outstation = taskInfo.task_outstation, task_qty = taskInfo.task_qty, task_requestkey = taskInfo.task_requestkey, task_rgvId = taskInfo.task_rgvId, task_sn = taskInfo.task_sn, task_state = taskInfo.task_state, task_tolocationid = taskInfo.task_tolocationid, task_type = taskInfo.task_type, task_weight = taskInfo.task_weight, }; Dt_taskinfo_htyRepository.Instance.Add(taskinfoHty, true); Dt_taskinfoRepository.Instance.Delete(taskInfo, true); } } }