Browse Source

门板柱护板打印测试通过

master
liuyunfeng 1 year ago
parent
commit
552d36f285
  1. 24
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs
  2. 36
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/QueryWaitPrintDto.cs
  3. 72
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
  4. 291
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs
  5. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs
  6. 55
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/AlreadyPrintAppService.cs
  7. 149
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs
  8. 205
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs
  9. 18
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
  10. 6
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Extends/PaiGe/PrintTypeEnum.cs
  11. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs
  12. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs
  13. 84
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec2.cs
  14. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/ZhuHuBanReports/ZhuHuBanPackingRec.cs
  15. 102
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/ZhuHuBanReports/ZhuHuBanPackingRec2.cs
  16. 5
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/PrintTemplateConfiguration.cs
  17. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs
  18. 12
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs

24
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs

@ -5,6 +5,20 @@ using WY.NewJit.Extends.PaiGe;
namespace WY.NewJit.Extends namespace WY.NewJit.Extends
{ {
public class ZhuHuBanLoadReportInputDto
{
/// <summary>
/// 装箱单主表ID列表,报废时传入一个,重打时可传入多个(报废、重新打印时使用)
/// </summary>
public virtual List<Guid> ReportIdList { get; set; }
/// <summary>
/// 数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用)
/// </summary>
public virtual string DataResultType { get; set; }
}
public class ZhuHuBanPrintInputDto public class ZhuHuBanPrintInputDto
{ {
@ -29,16 +43,6 @@ namespace WY.NewJit.Extends
public virtual int EndHostSN { get; set; } public virtual int EndHostSN { get; set; }
/// <summary>
/// 装箱单主表ID列表,报废时传入一个,重打时可传入多个(报废、重新打印时使用)
/// </summary>
public virtual List<Guid> ReportIdList { get; set; }
/// <summary>
/// 数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用)
/// </summary>
public virtual string DataResultType { get; set; }
/// <summary> /// <summary>
/// 补打时使用 /// 补打时使用
/// </summary> /// </summary>

36
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/QueryWaitPrintDto.cs

@ -11,6 +11,21 @@ namespace WY.NewJit.PrintTable.Dtos
[Serializable] [Serializable]
public class QueryWaitPrintDto : PagedAndSortedBase public class QueryWaitPrintDto : PagedAndSortedBase
{ {
/// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary>
public BusinessTypeEnum? BusinessType { get; set; }
/// <summary>
/// 生产线(派格按生产线分类)
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 打印类型: 1 顺序打印 2 补账打印
/// </summary>
public PrintTypeEnum? PrintType { get; set; }
/// <summary> /// <summary>
/// 大众顺序号起 /// 大众顺序号起
/// </summary> /// </summary>
@ -21,6 +36,12 @@ namespace WY.NewJit.PrintTable.Dtos
/// </summary> /// </summary>
public int? HostSNEnd { get; set; } public int? HostSNEnd { get; set; }
}
[Serializable]
public class QueryAlreadyPrintDto : QueryWaitPrintDto
{
/// <summary> /// <summary>
/// KNR起 /// KNR起
/// </summary> /// </summary>
@ -62,11 +83,6 @@ namespace WY.NewJit.PrintTable.Dtos
/// </summary> /// </summary>
public string VehicleModelCode { get; set; } public string VehicleModelCode { get; set; }
/// <summary>
/// 生产线(派格按生产线分类)
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary> /// <summary>
/// 接收时间起 /// 接收时间起
/// </summary> /// </summary>
@ -81,16 +97,6 @@ namespace WY.NewJit.PrintTable.Dtos
/// 单据状态(0 空;1 未匹配;2 未打印;3 已打印 4 断号) /// 单据状态(0 空;1 未匹配;2 未打印;3 已打印 4 断号)
/// </summary> /// </summary>
public BillStatusEnum? BillStatus { get; set; } public BillStatusEnum? BillStatus { get; set; }
/// <summary>
/// 打印类型: 1 顺序打印 2 补账打印
/// </summary>
public PrintTypeEnum? PrintType { get; set; }
/// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary>
public BusinessTypeEnum? BusinessType { get; set; }
} }
} }

72
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml

@ -528,6 +528,16 @@
物料描述2 物料描述2
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.Extends.ZhuHuBanLoadReportInputDto.ReportIdList">
<summary>
装箱单主表ID列表,报废时传入一个,重打时可传入多个(报废、重新打印时使用)
</summary>
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanLoadReportInputDto.DataResultType">
<summary>
数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用)
</summary>
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.PrintType"> <member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.PrintType">
<summary> <summary>
打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能 打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能
@ -548,16 +558,6 @@
终止大众顺序号 终止大众顺序号
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.ReportIdList">
<summary>
装箱单主表ID列表,报废时传入一个,重打时可传入多个(报废、重新打印时使用)
</summary>
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.DataResultType">
<summary>
数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用)
</summary>
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.WaitPrintIdList"> <member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.WaitPrintIdList">
<summary> <summary>
补打时使用 补打时使用
@ -3492,6 +3492,21 @@
最后修改人 最后修改人
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.BusinessType">
<summary>
业务类型:1 门板 2 其它柱护板 3 柱护板
</summary>
</member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.ProductLine">
<summary>
生产线(派格按生产线分类)
</summary>
</member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.PrintType">
<summary>
打印类型: 1 顺序打印 2 补账打印
</summary>
</member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.HostSNBegin"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.HostSNBegin">
<summary> <summary>
大众顺序号起 大众顺序号起
@ -3502,76 +3517,61 @@
大众顺序号止 大众顺序号止
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.KNRBegin"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.KNRBegin">
<summary> <summary>
KNR起 KNR起
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.KNREnd"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.KNREnd">
<summary> <summary>
KNR止 KNR止
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.VINBegin"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.VINBegin">
<summary> <summary>
底牌号起 底牌号起
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.VINEnd"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.VINEnd">
<summary> <summary>
底牌号止 底牌号止
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.AssemblyID"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.AssemblyID">
<summary> <summary>
总成ID 总成ID
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.OnlineTimeBegin"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.OnlineTimeBegin">
<summary> <summary>
上线时间起 上线时间起
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.OnlineTimeEnd"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.OnlineTimeEnd">
<summary> <summary>
上线时间止 上线时间止
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.VehicleModelCode"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.VehicleModelCode">
<summary> <summary>
车型代码(取通用字典) 车型代码(取通用字典)
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.ProductLine"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.ReceiveTimeBegin">
<summary>
生产线(派格按生产线分类)
</summary>
</member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.ReceiveTimeBegin">
<summary> <summary>
接收时间起 接收时间起
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.ReceiveTimeEnd"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.ReceiveTimeEnd">
<summary> <summary>
接收时间止 接收时间止
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.BillStatus"> <member name="P:WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto.BillStatus">
<summary> <summary>
单据状态(0 空;1 未匹配;2 未打印;3 已打印 4 断号) 单据状态(0 空;1 未匹配;2 未打印;3 已打印 4 断号)
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.PrintType">
<summary>
打印类型: 1 顺序打印 2 补账打印
</summary>
</member>
<member name="P:WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto.BusinessType">
<summary>
业务类型:1 门板 2 其它柱护板 3 柱护板
</summary>
</member>
<member name="T:WY.NewJit.PrintTable.WaitPrintDto"> <member name="T:WY.NewJit.PrintTable.WaitPrintDto">
<summary> <summary>
零件查询结果DTO 零件查询结果DTO

