diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs index 2237265..63362f8 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs @@ -30,7 +30,7 @@ namespace WY.NewJit.Extends /// /// 左或右 /// - public string BillLocation { get; set; } + public string VehicleModel { get; set; } /// diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs index 98deb0b..ba07fbc 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs @@ -15,6 +15,9 @@ namespace WY.NewJit.Extends /// public class MenBanPackingRecDto { + + public Guid M100BillId { get; set; } + /// /// 装箱单号(对应主表) /// @@ -39,49 +42,40 @@ namespace WY.NewJit.Extends /// /// 车型门板代码 门板代号:是零件关键件,从汇总excel中取 /// - public virtual string VehicleModel_DoorPlankCode { get; set; } + public virtual string PartCode1 { get; set; } - /// - /// 上箱位号 - /// - public virtual string TopBoxPositionNum { get; set; } /// /// 上箱位 SAP物料号 /// - public string TopSAPMaterialNum { get; set; } + public string PartCode2 { get; set; } /// /// 上箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) /// - public string TopMaterialDescription { get; set; } - - - - /// - /// 下箱位号 - /// - //public virtual string BelowBoxPositionNum { get; set; } + public string PartCode3 { get; set; } /// /// 下箱位 SAP物料号 /// - public string BelowSAPMaterialNum { get; set; } + public string PartCode4 { get; set; } /// /// 下箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) /// - public string BelowMaterialDescription { get; set; } + public string PartCode5 { get; set; } /// /// 用于报表排序 /// - public int sn { get; set; } + //public int sn { get; set; } - public Guid M100BillId { get; set; } + /// + /// 上箱位号 + /// + public virtual string SN { get; set; } - } diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs index a4b691f..87b7b74 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs @@ -81,21 +81,21 @@ namespace WY.NewJit.MsgCheck /// /// /// 断号时Item不为空 - Task> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input); + //Task> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input); /// /// 打印门板装箱单 /// /// /// 执行成功返回真 - Task> PrintMenBanPackingList(MenBanPrintInputDto input); + //Task> PrintMenBanPackingList(MenBanPrintInputDto input); /// /// 打印柱护板装箱单 /// /// /// 执行成功返回真 - Task> PrintZhuHuBanPackingList(ZhuHuBanPrintInputDto input); + //Task> PrintZhuHuBanPackingList(ZhuHuBanPrintInputDto input); #endregion @@ -107,7 +107,7 @@ namespace WY.NewJit.MsgCheck /// 生产线超时情况 Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input); - Task> GetReplenishPrintListAsync(QueryBillM100Dto input); + //Task> GetReplenishPrintListAsync(QueryBillM100Dto input); diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml index 096cb7e..c18958b 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml @@ -19,7 +19,7 @@ - + 左或右 @@ -149,39 +149,34 @@ 大众顺序号 - + 车型门板代码 门板代号:是零件关键件,从汇总excel中取 - - - 上箱位号 - - - + 上箱位 SAP物料号 - + 上箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) - + 下箱位 SAP物料号 - + 下箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) - + - 用于报表排序 + 上箱位号 @@ -1929,27 +1924,6 @@ 断号时Item不为空 - - - 打印前检查柱护板大众顺序号是否断号 - - - 断号时Item不为空 - - - - 打印门板装箱单 - - - 执行成功返回真 - - - - 打印柱护板装箱单 - - - 执行成功返回真 - 生产线超时提醒 diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs index 6c8d86a..17c828c 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs @@ -131,6 +131,8 @@ namespace WY.NewJit.MsgCheck private readonly IRepository _tbBillHisRepository; private readonly IRepository _tsSortDetailHisRepository; + private readonly IRepository _dicItemRepository; + /// /// 错误信息前缀 /// @@ -182,7 +184,8 @@ namespace WY.NewJit.MsgCheck IRepository tbBillHisRepository, IRepository tsSortDetailHisRepository, IRepository printTemplateConfigurationRepository, - IRepository zHBPrintStatusRepository + IRepository zHBPrintStatusRepository, + IRepository dicItemRepository ) @@ -212,6 +215,7 @@ namespace WY.NewJit.MsgCheck _printTemplateConfigurationRepository = printTemplateConfigurationRepository; _zHBPrintStatusRepository = zHBPrintStatusRepository; _topBoxPositionNumPrefix = _configuration["ConfigDic:TopBoxPositionNumPrefix"]; + _dicItemRepository = dicItemRepository; } #endregion @@ -395,7 +399,11 @@ select * from } - + /// + /// 从M100中取当前产线、已经打印的最大大众顺序号 + /// + /// + /// private async Task GetMenBanLastPrintNum(MenBanPrintInputDto input) { string sql = @" select top(1) HostSN from FisBillM100 where ProductLine = '{0}' and BillStatus = 3 order by SerialNumStr desc"; @@ -403,25 +411,26 @@ select * from var lastNum = await _newJitDapperRepository.GetSingleBySqlAsync(sql); return lastNum; } - private async Task GetZhuHuBanLastPrintNum(ZhuHuBanPrintInputDto input) - { - string sql = @" with d as -( - select *from [dbo].[FisZHBPrintStatus] where groupName='{0}' -) -select top(1) HostSN from -( - select d.CreationTime as ptime, - b.* - from FisBillM100 b - join d on b.VIN=d.VIN - where 1=1 and ProductLine='{1}' and ( b.PrintBillNum is not null or d.BillStatus=1) -) t order by SerialNumStr desc "; - sql = string.Format(sql, input.GroupName,input.ProductLine); - var lastNum = await _newJitDapperRepository.GetSingleBySqlAsync(sql); - return lastNum; - } +// private async Task GetZhuHuBanLastPrintNum(ZhuHuBanPrintInputDto input) +// { +// string sql = @" with d as +//( +// select *from [dbo].[FisZHBPrintStatus] where groupName='{0}' +//) + +//select top(1) HostSN from +//( +// select d.CreationTime as ptime, +// b.* +// from FisBillM100 b +// join d on b.VIN=d.VIN +// where 1=1 and ProductLine='{1}' and ( b.PrintBillNum is not null or d.BillStatus=1) +//) t order by SerialNumStr desc "; +// sql = string.Format(sql, input.GroupName,input.ProductLine); +// var lastNum = await _newJitDapperRepository.GetSingleBySqlAsync(sql); +// return lastNum; +// } /// /// 根据筛选条件获取实体列表 @@ -601,24 +610,24 @@ select * from /// /// /// - private List GetErpAssemblyListByBill(Guid vehicleAssemblyId) - { - List retLst = new List(); - AssemblyCfgVehicle vobj = _assemblyCfgVehicleRepository.GetAsync(vehicleAssemblyId).GetAwaiter().GetResult(); //取单据对应的整车总成 - if (vobj != null && vobj.AssemblyCfgVehicleChilds != null && vobj.AssemblyCfgVehicleChilds.Count > 0) - { - List vehicleChildLst = vobj.AssemblyCfgVehicleChilds; - foreach (AssemblyCfgVehicleChild vehicleChildItm in vehicleChildLst) - { - AssemblyCfgErp erpObj = _assemblyCfgErpRepository.GetAsync(vehicleChildItm.ErpAssemblyId).GetAwaiter().GetResult(); - if (erpObj != null) - { - retLst.Add(erpObj); - } - } - } - return retLst; - } + //private List GetErpAssemblyListByBill(Guid vehicleAssemblyId) + //{ + // List retLst = new List(); + // AssemblyCfgVehicle vobj = _assemblyCfgVehicleRepository.GetAsync(vehicleAssemblyId).GetAwaiter().GetResult(); //取单据对应的整车总成 + // if (vobj != null && vobj.AssemblyCfgVehicleChilds != null && vobj.AssemblyCfgVehicleChilds.Count > 0) + // { + // List vehicleChildLst = vobj.AssemblyCfgVehicleChilds; + // foreach (AssemblyCfgVehicleChild vehicleChildItm in vehicleChildLst) + // { + // AssemblyCfgErp erpObj = _assemblyCfgErpRepository.GetAsync(vehicleChildItm.ErpAssemblyId).GetAwaiter().GetResult(); + // if (erpObj != null) + // { + // retLst.Add(erpObj); + // } + // } + // } + // return retLst; + //} #endregion @@ -664,8 +673,9 @@ select * from if ((input.EndHostSN % 10000) > 1999) //存在大众顺序号1999、0001的情况 { string firstSNStr = firstObj.SerialNumStr; - var tempLst = await _billM100Repository.Where(itm => - itm.ProductLine == input.ProductLine //指定生产线 + var tempLst = await _billM100Repository + .Include(itm => itm.BillM100Parts) + .Where(itm => itm.ProductLine == input.ProductLine //指定生产线 && itm.CanNotPrint != true //能打印 && itm.BillStatus != BillStatusEnum.Publish //不等于 已打印 && itm.SerialNumStr.CompareTo(firstSNStr) >= 0) @@ -683,8 +693,9 @@ select * from else //起止大众顺序号都小于等于1999 { string firstSNStr2 = firstObj.SerialNumStr; - billLst = await _billM100Repository.Where(itm => - itm.ProductLine == input.ProductLine //指定生产线 + billLst = await _billM100Repository + .Include(itm => itm.BillM100Parts) + .Where(itm => itm.ProductLine == input.ProductLine //指定生产线 && itm.CanNotPrint != true //能打印 && itm.BillStatus != BillStatusEnum.Publish //不等于 已打印 && itm.SerialNumStr.CompareTo(firstSNStr2) >= 0 @@ -864,186 +875,111 @@ select * from /// /// 加1后的序号 /// - private string GetBillNum(long newSN) - { - string newSNStr = newSN.ToString(); - //装箱单号规则 1开头,11位,自增顺序号 - if (newSNStr.Length < 11) - { - return "F" + newSNStr.PadLeft(10, '0'); - } - return newSNStr; - } + //private string GetBillNum(long newSN) + //{ + // string newSNStr = newSN.ToString(); + // //装箱单号规则 1开头,11位,自增顺序号 + // if (newSNStr.Length < 11) + // { + // return "F" + newSNStr.PadLeft(10, '0'); + // } + // return newSNStr; + //} /// /// 打印左侧或右侧门板 /// /// - /// + /// /// /// /// /// - /// + /// /// - private List DoMBPrint(MenBanPrintInputDto input, int pageIdx, ref double maxBillNum, double maxSN, DateTime printTime, List billLst, string rightOrLeft) + private MenBanPackingList DoMBPrint(MenBanPrintInputDto input, int pageIdx, double maxSN, List billLst, string reportSort, string[] partLargeType) { const int _colNumberPerPage = 12; - List retLst = new List(); //取当前页内容 List curPageLst = billLst.Skip(pageIdx * _colNumberPerPage).Take(_colNumberPerPage).ToList(); - //取车型 C8,Q5 - var vmLst = curPageLst.Select(itm => itm.VehicleModelCode).Distinct().ToList(); - string vmStr = ""; - foreach (var item in vmLst) - { - vmStr += item + ","; - } - if (vmStr.Length >0) - { - vmStr = vmStr.Substring(0, vmStr.Length - 1); - } - - //填充门板装箱单主实体 - MenBanPackingList mbObj = new MenBanPackingList(); - mbObj.SetId(GuidGenerator.Create()); - - long maxBillNum2 = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - mbObj.BillNum = GetBillNum(maxBillNum2); - mbObj.BillSerialNum = maxSN.ToString().PadLeft(2, '0'); + var vmLst = curPageLst.Select(itm => itm.VehicleModelCode).Distinct().JoinAsString(","); //取车型 + string ymd = ServerHelper.CurrentDateTime.ToString("yyyyMMdd"); + string serialNum = maxSN.ToString().PadLeft(3, '0'); //075 - mbObj.BillLocation = rightOrLeft; //右或左 - mbObj.ProviderCode = _providerCode; //供应商厂家代码 - mbObj.PartType = vmStr + " DP"; //零件类型 - mbObj.Capacity = curPageLst.Count(itm => itm.BillStatus == BillStatusEnum.Match || itm.BillStatus == BillStatusEnum.Publish).ToString(); //器具容量 - mbObj.PrintDate = printTime; //打印日期 - mbObj.PrintType = input.PrintType; - mbObj.ProductLine = input.ProductLine; + MenBanPackingList packingMain = new MenBanPackingList(); + packingMain.SetId(GuidGenerator.Create()); + packingMain.BillNum = $"C{ymd}{serialNum}{reportSort}"; + packingMain.VehicleModel = vmLst; + packingMain.BillSerialNum = serialNum; + packingMain.PrintDate = ServerHelper.CurrentDateTime; + packingMain.ProductLine = billLst[0].ProductLine; var tempLst = curPageLst.Where(itm => string.IsNullOrEmpty(itm.VIN) == false).OrderBy(itm => itm.OnlineTime).ThenBy(itm => itm.HostSN).ToList(); if (tempLst.Count > 0) { - mbObj.BeginVin = tempLst[0].VIN; - mbObj.EndVin = tempLst[tempLst.Count - 1].VIN; - mbObj.BeginHostSN = tempLst[0].HostSN.ToString(); - mbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); + packingMain.BeginVin = tempLst[0].VIN; + packingMain.EndVin = tempLst[tempLst.Count - 1].VIN; + packingMain.BeginHostSN = tempLst[0].HostSN.ToString(); + packingMain.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); } - mbObj.MinOnlineTime = tempLst.Min(itm => itm.OnlineTime); //本单据最早的上线时间 - - int posNum = 0; - string promMsg; //报表数据异常提示信息 + packingMain.MinOnlineTime = tempLst.Min(itm => itm.OnlineTime); //本单据最早的上线时间 + //明细 + int sn = 1; foreach (BillM100 billObj in curPageLst) { - posNum++; - promMsg = ""; - //取物料信息 - MaterialExt leftObj = null; - MaterialExt rightObj = null; - if (billObj.AssemblyID != null) - { - //取单据包含的ERP总成列表 - List erpAssemblyLst = GetErpAssemblyListByBill((Guid)billObj.AssemblyID); - List erpCodeLst = erpAssemblyLst.Select(itm => itm.ErpAssemblyCode).ToList(); - //根据ERP总成编码取对应的物料扩展信息 - List materialExtLst = _materialExtRepository.Where(itm => erpCodeLst.Contains(itm.RelationKey)).ToList(); - if (erpCodeLst.Count != 4) - { - promMsg += $"*总成数量是{erpCodeLst.Count}*"; - } - if (erpCodeLst.Count == 4 && materialExtLst.Count == 0) - { - promMsg += $"*物料表没数据*"; - } - - //车型C8的第一二页分为左后, 右前,第三四页分为右后、左前;其它车型 第一二页分为左后、左前,第三四页分为右后、右前 - if (curPageLst[0].VehicleModelCode == "C8") - { - //C8 分为左前、右后 一组 右前、左后 一组,以前门为主,前门是右, 单子是右 - if (rightOrLeft == "右") - { - rightObj = materialExtLst.FirstOrDefault(itm => itm.MaterialDescription.Contains("右前")); - leftObj = materialExtLst.FirstOrDefault(itm => itm.MaterialDescription.Contains("左后")); - } - else //左 - { - rightObj = materialExtLst.FirstOrDefault(itm => itm.MaterialDescription.Contains("左前")); - leftObj = materialExtLst.FirstOrDefault(itm => itm.MaterialDescription.Contains("右后")); - } - } - else - { - leftObj = materialExtLst.FirstOrDefault(itm => itm.MaterialDescription.Contains(rightOrLeft + "后")); - rightObj = materialExtLst.FirstOrDefault(itm => itm.MaterialDescription.Contains(rightOrLeft + "前")); - } - } - - //填充门板装箱单明细 - MenBanPackingRec mbRec = new MenBanPackingRec(); - mbRec.SetId(GuidGenerator.Create()); - mbRec.M100BillId = billObj.Id; - mbRec.KNR = billObj.KNR; //KNR订单号 - mbRec.VIN = billObj.VIN; //底牌号 - mbRec.HostSN = billObj.HostSN.ToString(); //大众顺序号 - mbRec.TopBoxPositionNum = GetTopBoxPositionNumPrefix(billObj.KNR) + posNum.ToString().PadLeft(2, '0'); //上箱位号 - if (leftObj != null) //右后 + MenBanPackingRec packingDetail = new MenBanPackingRec(); + packingDetail.SetId(GuidGenerator.Create()); + packingDetail.M100BillId = billObj.Id; + packingDetail.KNR = billObj.KNR; + packingDetail.VIN = billObj.VIN; + packingDetail.HostSN = billObj.HostSN?.ToString(); + if (billObj.VIN == null) { - mbRec.VehicleModel_DoorPlankCode = leftObj.MaterialMemo; //车型门板代码 - mbRec.TopSAPMaterialNum = leftObj.MaterialNum; //上箱位 SAP物料号 - mbRec.TopMaterialDescription = leftObj.MaterialDescription2.IsNullOrEmpty() ? leftObj.MaterialDescription : leftObj.MaterialDescription2; //上箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) + packingDetail.VIN += "*断号*"; } - else + //第一个零件 + if (partLargeType.Length >= 1) { - if (billObj.VIN == null) - { - mbRec.TopMaterialDescription += "*断号*"; - } - else if (billObj.AssemblyID == null) - { - mbRec.TopMaterialDescription += "*未知总成*"; - } - else + var partObj = billObj.BillM100Parts.FirstOrDefault(itm => itm.PartType3 == partLargeType[0]); + if (partObj != null) { - mbRec.TopMaterialDescription += "*leftObj为空*"; + packingDetail.PartCode1 = partObj.PartCode; } } - - if (rightObj != null) //右前 - { - mbRec.BelowSAPMaterialNum = rightObj.MaterialNum; //下箱位 SAP物料号 - mbRec.BelowMaterialDescription = rightObj.MaterialDescription2.IsNullOrEmpty() ? rightObj.MaterialDescription : rightObj.MaterialDescription2; //下箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) - } - else + //第二个零件 + if (partLargeType.Length >= 2) { - if (billObj.VIN == null) - { - mbRec.TopMaterialDescription += "*断号*"; - } - else if (billObj.AssemblyID == null) - { - mbRec.BelowMaterialDescription += "*未知总成*"; - } - else + var partObj = billObj.BillM100Parts.FirstOrDefault(itm => itm.PartType3 == partLargeType[1]); + if (partObj != null) { - mbRec.BelowMaterialDescription += "*rightObj为空*"; + packingDetail.PartCode2 = partObj.PartCode; } } - - if (string.IsNullOrEmpty(mbRec.KNR) == false && mbRec.KNR.Length == 10 && mbRec.KNR.Substring(4, 1) == "7" && string.IsNullOrEmpty(mbRec.VehicleModel_DoorPlankCode) == true) + //第三个零件 + if (partLargeType.Length >= 3) { - mbRec.VehicleModel_DoorPlankCode += "*预批量*"; + var partObj = billObj.BillM100Parts.FirstOrDefault(itm => itm.PartType3 == partLargeType[2]); + if (partObj != null) + { + packingDetail.PartCode3 = partObj.PartCode; + } } - - if (!String.IsNullOrEmpty(promMsg)) + //第四个零件 + if (partLargeType.Length >= 4) { - mbRec.VehicleModel_DoorPlankCode += promMsg; + var partObj = billObj.BillM100Parts.FirstOrDefault(itm => itm.PartType3 == partLargeType[3]); + if (partObj != null) + { + packingDetail.PartCode4 = partObj.PartCode; + } } - mbObj.Details.Add(mbRec); - } //foreach - - retLst.Add(mbObj); //有用 - return retLst; + packingDetail.SN = sn.ToString(); + packingMain.Details.Add(packingDetail); + sn++; + } + return packingMain; } /// @@ -1054,305 +990,306 @@ select * from /// /// /// - private string GetTopBoxPositionNumPrefix(string knr) - { - if (knr.IsNullOrEmpty() || knr.Length < 4) - { - return ""; - } - string knrPrefix = knr.Substring(0, 4); + //private string GetTopBoxPositionNumPrefix(string knr) + //{ + // if (knr.IsNullOrEmpty() || knr.Length < 4) + // { + // return ""; + // } + // string knrPrefix = knr.Substring(0, 4); - int res = string.Compare(knrPrefix, "2402"); - if (res >= 0) - { - return ""; - } - else - { - return _topBoxPositionNumPrefix ?? ""; - } + // int res = string.Compare(knrPrefix, "2402"); + // if (res >= 0) + // { + // return ""; + // } + // else + // { + // return _topBoxPositionNumPrefix ?? ""; + // } - } + //} /// /// 打印门板装箱单时调用库存系统接口 /// /// - private void CallWMSInterface_MB(List input) - { + //private void CallWMSInterface_MB(List input) + //{ - List targetMainLst = new List(); - List targetDetailLst = new List(); - List cxLst = new List(); - foreach (MenBanPackingList sourceObj in input) - { - TB_BILL targetMain = new TB_BILL(); - targetMain.BillNum = sourceObj.BillNum; //单据编号 - targetMain.State = 0; - targetMain.BillType = 206; //单据类型 - targetMain.SubBillType = 21004; //单据子类型 - targetMain.BillTime = sourceObj.PrintDate; //单据时间 - targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 - targetMain.DetailQty = 0; //明细数量 - targetMain.CustId = _providerCode; //供应商编号 - //targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 - //targetMain.DockCode = sourceObj.BillLocation; + // List targetMainLst = new List(); + // List targetDetailLst = new List(); + // List cxLst = new List(); + // foreach (MenBanPackingList sourceObj in input) + // { + // TB_BILL targetMain = new TB_BILL(); + // targetMain.BillNum = sourceObj.BillNum; //单据编号 + // targetMain.State = 0; + // targetMain.BillType = 206; //单据类型 + // targetMain.SubBillType = 21004; //单据子类型 + // targetMain.BillTime = sourceObj.PrintDate; //单据时间 + // targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 + // targetMain.DetailQty = 0; //明细数量 + // targetMain.CustId = _providerCode; //供应商编号 + // //targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + // //targetMain.DockCode = sourceObj.BillLocation; + + // targetMain.GateCode = sourceObj.PartType; //B柱下 + // targetMain.GateName = sourceObj.BillSerialNum; //顺序号 + // targetMain.DockCode = sourceObj.VehicleModel; //左或右 + // targetMain.Remark = sourceObj.MinOnlineTime == null ? null : ((DateTime)sourceObj.MinOnlineTime).ToString("yyyy-MM-dd HH:mm"); //最早上线时间(预计到达时间) + // targetMain.TransportType = sourceObj.BillSerialNum; //顺序号 + // targetMain.SourceBillNum3 = sourceObj.ProductLine; //2022-10-13加生产线 + // targetMainLst.Add(targetMain); + // int idx = 0; + // int idx2 = 0; + // foreach (MenBanPackingRec sourceRec in sourceObj.Details) + // { + // idx2++; + // if (sourceRec.PartCode2.IsNullOrEmpty() == false) + // { + // var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.PartCode2 && itm.MaterialType == "1"); + // idx++; + // TS_SORT_DETAIL targetDetail = new TS_SORT_DETAIL(); + // targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 + // targetDetail.LineNum = idx2; //行号 + // targetDetail.VinCode = sourceRec.VIN; //VIN码 + // targetDetail.SeqNum = idx2.ToString(); //顺序号sourceRec.HostSN.ToString() + // targetDetail.PartCode = sourceRec.PartCode2; //物料号 + // //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 + // targetDetail.ProjectId = ""; //车型 + // targetDetail.PlanQty = 1; //计划数量 + // targetDetail.State = "0"; //状态 + // targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; + // targetDetail.FullBarCode = null; + // targetDetail.VendId = sourceRec.KNR; + + // //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + + // targetDetailLst.Add(targetDetail); + // if (materialObj != null && materialObj.VehicleModel != null) + // { + // cxLst.Add(materialObj.VehicleModel); + // } + // } + // if (sourceRec.PartCode4.IsNullOrEmpty() == false) + // { + // var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.PartCode4 && itm.MaterialType == "1"); + + // idx++; + // TS_SORT_DETAIL targetDetail = new TS_SORT_DETAIL(); + // targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 + // targetDetail.VinCode = sourceRec.VIN; //VIN码 + // targetDetail.PartCode = sourceRec.PartCode4; //物料号 + // targetDetail.LineNum = (idx2 + 12); //行号 + // targetDetail.SeqNum = (idx2 + 12).ToString(); //顺序号sourceRec.HostSN.ToString() + // //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 + // targetDetail.ProjectId = ""; //车型 + // targetDetail.State = "0"; //状态 + // targetDetail.PlanQty = 1; //计划数量 + // targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; + // targetDetail.FullBarCode = null; + // targetDetail.VendId = sourceRec.KNR; + + // //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + + // targetDetailLst.Add(targetDetail); + // if (materialObj != null && materialObj.VehicleModel != null) + // { + // cxLst.Add(materialObj.VehicleModel); + // } + // } + // } + // //生成车型 + // string cxStr = ""; + // foreach (string cxObj in cxLst.Distinct()) + // { + // cxStr += cxObj + "、"; + // } + // if (cxStr.Length > 0) + // { + // cxStr = cxStr.Substring(0, cxStr.Length - 1); + // } + // targetMain.ProjectId = cxStr; //添加车型 - targetMain.GateCode = sourceObj.PartType; //B柱下 - targetMain.GateName = sourceObj.BillSerialNum; //顺序号 - targetMain.DockCode = sourceObj.BillLocation; //左或右 - targetMain.Remark = sourceObj.MinOnlineTime == null ? null : ((DateTime)sourceObj.MinOnlineTime).ToString("yyyy-MM-dd HH:mm"); //最早上线时间(预计到达时间) - targetMain.TransportType = sourceObj.BillSerialNum; //顺序号 - targetMain.SourceBillNum3 = sourceObj.ProductLine; //2022-10-13加生产线 - targetMainLst.Add(targetMain); - int idx = 0; - int idx2 = 0; - foreach (MenBanPackingRec sourceRec in sourceObj.Details) - { - idx2++; - if (sourceRec.TopSAPMaterialNum.IsNullOrEmpty() == false) - { - var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.TopSAPMaterialNum && itm.MaterialType == "1"); - idx++; - TS_SORT_DETAIL targetDetail = new TS_SORT_DETAIL(); - targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 - targetDetail.LineNum = idx2; //行号 - targetDetail.VinCode = sourceRec.VIN; //VIN码 - targetDetail.SeqNum = idx2.ToString(); //顺序号sourceRec.HostSN.ToString() - targetDetail.PartCode = sourceRec.TopSAPMaterialNum; //物料号 - //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 - targetDetail.ProjectId = ""; //车型 - targetDetail.PlanQty = 1; //计划数量 - targetDetail.State = "0"; //状态 - targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; - targetDetail.FullBarCode = null; - targetDetail.VendId = sourceRec.KNR; + // if (string.IsNullOrEmpty(cxStr)) + // { + // targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + // } + + // } + // foreach (TB_BILL targetMain in targetMainLst) + // { + // //明细数量 + // targetMain.DetailQty = targetDetailLst.Where(p=>p.BillNum== targetMain.BillNum).Count(); + // int cnt = InsertOrUpdateWMSMain(targetMain); + // if (cnt == 0) + // { + // throw new Exception("插入或更新库存系统接口表记录数为零!"); + // } + // } + // foreach (TS_SORT_DETAIL targetDetail in targetDetailLst) + // { + // int cnt = InsertOrUpdateWMSDetail(targetDetail); + // if (cnt == 0) + // { + // throw new Exception("插入或更新库存系统接口表记录数为零!"); + // } + // } + + //} + //private int InsertOrUpdateWMSMain(TB_BILL targetMain) + //{ + // int ret = 0; + // string sqlSelMain = string.Format("select * from TB_BILL where BillNum = '{0}'", targetMain.BillNum); + // TB_BILL wmsMain = _wmsDapperRepository.GetSingleBySql(sqlSelMain, true); + // if (wmsMain == null) + // { + // string sqlInsertMain = @" + // insert into TB_BILL (BillNum, [State], BillType, SubBillType, BillTime, OperName, DetailQty, CustId, ProjectId, DockCode, GateCode, GateName, Remark) + // values ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}')"; + // sqlInsertMain = string.Format(sqlInsertMain, + // targetMain.BillNum, targetMain.State, targetMain.BillType, targetMain.SubBillType, targetMain.BillTime, + // targetMain.OperName, targetMain.DetailQty, targetMain.CustId, targetMain.ProjectId, targetMain.DockCode, targetMain.GateCode, targetMain.GateName, targetMain.Remark); + // try + // { + // ret = _wmsDapperRepository.ExecuteSql(sqlInsertMain, null, true); + // } + // catch (Exception ex) + // { + // throw new Exception("调用InsertOrUpdateWMSMain方法时报错:" + ex.Message + "SQL:" + sqlInsertMain + "单据号:" + targetMain.BillNum); + // } + // } + // else + // { + // if (wmsMain.State != 0) + // { + // throw new Exception("库存系统接口主表中已经存在该单据,并且已经排序,不能重新打印,单据号" + wmsMain.BillNum); + // } + // string sqlUpdateMain = @" + // update TB_BILL set + // [State] = '{1}', + // BillType = '{2}', + // SubBillType = '{3}', + // BillTime = '{4}', + // OperName = '{5}', + // DetailQty = '{6}', + // CustId = '{7}', + // ProjectId = '{8}', + // DockCode = '{9}', + // GateCode = '{10}', + // GateName = '{11}', + // Remark = '{12}' + // where BillNum = '{0}' + // "; + // sqlUpdateMain = string.Format(sqlUpdateMain, + // targetMain.BillNum, targetMain.State, targetMain.BillType, targetMain.SubBillType, targetMain.BillTime, + // targetMain.OperName, targetMain.DetailQty, targetMain.CustId, targetMain.ProjectId, targetMain.DockCode, targetMain.GateCode, targetMain.GateName, targetMain.Remark); + // try + // { + // ret = _wmsDapperRepository.ExecuteSql(sqlUpdateMain, null, true); + // } + // catch (Exception ex) + // { + // throw new Exception("调用InsertOrUpdateWMSMain方法时报错:" + ex.Message + "SQL:" + sqlUpdateMain + "单据号:" + targetMain.BillNum); + // } - //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + // } + // return ret; + //} + + //private int InsertOrUpdateWMSDetail(TS_SORT_DETAIL targetDetail) + //{ + // int ret = 0; + // string sqlSelDetail = string.Format("select * from TS_SORT_DETAIL where BillNum = '{0}' and VinCode = '{1}' and PartCode = '{2}'", targetDetail.BillNum, targetDetail.VinCode, targetDetail.PartCode); + // TS_SORT_DETAIL wmsDetail = _wmsDapperRepository.GetSingleBySql(sqlSelDetail, true); + // if (wmsDetail == null) + // { + // string sqlInsertDetail = @" + // insert into TS_SORT_DETAIL ( + // BillNum, VinCode, PartCode, LineNum, SeqNum, + // ProjectId, [State], BarCode, PlanQty, CustPartCode, + // FullBarCode, VendId) + // values ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}')"; + // sqlInsertDetail = string.Format(sqlInsertDetail, + // targetDetail.BillNum, targetDetail.VinCode, targetDetail.PartCode, targetDetail.LineNum, targetDetail.SeqNum, + // targetDetail.ProjectId, targetDetail.State, targetDetail.BarCode, targetDetail.PlanQty, targetDetail.CustPartCode, + // targetDetail.FullBarCode, targetDetail.VendId); + // try + // { + // ret = _wmsDapperRepository.ExecuteSql(sqlInsertDetail, null, true); + // } + // catch (Exception ex) + // { + // throw new Exception("调用InsertOrUpdateWMSDetail方法时报错:" + ex.Message + "SQL:" + sqlInsertDetail); + // } + // } + // else + // { + // string sqlUpdateDetail = @" + // update TS_SORT_DETAIL set + // LineNum = '{3}', + // SeqNum = '{4}', + // ProjectId = '{5}', + // [State] = '{6}', + // BarCode = '{7}', + // PlanQty = '{8}', + // CustPartCode = '{9}', + // FullBarCode = '{10}' + // VendId = '{11}' + // where BillNum = '{0}' and VinCode = '{1}' and PartCode = '{2}' + // "; + // sqlUpdateDetail = string.Format(sqlUpdateDetail, + // targetDetail.BillNum, targetDetail.VinCode, targetDetail.PartCode, targetDetail.LineNum, targetDetail.SeqNum, + // targetDetail.ProjectId, targetDetail.State, targetDetail.BarCode, targetDetail.PlanQty, targetDetail.CustPartCode, + // targetDetail.FullBarCode, targetDetail.VendId); + // try + // { + // ret = _wmsDapperRepository.ExecuteSql(sqlUpdateDetail, null, true); + // } + // catch (Exception ex) + // { + // throw new Exception("调用InsertOrUpdateWMSDetail方法时报错:" + ex.Message + "SQL:" + sqlUpdateDetail); + // } + // } + // return ret; + //} - targetDetailLst.Add(targetDetail); - if (materialObj != null && materialObj.VehicleModel != null) - { - cxLst.Add(materialObj.VehicleModel); - } - } - if (sourceRec.BelowSAPMaterialNum.IsNullOrEmpty() == false) - { - var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.BelowSAPMaterialNum && itm.MaterialType == "1"); + #endregion + /* + #region 柱护板装箱单 + //private void DelOrScrapWMSInterface(string billNum) + //{ + // //重新打印时,库存系统接口如果存在已发运的正常打印单据,则不允许重新打印;如果存在未发运的正常打印单据则删除该单据 + // string oldBillNum = billNum; + // TB_BILL oldBillObj = _wmsDapperRepository.GetSingleBySql($"select top 1 * from TB_BILL where BillNum = '{oldBillNum}'", true); + // if (oldBillObj != null) + // { + // if (oldBillObj.State == 0) + // { + // string sqlMain = $"delete from TS_SORT_DETAIL where BillNum = '{oldBillNum}'"; + // _wmsDapperRepository.ExecuteSql(sqlMain, null, true); - idx++; - TS_SORT_DETAIL targetDetail = new TS_SORT_DETAIL(); - targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 - targetDetail.VinCode = sourceRec.VIN; //VIN码 - targetDetail.PartCode = sourceRec.BelowSAPMaterialNum; //物料号 - targetDetail.LineNum = (idx2 + 12); //行号 - targetDetail.SeqNum = (idx2 + 12).ToString(); //顺序号sourceRec.HostSN.ToString() - //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 - targetDetail.ProjectId = ""; //车型 - targetDetail.State = "0"; //状态 - targetDetail.PlanQty = 1; //计划数量 - targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; - targetDetail.FullBarCode = null; - targetDetail.VendId = sourceRec.KNR; + // string sqlDetail = $"delete from TB_BILL where BillNum = '{oldBillNum}'"; + // _wmsDapperRepository.ExecuteSql(sqlDetail, null, true); + // } + // else + // { + // throw new BusinessException("1001", $"该单据{oldBillNum}在库存系统中已经排序或发运,不允许删除!"); + // } + // } + //} - //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 - - targetDetailLst.Add(targetDetail); - if (materialObj != null && materialObj.VehicleModel != null) - { - cxLst.Add(materialObj.VehicleModel); - } - } - } - //生成车型 - string cxStr = ""; - foreach (string cxObj in cxLst.Distinct()) - { - cxStr += cxObj + "、"; - } - if (cxStr.Length > 0) - { - cxStr = cxStr.Substring(0, cxStr.Length - 1); - } - targetMain.ProjectId = cxStr; //添加车型 - - if (string.IsNullOrEmpty(cxStr)) - { - targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 - } - - } - foreach (TB_BILL targetMain in targetMainLst) - { - //明细数量 - targetMain.DetailQty = targetDetailLst.Where(p=>p.BillNum== targetMain.BillNum).Count(); - int cnt = InsertOrUpdateWMSMain(targetMain); - if (cnt == 0) - { - throw new Exception("插入或更新库存系统接口表记录数为零!"); - } - } - foreach (TS_SORT_DETAIL targetDetail in targetDetailLst) - { - int cnt = InsertOrUpdateWMSDetail(targetDetail); - if (cnt == 0) - { - throw new Exception("插入或更新库存系统接口表记录数为零!"); - } - } - - } - private int InsertOrUpdateWMSMain(TB_BILL targetMain) - { - int ret = 0; - string sqlSelMain = string.Format("select * from TB_BILL where BillNum = '{0}'", targetMain.BillNum); - TB_BILL wmsMain = _wmsDapperRepository.GetSingleBySql(sqlSelMain, true); - if (wmsMain == null) - { - string sqlInsertMain = @" - insert into TB_BILL (BillNum, [State], BillType, SubBillType, BillTime, OperName, DetailQty, CustId, ProjectId, DockCode, GateCode, GateName, Remark) - values ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}')"; - sqlInsertMain = string.Format(sqlInsertMain, - targetMain.BillNum, targetMain.State, targetMain.BillType, targetMain.SubBillType, targetMain.BillTime, - targetMain.OperName, targetMain.DetailQty, targetMain.CustId, targetMain.ProjectId, targetMain.DockCode, targetMain.GateCode, targetMain.GateName, targetMain.Remark); - try - { - ret = _wmsDapperRepository.ExecuteSql(sqlInsertMain, null, true); - } - catch (Exception ex) - { - throw new Exception("调用InsertOrUpdateWMSMain方法时报错:" + ex.Message + "SQL:" + sqlInsertMain + "单据号:" + targetMain.BillNum); - } - } - else - { - if (wmsMain.State != 0) - { - throw new Exception("库存系统接口主表中已经存在该单据,并且已经排序,不能重新打印,单据号" + wmsMain.BillNum); - } - string sqlUpdateMain = @" - update TB_BILL set - [State] = '{1}', - BillType = '{2}', - SubBillType = '{3}', - BillTime = '{4}', - OperName = '{5}', - DetailQty = '{6}', - CustId = '{7}', - ProjectId = '{8}', - DockCode = '{9}', - GateCode = '{10}', - GateName = '{11}', - Remark = '{12}' - where BillNum = '{0}' - "; - sqlUpdateMain = string.Format(sqlUpdateMain, - targetMain.BillNum, targetMain.State, targetMain.BillType, targetMain.SubBillType, targetMain.BillTime, - targetMain.OperName, targetMain.DetailQty, targetMain.CustId, targetMain.ProjectId, targetMain.DockCode, targetMain.GateCode, targetMain.GateName, targetMain.Remark); - try - { - ret = _wmsDapperRepository.ExecuteSql(sqlUpdateMain, null, true); - } - catch (Exception ex) - { - throw new Exception("调用InsertOrUpdateWMSMain方法时报错:" + ex.Message + "SQL:" + sqlUpdateMain + "单据号:" + targetMain.BillNum); - } - - } - return ret; - } - private int InsertOrUpdateWMSDetail(TS_SORT_DETAIL targetDetail) - { - int ret = 0; - string sqlSelDetail = string.Format("select * from TS_SORT_DETAIL where BillNum = '{0}' and VinCode = '{1}' and PartCode = '{2}'", targetDetail.BillNum, targetDetail.VinCode, targetDetail.PartCode); - TS_SORT_DETAIL wmsDetail = _wmsDapperRepository.GetSingleBySql(sqlSelDetail, true); - if (wmsDetail == null) - { - string sqlInsertDetail = @" - insert into TS_SORT_DETAIL ( - BillNum, VinCode, PartCode, LineNum, SeqNum, - ProjectId, [State], BarCode, PlanQty, CustPartCode, - FullBarCode, VendId) - values ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}')"; - sqlInsertDetail = string.Format(sqlInsertDetail, - targetDetail.BillNum, targetDetail.VinCode, targetDetail.PartCode, targetDetail.LineNum, targetDetail.SeqNum, - targetDetail.ProjectId, targetDetail.State, targetDetail.BarCode, targetDetail.PlanQty, targetDetail.CustPartCode, - targetDetail.FullBarCode, targetDetail.VendId); - try - { - ret = _wmsDapperRepository.ExecuteSql(sqlInsertDetail, null, true); - } - catch (Exception ex) - { - throw new Exception("调用InsertOrUpdateWMSDetail方法时报错:" + ex.Message + "SQL:" + sqlInsertDetail); - } - } - else - { - string sqlUpdateDetail = @" - update TS_SORT_DETAIL set - LineNum = '{3}', - SeqNum = '{4}', - ProjectId = '{5}', - [State] = '{6}', - BarCode = '{7}', - PlanQty = '{8}', - CustPartCode = '{9}', - FullBarCode = '{10}' - VendId = '{11}' - where BillNum = '{0}' and VinCode = '{1}' and PartCode = '{2}' - "; - sqlUpdateDetail = string.Format(sqlUpdateDetail, - targetDetail.BillNum, targetDetail.VinCode, targetDetail.PartCode, targetDetail.LineNum, targetDetail.SeqNum, - targetDetail.ProjectId, targetDetail.State, targetDetail.BarCode, targetDetail.PlanQty, targetDetail.CustPartCode, - targetDetail.FullBarCode, targetDetail.VendId); - try - { - ret = _wmsDapperRepository.ExecuteSql(sqlUpdateDetail, null, true); - } - catch (Exception ex) - { - throw new Exception("调用InsertOrUpdateWMSDetail方法时报错:" + ex.Message + "SQL:" + sqlUpdateDetail); - } - } - return ret; - } - - #endregion - - #region 柱护板装箱单 - //private void DelOrScrapWMSInterface(string billNum) - //{ - // //重新打印时,库存系统接口如果存在已发运的正常打印单据,则不允许重新打印;如果存在未发运的正常打印单据则删除该单据 - // string oldBillNum = billNum; - // TB_BILL oldBillObj = _wmsDapperRepository.GetSingleBySql($"select top 1 * from TB_BILL where BillNum = '{oldBillNum}'", true); - // if (oldBillObj != null) - // { - // if (oldBillObj.State == 0) - // { - // string sqlMain = $"delete from TS_SORT_DETAIL where BillNum = '{oldBillNum}'"; - // _wmsDapperRepository.ExecuteSql(sqlMain, null, true); - - // string sqlDetail = $"delete from TB_BILL where BillNum = '{oldBillNum}'"; - // _wmsDapperRepository.ExecuteSql(sqlDetail, null, true); - // } - // else - // { - // throw new BusinessException("1001", $"该单据{oldBillNum}在库存系统中已经排序或发运,不允许删除!"); - // } - // } - //} - - /// - /// 根据条件取用于打印的柱护板单据列表 - /// - /// - /// - /// - private async Task> GetZHBReportDetailList(ZhuHuBanPrintInputDto input, bool isFillBreakNum = false) - { - List billLst = new List(); - ListResultDto ret = new ListResultDto(billLst); + /// + /// 根据条件取用于打印的柱护板单据列表 + /// + /// + /// + /// + private async Task> GetZHBReportDetailList(ZhuHuBanPrintInputDto input, bool isFillBreakNum = false) + { + List billLst = new List(); + ListResultDto ret = new ListResultDto(billLst); int printBillCnt = 0; if (input.PrintType == PrintTypeEnum.正常打印) @@ -2053,7 +1990,7 @@ select * from return null; } #endregion - + */ #region 报表公共方法 /// @@ -2069,27 +2006,30 @@ select * from List retLst = new List(); try { - int lastNum = await GetMenBanLastPrintNum(input); - int newNum = lastNum + 1; - if ((lastNum % 10000) == 1999) + int lastNum = await GetMenBanLastPrintNum(input); //从M100中取当前产线、已经打印的最大大众顺序号 + if (lastNum > 0) { - if ((input.BeginHostSN % 10000) != 1) + if ((lastNum % 10000) == 1999) { - string msg = $"单据之间断号,上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"; - retLst.Add(msg); - _logger.LogDebug(msg); + if ((input.BeginHostSN % 10000) != 1) + { + string msg = $"单据之间断号,上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"; + retLst.Add(msg); + _logger.LogDebug(msg); + } } - } - else - { - if(newNum!= input.BeginHostSN) + else { - string msg = $"单据之间断号,上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"; - retLst.Add(msg); - _logger.LogDebug(msg); + if (lastNum + 1 != input.BeginHostSN) + { + string msg = $"单据之间断号,上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"; + retLst.Add(msg); + _logger.LogDebug(msg); + } } } + ListResultDto tempLst = await GetMBReportDetailList(input, false); List billLst = tempLst.Item; if (billLst.Count < 2) @@ -2142,134 +2082,71 @@ select * from /// /// 是否柱护板 /// 断号时Item不为空 - [UnitOfWork(false)] - [HttpPost] - [Route("check-zhb-hostsn-break-num")] - public virtual async Task> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input) - { - List retLst = new List(); - try - { - int lastNum = await GetZhuHuBanLastPrintNum(input); - int newNum = lastNum + 1; - if ((lastNum % 10000) == 1999) - { - if ((input.BeginHostSN % 10000) != 1) - { - retLst.Add($"上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"); - } - } - else - { - if (newNum != input.BeginHostSN) - { - retLst.Add($"上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"); - } - } - ListResultDto tempLst = await GetZHBReportDetailList(input, false); - List billLst = tempLst.Item; - if (billLst.Count < 2) - { - return new ListResultDto(retLst); - } - for (int i = 1; i < billLst.Count; i++) - { - BillM100 priorObj = billLst[i - 1]; - BillM100 curObj = billLst[i]; - int priorHostSN = (int)billLst[i - 1].HostSN; - int curHostSN = (int)billLst[i].HostSN; - - if (curHostSN > priorHostSN) //0005、0006 - { - if (curHostSN > priorHostSN + 1) //0005、0008时,补号 0006、0007 - { - retLst.Add($"大众顺序号{priorObj.HostSN}与{curObj.HostSN}之间存在断号情况!"); - } - } - else if (curHostSN < priorHostSN) //1999到0001的情况 - { - if (curHostSN + _hostSNMaxVal > priorHostSN + 1) //0005、0008时,补号 0006、0007 - { - retLst.Add($"大众顺序号{priorObj.HostSN}与{curObj.HostSN}之间存在断号情况!"); - } - } - } - return new ListResultDto(retLst); - } - catch (Exception ex) - { - ListResultDto ret = new ListResultDto(); - ret.Status = false; - ret.Message = _errorMessagePrefix + "打印前检查大众顺序号是否断号CheckZHBHostSNBreakNum 执行出错:" + ex.Message; - _logger.LogError(ret.Message); - return ret; - } - } - - /// - /// 根据生产线获取正常打印单据的起始大众顺序号 - /// - /// 生产线 - /// 起始大众顺序号 - //[UnitOfWork] - //[HttpGet] - //[Route("get-print-start-hostsn")] - //public virtual async Task> GetPrintStartHostSN(string productLine) + //[UnitOfWork(false)] + //[HttpPost] + //[Route("check-zhb-hostsn-break-num")] + //public virtual async Task> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input) //{ - // int? beginHostSN = null; + // List retLst = new List(); // try // { - // //存在已打印单据 - // var publishQry = _billM100Repository.Where(itm => itm.ProductLine == productLine && itm.BillStatus == BillStatusEnum.Publish); - // if (publishQry.Any() == true) + // int lastNum = await GetZhuHuBanLastPrintNum(input); + // int newNum = lastNum + 1; + // if ((lastNum % 10000) == 1999) // { - // //取已打印最后一个单据 - // DateTime publishMaxCreateTime = publishQry.Max(itm => itm.CreationTime); - // //取指定生产线、不等于已打印状态、大于已打印最后一个单据、最小的CreationTime - // var query = _billM100Repository.Where(itm => - // itm.ProductLine == productLine - // && (itm.BillStatus != BillStatusEnum.Publish) - // && itm.CreationTime > publishMaxCreateTime); - // if (query.Any()) + // if ((input.BeginHostSN % 10000) != 1) // { - // DateTime minCreateTime = query.Min(itm => itm.CreationTime); - // //根据CreationTime取大众顺序号 - // var obj = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == productLine && itm.CreationTime == minCreateTime); - // if (obj != null) - // { - // beginHostSN = obj.HostSN; - // } + // retLst.Add($"上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"); // } // } // else // { - // //取指定生产线、不等于已打印状态、最小的CreationTime - // var query2 = _billM100Repository.Where(itm => - // itm.ProductLine == productLine - // && itm.BillStatus != BillStatusEnum.Publish); - // if (query2.Any()) + // if (newNum != input.BeginHostSN) + // { + // retLst.Add($"上次打印的最后大众顺序号为【{lastNum}】,与本次打印开始号【{input.BeginHostSN}】中间存在断号!"); + // } + // } + // ListResultDto tempLst = await GetZHBReportDetailList(input, false); + // List billLst = tempLst.Item; + // if (billLst.Count < 2) + // { + // return new ListResultDto(retLst); + // } + // for (int i = 1; i < billLst.Count; i++) + // { + // BillM100 priorObj = billLst[i - 1]; + // BillM100 curObj = billLst[i]; + // int priorHostSN = (int)billLst[i - 1].HostSN; + // int curHostSN = (int)billLst[i].HostSN; + + // if (curHostSN > priorHostSN) //0005、0006 + // { + // if (curHostSN > priorHostSN + 1) //0005、0008时,补号 0006、0007 + // { + // retLst.Add($"大众顺序号{priorObj.HostSN}与{curObj.HostSN}之间存在断号情况!"); + // } + // } + // else if (curHostSN < priorHostSN) //1999到0001的情况 // { - // DateTime minCreateTime2 = query2.Min(itm => itm.CreationTime); - // //根据流水号取大众顺序号 - // var obj = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == productLine && itm.CreationTime == minCreateTime2); - // if (obj != null) + // if (curHostSN + _hostSNMaxVal > priorHostSN + 1) //0005、0008时,补号 0006、0007 // { - // beginHostSN = obj.HostSN; + // retLst.Add($"大众顺序号{priorObj.HostSN}与{curObj.HostSN}之间存在断号情况!"); // } // } // } - // return new ObjectResultDto(beginHostSN); + // return new ListResultDto(retLst); // } // catch (Exception ex) // { - // ObjectResultDto ret = new ObjectResultDto(); + // ListResultDto ret = new ListResultDto(); // ret.Status = false; - // ret.Message = _errorMessagePrefix + "GetPrintStartHostSN 执行出错:" + ex.Message; + // ret.Message = _errorMessagePrefix + "打印前检查大众顺序号是否断号CheckZHBHostSNBreakNum 执行出错:" + ex.Message; // _logger.LogError(ret.Message); // return ret; // } //} + /// /// 根据生产线获取正常打印单据的起始大众顺序号2 /// @@ -2349,284 +2226,284 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN /// /// /// 执行成功返回真 - [UnitOfWork] - [HttpPost] - [Route("print-menban-packing-list")] - public virtual async Task> PrintMenBanPackingList(MenBanPrintInputDto input) - { - /* - 1、 一次打印24辆车,分为4页纸张,四个纸张的装箱单号不是一样 - 2、 按大众顺序号过滤打印,一次打印12套(不是24辆车),到1999后按2000、2001顺序排,下次打印按3延续排列右前 - 5、 物料描述字体尽量大 - 6、 右上角的“01 左” 字体尽量大 - 7、 零件类别: C8是车型, DP表示门板 - 8、 器具容量: 24表示当页包含24个门板 - 9、 车型门板代码: 从物料汇总文件- 补充备注 字段中取 Q5-DV OQ N5K 3L4 QQ2 6XE 7HB 9VS 7X1 3Y4 - 3、 根据物料描述字段区分左后、左前、右后、右前 - 4、 车型C8的第一二页分为左后, 右前,第三四页分为右后、左前;其它车型 第一二页分为左后、左前,第三四页分为右后、 - 10、 物料描述: 从物料汇总文件-物料描述 字段中取 - */ - MenBanPrintResultDto retObj = new MenBanPrintResultDto(); - ObjectResultDto ret = new ObjectResultDto(retObj); - ret.Status = false; - try - { - List reportMainLst = new List(); + //[UnitOfWork] + //[HttpPost] + //[Route("print-menban-packing-list")] + //public virtual async Task> PrintMenBanPackingList(MenBanPrintInputDto input) + //{ + // /* + // 1、 一次打印24辆车,分为4页纸张,四个纸张的装箱单号不是一样 + // 2、 按大众顺序号过滤打印,一次打印12套(不是24辆车),到1999后按2000、2001顺序排,下次打印按3延续排列右前 + // 5、 物料描述字体尽量大 + // 6、 右上角的“01 左” 字体尽量大 + // 7、 零件类别: C8是车型, DP表示门板 + // 8、 器具容量: 24表示当页包含24个门板 + // 9、 车型门板代码: 从物料汇总文件- 补充备注 字段中取 Q5-DV OQ N5K 3L4 QQ2 6XE 7HB 9VS 7X1 3Y4 + // 3、 根据物料描述字段区分左后、左前、右后、右前 + // 4、 车型C8的第一二页分为左后, 右前,第三四页分为右后、左前;其它车型 第一二页分为左后、左前,第三四页分为右后、 + // 10、 物料描述: 从物料汇总文件-物料描述 字段中取 + // */ + // MenBanPrintResultDto retObj = new MenBanPrintResultDto(); + // ObjectResultDto ret = new ObjectResultDto(retObj); + // ret.Status = false; + // try + // { + // List reportMainLst = new List(); - if (input.PrintType == PrintTypeEnum.正常打印) - { - if (input.BeginHostSN != 0 && input.EndHostSN != 0) - { - if (input.BeginHostSN > input.EndHostSN) - { - ret.Message = "止大众顺序号必须大于等于起大众顺序号!"; - ret.Status = false; - return ret; - } - } - ListResultDto tempLst = await GetMBReportDetailList(input, true); //----------------------------- - List billLst = tempLst.Item; - if (tempLst.Status == false) - { - ret.Message = tempLst.Message; - ret.Status = false; - return ret; - } + // if (input.PrintType == PrintTypeEnum.正常打印) + // { + // if (input.BeginHostSN != 0 && input.EndHostSN != 0) + // { + // if (input.BeginHostSN > input.EndHostSN) + // { + // ret.Message = "止大众顺序号必须大于等于起大众顺序号!"; + // ret.Status = false; + // return ret; + // } + // } + // ListResultDto tempLst = await GetMBReportDetailList(input, true); //----------------------------- + // List billLst = tempLst.Item; + // if (tempLst.Status == false) + // { + // ret.Message = tempLst.Message; + // ret.Status = false; + // return ret; + // } - int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 + // int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 - double maxBillNum = 0; + // double maxBillNum = 0; - DateTime printTime = ServerHelper.CurrentDateTime; + // DateTime printTime = ServerHelper.CurrentDateTime; - for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) - { - //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 - double maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); - // 先打印两张:左后左前,再打印两张:右后右前 - List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); - List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); - - //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 - Guid sortId = GuidGenerator.Create(); - foreach (var leftItm in leftLst) - { - leftItm.SortId = sortId; - } - foreach (var rightItm in rightLst) - { - rightItm.SortId = sortId; - } + // for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) + // { + // //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 + // double maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); + // // 先打印两张:左后左前,再打印两张:右后右前 + // List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); + // List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); + + // //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 + // Guid sortId = GuidGenerator.Create(); + // foreach (var leftItm in leftLst) + // { + // leftItm.SortId = sortId; + // } + // foreach (var rightItm in rightLst) + // { + // rightItm.SortId = sortId; + // } - reportMainLst.AddRange(rightLst); - reportMainLst.AddRange(leftLst); - } + // reportMainLst.AddRange(rightLst); + // reportMainLst.AddRange(leftLst); + // } - //调用派格版库存接口 - CallWMSInterface_MB(reportMainLst); + // //调用派格版库存接口 + // CallWMSInterface_MB(reportMainLst); - //插入门板打印记录表 - await _menBanPackingListRepository.InsertManyAsync(reportMainLst, true); + // //插入门板打印记录表 + // await _menBanPackingListRepository.InsertManyAsync(reportMainLst, true); - //更新M100的门板打印标志:BillStatus=3 - foreach (BillM100 billObj in billLst) - { - if (billObj.BillStatus == BillStatusEnum.Match) - { - billObj.SetBillStatus(BillStatusEnum.Publish); - billObj.PrintTime = ServerHelper.CurrentDateTime; - billObj.NeedReplenishPrint = 0; //不需要补打 - await _billM100Repository.UpdateAsync(billObj, true); - } - else if (billObj.BillStatus == BillStatusEnum.NotMatch) - { - //billObj.PrintTime = ServerHelper.CurrentDateTime; - billObj.NeedReplenishPrint = 1; //需要补打 - await _billM100Repository.UpdateAsync(billObj, true); - } - } - } - else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 - { - reportMainLst = await _menBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); - //按大众顺序号排序 - foreach (var reportMainObj in reportMainLst) - { - List recLst = reportMainObj.Details; - if (recLst == null) - continue; - //bool has1999 = recLst.Any(itm => itm.HostSN.Contains("1999") || itm.HostSN.Contains("1998") || itm.HostSN.Contains("1997")); - //bool has0001 = recLst.Any(itm => itm.HostSN.Contains("0001") || itm.HostSN.Contains("0002") || itm.HostSN.Contains("0003")); - bool has1999 = recLst.Any(itm => itm.HostSN.Contains("1999") || itm.HostSN.Contains("1998") || itm.HostSN.Contains("1997") - || itm.HostSN.Contains("1996") || itm.HostSN.Contains("1995") || itm.HostSN.Contains("1994") - || itm.HostSN.Contains("1993") || itm.HostSN.Contains("1992") || itm.HostSN.Contains("1991") - || itm.HostSN.Contains("1990") || itm.HostSN.Contains("1989") || itm.HostSN.Contains("1988") - || itm.HostSN.Contains("1987") || itm.HostSN.Contains("1986") || itm.HostSN.Contains("1985") - || itm.HostSN.Contains("1984") || itm.HostSN.Contains("1983") || itm.HostSN.Contains("1982") - || itm.HostSN.Contains("1981") || itm.HostSN.Contains("1980") || itm.HostSN.Contains("1979") - || itm.HostSN.Contains("1978") || itm.HostSN.Contains("1977") || itm.HostSN.Contains("1976") - ); - bool has0001 = recLst.Any(itm => itm.HostSN.Contains("0001") || itm.HostSN.Contains("0002") || itm.HostSN.Contains("0003") - || itm.HostSN.Contains("0004") || itm.HostSN.Contains("0005") || itm.HostSN.Contains("0006") - || itm.HostSN.Contains("0007") || itm.HostSN.Contains("0008") || itm.HostSN.Contains("0009") - || itm.HostSN.Contains("0010") || itm.HostSN.Contains("0011") || itm.HostSN.Contains("0012") - || itm.HostSN.Contains("0013") || itm.HostSN.Contains("0014") || itm.HostSN.Contains("0015") - || itm.HostSN.Contains("0016") || itm.HostSN.Contains("0017") || itm.HostSN.Contains("0018") - || itm.HostSN.Contains("0019") || itm.HostSN.Contains("0020") || itm.HostSN.Contains("0021") - || itm.HostSN.Contains("0022") || itm.HostSN.Contains("0023") || itm.HostSN.Contains("0024") - ); - if (has1999 && has0001) - { - reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN.TryToIntZero() % 10000) < 240 ? (itm.HostSN.TryToIntZero() % 10000 + 1999) : (itm.HostSN.TryToIntZero() % 10000)).ToList(); - } - else - { - reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); - } - } - } - else if (input.PrintType == PrintTypeEnum.补打) - { - List billLst = _billM100Repository.Where(itm => input.M100IdList.Contains(itm.Id)).OrderBy(itm => itm.SerialNumStr).ToList(); - if (billLst.Count == 0) - { - ret.Message = "没有补打的单据,请先选择要补打的单据!"; - ret.Status = false; - return ret; - } - - int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 + // //更新M100的门板打印标志:BillStatus=3 + // foreach (BillM100 billObj in billLst) + // { + // if (billObj.BillStatus == BillStatusEnum.Match) + // { + // billObj.SetBillStatus(BillStatusEnum.Publish); + // billObj.PrintTime = ServerHelper.CurrentDateTime; + // billObj.NeedReplenishPrint = 0; //不需要补打 + // await _billM100Repository.UpdateAsync(billObj, true); + // } + // else if (billObj.BillStatus == BillStatusEnum.NotMatch) + // { + // //billObj.PrintTime = ServerHelper.CurrentDateTime; + // billObj.NeedReplenishPrint = 1; //需要补打 + // await _billM100Repository.UpdateAsync(billObj, true); + // } + // } + // } + // else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 + // { + // reportMainLst = await _menBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); + // //按大众顺序号排序 + // foreach (var reportMainObj in reportMainLst) + // { + // List recLst = reportMainObj.Details; + // if (recLst == null) + // continue; + // //bool has1999 = recLst.Any(itm => itm.HostSN.Contains("1999") || itm.HostSN.Contains("1998") || itm.HostSN.Contains("1997")); + // //bool has0001 = recLst.Any(itm => itm.HostSN.Contains("0001") || itm.HostSN.Contains("0002") || itm.HostSN.Contains("0003")); + // bool has1999 = recLst.Any(itm => itm.HostSN.Contains("1999") || itm.HostSN.Contains("1998") || itm.HostSN.Contains("1997") + // || itm.HostSN.Contains("1996") || itm.HostSN.Contains("1995") || itm.HostSN.Contains("1994") + // || itm.HostSN.Contains("1993") || itm.HostSN.Contains("1992") || itm.HostSN.Contains("1991") + // || itm.HostSN.Contains("1990") || itm.HostSN.Contains("1989") || itm.HostSN.Contains("1988") + // || itm.HostSN.Contains("1987") || itm.HostSN.Contains("1986") || itm.HostSN.Contains("1985") + // || itm.HostSN.Contains("1984") || itm.HostSN.Contains("1983") || itm.HostSN.Contains("1982") + // || itm.HostSN.Contains("1981") || itm.HostSN.Contains("1980") || itm.HostSN.Contains("1979") + // || itm.HostSN.Contains("1978") || itm.HostSN.Contains("1977") || itm.HostSN.Contains("1976") + // ); + // bool has0001 = recLst.Any(itm => itm.HostSN.Contains("0001") || itm.HostSN.Contains("0002") || itm.HostSN.Contains("0003") + // || itm.HostSN.Contains("0004") || itm.HostSN.Contains("0005") || itm.HostSN.Contains("0006") + // || itm.HostSN.Contains("0007") || itm.HostSN.Contains("0008") || itm.HostSN.Contains("0009") + // || itm.HostSN.Contains("0010") || itm.HostSN.Contains("0011") || itm.HostSN.Contains("0012") + // || itm.HostSN.Contains("0013") || itm.HostSN.Contains("0014") || itm.HostSN.Contains("0015") + // || itm.HostSN.Contains("0016") || itm.HostSN.Contains("0017") || itm.HostSN.Contains("0018") + // || itm.HostSN.Contains("0019") || itm.HostSN.Contains("0020") || itm.HostSN.Contains("0021") + // || itm.HostSN.Contains("0022") || itm.HostSN.Contains("0023") || itm.HostSN.Contains("0024") + // ); + // if (has1999 && has0001) + // { + // reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN.TryToIntZero() % 10000) < 240 ? (itm.HostSN.TryToIntZero() % 10000 + 1999) : (itm.HostSN.TryToIntZero() % 10000)).ToList(); + // } + // else + // { + // reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); + // } + // } + // } + // else if (input.PrintType == PrintTypeEnum.补打) + // { + // List billLst = _billM100Repository.Where(itm => input.M100IdList.Contains(itm.Id)).OrderBy(itm => itm.SerialNumStr).ToList(); + // if (billLst.Count == 0) + // { + // ret.Message = "没有补打的单据,请先选择要补打的单据!"; + // ret.Status = false; + // return ret; + // } - double maxBillNum = 0; + // int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 - DateTime printTime = ServerHelper.CurrentDateTime; + // double maxBillNum = 0; - for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) - { - //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 - double maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); - // 先打印两张:左后左前,再打印两张:右后右前 - List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); - List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); - - //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 - Guid sortId = GuidGenerator.Create(); - foreach (var leftItm in leftLst) - { - leftItm.SortId = sortId; - } - foreach (var rightItm in rightLst) - { - rightItm.SortId = sortId; - } + // DateTime printTime = ServerHelper.CurrentDateTime; - reportMainLst.AddRange(rightLst); - reportMainLst.AddRange(leftLst); - } - //校验底盘号、零件是否重复打印 - string checkVinPartRepeatSql = @" - select top 1 a.BillNum from FisMenBanPackingList a join FisMenBanPackingRec b - on a.Id = b.MenBanPackingListId - where a.ReportStatus = 0 - and b.VIN = '{0}' and (TopSAPMaterialNum = '{1}' or BelowSAPMaterialNum = '{1}') - "; - foreach (MenBanPackingList reportMainObj in reportMainLst) - { - foreach (MenBanPackingRec reportRecObj in reportMainObj.Details) - { - string sql1 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.TopSAPMaterialNum); - string checkVinPartRepeatBillNum1 = _newJitDapperRepository.GetSingleBySql(sql1, true); - if (string.IsNullOrEmpty(checkVinPartRepeatBillNum1) == false) - { - throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum1}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.TopSAPMaterialNum}之间重复!"); - } + // for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) + // { + // //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 + // double maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); + // // 先打印两张:左后左前,再打印两张:右后右前 + // List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); + // List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); + + // //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 + // Guid sortId = GuidGenerator.Create(); + // foreach (var leftItm in leftLst) + // { + // leftItm.SortId = sortId; + // } + // foreach (var rightItm in rightLst) + // { + // rightItm.SortId = sortId; + // } - string sql2 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.BelowSAPMaterialNum); - string checkVinPartRepeatBillNum2 = _newJitDapperRepository.GetSingleBySql(sql2, true); - if (string.IsNullOrEmpty(checkVinPartRepeatBillNum2) == false) - { - throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum2}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.BelowSAPMaterialNum}之间重复!"); - } - } - } + // reportMainLst.AddRange(rightLst); + // reportMainLst.AddRange(leftLst); + // } + // //校验底盘号、零件是否重复打印 + // string checkVinPartRepeatSql = @" + // select top 1 a.BillNum from FisMenBanPackingList a join FisMenBanPackingRec b + // on a.Id = b.MenBanPackingListId + // where a.ReportStatus = 0 + // and b.VIN = '{0}' and (TopSAPMaterialNum = '{1}' or BelowSAPMaterialNum = '{1}') + // "; + // foreach (MenBanPackingList reportMainObj in reportMainLst) + // { + // foreach (MenBanPackingRec reportRecObj in reportMainObj.Details) + // { + // string sql1 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.PartCode2); + // string checkVinPartRepeatBillNum1 = _newJitDapperRepository.GetSingleBySql(sql1, true); + // if (string.IsNullOrEmpty(checkVinPartRepeatBillNum1) == false) + // { + // throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum1}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.PartCode2}之间重复!"); + // } + + // string sql2 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.PartCode4); + // string checkVinPartRepeatBillNum2 = _newJitDapperRepository.GetSingleBySql(sql2, true); + // if (string.IsNullOrEmpty(checkVinPartRepeatBillNum2) == false) + // { + // throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum2}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.PartCode4}之间重复!"); + // } + // } + // } - //调用派格版库存接口 - CallWMSInterface_MB(reportMainLst); + // //调用派格版库存接口 + // CallWMSInterface_MB(reportMainLst); - //插入门板打印记录表 - await _menBanPackingListRepository.InsertManyAsync(reportMainLst); + // //插入门板打印记录表 + // await _menBanPackingListRepository.InsertManyAsync(reportMainLst); - //更新M100的门板打印标志:BillStatus=3 - foreach (BillM100 billObj in billLst) - { - if (billObj.BillStatus == BillStatusEnum.Match) - { - billObj.SetBillStatus(BillStatusEnum.Publish); - billObj.PrintTime = ServerHelper.CurrentDateTime; - await _billM100Repository.UpdateAsync(billObj); - } - } - } + // //更新M100的门板打印标志:BillStatus=3 + // foreach (BillM100 billObj in billLst) + // { + // if (billObj.BillStatus == BillStatusEnum.Match) + // { + // billObj.SetBillStatus(BillStatusEnum.Publish); + // billObj.PrintTime = ServerHelper.CurrentDateTime; + // await _billM100Repository.UpdateAsync(billObj); + // } + // } + // } - #region 格式转换 - //实体 转 DTO - List targetLst = ObjectMapper.Map, List>(reportMainLst); - targetLst = targetLst.OrderBy(itm => itm.BillNum).ToList(); + // #region 格式转换 + // //实体 转 DTO + // List targetLst = ObjectMapper.Map, List>(reportMainLst); + // targetLst = targetLst.OrderBy(itm => itm.BillNum).ToList(); - //补充空行 - foreach (var masterObj in targetLst) - { - int trueCnt = masterObj.Details.Count; - int planCnt = 12; - if (trueCnt > planCnt) - { - throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); - } - int diffCnt = planCnt - trueCnt; - for (int i = 0; i < diffCnt; i++) - { - MenBanPackingRecDto dtlObj = new MenBanPackingRecDto(); - masterObj.Details.Add(dtlObj); - } - } - //子表BillNum赋值, BillNum填充空格 - foreach (var masterObj in targetLst) - { - masterObj.BillNum = GetTrueString(masterObj.BillNum); - int sn = 1; - foreach (var detailObj in masterObj.Details) - { - detailObj.BillNum = masterObj.BillNum; - detailObj.KNR = GetTrueString(detailObj.KNR); - detailObj.sn = sn++; - detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 - } - } - //返回结果格式转换 - foreach (var masterObj in targetLst) - { - foreach (var detailObj in masterObj.Details) - { - retObj.DetailList.Add(detailObj); - } - masterObj.Details = null; - retObj.MasterList.Add(masterObj); - } - #endregion - ret.Status = true; - return ret; - } - catch (Exception ex) - { - string errorMsg = _errorMessagePrefix + "PrintMenBanPackingList 执行出错:" + ex.Message; - _logger.LogError(errorMsg); - throw new BusinessException("1001", errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; - } - } + // //补充空行 + // foreach (var masterObj in targetLst) + // { + // int trueCnt = masterObj.Details.Count; + // int planCnt = 12; + // if (trueCnt > planCnt) + // { + // throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); + // } + // int diffCnt = planCnt - trueCnt; + // for (int i = 0; i < diffCnt; i++) + // { + // MenBanPackingRecDto dtlObj = new MenBanPackingRecDto(); + // masterObj.Details.Add(dtlObj); + // } + // } + // //子表BillNum赋值, BillNum填充空格 + // foreach (var masterObj in targetLst) + // { + // masterObj.BillNum = GetTrueString(masterObj.BillNum); + // int sn = 1; + // foreach (var detailObj in masterObj.Details) + // { + // detailObj.BillNum = masterObj.BillNum; + // detailObj.KNR = GetTrueString(detailObj.KNR); + // detailObj.sn = sn++; + // detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 + // } + // } + // //返回结果格式转换 + // foreach (var masterObj in targetLst) + // { + // foreach (var detailObj in masterObj.Details) + // { + // retObj.DetailList.Add(detailObj); + // } + // masterObj.Details = null; + // retObj.MasterList.Add(masterObj); + // } + // #endregion + // ret.Status = true; + // return ret; + // } + // catch (Exception ex) + // { + // string errorMsg = _errorMessagePrefix + "PrintMenBanPackingList 执行出错:" + ex.Message; + // _logger.LogError(errorMsg); + // throw new BusinessException("1001", errorMsg); + // ret.Status = false; + // ret.Message = ex.Message; + // return ret; + // } + //} @@ -2636,423 +2513,402 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN /// /// /// 执行成功返回真 - [UnitOfWork(isTransactional:false)] - [HttpPost] - [Route("print-zhuhuban-packing-list")] - public virtual async Task> PrintZhuHuBanPackingList(ZhuHuBanPrintInputDto input) - { - ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); - ObjectResultDto ret = new ObjectResultDto(retObj); - ret.Status = false; - try - { - List reportMainLst = new List(); - List forWMSLst = new List(); + //[UnitOfWork(isTransactional:false)] + //[HttpPost] + //[Route("print-zhuhuban-packing-list")] + //public virtual async Task> PrintZhuHuBanPackingList(ZhuHuBanPrintInputDto input) + //{ + // ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); + // ObjectResultDto ret = new ObjectResultDto(retObj); + // ret.Status = false; + // try + // { + // List reportMainLst = new List(); + // List forWMSLst = new List(); - if (input.PrintType == PrintTypeEnum.正常打印) - { - if (input.BeginHostSN > input.EndHostSN) - { - ret.Message = "起大众顺序号不能大于止大众顺序号!"; - ret.Status = false; - return ret; - } + // if (input.PrintType == PrintTypeEnum.正常打印) + // { + // if (input.BeginHostSN > input.EndHostSN) + // { + // ret.Message = "起大众顺序号不能大于止大众顺序号!"; + // ret.Status = false; + // return ret; + // } - ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- - List billLst = tempLst.Item; - if (tempLst.Status == false) - { - ret.Message = tempLst.Message; - ret.Status = false; - return ret; - } - if (billLst.Count > 24) - { - ret.Message = "打印柱护板单据的数量不能大于24!"; - ret.Status = false; - return ret; - } - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- + // List billLst = tempLst.Item; + // if (tempLst.Status == false) + // { + // ret.Message = tempLst.Message; + // ret.Status = false; + // return ret; + // } + // if (billLst.Count > 24) + // { + // ret.Message = "打印柱护板单据的数量不能大于24!"; + // ret.Status = false; + // return ret; + // } + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 - long maxBillNum = 0; //子方法内部赋值 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; + // long maxBillNum = 0; //子方法内部赋值 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - //A柱下,A中 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - //B柱上 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - //B柱下 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - - //后轮,上装饰板 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - - #region 调用库存接口 - //List forWMSLst = new List(); - //forWMSLst.AddRange(reportMainLst); - //forWMSLst.AddRange(acLstOnlyWMSUse); - CallWMSInterface_ZHB(forWMSLst); - #endregion - - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - } + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // //A柱下,A中 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // //B柱上 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // //B柱下 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + + // //后轮,上装饰板 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + + // #region 调用库存接口 + // //List forWMSLst = new List(); + // //forWMSLst.AddRange(reportMainLst); + // //forWMSLst.AddRange(acLstOnlyWMSUse); + // CallWMSInterface_ZHB(forWMSLst); + // #endregion + + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // } - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _billM100Repository.UpdateManyAsync(updLst, true); + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _billM100Repository.UpdateManyAsync(updLst, true); - } - else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 - { - if (input.DataResultType == "1") //全部11条数据 - { - var firObj = await _zhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => input.ReportIdList.Contains(itm.Id)); - if (firObj != null) - { - Guid? sortId = firObj.SortId; - reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true); - } - } - else - { - reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); - } + // } + // else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 + // { + // if (input.DataResultType == "1") //全部11条数据 + // { + // var firObj = await _zhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => input.ReportIdList.Contains(itm.Id)); + // if (firObj != null) + // { + // Guid? sortId = firObj.SortId; + // reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true); + // } + // } + // else + // { + // reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); + // } - //按大众顺序号排序 - foreach (var reportMainObj in reportMainLst) - { - List recLst = reportMainObj.Details; - if (recLst == null) - continue; - //bool has1999 = recLst.Any(itm => itm.HostSN.ToString().Contains("1999") || itm.HostSN.ToString().Contains("1998")); - //bool has0001 = recLst.Any(itm => itm.HostSN.ToString().Contains("0001") || itm.HostSN.ToString().Contains("0002")); - bool has1999 = recLst.Any(itm => (itm.HostSN % 10000) >= 1999 - 24); - bool has0001 = recLst.Any(itm => (itm.HostSN % 10000) <= 24); - if (has1999 && has0001) - { - reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN % 10000) <= 23 ? (itm.HostSN % 10000 + 1999) : (itm.HostSN % 10000)).ToList(); - } - else - { - reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); - } - } - } - else if (input.PrintType == PrintTypeEnum.补打) - { - if (input.M100IdList.Count > 24) - { - throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); - } + // //按大众顺序号排序 + // foreach (var reportMainObj in reportMainLst) + // { + // List recLst = reportMainObj.Details; + // if (recLst == null) + // continue; + // //bool has1999 = recLst.Any(itm => itm.HostSN.ToString().Contains("1999") || itm.HostSN.ToString().Contains("1998")); + // //bool has0001 = recLst.Any(itm => itm.HostSN.ToString().Contains("0001") || itm.HostSN.ToString().Contains("0002")); + // bool has1999 = recLst.Any(itm => (itm.HostSN % 10000) >= 1999 - 24); + // bool has0001 = recLst.Any(itm => (itm.HostSN % 10000) <= 24); + // if (has1999 && has0001) + // { + // reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN % 10000) <= 23 ? (itm.HostSN % 10000 + 1999) : (itm.HostSN % 10000)).ToList(); + // } + // else + // { + // reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); + // } + // } + // } + // else if (input.PrintType == PrintTypeEnum.补打) + // { + // if (input.M100IdList.Count > 24) + // { + // throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); + // } - List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); - if (billLst.Count == 0) - { - ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; - ret.Status = false; - return ret; - } - billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); + // List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); + // if (billLst.Count == 0) + // { + // ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; + // ret.Status = false; + // return ret; + // } + // billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 - long maxBillNum = 0; //全局唯一装箱单号 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; //右上角顺序号01-99 + // long maxBillNum = 0; //全局唯一装箱单号 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; //右上角顺序号01-99 - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - //A柱下,A中 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - //B柱上 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - //B柱下 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - - //后轮,上装饰板 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - - #region 调用库存接口 - //List forWMSLst = new List(); - //forWMSLst.AddRange(reportMainLst); - //forWMSLst.AddRange(acLstOnlyWMSUse); - CallWMSInterface_ZHB(forWMSLst); - #endregion + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // //A柱下,A中 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // //B柱上 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // //B柱下 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + + // //后轮,上装饰板 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + + // #region 调用库存接口 + // //List forWMSLst = new List(); + // //forWMSLst.AddRange(reportMainLst); + // //forWMSLst.AddRange(acLstOnlyWMSUse); + // CallWMSInterface_ZHB(forWMSLst); + // #endregion + + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // } - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - } + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _billM100Repository.UpdateManyAsync(updLst, true); + // } - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _billM100Repository.UpdateManyAsync(updLst, true); - } + // #region 返回结果格式转换 + // //实体 转 DTO + // List targetLst = ObjectMapper.Map, List>(reportMainLst); + // //补充空行 + // foreach (var masterObj in targetLst) + // { + // int trueCnt = masterObj.Details.Count; - #region 返回结果格式转换 - //实体 转 DTO - List targetLst = ObjectMapper.Map, List>(reportMainLst); - //补充空行 - foreach (var masterObj in targetLst) - { - int trueCnt = masterObj.Details.Count; + // int planCnt = 0; + // switch (masterObj.PartType) + // { + // case "A上C上": + // case "A柱下A中": + // case "B柱上": + // case "B柱下": + // case "后轮上装饰板": + // planCnt = 24; + // break; + // case "D柱": + // planCnt = 12; + // break; + // default: + // planCnt = 24; + // break; + // } + // if (trueCnt > planCnt) + // { + // throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); + // } + // int diffCnt = planCnt - trueCnt; + // for (int i = 0; i < diffCnt; i++) + // { + // ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); + // masterObj.Details.Add(dtlObj); + // } + // } + // //子表BillNum赋值, BillNum填充空格, SN赋值 + // foreach (var masterObj in targetLst) + // { + // masterObj.BillNum = GetTrueString(masterObj.BillNum); + // int sn = 1; + // foreach (var detailObj in masterObj.Details) + // { + // detailObj.BillNum = masterObj.BillNum; + // detailObj.KNR = GetTrueString(detailObj.KNR); + // detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); + // detailObj.sn = sn++; + // detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 + // //客户要求显示零件描述,替换之前的零件编码 + // detailObj.PartCode = detailObj.MaterialDescription; + // detailObj.PartCode2 = detailObj.MaterialDescription2; + // detailObj.MaterialDescription = null; + // detailObj.MaterialDescription2 = null; + // } + // } - int planCnt = 0; - switch (masterObj.PartType) - { - case "A上C上": - case "A柱下A中": - case "B柱上": - case "B柱下": - case "后轮上装饰板": - planCnt = 24; - break; - case "D柱": - planCnt = 12; - break; - default: - planCnt = 24; - break; - } - if (trueCnt > planCnt) - { - throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); - } - int diffCnt = planCnt - trueCnt; - for (int i = 0; i < diffCnt; i++) - { - ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); - masterObj.Details.Add(dtlObj); - } - } - //子表BillNum赋值, BillNum填充空格, SN赋值 - foreach (var masterObj in targetLst) - { - masterObj.BillNum = GetTrueString(masterObj.BillNum); - int sn = 1; - foreach (var detailObj in masterObj.Details) - { - detailObj.BillNum = masterObj.BillNum; - detailObj.KNR = GetTrueString(detailObj.KNR); - detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); - detailObj.sn = sn++; - detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 - //客户要求显示零件描述,替换之前的零件编码 - detailObj.PartCode = detailObj.MaterialDescription; - detailObj.PartCode2 = detailObj.MaterialDescription2; - detailObj.MaterialDescription = null; - detailObj.MaterialDescription2 = null; - } - } + // retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); + // if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; + // foreach (var masterObj in retObj.MasterList_AC) + // { + // retObj.DetailList_AC.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); - if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; - foreach (var masterObj in retObj.MasterList_AC) - { - retObj.DetailList_AC.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); + // if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; + // foreach (var masterObj in retObj.MasterList_AA) + // { + // retObj.DetailList_AA.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); - if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; - foreach (var masterObj in retObj.MasterList_AA) - { - retObj.DetailList_AA.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); + // if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; + // foreach (var masterObj in retObj.MasterList_BS) + // { + // retObj.DetailList_BS.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); - if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; - foreach (var masterObj in retObj.MasterList_BS) - { - retObj.DetailList_BS.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); + // if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; + // foreach (var masterObj in retObj.MasterList_BX) + // { + // retObj.DetailList_BX.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); - if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; - foreach (var masterObj in retObj.MasterList_BX) - { - retObj.DetailList_BX.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); + // if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; + // foreach (var masterObj in retObj.MasterList_D) + // { + // retObj.DetailList_D.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); - if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; - foreach (var masterObj in retObj.MasterList_D) - { - retObj.DetailList_D.AddRange(masterObj.Details); - masterObj.Details = null; - } - - retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); - if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; - foreach (var masterObj in retObj.MasterList_HL) - { - retObj.DetailList_HL.AddRange(masterObj.Details); - masterObj.Details = null; - } - #endregion - ret.Status = true; - return ret; - } - catch (Exception ex) - { - string errorMsg = _errorMessagePrefix + "PrintZhuHuBanPackingList 执行出错:" + ex.Message; - _logger.LogError(errorMsg); - throw new BusinessException("1001", errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; - } - } - - /// - /// 相同VIN的左右SortId相同,用于作废 - /// - /// - /// - //private void ModifySortId(List lst1, List lst2 = null) - //{ - // Guid sortId = GuidGenerator.Create(); - // foreach (var itm in lst1) - // { - // itm.SortId = sortId; - // } - // if (lst2 != null) - // { - // foreach (var itm in lst2) + // retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); + // if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; + // foreach (var masterObj in retObj.MasterList_HL) // { - // itm.SortId = sortId; + // retObj.DetailList_HL.AddRange(masterObj.Details); + // masterObj.Details = null; // } + // #endregion + // ret.Status = true; + // return ret; + // } + // catch (Exception ex) + // { + // string errorMsg = _errorMessagePrefix + "PrintZhuHuBanPackingList 执行出错:" + ex.Message; + // _logger.LogError(errorMsg); + // throw new BusinessException("1001", errorMsg); + // ret.Status = false; + // ret.Message = ex.Message; + // return ret; // } //} @@ -3064,56 +2920,56 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN /// /// 输入查询条件 /// 返回符合条件的排序分页列表 - [HttpGet] - [UnitOfWork(false)] - [Route("replenish-print-list")] - public virtual async Task> GetReplenishPrintListAsync(QueryBillM100Dto input) - { - _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintListAsync 进入"); - try - { - input.CanNotPrint = null; //忽略不能打印 - input.ZHBBillStatus = null; - input.BillStatus = BillStatusEnum.Match; //单据状态是已解析未打印 - input.IsNeedReplenishPrint = true; //只显示需要补打的记录 - PagedResultDto ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); - return ret; - } - catch (Exception ex) - { - string errMsg = _errorMessagePrefix + "GetReplenishPrintListAsync 执行出错:" + ex.Message; - _logger.LogError(errMsg); - return new PagedResultDto(0, new List()); - } - } + //[HttpGet] + //[UnitOfWork(false)] + //[Route("replenish-print-list")] + //public virtual async Task> GetReplenishPrintListAsync(QueryBillM100Dto input) + //{ + // _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintListAsync 进入"); + // try + // { + // input.CanNotPrint = null; //忽略不能打印 + // input.ZHBBillStatus = null; + // input.BillStatus = BillStatusEnum.Match; //单据状态是已解析未打印 + // input.IsNeedReplenishPrint = true; //只显示需要补打的记录 + // PagedResultDto ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); + // return ret; + // } + // catch (Exception ex) + // { + // string errMsg = _errorMessagePrefix + "GetReplenishPrintListAsync 执行出错:" + ex.Message; + // _logger.LogError(errMsg); + // return new PagedResultDto(0, new List()); + // } + //} /// /// 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) /// /// 输入查询条件 /// 返回符合条件的排序分页列表 - [HttpGet] - [UnitOfWork(false)] - [Route("replenish-print-zhb-list")] - public virtual async Task> GetReplenishPrintZHBListAsync(QueryBillM100Dto input) - { - _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintZHBListAsync 进入"); - try - { - input.CanNotPrint = null; //忽略不能打印 - input.BillStatus = null; - input.ZHBBillStatus = ZHBBillStatusEnum.NotPrint; //柱护板状态是已解析未打印 - input.IsNeedReplenishPrint = true; //只显示需要补打的记录 - PagedResultDto ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); - return ret; - } - catch (Exception ex) - { - string errMsg = _errorMessagePrefix + "GetReplenishPrintZHBListAsync 执行出错:" + ex.Message; - _logger.LogError(errMsg); - return new PagedResultDto(0, new List()); - } - } + //[HttpGet] + //[UnitOfWork(false)] + //[Route("replenish-print-zhb-list")] + //public virtual async Task> GetReplenishPrintZHBListAsync(QueryBillM100Dto input) + //{ + // _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintZHBListAsync 进入"); + // try + // { + // input.CanNotPrint = null; //忽略不能打印 + // input.BillStatus = null; + // input.ZHBBillStatus = ZHBBillStatusEnum.NotPrint; //柱护板状态是已解析未打印 + // input.IsNeedReplenishPrint = true; //只显示需要补打的记录 + // PagedResultDto ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); + // return ret; + // } + // catch (Exception ex) + // { + // string errMsg = _errorMessagePrefix + "GetReplenishPrintZHBListAsync 执行出错:" + ex.Message; + // _logger.LogError(errMsg); + // return new PagedResultDto(0, new List()); + // } + //} #endregion @@ -3395,7 +3251,7 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN public virtual async Task>> SaveMenBanReport(MenBanPrintInputDto input) { Stopwatch sw = new Stopwatch(); - sw.Start(); + _logger.LogDebug(_errorMessagePrefix + "SaveMenBanReport 进入"); List retLst = new List(); @@ -3427,60 +3283,48 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN ret.Status = false; return ret; } - sw.Stop(); + _logger.LogWarning($"SaveMenBanReport读取数据 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 - double maxBillNum = 0; + //double maxBillNum = 0; + + //DateTime printTime = ServerHelper.CurrentDateTime; - DateTime printTime = ServerHelper.CurrentDateTime; + var reportSortDic = _dicItemRepository + .Where(itm => itm.DicTypeCode == "零件大类" && itm.DicItemSort2 == input.ProductLine) + .ToList() + .GroupBy(itm => itm.DicItemSort4) + .ToDictionary(itm => itm.Key, it2 => it2.Select(itm => itm.DicItemCode).ToArray()); for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) { - //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 - double maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); - // 先打印两张:左后左前,再打印两张:右后右前 - List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); - List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); - - //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 - Guid sortId = GuidGenerator.Create(); - foreach (var leftItm in leftLst) - { - leftItm.SortId = sortId; - } - foreach (var rightItm in rightLst) + + foreach (var reportSortItem in reportSortDic) { - rightItm.SortId = sortId; - } + //生成顺序号:按生产线分组,取当前生产线的最大流水号:001至999往复循环 + double maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); - reportMainLst.AddRange(rightLst); - reportMainLst.AddRange(leftLst); + MenBanPackingList packingObj = DoMBPrint(input, pageIdx, maxSN, billLst, reportSortItem.Key, reportSortItem.Value); + reportMainLst.Add(packingObj); + } } - sw.Stop(); + _logger.LogWarning($"SaveMenBanReport转换数据 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + //插入门板打印记录表 await _menBanPackingListRepository.InsertManyAsync(reportMainLst, true); retLst.AddRange(reportMainLst.Select(itm => itm.Id)); - //foreach (var reportMainObj in reportMainLst) - //{ - // var insObj = await _menBanPackingListRepository.InsertAsync(reportMainObj, true); - // if (insObj != null) - // { - // retLst.Add(insObj.Id); - // } - //} - sw.Stop(); + _logger.LogWarning($"SaveMenBanReport插入门板打印记录表 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + //调用派格版库存接口 - await SaveMiddleTable_MB(reportMainLst); - sw.Stop(); + //await SaveMiddleTable_MB(reportMainLst); + _logger.LogWarning($"SaveMenBanReport插入中间表 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + //更新M100的门板打印标志:BillStatus=3 foreach (BillM100 billObj in billLst) @@ -3499,103 +3343,103 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN await _billM100Repository.UpdateAsync(billObj, true); } } - sw.Stop(); + _logger.LogWarning($"SaveMenBanReport更新M100的门板打印标志 - {sw.ElapsedMilliseconds}毫秒"); } - else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 - { - throw new BusinessException("请调用LoadMenBanReport方法!"); - } - else if (input.PrintType == PrintTypeEnum.补打) - { - List billLst = _billM100Repository.Where(itm => input.M100IdList.Contains(itm.Id)).OrderBy(itm => itm.SerialNumStr).ToList(); - if (billLst.Count == 0) - { - ret.Message = "没有补打的单据,请先选择要补打的单据!"; - ret.Status = false; - return ret; - } - - int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 - - double maxBillNum = 0; - - DateTime printTime = ServerHelper.CurrentDateTime; - - for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) - { - //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 - double maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); - // 先打印两张:左后左前,再打印两张:右后右前 - List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); - List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); - - //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 - Guid sortId = GuidGenerator.Create(); - foreach (var leftItm in leftLst) - { - leftItm.SortId = sortId; - } - foreach (var rightItm in rightLst) - { - rightItm.SortId = sortId; - } - - reportMainLst.AddRange(rightLst); - reportMainLst.AddRange(leftLst); - } - //校验底盘号、零件是否重复打印 - string checkVinPartRepeatSql = @" - select top 1 a.BillNum from FisMenBanPackingList a join FisMenBanPackingRec b - on a.Id = b.MenBanPackingListId - where a.ReportStatus = 0 - and b.VIN = '{0}' and (TopSAPMaterialNum = '{1}' or BelowSAPMaterialNum = '{1}') - "; - foreach (MenBanPackingList reportMainObj in reportMainLst) - { - foreach (MenBanPackingRec reportRecObj in reportMainObj.Details) - { - string sql1 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.TopSAPMaterialNum); - string checkVinPartRepeatBillNum1 = _newJitDapperRepository.GetSingleBySql(sql1, true); - if (string.IsNullOrEmpty(checkVinPartRepeatBillNum1) == false) - { - throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum1}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.TopSAPMaterialNum}之间重复!"); - } - - string sql2 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.BelowSAPMaterialNum); - string checkVinPartRepeatBillNum2 = _newJitDapperRepository.GetSingleBySql(sql2, true); - if (string.IsNullOrEmpty(checkVinPartRepeatBillNum2) == false) - { - throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum2}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.BelowSAPMaterialNum}之间重复!"); - } - } - } - - //调用派格版库存接口 - await SaveMiddleTable_MB(reportMainLst); - - //插入门板打印记录表 - //await _menBanPackingListRepository.InsertManyAsync(reportMainLst); - foreach (var reportMainObj in reportMainLst) - { - var insObj = await _menBanPackingListRepository.InsertAsync(reportMainObj, true); - if (insObj != null) - { - retLst.Add(insObj.Id); - } - } - //更新M100的门板打印标志:BillStatus=3 - foreach (BillM100 billObj in billLst) - { - if (billObj.BillStatus == BillStatusEnum.Match) - { - billObj.SetBillStatus(BillStatusEnum.Publish); - billObj.PrintTime = ServerHelper.CurrentDateTime; - await _billM100Repository.UpdateAsync(billObj); - } - } - } //补打if + //else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 + //{ + // throw new BusinessException("请调用LoadMenBanReport方法!"); + //} + //else if (input.PrintType == PrintTypeEnum.补打) + //{ + // List billLst = _billM100Repository.Where(itm => input.M100IdList.Contains(itm.Id)).OrderBy(itm => itm.SerialNumStr).ToList(); + // if (billLst.Count == 0) + // { + // ret.Message = "没有补打的单据,请先选择要补打的单据!"; + // ret.Status = false; + // return ret; + // } + + // int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 + + // double maxBillNum = 0; + + // DateTime printTime = ServerHelper.CurrentDateTime; + + // for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++) + // { + // //取右上角顺序号:按生产线分组,取当前生产线的最大流水号:01至99循环,例如01左、01右 + // double maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty); + // // 先打印两张:左后左前,再打印两张:右后右前 + // List leftLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "左"); + // List rightLst = DoMBPrint(input, pageIdx, ref maxBillNum, maxSN, printTime, billLst, "右"); + + // //作废时需要同时作废相同VIN的左右两页,SortId相同表示是同一组左右 + // Guid sortId = GuidGenerator.Create(); + // foreach (var leftItm in leftLst) + // { + // leftItm.SortId = sortId; + // } + // foreach (var rightItm in rightLst) + // { + // rightItm.SortId = sortId; + // } + + // reportMainLst.AddRange(rightLst); + // reportMainLst.AddRange(leftLst); + // } + // //校验底盘号、零件是否重复打印 + // string checkVinPartRepeatSql = @" + // select top 1 a.BillNum from FisMenBanPackingList a join FisMenBanPackingRec b + // on a.Id = b.MenBanPackingListId + // where a.ReportStatus = 0 + // and b.VIN = '{0}' and (TopSAPMaterialNum = '{1}' or BelowSAPMaterialNum = '{1}') + // "; + // foreach (MenBanPackingList reportMainObj in reportMainLst) + // { + // foreach (MenBanPackingRec reportRecObj in reportMainObj.Details) + // { + // string sql1 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.PartCode2); + // string checkVinPartRepeatBillNum1 = _newJitDapperRepository.GetSingleBySql(sql1, true); + // if (string.IsNullOrEmpty(checkVinPartRepeatBillNum1) == false) + // { + // throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum1}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.PartCode2}之间重复!"); + // } + + // string sql2 = string.Format(checkVinPartRepeatSql, reportRecObj.VIN, reportRecObj.PartCode4); + // string checkVinPartRepeatBillNum2 = _newJitDapperRepository.GetSingleBySql(sql2, true); + // if (string.IsNullOrEmpty(checkVinPartRepeatBillNum2) == false) + // { + // throw new BusinessException("1001", $"与装箱单号{checkVinPartRepeatBillNum2}中的底盘号{reportRecObj.VIN}、零件号{reportRecObj.PartCode4}之间重复!"); + // } + // } + // } + + // //调用派格版库存接口 + // await SaveMiddleTable_MB(reportMainLst); + + // //插入门板打印记录表 + // //await _menBanPackingListRepository.InsertManyAsync(reportMainLst); + // foreach (var reportMainObj in reportMainLst) + // { + // var insObj = await _menBanPackingListRepository.InsertAsync(reportMainObj, true); + // if (insObj != null) + // { + // retLst.Add(insObj.Id); + // } + // } + // //更新M100的门板打印标志:BillStatus=3 + // foreach (BillM100 billObj in billLst) + // { + // if (billObj.BillStatus == BillStatusEnum.Match) + // { + // billObj.SetBillStatus(BillStatusEnum.Publish); + // billObj.PrintTime = ServerHelper.CurrentDateTime; + // await _billM100Repository.UpdateAsync(billObj); + // } + // } + //} //补打if await uow.CompleteAsync(); ret.Status = true; ret.Item = retLst; @@ -3616,13 +3460,10 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN [UnitOfWork] [HttpPost] [Route("load-menban-report")] - public virtual async Task> LoadMenBanReport(List input) + public virtual async Task> LoadMenBanReport(List input) { _logger.LogDebug(_errorMessagePrefix + "LoadMenBanReport 进入"); - MenBanPrintResultDto retObj = new MenBanPrintResultDto(); - ObjectResultDto ret = new ObjectResultDto(retObj); - ret.Status = false; try { List reportMainLst = new List(); @@ -3668,22 +3509,6 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN List targetLst = ObjectMapper.Map, List>(reportMainLst); targetLst = targetLst.OrderBy(itm => itm.BillNum).ToList(); - //补充空行 - foreach (var masterObj in targetLst) - { - int trueCnt = masterObj.Details.Count; - int planCnt = 12; - if (trueCnt > planCnt) - { - throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); - } - int diffCnt = planCnt - trueCnt; - for (int i = 0; i < diffCnt; i++) - { - MenBanPackingRecDto dtlObj = new MenBanPackingRecDto(); - masterObj.Details.Add(dtlObj); - } - } //子表BillNum赋值, BillNum填充空格 foreach (var masterObj in targetLst) { @@ -3693,1571 +3518,1571 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN { detailObj.BillNum = masterObj.BillNum; detailObj.KNR = GetTrueString(detailObj.KNR); - detailObj.sn = sn++; + detailObj.SN = (sn++).ToString(); detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 } } - //返回结果格式转换 - foreach (var masterObj in targetLst) - { - foreach (var detailObj in masterObj.Details) - { - retObj.DetailList.Add(detailObj); - } - masterObj.Details = null; - retObj.MasterList.Add(masterObj); - } #endregion - ret.Status = true; - return ret; + return targetLst; } catch (Exception ex) { string errorMsg = _errorMessagePrefix + "LoadMenBanReport 执行出错:" + ex.Message; _logger.LogError(errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; + throw new UserFriendlyException(errorMsg); } } - - + private static string GetTrueString(string str) + { + return str == null ? " " : str.Trim(); ; + } /// /// 打印柱护板装箱单 /// /// /// 执行成功返回真 - [UnitOfWork] - [HttpPost] - [Route("print-group-zhuhuban-packing-list")] - public virtual async Task> PrintGroupZhuHuBanPackingList(ZhuHuBanPrintInputDto input) - { - ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); - ObjectResultDto ret = new ObjectResultDto(retObj); - ret.Status = false; - try - { - List reportMainLst = new List(); - List forWMSLst = new List(); + //[UnitOfWork] + //[HttpPost] + //[Route("print-group-zhuhuban-packing-list")] + //public virtual async Task> PrintGroupZhuHuBanPackingList(ZhuHuBanPrintInputDto input) + //{ + // throw new NotImplementedException(); + // ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); + // ObjectResultDto ret = new ObjectResultDto(retObj); + // ret.Status = false; + // try + // { + // List reportMainLst = new List(); + // List forWMSLst = new List(); - if (input.PrintType == PrintTypeEnum.正常打印) - { - if (input.BeginHostSN > input.EndHostSN) - { - ret.Message = "起大众顺序号不能大于止大众顺序号!"; - ret.Status = false; - return ret; - } - ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- - List billLst = tempLst.Item; - if (tempLst.Status == false) - { - ret.Message = tempLst.Message; - ret.Status = false; - return ret; - } - if (billLst.Count > 24) - { - ret.Message = "打印柱护板单据的数量不能大于24!"; - ret.Status = false; - return ret; - } - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // if (input.PrintType == PrintTypeEnum.正常打印) + // { + // if (input.BeginHostSN > input.EndHostSN) + // { + // ret.Message = "起大众顺序号不能大于止大众顺序号!"; + // ret.Status = false; + // return ret; + // } - long maxBillNum = 0; //子方法内部赋值 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; + // ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- + // List billLst = tempLst.Item; + // if (tempLst.Status == false) + // { + // ret.Message = tempLst.Message; + // ret.Status = false; + // return ret; + // } + // if (billLst.Count > 24) + // { + // ret.Message = "打印柱护板单据的数量不能大于24!"; + // ret.Status = false; + // return ret; + // } + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 - //获取当前打印柱护板的零件类型 - var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); - foreach (var partType in partTypes) - { - switch (partType.PartType) - { - case "A上C上": - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - break; - case "A柱下A中": - //A柱下,A中 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + // long maxBillNum = 0; //子方法内部赋值 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); + // //获取当前打印柱护板的零件类型 + // var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); + // foreach (var partType in partTypes) + // { + // switch (partType.PartType) + // { + // case "A上C上": + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // break; + // case "A柱下A中": + // //A柱下,A中 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + + // break; + // case "B柱上": + // //B柱上 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // break; + // case "B柱下": + // //B柱下 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // break; + // case "D柱": + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + // break; + // case "后轮上装饰板": + // //后轮,上装饰板 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + // break; + // } + // } - break; - case "B柱上": - //B柱上 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - break; - case "B柱下": - //B柱下 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - break; - case "D柱": - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - break; - case "后轮上装饰板": - //后轮,上装饰板 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - break; - } - } + // #region 调用库存接口 + // //List forWMSLst = new List(); + // //forWMSLst.AddRange(reportMainLst); + // //forWMSLst.AddRange(acLstOnlyWMSUse); + // CallWMSInterface_ZHB(forWMSLst); + // #endregion - #region 调用库存接口 - //List forWMSLst = new List(); - //forWMSLst.AddRange(reportMainLst); - //forWMSLst.AddRange(acLstOnlyWMSUse); - CallWMSInterface_ZHB(forWMSLst); - #endregion + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // } - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - } + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _billM100Repository.UpdateManyAsync(updLst, true); - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _billM100Repository.UpdateManyAsync(updLst, true); + // } + // else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 + // { + // if (input.DataResultType == "1") //全部11条数据 + // { + // var firObj = await _zhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => input.ReportIdList.Contains(itm.Id)); + // if (firObj != null) + // { + // Guid? sortId = firObj.SortId; + // reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true); + // } + // } + // else + // { + // reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); + // } - } - else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 - { - if (input.DataResultType == "1") //全部11条数据 - { - var firObj = await _zhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => input.ReportIdList.Contains(itm.Id)); - if (firObj != null) - { - Guid? sortId = firObj.SortId; - reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true); - } - } - else - { - reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); - } + // //按大众顺序号排序 + // foreach (var reportMainObj in reportMainLst) + // { + // List recLst = reportMainObj.Details; + // if (recLst == null) + // continue; + // //bool has1999 = recLst.Any(itm => itm.HostSN.ToString().Contains("1999") || itm.HostSN.ToString().Contains("1998")); + // //bool has0001 = recLst.Any(itm => itm.HostSN.ToString().Contains("0001") || itm.HostSN.ToString().Contains("0002")); + // bool has1999 = recLst.Any(itm => (itm.HostSN % 10000) >= 1977); + // bool has0001 = recLst.Any(itm => (itm.HostSN % 10000) <= 23); + // if (has1999 && has0001) + // { + // reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN % 10000) <= 23 ? (itm.HostSN % 10000 + 1999) : (itm.HostSN % 10000)).ToList(); + // } + // else + // { + // reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); + // } + // } + // } + // else if (input.PrintType == PrintTypeEnum.补打) + // { + // if (input.M100IdList.Count > 24) + // { + // throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); + // } - //按大众顺序号排序 - foreach (var reportMainObj in reportMainLst) - { - List recLst = reportMainObj.Details; - if (recLst == null) - continue; - //bool has1999 = recLst.Any(itm => itm.HostSN.ToString().Contains("1999") || itm.HostSN.ToString().Contains("1998")); - //bool has0001 = recLst.Any(itm => itm.HostSN.ToString().Contains("0001") || itm.HostSN.ToString().Contains("0002")); - bool has1999 = recLst.Any(itm => (itm.HostSN % 10000) >= 1977); - bool has0001 = recLst.Any(itm => (itm.HostSN % 10000) <= 23); - if (has1999 && has0001) - { - reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN % 10000) <= 23 ? (itm.HostSN % 10000 + 1999) : (itm.HostSN % 10000)).ToList(); - } - else - { - reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); - } - } - } - else if (input.PrintType == PrintTypeEnum.补打) - { - if (input.M100IdList.Count > 24) - { - throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); - } + // List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); + // if (billLst.Count == 0) + // { + // ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; + // ret.Status = false; + // return ret; + // } + // billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); - List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); - if (billLst.Count == 0) - { - ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; - ret.Status = false; - return ret; - } - billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // long maxBillNum = 0; //全局唯一装箱单号 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; //右上角顺序号01-99 - long maxBillNum = 0; //全局唯一装箱单号 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; //右上角顺序号01-99 + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // //A柱下,A中 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // //B柱上 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // //B柱下 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + + // //后轮,上装饰板 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + + // #region 调用库存接口 + // //List forWMSLst = new List(); + // //forWMSLst.AddRange(reportMainLst); + // //forWMSLst.AddRange(acLstOnlyWMSUse); + // CallWMSInterface_ZHB(forWMSLst); + // #endregion + + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // } - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - //A柱下,A中 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - //B柱上 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - //B柱下 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - - //后轮,上装饰板 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - - #region 调用库存接口 - //List forWMSLst = new List(); - //forWMSLst.AddRange(reportMainLst); - //forWMSLst.AddRange(acLstOnlyWMSUse); - CallWMSInterface_ZHB(forWMSLst); - #endregion + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _billM100Repository.UpdateManyAsync(updLst, true); + // } - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var ret22 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - } + // #region 返回结果格式转换 + // //实体 转 DTO + // List targetLst = ObjectMapper.Map, List>(reportMainLst); + // //补充空行 + // foreach (var masterObj in targetLst) + // { + // int trueCnt = masterObj.Details.Count; - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _billM100Repository.UpdateManyAsync(updLst, true); - } - - #region 返回结果格式转换 - //实体 转 DTO - List targetLst = ObjectMapper.Map, List>(reportMainLst); - //补充空行 - foreach (var masterObj in targetLst) - { - int trueCnt = masterObj.Details.Count; - - int planCnt = 0; - switch (masterObj.PartType) - { - case "A上C上": - case "A柱下A中": - case "B柱上": - case "B柱下": - case "后轮上装饰板": - planCnt = 24; - break; - case "D柱": - planCnt = 12; - break; - default: - planCnt = 24; - break; - } - if (trueCnt > planCnt) - { - throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); - } - int diffCnt = planCnt - trueCnt; - for (int i = 0; i < diffCnt; i++) - { - ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); - masterObj.Details.Add(dtlObj); - } - } - //子表BillNum赋值, BillNum填充空格, SN赋值 - foreach (var masterObj in targetLst) - { - masterObj.BillNum = GetTrueString(masterObj.BillNum); - int sn = 1; - foreach (var detailObj in masterObj.Details) - { - detailObj.BillNum = masterObj.BillNum; - detailObj.KNR = GetTrueString(detailObj.KNR); - detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); - detailObj.sn = sn++; - detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 - //客户要求显示零件描述,替换之前的零件编码 - detailObj.PartCode = detailObj.MaterialDescription; - detailObj.PartCode2 = detailObj.MaterialDescription2; - detailObj.MaterialDescription = null; - detailObj.MaterialDescription2 = null; - } - } + // int planCnt = 0; + // switch (masterObj.PartType) + // { + // case "A上C上": + // case "A柱下A中": + // case "B柱上": + // case "B柱下": + // case "后轮上装饰板": + // planCnt = 24; + // break; + // case "D柱": + // planCnt = 12; + // break; + // default: + // planCnt = 24; + // break; + // } + // if (trueCnt > planCnt) + // { + // throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); + // } + // int diffCnt = planCnt - trueCnt; + // for (int i = 0; i < diffCnt; i++) + // { + // ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); + // masterObj.Details.Add(dtlObj); + // } + // } + // //子表BillNum赋值, BillNum填充空格, SN赋值 + // foreach (var masterObj in targetLst) + // { + // masterObj.BillNum = GetTrueString(masterObj.BillNum); + // int sn = 1; + // foreach (var detailObj in masterObj.Details) + // { + // detailObj.BillNum = masterObj.BillNum; + // detailObj.KNR = GetTrueString(detailObj.KNR); + // detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); + // detailObj.sn = sn++; + // detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 + // //客户要求显示零件描述,替换之前的零件编码 + // detailObj.PartCode = detailObj.MaterialDescription; + // detailObj.PartCode2 = detailObj.MaterialDescription2; + // detailObj.MaterialDescription = null; + // detailObj.MaterialDescription2 = null; + // } + // } - retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); - if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; - foreach (var masterObj in retObj.MasterList_AC) - { - retObj.DetailList_AC.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); + // if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; + // foreach (var masterObj in retObj.MasterList_AC) + // { + // retObj.DetailList_AC.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); - if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; - foreach (var masterObj in retObj.MasterList_AA) - { - retObj.DetailList_AA.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); + // if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; + // foreach (var masterObj in retObj.MasterList_AA) + // { + // retObj.DetailList_AA.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); - if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; - foreach (var masterObj in retObj.MasterList_BS) - { - retObj.DetailList_BS.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); + // if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; + // foreach (var masterObj in retObj.MasterList_BS) + // { + // retObj.DetailList_BS.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); - if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; - foreach (var masterObj in retObj.MasterList_BX) - { - retObj.DetailList_BX.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); + // if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; + // foreach (var masterObj in retObj.MasterList_BX) + // { + // retObj.DetailList_BX.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); - if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; - foreach (var masterObj in retObj.MasterList_D) - { - retObj.DetailList_D.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); + // if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; + // foreach (var masterObj in retObj.MasterList_D) + // { + // retObj.DetailList_D.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); - if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; - foreach (var masterObj in retObj.MasterList_HL) - { - retObj.DetailList_HL.AddRange(masterObj.Details); - masterObj.Details = null; - } - #endregion - ret.Status = true; - return ret; - } - catch (Exception ex) - { - string errorMsg = _errorMessagePrefix + "PrintZhuHuBanPackingList 执行出错:" + ex.Message; - _logger.LogError(errorMsg); - throw new BusinessException("1001", errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; - } - } + // retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); + // if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; + // foreach (var masterObj in retObj.MasterList_HL) + // { + // retObj.DetailList_HL.AddRange(masterObj.Details); + // masterObj.Details = null; + // } + // #endregion + // ret.Status = true; + // return ret; + // } + // catch (Exception ex) + // { + // string errorMsg = _errorMessagePrefix + "PrintZhuHuBanPackingList 执行出错:" + ex.Message; + // _logger.LogError(errorMsg); + // throw new BusinessException("1001", errorMsg); + // ret.Status = false; + // ret.Message = ex.Message; + // return ret; + // } + //} /// /// 保存柱护板装箱单报表 /// - [UnitOfWork] - [HttpPost] - [Route("save-group-zhuhuban-report")] - public virtual async Task>> SaveGroupZhuHuBanReport(ZhuHuBanPrintInputDto input) - { - _logger.LogDebug(_errorMessagePrefix + "SaveGroupZhuHuBanReport 进入"); + //[UnitOfWork] + //[HttpPost] + //[Route("save-group-zhuhuban-report")] + //public virtual async Task>> SaveGroupZhuHuBanReport(ZhuHuBanPrintInputDto input) + //{ + // throw new NotImplementedException(); - List retLst = new List(); - ObjectResultDto> ret = new ObjectResultDto>(); - ret.Status = false; - using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified )) - { - try - { - List reportMainLst = new List(); - List forWMSLst = new List(); + // _logger.LogDebug(_errorMessagePrefix + "SaveGroupZhuHuBanReport 进入"); - if (input.PrintType == PrintTypeEnum.正常打印) - { - if (input.BeginHostSN > input.EndHostSN) - { - ret.Message = "起大众顺序号不能大于止大众顺序号!"; - ret.Status = false; - return ret; - } + // List retLst = new List(); + // ObjectResultDto> ret = new ObjectResultDto>(); + // ret.Status = false; + // using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified )) + // { + // try + // { + // List reportMainLst = new List(); + // List forWMSLst = new List(); - ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- - List billLst = tempLst.Item; - if (tempLst.Status == false) - { - ret.Message = tempLst.Message; - ret.Status = false; - return ret; - } - if (billLst.Count > 24) - { - ret.Message = "打印柱护板单据的数量不能大于24!"; - ret.Status = false; - return ret; - } - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // if (input.PrintType == PrintTypeEnum.正常打印) + // { + // if (input.BeginHostSN > input.EndHostSN) + // { + // ret.Message = "起大众顺序号不能大于止大众顺序号!"; + // ret.Status = false; + // return ret; + // } - long maxBillNum = 0; //子方法内部赋值 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; + // ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- + // List billLst = tempLst.Item; + // if (tempLst.Status == false) + // { + // ret.Message = tempLst.Message; + // ret.Status = false; + // return ret; + // } + // if (billLst.Count > 24) + // { + // ret.Message = "打印柱护板单据的数量不能大于24!"; + // ret.Status = false; + // return ret; + // } + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // long maxBillNum = 0; //子方法内部赋值 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; - - //获取当前打印柱护板的零件类型 - var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); - foreach (var partType in partTypes) - { - switch (partType.PartType) - { - case "A上C上": - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - break; - case "A柱下A中": - //A柱下,A中 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - break; - case "B柱上": - //B柱上 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - break; - case "B柱下": - //B柱下 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - break; - case "D柱": - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - break; - case "后轮上装饰板": - //后轮,上装饰板 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - break; - } - } - #region 调用库存接口 - await SaveMiddleTable_ZHB(forWMSLst); - #endregion - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - if (insObj2 != null) - { - retLst.Add(insObj2.Id); - } - } - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - List list = new List(); - foreach (var updObj in updLst) - { - ZHBPrintStatus item = new ZHBPrintStatus( - GuidGenerator.Create(), - updObj.VIN, - input.GroupName, - 1 - ); - list.Add(item); - - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _zHBPrintStatusRepository.InsertManyAsync(list);//柱护板插入状态 - await _billM100Repository.UpdateManyAsync(updLst, true); - } - else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 - { - throw new BusinessException("请调用LoadZhuHuBanReport方法!"); - } - else if (input.PrintType == PrintTypeEnum.补打) - { - if (input.M100IdList.Count > 24) - { - throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); - } + // //获取当前打印柱护板的零件类型 + // var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); + // foreach (var partType in partTypes) + // { + // switch (partType.PartType) + // { + // case "A上C上": + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // break; + // case "A柱下A中": + // //A柱下,A中 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // break; + // case "B柱上": + // //B柱上 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // break; + // case "B柱下": + // //B柱下 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // break; + // case "D柱": + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + // break; + // case "后轮上装饰板": + // //后轮,上装饰板 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + // break; + // } + // } + // #region 调用库存接口 + // await SaveMiddleTable_ZHB(forWMSLst); + // #endregion - List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); - if (billLst.Count == 0) - { - ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; - ret.Status = false; - return ret; - } - billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // if (insObj2 != null) + // { + // retLst.Add(insObj2.Id); + // } + // } - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // List list = new List(); + // foreach (var updObj in updLst) + // { + // ZHBPrintStatus item = new ZHBPrintStatus( + // GuidGenerator.Create(), + // updObj.VIN, + // input.GroupName, + // 1 + // ); + // list.Add(item); + + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _zHBPrintStatusRepository.InsertManyAsync(list);//柱护板插入状态 + // await _billM100Repository.UpdateManyAsync(updLst, true); + // } + // else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 + // { + // throw new BusinessException("请调用LoadZhuHuBanReport方法!"); + // } + // else if (input.PrintType == PrintTypeEnum.补打) + // { + // if (input.M100IdList.Count > 24) + // { + // throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); + // } - long maxBillNum = 0; //全局唯一装箱单号 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; //右上角顺序号01-99 + // List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); + // if (billLst.Count == 0) + // { + // ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; + // ret.Status = false; + // return ret; + // } + // billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); - //获取当前打印柱护板的零件类型 - var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); - foreach (var partType in partTypes) - { - switch (partType.PartType) - { - case "A上C上": - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - break; - case "A柱下A中": - //A柱下,A中 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - break; - case "B柱上": - - //B柱上 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - break; - case "B柱下": - //B柱下 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - break; - case "D柱": - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - - break; - case "后轮上装饰板": - //后轮,上装饰板 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - - break; - } - } - #region 调用库存接口 - await SaveMiddleTable_ZHB(forWMSLst); - #endregion + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - if (insObj2 != null) - { - retLst.Add(insObj2.Id); - } - } + // long maxBillNum = 0; //全局唯一装箱单号 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; //右上角顺序号01-99 - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _billM100Repository.UpdateManyAsync(updLst, true); - } //补打if + // //获取当前打印柱护板的零件类型 + // var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); + // foreach (var partType in partTypes) + // { + // switch (partType.PartType) + // { + // case "A上C上": + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // break; + // case "A柱下A中": + // //A柱下,A中 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // break; + // case "B柱上": + + // //B柱上 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // break; + // case "B柱下": + // //B柱下 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // break; + // case "D柱": + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + + // break; + // case "后轮上装饰板": + // //后轮,上装饰板 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + + // break; + // } + // } + // #region 调用库存接口 + // await SaveMiddleTable_ZHB(forWMSLst); + // #endregion - await uow.CompleteAsync(); - ret.Status = true; - ret.Item = retLst; - return ret; - } - catch (Exception ex) - { - await uow.RollbackAsync(); - string errorMsg = _errorMessagePrefix + "SaveGroupZhuHuBanReport 执行出错:" + ex.Message; - _logger.LogError(errorMsg); - //throw new BusinessException("1001", errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; - } + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // if (insObj2 != null) + // { + // retLst.Add(insObj2.Id); + // } + // } - } //事务 - } + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _billM100Repository.UpdateManyAsync(updLst, true); + // } //补打if + + // await uow.CompleteAsync(); + // ret.Status = true; + // ret.Item = retLst; + // return ret; + // } + // catch (Exception ex) + // { + // await uow.RollbackAsync(); + // string errorMsg = _errorMessagePrefix + "SaveGroupZhuHuBanReport 执行出错:" + ex.Message; + // _logger.LogError(errorMsg); + // //throw new BusinessException("1001", errorMsg); + // ret.Status = false; + // ret.Message = ex.Message; + // return ret; + // } + // } //事务 + //} /// /// 保存柱护板装箱单报表 /// - [UnitOfWork(IsDisabled = true)] - [HttpPost] - [Route("save-zhuhuban-report")] - public virtual async Task>> SaveZhuHuBanReport(ZhuHuBanPrintInputDto input) - { - Stopwatch sw = new Stopwatch(); - sw.Start(); - _logger.LogDebug(_errorMessagePrefix + "SaveZhuHuBanReport 进入"); - List retLst = new List(); - ObjectResultDto> ret = new ObjectResultDto>(); - ret.Status = false; - using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified)) - { - try - { - List reportMainLst = new List(); - List forWMSLst = new List(); + //[UnitOfWork(IsDisabled = true)] + //[HttpPost] + //[Route("save-zhuhuban-report")] + //public virtual async Task>> SaveZhuHuBanReport(ZhuHuBanPrintInputDto input) + //{ + // throw new NotImplementedException(); + // Stopwatch sw = new Stopwatch(); + + // _logger.LogDebug(_errorMessagePrefix + "SaveZhuHuBanReport 进入"); + // List retLst = new List(); + // ObjectResultDto> ret = new ObjectResultDto>(); + // ret.Status = false; + // using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified)) + // { + // try + // { + // List reportMainLst = new List(); + // List forWMSLst = new List(); - if (input.PrintType == PrintTypeEnum.正常打印) - { - if (input.BeginHostSN > input.EndHostSN) - { - ret.Message = "起大众顺序号不能大于止大众顺序号!"; - ret.Status = false; - return ret; - } + // if (input.PrintType == PrintTypeEnum.正常打印) + // { + // if (input.BeginHostSN > input.EndHostSN) + // { + // ret.Message = "起大众顺序号不能大于止大众顺序号!"; + // ret.Status = false; + // return ret; + // } - ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- - List billLst = tempLst.Item; - if (tempLst.Status == false) - { - ret.Message = tempLst.Message; - ret.Status = false; - return ret; - } - if (billLst.Count > 24) - { - ret.Message = "打印柱护板单据的数量不能大于24!"; - ret.Status = false; - return ret; - } - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- + // List billLst = tempLst.Item; + // if (tempLst.Status == false) + // { + // ret.Message = tempLst.Message; + // ret.Status = false; + // return ret; + // } + // if (billLst.Count > 24) + // { + // ret.Message = "打印柱护板单据的数量不能大于24!"; + // ret.Status = false; + // return ret; + // } + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport 加载缓存 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + // _logger.LogWarning($"SaveZhuHuBanReport 加载缓存 - {sw.ElapsedMilliseconds}毫秒"); - long maxBillNum = 0; //子方法内部赋值 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); //插入序列表、并返回序列 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport 转换A上C上 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); - - - //A柱下,A中 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - //B柱上 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - //B柱下 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - - //后轮,上装饰板 - maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport 转换除A上C上的其它 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); - - - #region 调用库存接口 - await SaveMiddleTable_ZHB(forWMSLst); - #endregion - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport 保存中间库 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + // long maxBillNum = 0; //子方法内部赋值 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); //插入序列表、并返回序列 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - //var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - //if (insObj2 != null) - //{ - // retLst.Add(insObj2.Id); - //} - retLst.Add(srcObj2.Id); - } - await _zhuHuBanPackingListRepository.InsertManyAsync(reportMainLst); - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport 插入柱护板打印记录表 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + // _logger.LogWarning($"SaveZhuHuBanReport 转换A上C上 - {sw.ElapsedMilliseconds}毫秒"); - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - //await _billM100Repository.UpdateManyAsync(updLst, true); - await _billM100Repository.UpdateManyAsync(updLst); - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport 更新M100的柱护板打印标志 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); - } - else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 - { - throw new BusinessException("请调用LoadZhuHuBanReport方法!"); - } - else if (input.PrintType == PrintTypeEnum.补打) - { - if (input.M100IdList.Count > 24) - { - throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); - } + // //A柱下,A中 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); - if (billLst.Count == 0) - { - ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; - ret.Status = false; - return ret; - } - billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // //B柱上 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // //B柱下 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - //加载柱护板缓存列表 - _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); //左用于打印 + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); //左右用于库存接口 - long maxBillNum = 0; //全局唯一装箱单号 - DateTime printTime = ServerHelper.CurrentDateTime; - double maxSN; //右上角顺序号01-99 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); - //A上C上 - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); - List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 - if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) - { - acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 - } - reportMainLst.AddRange(acLst); - forWMSLst.AddRange(acLstOnlyWMSUse); - //A柱下,A中 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); - - List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); - List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(aaLst1); - reportMainLst.AddRange(aaLst2); - forWMSLst.AddRange(aaLst1); - forWMSLst.AddRange(aaLst2); - //B柱上 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); - List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bUpLst1); - reportMainLst.AddRange(bUpLst2); - forWMSLst.AddRange(bUpLst1); - forWMSLst.AddRange(bUpLst2); - //B柱下 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); - - List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); - List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(bDownLst1); - reportMainLst.AddRange(bDownLst2); - forWMSLst.AddRange(bDownLst1); - forWMSLst.AddRange(bDownLst2); - //D柱 - var lst1 = billLst.Take(12).ToList(); - var lst2 = billLst.Skip(12).ToList(); - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); - List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); - - maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); - List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); - List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); - reportMainLst.AddRange(dLst1); - reportMainLst.AddRange(dLst2); - forWMSLst.AddRange(forWMSLst1); - forWMSLst.AddRange(forWMSLst2); - - //后轮,上装饰板 - maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); - List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); - List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); - reportMainLst.AddRange(hsLst1); - reportMainLst.AddRange(hsLst2); - forWMSLst.AddRange(hsLst1); - forWMSLst.AddRange(hsLst2); - - #region 调用库存接口 - await SaveMiddleTable_ZHB(forWMSLst); - #endregion + // //后轮,上装饰板 + // maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); - //插入柱护板打印记录表 - Guid sortId = GuidGenerator.Create(); - foreach (var srcObj2 in reportMainLst) - { - srcObj2.SortId = sortId; //一次打印SortId相同 - var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); - if (insObj2 != null) - { - retLst.Add(insObj2.Id); - } - } - ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 - var updIdLst = billLst.Select(itm => itm.Id).ToList(); - var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); - foreach (var updObj in updLst) - { - updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" - updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 - } - await _billM100Repository.UpdateManyAsync(updLst, true); - } //补打if + // _logger.LogWarning($"SaveZhuHuBanReport 转换除A上C上的其它 - {sw.ElapsedMilliseconds}毫秒"); - await uow.CompleteAsync(); - sw.Stop(); - _logger.LogWarning($"SaveZhuHuBanReport CompleteAsync - {sw.ElapsedMilliseconds}毫秒"); - ret.Status = true; - ret.Item = retLst; - return ret; - } - catch (Exception ex) - { - await uow.RollbackAsync(); - string errorMsg = _errorMessagePrefix + "SaveZhuHuBanReport 执行出错:" + ex.Message; - _logger.LogError(errorMsg); - //throw new BusinessException("1001", errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; - } - } //事务 - } + // #region 调用库存接口 + // await SaveMiddleTable_ZHB(forWMSLst); + // #endregion + + + // _logger.LogWarning($"SaveZhuHuBanReport 保存中间库 - {sw.ElapsedMilliseconds}毫秒"); + + + + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // //var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // //if (insObj2 != null) + // //{ + // // retLst.Add(insObj2.Id); + // //} + // retLst.Add(srcObj2.Id); + // } + // await _zhuHuBanPackingListRepository.InsertManyAsync(reportMainLst); + + + // _logger.LogWarning($"SaveZhuHuBanReport 插入柱护板打印记录表 - {sw.ElapsedMilliseconds}毫秒"); + + + + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // //await _billM100Repository.UpdateManyAsync(updLst, true); + // await _billM100Repository.UpdateManyAsync(updLst); + + + // _logger.LogWarning($"SaveZhuHuBanReport 更新M100的柱护板打印标志 - {sw.ElapsedMilliseconds}毫秒"); + + // } + // else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据 + // { + // throw new BusinessException("请调用LoadZhuHuBanReport方法!"); + // } + // else if (input.PrintType == PrintTypeEnum.补打) + // { + // if (input.M100IdList.Count > 24) + // { + // throw new BusinessException("1001", $"选中的柱护板补打不能超过24个底盘!"); + // } + + // List billLst = _billM100Repository.GetListAsync(itm => input.M100IdList.Contains(itm.Id), true).GetAwaiter().GetResult(); + // if (billLst.Count == 0) + // { + // ret.Message = "没有补打的柱护板,请先选择要补打的柱护板!"; + // ret.Status = false; + // return ret; + // } + // billLst = billLst.OrderBy(itm => itm.SerialNumStr).ToList(); + + // //加载柱护板缓存列表 + // _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + + // long maxBillNum = 0; //全局唯一装箱单号 + // DateTime printTime = ServerHelper.CurrentDateTime; + // double maxSN; //右上角顺序号01-99 + + // //A上C上 + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A上C上"); + // List acLst = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List acLstOnlyWMSUse = DoZHBPrint_3x8_LRMerge("A上C上", input, maxBillNum, maxSN, printTime, billLst, "右"); //仅库存系统接口使用,打印记录表不保存 + // if (acLstOnlyWMSUse.Count > 0 && acLst.Count > 0) + // { + // acLstOnlyWMSUse[0].Details.InsertRange(0, acLst[0].Details); //右插入左 + // } + // reportMainLst.AddRange(acLst); + // forWMSLst.AddRange(acLstOnlyWMSUse); + // //A柱下,A中 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "A柱下A中"); + + // List aaLst1 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List aaLst2 = DoZHBPrint_3x8_LR("A柱下A中", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(aaLst1); + // reportMainLst.AddRange(aaLst2); + // forWMSLst.AddRange(aaLst1); + // forWMSLst.AddRange(aaLst2); + // //B柱上 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱上"); + // List bUpLst1 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bUpLst2 = DoZHBPrint_4x6_LR("B柱上", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bUpLst1); + // reportMainLst.AddRange(bUpLst2); + // forWMSLst.AddRange(bUpLst1); + // forWMSLst.AddRange(bUpLst2); + // //B柱下 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "B柱下"); + + // List bDownLst1 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List bDownLst2 = DoZHBPrint_4x6_LR("B柱下", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(bDownLst1); + // reportMainLst.AddRange(bDownLst2); + // forWMSLst.AddRange(bDownLst1); + // forWMSLst.AddRange(bDownLst2); + // //D柱 + // var lst1 = billLst.Take(12).ToList(); + // var lst2 = billLst.Skip(12).ToList(); + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1, "左"); + // List forWMSLst1 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst1); + + // maxBillNum = _sequenceDomainService.GetSequence(SequenceTypeEnum.门板及柱护板装箱单号); + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "D柱"); + // List dLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2, "左"); + // List forWMSLst2 = DoZHBPrint_4x3("D柱", input, maxBillNum, maxSN, printTime, lst2); + // reportMainLst.AddRange(dLst1); + // reportMainLst.AddRange(dLst2); + // forWMSLst.AddRange(forWMSLst1); + // forWMSLst.AddRange(forWMSLst2); + + // //后轮,上装饰板 + // maxSN = 0; // await _lineSNDomianService.GetMaxSN(ProductTypeEnum.柱护板, input.ProductLine, "后轮上装饰板"); + // List hsLst1 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "左"); + // List hsLst2 = DoZHBPrint_4x6_LR("后轮上装饰板", input, maxBillNum, maxSN, printTime, billLst, "右"); + // reportMainLst.AddRange(hsLst1); + // reportMainLst.AddRange(hsLst2); + // forWMSLst.AddRange(hsLst1); + // forWMSLst.AddRange(hsLst2); + + // #region 调用库存接口 + // await SaveMiddleTable_ZHB(forWMSLst); + // #endregion + + // //插入柱护板打印记录表 + // Guid sortId = GuidGenerator.Create(); + // foreach (var srcObj2 in reportMainLst) + // { + // srcObj2.SortId = sortId; //一次打印SortId相同 + // var insObj2 = await _zhuHuBanPackingListRepository.InsertAsync(srcObj2, true); + // if (insObj2 != null) + // { + // retLst.Add(insObj2.Id); + // } + // } + + // ////更新M100的柱护板打印标志: PrintBillNum不为空时表示已打印 + // var updIdLst = billLst.Select(itm => itm.Id).ToList(); + // var updLst = await _billM100Repository.GetListAsync(itm => updIdLst.Contains(itm.Id)); + // foreach (var updObj in updLst) + // { + // updObj.SetZHBBillStatus(ZHBBillStatusEnum.Print); //PrintBillNum = "柱护板已打印" + // updObj.PrintTime2 = ServerHelper.CurrentDateTime; //PrintTime只适用于门板 + // } + // await _billM100Repository.UpdateManyAsync(updLst, true); + // } //补打if + + // await uow.CompleteAsync(); + + // _logger.LogWarning($"SaveZhuHuBanReport CompleteAsync - {sw.ElapsedMilliseconds}毫秒"); + + // ret.Status = true; + // ret.Item = retLst; + // return ret; + // } + // catch (Exception ex) + // { + // await uow.RollbackAsync(); + // string errorMsg = _errorMessagePrefix + "SaveZhuHuBanReport 执行出错:" + ex.Message; + // _logger.LogError(errorMsg); + // //throw new BusinessException("1001", errorMsg); + // ret.Status = false; + // ret.Message = ex.Message; + // return ret; + // } + // } //事务 + //} /// /// 加载柱护板装箱单报表【仅ReportIdList、DataResultType参数有效】 /// - [UnitOfWork] - [HttpPost] - [Route("load-zhuhuban-report")] - public virtual async Task> LoadZhuHuBanReport(ZhuHuBanPrintInputDto input) - { - Stopwatch sw = new Stopwatch(); - sw.Start(); + //[UnitOfWork] + //[HttpPost] + //[Route("load-zhuhuban-report")] + //public virtual async Task> LoadZhuHuBanReport(ZhuHuBanPrintInputDto input) + //{ + // throw new NotImplementedException(); - _logger.LogDebug(_errorMessagePrefix + "LoadZhuHuBanReport 进入"); + // Stopwatch sw = new Stopwatch(); - ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); - ObjectResultDto ret = new ObjectResultDto(retObj); - ret.Status = false; - try - { - List reportMainLst = new List(); - List forWMSLst = new List(); - if (input.DataResultType == "1") //全部11条数据 - { - var firObj = await _zhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => input.ReportIdList.Contains(itm.Id)); - if (firObj != null) - { - Guid? sortId = firObj.SortId; - reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true); - } - } - else - { - reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); - } + // _logger.LogDebug(_errorMessagePrefix + "LoadZhuHuBanReport 进入"); - sw.Stop(); - _logger.LogWarning($"LoadZhuHuBanReport 取柱护板数据 - {sw.ElapsedMilliseconds}毫秒"); - sw.Start(); + // ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); + // ObjectResultDto ret = new ObjectResultDto(retObj); + // ret.Status = false; + // try + // { + // List reportMainLst = new List(); + // List forWMSLst = new List(); - //按大众顺序号排序 - foreach (var reportMainObj in reportMainLst) - { - List recLst = reportMainObj.Details; - if (recLst == null) - continue; - //bool has1999 = recLst.Any(itm => itm.HostSN.ToString().Contains("1999") || itm.HostSN.ToString().Contains("1998")); - //bool has0001 = recLst.Any(itm => itm.HostSN.ToString().Contains("0001") || itm.HostSN.ToString().Contains("0002")); - bool has1999 = recLst.Any(itm => (itm.HostSN % 10000) > 1999 - 240); - bool has0001 = recLst.Any(itm => (itm.HostSN % 10000) < 240); - if (has1999 && has0001) - { - reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN % 10000) < 240 ? (itm.HostSN % 10000 + 1999) : (itm.HostSN % 10000)).ToList(); - } - else - { - reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); - } - } + // if (input.DataResultType == "1") //全部11条数据 + // { + // var firObj = await _zhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => input.ReportIdList.Contains(itm.Id)); + // if (firObj != null) + // { + // Guid? sortId = firObj.SortId; + // reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true); + // } + // } + // else + // { + // reportMainLst = await _zhuHuBanPackingListRepository.GetListAsync(itm => input.ReportIdList.Contains(itm.Id), true); + // } - #region 返回结果格式转换 - //实体 转 DTO - List targetLst = ObjectMapper.Map, List>(reportMainLst); - //补充空行 - foreach (var masterObj in targetLst) - { - int trueCnt = masterObj.Details.Count; - int planCnt = 0; - switch (masterObj.PartType) - { - case "A上C上": - case "A柱下A中": - case "B柱上": - case "B柱下": - case "后轮上装饰板": - planCnt = 24; - break; - case "D柱": - planCnt = 12; - break; - default: - planCnt = 24; - break; - } - if (trueCnt > planCnt) - { - throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); - } - int diffCnt = planCnt - trueCnt; - for (int i = 0; i < diffCnt; i++) - { - ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); - masterObj.Details.Add(dtlObj); - } - } - //子表BillNum赋值, BillNum填充空格, SN赋值 - foreach (var masterObj in targetLst) - { - masterObj.BillNum = GetTrueString(masterObj.BillNum); - int sn = 1; - foreach (var detailObj in masterObj.Details) - { - detailObj.BillNum = masterObj.BillNum; - detailObj.KNR = GetTrueString(detailObj.KNR); - detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); - detailObj.sn = sn++; - detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 - //客户要求显示零件描述,替换之前的零件编码 - detailObj.PartCode = detailObj.MaterialDescription; - detailObj.PartCode2 = detailObj.MaterialDescription2; - detailObj.MaterialDescription = null; - detailObj.MaterialDescription2 = null; - } - } + // _logger.LogWarning($"LoadZhuHuBanReport 取柱护板数据 - {sw.ElapsedMilliseconds}毫秒"); - retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); - if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; - foreach (var masterObj in retObj.MasterList_AC) - { - retObj.DetailList_AC.AddRange(masterObj.Details); - masterObj.Details = null; - } - retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); - if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; - foreach (var masterObj in retObj.MasterList_AA) - { - retObj.DetailList_AA.AddRange(masterObj.Details); - masterObj.Details = null; - } + // //按大众顺序号排序 + // foreach (var reportMainObj in reportMainLst) + // { + // List recLst = reportMainObj.Details; + // if (recLst == null) + // continue; + // //bool has1999 = recLst.Any(itm => itm.HostSN.ToString().Contains("1999") || itm.HostSN.ToString().Contains("1998")); + // //bool has0001 = recLst.Any(itm => itm.HostSN.ToString().Contains("0001") || itm.HostSN.ToString().Contains("0002")); + // bool has1999 = recLst.Any(itm => (itm.HostSN % 10000) > 1999 - 240); + // bool has0001 = recLst.Any(itm => (itm.HostSN % 10000) < 240); + // if (has1999 && has0001) + // { + // reportMainObj.Details = recLst.OrderBy(itm => (itm.HostSN % 10000) < 240 ? (itm.HostSN % 10000 + 1999) : (itm.HostSN % 10000)).ToList(); + // } + // else + // { + // reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN).ToList(); + // } + // } - retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); - if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; - foreach (var masterObj in retObj.MasterList_BS) - { - retObj.DetailList_BS.AddRange(masterObj.Details); - masterObj.Details = null; - } + // #region 返回结果格式转换 + // //实体 转 DTO + // List targetLst = ObjectMapper.Map, List>(reportMainLst); + // //补充空行 + // foreach (var masterObj in targetLst) + // { + // int trueCnt = masterObj.Details.Count; - retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); - if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; - foreach (var masterObj in retObj.MasterList_BX) - { - retObj.DetailList_BX.AddRange(masterObj.Details); - masterObj.Details = null; - } + // int planCnt = 0; + // switch (masterObj.PartType) + // { + // case "A上C上": + // case "A柱下A中": + // case "B柱上": + // case "B柱下": + // case "后轮上装饰板": + // planCnt = 24; + // break; + // case "D柱": + // planCnt = 12; + // break; + // default: + // planCnt = 24; + // break; + // } + // if (trueCnt > planCnt) + // { + // throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); + // } + // int diffCnt = planCnt - trueCnt; + // for (int i = 0; i < diffCnt; i++) + // { + // ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); + // masterObj.Details.Add(dtlObj); + // } + // } + // //子表BillNum赋值, BillNum填充空格, SN赋值 + // foreach (var masterObj in targetLst) + // { + // masterObj.BillNum = GetTrueString(masterObj.BillNum); + // int sn = 1; + // foreach (var detailObj in masterObj.Details) + // { + // detailObj.BillNum = masterObj.BillNum; + // detailObj.KNR = GetTrueString(detailObj.KNR); + // detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); + // detailObj.sn = sn++; + // detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 + // //客户要求显示零件描述,替换之前的零件编码 + // detailObj.PartCode = detailObj.MaterialDescription; + // detailObj.PartCode2 = detailObj.MaterialDescription2; + // detailObj.MaterialDescription = null; + // detailObj.MaterialDescription2 = null; + // } + // } - retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); - if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; - foreach (var masterObj in retObj.MasterList_D) - { - retObj.DetailList_D.AddRange(masterObj.Details); - masterObj.Details = null; - } + // retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); + // if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; + // foreach (var masterObj in retObj.MasterList_AC) + // { + // retObj.DetailList_AC.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); - if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; - foreach (var masterObj in retObj.MasterList_HL) - { - retObj.DetailList_HL.AddRange(masterObj.Details); - masterObj.Details = null; - } - #endregion + // retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); + // if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; + // foreach (var masterObj in retObj.MasterList_AA) + // { + // retObj.DetailList_AA.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - sw.Stop(); - _logger.LogWarning($"LoadZhuHuBanReport 排序及转换 - {sw.ElapsedMilliseconds}毫秒"); + // retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); + // if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; + // foreach (var masterObj in retObj.MasterList_BS) + // { + // retObj.DetailList_BS.AddRange(masterObj.Details); + // masterObj.Details = null; + // } - ret.Status = true; - return ret; - } - catch (Exception ex) - { - string errorMsg = _errorMessagePrefix + "LoadZhuHuBanReport 执行出错:" + ex.Message; - _logger.LogError(errorMsg); - //throw new BusinessException("1001", errorMsg); - ret.Status = false; - ret.Message = ex.Message; - return ret; - } - } + // retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); + // if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; + // foreach (var masterObj in retObj.MasterList_BX) + // { + // retObj.DetailList_BX.AddRange(masterObj.Details); + // masterObj.Details = null; + // } + + // retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); + // if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; + // foreach (var masterObj in retObj.MasterList_D) + // { + // retObj.DetailList_D.AddRange(masterObj.Details); + // masterObj.Details = null; + // } + + // retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); + // if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; + // foreach (var masterObj in retObj.MasterList_HL) + // { + // retObj.DetailList_HL.AddRange(masterObj.Details); + // masterObj.Details = null; + // } + // #endregion + + + // _logger.LogWarning($"LoadZhuHuBanReport 排序及转换 - {sw.ElapsedMilliseconds}毫秒"); + + // ret.Status = true; + // return ret; + // } + // catch (Exception ex) + // { + // string errorMsg = _errorMessagePrefix + "LoadZhuHuBanReport 执行出错:" + ex.Message; + // _logger.LogError(errorMsg); + // //throw new BusinessException("1001", errorMsg); + // ret.Status = false; + // ret.Message = ex.Message; + // return ret; + // } + //} /// /// 保存门板信息到中间表,中间表是位于FIS库,和WMS中间表结构相同 /// /// - private async Task SaveMiddleTable_MB(List input) - { - List targetMainLst = new List(); - List targetDetailLst = new List(); - List cxLst = new List(); - foreach (MenBanPackingList sourceObj in input) - { - FisTB_BILL targetMain = new FisTB_BILL(); - targetMain.BillNum = sourceObj.BillNum; //单据编号 - targetMain.State = 0; - targetMain.BillType = 206; //单据类型 - targetMain.SubBillType = 21004; //单据子类型 - targetMain.BillTime = sourceObj.PrintDate; //单据时间 - targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 - targetMain.DetailQty = 0; //明细数量 - targetMain.CustId = _providerCode; //供应商编号 - //targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 - //targetMain.DockCode = sourceObj.BillLocation; - - targetMain.GateCode = sourceObj.PartType; //B柱下 - targetMain.GateName = sourceObj.BillSerialNum; //顺序号 - targetMain.DockCode = sourceObj.BillLocation; //左或右 - targetMain.Remark = sourceObj.MinOnlineTime == null ? null : ((DateTime)sourceObj.MinOnlineTime).ToString("yyyy-MM-dd HH:mm"); //最早上线时间(预计到达时间) - targetMain.TransportType = sourceObj.BillSerialNum; //顺序号 - targetMain.SourceBillNum3 = sourceObj.ProductLine; //2022-10-13加生产线 - targetMainLst.Add(targetMain); - int idx = 0; - int idx2 = 0; - foreach (MenBanPackingRec sourceRec in sourceObj.Details) - { - idx2++; - if (sourceRec.TopSAPMaterialNum.IsNullOrEmpty() == false) - { - var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.TopSAPMaterialNum && itm.MaterialType == "1"); - idx++; - FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); - targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 - targetDetail.LineNum = idx2; //行号 - targetDetail.VinCode = sourceRec.VIN; //VIN码 - targetDetail.SeqNum = idx2.ToString(); //顺序号sourceRec.HostSN.ToString() - targetDetail.PartCode = sourceRec.TopSAPMaterialNum; //物料号 - //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 - targetDetail.ProjectId = ""; //车型 - targetDetail.PlanQty = 1; //计划数量 - targetDetail.State = "0"; //状态 - targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; - targetDetail.FullBarCode = "-"; - targetDetail.VendId = sourceRec.KNR; - //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 - targetDetailLst.Add(targetDetail); - if (materialObj != null && materialObj.VehicleModel != null) - { - cxLst.Add(materialObj.VehicleModel); - } - } - if (sourceRec.BelowSAPMaterialNum.IsNullOrEmpty() == false) - { - var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.BelowSAPMaterialNum && itm.MaterialType == "1"); + //private async Task SaveMiddleTable_MB(List input) + //{ + // throw new NotImplementedException(); - idx++; - FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); - targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 - targetDetail.VinCode = sourceRec.VIN; //VIN码 - targetDetail.PartCode = sourceRec.BelowSAPMaterialNum; //物料号 - targetDetail.LineNum = (idx2 + 12); //行号 - targetDetail.SeqNum = (idx2 + 12).ToString(); //顺序号sourceRec.HostSN.ToString() - //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 - targetDetail.ProjectId = ""; //车型 - targetDetail.State = "0"; //状态 - targetDetail.PlanQty = 1; //计划数量 - targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; - targetDetail.FullBarCode = "-"; - targetDetail.VendId = sourceRec.KNR; - //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 - targetDetailLst.Add(targetDetail); - if (materialObj != null && materialObj.VehicleModel != null) - { - cxLst.Add(materialObj.VehicleModel); - } - } - } - //生成车型 - string cxStr = ""; - foreach (string cxObj in cxLst.Distinct()) - { - cxStr += cxObj + "、"; - } - if (cxStr.Length > 0) - { - cxStr = cxStr.Substring(0, cxStr.Length - 1); - } - targetMain.ProjectId = cxStr; //添加车型 + // List targetMainLst = new List(); + // List targetDetailLst = new List(); + // List cxLst = new List(); + // foreach (MenBanPackingList sourceObj in input) + // { + // FisTB_BILL targetMain = new FisTB_BILL(); + // targetMain.BillNum = sourceObj.BillNum; //单据编号 + // targetMain.State = 0; + // targetMain.BillType = 206; //单据类型 + // targetMain.SubBillType = 21004; //单据子类型 + // targetMain.BillTime = sourceObj.PrintDate; //单据时间 + // targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 + // targetMain.DetailQty = 0; //明细数量 + // targetMain.CustId = _providerCode; //供应商编号 + // //targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + // //targetMain.DockCode = sourceObj.BillLocation; + + // targetMain.GateCode = sourceObj.PartType; //B柱下 + // targetMain.GateName = sourceObj.BillSerialNum; //顺序号 + // targetMain.DockCode = sourceObj.VehicleModel; //左或右 + // targetMain.Remark = sourceObj.MinOnlineTime == null ? null : ((DateTime)sourceObj.MinOnlineTime).ToString("yyyy-MM-dd HH:mm"); //最早上线时间(预计到达时间) + // targetMain.TransportType = sourceObj.BillSerialNum; //顺序号 + // targetMain.SourceBillNum3 = sourceObj.ProductLine; //2022-10-13加生产线 + // targetMainLst.Add(targetMain); + // int idx = 0; + // int idx2 = 0; + // foreach (MenBanPackingRec sourceRec in sourceObj.Details) + // { + // idx2++; + // if (sourceRec.PartCode2.IsNullOrEmpty() == false) + // { + // var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.PartCode2 && itm.MaterialType == "1"); + // idx++; + // FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); + // targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 + // targetDetail.LineNum = idx2; //行号 + // targetDetail.VinCode = sourceRec.VIN; //VIN码 + // targetDetail.SeqNum = idx2.ToString(); //顺序号sourceRec.HostSN.ToString() + // targetDetail.PartCode = sourceRec.PartCode2; //物料号 + // //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 + // targetDetail.ProjectId = ""; //车型 + // targetDetail.PlanQty = 1; //计划数量 + // targetDetail.State = "0"; //状态 + // targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; + // targetDetail.FullBarCode = "-"; + // targetDetail.VendId = sourceRec.KNR; + // //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + // targetDetailLst.Add(targetDetail); + // if (materialObj != null && materialObj.VehicleModel != null) + // { + // cxLst.Add(materialObj.VehicleModel); + // } + // } + // if (sourceRec.PartCode4.IsNullOrEmpty() == false) + // { + // var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.MaterialNum == sourceRec.PartCode4 && itm.MaterialType == "1"); + + // idx++; + // FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); + // targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 + // targetDetail.VinCode = sourceRec.VIN; //VIN码 + // targetDetail.PartCode = sourceRec.PartCode4; //物料号 + // targetDetail.LineNum = (idx2 + 12); //行号 + // targetDetail.SeqNum = (idx2 + 12).ToString(); //顺序号sourceRec.HostSN.ToString() + // //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 + // targetDetail.ProjectId = ""; //车型 + // targetDetail.State = "0"; //状态 + // targetDetail.PlanQty = 1; //计划数量 + // targetDetail.CustPartCode = materialObj == null ? null : materialObj.RelationKey; + // targetDetail.FullBarCode = "-"; + // targetDetail.VendId = sourceRec.KNR; + // //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + // targetDetailLst.Add(targetDetail); + // if (materialObj != null && materialObj.VehicleModel != null) + // { + // cxLst.Add(materialObj.VehicleModel); + // } + // } + // } + // //生成车型 + // string cxStr = ""; + // foreach (string cxObj in cxLst.Distinct()) + // { + // cxStr += cxObj + "、"; + // } + // if (cxStr.Length > 0) + // { + // cxStr = cxStr.Substring(0, cxStr.Length - 1); + // } + // targetMain.ProjectId = cxStr; //添加车型 - if (string.IsNullOrEmpty(cxStr)) - { - targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 - } - } + // if (string.IsNullOrEmpty(cxStr)) + // { + // targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + // } + // } - foreach (FisTB_BILL targetMain in targetMainLst) - { - //明细数量 - targetMain.DetailQty = targetDetailLst.Where(p => p.BillNum == targetMain.BillNum).Count(); - } - //保存到数据表 - await _tbBillRepository.InsertManyAsync(targetMainLst, true); - await _tsSortDetailRepository.InsertManyAsync(targetDetailLst, true); - } + // foreach (FisTB_BILL targetMain in targetMainLst) + // { + // //明细数量 + // targetMain.DetailQty = targetDetailLst.Where(p => p.BillNum == targetMain.BillNum).Count(); + // } + // //保存到数据表 + // await _tbBillRepository.InsertManyAsync(targetMainLst, true); + // await _tsSortDetailRepository.InsertManyAsync(targetDetailLst, true); + //} /// /// 保存柱护板信息到中间表,中间表是位于FIS库,和WMS中间表结构相同 /// /// - private async Task SaveMiddleTable_ZHB(List input) - { - List targetMainLst = new List(); - List targetDetailLst = new List(); + //private async Task SaveMiddleTable_ZHB(List input) + //{ + // throw new NotImplementedException(); - List cxLst = new List(); - foreach (ZhuHuBanPackingList sourceObj in input) - { - FisTB_BILL targetMain = new FisTB_BILL(); - targetMain.BillNum = sourceObj.BillNum; //单据编号 - targetMain.State = 0; - targetMain.BillType = 206; //单据类型 - targetMain.SubBillType = 20110; //单据子类型 - targetMain.BillTime = sourceObj.PrintDate; //单据时间 - targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 - targetMain.DetailQty = 0; //明细数量 - targetMain.CustId = _providerCode; //供应商编号 - //targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + // List targetMainLst = new List(); + // List targetDetailLst = new List(); - targetMain.GateName = sourceObj.BillSerialNum; //顺序号 - targetMain.GateCode = sourceObj.PartType; //B柱下 - targetMain.DockCode = sourceObj.BillLocation; //左或右 - targetMain.Remark = sourceObj.MinOnlineTime == null ? null : ((DateTime)sourceObj.MinOnlineTime).ToString("yyyy-MM-dd HH:mm"); //最早上线时间 - targetMain.TransportType = sourceObj.BillSerialNum; //顺序号 - targetMain.SourceBillNum3 = sourceObj.ProductLine; //2022-10-13加生产线 - targetMainLst.Add(targetMain); - int idx = 0; - int barCode = 0; - foreach (ZhuHuBanPackingRec sourceRec in sourceObj.Details) - { - barCode++; - if (sourceRec.PartCode.IsNullOrEmpty() == false) - { - idx++; - //var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode && itm.MaterialType == "2"); - var materialObj = _zhbCacheList.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode); - FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); - targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 - targetDetail.VinCode = sourceRec.VIN; //VIN码 - targetDetail.PartCode = materialObj == null ? sourceRec.PartCode : materialObj.MaterialNum; //SAP物料号 - targetDetail.LineNum = idx; //行号 - targetDetail.SeqNum = idx.ToString(); //顺序号 - targetDetail.ProjectId = ""; //车型 - targetDetail.State = "0"; //状态 - //targetDetail.BarCode = barCode.ToString(); //箱码 - targetDetail.PlanQty = 1; //计划数量 - targetDetail.CustPartCode = sourceRec.PartCode; //客户零件号 - targetDetail.FullBarCode = "-"; - targetDetail.VendId = sourceRec.KNR; - //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 - targetDetailLst.Add(targetDetail); - if (materialObj != null && materialObj.VehicleModel != null) - { - cxLst.Add(materialObj.VehicleModel); - } - - } - if (sourceRec.PartCode2.IsNullOrEmpty() == false) - { - idx++; - //var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode2 && itm.MaterialType == "2"); - var materialObj = _zhbCacheList.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode2); + // List cxLst = new List(); + // foreach (ZhuHuBanPackingList sourceObj in input) + // { + // FisTB_BILL targetMain = new FisTB_BILL(); + // targetMain.BillNum = sourceObj.BillNum; //单据编号 + // targetMain.State = 0; + // targetMain.BillType = 206; //单据类型 + // targetMain.SubBillType = 20110; //单据子类型 + // targetMain.BillTime = sourceObj.PrintDate; //单据时间 + // targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 + // targetMain.DetailQty = 0; //明细数量 + // targetMain.CustId = _providerCode; //供应商编号 + // //targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + + // targetMain.GateName = sourceObj.BillSerialNum; //顺序号 + // targetMain.GateCode = sourceObj.PartType; //B柱下 + // targetMain.DockCode = sourceObj.BillLocation; //左或右 + // targetMain.Remark = sourceObj.MinOnlineTime == null ? null : ((DateTime)sourceObj.MinOnlineTime).ToString("yyyy-MM-dd HH:mm"); //最早上线时间 + // targetMain.TransportType = sourceObj.BillSerialNum; //顺序号 + // targetMain.SourceBillNum3 = sourceObj.ProductLine; //2022-10-13加生产线 + // targetMainLst.Add(targetMain); + // int idx = 0; + // int barCode = 0; + // foreach (ZhuHuBanPackingRec sourceRec in sourceObj.Details) + // { + // barCode++; + // if (sourceRec.PartCode.IsNullOrEmpty() == false) + // { + // idx++; + // //var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode && itm.MaterialType == "2"); + // var materialObj = _zhbCacheList.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode); + // FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); + // targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 + // targetDetail.VinCode = sourceRec.VIN; //VIN码 + // targetDetail.PartCode = materialObj == null ? sourceRec.PartCode : materialObj.MaterialNum; //SAP物料号 + // targetDetail.LineNum = idx; //行号 + // targetDetail.SeqNum = idx.ToString(); //顺序号 + // targetDetail.ProjectId = ""; //车型 + // targetDetail.State = "0"; //状态 + // //targetDetail.BarCode = barCode.ToString(); //箱码 + // targetDetail.PlanQty = 1; //计划数量 + // targetDetail.CustPartCode = sourceRec.PartCode; //客户零件号 + // targetDetail.FullBarCode = "-"; + // targetDetail.VendId = sourceRec.KNR; + // //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + // targetDetailLst.Add(targetDetail); + // if (materialObj != null && materialObj.VehicleModel != null) + // { + // cxLst.Add(materialObj.VehicleModel); + // } - FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); - targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 - targetDetail.VinCode = sourceRec.VIN; //VIN码 - targetDetail.PartCode = materialObj == null ? sourceRec.PartCode2 : materialObj.MaterialNum; //SAP物料号 - targetDetail.LineNum = idx; //行号 - targetDetail.SeqNum = idx.ToString(); //顺序号 - targetDetail.ProjectId = ""; //车型 - targetDetail.State = "0"; //状态 - //targetDetail.BarCode = barCode.ToString(); //箱码 - targetDetail.PlanQty = 1; //计划数量 - targetDetail.CustPartCode = sourceRec.PartCode2; //客户零件号 - targetDetail.FullBarCode = "-"; - targetDetail.VendId = sourceRec.KNR; - //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 - targetDetailLst.Add(targetDetail); - if (materialObj != null && materialObj.VehicleModel != null) - { - cxLst.Add(materialObj.VehicleModel); - } - } - } - //生成车型 - string cxStr = ""; - foreach (string cxObj in cxLst.Distinct()) - { - cxStr += cxObj + "、"; - } - if (cxStr.Length > 0) - { - cxStr = cxStr.Substring(0, cxStr.Length - 1); - } - targetMain.ProjectId = cxStr; //添加车型 + // } + // if (sourceRec.PartCode2.IsNullOrEmpty() == false) + // { + // idx++; + // //var materialObj = _materialExtRepository.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode2 && itm.MaterialType == "2"); + // var materialObj = _zhbCacheList.FirstOrDefault(itm => itm.RelationKey == sourceRec.PartCode2); + + // FisTS_SORT_DETAIL targetDetail = new FisTS_SORT_DETAIL(); + // targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接 + // targetDetail.VinCode = sourceRec.VIN; //VIN码 + // targetDetail.PartCode = materialObj == null ? sourceRec.PartCode2 : materialObj.MaterialNum; //SAP物料号 + // targetDetail.LineNum = idx; //行号 + // targetDetail.SeqNum = idx.ToString(); //顺序号 + // targetDetail.ProjectId = ""; //车型 + // targetDetail.State = "0"; //状态 + // //targetDetail.BarCode = barCode.ToString(); //箱码 + // targetDetail.PlanQty = 1; //计划数量 + // targetDetail.CustPartCode = sourceRec.PartCode2; //客户零件号 + // targetDetail.FullBarCode = "-"; + // targetDetail.VendId = sourceRec.KNR; + // //targetDetail.BarCode = sourceRec.HostSN.ToString(); //2022-10-13加 + // targetDetailLst.Add(targetDetail); + // if (materialObj != null && materialObj.VehicleModel != null) + // { + // cxLst.Add(materialObj.VehicleModel); + // } + // } + // } + // //生成车型 + // string cxStr = ""; + // foreach (string cxObj in cxLst.Distinct()) + // { + // cxStr += cxObj + "、"; + // } + // if (cxStr.Length > 0) + // { + // cxStr = cxStr.Substring(0, cxStr.Length - 1); + // } + // targetMain.ProjectId = cxStr; //添加车型 - if (string.IsNullOrEmpty(cxStr)) - { - targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 - } - } - foreach (FisTB_BILL targetMain in targetMainLst) - { - //明细数量 - targetMain.DetailQty = targetDetailLst.Where(p => p.BillNum == targetMain.BillNum).Count(); - } - //保存到数据表 - //await _tbBillRepository.InsertManyAsync(targetMainLst, true); - //await _tsSortDetailRepository.InsertManyAsync(targetDetailLst, true); - await _tbBillRepository.InsertManyAsync(targetMainLst); - await _tsSortDetailRepository.InsertManyAsync(targetDetailLst); - } + // if (string.IsNullOrEmpty(cxStr)) + // { + // targetMain.ProjectId = sourceObj.PartType == null ? null : sourceObj.PartType.Replace(" DP", ""); //添加车型 + // } + // } + // foreach (FisTB_BILL targetMain in targetMainLst) + // { + // //明细数量 + // targetMain.DetailQty = targetDetailLst.Where(p => p.BillNum == targetMain.BillNum).Count(); + // } + // //保存到数据表 + // //await _tbBillRepository.InsertManyAsync(targetMainLst, true); + // //await _tsSortDetailRepository.InsertManyAsync(targetDetailLst, true); + // await _tbBillRepository.InsertManyAsync(targetMainLst); + // await _tsSortDetailRepository.InsertManyAsync(targetDetailLst); + //} #endregion - [UnitOfWork(false)] - [HttpPost] - [Route("get-last-hostsn-by-pl")] - public virtual async Task> GetLastHostSNByPL(MenBanPrintInputDto input) - { - _logger.LogDebug(_errorMessagePrefix + "GetLastHostSNByPL 进入"); - ObjectResultDto ret = new ObjectResultDto(); - try - { - string lastHostSNSql = $@" - select top 1 EndHostSN from FisMenBanPackingList a - where a.ProductLine = '{input.ProductLine}' and a.BillLocation = '左' - and a.ReportStatus = 0 and a.PrintType = 0 - order by a.BillNum desc, a.MinOnlineTime desc - "; - string lastHostSNStr = await _newJitDapperRepository.GetSingleBySqlAsync(lastHostSNSql); - int lastHostSN = lastHostSNStr.TryToIntZero(); - if ((input.BeginHostSN % 10000) == 1) - { - if (lastHostSN == 0) - { - } - else if ((lastHostSN % 10000) != 1999) - { - ret.Message = $"上次打印到{lastHostSN},本次从{input.BeginHostSN}开始打印,之间存在断号!"; - _logger.LogError("断号校验:" + ret.Message); + //[UnitOfWork(false)] + //[HttpPost] + //[Route("get-last-hostsn-by-pl")] + //public virtual async Task> GetLastHostSNByPL(MenBanPrintInputDto input) + //{ + // throw new NotImplementedException(); - ret.Status = false; - return ret; - } - } - else - { - if (input.BeginHostSN != lastHostSN + 1) - { - ret.Message = $"上次打印到{lastHostSN},本次从{input.BeginHostSN}开始打印,之间存在断号!"; - _logger.LogError("断号校验:" + ret.Message); - ret.Status = false; - return ret; - } - } - ret.Status = true; - return ret; - } - catch (Exception ex) - { + // _logger.LogDebug(_errorMessagePrefix + "GetLastHostSNByPL 进入"); + // ObjectResultDto ret = new ObjectResultDto(); + // try + // { + // string lastHostSNSql = $@" + // select top 1 EndHostSN from FisMenBanPackingList a + // where a.ProductLine = '{input.ProductLine}' and a.BillLocation = '左' + // and a.ReportStatus = 0 and a.PrintType = 0 + // order by a.BillNum desc, a.MinOnlineTime desc + // "; + // string lastHostSNStr = await _newJitDapperRepository.GetSingleBySqlAsync(lastHostSNSql); + // int lastHostSN = lastHostSNStr.TryToIntZero(); + // if ((input.BeginHostSN % 10000) == 1) + // { + // if (lastHostSN == 0) + // { + // } + // else if ((lastHostSN % 10000) != 1999) + // { + // ret.Message = $"上次打印到{lastHostSN},本次从{input.BeginHostSN}开始打印,之间存在断号!"; + // _logger.LogError("断号校验:" + ret.Message); - string errMsg = _errorMessagePrefix + "GetLastHostSNByPL 执行出错:" + ex.Message; - _logger.LogError(errMsg); - ret.Message = errMsg; - ret.Status = false; - return ret; - } + // ret.Status = false; + // return ret; + // } + // } + // else + // { + // if (input.BeginHostSN != lastHostSN + 1) + // { + // ret.Message = $"上次打印到{lastHostSN},本次从{input.BeginHostSN}开始打印,之间存在断号!"; + // _logger.LogError("断号校验:" + ret.Message); + // ret.Status = false; + // return ret; + // } + // } + // ret.Status = true; + // return ret; + // } + // catch (Exception ex) + // { + // string errMsg = _errorMessagePrefix + "GetLastHostSNByPL 执行出错:" + ex.Message; + // _logger.LogError(errMsg); + // ret.Message = errMsg; + // ret.Status = false; + // return ret; + // } - } + + //} } } diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml index 0ed41b0..00f45a5 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml @@ -988,7 +988,7 @@ 柱护板缓存列表(打印柱护板时用到) - + 构造函数 @@ -1001,17 +1001,17 @@ - + - 根据筛选条件获取实体列表 + 从M100中取当前产线、已经打印的最大大众顺序号 + + - + - 取单据包含的ERP总成列表 + 根据筛选条件获取实体列表 - - @@ -1031,115 +1031,17 @@ - - - 取新的装箱单号 - - 加1后的序号 - - - + 打印左侧或右侧门板 - + - - - - - - 上箱位号加前缀 - KNR前4位 大于等于 2402的 属于新发货状态, 不加前缀; - 小于 2402的 属于老发货状态, 加前缀 - - - - - - - - 打印门板装箱单时调用库存系统接口 - - - - - - 根据条件取用于打印的柱护板单据列表 - - - - - - - - 打印柱护板(3*8 左右合并成一个单元格)A上C上 - - - - - - - - - - - - - 打印柱护板(3*8 分左右)A柱下A中 - - - - - - - - - - - - - 打印柱护板(4*6 分左右)B柱上;B柱下;后轮上装饰板 - - - - - - - - - - - - - 打印柱护板(4*3 左右相邻)D柱 - - - - - - - - - - - - - 打印柱护板装箱单时调用库存系统接口 - - - - - - 查找M100结算件中是否包含指定类型(如D柱)的柱护板 - - - - + @@ -1149,14 +1051,6 @@ 断号时Item不为空 - - - 打印前检查大众顺序号是否断号 - - - 是否柱护板 - 断号时Item不为空 - 根据生产线获取正常打印单据的起始大众顺序号2 @@ -1166,34 +1060,6 @@ 柱护板分组类型 起始大众顺序号 - - - 打印门板装箱单 - - - 执行成功返回真 - - - - 打印柱护板装箱单 - - - 执行成功返回真 - - - - 取门板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) - - 输入查询条件 - 返回符合条件的排序分页列表 - - - - 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) - - 输入查询条件 - 返回符合条件的排序分页列表 - 根据筛选条件获取分页实体列表 @@ -1252,40 +1118,6 @@ 生产线编号列表 生产线超时情况 - - - 打印柱护板装箱单 - - - 执行成功返回真 - - - - 保存柱护板装箱单报表 - - - - - 保存柱护板装箱单报表 - - - - - 加载柱护板装箱单报表【仅ReportIdList、DataResultType参数有效】 - - - - - 保存门板信息到中间表,中间表是位于FIS库,和WMS中间表结构相同 - - - - - - 保存柱护板信息到中间表,中间表是位于FIS库,和WMS中间表结构相同 - - - M100单据管理应用服务实现 diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs index 6089215..746dabb 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs @@ -26,9 +26,9 @@ namespace WY.NewJit.Extends public string BillSerialNum { get; set; } /// - /// 左 或 右 + /// 车型 /// - public string BillLocation { get; set; } + public string VehicleModel { get; set; } /// diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs index f78560f..06e74af 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs @@ -13,6 +13,8 @@ namespace WY.NewJit.Extends /// public class MenBanPackingRec : FullAuditedAggregateRoot { + public Guid? M100BillId { get; set; } + /// /// KNR订单号 /// @@ -31,42 +33,37 @@ namespace WY.NewJit.Extends /// /// 车型门板代码 门板代号:是零件关键件,从汇总excel中取 /// - public virtual string VehicleModel_DoorPlankCode { get; set; } + public virtual string PartCode1 { get; set; } - /// - /// 上箱位号 - /// - public virtual string TopBoxPositionNum { get; set; } /// /// 上箱位 SAP物料号 /// - public string TopSAPMaterialNum { get; set; } + public string PartCode2 { get; set; } /// /// 上箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) /// - public string TopMaterialDescription { get; set; } + public string PartCode3 { get; set; } - /// - /// 下箱位号 - /// - //public virtual string BelowBoxPositionNum { get; set; } /// /// 下箱位 SAP物料号 /// - public string BelowSAPMaterialNum { get; set; } + public string PartCode4 { get; set; } /// /// 下箱位 物料描述(大小量纲、物料描述字段值同时存在时,优先显示大小量纲) /// - public string BelowMaterialDescription { get; set; } + public string PartCode5 { get; set; } + + /// + /// 上箱位号 + /// + public virtual string SN { get; set; } - - public Guid? M100BillId { get; set; } public void SetId(Guid id) diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/DicItem.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/DicItem.cs index b188ce8..4a882cf 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/DicItem.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/DicItem.cs @@ -28,22 +28,22 @@ namespace WY.NewJit.MsgBaseData public virtual string DicItemName { get; protected set; } /// - /// 分类1 + /// 分类1(零件大类对应分组) /// public virtual string DicItemSort1 { get; set; } /// - /// 分类2 + /// 分类2 (零件大类对应产线) /// public virtual string DicItemSort2 { get; set; } /// - /// 分类3 + /// 分类3(零件大类对应车型) /// public virtual string DicItemSort3{ get; set; } /// - /// 分类4 + /// 分类4(零件大类对应打印报表的三位零件大类) /// public virtual string DicItemSort4 { get; set; } diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250721080257_2025072102.Designer.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250721080257_2025072102.Designer.cs new file mode 100644 index 0000000..aa5d5bc --- /dev/null +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250721080257_2025072102.Designer.cs @@ -0,0 +1,3578 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using WY.NewJit.EntityFrameworkCore; + +namespace WY.NewJit.Migrations +{ + [DbContext(typeof(NewJitDbContext))] + [Migration("20250721080257_2025072102")] + partial class _2025072102 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("WY.NewJit.Books.Book", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Price") + .HasColumnType("real"); + + b.Property("PublishDate") + .HasColumnType("datetime2"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisBooks"); + }); + + modelBuilder.Entity("WY.NewJit.Commons.SequenceInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("SequenceNum") + .HasColumnType("bigint"); + + b.Property("SequenceType") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisSequenceInfo"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginVin") + .HasColumnType("nvarchar(max)"); + + b.Property("BillLocation") + .HasColumnType("nvarchar(max)"); + + b.Property("BillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("BillSerialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Capacity") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("EndVin") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MinOnlineTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintDate") + .HasColumnType("datetime2"); + + b.Property("PrintType") + .HasColumnType("int"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReportStatus") + .HasColumnType("int"); + + b.Property("SortId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisMenBanPackingList"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BelowMaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("BelowSAPMaterialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("M100BillId") + .HasColumnType("uniqueidentifier"); + + b.Property("MenBanPackingListId") + .HasColumnType("uniqueidentifier"); + + b.Property("TopBoxPositionNum") + .HasColumnType("nvarchar(max)"); + + b.Property("TopMaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("TopSAPMaterialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModel_DoorPlankCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MenBanPackingListId"); + + b.ToTable("FisMenBanPackingRec"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.MaterialExt", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDescription2") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialMemo") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("MaterialType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialType2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialType3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RelationKey") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("VehicleModel") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("promo") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialNum") + .HasDatabaseName("IX_MaterialExt_MaterialNum"); + + b.HasIndex("MaterialType") + .HasDatabaseName("IX_MaterialExt_MaterialType"); + + b.HasIndex("MaterialType2") + .HasDatabaseName("IX_MaterialExt_MaterialType2"); + + b.HasIndex("MaterialType3") + .HasDatabaseName("IX_MaterialExt_MaterialType3"); + + b.HasIndex("RelationKey") + .HasDatabaseName("IX_MaterialExt_RelationKey"); + + b.HasIndex("VehicleModel") + .HasDatabaseName("IX_MaterialExt_VehicleModel"); + + b.ToTable("FisMaterialExt"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CustId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DetailQty") + .HasColumnType("int"); + + b.Property("DockCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExecuteRemark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FinishTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GUID") + .HasColumnType("uniqueidentifier"); + + b.Property("GateCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GateName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsExecute") + .HasColumnType("bit"); + + b.Property("OperName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum3") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("TransportType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TruckNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum"); + + b.ToTable("FisTB_BILL"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_HIS", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CustId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DetailQty") + .HasColumnType("int"); + + b.Property("DockCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FinishTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GUID") + .HasColumnType("uniqueidentifier"); + + b.Property("GateCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GateName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OperName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum3") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("TransportType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TruckNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum"); + + b.ToTable("FisTB_BILL_HIS"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_SCRAP", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExecuteTime") + .HasColumnType("datetime2"); + + b.Property("IsExecute") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("FisTB_BILL_SCRAP"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTS_SORT_DETAIL", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VinCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BarCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustBarCode") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CustPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DispatchDate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Dock") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FullBarCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FyonNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LineNum") + .HasColumnType("int"); + + b.Property("PlanQty") + .HasColumnType("money"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("money"); + + b.Property("ReceiptQty") + .HasColumnType("money"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SeqNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("bigint"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum", "VinCode", "PartCode"); + + b.ToTable("FisTS_SORT_DETAIL"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTS_SORT_DETAIL_HIS", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VinCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BarCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustBarCode") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CustPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DispatchDate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Dock") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FullBarCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FyonNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LineNum") + .HasColumnType("int"); + + b.Property("PlanQty") + .HasColumnType("money"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("money"); + + b.Property("ReceiptQty") + .HasColumnType("money"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SeqNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("bigint"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum", "VinCode", "PartCode"); + + b.ToTable("FisTS_SORT_DETAIL_HIS"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ProductLine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductLineCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProductLineName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProductLineCode") + .HasDatabaseName("IX_ProductLine_ProductLineCode"); + + b.ToTable("FisProductLine"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.User2ProductLine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisUser2ProductLine"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingList", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginVin") + .HasColumnType("nvarchar(max)"); + + b.Property("BillLocation") + .HasColumnType("nvarchar(max)"); + + b.Property("BillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("BillSerialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Capacity") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("EndVin") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MinOnlineTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintDate") + .HasColumnType("datetime2"); + + b.Property("PrintType") + .HasColumnType("int"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReportStatus") + .HasColumnType("int"); + + b.Property("SortId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisZhuHuBanPackingList"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("M100BillId") + .HasColumnType("uniqueidentifier"); + + b.Property("MaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDescription2") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode2") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("ZhuHuBanPackingListId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ZhuHuBanPackingListId"); + + b.ToTable("FisZhuHuBanPackingRec"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec2", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Column00") + .HasColumnType("nvarchar(max)"); + + b.Property("Column01") + .HasColumnType("nvarchar(max)"); + + b.Property("Column02") + .HasColumnType("nvarchar(max)"); + + b.Property("Column03") + .HasColumnType("nvarchar(max)"); + + b.Property("Column04") + .HasColumnType("nvarchar(max)"); + + b.Property("Column05") + .HasColumnType("nvarchar(max)"); + + b.Property("Column06") + .HasColumnType("nvarchar(max)"); + + b.Property("Column07") + .HasColumnType("nvarchar(max)"); + + b.Property("Column08") + .HasColumnType("nvarchar(max)"); + + b.Property("Column09") + .HasColumnType("nvarchar(max)"); + + b.Property("Column10") + .HasColumnType("nvarchar(max)"); + + b.Property("Column11") + .HasColumnType("nvarchar(max)"); + + b.Property("Column12") + .HasColumnType("nvarchar(max)"); + + b.Property("Column13") + .HasColumnType("nvarchar(max)"); + + b.Property("Column14") + .HasColumnType("nvarchar(max)"); + + b.Property("Column15") + .HasColumnType("nvarchar(max)"); + + b.Property("Column16") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("FisZhuHuBanPackingRec2"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgErp", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ErpAssemblyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ErpAssemblyName") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpAssemblyVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NewVersionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelationKey") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModel") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgErp"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisable") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VehicleModel") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgGroup"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCfgErpId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsKey") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("AssemblyCfgErpId"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_FisAssemblyCfgPart_PartCode"); + + b.ToTable("FisAssemblyCfgPart"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyName") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActivate") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgVehicle"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicleChild", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCfgVehicleId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ErpAssemblyId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("AssemblyCfgVehicleId"); + + b.HasIndex("ErpAssemblyId") + .HasDatabaseName("IX_AssemblyCfgVehicleChild_ErpAssemblyId"); + + b.ToTable("FisAssemblyCfgVehicleChild"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.DicItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DicItemCode") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DicItemName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DicItemSort1") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort2") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort3") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort4") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort5") + .HasColumnType("nvarchar(max)"); + + b.Property("DicTypeCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DicItemCode") + .HasDatabaseName("IX_DicItem_DicItemCode"); + + b.HasIndex("DicTypeCode") + .HasDatabaseName("IX_DicItem_DicTypeCode"); + + b.ToTable("FisDicItem"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.DicType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DicTypeCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DicTypeName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DicTypeCode") + .HasDatabaseName("IX_DicType_DicTypeCode"); + + b.ToTable("FisDicType"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.ExcludePartCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExcludeReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisExcludePartCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.GlobalSettings", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("RefreshMessageParseCache") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.HasKey("Id"); + + b.ToTable("FisGlobalSettings"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.LineSN", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPrintTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(450)"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(450)"); + + b.Property("ProductType") + .HasColumnType("int"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SN") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("ProductType", "ProductLine", "PartType") + .IsUnique() + .HasFilter("[ProductLine] IS NOT NULL AND [PartType] IS NOT NULL"); + + b.ToTable("FisLineSN"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.LogRemind", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LogDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LogStatus") + .HasColumnType("int"); + + b.Property("LogTitle") + .HasColumnType("nvarchar(max)"); + + b.Property("LogType") + .HasColumnType("int"); + + b.Property("SeriousLevel") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisLogRemind"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PartCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisable") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartName") + .HasColumnType("nvarchar(max)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RelationKey") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_PartCfg_PartCode"); + + b.HasIndex("PartType") + .HasDatabaseName("IX_PartCfg_PartType"); + + b.HasIndex("PartType2") + .HasDatabaseName("IX_PartCfg_PartType2"); + + b.HasIndex("PartType3") + .HasDatabaseName("IX_PartCfg_PartType3"); + + b.ToTable("FisPartCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PartSwitch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveBeginTime") + .HasColumnType("datetime2"); + + b.Property("ActiveEndTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SourcePartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TargetPartCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisPartSwitch"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PrintTemplateConfiguration", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TemplateName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName", "PartType") + .IsUnique() + .HasFilter("[GroupName] IS NOT NULL AND [PartType] IS NOT NULL"); + + b.ToTable("FisPrintTemplateConfiguration"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("CanNotPrint") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("HostSN2") + .HasColumnType("int"); + + b.Property("IsPartSwitch") + .HasColumnType("bit"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedReplenishPrint") + .HasColumnType("int"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperationType") + .HasColumnType("int"); + + b.Property("Operator") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintTime") + .HasColumnType("datetime2"); + + b.Property("PrintTime2") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("SerialNumStr") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_BillM100_HostSN2"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_BillM100_ProductLine2"); + + b.HasIndex("SerialNum") + .HasDatabaseName("IX_BillM100_SerialNum"); + + b.HasIndex("SerialNumStr") + .HasDatabaseName("IX_BillM100_SerialNumStr2"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_BillM100_VIN2"); + + b.ToTable("FisBillM100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillM100Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType3") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("BillM100Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillM100Part_PartCode2"); + + b.ToTable("FisBillM100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_BillM110_VIN3"); + + b.ToTable("FisBillM110"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillM110Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BillM110Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillM110Part_PartCode3"); + + b.ToTable("FisBillM110Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("IsPartSwitch") + .HasColumnType("bit"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("PrintTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("SerialNumStr") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_BillR100_HostSN1"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_BillR100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_BillR100_ProductLine1"); + + b.HasIndex("SerialNumStr") + .HasDatabaseName("IX_BillR100_SerialNumStr1"); + + b.ToTable("FisBillR100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillR100Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType3") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BillR100Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillR100Part_PartCode1"); + + b.ToTable("FisBillR100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_RepeatM100_HostSN"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_RepeatM100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_RepeatM100_ProductLine"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_RepeatM100_VIN"); + + b.ToTable("FisRepeatM100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatM100Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_RepeatM100Part_PartCode"); + + b.HasIndex("RepeatM100Id"); + + b.ToTable("FisRepeatM100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisRepeatM110"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatM110Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RepeatM110Id"); + + b.ToTable("FisRepeatM110Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_RepeatR100_HostSN"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_RepeatR100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_RepeatR100_ProductLine"); + + b.ToTable("FisRepeatR100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatR100Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_RepeatR100Part_PartCode"); + + b.HasIndex("RepeatR100Id"); + + b.ToTable("FisRepeatR100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssembly", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillID") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("ScanPoint") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisUnknownAssembly"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssemblyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("UnknownAssemblyId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_UnknownAssemblyPart_PartCode"); + + b.HasIndex("UnknownAssemblyId"); + + b.ToTable("FisUnknownAssemblyPart"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.ZHBPrintStatus", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName", "VIN") + .IsUnique() + .HasFilter("[GroupName] IS NOT NULL AND [VIN] IS NOT NULL"); + + b.ToTable("FisZHBPrintStatus"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.BillSortCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FileContentKeyword") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageVersionCfgId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MessageVersionCfgId"); + + b.ToTable("FisBillSortCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.MessageVersionCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileNameKeyword") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisMessageVersionCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.MessageReceive", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ErrorCount") + .HasColumnType("int"); + + b.Property("ErrorMessage") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastUpdateTime") + .HasColumnType("datetime2"); + + b.Property("MessageContent") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveStatus") + .HasColumnType("int"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("FisMessageReceive"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.MessageReceiveArchive", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillHostSN") + .HasColumnType("int"); + + b.Property("BillOnlineTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastUpdateTime") + .HasColumnType("datetime2"); + + b.Property("MessageContent") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageReceiveId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReceiveStatus") + .HasColumnType("int"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("FisMessageReceiveArchive"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.TransmissionModeCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsApply") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TransmissionModeContent") + .HasColumnType("nvarchar(max)"); + + b.Property("TransmissionModeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisTransmissionModeCfg"); + }); + + modelBuilder.Entity("WY.NewJit.TianHe.NotMatchTempBill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("NotMatchBillId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisNotMatchTempBill"); + }); + + modelBuilder.Entity("WY.NewJit.Users.AppUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingRec", b => + { + b.HasOne("WY.NewJit.Extends.MenBanPackingList", null) + .WithMany("Details") + .HasForeignKey("MenBanPackingListId"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec", b => + { + b.HasOne("WY.NewJit.Extends.ZhuHuBanPackingList", null) + .WithMany("Details") + .HasForeignKey("ZhuHuBanPackingListId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgPart", b => + { + b.HasOne("WY.NewJit.MsgBaseData.AssemblyCfgErp", null) + .WithMany("Details") + .HasForeignKey("AssemblyCfgErpId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicleChild", b => + { + b.HasOne("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", null) + .WithMany("AssemblyCfgVehicleChilds") + .HasForeignKey("AssemblyCfgVehicleId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillM100", null) + .WithMany("BillM100Parts") + .HasForeignKey("BillM100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillM110", null) + .WithMany("BillM110Parts") + .HasForeignKey("BillM110Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillR100", null) + .WithMany("BillR100Parts") + .HasForeignKey("BillR100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatM100", null) + .WithMany("M100RepeatParts") + .HasForeignKey("RepeatM100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatM110", null) + .WithMany("M110RepeatParts") + .HasForeignKey("RepeatM110Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatR100", null) + .WithMany("R100RepeatParts") + .HasForeignKey("RepeatR100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssemblyPart", b => + { + b.HasOne("WY.NewJit.MsgCheck.UnknownAssembly", null) + .WithMany("UnknownAssemblyParts") + .HasForeignKey("UnknownAssemblyId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.BillSortCfg", b => + { + b.HasOne("WY.NewJit.MsgConversion.MessageVersionCfg", null) + .WithMany("Details") + .HasForeignKey("MessageVersionCfgId"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingList", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgErp", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", b => + { + b.Navigation("AssemblyCfgVehicleChilds"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100", b => + { + b.Navigation("BillM100Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110", b => + { + b.Navigation("BillM110Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100", b => + { + b.Navigation("BillR100Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100", b => + { + b.Navigation("M100RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110", b => + { + b.Navigation("M110RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100", b => + { + b.Navigation("R100RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssembly", b => + { + b.Navigation("UnknownAssemblyParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.MessageVersionCfg", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250721080257_2025072102.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250721080257_2025072102.cs new file mode 100644 index 0000000..ce6d08c --- /dev/null +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250721080257_2025072102.cs @@ -0,0 +1,1793 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace WY.NewJit.Migrations +{ + public partial class _2025072102 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisAssemblyCfgErp", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ErpAssemblyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ErpAssemblyName = table.Column(type: "nvarchar(max)", nullable: true), + ErpAssemblyVersion = table.Column(type: "int", nullable: false), + VehicleModel = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + NewVersionId = table.Column(type: "uniqueidentifier", nullable: true), + RelationKey = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + GroupCode = table.Column(type: "varchar(100)", maxLength: 100, nullable: true), + GroupId = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisAssemblyCfgErp", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisAssemblyCfgGroup", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + GroupCode = table.Column(type: "varchar(100)", maxLength: 100, nullable: true), + VehicleModel = table.Column(type: "nvarchar(max)", nullable: true), + IsDisable = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisAssemblyCfgGroup", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisAssemblyCfgVehicle", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + AssemblyName = table.Column(type: "nvarchar(max)", nullable: true), + VehicleModelCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + IsActivate = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisAssemblyCfgVehicle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisBillM100", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileReceiveID = table.Column(type: "uniqueidentifier", nullable: true), + SerialNum = table.Column(type: "int", nullable: true), + HostSN = table.Column(type: "int", nullable: true), + KNR = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VIN = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + AssemblyID = table.Column(type: "uniqueidentifier", nullable: true), + OnlineTime = table.Column(type: "datetime2", nullable: true), + VehicleModelCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ProductLine = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ReceiveTime = table.Column(type: "datetime2", nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + PrintTime = table.Column(type: "datetime2", nullable: true), + PrintBillNum = table.Column(type: "nvarchar(max)", nullable: true), + PrintTime2 = table.Column(type: "datetime2", nullable: true), + SerialNumStr = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + OperationType = table.Column(type: "int", nullable: false), + Operator = table.Column(type: "nvarchar(max)", nullable: true), + OperationTime = table.Column(type: "datetime2", nullable: true), + CanNotPrint = table.Column(type: "bit", nullable: true), + NeedReplenishPrint = table.Column(type: "int", nullable: true), + HostSN2 = table.Column(type: "int", nullable: true), + IsPartSwitch = table.Column(type: "bit", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillM100", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisBillM110", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileReceiveID = table.Column(type: "uniqueidentifier", nullable: false), + SerialNum = table.Column(type: "int", nullable: true), + HostSN = table.Column(type: "int", nullable: true), + KNR = table.Column(type: "nvarchar(max)", nullable: true), + VIN = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + AssemblyID = table.Column(type: "uniqueidentifier", nullable: true), + OnlineTime = table.Column(type: "datetime2", nullable: true), + VehicleModelCode = table.Column(type: "nvarchar(max)", nullable: true), + ProductLine = table.Column(type: "nvarchar(max)", nullable: true), + Version = table.Column(type: "nvarchar(max)", nullable: true), + ReceiveTime = table.Column(type: "datetime2", nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillM110", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisBillR100", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileReceiveID = table.Column(type: "uniqueidentifier", nullable: false), + HostSN = table.Column(type: "int", nullable: true), + KNR = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + AssemblyID = table.Column(type: "uniqueidentifier", nullable: true), + OnlineTime = table.Column(type: "datetime2", nullable: true), + ReceiveTime = table.Column(type: "datetime2", nullable: true), + VehicleModelCode = table.Column(type: "nvarchar(max)", nullable: true), + ProductLine = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + PrintTime = table.Column(type: "datetime2", nullable: true), + SerialNum = table.Column(type: "int", nullable: true), + SerialNumStr = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + IsPartSwitch = table.Column(type: "bit", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillR100", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisBooks", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Type = table.Column(type: "int", nullable: false), + PublishDate = table.Column(type: "datetime2", nullable: false), + Price = table.Column(type: "real", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBooks", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisDicItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + DicTypeCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DicItemCode = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + DicItemName = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + DicItemSort1 = table.Column(type: "nvarchar(max)", nullable: true), + DicItemSort2 = table.Column(type: "nvarchar(max)", nullable: true), + DicItemSort3 = table.Column(type: "nvarchar(max)", nullable: true), + DicItemSort4 = table.Column(type: "nvarchar(max)", nullable: true), + DicItemSort5 = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisDicItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisDicType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + DicTypeCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DicTypeName = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisDicType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisExcludePartCfg", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + VehicleModelCode = table.Column(type: "nvarchar(max)", nullable: true), + PartCode = table.Column(type: "nvarchar(max)", nullable: true), + ExcludeReason = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisExcludePartCfg", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisGlobalSettings", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RefreshMessageParseCache = table.Column(type: "nvarchar(1)", maxLength: 1, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisGlobalSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisLineSN", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProductType = table.Column(type: "int", nullable: false), + ProductLine = table.Column(type: "nvarchar(450)", nullable: true), + PartType = table.Column(type: "nvarchar(450)", nullable: true), + SN = table.Column(type: "float", nullable: false), + LastPrintTime = table.Column(type: "datetime2", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisLineSN", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisLogRemind", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + LogType = table.Column(type: "int", nullable: false), + LogTitle = table.Column(type: "nvarchar(max)", nullable: true), + LogDesc = table.Column(type: "nvarchar(max)", nullable: true), + SeriousLevel = table.Column(type: "int", nullable: false), + LogStatus = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisLogRemind", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisMaterialExt", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MaterialNum = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + MaterialDescription = table.Column(type: "nvarchar(max)", nullable: true), + MaterialDescription2 = table.Column(type: "nvarchar(max)", nullable: true), + MaterialMemo = table.Column(type: "nvarchar(max)", nullable: true), + MaterialGroup = table.Column(type: "nvarchar(max)", nullable: true), + VehicleModel = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + MaterialType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + MaterialType2 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + MaterialType3 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + RelationKey = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + UpdateTime = table.Column(type: "datetime2", nullable: false), + promo = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisMaterialExt", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisMenBanPackingList", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BillNum = table.Column(type: "nvarchar(max)", nullable: true), + BillSerialNum = table.Column(type: "nvarchar(max)", nullable: true), + BillLocation = table.Column(type: "nvarchar(max)", nullable: true), + ProviderCode = table.Column(type: "nvarchar(max)", nullable: true), + PartType = table.Column(type: "nvarchar(max)", nullable: true), + Capacity = table.Column(type: "nvarchar(max)", nullable: true), + PrintDate = table.Column(type: "datetime2", nullable: false), + PrintType = table.Column(type: "int", nullable: false), + ProductLine = table.Column(type: "nvarchar(max)", nullable: true), + BeginVin = table.Column(type: "nvarchar(max)", nullable: true), + EndVin = table.Column(type: "nvarchar(max)", nullable: true), + BeginHostSN = table.Column(type: "nvarchar(max)", nullable: true), + EndHostSN = table.Column(type: "nvarchar(max)", nullable: true), + SortId = table.Column(type: "uniqueidentifier", nullable: true), + ReportStatus = table.Column(type: "int", nullable: false), + MinOnlineTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisMenBanPackingList", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisMessageReceive", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileName = table.Column(type: "nvarchar(max)", nullable: true), + MessageContent = table.Column(type: "nvarchar(max)", nullable: true), + ReceiveStatus = table.Column(type: "int", nullable: false), + ReceiveTime = table.Column(type: "datetime2", nullable: false), + LastUpdateTime = table.Column(type: "datetime2", nullable: true), + ErrorCount = table.Column(type: "int", nullable: true), + ErrorMessage = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisMessageReceive", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisMessageReceiveArchive", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileName = table.Column(type: "nvarchar(max)", nullable: true), + MessageContent = table.Column(type: "nvarchar(max)", nullable: true), + ReceiveStatus = table.Column(type: "int", nullable: false), + ReceiveTime = table.Column(type: "datetime2", nullable: false), + LastUpdateTime = table.Column(type: "datetime2", nullable: true), + MessageReceiveId = table.Column(type: "uniqueidentifier", nullable: true), + BillType = table.Column(type: "nvarchar(max)", nullable: true), + BillOnlineTime = table.Column(type: "datetime2", nullable: true), + BillHostSN = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisMessageReceiveArchive", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisMessageVersionCfg", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Version = table.Column(type: "nvarchar(max)", nullable: true), + FileNameKeyword = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisMessageVersionCfg", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisNotMatchTempBill", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + NotMatchBillId = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisNotMatchTempBill", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisPartCfg", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartName = table.Column(type: "nvarchar(max)", nullable: true), + PartType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + PartType2 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + PartType3 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + RelationKey = table.Column(type: "nvarchar(max)", nullable: true), + IsDisable = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisPartCfg", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisPartSwitch", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourcePartCode = table.Column(type: "nvarchar(max)", nullable: true), + TargetPartCode = table.Column(type: "nvarchar(max)", nullable: true), + ActiveBeginTime = table.Column(type: "datetime2", nullable: true), + ActiveEndTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisPartSwitch", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisPrintTemplateConfiguration", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + GroupName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + TemplateName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisPrintTemplateConfiguration", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisProductLine", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProductLineCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ProductLineName = table.Column(type: "nvarchar(max)", nullable: true), + BillType = table.Column(type: "int", nullable: false), + ProductType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisProductLine", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisRepeatM100", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileReceiveID = table.Column(type: "uniqueidentifier", nullable: true), + SerialNum = table.Column(type: "int", nullable: true), + HostSN = table.Column(type: "int", nullable: true), + KNR = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VIN = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + AssemblyID = table.Column(type: "uniqueidentifier", nullable: true), + OnlineTime = table.Column(type: "datetime2", nullable: true), + ReceiveTime = table.Column(type: "datetime2", nullable: true), + VehicleModelCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ProductLine = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisRepeatM100", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisRepeatM110", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileReceiveID = table.Column(type: "uniqueidentifier", nullable: false), + HostSN = table.Column(type: "int", nullable: true), + KNR = table.Column(type: "nvarchar(max)", nullable: true), + VIN = table.Column(type: "nvarchar(max)", nullable: true), + OnlineTime = table.Column(type: "datetime2", nullable: true), + ReceiveTime = table.Column(type: "datetime2", nullable: true), + VehicleModelCode = table.Column(type: "nvarchar(max)", nullable: true), + ProductLine = table.Column(type: "nvarchar(max)", nullable: true), + Version = table.Column(type: "nvarchar(max)", nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisRepeatM110", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisRepeatR100", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MessageFileReceiveID = table.Column(type: "uniqueidentifier", nullable: false), + HostSN = table.Column(type: "int", nullable: true), + KNR = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + AssemblyID = table.Column(type: "uniqueidentifier", nullable: true), + OnlineTime = table.Column(type: "datetime2", nullable: true), + ReceiveTime = table.Column(type: "datetime2", nullable: true), + VehicleModelCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ProductLine = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisRepeatR100", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisSequenceInfo", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SequenceType = table.Column(type: "nvarchar(max)", nullable: true), + SequenceNum = table.Column(type: "bigint", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisSequenceInfo", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisTB_BILL", + columns: table => new + { + BillNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + UID = table.Column(type: "int", nullable: false), + State = table.Column(type: "int", nullable: false), + SourceBillNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SourceBillNum2 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SourceBillNum3 = table.Column(type: "nvarchar(max)", nullable: true), + BillType = table.Column(type: "int", nullable: false), + SubBillType = table.Column(type: "int", nullable: false), + BillTime = table.Column(type: "datetime2", nullable: false), + StartTime = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + FinishTime = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + OperName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + DetailQty = table.Column(type: "int", nullable: false), + VendId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + CustId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ProjectId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TransportType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TruckNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + GateCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + GateName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DockCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Remark = table.Column(type: "nvarchar(max)", nullable: true), + AccountDate = table.Column(type: "datetime2", nullable: true), + GUID = table.Column(type: "uniqueidentifier", nullable: false), + IsExecute = table.Column(type: "bit", nullable: false), + ExecuteRemark = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisTB_BILL", x => x.BillNum); + }); + + migrationBuilder.CreateTable( + name: "FisTB_BILL_HIS", + columns: table => new + { + BillNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + UID = table.Column(type: "int", nullable: false), + State = table.Column(type: "int", nullable: false), + SourceBillNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SourceBillNum2 = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SourceBillNum3 = table.Column(type: "nvarchar(max)", nullable: true), + BillType = table.Column(type: "int", nullable: false), + SubBillType = table.Column(type: "int", nullable: false), + BillTime = table.Column(type: "datetime2", nullable: false), + StartTime = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + FinishTime = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + OperName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + DetailQty = table.Column(type: "int", nullable: false), + VendId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + CustId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ProjectId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TransportType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TruckNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + GateCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + GateName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DockCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Remark = table.Column(type: "nvarchar(max)", nullable: true), + AccountDate = table.Column(type: "datetime2", nullable: true), + GUID = table.Column(type: "uniqueidentifier", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_FisTB_BILL_HIS", x => x.BillNum); + }); + + migrationBuilder.CreateTable( + name: "FisTB_BILL_SCRAP", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BillNum = table.Column(type: "varchar(50)", maxLength: 50, nullable: false), + IsExecute = table.Column(type: "bit", nullable: false, defaultValue: false), + Remark = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + CreateTime = table.Column(type: "datetime2", nullable: true), + ExecuteTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisTB_BILL_SCRAP", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisTransmissionModeCfg", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TransmissionModeType = table.Column(type: "int", nullable: false), + TransmissionModeContent = table.Column(type: "nvarchar(max)", nullable: true), + IsApply = table.Column(type: "bit", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisTransmissionModeCfg", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisTS_SORT_DETAIL", + columns: table => new + { + BillNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + VinCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + PartCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + UID = table.Column(type: "bigint", nullable: false), + LineNum = table.Column(type: "int", nullable: false), + SeqNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + BarCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + CustPartCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ProjectId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + FyonNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + VendId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Dock = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DispatchDate = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + State = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Remark = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + PlanQty = table.Column(type: "money", nullable: false), + Qty = table.Column(type: "money", nullable: false), + CustBarCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ReceiptQty = table.Column(type: "money", nullable: false), + FullBarCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_FisTS_SORT_DETAIL", x => new { x.BillNum, x.VinCode, x.PartCode }); + }); + + migrationBuilder.CreateTable( + name: "FisTS_SORT_DETAIL_HIS", + columns: table => new + { + BillNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + VinCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + PartCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + UID = table.Column(type: "bigint", nullable: false), + LineNum = table.Column(type: "int", nullable: false), + SeqNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + BarCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + CustPartCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ProjectId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + FyonNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + VendId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Dock = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + DispatchDate = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + State = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Remark = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + PlanQty = table.Column(type: "money", nullable: false), + Qty = table.Column(type: "money", nullable: false), + CustBarCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ReceiptQty = table.Column(type: "money", nullable: false), + FullBarCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_FisTS_SORT_DETAIL_HIS", x => new { x.BillNum, x.VinCode, x.PartCode }); + }); + + migrationBuilder.CreateTable( + name: "FisUnknownAssembly", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BillID = table.Column(type: "uniqueidentifier", nullable: false), + ScanPoint = table.Column(type: "nvarchar(max)", nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisUnknownAssembly", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisUser2ProductLine", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + ProductLineId = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisUser2ProductLine", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisZHBPrintStatus", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + VIN = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + GroupName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + BillStatus = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisZHBPrintStatus", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisZhuHuBanPackingList", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BillNum = table.Column(type: "nvarchar(max)", nullable: true), + BillSerialNum = table.Column(type: "nvarchar(max)", nullable: true), + BillLocation = table.Column(type: "nvarchar(max)", nullable: true), + ProviderCode = table.Column(type: "nvarchar(max)", nullable: true), + PartType = table.Column(type: "nvarchar(max)", nullable: true), + Capacity = table.Column(type: "nvarchar(max)", nullable: true), + PrintDate = table.Column(type: "datetime2", nullable: false), + PrintType = table.Column(type: "int", nullable: false), + ProductLine = table.Column(type: "nvarchar(max)", nullable: true), + BeginVin = table.Column(type: "nvarchar(max)", nullable: true), + EndVin = table.Column(type: "nvarchar(max)", nullable: true), + BeginHostSN = table.Column(type: "nvarchar(max)", nullable: true), + EndHostSN = table.Column(type: "nvarchar(max)", nullable: true), + SortId = table.Column(type: "uniqueidentifier", nullable: true), + ReportStatus = table.Column(type: "int", nullable: false), + MinOnlineTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisZhuHuBanPackingList", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisZhuHuBanPackingRec2", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Column00 = table.Column(type: "nvarchar(max)", nullable: true), + Column01 = table.Column(type: "nvarchar(max)", nullable: true), + Column02 = table.Column(type: "nvarchar(max)", nullable: true), + Column03 = table.Column(type: "nvarchar(max)", nullable: true), + Column04 = table.Column(type: "nvarchar(max)", nullable: true), + Column05 = table.Column(type: "nvarchar(max)", nullable: true), + Column06 = table.Column(type: "nvarchar(max)", nullable: true), + Column07 = table.Column(type: "nvarchar(max)", nullable: true), + Column08 = table.Column(type: "nvarchar(max)", nullable: true), + Column09 = table.Column(type: "nvarchar(max)", nullable: true), + Column10 = table.Column(type: "nvarchar(max)", nullable: true), + Column11 = table.Column(type: "nvarchar(max)", nullable: true), + Column12 = table.Column(type: "nvarchar(max)", nullable: true), + Column13 = table.Column(type: "nvarchar(max)", nullable: true), + Column14 = table.Column(type: "nvarchar(max)", nullable: true), + Column15 = table.Column(type: "nvarchar(max)", nullable: true), + Column16 = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisZhuHuBanPackingRec2", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisAssemblyCfgPart", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + IsKey = table.Column(type: "bit", nullable: false), + AssemblyCfgErpId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisAssemblyCfgPart", x => x.Id); + table.ForeignKey( + name: "FK_FisAssemblyCfgPart_FisAssemblyCfgErp_AssemblyCfgErpId", + column: x => x.AssemblyCfgErpId, + principalTable: "FisAssemblyCfgErp", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisAssemblyCfgVehicleChild", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ErpAssemblyId = table.Column(type: "uniqueidentifier", nullable: false), + AssemblyCfgVehicleId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisAssemblyCfgVehicleChild", x => x.Id); + table.ForeignKey( + name: "FK_FisAssemblyCfgVehicleChild_FisAssemblyCfgVehicle_AssemblyCfgVehicleId", + column: x => x.AssemblyCfgVehicleId, + principalTable: "FisAssemblyCfgVehicle", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisBillM100Part", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + PartType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartType2 = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartType3 = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + BillM100Id = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillM100Part", x => x.Id); + table.ForeignKey( + name: "FK_FisBillM100Part_FisBillM100_BillM100Id", + column: x => x.BillM100Id, + principalTable: "FisBillM100", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisBillM110Part", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + BillM110Id = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillM110Part", x => x.Id); + table.ForeignKey( + name: "FK_FisBillM110Part_FisBillM110_BillM110Id", + column: x => x.BillM110Id, + principalTable: "FisBillM110", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisBillR100Part", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + PartType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartType2 = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartType3 = table.Column(type: "nvarchar(max)", nullable: true), + BillR100Id = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillR100Part", x => x.Id); + table.ForeignKey( + name: "FK_FisBillR100Part_FisBillR100_BillR100Id", + column: x => x.BillR100Id, + principalTable: "FisBillR100", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisMenBanPackingRec", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + KNR = table.Column(type: "nvarchar(max)", nullable: true), + VIN = table.Column(type: "nvarchar(max)", nullable: true), + HostSN = table.Column(type: "nvarchar(max)", nullable: true), + VehicleModel_DoorPlankCode = table.Column(type: "nvarchar(max)", nullable: true), + TopBoxPositionNum = table.Column(type: "nvarchar(max)", nullable: true), + TopSAPMaterialNum = table.Column(type: "nvarchar(max)", nullable: true), + TopMaterialDescription = table.Column(type: "nvarchar(max)", nullable: true), + BelowSAPMaterialNum = table.Column(type: "nvarchar(max)", nullable: true), + BelowMaterialDescription = table.Column(type: "nvarchar(max)", nullable: true), + M100BillId = table.Column(type: "uniqueidentifier", nullable: true), + MenBanPackingListId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisMenBanPackingRec", x => x.Id); + table.ForeignKey( + name: "FK_FisMenBanPackingRec_FisMenBanPackingList_MenBanPackingListId", + column: x => x.MenBanPackingListId, + principalTable: "FisMenBanPackingList", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisBillSortCfg", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BillName = table.Column(type: "nvarchar(max)", nullable: true), + FileContentKeyword = table.Column(type: "nvarchar(max)", nullable: true), + MessageVersionCfgId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisBillSortCfg", x => x.Id); + table.ForeignKey( + name: "FK_FisBillSortCfg_FisMessageVersionCfg_MessageVersionCfgId", + column: x => x.MessageVersionCfgId, + principalTable: "FisMessageVersionCfg", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisRepeatM100Part", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + RepeatM100Id = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisRepeatM100Part", x => x.Id); + table.ForeignKey( + name: "FK_FisRepeatM100Part_FisRepeatM100_RepeatM100Id", + column: x => x.RepeatM100Id, + principalTable: "FisRepeatM100", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisRepeatM110Part", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "nvarchar(max)", nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + RepeatM110Id = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisRepeatM110Part", x => x.Id); + table.ForeignKey( + name: "FK_FisRepeatM110Part_FisRepeatM110_RepeatM110Id", + column: x => x.RepeatM110Id, + principalTable: "FisRepeatM110", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisRepeatR100Part", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + RepeatR100Id = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisRepeatR100Part", x => x.Id); + table.ForeignKey( + name: "FK_FisRepeatR100Part_FisRepeatR100_RepeatR100Id", + column: x => x.RepeatR100Id, + principalTable: "FisRepeatR100", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisUnknownAssemblyPart", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PartNum = table.Column(type: "float", nullable: true), + Description = table.Column(type: "nvarchar(max)", nullable: true), + UnknownAssemblyId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisUnknownAssemblyPart", x => x.Id); + table.ForeignKey( + name: "FK_FisUnknownAssemblyPart_FisUnknownAssembly_UnknownAssemblyId", + column: x => x.UnknownAssemblyId, + principalTable: "FisUnknownAssembly", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "FisZhuHuBanPackingRec", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + M100BillId = table.Column(type: "uniqueidentifier", nullable: false), + KNR = table.Column(type: "nvarchar(max)", nullable: true), + VIN = table.Column(type: "nvarchar(max)", nullable: true), + HostSN = table.Column(type: "int", nullable: true), + PartCode = table.Column(type: "nvarchar(max)", nullable: true), + PartCode2 = table.Column(type: "nvarchar(max)", nullable: true), + MaterialDescription = table.Column(type: "nvarchar(max)", nullable: true), + MaterialDescription2 = table.Column(type: "nvarchar(max)", nullable: true), + ZhuHuBanPackingListId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisZhuHuBanPackingRec", x => x.Id); + table.ForeignKey( + name: "FK_FisZhuHuBanPackingRec_FisZhuHuBanPackingList_ZhuHuBanPackingListId", + column: x => x.ZhuHuBanPackingListId, + principalTable: "FisZhuHuBanPackingList", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_FisAssemblyCfgPart_AssemblyCfgErpId", + table: "FisAssemblyCfgPart", + column: "AssemblyCfgErpId"); + + migrationBuilder.CreateIndex( + name: "IX_FisAssemblyCfgPart_PartCode", + table: "FisAssemblyCfgPart", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_AssemblyCfgVehicleChild_ErpAssemblyId", + table: "FisAssemblyCfgVehicleChild", + column: "ErpAssemblyId"); + + migrationBuilder.CreateIndex( + name: "IX_FisAssemblyCfgVehicleChild_AssemblyCfgVehicleId", + table: "FisAssemblyCfgVehicleChild", + column: "AssemblyCfgVehicleId"); + + migrationBuilder.CreateIndex( + name: "IX_BillM100_HostSN2", + table: "FisBillM100", + column: "HostSN"); + + migrationBuilder.CreateIndex( + name: "IX_BillM100_ProductLine2", + table: "FisBillM100", + column: "ProductLine"); + + migrationBuilder.CreateIndex( + name: "IX_BillM100_SerialNum", + table: "FisBillM100", + column: "SerialNum"); + + migrationBuilder.CreateIndex( + name: "IX_BillM100_SerialNumStr2", + table: "FisBillM100", + column: "SerialNumStr"); + + migrationBuilder.CreateIndex( + name: "IX_BillM100_VIN2", + table: "FisBillM100", + column: "VIN"); + + migrationBuilder.CreateIndex( + name: "IX_BillM100Part_PartCode2", + table: "FisBillM100Part", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisBillM100Part_BillM100Id", + table: "FisBillM100Part", + column: "BillM100Id"); + + migrationBuilder.CreateIndex( + name: "IX_BillM110_VIN3", + table: "FisBillM110", + column: "VIN"); + + migrationBuilder.CreateIndex( + name: "IX_BillM110Part_PartCode3", + table: "FisBillM110Part", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisBillM110Part_BillM110Id", + table: "FisBillM110Part", + column: "BillM110Id"); + + migrationBuilder.CreateIndex( + name: "IX_BillR100_HostSN1", + table: "FisBillR100", + column: "HostSN"); + + migrationBuilder.CreateIndex( + name: "IX_BillR100_KNR", + table: "FisBillR100", + column: "KNR"); + + migrationBuilder.CreateIndex( + name: "IX_BillR100_ProductLine1", + table: "FisBillR100", + column: "ProductLine"); + + migrationBuilder.CreateIndex( + name: "IX_BillR100_SerialNumStr1", + table: "FisBillR100", + column: "SerialNumStr"); + + migrationBuilder.CreateIndex( + name: "IX_BillR100Part_PartCode1", + table: "FisBillR100Part", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisBillR100Part_BillR100Id", + table: "FisBillR100Part", + column: "BillR100Id"); + + migrationBuilder.CreateIndex( + name: "IX_FisBillSortCfg_MessageVersionCfgId", + table: "FisBillSortCfg", + column: "MessageVersionCfgId"); + + migrationBuilder.CreateIndex( + name: "IX_DicItem_DicItemCode", + table: "FisDicItem", + column: "DicItemCode"); + + migrationBuilder.CreateIndex( + name: "IX_DicItem_DicTypeCode", + table: "FisDicItem", + column: "DicTypeCode"); + + migrationBuilder.CreateIndex( + name: "IX_DicType_DicTypeCode", + table: "FisDicType", + column: "DicTypeCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisLineSN_ProductType_ProductLine_PartType", + table: "FisLineSN", + columns: new[] { "ProductType", "ProductLine", "PartType" }, + unique: true, + filter: "[ProductLine] IS NOT NULL AND [PartType] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_MaterialExt_MaterialNum", + table: "FisMaterialExt", + column: "MaterialNum"); + + migrationBuilder.CreateIndex( + name: "IX_MaterialExt_MaterialType", + table: "FisMaterialExt", + column: "MaterialType"); + + migrationBuilder.CreateIndex( + name: "IX_MaterialExt_MaterialType2", + table: "FisMaterialExt", + column: "MaterialType2"); + + migrationBuilder.CreateIndex( + name: "IX_MaterialExt_MaterialType3", + table: "FisMaterialExt", + column: "MaterialType3"); + + migrationBuilder.CreateIndex( + name: "IX_MaterialExt_RelationKey", + table: "FisMaterialExt", + column: "RelationKey"); + + migrationBuilder.CreateIndex( + name: "IX_MaterialExt_VehicleModel", + table: "FisMaterialExt", + column: "VehicleModel"); + + migrationBuilder.CreateIndex( + name: "IX_FisMenBanPackingRec_MenBanPackingListId", + table: "FisMenBanPackingRec", + column: "MenBanPackingListId"); + + migrationBuilder.CreateIndex( + name: "IX_PartCfg_PartCode", + table: "FisPartCfg", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_PartCfg_PartType", + table: "FisPartCfg", + column: "PartType"); + + migrationBuilder.CreateIndex( + name: "IX_PartCfg_PartType2", + table: "FisPartCfg", + column: "PartType2"); + + migrationBuilder.CreateIndex( + name: "IX_PartCfg_PartType3", + table: "FisPartCfg", + column: "PartType3"); + + migrationBuilder.CreateIndex( + name: "IX_FisPrintTemplateConfiguration_GroupName_PartType", + table: "FisPrintTemplateConfiguration", + columns: new[] { "GroupName", "PartType" }, + unique: true, + filter: "[GroupName] IS NOT NULL AND [PartType] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_ProductLine_ProductLineCode", + table: "FisProductLine", + column: "ProductLineCode"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatM100_HostSN", + table: "FisRepeatM100", + column: "HostSN"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatM100_KNR", + table: "FisRepeatM100", + column: "KNR"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatM100_ProductLine", + table: "FisRepeatM100", + column: "ProductLine"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatM100_VIN", + table: "FisRepeatM100", + column: "VIN"); + + migrationBuilder.CreateIndex( + name: "IX_FisRepeatM100Part_RepeatM100Id", + table: "FisRepeatM100Part", + column: "RepeatM100Id"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatM100Part_PartCode", + table: "FisRepeatM100Part", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisRepeatM110Part_RepeatM110Id", + table: "FisRepeatM110Part", + column: "RepeatM110Id"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatR100_HostSN", + table: "FisRepeatR100", + column: "HostSN"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatR100_KNR", + table: "FisRepeatR100", + column: "KNR"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatR100_ProductLine", + table: "FisRepeatR100", + column: "ProductLine"); + + migrationBuilder.CreateIndex( + name: "IX_FisRepeatR100Part_RepeatR100Id", + table: "FisRepeatR100Part", + column: "RepeatR100Id"); + + migrationBuilder.CreateIndex( + name: "IX_RepeatR100Part_PartCode", + table: "FisRepeatR100Part", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisUnknownAssemblyPart_UnknownAssemblyId", + table: "FisUnknownAssemblyPart", + column: "UnknownAssemblyId"); + + migrationBuilder.CreateIndex( + name: "IX_UnknownAssemblyPart_PartCode", + table: "FisUnknownAssemblyPart", + column: "PartCode"); + + migrationBuilder.CreateIndex( + name: "IX_FisZHBPrintStatus_GroupName_VIN", + table: "FisZHBPrintStatus", + columns: new[] { "GroupName", "VIN" }, + unique: true, + filter: "[GroupName] IS NOT NULL AND [VIN] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_FisZhuHuBanPackingRec_ZhuHuBanPackingListId", + table: "FisZhuHuBanPackingRec", + column: "ZhuHuBanPackingListId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "FisAssemblyCfgGroup"); + + migrationBuilder.DropTable( + name: "FisAssemblyCfgPart"); + + migrationBuilder.DropTable( + name: "FisAssemblyCfgVehicleChild"); + + migrationBuilder.DropTable( + name: "FisBillM100Part"); + + migrationBuilder.DropTable( + name: "FisBillM110Part"); + + migrationBuilder.DropTable( + name: "FisBillR100Part"); + + migrationBuilder.DropTable( + name: "FisBillSortCfg"); + + migrationBuilder.DropTable( + name: "FisBooks"); + + migrationBuilder.DropTable( + name: "FisDicItem"); + + migrationBuilder.DropTable( + name: "FisDicType"); + + migrationBuilder.DropTable( + name: "FisExcludePartCfg"); + + migrationBuilder.DropTable( + name: "FisGlobalSettings"); + + migrationBuilder.DropTable( + name: "FisLineSN"); + + migrationBuilder.DropTable( + name: "FisLogRemind"); + + migrationBuilder.DropTable( + name: "FisMaterialExt"); + + migrationBuilder.DropTable( + name: "FisMenBanPackingRec"); + + migrationBuilder.DropTable( + name: "FisMessageReceive"); + + migrationBuilder.DropTable( + name: "FisMessageReceiveArchive"); + + migrationBuilder.DropTable( + name: "FisNotMatchTempBill"); + + migrationBuilder.DropTable( + name: "FisPartCfg"); + + migrationBuilder.DropTable( + name: "FisPartSwitch"); + + migrationBuilder.DropTable( + name: "FisPrintTemplateConfiguration"); + + migrationBuilder.DropTable( + name: "FisProductLine"); + + migrationBuilder.DropTable( + name: "FisRepeatM100Part"); + + migrationBuilder.DropTable( + name: "FisRepeatM110Part"); + + migrationBuilder.DropTable( + name: "FisRepeatR100Part"); + + migrationBuilder.DropTable( + name: "FisSequenceInfo"); + + migrationBuilder.DropTable( + name: "FisTB_BILL"); + + migrationBuilder.DropTable( + name: "FisTB_BILL_HIS"); + + migrationBuilder.DropTable( + name: "FisTB_BILL_SCRAP"); + + migrationBuilder.DropTable( + name: "FisTransmissionModeCfg"); + + migrationBuilder.DropTable( + name: "FisTS_SORT_DETAIL"); + + migrationBuilder.DropTable( + name: "FisTS_SORT_DETAIL_HIS"); + + migrationBuilder.DropTable( + name: "FisUnknownAssemblyPart"); + + migrationBuilder.DropTable( + name: "FisUser2ProductLine"); + + migrationBuilder.DropTable( + name: "FisZHBPrintStatus"); + + migrationBuilder.DropTable( + name: "FisZhuHuBanPackingRec"); + + migrationBuilder.DropTable( + name: "FisZhuHuBanPackingRec2"); + + migrationBuilder.DropTable( + name: "FisAssemblyCfgErp"); + + migrationBuilder.DropTable( + name: "FisAssemblyCfgVehicle"); + + migrationBuilder.DropTable( + name: "FisBillM100"); + + migrationBuilder.DropTable( + name: "FisBillM110"); + + migrationBuilder.DropTable( + name: "FisBillR100"); + + migrationBuilder.DropTable( + name: "FisMessageVersionCfg"); + + migrationBuilder.DropTable( + name: "FisMenBanPackingList"); + + migrationBuilder.DropTable( + name: "FisRepeatM100"); + + migrationBuilder.DropTable( + name: "FisRepeatM110"); + + migrationBuilder.DropTable( + name: "FisRepeatR100"); + + migrationBuilder.DropTable( + name: "FisUnknownAssembly"); + + migrationBuilder.DropTable( + name: "FisZhuHuBanPackingList"); + } + } +} diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250722083754_2025072201.Designer.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250722083754_2025072201.Designer.cs new file mode 100644 index 0000000..443de52 --- /dev/null +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250722083754_2025072201.Designer.cs @@ -0,0 +1,3578 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using WY.NewJit.EntityFrameworkCore; + +namespace WY.NewJit.Migrations +{ + [DbContext(typeof(NewJitDbContext))] + [Migration("20250722083754_2025072201")] + partial class _2025072201 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("WY.NewJit.Books.Book", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Price") + .HasColumnType("real"); + + b.Property("PublishDate") + .HasColumnType("datetime2"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisBooks"); + }); + + modelBuilder.Entity("WY.NewJit.Commons.SequenceInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("SequenceNum") + .HasColumnType("bigint"); + + b.Property("SequenceType") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisSequenceInfo"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginVin") + .HasColumnType("nvarchar(max)"); + + b.Property("BillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("BillSerialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Capacity") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("EndVin") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MinOnlineTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintDate") + .HasColumnType("datetime2"); + + b.Property("PrintType") + .HasColumnType("int"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReportStatus") + .HasColumnType("int"); + + b.Property("SortId") + .HasColumnType("uniqueidentifier"); + + b.Property("VehicleModel") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisMenBanPackingList"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("M100BillId") + .HasColumnType("uniqueidentifier"); + + b.Property("MenBanPackingListId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartCode1") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode2") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode3") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode4") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode5") + .HasColumnType("nvarchar(max)"); + + b.Property("SN") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MenBanPackingListId"); + + b.ToTable("FisMenBanPackingRec"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.MaterialExt", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDescription2") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialMemo") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("MaterialType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialType2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialType3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RelationKey") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("VehicleModel") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("promo") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialNum") + .HasDatabaseName("IX_MaterialExt_MaterialNum"); + + b.HasIndex("MaterialType") + .HasDatabaseName("IX_MaterialExt_MaterialType"); + + b.HasIndex("MaterialType2") + .HasDatabaseName("IX_MaterialExt_MaterialType2"); + + b.HasIndex("MaterialType3") + .HasDatabaseName("IX_MaterialExt_MaterialType3"); + + b.HasIndex("RelationKey") + .HasDatabaseName("IX_MaterialExt_RelationKey"); + + b.HasIndex("VehicleModel") + .HasDatabaseName("IX_MaterialExt_VehicleModel"); + + b.ToTable("FisMaterialExt"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CustId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DetailQty") + .HasColumnType("int"); + + b.Property("DockCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExecuteRemark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FinishTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GUID") + .HasColumnType("uniqueidentifier"); + + b.Property("GateCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GateName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsExecute") + .HasColumnType("bit"); + + b.Property("OperName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum3") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("TransportType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TruckNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum"); + + b.ToTable("FisTB_BILL"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_HIS", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CustId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DetailQty") + .HasColumnType("int"); + + b.Property("DockCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FinishTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GUID") + .HasColumnType("uniqueidentifier"); + + b.Property("GateCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GateName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OperName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum3") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("TransportType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TruckNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum"); + + b.ToTable("FisTB_BILL_HIS"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_SCRAP", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExecuteTime") + .HasColumnType("datetime2"); + + b.Property("IsExecute") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("FisTB_BILL_SCRAP"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTS_SORT_DETAIL", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VinCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BarCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustBarCode") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CustPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DispatchDate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Dock") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FullBarCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FyonNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LineNum") + .HasColumnType("int"); + + b.Property("PlanQty") + .HasColumnType("money"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("money"); + + b.Property("ReceiptQty") + .HasColumnType("money"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SeqNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("bigint"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum", "VinCode", "PartCode"); + + b.ToTable("FisTS_SORT_DETAIL"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTS_SORT_DETAIL_HIS", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VinCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BarCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustBarCode") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CustPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DispatchDate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Dock") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FullBarCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FyonNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LineNum") + .HasColumnType("int"); + + b.Property("PlanQty") + .HasColumnType("money"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("money"); + + b.Property("ReceiptQty") + .HasColumnType("money"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SeqNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("bigint"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum", "VinCode", "PartCode"); + + b.ToTable("FisTS_SORT_DETAIL_HIS"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ProductLine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductLineCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProductLineName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProductLineCode") + .HasDatabaseName("IX_ProductLine_ProductLineCode"); + + b.ToTable("FisProductLine"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.User2ProductLine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisUser2ProductLine"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingList", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginVin") + .HasColumnType("nvarchar(max)"); + + b.Property("BillLocation") + .HasColumnType("nvarchar(max)"); + + b.Property("BillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("BillSerialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Capacity") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("EndVin") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MinOnlineTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintDate") + .HasColumnType("datetime2"); + + b.Property("PrintType") + .HasColumnType("int"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReportStatus") + .HasColumnType("int"); + + b.Property("SortId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisZhuHuBanPackingList"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("M100BillId") + .HasColumnType("uniqueidentifier"); + + b.Property("MaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDescription2") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode2") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("ZhuHuBanPackingListId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ZhuHuBanPackingListId"); + + b.ToTable("FisZhuHuBanPackingRec"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec2", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Column00") + .HasColumnType("nvarchar(max)"); + + b.Property("Column01") + .HasColumnType("nvarchar(max)"); + + b.Property("Column02") + .HasColumnType("nvarchar(max)"); + + b.Property("Column03") + .HasColumnType("nvarchar(max)"); + + b.Property("Column04") + .HasColumnType("nvarchar(max)"); + + b.Property("Column05") + .HasColumnType("nvarchar(max)"); + + b.Property("Column06") + .HasColumnType("nvarchar(max)"); + + b.Property("Column07") + .HasColumnType("nvarchar(max)"); + + b.Property("Column08") + .HasColumnType("nvarchar(max)"); + + b.Property("Column09") + .HasColumnType("nvarchar(max)"); + + b.Property("Column10") + .HasColumnType("nvarchar(max)"); + + b.Property("Column11") + .HasColumnType("nvarchar(max)"); + + b.Property("Column12") + .HasColumnType("nvarchar(max)"); + + b.Property("Column13") + .HasColumnType("nvarchar(max)"); + + b.Property("Column14") + .HasColumnType("nvarchar(max)"); + + b.Property("Column15") + .HasColumnType("nvarchar(max)"); + + b.Property("Column16") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("FisZhuHuBanPackingRec2"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgErp", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ErpAssemblyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ErpAssemblyName") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpAssemblyVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NewVersionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelationKey") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModel") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgErp"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisable") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VehicleModel") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgGroup"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCfgErpId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsKey") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("AssemblyCfgErpId"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_FisAssemblyCfgPart_PartCode"); + + b.ToTable("FisAssemblyCfgPart"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyName") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActivate") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgVehicle"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicleChild", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCfgVehicleId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ErpAssemblyId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("AssemblyCfgVehicleId"); + + b.HasIndex("ErpAssemblyId") + .HasDatabaseName("IX_AssemblyCfgVehicleChild_ErpAssemblyId"); + + b.ToTable("FisAssemblyCfgVehicleChild"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.DicItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DicItemCode") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DicItemName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DicItemSort1") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort2") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort3") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort4") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort5") + .HasColumnType("nvarchar(max)"); + + b.Property("DicTypeCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DicItemCode") + .HasDatabaseName("IX_DicItem_DicItemCode"); + + b.HasIndex("DicTypeCode") + .HasDatabaseName("IX_DicItem_DicTypeCode"); + + b.ToTable("FisDicItem"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.DicType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DicTypeCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DicTypeName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DicTypeCode") + .HasDatabaseName("IX_DicType_DicTypeCode"); + + b.ToTable("FisDicType"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.ExcludePartCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExcludeReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisExcludePartCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.GlobalSettings", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("RefreshMessageParseCache") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.HasKey("Id"); + + b.ToTable("FisGlobalSettings"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.LineSN", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPrintTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(450)"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(450)"); + + b.Property("ProductType") + .HasColumnType("int"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SN") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("ProductType", "ProductLine", "PartType") + .IsUnique() + .HasFilter("[ProductLine] IS NOT NULL AND [PartType] IS NOT NULL"); + + b.ToTable("FisLineSN"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.LogRemind", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LogDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LogStatus") + .HasColumnType("int"); + + b.Property("LogTitle") + .HasColumnType("nvarchar(max)"); + + b.Property("LogType") + .HasColumnType("int"); + + b.Property("SeriousLevel") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisLogRemind"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PartCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisable") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartName") + .HasColumnType("nvarchar(max)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RelationKey") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_PartCfg_PartCode"); + + b.HasIndex("PartType") + .HasDatabaseName("IX_PartCfg_PartType"); + + b.HasIndex("PartType2") + .HasDatabaseName("IX_PartCfg_PartType2"); + + b.HasIndex("PartType3") + .HasDatabaseName("IX_PartCfg_PartType3"); + + b.ToTable("FisPartCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PartSwitch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveBeginTime") + .HasColumnType("datetime2"); + + b.Property("ActiveEndTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SourcePartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TargetPartCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisPartSwitch"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PrintTemplateConfiguration", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TemplateName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName", "PartType") + .IsUnique() + .HasFilter("[GroupName] IS NOT NULL AND [PartType] IS NOT NULL"); + + b.ToTable("FisPrintTemplateConfiguration"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("CanNotPrint") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("HostSN2") + .HasColumnType("int"); + + b.Property("IsPartSwitch") + .HasColumnType("bit"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedReplenishPrint") + .HasColumnType("int"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperationType") + .HasColumnType("int"); + + b.Property("Operator") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintTime") + .HasColumnType("datetime2"); + + b.Property("PrintTime2") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("SerialNumStr") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_BillM100_HostSN2"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_BillM100_ProductLine2"); + + b.HasIndex("SerialNum") + .HasDatabaseName("IX_BillM100_SerialNum"); + + b.HasIndex("SerialNumStr") + .HasDatabaseName("IX_BillM100_SerialNumStr2"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_BillM100_VIN2"); + + b.ToTable("FisBillM100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillM100Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType3") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("BillM100Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillM100Part_PartCode2"); + + b.ToTable("FisBillM100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_BillM110_VIN3"); + + b.ToTable("FisBillM110"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillM110Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BillM110Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillM110Part_PartCode3"); + + b.ToTable("FisBillM110Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("IsPartSwitch") + .HasColumnType("bit"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("PrintTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("SerialNumStr") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_BillR100_HostSN1"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_BillR100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_BillR100_ProductLine1"); + + b.HasIndex("SerialNumStr") + .HasDatabaseName("IX_BillR100_SerialNumStr1"); + + b.ToTable("FisBillR100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillR100Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType3") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BillR100Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillR100Part_PartCode1"); + + b.ToTable("FisBillR100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_RepeatM100_HostSN"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_RepeatM100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_RepeatM100_ProductLine"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_RepeatM100_VIN"); + + b.ToTable("FisRepeatM100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatM100Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_RepeatM100Part_PartCode"); + + b.HasIndex("RepeatM100Id"); + + b.ToTable("FisRepeatM100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisRepeatM110"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatM110Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RepeatM110Id"); + + b.ToTable("FisRepeatM110Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_RepeatR100_HostSN"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_RepeatR100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_RepeatR100_ProductLine"); + + b.ToTable("FisRepeatR100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatR100Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_RepeatR100Part_PartCode"); + + b.HasIndex("RepeatR100Id"); + + b.ToTable("FisRepeatR100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssembly", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillID") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("ScanPoint") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisUnknownAssembly"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssemblyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("UnknownAssemblyId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_UnknownAssemblyPart_PartCode"); + + b.HasIndex("UnknownAssemblyId"); + + b.ToTable("FisUnknownAssemblyPart"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.ZHBPrintStatus", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName", "VIN") + .IsUnique() + .HasFilter("[GroupName] IS NOT NULL AND [VIN] IS NOT NULL"); + + b.ToTable("FisZHBPrintStatus"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.BillSortCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FileContentKeyword") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageVersionCfgId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MessageVersionCfgId"); + + b.ToTable("FisBillSortCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.MessageVersionCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileNameKeyword") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisMessageVersionCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.MessageReceive", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ErrorCount") + .HasColumnType("int"); + + b.Property("ErrorMessage") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastUpdateTime") + .HasColumnType("datetime2"); + + b.Property("MessageContent") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveStatus") + .HasColumnType("int"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("FisMessageReceive"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.MessageReceiveArchive", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillHostSN") + .HasColumnType("int"); + + b.Property("BillOnlineTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastUpdateTime") + .HasColumnType("datetime2"); + + b.Property("MessageContent") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageReceiveId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReceiveStatus") + .HasColumnType("int"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("FisMessageReceiveArchive"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.TransmissionModeCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsApply") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TransmissionModeContent") + .HasColumnType("nvarchar(max)"); + + b.Property("TransmissionModeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisTransmissionModeCfg"); + }); + + modelBuilder.Entity("WY.NewJit.TianHe.NotMatchTempBill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("NotMatchBillId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisNotMatchTempBill"); + }); + + modelBuilder.Entity("WY.NewJit.Users.AppUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingRec", b => + { + b.HasOne("WY.NewJit.Extends.MenBanPackingList", null) + .WithMany("Details") + .HasForeignKey("MenBanPackingListId"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec", b => + { + b.HasOne("WY.NewJit.Extends.ZhuHuBanPackingList", null) + .WithMany("Details") + .HasForeignKey("ZhuHuBanPackingListId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgPart", b => + { + b.HasOne("WY.NewJit.MsgBaseData.AssemblyCfgErp", null) + .WithMany("Details") + .HasForeignKey("AssemblyCfgErpId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicleChild", b => + { + b.HasOne("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", null) + .WithMany("AssemblyCfgVehicleChilds") + .HasForeignKey("AssemblyCfgVehicleId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillM100", null) + .WithMany("BillM100Parts") + .HasForeignKey("BillM100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillM110", null) + .WithMany("BillM110Parts") + .HasForeignKey("BillM110Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillR100", null) + .WithMany("BillR100Parts") + .HasForeignKey("BillR100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatM100", null) + .WithMany("M100RepeatParts") + .HasForeignKey("RepeatM100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatM110", null) + .WithMany("M110RepeatParts") + .HasForeignKey("RepeatM110Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatR100", null) + .WithMany("R100RepeatParts") + .HasForeignKey("RepeatR100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssemblyPart", b => + { + b.HasOne("WY.NewJit.MsgCheck.UnknownAssembly", null) + .WithMany("UnknownAssemblyParts") + .HasForeignKey("UnknownAssemblyId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.BillSortCfg", b => + { + b.HasOne("WY.NewJit.MsgConversion.MessageVersionCfg", null) + .WithMany("Details") + .HasForeignKey("MessageVersionCfgId"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingList", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgErp", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", b => + { + b.Navigation("AssemblyCfgVehicleChilds"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100", b => + { + b.Navigation("BillM100Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110", b => + { + b.Navigation("BillM110Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100", b => + { + b.Navigation("BillR100Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100", b => + { + b.Navigation("M100RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110", b => + { + b.Navigation("M110RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100", b => + { + b.Navigation("R100RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssembly", b => + { + b.Navigation("UnknownAssemblyParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.MessageVersionCfg", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250722083754_2025072201.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250722083754_2025072201.cs new file mode 100644 index 0000000..890122a --- /dev/null +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/20250722083754_2025072201.cs @@ -0,0 +1,83 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace WY.NewJit.Migrations +{ + public partial class _2025072201 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "VehicleModel_DoorPlankCode", + table: "FisMenBanPackingRec", + newName: "SN"); + + migrationBuilder.RenameColumn( + name: "TopSAPMaterialNum", + table: "FisMenBanPackingRec", + newName: "PartCode5"); + + migrationBuilder.RenameColumn( + name: "TopMaterialDescription", + table: "FisMenBanPackingRec", + newName: "PartCode4"); + + migrationBuilder.RenameColumn( + name: "TopBoxPositionNum", + table: "FisMenBanPackingRec", + newName: "PartCode3"); + + migrationBuilder.RenameColumn( + name: "BelowSAPMaterialNum", + table: "FisMenBanPackingRec", + newName: "PartCode2"); + + migrationBuilder.RenameColumn( + name: "BelowMaterialDescription", + table: "FisMenBanPackingRec", + newName: "PartCode1"); + + migrationBuilder.RenameColumn( + name: "BillLocation", + table: "FisMenBanPackingList", + newName: "VehicleModel"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "SN", + table: "FisMenBanPackingRec", + newName: "VehicleModel_DoorPlankCode"); + + migrationBuilder.RenameColumn( + name: "PartCode5", + table: "FisMenBanPackingRec", + newName: "TopSAPMaterialNum"); + + migrationBuilder.RenameColumn( + name: "PartCode4", + table: "FisMenBanPackingRec", + newName: "TopMaterialDescription"); + + migrationBuilder.RenameColumn( + name: "PartCode3", + table: "FisMenBanPackingRec", + newName: "TopBoxPositionNum"); + + migrationBuilder.RenameColumn( + name: "PartCode2", + table: "FisMenBanPackingRec", + newName: "BelowSAPMaterialNum"); + + migrationBuilder.RenameColumn( + name: "PartCode1", + table: "FisMenBanPackingRec", + newName: "BelowMaterialDescription"); + + migrationBuilder.RenameColumn( + name: "VehicleModel", + table: "FisMenBanPackingList", + newName: "BillLocation"); + } + } +} diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/NewJitDbContextModelSnapshot.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/NewJitDbContextModelSnapshot.cs new file mode 100644 index 0000000..a3b7ee7 --- /dev/null +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/Migrations/NewJitDbContextModelSnapshot.cs @@ -0,0 +1,3576 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using WY.NewJit.EntityFrameworkCore; + +namespace WY.NewJit.Migrations +{ + [DbContext(typeof(NewJitDbContext))] + partial class NewJitDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("WY.NewJit.Books.Book", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Price") + .HasColumnType("real"); + + b.Property("PublishDate") + .HasColumnType("datetime2"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisBooks"); + }); + + modelBuilder.Entity("WY.NewJit.Commons.SequenceInfo", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("SequenceNum") + .HasColumnType("bigint"); + + b.Property("SequenceType") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisSequenceInfo"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginVin") + .HasColumnType("nvarchar(max)"); + + b.Property("BillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("BillSerialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Capacity") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("EndVin") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MinOnlineTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintDate") + .HasColumnType("datetime2"); + + b.Property("PrintType") + .HasColumnType("int"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReportStatus") + .HasColumnType("int"); + + b.Property("SortId") + .HasColumnType("uniqueidentifier"); + + b.Property("VehicleModel") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisMenBanPackingList"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("M100BillId") + .HasColumnType("uniqueidentifier"); + + b.Property("MenBanPackingListId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartCode1") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode2") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode3") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode4") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode5") + .HasColumnType("nvarchar(max)"); + + b.Property("SN") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MenBanPackingListId"); + + b.ToTable("FisMenBanPackingRec"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.MaterialExt", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDescription2") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialMemo") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("MaterialType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialType2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialType3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RelationKey") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("VehicleModel") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("promo") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialNum") + .HasDatabaseName("IX_MaterialExt_MaterialNum"); + + b.HasIndex("MaterialType") + .HasDatabaseName("IX_MaterialExt_MaterialType"); + + b.HasIndex("MaterialType2") + .HasDatabaseName("IX_MaterialExt_MaterialType2"); + + b.HasIndex("MaterialType3") + .HasDatabaseName("IX_MaterialExt_MaterialType3"); + + b.HasIndex("RelationKey") + .HasDatabaseName("IX_MaterialExt_RelationKey"); + + b.HasIndex("VehicleModel") + .HasDatabaseName("IX_MaterialExt_VehicleModel"); + + b.ToTable("FisMaterialExt"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CustId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DetailQty") + .HasColumnType("int"); + + b.Property("DockCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExecuteRemark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FinishTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GUID") + .HasColumnType("uniqueidentifier"); + + b.Property("GateCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GateName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsExecute") + .HasColumnType("bit"); + + b.Property("OperName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum3") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("TransportType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TruckNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum"); + + b.ToTable("FisTB_BILL"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_HIS", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AccountDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CustId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DetailQty") + .HasColumnType("int"); + + b.Property("DockCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FinishTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GUID") + .HasColumnType("uniqueidentifier"); + + b.Property("GateCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GateName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OperName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SourceBillNum3") + .HasColumnType("nvarchar(max)"); + + b.Property("StartTime") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("TransportType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TruckNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("int"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum"); + + b.ToTable("FisTB_BILL_HIS"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_SCRAP", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExecuteTime") + .HasColumnType("datetime2"); + + b.Property("IsExecute") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("FisTB_BILL_SCRAP"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTS_SORT_DETAIL", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VinCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BarCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustBarCode") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CustPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DispatchDate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Dock") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FullBarCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FyonNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LineNum") + .HasColumnType("int"); + + b.Property("PlanQty") + .HasColumnType("money"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("money"); + + b.Property("ReceiptQty") + .HasColumnType("money"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SeqNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("bigint"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum", "VinCode", "PartCode"); + + b.ToTable("FisTS_SORT_DETAIL"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.PaiGe.WMS.FisTS_SORT_DETAIL_HIS", b => + { + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VinCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BarCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustBarCode") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CustPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DispatchDate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Dock") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FullBarCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("FyonNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LineNum") + .HasColumnType("int"); + + b.Property("PlanQty") + .HasColumnType("money"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("money"); + + b.Property("ReceiptQty") + .HasColumnType("money"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SeqNum") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UID") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("bigint"); + + b.Property("VendId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("BillNum", "VinCode", "PartCode"); + + b.ToTable("FisTS_SORT_DETAIL_HIS"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ProductLine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductLineCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ProductLineName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProductLineCode") + .HasDatabaseName("IX_ProductLine_ProductLineCode"); + + b.ToTable("FisProductLine"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.User2ProductLine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisUser2ProductLine"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingList", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginVin") + .HasColumnType("nvarchar(max)"); + + b.Property("BillLocation") + .HasColumnType("nvarchar(max)"); + + b.Property("BillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("BillSerialNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Capacity") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EndHostSN") + .HasColumnType("nvarchar(max)"); + + b.Property("EndVin") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MinOnlineTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintDate") + .HasColumnType("datetime2"); + + b.Property("PrintType") + .HasColumnType("int"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReportStatus") + .HasColumnType("int"); + + b.Property("SortId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisZhuHuBanPackingList"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("M100BillId") + .HasColumnType("uniqueidentifier"); + + b.Property("MaterialDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDescription2") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode2") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("ZhuHuBanPackingListId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ZhuHuBanPackingListId"); + + b.ToTable("FisZhuHuBanPackingRec"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec2", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Column00") + .HasColumnType("nvarchar(max)"); + + b.Property("Column01") + .HasColumnType("nvarchar(max)"); + + b.Property("Column02") + .HasColumnType("nvarchar(max)"); + + b.Property("Column03") + .HasColumnType("nvarchar(max)"); + + b.Property("Column04") + .HasColumnType("nvarchar(max)"); + + b.Property("Column05") + .HasColumnType("nvarchar(max)"); + + b.Property("Column06") + .HasColumnType("nvarchar(max)"); + + b.Property("Column07") + .HasColumnType("nvarchar(max)"); + + b.Property("Column08") + .HasColumnType("nvarchar(max)"); + + b.Property("Column09") + .HasColumnType("nvarchar(max)"); + + b.Property("Column10") + .HasColumnType("nvarchar(max)"); + + b.Property("Column11") + .HasColumnType("nvarchar(max)"); + + b.Property("Column12") + .HasColumnType("nvarchar(max)"); + + b.Property("Column13") + .HasColumnType("nvarchar(max)"); + + b.Property("Column14") + .HasColumnType("nvarchar(max)"); + + b.Property("Column15") + .HasColumnType("nvarchar(max)"); + + b.Property("Column16") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("FisZhuHuBanPackingRec2"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgErp", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ErpAssemblyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ErpAssemblyName") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpAssemblyVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("GroupId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NewVersionId") + .HasColumnType("uniqueidentifier"); + + b.Property("RelationKey") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModel") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgErp"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisable") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VehicleModel") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgGroup"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCfgErpId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsKey") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("AssemblyCfgErpId"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_FisAssemblyCfgPart_PartCode"); + + b.ToTable("FisAssemblyCfgPart"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyName") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActivate") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisAssemblyCfgVehicle"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicleChild", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCfgVehicleId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ErpAssemblyId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("AssemblyCfgVehicleId"); + + b.HasIndex("ErpAssemblyId") + .HasDatabaseName("IX_AssemblyCfgVehicleChild_ErpAssemblyId"); + + b.ToTable("FisAssemblyCfgVehicleChild"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.DicItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DicItemCode") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DicItemName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("DicItemSort1") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort2") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort3") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort4") + .HasColumnType("nvarchar(max)"); + + b.Property("DicItemSort5") + .HasColumnType("nvarchar(max)"); + + b.Property("DicTypeCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DicItemCode") + .HasDatabaseName("IX_DicItem_DicItemCode"); + + b.HasIndex("DicTypeCode") + .HasDatabaseName("IX_DicItem_DicTypeCode"); + + b.ToTable("FisDicItem"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.DicType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DicTypeCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DicTypeName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DicTypeCode") + .HasDatabaseName("IX_DicType_DicTypeCode"); + + b.ToTable("FisDicType"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.ExcludePartCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExcludeReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisExcludePartCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.GlobalSettings", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("RefreshMessageParseCache") + .HasMaxLength(1) + .HasColumnType("nvarchar(1)"); + + b.HasKey("Id"); + + b.ToTable("FisGlobalSettings"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.LineSN", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPrintTime") + .HasColumnType("datetime2"); + + b.Property("PartType") + .HasColumnType("nvarchar(450)"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(450)"); + + b.Property("ProductType") + .HasColumnType("int"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SN") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("ProductType", "ProductLine", "PartType") + .IsUnique() + .HasFilter("[ProductLine] IS NOT NULL AND [PartType] IS NOT NULL"); + + b.ToTable("FisLineSN"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.LogRemind", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LogDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LogStatus") + .HasColumnType("int"); + + b.Property("LogTitle") + .HasColumnType("nvarchar(max)"); + + b.Property("LogType") + .HasColumnType("int"); + + b.Property("SeriousLevel") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisLogRemind"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PartCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDisable") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartName") + .HasColumnType("nvarchar(max)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RelationKey") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_PartCfg_PartCode"); + + b.HasIndex("PartType") + .HasDatabaseName("IX_PartCfg_PartType"); + + b.HasIndex("PartType2") + .HasDatabaseName("IX_PartCfg_PartType2"); + + b.HasIndex("PartType3") + .HasDatabaseName("IX_PartCfg_PartType3"); + + b.ToTable("FisPartCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PartSwitch", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveBeginTime") + .HasColumnType("datetime2"); + + b.Property("ActiveEndTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SourcePartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TargetPartCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisPartSwitch"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.PrintTemplateConfiguration", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TemplateName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName", "PartType") + .IsUnique() + .HasFilter("[GroupName] IS NOT NULL AND [PartType] IS NOT NULL"); + + b.ToTable("FisPrintTemplateConfiguration"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("CanNotPrint") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("HostSN2") + .HasColumnType("int"); + + b.Property("IsPartSwitch") + .HasColumnType("bit"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("NeedReplenishPrint") + .HasColumnType("int"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperationType") + .HasColumnType("int"); + + b.Property("Operator") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("PrintTime") + .HasColumnType("datetime2"); + + b.Property("PrintTime2") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("SerialNumStr") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_BillM100_HostSN2"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_BillM100_ProductLine2"); + + b.HasIndex("SerialNum") + .HasDatabaseName("IX_BillM100_SerialNum"); + + b.HasIndex("SerialNumStr") + .HasDatabaseName("IX_BillM100_SerialNumStr2"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_BillM100_VIN2"); + + b.ToTable("FisBillM100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillM100Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType3") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("BillM100Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillM100Part_PartCode2"); + + b.ToTable("FisBillM100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_BillM110_VIN3"); + + b.ToTable("FisBillM110"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillM110Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BillM110Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillM110Part_PartCode3"); + + b.ToTable("FisBillM110Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("IsPartSwitch") + .HasColumnType("bit"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("PrintTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("SerialNumStr") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_BillR100_HostSN1"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_BillR100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_BillR100_ProductLine1"); + + b.HasIndex("SerialNumStr") + .HasDatabaseName("IX_BillR100_SerialNumStr1"); + + b.ToTable("FisBillR100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillR100Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType2") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartType3") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BillR100Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_BillR100Part_PartCode1"); + + b.ToTable("FisBillR100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("SerialNum") + .HasColumnType("int"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_RepeatM100_HostSN"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_RepeatM100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_RepeatM100_ProductLine"); + + b.HasIndex("VIN") + .HasDatabaseName("IX_RepeatM100_VIN"); + + b.ToTable("FisRepeatM100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatM100Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_RepeatM100Part_PartCode"); + + b.HasIndex("RepeatM100Id"); + + b.ToTable("FisRepeatM100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("VIN") + .HasColumnType("nvarchar(max)"); + + b.Property("VehicleModelCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisRepeatM110"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatM110Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RepeatM110Id"); + + b.ToTable("FisRepeatM110Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyID") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("KNR") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageFileReceiveID") + .HasColumnType("uniqueidentifier"); + + b.Property("OnlineTime") + .HasColumnType("datetime2"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_RepeatR100_HostSN"); + + b.HasIndex("KNR") + .HasDatabaseName("IX_RepeatR100_KNR"); + + b.HasIndex("ProductLine") + .HasDatabaseName("IX_RepeatR100_ProductLine"); + + b.ToTable("FisRepeatR100"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100Part", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("RepeatR100Id") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_RepeatR100Part_PartCode"); + + b.HasIndex("RepeatR100Id"); + + b.ToTable("FisRepeatR100Part"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssembly", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillID") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("ScanPoint") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisUnknownAssembly"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssemblyPart", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PartNum") + .HasColumnType("float"); + + b.Property("UnknownAssemblyId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PartCode") + .HasDatabaseName("IX_UnknownAssemblyPart_PartCode"); + + b.HasIndex("UnknownAssemblyId"); + + b.ToTable("FisUnknownAssemblyPart"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.ZHBPrintStatus", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillStatus") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("VIN") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName", "VIN") + .IsUnique() + .HasFilter("[GroupName] IS NOT NULL AND [VIN] IS NOT NULL"); + + b.ToTable("FisZHBPrintStatus"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.BillSortCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FileContentKeyword") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MessageVersionCfgId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("MessageVersionCfgId"); + + b.ToTable("FisBillSortCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.MessageVersionCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileNameKeyword") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FisMessageVersionCfg"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.MessageReceive", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ErrorCount") + .HasColumnType("int"); + + b.Property("ErrorMessage") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastUpdateTime") + .HasColumnType("datetime2"); + + b.Property("MessageContent") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiveStatus") + .HasColumnType("int"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("FisMessageReceive"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.MessageReceiveArchive", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BillHostSN") + .HasColumnType("int"); + + b.Property("BillOnlineTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastUpdateTime") + .HasColumnType("datetime2"); + + b.Property("MessageContent") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageFileName") + .HasColumnType("nvarchar(max)"); + + b.Property("MessageReceiveId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReceiveStatus") + .HasColumnType("int"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("FisMessageReceiveArchive"); + }); + + modelBuilder.Entity("WY.NewJit.MsgTransmission.TransmissionModeCfg", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsApply") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TransmissionModeContent") + .HasColumnType("nvarchar(max)"); + + b.Property("TransmissionModeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("FisTransmissionModeCfg"); + }); + + modelBuilder.Entity("WY.NewJit.TianHe.NotMatchTempBill", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("NotMatchBillId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("FisNotMatchTempBill"); + }); + + modelBuilder.Entity("WY.NewJit.Users.AppUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingRec", b => + { + b.HasOne("WY.NewJit.Extends.MenBanPackingList", null) + .WithMany("Details") + .HasForeignKey("MenBanPackingListId"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingRec", b => + { + b.HasOne("WY.NewJit.Extends.ZhuHuBanPackingList", null) + .WithMany("Details") + .HasForeignKey("ZhuHuBanPackingListId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgPart", b => + { + b.HasOne("WY.NewJit.MsgBaseData.AssemblyCfgErp", null) + .WithMany("Details") + .HasForeignKey("AssemblyCfgErpId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicleChild", b => + { + b.HasOne("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", null) + .WithMany("AssemblyCfgVehicleChilds") + .HasForeignKey("AssemblyCfgVehicleId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillM100", null) + .WithMany("BillM100Parts") + .HasForeignKey("BillM100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillM110", null) + .WithMany("BillM110Parts") + .HasForeignKey("BillM110Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.BillR100", null) + .WithMany("BillR100Parts") + .HasForeignKey("BillR100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatM100", null) + .WithMany("M100RepeatParts") + .HasForeignKey("RepeatM100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatM110", null) + .WithMany("M110RepeatParts") + .HasForeignKey("RepeatM110Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100Part", b => + { + b.HasOne("WY.NewJit.MsgCheck.RepeatR100", null) + .WithMany("R100RepeatParts") + .HasForeignKey("RepeatR100Id"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssemblyPart", b => + { + b.HasOne("WY.NewJit.MsgCheck.UnknownAssembly", null) + .WithMany("UnknownAssemblyParts") + .HasForeignKey("UnknownAssemblyId"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.BillSortCfg", b => + { + b.HasOne("WY.NewJit.MsgConversion.MessageVersionCfg", null) + .WithMany("Details") + .HasForeignKey("MessageVersionCfgId"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.Extends.ZhuHuBanPackingList", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgErp", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("WY.NewJit.MsgBaseData.AssemblyCfgVehicle", b => + { + b.Navigation("AssemblyCfgVehicleChilds"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM100", b => + { + b.Navigation("BillM100Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillM110", b => + { + b.Navigation("BillM110Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.BillR100", b => + { + b.Navigation("BillR100Parts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM100", b => + { + b.Navigation("M100RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatM110", b => + { + b.Navigation("M110RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.RepeatR100", b => + { + b.Navigation("R100RepeatParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgCheck.UnknownAssembly", b => + { + b.Navigation("UnknownAssemblyParts"); + }); + + modelBuilder.Entity("WY.NewJit.MsgConversion.MessageVersionCfg", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Messages/MsgTransmissionService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Messages/MsgTransmissionService.cs index 369ce39..5e3ef9b 100644 --- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Messages/MsgTransmissionService.cs +++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Messages/MsgTransmissionService.cs @@ -598,11 +598,13 @@ namespace WY.NewJit.Job.ConsoleApp.Messages } #endregion + UpdateVehicleModel(billResObj); //更新车型 + #region 更新三个零件类别,有不识别零件时直接中断程序 string unknowPartCode = UpdatePartLargeType(billResObj); if (unknowPartCode.HasValue()) //有不识别零件 { - msgReceiveObj.ErrorCount = 3; + msgReceiveObj.ErrorCount = 4; msgReceiveObj.ErrorMessage = $"存在不识别的零件{unknowPartCode}"; _messageReceiveRepository.UpdateAsync(msgReceiveObj).GetAwaiter().GetResult(); @@ -761,11 +763,12 @@ namespace WY.NewJit.Job.ConsoleApp.Messages string ret = ""; if (billResObj.R100Bill != null) { + var bill = billResObj.R100Bill; var billPartLst = billResObj.R100Bill.BillR100Parts; //包含多个成品件 foreach (var billPart in billPartLst) { string partLargeType = billPart.PartCode.Substring(6, 3); //取客户零件代码的7-9位,是零件大类 - var partCfgObj = _partLargeTypeList.FirstOrDefault(itm => itm.LargeTypeCode == partLargeType); //是否加车型过滤//?? + var partCfgObj = _partLargeTypeList.FirstOrDefault(itm => itm.LargeTypeCode == partLargeType && itm.VehicleModel == bill.VehicleModelCode); //是否加车型过滤//?? if (partCfgObj != null) { billPart.PartType = partCfgObj.ProductLine; @@ -781,11 +784,12 @@ namespace WY.NewJit.Job.ConsoleApp.Messages } else if (billResObj.M100Bill != null) { + var bill = billResObj.M100Bill; var billPartLst = billResObj.M100Bill.BillM100Parts; //包含多个成品件 foreach (var billPart in billPartLst) { string partLargeType = billPart.PartCode.Substring(6, 3); //取客户零件代码的7-9位,是零件大类 - var partCfgObj = _partLargeTypeList.FirstOrDefault(itm => itm.LargeTypeCode == partLargeType); //是否加车型过滤//?? + var partCfgObj = _partLargeTypeList.FirstOrDefault(itm => itm.LargeTypeCode == partLargeType && itm.VehicleModel == bill.VehicleModelCode); //是否加车型过滤//?? if (partCfgObj != null) { billPart.PartType = partCfgObj.ProductLine; diff --git a/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg b/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg index 5919bb5..60cefce 100644 Binary files a/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg and b/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg differ diff --git a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll index c135764..f34ed9b 100644 Binary files a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll differ diff --git a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb index c537d85..af937c0 100644 Binary files a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb and b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb differ diff --git a/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec b/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec index d7aeb35..7a8575a 100644 --- a/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec +++ b/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec @@ -5,7 +5,7 @@ 2.0.0 Win.Sfs.Shared Package Description - + diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs index 17b278b..09328bf 100644 --- a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs +++ b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Win.Sfs.Shared")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+32f3c7c4f91a6e47f64ef11cb91719a67226370a")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+9f1698b0f932dfc3e8d926fe272b9e5c15605da4")] [assembly: System.Reflection.AssemblyProductAttribute("Win.Sfs.Shared")] [assembly: System.Reflection.AssemblyTitleAttribute("Win.Sfs.Shared")] [assembly: System.Reflection.AssemblyVersionAttribute("2.0.0.0")] diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache index c379f95..07049b5 100644 --- a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache +++ b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache @@ -1 +1 @@ -a40819ce8066d3478da910d1582b68a0b9e81b931d4dc46fb251c28adc396dd7 +d755eed168280a373eeb0870bc5023deded8bf4c7a53f8c511dbfc9601ca31ed diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll index c135764..f34ed9b 100644 Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll differ diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb index c537d85..af937c0 100644 Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb differ diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll index b51f00e..3762e96 100644 Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll differ diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll index b51f00e..3762e96 100644 Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll differ