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);
|
}
|
|
}
|
}
|