291
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs

@ -2180,115 +2180,7 @@ select * from
#endregion #endregion
#region 保存报表、加载打印报表分离 #region 保存报表、加载打印报表分离
//[UnitOfWork]
//[UnitOfWork]
//[HttpPost]
//[Route("load-menban-report")]
//public virtual async Task<ObjectResultDto<MenBanPrintResultDto>> LoadMenBanReport(List<Guid> input)
//{
// _logger.LogDebug(_errorMessagePrefix + "LoadMenBanReport 进入");
// MenBanPrintResultDto retObj = new MenBanPrintResultDto();
// ObjectResultDto<MenBanPrintResultDto> ret = new ObjectResultDto<MenBanPrintResultDto>(retObj);
// ret.Status = false;
// try
// {
// List<MenBanPackingList> reportMainLst = new List<MenBanPackingList>();
// reportMainLst = await _menBanPackingListRepository.GetListAsync(itm => input.Contains(itm.Id) == true, true);
// //按大众顺序号排序
// foreach (var reportMainObj in reportMainLst)
// {
// List<MenBanPackingRec> recLst = reportMainObj.Details;
// if (recLst == null)
// continue;
// 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();
// }
// }
// #region 格式转换
// //实体 转 DTO
// List<MenBanPackingListDto> targetLst = ObjectMapper.Map<List<MenBanPackingList>, List<MenBanPackingListDto>>(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 + "LoadMenBanReport 执行出错:" + ex.Message;
// _logger.LogError(errorMsg);
// ret.Status = false;
// ret.Message = ex.Message;
// return ret;
// }
//}
@ -3032,189 +2924,6 @@ select * from
//} //}
/// <summary>
/// 加载柱护板装箱单报表【仅ReportIdList、DataResultType参数有效】
/// </summary>
//[UnitOfWork]
//[HttpPost]
//[Route("load-zhuhuban-report")]
//public virtual async Task<ObjectResultDto<ZhuHuBanPrintResultDto>> LoadZhuHuBanReport(ZhuHuBanPrintInputDto input)
//{
// Stopwatch sw = new Stopwatch();
// sw.Start();
// _logger.LogDebug(_errorMessagePrefix + "LoadZhuHuBanReport 进入");
// ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto();
// ObjectResultDto<ZhuHuBanPrintResultDto> ret = new ObjectResultDto<ZhuHuBanPrintResultDto>(retObj);
// ret.Status = false;
// try
// {
// List<ZhuHuBanPackingList> reportMainLst = new List<ZhuHuBanPackingList>();
// List<ZhuHuBanPackingList> forWMSLst = new List<ZhuHuBanPackingList>();
// 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);
// }
// sw.Stop();
// _logger.LogWarning($"LoadZhuHuBanReport 取柱护板数据 - {sw.ElapsedMilliseconds}毫秒");
// sw.Start();
// //按大众顺序号排序
// foreach (var reportMainObj in reportMainLst)
// {
// List<ZhuHuBanPackingRec> 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();
// }
// }
// #region 返回结果格式转换
// //实体 转 DTO
// List<ZhuHuBanPackingListDto> targetLst = ObjectMapper.Map<List<ZhuHuBanPackingList>, List<ZhuHuBanPackingListDto>>(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;
// }
// }
// 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_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_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
// sw.Stop();
// _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;
// }
//}
#endregion #endregion
[UnitOfWork(false)] [UnitOfWork(false)]

