diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/AlreadyPrintDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/AlreadyPrintDto.cs
index 8843bd8..068000b 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/AlreadyPrintDto.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/AlreadyPrintDto.cs
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Application.Dtos;
+using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable
{
@@ -24,7 +25,7 @@ namespace WY.NewJit.PrintTable
///
[ExporterHeader(DisplayName = "业务类型")]
[ImporterHeader(Name = "业务类型")]
- public string BusinessType { get; set; }
+ public BusinessTypeEnum BusinessType { get; set; }
///
/// 产线
@@ -80,14 +81,14 @@ namespace WY.NewJit.PrintTable
///
[ExporterHeader(DisplayName = "单据状态")]
[ImporterHeader(Name = "单据状态")]
- public string BillStatus { get; set; }
+ public BillStatusEnum BillStatus { get; set; }
///
/// 打印类型: 1 顺序打印 2 补账打印
///
[ExporterHeader(DisplayName = "打印类型")]
[ImporterHeader(Name = "打印类型")]
- public int PrintType { get; set; }
+ public PrintTypeEnum PrintType { get; set; }
///
/// 自定义排序号(910001 910002 等)
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs
index cf264d5..d301970 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Application.Dtos;
+using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable
{
@@ -24,7 +25,7 @@ namespace WY.NewJit.PrintTable
///
[ExporterHeader(DisplayName = "业务类型")]
[ImporterHeader(Name = "业务类型")]
- public string BusinessType { get; set; }
+ public BusinessTypeEnum BusinessType { get; set; }
///
/// 产线
@@ -80,14 +81,14 @@ namespace WY.NewJit.PrintTable
///
[ExporterHeader(DisplayName = "单据状态")]
[ImporterHeader(Name = "单据状态")]
- public string BillStatus { get; set; }
+ public BillStatusEnum BillStatus { get; set; }
///
/// 打印类型: 1 顺序打印 2 补账打印
///
[ExporterHeader(DisplayName = "打印类型")]
[ImporterHeader(Name = "打印类型")]
- public int PrintType { get; set; }
+ public PrintTypeEnum PrintType { get; set; }
///
/// 自定义排序号(910001 910002 等)
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/MsgCheck/BillStatusEnum.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/MsgCheck/BillStatusEnum.cs
index eeb9c10..075524d 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/MsgCheck/BillStatusEnum.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/MsgCheck/BillStatusEnum.cs
@@ -23,11 +23,17 @@ namespace WY.NewJit.MsgCheck
Match = 2,
///
- /// 已打印
+ /// 已打印【此字段没用,稍后删除】
///
[Description("已打印")]
Publish = 3,
+ ///
+ /// 断号
+ ///
+ [Description("断号")]
+ BreakNum = 4,
+
///
/// 预批量
///
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BillStatusEnum.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BillStatusEnum.cs
new file mode 100644
index 0000000..8c7c055
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BillStatusEnum.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+
+namespace WY.NewJit.PrintTable
+{
+ //public enum BillStatusEnum
+ //{
+ // [Description("空")]
+ // None = 0,
+
+ // ///
+ // /// 未匹配
+ // ///
+ // [Description("解析失败")]
+ // ParseFail = 1,
+
+ // ///
+ // /// 已匹配,未打印
+ // ///
+ // [Description("解析成功")]
+ // ParseSuccess = 2,
+
+ // ///
+ // /// 断号
+ // ///
+ // [Description("断号")]
+ // BreakNum = 4,
+
+ //}
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs
new file mode 100644
index 0000000..a1261c7
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+
+namespace WY.NewJit.PrintTable
+{
+ ///
+ /// 业务类型:1 门板 2 其它柱护板 3 柱护板
+ ///
+ public enum BusinessTypeEnum
+ {
+ [Description("门板")]
+ MenBan = 1,
+
+ [Description("其它柱护板")]
+ OtherZhuHuBan = 2,
+
+ [Description("柱护板")]
+ ZhuHuBan = 3,
+
+
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs
new file mode 100644
index 0000000..6d50148
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+
+namespace WY.NewJit.PrintTable
+{
+ ///
+ /// 打印类型: 1 顺序打印 2 补账打印
+ ///
+ public enum PrintTypeEnum
+ {
+ [Description("顺序打印")]
+ OrderPrint = 1,
+
+ [Description("空")]
+ ReplenishPrint = 2,
+
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
new file mode 100644
index 0000000..ef05ef7
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
@@ -0,0 +1,97 @@
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using WY.NewJit.PrintTable;
+
+namespace WY.NewJit.MsgCheck
+{
+ public class M100DomainService : DomainService
+ {
+ ///
+ /// M100单据
+ ///
+ private readonly IRepository _billM100Repository;
+
+ ///
+ /// 日志
+ ///
+ private ILogger _logger;
+
+ ///
+ /// 未打印表
+ ///
+ private readonly IRepository _waitPrintRepository;
+
+ public M100DomainService(
+ IRepository billM100Repository,
+ ILogger logger,
+ IRepository waitPrintRepository
+ )
+ {
+ _billM100Repository = billM100Repository;
+ _logger = logger;
+ _waitPrintRepository = waitPrintRepository;
+ }
+
+ public async Task InsertM100(BillM100 m100Obj, bool autoSave = false)
+ {
+ //处理断号
+
+ var m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave);
+ if (m100Ret != null)
+ {
+ if (m100Obj.ProductLine == "08")
+ {
+ WaitPrint mbRec = ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan);
+ WaitPrint zhbOtherRec = ConvertWaitPrint(m100Ret, BusinessTypeEnum.OtherZhuHuBan);
+ WaitPrint zhbRec = ConvertWaitPrint(m100Ret, BusinessTypeEnum.ZhuHuBan);
+ WaitPrint[] arr = new WaitPrint[3] { mbRec, zhbOtherRec, zhbRec };
+ await _waitPrintRepository.InsertManyAsync(arr);
+ }
+ else
+ {
+ WaitPrint mbRec = ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan);
+ await _waitPrintRepository.InsertAsync(mbRec);
+ }
+ return true;
+ }
+ return false;
+ }
+
+ private WaitPrint ConvertWaitPrint(BillM100 m100Ret, BusinessTypeEnum businessType)
+ {
+ WaitPrint waitPrint = new WaitPrint(GuidGenerator.Create());
+ waitPrint.M100Id = m100Ret.Id;
+ waitPrint.BusinessType = businessType;
+ waitPrint.ProductLine = m100Ret.ProductLine;
+ waitPrint.OnlineTime = (DateTime)m100Ret.OnlineTime;
+ waitPrint.HostSN = (int)m100Ret.HostSN;
+ waitPrint.KNR = m100Ret.KNR;
+ waitPrint.VIN = m100Ret.VIN;
+ waitPrint.VehicleModelCode = m100Ret.VehicleModelCode;
+ waitPrint.AssemblyID = m100Ret.AssemblyID;
+ if (businessType == BusinessTypeEnum.MenBan)
+ {
+ waitPrint.BillStatus = m100Ret.BillStatus;
+ }
+ else
+ {
+ waitPrint.BillStatus = BillStatusEnum.Match; //柱护板默认是匹配状态
+ }
+ waitPrint.PrintType = PrintTypeEnum.OrderPrint;
+ waitPrint.HostSN2 = (int)m100Ret.HostSN2;
+ waitPrint.Description = m100Ret.Description;
+ waitPrint.ReceiveTime = m100Ret.ReceiveTime;
+ waitPrint.CreationTime = m100Ret.CreationTime;
+ waitPrint.CreatorId = m100Ret.CreatorId;
+ waitPrint.LastModificationTime = m100Ret.LastModificationTime;
+ waitPrint.LastModifierId = m100Ret.LastModifierId;
+ return waitPrint;
+ }
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs
index ea27f1f..684568c 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs
@@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;
+using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable
{
@@ -27,7 +28,7 @@ namespace WY.NewJit.PrintTable
///
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
///
- public string BusinessType { get; set; }
+ public BusinessTypeEnum BusinessType { get; set; }
///
/// 产线
@@ -67,12 +68,12 @@ namespace WY.NewJit.PrintTable
///
/// 单据状态:1 未解析 2 已解析 4 断号
///
- public string BillStatus { get; set; }
+ public BillStatusEnum BillStatus { get; set; }
///
/// 打印类型: 1 顺序打印 2 补账打印
///
- public int PrintType { get; set; }
+ public PrintTypeEnum PrintType { get; set; }
///
/// 自定义排序号(910001 910002 等)
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs
index 9eb2cd3..09de52f 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs
@@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;
+using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable
{
@@ -27,7 +28,7 @@ namespace WY.NewJit.PrintTable
///
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
///
- public string BusinessType { get; set; }
+ public BusinessTypeEnum BusinessType { get; set; }
///
/// 产线
@@ -67,12 +68,12 @@ namespace WY.NewJit.PrintTable
///
/// 单据状态:1 未解析 2 已解析 4 断号
///
- public string BillStatus { get; set; }
+ public BillStatusEnum BillStatus { get; set; }
///
/// 打印类型: 1 顺序打印 2 补账打印
///
- public int PrintType { get; set; }
+ public PrintTypeEnum PrintType { get; set; }
///
/// 自定义排序号(910001 910002 等)
@@ -108,6 +109,16 @@ namespace WY.NewJit.PrintTable
/// 最后修改人
///
public Guid? LastModifierId { get; set; }
+
+ public WaitPrint()
+ {
+
+ }
+
+ public WaitPrint(Guid id)
+ {
+ this.Id = id;
+ }
}
}