Admin
6 天以前 bd6818fc9d40f343547bafca0743658f3c0379dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
    {
 
        /// <summary>
        /// 将任务移动到历史表
        /// </summary>
        /// <param name="wcsInfo"></param>
        /// <returns></returns>
        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);
        }
    }
}