4
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs

@ -7,6 +7,7 @@ using WY.NewJit.MsgBaseData;
using WY.NewJit.MsgCheck; using WY.NewJit.MsgCheck;
using WY.NewJit.MsgCheck.UnknownAssemblys; using WY.NewJit.MsgCheck.UnknownAssemblys;
using WY.NewJit.PrintTable; using WY.NewJit.PrintTable;
using WY.NewJit.PrintTable.Dtos;
namespace WY.NewJit namespace WY.NewJit
{ {
@ -104,7 +105,8 @@ namespace WY.NewJit
#region 打印表 #region 打印表
CreateMap<WaitPrint, WaitPrintDto>().ReverseMap(); CreateMap<WaitPrint, WaitPrintDto>().ReverseMap();
CreateMap<AlreadyPrint, AlreadyPrintDto>().ReverseMap(); CreateMap<AlreadyPrint, AlreadyPrintDto>().ReverseMap();
CreateMap<QueryWaitPrintDto, QueryAlreadyPrintDto>().ReverseMap();
CreateMap<WaitPrint, AlreadyPrint>().ReverseMap();
#endregion #endregion
} }

55
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/AlreadyPrintAppService.cs

@ -1,13 +1,66 @@
using System; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using WY.NewJit.Common;
using WY.NewJit.Commons;
using WY.NewJit.EntityFrameworkCore;
using WY.NewJit.Extends;
using WY.NewJit.Extends.PaiGe;
using WY.NewJit.Extends.PaiGe.WMS;
using WY.NewJit.MsgBaseData;
using WY.NewJit.MsgCheck;
using WY.NewJit.PrintTable.Dtos;
namespace WY.NewJit.PrintTable namespace WY.NewJit.PrintTable
{ {
public class AlreadyPrintAppService : ApplicationService, IAlreadyPrintAppService public class AlreadyPrintAppService : ApplicationService, IAlreadyPrintAppService
{ {
/// <summary>
/// 取待打印列表
/// </summary>
/// <param name="input">输入查询条件</param>
/// <returns>返回符合条件的排序分页列表</returns>
//[HttpGet]
//[UnitOfWork(false)]
//[Route("wait-print-list")]
//public virtual async Task<PagedResultDto<WaitPrintDto>> GetWaitPrintListAsync(QueryAlreadyPrintDto input)
//{
// _logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入");
// try
// {
// PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>();
// if (input.BusinessType == BusinessTypeEnum.MenBan)
// {
// ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input);
// }
// else if (input.BusinessType == BusinessTypeEnum.OtherZhuHuBan || input.BusinessType == BusinessTypeEnum.ZhuHuBan)
// {
// ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input);
// }
// else
// {
// throw new BusinessException("1001", "请传入正确的BusinessType参数!");
// }
// return ret;
// }
// catch (Exception ex)
// {
// string errMsg = _errorMessagePrefix + "GetListAsync 执行出错:" + ex.Message;
// _logger.LogError(errMsg);
// return new PagedResultDto<WaitPrintDto>(0, new List<WaitPrintDto>());
// }
//}
} }
} }

149
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs

