From 5061147c9858a6e5743b8fb8fbcb3ca04e963463 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Wed, 10 Jan 2024 10:55:42 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=A1=A8CRUD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EdiReceive/Dtos/ImportRecordCreateDto.cs | 131 ++++ .../EdiReceive/Dtos/ImportRecordDto.cs | 197 ++++++ .../Dtos/ImportRecordHisCreateDto.cs | 131 ++++ .../EdiReceive/Dtos/ImportRecordHisDto.cs | 132 +++++ .../EdiReceive/Dtos/ImportRecordInputDto.cs | 86 +++ .../Interfaces/IImportRecordAppService.cs | 69 +++ .../WY.NewJit.Application.Contracts.csproj | 1 + .../WY.NewJit.Application.Contracts.xml | 559 ++++++++++++++++++ .../EdiReceive/ImportRecordAppService.cs | 476 +++++++++++++++ .../NewJitApplicationAutoMapperProfile.cs | 9 + .../WY.NewJit.Application.xml | 115 ++++ .../src/WY.NewJit.DbMigrator/appsettings.json | 2 +- .../Common/ExtMethod.cs | 10 + .../Common/SwaggerGroupConsts.cs | 1 + .../EdiReceive/Entitys/ImportRecord.cs | 139 +++++ .../EdiReceive/Entitys/ImportRecordHis.cs | 139 +++++ .../EdiReceive/Entitys/LastImportHostSN.cs | 17 + .../WY.NewJit.Domain/WY.NewJit.Domain.csproj | 1 + ...109072607_Add_ImportRec_Table.Designer.cs} | 263 +++++++- ... => 20240109072607_Add_ImportRec_Table.cs} | 107 +++- .../NewJitMigrationsDbContextModelSnapshot.cs | 259 ++++++++ .../EntityFrameworkCore/NewJitDbContext.cs | 10 + .../NewJitDbContextModelCreatingExtensions.cs | 83 +++ 23 files changed, 2933 insertions(+), 4 deletions(-) create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordCreateDto.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordDto.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisCreateDto.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisDto.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordInputDto.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Interfaces/IImportRecordAppService.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecord.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecordHis.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/LastImportHostSN.cs rename src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/{20240109051359_NewJitPG_HQ_Init.Designer.cs => 20240109072607_Add_ImportRec_Table.Designer.cs} (95%) rename src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/{20240109051359_NewJitPG_HQ_Init.cs => 20240109072607_Add_ImportRec_Table.cs} (95%) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordCreateDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordCreateDto.cs new file mode 100644 index 0000000..47148be --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordCreateDto.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WY.NewJit.EdiReceive.Dtos +{ + public class ImportRecordCreateDto + { + /// + /// 工厂 + /// + public virtual string Factory { get; set; } + + /// + /// 车位 + /// + public virtual string VehicleLocation { get; set; } + + /// + /// 工位 + /// + public virtual string WorkLocation { get; set; } + + /// + /// 底盘号 + /// + public virtual string Vin { get; set; } + + /// + /// 车身号 + /// + public virtual string VehicleBodyCode { get; set; } + + /// + /// 车型代码 + /// + public virtual string VehicleModelCode { get; set; } + + /// + /// 车型名称 + /// + public virtual string VehicleModelName { get; set; } + + /// + /// 车型描述 + /// + public virtual string VehicleModelDesc { get; set; } + + /// + /// 规格 + /// + public virtual string Spec { get; set; } + + /// + /// 规格说明 + /// + public virtual string SpecDesc { get; set; } + + /// + /// 类别 + /// + public virtual string Type { get; set; } + + /// + /// 涂装下线时间 + /// + public virtual DateTime? PaintOfflineTime { get; set; } + + /// + /// 总装上线时间 + /// + public virtual DateTime? OnlineTime { get; set; } + + /// + /// 内饰颜色 + /// + public virtual string InteriorColor { get; set; } + + /// + /// 外饰颜色 + /// + public virtual string ExteriorTrimmingColor { get; set; } + + /// + /// 序列号 + /// + public virtual string SerialNum { get; set; } + + /// + /// 流水号 + /// + public virtual int HostSN { get; set; } + + /// + /// 生产线:A/B + /// + public virtual string ProductLine { get; set; } + + /// + /// 目的 + /// + public virtual string Target { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 创建人 + /// + public virtual string CreatePerson { get; set; } + + public virtual DateTime? ImportTime { get; set; } + + public virtual string ImportPerson { get; set; } + + public virtual string Remark2 { get; set; } + + public virtual string Remark3 { get; set; } + + public virtual string Remark4 { get; set; } + + public virtual string Remark5 { get; set; } + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordDto.cs new file mode 100644 index 0000000..13e2357 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordDto.cs @@ -0,0 +1,197 @@ +using Magicodes.ExporterAndImporter.Core; +using Magicodes.ExporterAndImporter.Excel; +using System; +using System.Collections.Generic; +using System.Text; + +namespace WY.NewJit.EdiReceive.Dtos +{ + /// + /// 导入记录表 + /// + [ExcelExporter(Name = "导入记录表", AutoFitAllColumn = true, MaxRowNumberOnASheet = 50000)] //一个Sheet最大允许的行数,设置了之后将输出多个Sheet + [Serializable] + public class ImportRecordDto + { + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual Guid Id { get; set; } + /// + /// 工厂 + /// + [ExporterHeader(DisplayName = "工厂")] + [ImporterHeader(Name = "工厂")] + public virtual string Factory { get; set; } + + /// + /// 车位 + /// + [ExporterHeader(DisplayName = "车位")] + [ImporterHeader(Name = "车位")] + public virtual string VehicleLocation { get; set; } + + /// + /// 工位 + /// + [ExporterHeader(DisplayName = "工位")] + [ImporterHeader(Name = "工位")] + public virtual string WorkLocation { get; set; } + + /// + /// 底盘号 + /// + [ExporterHeader(DisplayName = "底盘号")] + [ImporterHeader(Name = "底盘号")] + public virtual string Vin { get; set; } + + /// + /// 车身号 + /// + [ExporterHeader(DisplayName = "车身号")] + [ImporterHeader(Name = "车身号")] + public virtual string VehicleBodyCode { get; set; } + + /// + /// 车型代码 + /// + [ExporterHeader(DisplayName = "车型代码")] + [ImporterHeader(Name = "车型代码")] + public virtual string VehicleModelCode { get; set; } + + /// + /// 车型名称 + /// + [ExporterHeader(DisplayName = "车型名称")] + [ImporterHeader(Name = "车型名称")] + public virtual string VehicleModelName { get; set; } + + /// + /// 车型描述 + /// + [ExporterHeader(DisplayName = "车型描述")] + [ImporterHeader(Name = "车型描述")] + public virtual string VehicleModelDesc { get; set; } + + /// + /// 规格 + /// + [ExporterHeader(DisplayName = "规格")] + [ImporterHeader(Name = "规格")] + public virtual string Spec { get; set; } + + /// + /// 规格说明 + /// + [ExporterHeader(DisplayName = "规格说明")] + [ImporterHeader(Name = "规格说明")] + public virtual string SpecDesc { get; set; } + + /// + /// 类别 + /// + [ExporterHeader(DisplayName = "类别")] + [ImporterHeader(Name = "类别")] + public virtual string Type { get; set; } + + /// + /// 涂装下线时间 + /// + [ExporterHeader(DisplayName = "涂装下线时间", Format ="yyyy/MM/dd HH:mm:ss")] + [ImporterHeader(Name = "涂装下线时间", Format = "yyyy/MM/dd HH:mm:ss")] + public virtual DateTime? PaintOfflineTime { get; set; } + + /// + /// 总装上线时间 + /// + [ExporterHeader(DisplayName = "总装上线时间", Format = "yyyy/MM/dd HH:mm:ss")] + [ImporterHeader(Name = "总装上线时间", Format = "yyyy/MM/dd HH:mm:ss")] + public virtual DateTime? OnlineTime { get; set; } + + /// + /// 内饰颜色 + /// + [ExporterHeader(DisplayName = "内饰颜色")] + [ImporterHeader(Name = "内饰颜色")] + public virtual string InteriorColor { get; set; } + + /// + /// 外饰颜色 + /// + [ExporterHeader(DisplayName = "外饰颜色")] + [ImporterHeader(Name = "外饰颜色")] + public virtual string ExteriorTrimmingColor { get; set; } + + /// + /// 序列号 + /// + [ExporterHeader(DisplayName = "序列号")] + [ImporterHeader(Name = "序列号")] + public virtual string SerialNum { get; set; } + + /// + /// 流水号 + /// + [ExporterHeader(DisplayName = "流水号")] + [ImporterHeader(Name = "流水号")] + public virtual int HostSN { get; set; } + + /// + /// 生产线:A/B + /// + [ExporterHeader(DisplayName = "生产线:A/B")] + [ImporterHeader(Name = "生产线:A/B")] + public virtual string ProductLine { get; set; } + + /// + /// 目的 + /// + [ExporterHeader(DisplayName = "目的")] + [ImporterHeader(Name = "目的")] + public virtual string Target { get; set; } + + /// + /// 备注 + /// + [ExporterHeader(DisplayName = "备注")] + [ImporterHeader(Name = "备注")] + public virtual string Remark { get; set; } + + /// + /// 创建时间 + /// + [ExporterHeader(DisplayName = "创建时间", Format = "yyyy/MM/dd HH:mm:ss")] + [ImporterHeader(Name = "创建时间", Format = "yyyy/MM/dd HH:mm:ss")] + public virtual DateTime? CreateTime { get; set; } + + /// + /// 创建人 + /// + [ExporterHeader(DisplayName = "创建人")] + [ImporterHeader(Name = "创建人")] + public virtual string CreatePerson { get; set; } + + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual DateTime? ImportTime { get; set; } + + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual string ImportPerson { get; set; } + + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual string Remark2 { get; set; } + + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual string Remark3 { get; set; } + + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual string Remark4 { get; set; } + + [ExporterHeader(IsIgnore = true)] + [ImporterHeader(IsIgnore = true)] + public virtual string Remark5 { get; set; } + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisCreateDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisCreateDto.cs new file mode 100644 index 0000000..7982184 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisCreateDto.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WY.NewJit.EdiReceive.Dtos +{ + public class ImportRecordHisCreateDto + { + /// + /// 工厂 + /// + public virtual string Factory { get; set; } + + /// + /// 车位 + /// + public virtual string VehicleLocation { get; set; } + + /// + /// 工位 + /// + public virtual string WorkLocation { get; set; } + + /// + /// 底盘号 + /// + public virtual string Vin { get; set; } + + /// + /// 车身号 + /// + public virtual string VehicleBodyCode { get; set; } + + /// + /// 车型代码 + /// + public virtual string VehicleModelCode { get; set; } + + /// + /// 车型名称 + /// + public virtual string VehicleModelName { get; set; } + + /// + /// 车型描述 + /// + public virtual string VehicleModelDesc { get; set; } + + /// + /// 规格 + /// + public virtual string Spec { get; set; } + + /// + /// 规格说明 + /// + public virtual string SpecDesc { get; set; } + + /// + /// 类别 + /// + public virtual string Type { get; set; } + + /// + /// 涂装下线时间 + /// + public virtual DateTime? PaintOfflineTime { get; set; } + + /// + /// 总装上线时间 + /// + public virtual DateTime? OnlineTime { get; set; } + + /// + /// 内饰颜色 + /// + public virtual string InteriorColor { get; set; } + + /// + /// 外饰颜色 + /// + public virtual string ExteriorTrimmingColor { get; set; } + + /// + /// 序列号 + /// + public virtual string SerialNum { get; set; } + + /// + /// 流水号 + /// + public virtual int HostSN { get; set; } + + /// + /// 生产线:A/B + /// + public virtual string ProductLine { get; set; } + + /// + /// 目的 + /// + public virtual string Target { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 创建人 + /// + public virtual string CreatePerson { get; set; } + + public virtual DateTime? ImportTime { get; set; } + + public virtual string ImportPerson { get; set; } + + public virtual string Remark2 { get; set; } + + public virtual string Remark3 { get; set; } + + public virtual string Remark4 { get; set; } + + public virtual string Remark5 { get; set; } + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisDto.cs new file mode 100644 index 0000000..9cf7f01 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisDto.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WY.NewJit.EdiReceive.Dtos +{ + public class ImportRecordHisDto + { + public Guid Id { get; set; } + /// + /// 工厂 + /// + public virtual string Factory { get; set; } + + /// + /// 车位 + /// + public virtual string VehicleLocation { get; set; } + + /// + /// 工位 + /// + public virtual string WorkLocation { get; set; } + + /// + /// 底盘号 + /// + public virtual string Vin { get; set; } + + /// + /// 车身号 + /// + public virtual string VehicleBodyCode { get; set; } + + /// + /// 车型代码 + /// + public virtual string VehicleModelCode { get; set; } + + /// + /// 车型名称 + /// + public virtual string VehicleModelName { get; set; } + + /// + /// 车型描述 + /// + public virtual string VehicleModelDesc { get; set; } + + /// + /// 规格 + /// + public virtual string Spec { get; set; } + + /// + /// 规格说明 + /// + public virtual string SpecDesc { get; set; } + + /// + /// 类别 + /// + public virtual string Type { get; set; } + + /// + /// 涂装下线时间 + /// + public virtual DateTime? PaintOfflineTime { get; set; } + + /// + /// 总装上线时间 + /// + public virtual DateTime? OnlineTime { get; set; } + + /// + /// 内饰颜色 + /// + public virtual string InteriorColor { get; set; } + + /// + /// 外饰颜色 + /// + public virtual string ExteriorTrimmingColor { get; set; } + + /// + /// 序列号 + /// + public virtual string SerialNum { get; set; } + + /// + /// 流水号 + /// + public virtual int HostSN { get; set; } + + /// + /// 生产线:A/B + /// + public virtual string ProductLine { get; set; } + + /// + /// 目的 + /// + public virtual string Target { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 创建人 + /// + public virtual string CreatePerson { get; set; } + + public virtual DateTime? ImportTime { get; set; } + + public virtual string ImportPerson { get; set; } + + public virtual string Remark2 { get; set; } + + public virtual string Remark3 { get; set; } + + public virtual string Remark4 { get; set; } + + public virtual string Remark5 { get; set; } + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordInputDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordInputDto.cs new file mode 100644 index 0000000..a445121 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordInputDto.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Text; +using WY.NewJit.Common; + +namespace WY.NewJit.EdiReceive.Dtos +{ + public class ImportRecordInputDto : PagedAndSortedBase + { + /// + /// 工厂 + /// + public virtual string Factory { get; set; } + + + /// + /// 底盘号 + /// + public virtual string Vin { get; set; } + + + /// + /// 车型代码 + /// + public virtual string VehicleModelCode { get; set; } + + /// + /// 涂装下线时间起 + /// + public virtual DateTime? PaintOfflineTimeBegin { get; set; } + + /// + /// 涂装下线时间止 + /// + public virtual DateTime? PaintOfflineTimeEnd { get; set; } + + /// + /// 总装上线时间起 + /// + public virtual DateTime? OnlineTimeBegin { get; set; } + + /// + /// 总装上线时间止 + /// + public virtual DateTime? OnlineTimeEnd { get; set; } + + /// + /// 序列号起 + /// + public virtual string SerialNumBegin { get; set; } + + /// + /// 序列号止 + /// + public virtual string SerialNumEnd { get; set; } + + /// + /// 流水号起 + /// + public virtual int? HostSNBegin { get; set; } + + /// + /// 流水号止 + /// + public virtual int? HostSNEnd { get; set; } + + /// + /// 生产线:A/B + /// + public virtual string ProductLine { get; set; } + + /// + /// 创建时间起 + /// + public virtual DateTime? CreateTimeBegin { get; set; } + + /// + /// 创建时间止 + /// + public virtual DateTime? CreateTimeEnd { get; set; } + + public virtual DateTime? ImportTimeBegin { get; set; } + public virtual DateTime? ImportTimeEnd { get; set; } + + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Interfaces/IImportRecordAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Interfaces/IImportRecordAppService.cs new file mode 100644 index 0000000..b835209 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Interfaces/IImportRecordAppService.cs @@ -0,0 +1,69 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using WY.NewJit.EdiReceive.Dtos; + +namespace WY.NewJit.EdiReceive.Interfaces +{ + public interface IImportRecordAppService : IApplicationService + { + #region 接口方法 + + /// 根据筛选条件获取分页实体列表 + /// + /// 输入查询条件 + /// 输入分页条件 + /// 返回符合条件的排序分页列表 + Task> GetListAsync(ImportRecordInputDto input); + + /// + /// 按主键获取唯一实体 + /// + /// 主键 + /// 实体信息 + Task> GetAsync(Guid id); + + /// + /// 添加实体 + /// + /// 添加内容 + /// 执行成功返回真 + Task> CreateAsync(ImportRecordCreateDto input); + + /// + /// 修改实体 + /// + /// 更新主键 + /// 修改内容 + /// 执行成功返回真 + Task UpdateAsync(Guid id, ImportRecordCreateDto input); + + /// + /// 删除实体 + /// + /// 删除主键 + /// 执行成功返回真 + Task DeleteAsync(string id); + + /// + /// 导出信息 + /// + /// 导出查询条件 + /// 执行成功返回真 + Task> ExportAsync(ImportRecordInputDto input); + + /// + /// 导入信息 + /// + /// 导入文件流 + /// 执行成功返回真 + Task ImportAsync([FromForm] IFormFileCollection files); + #endregion + } + +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj index 1525bc8..345f5f8 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj @@ -22,6 +22,7 @@ + diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml index abffb13..a791689 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml @@ -4,6 +4,565 @@ WY.NewJit.Application.Contracts + + + 工厂 + + + + + 车位 + + + + + 工位 + + + + + 底盘号 + + + + + 车身号 + + + + + 车型代码 + + + + + 车型名称 + + + + + 车型描述 + + + + + 规格 + + + + + 规格说明 + + + + + 类别 + + + + + 涂装下线时间 + + + + + 总装上线时间 + + + + + 内饰颜色 + + + + + 外饰颜色 + + + + + 序列号 + + + + + 流水号 + + + + + 生产线:A/B + + + + + 目的 + + + + + 备注 + + + + + 创建时间 + + + + + 创建人 + + + + + 导入记录表 + + + + + 工厂 + + + + + 车位 + + + + + 工位 + + + + + 底盘号 + + + + + 车身号 + + + + + 车型代码 + + + + + 车型名称 + + + + + 车型描述 + + + + + 规格 + + + + + 规格说明 + + + + + 类别 + + + + + 涂装下线时间 + + + + + 总装上线时间 + + + + + 内饰颜色 + + + + + 外饰颜色 + + + + + 序列号 + + + + + 流水号 + + + + + 生产线:A/B + + + + + 目的 + + + + + 备注 + + + + + 创建时间 + + + + + 创建人 + + + + + 工厂 + + + + + 车位 + + + + + 工位 + + + + + 底盘号 + + + + + 车身号 + + + + + 车型代码 + + + + + 车型名称 + + + + + 车型描述 + + + + + 规格 + + + + + 规格说明 + + + + + 类别 + + + + + 涂装下线时间 + + + + + 总装上线时间 + + + + + 内饰颜色 + + + + + 外饰颜色 + + + + + 序列号 + + + + + 流水号 + + + + + 生产线:A/B + + + + + 目的 + + + + + 备注 + + + + + 创建时间 + + + + + 创建人 + + + + + 工厂 + + + + + 车位 + + + + + 工位 + + + + + 底盘号 + + + + + 车身号 + + + + + 车型代码 + + + + + 车型名称 + + + + + 车型描述 + + + + + 规格 + + + + + 规格说明 + + + + + 类别 + + + + + 涂装下线时间 + + + + + 总装上线时间 + + + + + 内饰颜色 + + + + + 外饰颜色 + + + + + 序列号 + + + + + 流水号 + + + + + 生产线:A/B + + + + + 目的 + + + + + 备注 + + + + + 创建时间 + + + + + 创建人 + + + + + 工厂 + + + + + 底盘号 + + + + + 车型代码 + + + + + 涂装下线时间起 + + + + + 涂装下线时间止 + + + + + 总装上线时间起 + + + + + 总装上线时间止 + + + + + 序列号起 + + + + + 序列号止 + + + + + 流水号起 + + + + + 流水号止 + + + + + 生产线:A/B + + + + + 创建时间起 + + + + + 创建时间止 + + + + + + 按主键获取唯一实体 + + 主键 + 实体信息 + + + + 添加实体 + + 添加内容 + 执行成功返回真 + + + + 修改实体 + + 更新主键 + 修改内容 + 执行成功返回真 + + + + 删除实体 + + 删除主键 + 执行成功返回真 + + + + 导出信息 + + 导出查询条件 + 执行成功返回真 + + + + 导入信息 + + 导入文件流 + 执行成功返回真 + 门板装箱单打印主实体 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs new file mode 100644 index 0000000..6a7f24f --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs @@ -0,0 +1,476 @@ +using Magicodes.ExporterAndImporter.Core; +using Magicodes.ExporterAndImporter.Core.Models; +using Magicodes.ExporterAndImporter.Excel; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using Shouldly; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.BlobStoring; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; +using WY.NewJit.Common; +using WY.NewJit.EdiReceive.Dtos; +using WY.NewJit.EdiReceive.Entitys; +using WY.NewJit.EdiReceive.Interfaces; +using WY.NewJit.EntityFrameworkCore; +using WY.NewJit.MsgBaseData; + +namespace WY.NewJit.EdiReceive +{ + /// + /// 零件管理应用服务实现 + /// + [Microsoft.AspNetCore.Mvc.Route("api/newjit/import-record")] + [ApiExplorerSettings(GroupName = SwaggerGroupConsts.报文接收)] + public class ImportRecordAppService : ApplicationService, IImportRecordAppService + { + #region 成员 + /// + /// 零件仓储 + /// + private readonly IRepository _importRecordRepository; + + /// + /// 日志 + /// + private ILogger _logger; + + /// + /// Dapper仓储 + /// + private readonly NewJitDapperRepository _newJitDapperRepository; + + /// + /// BLOB存储 + /// + private readonly IBlobContainer _blobContainer; + + /// + /// 字典领域服务 + /// + private readonly DicDomainService _dicDomainService; + + /// + /// 错误信息前缀 + /// + private string _errorMessagePrefix + { + get + { + return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; + } + } + + + #endregion + + /// + /// 构造函数 + /// + public ImportRecordAppService( + IRepository importRecordRepository, + ILogger logger, + NewJitDapperRepository newJitDapperRepository, + IBlobContainer blobContainer, + DicDomainService dicDomainService + ) + { + _importRecordRepository = importRecordRepository; + _logger = logger; + _newJitDapperRepository = newJitDapperRepository; + _blobContainer = blobContainer; + _dicDomainService = dicDomainService; + } + + #region 私有方法 + private static string GetWhere(ImportRecordInputDto input) + { + string where = ""; + if (input.Factory.HasValue()) + { + where += string.Format(" and Factory = '{0}'", input.Factory); + } + if (input.Vin.HasValue()) + { + where += string.Format(" and Vin = '{0}'", input.Vin); + } + if (input.VehicleModelCode.HasValue()) + { + where += string.Format(" and VehicleModelCode = '{0}'", input.VehicleModelCode); + } + if (input.PaintOfflineTimeBegin.HasValue()) + { + where += string.Format(" and PaintOfflineTime >= '{0}'", input.PaintOfflineTimeBegin); + } + if (input.PaintOfflineTimeEnd.HasValue()) + { + where += string.Format(" and PaintOfflineTime <= '{0}'", input.PaintOfflineTimeEnd); + } + if (input.OnlineTimeBegin.HasValue()) + { + where += string.Format(" and OnlineTime >= '{0}'", input.OnlineTimeBegin); + } + if (input.OnlineTimeEnd.HasValue()) + { + where += string.Format(" and OnlineTime <= '{0}'", input.OnlineTimeEnd); + } + if (input.OnlineTimeBegin.HasValue()) + { + where += string.Format(" and OnlineTime >= '{0}'", input.OnlineTimeBegin); + } + if (input.OnlineTimeEnd.HasValue()) + { + where += string.Format(" and OnlineTime <= '{0}'", input.OnlineTimeEnd); + } + if (input.SerialNumBegin.HasValue()) + { + where += string.Format(" and SerialNum >= '{0}'", input.SerialNumBegin); + } + if (input.SerialNumEnd.HasValue()) + { + where += string.Format(" and SerialNum <= '{0}'", input.SerialNumEnd); + } + if (input.HostSNBegin.HasValue()) + { + where += string.Format(" and HostSN >= '{0}'", input.HostSNBegin); + } + if (input.HostSNEnd.HasValue()) + { + where += string.Format(" and HostSN <= '{0}'", input.HostSNEnd); + } + if (input.ProductLine.HasValue()) + { + where += string.Format(" and ProductLine = '{0}'", input.ProductLine); + } + if (input.CreateTimeBegin.HasValue()) + { + where += string.Format(" and CreateTime >= '{0}'", input.CreateTimeBegin); + } + if (input.CreateTimeEnd.HasValue()) + { + where += string.Format(" and CreateTime <= '{0}'", input.CreateTimeEnd); + } + if (input.ImportTimeBegin.HasValue()) + { + where += string.Format(" and ImportTime >= '{0}'", input.ImportTimeBegin); + } + if (input.ImportTimeEnd.HasValue()) + { + where += string.Format(" and ImportTime <= '{0}'", input.ImportTimeEnd); + } + return where; + } + + /// + /// 取单表记录总数 + /// + /// + /// + /// + private async Task GetEntityCountAsync(string tableName, string where) + { + string sql = $"select count(*) from {tableName} where 1=1 {where}"; + var ret = await _newJitDapperRepository.GetSingleBySqlAsync(sql); + return ret; + } + + /// + /// 取单表当前页数据 + /// + /// + /// + /// + /// + /// + /// + /// + private async Task> GetEntityListAsync(string tableName, string where, string orderFieldName, int pageSize, int pageIndex) + { + int takeNum = pageSize; + int skipNum = (pageIndex - 1) * pageSize; + string sql = $"select * from {tableName} where 1=1 {where} order by {orderFieldName} offset {skipNum} rows fetch next {takeNum} rows only"; + var ret = await _newJitDapperRepository.GetListBySqlAsync(sql); + return ret; + } + + private async Task> GetEntityListFromToAsync(string tableName, string where, string orderFieldName, int skipNum, int takeNum) + { + string sql = $"select * from {tableName} where 1=1 {where} order by {orderFieldName} offset {skipNum} rows fetch next {takeNum} rows only"; + var ret = await _newJitDapperRepository.GetListBySqlAsync(sql); + return ret; + } + + + /// + /// 根据筛选条件获取实体列表 + /// + private async Task> QueryByConditionAsync(ImportRecordInputDto input, PagedAndSortedBase page) + { + PagedResultDto ret = new PagedResultDto(); + string where = GetWhere(input); + + ret.TotalCount = await GetEntityCountAsync("FisImportRecord", where); + + //计算分页 + int skipNum = page.SkipCount; + int takeNum = page.MaxResultCount; + + var lst = await GetEntityListFromToAsync("FisImportRecord", where, "HostSN", skipNum, takeNum); + ret.Items = lst; + return ret; + } + + #endregion + + + #region 公有方法 + /// + /// 根据筛选条件获取分页实体列表 + /// + /// 输入查询条件 + /// 返回符合条件的排序分页列表 + [HttpGet] + [UnitOfWork(false)] + [Route("list")] + public async Task> GetListAsync(ImportRecordInputDto input) + { + _logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入"); + PagedResultDto ret = new PagedResultDto(); + try + { + ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); + return ret; + } + catch (Exception ex) + { + var msg = _errorMessagePrefix + "GetListAsync 执行出错:" + ex.Message; + _logger.LogError(msg); + return ret; + } + } + + + + /// + /// 按主键获取唯一实体 + /// + /// 主键 + /// 实体信息 + [HttpGet] + [Route("{id}")] + public async Task> GetAsync(Guid id) + { + _logger.LogDebug(_errorMessagePrefix + "GetAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); + try + { + ImportRecord sourceObj = await _importRecordRepository.GetAsync(id); + ImportRecordDto targetObj = ObjectMapper.Map(sourceObj); + ret.Item = targetObj; + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "GetAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + + /// + /// 添加实体 + /// + /// 添加内容 + /// 执行成功返回真 + [HttpPost] + [UnitOfWork] + [Route("")]//create + public async Task> CreateAsync(ImportRecordCreateDto input) + { + _logger.LogDebug(_errorMessagePrefix + "CreateAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); + try + { + ImportRecord obj = ObjectMapper.Map(input); + ImportRecord obj2 = await _importRecordRepository.InsertAsync(obj); + ret.Item = obj2.Id; //返回添加对象的主键 + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "CreateAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + + /// + /// 修改实体 + /// + /// 更新主键 + /// 修改内容 + /// 执行成功返回真 + [HttpPut] + [UnitOfWork] + [Route("{id}")]//update/ + public async Task UpdateAsync(Guid id, ImportRecordCreateDto input) + { + _logger.LogDebug(_errorMessagePrefix + "UpdateAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); + try + { + ImportRecord targetObj = await _importRecordRepository.GetAsync(id); + ObjectMapper.Map(input, targetObj); + await _importRecordRepository.UpdateAsync(targetObj); + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "UpdateAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + + /// + /// 删除实体 + /// + /// 删除主键 + /// 执行成功返回真 + [UnitOfWork] + [HttpDelete] + [Route("{id}")]//delete/ + public async Task DeleteAsync(string id) + { + _logger.LogDebug(_errorMessagePrefix + "DeleteAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); + try + { + Guid guid = Guid.Parse(id); + await _importRecordRepository.DeleteAsync(guid); + + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "DeleteAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + + /// + /// 导出信息 + /// + /// 导出查询条件 + /// 执行成功返回真 + [UnitOfWork(false)] + [HttpPost] + [Route("export")] + public async Task> ExportAsync(ImportRecordInputDto input) + { + _logger.LogDebug(_errorMessagePrefix + "ExportAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); + try + { + PagedResultDto pageLst = await QueryByConditionAsync(input, (PagedAndSortedBase)input); + var items = pageLst.Items.AsEnumerable().ToList(); + //将实体列表转换成excel文件流 + IExporter exporter = new ExcelExporter(); + byte[] byteArr = await exporter.ExportAsByteArray(items); + byteArr.ShouldNotBeNull(); + //将excel文件流保存到服务器端文件系统 + string fileName = string.Format("导入记录_{0}.xlsx", Guid.NewGuid().ToString()); + await _blobContainer.SaveAsync(fileName, byteArr); + + ret.Item = fileName; + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "ExportAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + + /// + /// 导入 + /// + /// 导入文件 + /// 执行成功返回真 + [HttpPost] + [Route("import")] + [DisableRequestSizeLimit] + public virtual async Task ImportAsync([FromForm] IFormFileCollection files) + { + + _logger.LogDebug(_errorMessagePrefix + "ImportAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); + try + { + ImportResult impResult; + using (var memoryStream = new MemoryStream()) + { + //保存到内存流 + IFormFile file = files[0]; + await file.CopyToAsync(memoryStream); + memoryStream.Seek(0, SeekOrigin.Begin); + //StreamReader sr = new StreamReader(memoryStream, Encoding.Default); + IImporter importer = new ExcelImporter(); + impResult = await importer.Import(memoryStream); + if (impResult.HasError) + { + string rowErrStr = ""; + foreach (var rowErr in impResult.RowErrors) + { + string fieldErr = string.Concat(rowErr.FieldErrors.Select(itm => $"字段:{itm.Key},错误信息:{itm.Value}")); + rowErrStr += $"行号:{rowErr.RowIndex},{fieldErr}\r\n"; + } + string templateErrStr = ""; + foreach (var templateErr in impResult.TemplateErrors) + { + string errorLevel = templateErr.ErrorLevel == ErrorLevels.Error ? "错误" : "警告"; + templateErrStr += $"错误等级:{errorLevel},列名:{templateErr.ColumnName},需要列:{templateErr.RequireColumnName},错误消息:{templateErr.Message}\r\n"; + } + ret.Message = rowErrStr + templateErrStr; + ret.Status = false; + return ret; + } + } + var srcLst = impResult.Data.AsEnumerable().ToList(); + var tarLst = ObjectMapper.Map, List>(srcLst); + foreach (var tar in tarLst) + { + tar.CreatePerson = "导入"; + tar.CreateTime = ServerHelper.CurrentDateTime; + } + //插入“导入记录表” + await _importRecordRepository.InsertManyAsync(tarLst); + ret.Status = true; + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "ImportAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + #endregion + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs index 41ad3e4..af465c3 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs @@ -2,6 +2,8 @@ using Acme.BookStore.Books; using AutoMapper; using WY.NewJit.Books; +using WY.NewJit.EdiReceive.Dtos; +using WY.NewJit.EdiReceive.Entitys; using WY.NewJit.Extends; using WY.NewJit.MsgBaseData; using WY.NewJit.MsgCheck; @@ -109,6 +111,13 @@ namespace WY.NewJit CreateMap().ReverseMap(); #endregion + #region 导出记录 + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + #endregion + } } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml index ce9a8c9..292cfa5 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml @@ -9,6 +9,121 @@ BookAppService使用IObjectMapper将Book对象转换为BookDto对象, 将CreateUpdateBookDto对象转换为Book对象 + + + 零件管理应用服务实现 + + + + + 零件仓储 + + + + + 日志 + + + + + Dapper仓储 + + + + + BLOB存储 + + + + + 字典领域服务 + + + + + 错误信息前缀 + + + + + 构造函数 + + + + + 取单表记录总数 + + + + + + + + 取单表当前页数据 + + + + + + + + + + + + 根据筛选条件获取实体列表 + + + + + 根据筛选条件获取分页实体列表 + + 输入查询条件 + 返回符合条件的排序分页列表 + + + + 按主键获取唯一实体 + + 主键 + 实体信息 + + + + 添加实体 + + 添加内容 + 执行成功返回真 + + + + 修改实体 + + 更新主键 + 修改内容 + 执行成功返回真 + + + + 删除实体 + + 删除主键 + 执行成功返回真 + + + + 导出信息 + + 导出查询条件 + 执行成功返回真 + + + + 导入 + + 导入文件 + 执行成功返回真 + 生产线权限管理应用服务实现 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.DbMigrator/appsettings.json b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.DbMigrator/appsettings.json index ab74e15..cae4e39 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.DbMigrator/appsettings.json +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.DbMigrator/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_HQ;uid=sa;pwd=ChangkeTec@2021;" + "Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_HQ_Temp;uid=sa;pwd=ChangkeTec@2021;" /*"Default": "Server=192.168.0.213;Database=NewJitPG;uid=sa;pwd=Microsoft@2021"*/ /*"Default": "Server=LAPTOP-4TE7UPMR\\MYSQLSERVER;Database=NewJit;uid=sa;pwd=1"*/ diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs index d27c8f0..74c4da3 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs @@ -321,6 +321,16 @@ namespace WY.NewJit.Common return p_val != null && p_val > 0; } + public static bool HasValue(this string p_val) + { + return (string.IsNullOrEmpty(p_val) == false); + } + + public static bool HasValue(this DateTime? p_val) + { + return (p_val != null); + } + //public static string Left(this string param, int length) //{ diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/SwaggerGroupConsts.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/SwaggerGroupConsts.cs index 991c7cf..9edfc38 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/SwaggerGroupConsts.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/SwaggerGroupConsts.cs @@ -13,6 +13,7 @@ namespace WY.NewJit.Common public const string 基础数据 = "基础数据"; public const string 扩展 = "扩展"; public const string 报文打印 = "报文打印"; + public const string 报文接收 = "报文接收"; } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecord.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecord.cs new file mode 100644 index 0000000..7ace273 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecord.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; + +namespace WY.NewJit.EdiReceive.Entitys +{ + /// + /// 导入记录 + /// + public class ImportRecord : Entity + { + /// + /// 工厂 + /// + public virtual string Factory { get; set; } + + /// + /// 车位 + /// + public virtual string VehicleLocation { get; set; } + + /// + /// 工位 + /// + public virtual string WorkLocation { get; set; } + + /// + /// 底盘号 + /// + public virtual string Vin { get; set; } + + /// + /// 车身号 + /// + public virtual string VehicleBodyCode { get; set; } + + /// + /// 车型代码 + /// + public virtual string VehicleModelCode { get; set; } + + /// + /// 车型名称 + /// + public virtual string VehicleModelName { get; set; } + + /// + /// 车型描述 + /// + public virtual string VehicleModelDesc { get; set; } + + /// + /// 规格 + /// + public virtual string Spec { get; set; } + + /// + /// 规格说明 + /// + public virtual string SpecDesc { get; set; } + + /// + /// 类别 + /// + public virtual string Type { get; set; } + + /// + /// 涂装下线时间 + /// + public virtual DateTime? PaintOfflineTime { get; set; } + + /// + /// 总装上线时间 + /// + public virtual DateTime? OnlineTime { get; set; } + + /// + /// 内饰颜色 + /// + public virtual string InteriorColor { get; set; } + + /// + /// 外饰颜色 + /// + public virtual string ExteriorTrimmingColor { get; set; } + + /// + /// 序列号 + /// + public virtual string SerialNum { get; set; } + + /// + /// 流水号 + /// + public virtual int HostSN { get; set; } + + /// + /// 生产线:A/B + /// + public virtual string ProductLine { get; set; } + + /// + /// 目的 + /// + public virtual string Target { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 创建人 + /// + public virtual string CreatePerson { get; set; } + + public virtual DateTime? ImportTime { get; set; } + + public virtual string ImportPerson { get; set; } + + public virtual string Remark2 { get; set; } + + public virtual string Remark3 { get; set; } + + public virtual string Remark4 { get; set; } + + public virtual string Remark5 { get; set; } + + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecordHis.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecordHis.cs new file mode 100644 index 0000000..0be703b --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecordHis.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; + +namespace WY.NewJit.EdiReceive.Entitys +{ + /// + /// 导入记录 + /// + public class ImportRecordHis : Entity + { + /// + /// 工厂 + /// + public virtual string Factory { get; set; } + + /// + /// 车位 + /// + public virtual string VehicleLocation { get; set; } + + /// + /// 工位 + /// + public virtual string WorkLocation { get; set; } + + /// + /// 底盘号 + /// + public virtual string Vin { get; set; } + + /// + /// 车身号 + /// + public virtual string VehicleBodyCode { get; set; } + + /// + /// 车型代码 + /// + public virtual string VehicleModelCode { get; set; } + + /// + /// 车型名称 + /// + public virtual string VehicleModelName { get; set; } + + /// + /// 车型描述 + /// + public virtual string VehicleModelDesc { get; set; } + + /// + /// 规格 + /// + public virtual string Spec { get; set; } + + /// + /// 规格说明 + /// + public virtual string SpecDesc { get; set; } + + /// + /// 类别 + /// + public virtual string Type { get; set; } + + /// + /// 涂装下线时间 + /// + public virtual DateTime? PaintOfflineTime { get; set; } + + /// + /// 总装上线时间 + /// + public virtual DateTime? OnlineTime { get; set; } + + /// + /// 内饰颜色 + /// + public virtual string InteriorColor { get; set; } + + /// + /// 外饰颜色 + /// + public virtual string ExteriorTrimmingColor { get; set; } + + /// + /// 序列号 + /// + public virtual string SerialNum { get; set; } + + /// + /// 流水号 + /// + public virtual int HostSN { get; set; } + + /// + /// 生产线:A/B + /// + public virtual string ProductLine { get; set; } + + /// + /// 目的 + /// + public virtual string Target { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 创建人 + /// + public virtual string CreatePerson { get; set; } + + public virtual DateTime? ImportTime { get; set; } + + public virtual string ImportPerson { get; set; } + + public virtual string Remark2 { get; set; } + + public virtual string Remark3 { get; set; } + + public virtual string Remark4 { get; set; } + + public virtual string Remark5 { get; set; } + + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/LastImportHostSN.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/LastImportHostSN.cs new file mode 100644 index 0000000..8038136 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/LastImportHostSN.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace WY.NewJit.EdiReceive.Entitys +{ + public class LastImportHostSN : Entity + { + public string ProductLineCode { get; set; } + + public int HostSN { get; set; } + + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/WY.NewJit.Domain.csproj b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/WY.NewJit.Domain.csproj index 7fda79f..55f387a 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/WY.NewJit.Domain.csproj +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/WY.NewJit.Domain.csproj @@ -30,6 +30,7 @@ + diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109051359_NewJitPG_HQ_Init.Designer.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.Designer.cs similarity index 95% rename from src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109051359_NewJitPG_HQ_Init.Designer.cs rename to src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.Designer.cs index ec2e8f2..9a06216 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109051359_NewJitPG_HQ_Init.Designer.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.Designer.cs @@ -11,8 +11,8 @@ using WY.NewJit.EntityFrameworkCore; namespace WY.NewJit.Migrations { [DbContext(typeof(NewJitMigrationsDbContext))] - [Migration("20240109051359_NewJitPG_HQ_Init")] - partial class NewJitPG_HQ_Init + [Migration("20240109072607_Add_ImportRec_Table")] + partial class Add_ImportRec_Table { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -2017,6 +2017,265 @@ namespace WY.NewJit.Migrations b.ToTable("FisSequenceInfo"); }); + modelBuilder.Entity("WY.NewJit.EdiReceive.Entitys.ImportRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatePerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExteriorTrimmingColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("ImportPerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ImportTime") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("InteriorColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("OnlineTime") + .HasColumnType("datetime"); + + b.Property("PaintOfflineTime") + .HasColumnType("datetime"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark2") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark3") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark4") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark5") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SerialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Spec") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SpecDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Target") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleBodyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("VehicleModelName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("WorkLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisImportRecord"); + }); + + modelBuilder.Entity("WY.NewJit.EdiReceive.Entitys.ImportRecordHis", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatePerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExteriorTrimmingColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("ImportPerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ImportTime") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("InteriorColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("OnlineTime") + .HasColumnType("datetime"); + + b.Property("PaintOfflineTime") + .HasColumnType("datetime"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark2") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark3") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark4") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark5") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SerialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Spec") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SpecDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Target") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleBodyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("VehicleModelName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("WorkLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_ImportRecHis_HostSN"); + + b.ToTable("FisImportRecordHis"); + }); + + modelBuilder.Entity("WY.NewJit.EdiReceive.Entitys.LastImportHostSN", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("ProductLineCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisLastImportHostSN"); + }); + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => { b.Property("Id") diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109051359_NewJitPG_HQ_Init.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.cs similarity index 95% rename from src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109051359_NewJitPG_HQ_Init.cs rename to src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.cs index 2cc3cdf..560537c 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109051359_NewJitPG_HQ_Init.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace WY.NewJit.Migrations { - public partial class NewJitPG_HQ_Init : Migration + public partial class Add_ImportRec_Table : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -603,6 +603,97 @@ namespace WY.NewJit.Migrations table.PrimaryKey("PK_FisGlobalSettings", x => x.Id); }); + migrationBuilder.CreateTable( + name: "FisImportRecord", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Factory = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + WorkLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Vin = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleBodyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleModelCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleModelName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + VehicleModelDesc = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Spec = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + SpecDesc = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PaintOfflineTime = table.Column(type: "datetime", nullable: true), + OnlineTime = table.Column(type: "datetime", nullable: true), + InteriorColor = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ExteriorTrimmingColor = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + SerialNum = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + HostSN = table.Column(type: "int", nullable: false), + ProductLine = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Target = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Remark = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + CreateTime = table.Column(type: "datetime2", nullable: true), + CreatePerson = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ImportTime = table.Column(type: "datetime2", maxLength: 50, nullable: true), + ImportPerson = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Remark2 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + Remark3 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + Remark4 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + Remark5 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisImportRecord", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisImportRecordHis", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Factory = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + WorkLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Vin = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleBodyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleModelCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + VehicleModelName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + VehicleModelDesc = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Spec = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + SpecDesc = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + PaintOfflineTime = table.Column(type: "datetime", nullable: true), + OnlineTime = table.Column(type: "datetime", nullable: true), + InteriorColor = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ExteriorTrimmingColor = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + SerialNum = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + HostSN = table.Column(type: "int", nullable: false), + ProductLine = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Target = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Remark = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + CreateTime = table.Column(type: "datetime2", nullable: true), + CreatePerson = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + ImportTime = table.Column(type: "datetime2", maxLength: 50, nullable: true), + ImportPerson = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + Remark2 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + Remark3 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + Remark4 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), + Remark5 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FisImportRecordHis", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FisLastImportHostSN", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProductLineCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true), + HostSN = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_FisLastImportHostSN", x => x.Id); + }); + migrationBuilder.CreateTable( name: "FisLineSN", columns: table => new @@ -2650,6 +2741,11 @@ namespace WY.NewJit.Migrations table: "FisDicType", column: "DicTypeCode"); + migrationBuilder.CreateIndex( + name: "IX_ImportRecHis_HostSN", + table: "FisImportRecordHis", + column: "HostSN"); + migrationBuilder.CreateIndex( name: "IX_FisLineSN_ProductType_ProductLine_PartType", table: "FisLineSN", @@ -2931,6 +3027,15 @@ namespace WY.NewJit.Migrations migrationBuilder.DropTable( name: "FisGlobalSettings"); + migrationBuilder.DropTable( + name: "FisImportRecord"); + + migrationBuilder.DropTable( + name: "FisImportRecordHis"); + + migrationBuilder.DropTable( + name: "FisLastImportHostSN"); + migrationBuilder.DropTable( name: "FisLineSN"); diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/NewJitMigrationsDbContextModelSnapshot.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/NewJitMigrationsDbContextModelSnapshot.cs index 9bd8baa..cf3691a 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/NewJitMigrationsDbContextModelSnapshot.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/NewJitMigrationsDbContextModelSnapshot.cs @@ -2015,6 +2015,265 @@ namespace WY.NewJit.Migrations b.ToTable("FisSequenceInfo"); }); + modelBuilder.Entity("WY.NewJit.EdiReceive.Entitys.ImportRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatePerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExteriorTrimmingColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("ImportPerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ImportTime") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("InteriorColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("OnlineTime") + .HasColumnType("datetime"); + + b.Property("PaintOfflineTime") + .HasColumnType("datetime"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark2") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark3") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark4") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark5") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SerialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Spec") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SpecDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Target") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleBodyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("VehicleModelName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("WorkLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisImportRecord"); + }); + + modelBuilder.Entity("WY.NewJit.EdiReceive.Entitys.ImportRecordHis", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatePerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("ExteriorTrimmingColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("ImportPerson") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ImportTime") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("InteriorColor") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("OnlineTime") + .HasColumnType("datetime"); + + b.Property("PaintOfflineTime") + .HasColumnType("datetime"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark2") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark3") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark4") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark5") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SerialNum") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Spec") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SpecDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Target") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleBodyCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("VehicleModelDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("VehicleModelName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("WorkLocation") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("HostSN") + .HasDatabaseName("IX_ImportRecHis_HostSN"); + + b.ToTable("FisImportRecordHis"); + }); + + modelBuilder.Entity("WY.NewJit.EdiReceive.Entitys.LastImportHostSN", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("HostSN") + .HasColumnType("int"); + + b.Property("ProductLineCode") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("FisLastImportHostSN"); + }); + modelBuilder.Entity("WY.NewJit.Extends.MenBanPackingList", b => { b.Property("Id") diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs index de663c6..eb9d7de 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs @@ -17,6 +17,7 @@ using WY.NewJit.Commons; using WY.NewJit.Extends.PaiGe.WMS; using WY.NewJit.MsgBaseData.Entitys; using WY.NewJit.PrintTable; +using WY.NewJit.EdiReceive.Entitys; namespace WY.NewJit.EntityFrameworkCore { @@ -150,6 +151,15 @@ namespace WY.NewJit.EntityFrameworkCore public DbSet already_print { get; set; } #endregion + #region 派格红旗报文接收 + public DbSet ImportRecords { get; set; } + + public DbSet ImportRecordHis { get; set; } + + public DbSet LastImportHostSN { get; set; } + + #endregion + /* Add DbSet properties for your Aggregate Roots / Entities here. * Also map them inside NewJitDbContextModelCreatingExtensions.ConfigureNewJit */ diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs index e77de67..9ace93f 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs @@ -3,6 +3,7 @@ using Volo.Abp; using Volo.Abp.EntityFrameworkCore.Modeling; using WY.NewJit.Books; using WY.NewJit.Commons; +using WY.NewJit.EdiReceive.Entitys; using WY.NewJit.Extends; using WY.NewJit.Extends.PaiGe; using WY.NewJit.Extends.PaiGe.WMS; @@ -591,6 +592,88 @@ namespace WY.NewJit.EntityFrameworkCore b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 }); #endregion + + #region 派格红旗报文接收 + builder.Entity(b => + { + b.ToTable(NewJitConsts.DbTablePrefix + nameof(ImportRecord)); + b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 + b.Property(itm => itm.Factory).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleLocation).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.WorkLocation).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.Vin).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleBodyCode).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleModelCode).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleModelName).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.VehicleModelDesc).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.Spec).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.SpecDesc).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.Type).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.PaintOfflineTime).HasColumnType("datetime"); + b.Property(itm => itm.OnlineTime).HasColumnType("datetime"); + b.Property(itm => itm.InteriorColor).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.ExteriorTrimmingColor).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.SerialNum).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.HostSN).HasColumnType("int"); + b.Property(itm => itm.ProductLine).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.Target).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.Remark).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.CreateTime).HasColumnType("datetime2"); + b.Property(itm => itm.CreatePerson).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.ImportTime).HasColumnType("datetime2").HasMaxLength(50); + b.Property(itm => itm.ImportPerson).HasColumnType("varchar").HasMaxLength(50); + //b.HasIndex(itm => itm.HostSN).HasDatabaseName("IX_ImportRec_HostSN"); + b.Property(itm => itm.Remark2).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.Remark3).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.Remark4).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.Remark5).HasColumnType("varchar").HasMaxLength(200); + }); + + builder.Entity(b => + { + b.ToTable(NewJitConsts.DbTablePrefix + nameof(ImportRecordHis)); + b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 + b.Property(itm => itm.Factory).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleLocation).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.WorkLocation).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.Vin).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleBodyCode).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleModelCode).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.VehicleModelName).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.VehicleModelDesc).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.Spec).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.SpecDesc).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.Type).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.PaintOfflineTime).HasColumnType("datetime"); + b.Property(itm => itm.OnlineTime).HasColumnType("datetime"); + b.Property(itm => itm.InteriorColor).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.ExteriorTrimmingColor).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.SerialNum).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.HostSN).HasColumnType("int"); + b.Property(itm => itm.ProductLine).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.Target).HasColumnType("nvarchar").HasMaxLength(200); + b.Property(itm => itm.Remark).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.CreateTime).HasColumnType("datetime2"); + b.Property(itm => itm.CreatePerson).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.ImportTime).HasColumnType("datetime2").HasMaxLength(50); + b.Property(itm => itm.ImportPerson).HasColumnType("varchar").HasMaxLength(50); + b.HasIndex(itm => itm.HostSN).HasDatabaseName("IX_ImportRecHis_HostSN"); + b.Property(itm => itm.Remark2).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.Remark3).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.Remark4).HasColumnType("varchar").HasMaxLength(200); + b.Property(itm => itm.Remark5).HasColumnType("varchar").HasMaxLength(200); + }); + + builder.Entity(b => + { + b.ToTable(NewJitConsts.DbTablePrefix + nameof(LastImportHostSN)); + b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 + b.Property(itm => itm.ProductLineCode).HasColumnType("varchar").HasMaxLength(50); + b.Property(itm => itm.HostSN).HasColumnType("int"); + }); + + + #endregion } } } \ No newline at end of file From 4a7cad660bd81205fe8b05adafa8f128d26b788f Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 10 Jan 2024 11:27:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MenBanReports/MenBanPrintInputDto.cs | 5 ++ .../BaseConfig/Dto/BaseConfigDto.cs | 31 +++++++ .../WY.NewJit.Application.Contracts.csproj | 4 + .../WY.NewJit.Application.Contracts.xml | 30 +++++++ .../BaseConfig/BaseGonfigService.cs | 81 +++++++++++++++++++ .../PrintTable/WaitPrintAppService.cs | 33 +++----- .../WY.NewJit.Application.xml | 26 ++++++ .../MsgBaseData/Entitys/BaseConfig.cs | 32 ++++++++ .../Services/BaseGonfigDomainService.cs | 22 +++++ .../EntityFrameworkCore/NewJitDbContext.cs | 2 + .../NewJitDbContextModelCreatingExtensions.cs | 11 ++- .../src/WY.NewJit.Web/appsettings.json | 8 +- 12 files changed, 258 insertions(+), 27 deletions(-) create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs create mode 100644 src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs index 0a03b8d..02ac4cd 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs @@ -33,6 +33,11 @@ namespace WY.NewJit.Extends /// public virtual int EndHostSN { get; set; } + /// + /// 打印条数 + /// + public virtual int PrintCount { get; set; } + #region 重新打印、补打时使用 /// /// 重新打印时使用。装箱单主表ID列表,报废时传入一个,重打时可传入多个 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs new file mode 100644 index 0000000..cd10af3 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace WY.NewJit.MsgBaseData +{ + /// + /// 基础参数配置表 + /// + [Serializable] + public class BaseConfigDto : EntityDto + { + /// + /// 参数名称 + /// + public virtual string ParamName { get; set; } + /// + /// 参数值 + /// + public virtual string ParamValue { get; set; } + /// + /// 状态 + /// + public virtual int State { get; set; } + /// + /// 备注 + /// + public virtual int Remark { get; set; } + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj index 1525bc8..f9617ae 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj @@ -31,4 +31,8 @@ + + + + diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml index abffb13..4fdf9fb 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml @@ -209,6 +209,11 @@ 终止大众顺序号 + + + 打印条数 + + 重新打印时使用。装箱单主表ID列表,报废时传入一个,重打时可传入多个 @@ -940,6 +945,31 @@ 整车总成Id Erp总成列表 + + + 基础参数配置表 + + + + + 参数名称 + + + + + 参数值 + + + + + 状态 + + + + + 备注 + + 通用字典信息DTO diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs new file mode 100644 index 0000000..9a7980e --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs @@ -0,0 +1,81 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; +using WY.NewJit.Common; + +namespace WY.NewJit.MsgBaseData +{ + /// + /// 通用字典应用服务实现 + /// + [Route("api/newjit/baseconfig")] + [ApiExplorerSettings(GroupName = SwaggerGroupConsts.基础数据)] + public class BaseGonfigService : ApplicationService + { + private readonly IRepository _repository; + /// + /// 日志 + /// + private ILogger _logger; + + /// + /// 错误信息前缀 + /// + private string _errorMessagePrefix + { + get + { + return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; + } + } + + /// + /// 构造函数 + /// + public BaseGonfigService( + IRepository repository, + ILogger logger + ) + { + _repository = repository; + _logger = logger; + } + + + #region 公共方法 + /// + /// 获取所有基本参数数据 + /// + /// + [HttpGet] + [UnitOfWork(false)] + [Route("list")] + public virtual async Task> GetBaseConfigListAsync() + { + _logger.LogDebug(_errorMessagePrefix + "GetBaseConfigListAsync 进入"); + try + { + var lst = await _repository.GetListAsync(); + + var items = ObjectMapper.Map, List>(lst); + + return new ListResultDto(items); + } + catch (Exception ex) + { + string errMsg = _errorMessagePrefix + "GetBaseConfigListAsync 执行出错:" + ex.Message; + _logger.LogError(errMsg); + return new ListResultDto(new List()); + } + } + #endregion + + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs index d79d20b..4bd1794 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs @@ -336,20 +336,10 @@ namespace WY.NewJit.PrintTable { List billLst = new List(); ListResultDto ret = new ListResultDto(billLst); - - int printBillCnt = 0; + if (input.PrintCount == 0) input.PrintCount = 10;//调试用的 if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.正常打印) { - if ((input.BeginHostSN % 10000) > 1999) - { - throw new Exception("起始大众顺序号不能大于1999!"); - } - if (input.BeginHostSN > input.EndHostSN) - { - throw new Exception("起始大众顺序号不能大于止大众顺序号!"); - } - printBillCnt = input.EndHostSN - input.BeginHostSN + 1; int minHostSN2 = await _waitPrintRepository.Where(itm => itm.BusinessType == BusinessTypeEnum.MenBan @@ -370,8 +360,7 @@ namespace WY.NewJit.PrintTable && itm.PrintType == PrintTypeEnum.OrderPrint //顺序打印 && itm.HostSN2 >= minHostSN2) .OrderBy(itm => itm.HostSN2) - .Take(printBillCnt).ToListAsync(); - + .Take(input.PrintCount).ToListAsync(); bool hasData = billLst.Any(); if (hasData == false) { @@ -401,7 +390,7 @@ namespace WY.NewJit.PrintTable /// private List DoMBPrint(MenBanPrintInputDto input, int pageIdx, ref double maxBillNum, double maxSN, DateTime printTime, List billLst, string rightOrLeft) { - const int _colNumberPerPage = 12; + const int _colNumberPerPage = 10; List retLst = new List(); //取当前页内容 @@ -566,7 +555,7 @@ namespace WY.NewJit.PrintTable //装箱单号规则 1开头,11位,自增顺序号 if (newSNStr.Length < 11) { - return "F" + newSNStr.PadLeft(10, '0'); + return "W" + newSNStr.PadLeft(10, '0'); } return newSNStr; } @@ -610,7 +599,7 @@ namespace WY.NewJit.PrintTable targetMain.BillNum = sourceObj.BillNum; //单据编号 targetMain.State = 0; targetMain.BillType = 206; //单据类型 - targetMain.SubBillType = 21004; //单据子类型 + targetMain.SubBillType = 21033; //红旗单据子类型 targetMain.BillTime = sourceObj.PrintDate; //单据时间 targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员 targetMain.DetailQty = 0; //明细数量 @@ -663,8 +652,8 @@ namespace WY.NewJit.PrintTable 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.LineNum = (idx2 + 10); //行号 + targetDetail.SeqNum = (idx2 + 10).ToString(); //顺序号sourceRec.HostSN.ToString() //targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码 targetDetail.ProjectId = ""; //车型 targetDetail.State = "0"; //状态 @@ -915,7 +904,7 @@ namespace WY.NewJit.PrintTable sw.Stop(); _logger.LogWarning($"SaveMenBanReport读取数据 - {sw.ElapsedMilliseconds}毫秒"); sw.Start(); - int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 + int pageCnt = (int)Math.Ceiling(billLst.Count / 10.0); //每页打印10列,取打印页数 double maxBillNum = 0; @@ -982,7 +971,7 @@ namespace WY.NewJit.PrintTable return ret; } - int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数 + int pageCnt = (int)Math.Ceiling(billLst.Count / 10.0); //每页打印10列,取打印页数 double maxBillNum = 0; @@ -1067,7 +1056,7 @@ namespace WY.NewJit.PrintTable foreach (var masterObj in targetLst) { int trueCnt = masterObj.Details.Count; - int planCnt = 12; + int planCnt = 10; if (trueCnt > planCnt) { throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); @@ -1182,7 +1171,7 @@ namespace WY.NewJit.PrintTable foreach (var masterObj in targetLst) { int trueCnt = masterObj.Details.Count; - int planCnt = 12; + int planCnt = 10; if (trueCnt > planCnt) { throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml index ce9a8c9..5575954 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml @@ -414,6 +414,32 @@ + + + 通用字典应用服务实现 + + + + + 日志 + + + + + 错误信息前缀 + + + + + 构造函数 + + + + + 获取所有基本参数数据 + + + 通用字典应用服务实现 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs new file mode 100644 index 0000000..0f08224 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace WY.NewJit.MsgBaseData +{ + /// + /// 基础参数 + /// + public class BaseConfig : AggregateRoot + { + /// + /// 参数名称 + /// + public virtual string ParamName { get; set; } + /// + /// 参数值 + /// + public virtual string ParamValue { get; set; } + /// + /// 状态 + /// + public virtual int State { get; set; } + /// + /// 备注 + /// + public virtual int Remark { get; set; } + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs new file mode 100644 index 0000000..30c2ff6 --- /dev/null +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs @@ -0,0 +1,22 @@ +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; + +namespace WY.NewJit.MsgBaseData +{ + public class BaseGonfigDomainService : DomainService + { + private readonly IRepository _repository; + + public BaseGonfigDomainService(IRepository repository) + { + _repository = repository; + } + + + } +} diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs index de663c6..cae5509 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs @@ -58,6 +58,8 @@ namespace WY.NewJit.EntityFrameworkCore public DbSet PrintTemplateConfigurations { get; set; } + public DbSet BaseConfigs { get; set; } + #endregion #region 报文解析及校验 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs index e77de67..130fb8f 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs @@ -162,7 +162,16 @@ namespace WY.NewJit.EntityFrameworkCore }); - + builder.Entity(b => + { + b.ToTable(NewJitConsts.DbTablePrefix + nameof(BaseConfig)); //将Book实体映射到数据库表XXXBooks + b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它 + b.Property("ParamName").HasMaxLength(50); + b.Property("ParamValue").HasMaxLength(50); + b.Property("State").HasPrecision(1); + b.Property("Remark").HasMaxLength(5000); + b.HasIndex(x => new { x.ParamName}).IsUnique(); + }); #endregion diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json index fc604b6..a79662f 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json @@ -66,10 +66,10 @@ }, "ProductLineTimeoutRemind": { - "01": 30, - "05": 30, - "07": 30, - "08": 30 + "01": 40, + "05": 40, + "07": 40, + "08": 40 } }, "Serilog": { From 5eea910a74f3df325caa72e8978c9bf2f3703110 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 10 Jan 2024 11:32:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs index 0f08224..e6754cd 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs @@ -27,6 +27,6 @@ namespace WY.NewJit.MsgBaseData /// /// 备注 /// - public virtual int Remark { get; set; } + public virtual string Remark { get; set; } } } From 5907e39946c15f6448bfd949496c2177cae984bb Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 10 Jan 2024 11:33:00 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NewJitDbContextModelCreatingExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs index 85a6c0e..989bf2d 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs @@ -170,7 +170,7 @@ namespace WY.NewJit.EntityFrameworkCore b.Property("ParamName").HasMaxLength(50); b.Property("ParamValue").HasMaxLength(50); b.Property("State").HasPrecision(1); - b.Property("Remark").HasMaxLength(5000); + b.Property("Remark").HasMaxLength(500); b.HasIndex(x => new { x.ParamName}).IsUnique(); });