lvzb 1 year ago
parent
commit
f71f806745
  1. 7
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/AlreadyPrintDto.cs
  2. 7
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs
  3. 8
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/MsgCheck/BillStatusEnum.cs
  4. 32
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BillStatusEnum.cs
  5. 24
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs
  6. 20
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs
  7. 97
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
  8. 7
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs
  9. 17
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs

7
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.Collections.Generic;
using System.Text; using System.Text;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable namespace WY.NewJit.PrintTable
{ {
@ -24,7 +25,7 @@ namespace WY.NewJit.PrintTable
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "业务类型")] [ExporterHeader(DisplayName = "业务类型")]
[ImporterHeader(Name = "业务类型")] [ImporterHeader(Name = "业务类型")]
public string BusinessType { get; set; } public BusinessTypeEnum BusinessType { get; set; }
/// <summary> /// <summary>
/// 产线 /// 产线
@ -80,14 +81,14 @@ namespace WY.NewJit.PrintTable
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "单据状态")] [ExporterHeader(DisplayName = "单据状态")]
[ImporterHeader(Name = "单据状态")] [ImporterHeader(Name = "单据状态")]
public string BillStatus { get; set; } public BillStatusEnum BillStatus { get; set; }
/// <summary> /// <summary>
/// 打印类型: 1 顺序打印 2 补账打印 /// 打印类型: 1 顺序打印 2 补账打印
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "打印类型")] [ExporterHeader(DisplayName = "打印类型")]
[ImporterHeader(Name = "打印类型")] [ImporterHeader(Name = "打印类型")]
public int PrintType { get; set; } public PrintTypeEnum PrintType { get; set; }
/// <summary> /// <summary>
/// 自定义排序号(910001 910002 等) /// 自定义排序号(910001 910002 等)

7
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.Collections.Generic;
using System.Text; using System.Text;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable namespace WY.NewJit.PrintTable
{ {
@ -24,7 +25,7 @@ namespace WY.NewJit.PrintTable
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "业务类型")] [ExporterHeader(DisplayName = "业务类型")]
[ImporterHeader(Name = "业务类型")] [ImporterHeader(Name = "业务类型")]
public string BusinessType { get; set; } public BusinessTypeEnum BusinessType { get; set; }
/// <summary> /// <summary>
/// 产线 /// 产线
@ -80,14 +81,14 @@ namespace WY.NewJit.PrintTable
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "单据状态")] [ExporterHeader(DisplayName = "单据状态")]
[ImporterHeader(Name = "单据状态")] [ImporterHeader(Name = "单据状态")]
public string BillStatus { get; set; } public BillStatusEnum BillStatus { get; set; }
/// <summary> /// <summary>
/// 打印类型: 1 顺序打印 2 补账打印 /// 打印类型: 1 顺序打印 2 补账打印
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "打印类型")] [ExporterHeader(DisplayName = "打印类型")]
[ImporterHeader(Name = "打印类型")] [ImporterHeader(Name = "打印类型")]
public int PrintType { get; set; } public PrintTypeEnum PrintType { get; set; }
/// <summary> /// <summary>
/// 自定义排序号(910001 910002 等) /// 自定义排序号(910001 910002 等)

8
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/MsgCheck/BillStatusEnum.cs

@ -23,11 +23,17 @@ namespace WY.NewJit.MsgCheck
Match = 2, Match = 2,
/// <summary> /// <summary>
/// 已打印 /// 已打印【此字段没用,稍后删除】
/// </summary> /// </summary>
[Description("已打印")] [Description("已打印")]
Publish = 3, Publish = 3,
/// <summary>
/// 断号
/// </summary>
[Description("断号")]
BreakNum = 4,
/// <summary> /// <summary>
/// 预批量 /// 预批量
/// </summary> /// </summary>

32
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,
// /// <summary>
// /// 未匹配
// /// </summary>
// [Description("解析失败")]
// ParseFail = 1,
// /// <summary>
// /// 已匹配,未打印
// /// </summary>
// [Description("解析成功")]
// ParseSuccess = 2,
// /// <summary>
// /// 断号
// /// </summary>
// [Description("断号")]
// BreakNum = 4,
//}
}