@ -48,6 +48,7 @@ namespace WY.NewJit.PrintTable
private IRepository<WaitPrint, Guid> _waitPrintRepository; private IRepository<WaitPrint, Guid> _waitPrintRepository;
#region 仓储
/// <summary> /// <summary>
/// 日志 /// 日志
/// </summary> /// </summary>
@ -91,7 +92,9 @@ namespace WY.NewJit.PrintTable
private readonly IRepository<MenBanPackingList, Guid> _menBanPackingListRepository; private readonly IRepository<MenBanPackingList, Guid> _menBanPackingListRepository;
private readonly IRepository<FisTB_BILL> _tbBillRepository; private readonly IRepository<FisTB_BILL> _tbBillRepository;
private readonly IRepository<FisTS_SORT_DETAIL> _tsSortDetailRepository; private readonly IRepository<FisTS_SORT_DETAIL> _tsSortDetailRepository;
private readonly IRepository<AlreadyPrint, Guid> _alreadyPrintRepository; private readonly IRepository<AlreadyPrint, Guid> _alreadyPrintRepository;
/// <summary> /// <summary>
@ -102,6 +105,7 @@ namespace WY.NewJit.PrintTable
private readonly IRepository<PrintTemplateConfiguration, Guid> _printTemplateConfigurationRepository; private readonly IRepository<PrintTemplateConfiguration, Guid> _printTemplateConfigurationRepository;
private readonly M100DomainService _m100DomainService; private readonly M100DomainService _m100DomainService;
#endregion
public WaitPrintAppService( public WaitPrintAppService(
IRepository<WaitPrint, Guid> waitPrintRepository, IRepository<WaitPrint, Guid> waitPrintRepository,
@ -183,7 +187,7 @@ namespace WY.NewJit.PrintTable
return ret; return ret;
} }
private static string GetWhere(QueryWaitPrintDto input) private static string GetWhere(QueryAlreadyPrintDto input)
{ {
//select * from FisWaitPrint //select * from FisWaitPrint
//where 1=1 and BusinessType = 1 and ProductLine = '01' and PrintType = 1 and HostSN >= 10377 and HostSN <= 10388 //where 1=1 and BusinessType = 1 and ProductLine = '01' and PrintType = 1 and HostSN >= 10377 and HostSN <= 10388
@ -262,13 +266,13 @@ namespace WY.NewJit.PrintTable
private async Task<PagedResultDto<WaitPrintDto>> QueryByConditionAsync(QueryWaitPrintDto input, PagedAndSortedBase page) private async Task<PagedResultDto<WaitPrintDto>> QueryByConditionAsync(QueryWaitPrintDto input, PagedAndSortedBase page)
{ {
PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>(); PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>();
var qryAlreadyPrintDto = ObjectMapper.Map<QueryWaitPrintDto, QueryAlreadyPrintDto>(input);
string where = GetWhere(input); string where = GetWhere(qryAlreadyPrintDto);
ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where); ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where);
//计算分页 //计算分页
int fromRec = page.SkipCount + 1; int fromRec = page.SkipCount;
int ToRec = page.SkipCount + page.MaxResultCount; int ToRec = page.SkipCount + page.MaxResultCount;
var lst = await GetEntityListFromToAsync<WaitPrintDto>("FisWaitPrint", where, "HostSN2", fromRec, ToRec); var lst = await GetEntityListFromToAsync<WaitPrintDto>("FisWaitPrint", where, "HostSN2", fromRec, ToRec);
@ -286,7 +290,8 @@ namespace WY.NewJit.PrintTable
{ {
PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>(); PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>();
string where = GetWhere(input); var qryAlreadyPrintDto = ObjectMapper.Map<QueryWaitPrintDto, QueryAlreadyPrintDto>(input);
string where = GetWhere(qryAlreadyPrintDto);
ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where); ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where);
@ -479,6 +484,7 @@ namespace WY.NewJit.PrintTable
mbRec.KNR = billObj.KNR; //KNR订单号 mbRec.KNR = billObj.KNR; //KNR订单号
mbRec.VIN = billObj.VIN; //底牌号 mbRec.VIN = billObj.VIN; //底牌号
mbRec.HostSN = billObj.HostSN.ToString(); //大众顺序号 mbRec.HostSN = billObj.HostSN.ToString(); //大众顺序号
mbRec.HostSN2 = billObj.HostSN2;
mbRec.TopBoxPositionNum = posNum.ToString().PadLeft(2, '0'); //上箱位号 mbRec.TopBoxPositionNum = posNum.ToString().PadLeft(2, '0'); //上箱位号
if (leftObj != null) //右后 if (leftObj != null) //右后
{ {
@ -693,13 +699,13 @@ namespace WY.NewJit.PrintTable
/// 根据生产线获取正常打印单据的起始大众顺序号2 /// 根据生产线获取正常打印单据的起始大众顺序号2
/// </summary> /// </summary>
/// <param name="productLine">生产线</param> /// <param name="productLine">生产线</param>
/// <param name="isZhuHuBan">柱护板是1 门板是非1</param> /// <param name="isZhuHuBan">柱护板是1 门板是0</param>
/// <param name="groupName">柱护板分组类型: 1 门板 2 其它柱护板 3 柱护板</param> /// <param name="groupName">柱护板分组类型: 1 门板 2 其它柱护板 3 AC柱护板</param>
/// <returns>起始大众顺序号</returns> /// <returns>起始大众顺序号</returns>
[UnitOfWork] [UnitOfWork]
[HttpGet] [HttpGet]
[Route("get-print-start-hostsn22")] [Route("get-print-start-hostsn2")]
public virtual async Task<ObjectResultDto<int?>> GetPrintStartHostSN22(string productLine, string isZhuHuBan, string groupName = null) public virtual async Task<ObjectResultDto<int?>> GetPrintStartHostSN2(string productLine, string isZhuHuBan, string groupName = null)
{ {
int? beginHostSN = null; int? beginHostSN = null;
@ -746,15 +752,14 @@ namespace WY.NewJit.PrintTable
} }
/// <summary> /// <summary>
/// 根据筛选条件获取分页实体列表 /// 取待打印列表
/// </summary> /// </summary>
/// <param name="input">输入查询条件</param> /// <param name="input">输入查询条件</param>
/// <param name="page">输入分页条件</param>
/// <returns>返回符合条件的排序分页列表</returns> /// <returns>返回符合条件的排序分页列表</returns>
[HttpGet] [HttpGet]
[UnitOfWork(false)] [UnitOfWork(false)]
[Route("list")] [Route("wait-print-list")]
public virtual async Task<PagedResultDto<WaitPrintDto>> GetListAsync(QueryWaitPrintDto input) public virtual async Task<PagedResultDto<WaitPrintDto>> GetWaitPrintListAsync(QueryWaitPrintDto input)
{ {
_logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入"); _logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入");
try try
@ -887,10 +892,6 @@ namespace WY.NewJit.PrintTable
sw.Stop(); sw.Stop();
_logger.LogWarning($"插入已打印表、删除未打印表 - {sw.ElapsedMilliseconds}毫秒"); _logger.LogWarning($"插入已打印表、删除未打印表 - {sw.ElapsedMilliseconds}毫秒");
} }
else if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.) //和正常打印单据完全一样,可以打印部分单据
{
throw new BusinessException("请调用LoadMenBanReport方法!");
}
else if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.) else if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.)
{ {
List<WaitPrint> billLst = _waitPrintRepository.Where(itm => input.WaitPrintIdList.Contains(itm.Id)).OrderBy(itm => itm.HostSN2).ToList(); List<WaitPrint> billLst = _waitPrintRepository.Where(itm => input.WaitPrintIdList.Contains(itm.Id)).OrderBy(itm => itm.HostSN2).ToList();
@ -977,6 +978,12 @@ namespace WY.NewJit.PrintTable
await _waitPrintRepository.DeleteManyAsync(billLst); await _waitPrintRepository.DeleteManyAsync(billLst);
} //补打if } //补打if
else
{
//throw new BusinessException("请调用LoadMenBanReport方法!");
throw new Exception("PrintType参数值必须是1(顺序打印)或2(补账打印)");
}
#region 格式转换 #region 格式转换
//实体 转 DTO //实体 转 DTO
@ -1042,6 +1049,114 @@ namespace WY.NewJit.PrintTable
} //事务 } //事务
} }
[UnitOfWork]
[HttpPost]
[Route("load-menban-report")]
public virtual async Task<ObjectResultDto<MenBanPrintResultDto>> LoadMenBanReport(List<Guid> input)
{
_logger.LogDebug(_errorMessagePrefix + "LoadMenBanReport 进入");
MenBanPrintResultDto retObj = new MenBanPrintResultDto();
ObjectResultDto<MenBanPrintResultDto> ret = new ObjectResultDto<MenBanPrintResultDto>(retObj);
ret.Status = false;
try
{
List<MenBanPackingList> reportMainLst = new List<MenBanPackingList>();
reportMainLst = await _menBanPackingListRepository.GetListAsync(itm => input.Contains(itm.Id) == true, true);
//按大众顺序号排序
foreach (var reportMainObj in reportMainLst)
{
List<MenBanPackingRec> recLst = reportMainObj.Details;
if (recLst == null)
continue;
reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN2).ToList();
//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();
//}
}
#region 格式转换
//实体 转 DTO
List<MenBanPackingListDto> targetLst = ObjectMapper.Map<List<MenBanPackingList>, List<MenBanPackingListDto>>(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 + "LoadMenBanReport 执行出错:" + ex.Message;
_logger.LogError(errorMsg);
ret.Status = false;
ret.Message = ex.Message;
return ret;
}
}
#endregion #endregion

