Admin
2025-12-02 9e42f0dafa019f5ecf6b0ff425ecb966b002171e
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
56
57
58
59
60
61
62
63
64
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="boxHead">boxHead</param>
        /// <returns></returns>
        public static void AddBoxingHeadToHistory(Dt_boxing_head boxHead, Dt_boxing_detail boxDetail)
        {
 
            Dt_boxing_head_hty boxing_Head_Hty = new Dt_boxing_head_hty();
            boxing_Head_Hty.boxhead_id = Guid.NewGuid();
            boxing_Head_Hty.boxhead_areaid = boxHead.boxhead_areaid;
            boxing_Head_Hty.boxhead_barcode = boxHead.boxhead_barcode;
            boxing_Head_Hty.boxhead_creator = boxHead.boxhead_creator;
            boxing_Head_Hty.boxhead_createtime = boxHead.boxhead_createtime;
            boxing_Head_Hty.boxhead_finishtime = DateTime.Now;
            boxing_Head_Hty.boxhead_weight = boxHead.boxhead_weight;
            boxing_Head_Hty.boxhead_text1 = boxHead.boxhead_text1;
            boxing_Head_Hty.boxhead_text2 = boxHead.boxhead_text2;
            boxing_Head_Hty.boxhead_text3 = boxHead.boxhead_text3;
 
            Dt_boxing_detail_hty boxing_Detail_Hty = new Dt_boxing_detail_hty();
            boxing_Detail_Hty.boxdtl_id = Guid.NewGuid();
            boxing_Detail_Hty.boxdtl_headid = boxing_Head_Hty.boxhead_id.ToString();
            boxing_Detail_Hty.boxdtl_materielid = boxDetail.boxdtl_materielid;
            boxing_Detail_Hty.boxdtl_qty = boxDetail.boxdtl_qty;
            boxing_Detail_Hty.boxdtl_reuqstKey = boxDetail.boxdtl_reuqstKey;
            boxing_Detail_Hty.boxdtl_operator = boxDetail.boxdtl_operator;
            boxing_Detail_Hty.boxdtl_identifierNo = boxDetail.boxdtl_identifierNo;
            boxing_Detail_Hty.boxdtl_inboundUnit = boxDetail.boxdtl_inboundUnit;
            boxing_Detail_Hty.boxdtl_standard = boxDetail.boxdtl_standard;
            boxing_Detail_Hty.boxdtl_carType = boxDetail.boxdtl_carType;
            boxing_Detail_Hty.boxdtl_type = boxDetail.boxdtl_type;
            boxing_Detail_Hty.boxdtl_barcode = boxDetail.boxdtl_barcode;
            boxing_Detail_Hty.boxdtl_madeUnit = boxDetail.boxdtl_madeUnit;
            boxing_Detail_Hty.boxdtl_madeDate = boxDetail.boxdtl_madeDate;
            boxing_Detail_Hty.boxdtl_number = boxDetail.boxdtl_number;
            boxing_Detail_Hty.boxdtl_date = DateTime.Now;
            boxing_Detail_Hty.boxdtl_qrCode = boxDetail.boxdtl_qrCode;
            boxing_Detail_Hty.boxdtl_text1 = boxDetail.boxdtl_text1;
            boxing_Detail_Hty.boxdtl_text2 = boxDetail.boxdtl_text2;
            boxing_Detail_Hty.boxdtl_text3 = boxDetail.boxdtl_text3;
            boxing_Detail_Hty.boxdtl_text4 = boxDetail.boxdtl_text4;
            boxing_Detail_Hty.boxdtl_text5 = boxDetail.boxdtl_text5;
 
            Dt_boxing_head_htyRepository.Instance.Add(boxing_Head_Hty, true);
            Dt_boxing_detail_htyRepository.Instance.Add(boxing_Detail_Hty, true);
 
            Dt_boxing_headRepository.Instance.Delete(boxHead, true);
            Dt_boxing_detailRepository.Instance.Delete(boxDetail, true);
        }
 
    }
}