24
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
{
/// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary>
public enum BusinessTypeEnum
{
[Description("门板")]
MenBan = 1,
[Description("其它柱护板")]
OtherZhuHuBan = 2,
[Description("柱护板")]
ZhuHuBan = 3,
}
}

20
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
{
/// <summary>
/// 打印类型: 1 顺序打印 2 补账打印
/// </summary>
public enum PrintTypeEnum
{
[Description("顺序打印")]
OrderPrint = 1,
[Description("空")]
ReplenishPrint = 2,
}
}

97
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
{
/// <summary>
/// M100单据
/// </summary>
private readonly IRepository<BillM100, Guid> _billM100Repository;
/// <summary>
/// 日志
/// </summary>
private ILogger<M100CheckDomainService> _logger;
/// <summary>
/// 未打印表
/// </summary>
private readonly IRepository<WaitPrint, Guid> _waitPrintRepository;
public M100DomainService(
IRepository<BillM100, Guid> billM100Repository,
ILogger<M100CheckDomainService> logger,
IRepository<WaitPrint, Guid> waitPrintRepository
)
{
_billM100Repository = billM100Repository;
_logger = logger;
_waitPrintRepository = waitPrintRepository;
}
public async Task<bool> 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;
}
}
}

7
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs

@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable namespace WY.NewJit.PrintTable
{ {
@ -27,7 +28,7 @@ namespace WY.NewJit.PrintTable
/// <summary> /// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板 /// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary> /// </summary>
public string BusinessType { get; set; } public BusinessTypeEnum BusinessType { get; set; }
/// <summary> /// <summary>
/// 产线 /// 产线
@ -67,12 +68,12 @@ namespace WY.NewJit.PrintTable
/// <summary> /// <summary>
/// 单据状态:1 未解析 2 已解析 4 断号 /// 单据状态:1 未解析 2 已解析 4 断号
/// </summary> /// </summary>
public string BillStatus { get; set; } public BillStatusEnum BillStatus { get; set; }
/// <summary> /// <summary>
/// 打印类型: 1 顺序打印 2 补账打印 /// 打印类型: 1 顺序打印 2 补账打印
/// </summary> /// </summary>
public int PrintType { get; set; } public PrintTypeEnum PrintType { get; set; }
/// <summary> /// <summary>
/// 自定义排序号(910001 910002 等) /// 自定义排序号(910001 910002 等)

17
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs

@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using WY.NewJit.MsgCheck;
namespace WY.NewJit.PrintTable namespace WY.NewJit.PrintTable
{ {
@ -27,7 +28,7 @@ namespace WY.NewJit.PrintTable
/// <summary> /// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板 /// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary> /// </summary>
public string BusinessType { get; set; } public BusinessTypeEnum BusinessType { get; set; }
/// <summary> /// <summary>
/// 产线 /// 产线
@ -67,12 +68,12 @@ namespace WY.NewJit.PrintTable
/// <summary> /// <summary>
/// 单据状态:1 未解析 2 已解析 4 断号 /// 单据状态:1 未解析 2 已解析 4 断号
/// </summary> /// </summary>
public string BillStatus { get; set; } public BillStatusEnum BillStatus { get; set; }
/// <summary> /// <summary>
/// 打印类型: 1 顺序打印 2 补账打印 /// 打印类型: 1 顺序打印 2 补账打印
/// </summary> /// </summary>
public int PrintType { get; set; } public PrintTypeEnum PrintType { get; set; }
/// <summary> /// <summary>
/// 自定义排序号(910001 910002 等) /// 自定义排序号(910001 910002 等)
@ -108,6 +109,16 @@ namespace WY.NewJit.PrintTable
/// 最后修改人 /// 最后修改人
/// </summary> /// </summary>
public Guid? LastModifierId { get; set; } public Guid? LastModifierId { get; set; }
public WaitPrint()
{
}
public WaitPrint(Guid id)
{
this.Id = id;
}
} }
} }

Loading…
Cancel
Save