205
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs

@ -103,7 +103,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0)
{ {
//取柱护板-A上C上 //取柱护板-A上C上
@ -184,6 +184,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0)
{ {
//取A柱下、A中 //取A柱下、A中
@ -278,7 +279,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
//B柱上:左右柱护板分别打印在不同的两页,每页4行*6列 //B柱上:左右柱护板分别打印在不同的两页,每页4行*6列
MaterialExt materialObj = GetZhuHuBanByType(zhbPartType, rightOrLeft + "侧", billObj); MaterialExt materialObj = GetZhuHuBanByType(zhbPartType, rightOrLeft + "侧", billObj);
if (materialObj != null) if (materialObj != null)
@ -296,7 +297,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
//B柱下:左右柱护板分别打印在不同的两页,每页4行*6列 //B柱下:左右柱护板分别打印在不同的两页,每页4行*6列
MaterialExt materialObj = GetZhuHuBanByType(zhbPartType, rightOrLeft + "侧", billObj); MaterialExt materialObj = GetZhuHuBanByType(zhbPartType, rightOrLeft + "侧", billObj);
if (materialObj != null) if (materialObj != null)
@ -314,6 +315,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
//后轮上装饰板:显示后轮; 左右柱护板分别打印在不同的两页,每页4行*6列 //后轮上装饰板:显示后轮; 左右柱护板分别打印在不同的两页,每页4行*6列
MaterialExt materialObj = GetZhuHuBanByType("后轮", rightOrLeft + "侧", billObj); MaterialExt materialObj = GetZhuHuBanByType("后轮", rightOrLeft + "侧", billObj);
if (materialObj != null) if (materialObj != null)
@ -341,6 +343,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
zhbObj.Details.Add(zhbRec); zhbObj.Details.Add(zhbRec);
} }
@ -411,6 +414,7 @@ namespace WY.NewJit.PrintTable
zhbRec.KNR = billObj.KNR; zhbRec.KNR = billObj.KNR;
zhbRec.VIN = billObj.VIN; zhbRec.VIN = billObj.VIN;
zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN = billObj.HostSN;
zhbRec.HostSN2 = billObj.HostSN2;
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0)
{ {
if (zhbPartType == "D柱") if (zhbPartType == "D柱")
@ -855,7 +859,7 @@ namespace WY.NewJit.PrintTable
double maxSN; double maxSN;
//获取当前打印柱护板的零件类型 //获取当前打印柱护板的零件类型
var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupCode == input.GroupName.TryToIntZero());
foreach (var partType in partTypes) foreach (var partType in partTypes)
{ {
switch (partType.PartType) switch (partType.PartType)
@ -951,11 +955,6 @@ namespace WY.NewJit.PrintTable
List<AlreadyPrint> alreadyPrintLst = ObjectMapper.Map<List<WaitPrint>, List<AlreadyPrint>>(billLst); List<AlreadyPrint> alreadyPrintLst = ObjectMapper.Map<List<WaitPrint>, List<AlreadyPrint>>(billLst);
await _alreadyPrintRepository.InsertManyAsync(alreadyPrintLst); await _alreadyPrintRepository.InsertManyAsync(alreadyPrintLst);
await _waitPrintRepository.DeleteManyAsync(billLst); await _waitPrintRepository.DeleteManyAsync(billLst);
}
else if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.) //和正常打印单据完全一样,可以打印部分单据
{
throw new BusinessException("请调用LoadZhuHuBanReport方法!");
} }
else if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.) else if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.)
{ {
@ -981,7 +980,7 @@ namespace WY.NewJit.PrintTable
double maxSN; //右上角顺序号01-99 double maxSN; //右上角顺序号01-99
//获取当前打印柱护板的零件类型 //获取当前打印柱护板的零件类型
var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupName == input.GroupName); var partTypes = await _printTemplateConfigurationRepository.GetListAsync(r => r.GroupCode == input.GroupName.TryToIntZero());
foreach (var partType in partTypes) foreach (var partType in partTypes)
{ {
switch (partType.PartType) switch (partType.PartType)
@ -1080,8 +1079,14 @@ namespace WY.NewJit.PrintTable
List<AlreadyPrint> alreadyPrintLst = ObjectMapper.Map<List<WaitPrint>, List<AlreadyPrint>>(billLst); List<AlreadyPrint> alreadyPrintLst = ObjectMapper.Map<List<WaitPrint>, List<AlreadyPrint>>(billLst);
await _alreadyPrintRepository.InsertManyAsync(alreadyPrintLst); await _alreadyPrintRepository.InsertManyAsync(alreadyPrintLst);
await _waitPrintRepository.DeleteManyAsync(billLst); await _waitPrintRepository.DeleteManyAsync(billLst);
}
else
{
//throw new BusinessException("请调用LoadMenBanReport方法!");
throw new Exception("PrintType参数值必须是1(顺序打印)或2(补账打印)");
} //补打if } //补打if
await uow.CompleteAsync(); await uow.CompleteAsync();
ret.Status = true; ret.Status = true;
ret.Item = retLst; ret.Item = retLst;
@ -1101,6 +1106,186 @@ namespace WY.NewJit.PrintTable
} //事务 } //事务
} }
/// <summary>
/// 加载柱护板装箱单报表【仅ReportIdList、DataResultType参数有效】
/// </summary>
[UnitOfWork]
[HttpPost]
[Route("load-zhuhuban-report")]
public virtual async Task<ObjectResultDto<ZhuHuBanPrintResultDto>> LoadZhuHuBanReport(ZhuHuBanLoadReportInputDto input)
{
Stopwatch sw = new Stopwatch();
sw.Start();
_logger.LogDebug(_errorMessagePrefix + "LoadZhuHuBanReport 进入");
ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto();
ObjectResultDto<ZhuHuBanPrintResultDto> ret = new ObjectResultDto<ZhuHuBanPrintResultDto>(retObj);
ret.Status = false;
try
{
List<ZhuHuBanPackingList> reportMainLst = new List<ZhuHuBanPackingList>();
List<ZhuHuBanPackingList> forWMSLst = new List<ZhuHuBanPackingList>();
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);
}
sw.Stop();
_logger.LogWarning($"LoadZhuHuBanReport 取柱护板数据 - {sw.ElapsedMilliseconds}毫秒");
sw.Start();
//按大众顺序号排序
foreach (var reportMainObj in reportMainLst)
{
List<ZhuHuBanPackingRec> recLst = reportMainObj.Details;
if (recLst == null)
continue;
//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();
//}
reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN2).ToList();
}
#region 返回结果格式转换
//实体 转 DTO
List<ZhuHuBanPackingListDto> targetLst = ObjectMapper.Map<List<ZhuHuBanPackingList>, List<ZhuHuBanPackingListDto>>(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;
}
}
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_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_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
sw.Stop();
_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;
}
}
#endregion #endregion
} }

18
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml

@ -1083,7 +1083,7 @@
</member> </member>
<member name="M:WY.NewJit.MsgCheck.BillM100AppService.GetLastHostSNByPL(WY.NewJit.Extends.MenBanPrintInputDto)"> <member name="M:WY.NewJit.MsgCheck.BillM100AppService.GetLastHostSNByPL(WY.NewJit.Extends.MenBanPrintInputDto)">
<summary> <summary>
加载柱护板装箱单报表【仅ReportIdList、DataResultType参数有效】 保存柱护板装箱单报表
</summary> </summary>
</member> </member>
<member name="T:WY.NewJit.MsgCheck.NewM100AppService"> <member name="T:WY.NewJit.MsgCheck.NewM100AppService">
@ -1982,21 +1982,20 @@
</summary> </summary>
<param name="input"></param> <param name="input"></param>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetPrintStartHostSN22(System.String,System.String,System.String)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetPrintStartHostSN2(System.String,System.String,System.String)">
<summary> <summary>
根据生产线获取正常打印单据的起始大众顺序号2 根据生产线获取正常打印单据的起始大众顺序号2
</summary> </summary>
<param name="productLine">生产线</param> <param name="productLine">生产线</param>
<param name="isZhuHuBan">柱护板是1 门板是非1</param> <param name="isZhuHuBan">柱护板是1 门板是0</param>
<param name="groupName">柱护板分组类型: 1 门板 2 其它柱护板 3 柱护板</param> <param name="groupName">柱护板分组类型: 1 门板 2 其它柱护板 3 AC柱护板</param>
<returns>起始大众顺序号</returns> <returns>起始大众顺序号</returns>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetListAsync(WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetWaitPrintListAsync(WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto)">
<summary> <summary>
根据筛选条件获取分页实体列表 取待打印列表
</summary> </summary>
<param name="input">输入查询条件</param> <param name="input">输入查询条件</param>
<param name="page">输入分页条件</param>
<returns>返回符合条件的排序分页列表</returns> <returns>返回符合条件的排序分页列表</returns>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.CheckMBHostSNBreakNum(WY.NewJit.Extends.MenBanPrintInputDto)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.CheckMBHostSNBreakNum(WY.NewJit.Extends.MenBanPrintInputDto)">
@ -2094,6 +2093,11 @@
保存柱护板装箱单报表 保存柱护板装箱单报表
</summary> </summary>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.LoadZhuHuBanReport(WY.NewJit.Extends.ZhuHuBanLoadReportInputDto)">
<summary>
加载柱护板装箱单报表【仅ReportIdList、DataResultType参数有效】
</summary>
</member>
<member name="T:Win.Sfs.SettleAccount.FISes.MenBanPackingRecService"> <member name="T:Win.Sfs.SettleAccount.FISes.MenBanPackingRecService">
<summary> <summary>
区域相关应用服务 区域相关应用服务

6
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Extends/PaiGe/PrintTypeEnum.cs

@ -6,9 +6,9 @@ namespace WY.NewJit.Extends.PaiGe
{ {
public enum PrintTypeEnum public enum PrintTypeEnum
{ {
, = 1,
, = 2,
= 3
} }
public enum ReportStatusEnum public enum ReportStatusEnum

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs

@ -16,7 +16,7 @@ namespace WY.NewJit.PrintTable
[Description("其它柱护板")] [Description("其它柱护板")]
OtherZhuHuBan = 2, OtherZhuHuBan = 2,
[Description("柱护板")] [Description("AC柱护板")]
ZhuHuBan = 3, ZhuHuBan = 3,

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs

@ -78,5 +78,7 @@ namespace WY.NewJit.Extends
{ {
} }
public int HostSN2 { get; set; }
} }
} }

84
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec2.cs

@ -1,84 +0,0 @@
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
namespace WY.NewJit.Extends
{
/// <summary>
/// 生产线管理
/// </summary>
public class MenBanPackingRec2 : FullAuditedAggregateRoot<Guid>
{
/// <summary>
/// 列N
/// </summary>
public virtual string Column00 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column01 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column02 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column03 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column04 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column05 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column06 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column07 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column08 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column09 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column10 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column11 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column12 { get; set; }
}
}

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/ZhuHuBanReports/ZhuHuBanPackingRec.cs

@ -62,5 +62,7 @@ namespace WY.NewJit.Extends
{ {
} }
public virtual int HostSN2 { get; set; }
} }
} }

102
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/ZhuHuBanReports/ZhuHuBanPackingRec2.cs

@ -1,102 +0,0 @@
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
namespace WY.NewJit.Extends
{
/// <summary>
/// 生产线管理
/// </summary>
public class ZhuHuBanPackingRec2 : FullAuditedAggregateRoot<Guid>
{
/// <summary>
/// 列N
/// </summary>
public virtual string Column00 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column01 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column02 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column03 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column04 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column05 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column06 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column07 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column08 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column09 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column10 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column11 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column12 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column13 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column14 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column15 { get; set; }
/// <summary>
/// 列N
/// </summary>
public virtual string Column16 { get; set; }
}
}

5
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/PrintTemplateConfiguration.cs

@ -40,5 +40,10 @@ namespace WY.NewJit.MsgBaseData
/// 模板名称 /// 模板名称
/// </summary> /// </summary>
public virtual string TemplateName { get; set; } public virtual string TemplateName { get; set; }
/// <summary>
/// 分组编号 2 其它柱护板 3 AC柱护板
/// </summary>
public virtual int GroupCode { get; set; }
} }
} }

4
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs

@ -117,8 +117,6 @@ namespace WY.NewJit.EntityFrameworkCore
public DbSet<MenBanPackingRec> menBanPackingRec { get; set; } public DbSet<MenBanPackingRec> menBanPackingRec { get; set; }
public DbSet<MenBanPackingRec2> menBanPackingRec2 { get; set; }
public DbSet<MaterialExt> materialExt { get; set; } public DbSet<MaterialExt> materialExt { get; set; }
@ -126,8 +124,6 @@ namespace WY.NewJit.EntityFrameworkCore
public DbSet<ZhuHuBanPackingRec> zhuHuBanPackingRec { get; set; } public DbSet<ZhuHuBanPackingRec> zhuHuBanPackingRec { get; set; }
public DbSet<ZhuHuBanPackingRec2> zhuHuBanPackingRec2 { get; set; }
#endregion #endregion

12
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs

@ -426,13 +426,6 @@ namespace WY.NewJit.EntityFrameworkCore
b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它
}); });
builder.Entity<MenBanPackingRec2>(b =>
{
b.ToTable(NewJitConsts.DbTablePrefix + nameof(MenBanPackingRec2)); //将Book实体映射到数据库表XXXBooks
b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它
});
builder.Entity<MaterialExt>(b => builder.Entity<MaterialExt>(b =>
{ {
b.ToTable(NewJitConsts.DbTablePrefix + nameof(MaterialExt)); //将Book实体映射到数据库表XXXBooks b.ToTable(NewJitConsts.DbTablePrefix + nameof(MaterialExt)); //将Book实体映射到数据库表XXXBooks
@ -467,11 +460,6 @@ namespace WY.NewJit.EntityFrameworkCore
b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它
}); });
builder.Entity<ZhuHuBanPackingRec2>(b =>
{
b.ToTable(NewJitConsts.DbTablePrefix + nameof(ZhuHuBanPackingRec2)); //将Book实体映射到数据库表XXXBooks
b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它
});
#endregion #endregion

Loading…
Cancel
Save