lvzb 11 months ago
parent
commit
08071e6e4b
  1. 131
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordCreateDto.cs
  2. 197
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordDto.cs
  3. 131
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisCreateDto.cs
  4. 132
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordHisDto.cs
  5. 86
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Dtos/ImportRecordInputDto.cs
  6. 69
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/Interfaces/IImportRecordAppService.cs
  7. 1
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj
  8. 559
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
  9. 476
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportRecordAppService.cs
  10. 9
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/NewJitApplicationAutoMapperProfile.cs
  11. 115
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
  12. 3
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.DbMigrator/appsettings.json
  13. 10
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs
  14. 1
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/SwaggerGroupConsts.cs
  15. 139
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecord.cs
  16. 139
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/ImportRecordHis.cs
  17. 17
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Entitys/LastImportHostSN.cs
  18. 1
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/WY.NewJit.Domain.csproj
  19. 5757
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701062532_Created_NewJit_Entity2022-07-01.Designer.cs
  20. 338
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701062532_Created_NewJit_Entity2022-07-01.cs
  21. 233
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701064724_Created_NewJit_Entity2022-07-01_2.cs
  22. 1170
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.Designer.cs
  23. 3238
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.cs
  24. 1166
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/NewJitMigrationsDbContextModelSnapshot.cs
  25. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/WY.NewJit.EntityFrameworkCore.DbMigrations.csproj
  26. 10
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs
  27. 83
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs
  28. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json

131
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
{
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { get; set; }
/// <summary>
/// 车位
/// </summary>
public virtual string VehicleLocation { get; set; }
/// <summary>
/// 工位
/// </summary>
public virtual string WorkLocation { get; set; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string Vin { get; set; }
/// <summary>
/// 车身号
/// </summary>
public virtual string VehicleBodyCode { get; set; }
/// <summary>
/// 车型代码
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 车型描述
/// </summary>
public virtual string VehicleModelDesc { get; set; }
/// <summary>
/// 规格
/// </summary>
public virtual string Spec { get; set; }
/// <summary>
/// 规格说明
/// </summary>
public virtual string SpecDesc { get; set; }
/// <summary>
/// 类别
/// </summary>
public virtual string Type { get; set; }
/// <summary>
/// 涂装下线时间
/// </summary>
public virtual DateTime? PaintOfflineTime { get; set; }
/// <summary>
/// 总装上线时间
/// </summary>
public virtual DateTime? OnlineTime { get; set; }
/// <summary>
/// 内饰颜色
/// </summary>
public virtual string InteriorColor { get; set; }
/// <summary>
/// 外饰颜色
/// </summary>
public virtual string ExteriorTrimmingColor { get; set; }
/// <summary>
/// 序列号
/// </summary>
public virtual string SerialNum { get; set; }
/// <summary>
/// 流水号
/// </summary>
public virtual int HostSN { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 目的
/// </summary>
public virtual string Target { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
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; }
}
}

197
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
{
/// <summary>
/// 导入记录表
/// </summary>
[ExcelExporter(Name = "导入记录表", AutoFitAllColumn = true, MaxRowNumberOnASheet = 50000)] //一个Sheet最大允许的行数,设置了之后将输出多个Sheet
[Serializable]
public class ImportRecordDto
{
[ExporterHeader(IsIgnore = true)]
[ImporterHeader(IsIgnore = true)]
public virtual Guid Id { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
[ImporterHeader(Name = "工厂")]
public virtual string Factory { get; set; }
/// <summary>
/// 车位
/// </summary>
[ExporterHeader(DisplayName = "车位")]
[ImporterHeader(Name = "车位")]
public virtual string VehicleLocation { get; set; }
/// <summary>
/// 工位
/// </summary>
[ExporterHeader(DisplayName = "工位")]
[ImporterHeader(Name = "工位")]
public virtual string WorkLocation { get; set; }
/// <summary>
/// 底盘号
/// </summary>
[ExporterHeader(DisplayName = "底盘号")]
[ImporterHeader(Name = "底盘号")]
public virtual string Vin { get; set; }
/// <summary>
/// 车身号
/// </summary>
[ExporterHeader(DisplayName = "车身号")]
[ImporterHeader(Name = "车身号")]
public virtual string VehicleBodyCode { get; set; }
/// <summary>
/// 车型代码
/// </summary>
[ExporterHeader(DisplayName = "车型代码")]
[ImporterHeader(Name = "车型代码")]
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
[ExporterHeader(DisplayName = "车型名称")]
[ImporterHeader(Name = "车型名称")]
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 车型描述
/// </summary>
[ExporterHeader(DisplayName = "车型描述")]
[ImporterHeader(Name = "车型描述")]
public virtual string VehicleModelDesc { get; set; }
/// <summary>
/// 规格
/// </summary>
[ExporterHeader(DisplayName = "规格")]
[ImporterHeader(Name = "规格")]
public virtual string Spec { get; set; }
/// <summary>
/// 规格说明
/// </summary>
[ExporterHeader(DisplayName = "规格说明")]
[ImporterHeader(Name = "规格说明")]
public virtual string SpecDesc { get; set; }
/// <summary>
/// 类别
/// </summary>
[ExporterHeader(DisplayName = "类别")]
[ImporterHeader(Name = "类别")]
public virtual string Type { get; set; }
/// <summary>
/// 涂装下线时间
/// </summary>
[ExporterHeader(DisplayName = "涂装下线时间", Format ="yyyy/MM/dd HH:mm:ss")]
[ImporterHeader(Name = "涂装下线时间", Format = "yyyy/MM/dd HH:mm:ss")]
public virtual DateTime? PaintOfflineTime { get; set; }
/// <summary>
/// 总装上线时间
/// </summary>
[ExporterHeader(DisplayName = "总装上线时间", Format = "yyyy/MM/dd HH:mm:ss")]
[ImporterHeader(Name = "总装上线时间", Format = "yyyy/MM/dd HH:mm:ss")]
public virtual DateTime? OnlineTime { get; set; }
/// <summary>
/// 内饰颜色
/// </summary>
[ExporterHeader(DisplayName = "内饰颜色")]
[ImporterHeader(Name = "内饰颜色")]
public virtual string InteriorColor { get; set; }
/// <summary>
/// 外饰颜色
/// </summary>
[ExporterHeader(DisplayName = "外饰颜色")]
[ImporterHeader(Name = "外饰颜色")]
public virtual string ExteriorTrimmingColor { get; set; }
/// <summary>
/// 序列号
/// </summary>
[ExporterHeader(DisplayName = "序列号")]
[ImporterHeader(Name = "序列号")]
public virtual string SerialNum { get; set; }
/// <summary>
/// 流水号
/// </summary>
[ExporterHeader(DisplayName = "流水号")]
[ImporterHeader(Name = "流水号")]
public virtual int HostSN { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
[ExporterHeader(DisplayName = "生产线:A/B")]
[ImporterHeader(Name = "生产线:A/B")]
public virtual string ProductLine { get; set; }
/// <summary>
/// 目的
/// </summary>
[ExporterHeader(DisplayName = "目的")]
[ImporterHeader(Name = "目的")]
public virtual string Target { get; set; }
/// <summary>
/// 备注
/// </summary>
[ExporterHeader(DisplayName = "备注")]
[ImporterHeader(Name = "备注")]
public virtual string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[ExporterHeader(DisplayName = "创建时间", Format = "yyyy/MM/dd HH:mm:ss")]
[ImporterHeader(Name = "创建时间", Format = "yyyy/MM/dd HH:mm:ss")]
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
[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; }
}
}

131
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
{
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { get; set; }
/// <summary>
/// 车位
/// </summary>
public virtual string VehicleLocation { get; set; }
/// <summary>
/// 工位
/// </summary>
public virtual string WorkLocation { get; set; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string Vin { get; set; }
/// <summary>
/// 车身号
/// </summary>
public virtual string VehicleBodyCode { get; set; }
/// <summary>
/// 车型代码
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 车型描述
/// </summary>
public virtual string VehicleModelDesc { get; set; }
/// <summary>
/// 规格
/// </summary>
public virtual string Spec { get; set; }
/// <summary>
/// 规格说明
/// </summary>
public virtual string SpecDesc { get; set; }
/// <summary>
/// 类别
/// </summary>
public virtual string Type { get; set; }
/// <summary>
/// 涂装下线时间
/// </summary>
public virtual DateTime? PaintOfflineTime { get; set; }
/// <summary>
/// 总装上线时间
/// </summary>
public virtual DateTime? OnlineTime { get; set; }
/// <summary>
/// 内饰颜色
/// </summary>
public virtual string InteriorColor { get; set; }
/// <summary>
/// 外饰颜色
/// </summary>
public virtual string ExteriorTrimmingColor { get; set; }
/// <summary>
/// 序列号
/// </summary>
public virtual string SerialNum { get; set; }
/// <summary>
/// 流水号
/// </summary>
public virtual int HostSN { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 目的
/// </summary>
public virtual string Target { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
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; }
}
}

132
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; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { get; set; }
/// <summary>
/// 车位
/// </summary>
public virtual string VehicleLocation { get; set; }
/// <summary>
/// 工位
/// </summary>
public virtual string WorkLocation { get; set; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string Vin { get; set; }
/// <summary>
/// 车身号
/// </summary>
public virtual string VehicleBodyCode { get; set; }
/// <summary>
/// 车型代码
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 车型描述
/// </summary>
public virtual string VehicleModelDesc { get; set; }
/// <summary>
/// 规格
/// </summary>
public virtual string Spec { get; set; }
/// <summary>
/// 规格说明
/// </summary>
public virtual string SpecDesc { get; set; }
/// <summary>
/// 类别
/// </summary>
public virtual string Type { get; set; }
/// <summary>
/// 涂装下线时间
/// </summary>
public virtual DateTime? PaintOfflineTime { get; set; }
/// <summary>
/// 总装上线时间
/// </summary>
public virtual DateTime? OnlineTime { get; set; }
/// <summary>
/// 内饰颜色
/// </summary>
public virtual string InteriorColor { get; set; }
/// <summary>
/// 外饰颜色
/// </summary>
public virtual string ExteriorTrimmingColor { get; set; }
/// <summary>
/// 序列号
/// </summary>
public virtual string SerialNum { get; set; }
/// <summary>
/// 流水号
/// </summary>
public virtual int HostSN { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 目的
/// </summary>
public virtual string Target { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
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; }
}
}

86
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
{
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { get; set; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string Vin { get; set; }
/// <summary>
/// 车型代码
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 涂装下线时间起
/// </summary>
public virtual DateTime? PaintOfflineTimeBegin { get; set; }
/// <summary>
/// 涂装下线时间止
/// </summary>
public virtual DateTime? PaintOfflineTimeEnd { get; set; }
/// <summary>
/// 总装上线时间起
/// </summary>
public virtual DateTime? OnlineTimeBegin { get; set; }
/// <summary>
/// 总装上线时间止
/// </summary>
public virtual DateTime? OnlineTimeEnd { get; set; }
/// <summary>
/// 序列号起
/// </summary>
public virtual string SerialNumBegin { get; set; }
/// <summary>
/// 序列号止
/// </summary>
public virtual string SerialNumEnd { get; set; }
/// <summary>
/// 流水号起
/// </summary>
public virtual int? HostSNBegin { get; set; }
/// <summary>
/// 流水号止
/// </summary>
public virtual int? HostSNEnd { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 创建时间起
/// </summary>
public virtual DateTime? CreateTimeBegin { get; set; }
/// <summary>
/// 创建时间止
/// </summary>
public virtual DateTime? CreateTimeEnd { get; set; }
public virtual DateTime? ImportTimeBegin { get; set; }
public virtual DateTime? ImportTimeEnd { get; set; }
}
}

69
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 接口方法
/// 根据筛选条件获取分页实体列表
/// </summary>
/// <param name="input">输入查询条件</param>
/// <param name="page">输入分页条件</param>
/// <returns>返回符合条件的排序分页列表</returns>
Task<PagedResultDto<ImportRecordDto>> GetListAsync(ImportRecordInputDto input);
/// <summary>
/// 按主键获取唯一实体
/// </summary>
/// <param name="id">主键</param>
/// <returns>实体信息</returns>
Task<ObjectResultDto<ImportRecordDto>> GetAsync(Guid id);
/// <summary>
/// 添加实体
/// </summary>
/// <param name="input">添加内容</param>
/// <returns>执行成功返回真</returns>
Task<ObjectResultDto<Guid>> CreateAsync(ImportRecordCreateDto input);
/// <summary>
/// 修改实体
/// </summary>
/// <param name="id">更新主键</param>
/// <param name="input">修改内容</param>
/// <returns>执行成功返回真</returns>
Task<ObjectResultDto> UpdateAsync(Guid id, ImportRecordCreateDto input);
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">删除主键</param>
/// <returns>执行成功返回真</returns>
Task<ObjectResultDto> DeleteAsync(string id);
/// <summary>
/// 导出信息
/// </summary>
/// <param name="input">导出查询条件</param>
/// <returns>执行成功返回真</returns>
Task<ObjectResultDto<string>> ExportAsync(ImportRecordInputDto input);
/// <summary>
/// 导入信息
/// </summary>
/// <param name="input">导入文件流</param>
/// <returns>执行成功返回真</returns>
Task<ObjectResultDto> ImportAsync([FromForm] IFormFileCollection files);
#endregion
}
}

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

@ -22,6 +22,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0" />
<PackageReference Include="Volo.Abp.ObjectExtending" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="4.3.3" />

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

@ -4,6 +4,565 @@
<name>WY.NewJit.Application.Contracts</name>
</assembly>
<members>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.Factory">
<summary>
工厂
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.VehicleLocation">
<summary>
车位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.WorkLocation">
<summary>
工位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.Vin">
<summary>
底盘号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.VehicleBodyCode">
<summary>
车身号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.VehicleModelCode">
<summary>
车型代码
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.VehicleModelName">
<summary>
车型名称
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.VehicleModelDesc">
<summary>
车型描述
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.Spec">
<summary>
规格
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.SpecDesc">
<summary>
规格说明
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.Type">
<summary>
类别
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.PaintOfflineTime">
<summary>
涂装下线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.OnlineTime">
<summary>
总装上线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.InteriorColor">
<summary>
内饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.ExteriorTrimmingColor">
<summary>
外饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.SerialNum">
<summary>
序列号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.HostSN">
<summary>
流水号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.ProductLine">
<summary>
生产线:A/B
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.Target">
<summary>
目的
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.Remark">
<summary>
备注
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto.CreatePerson">
<summary>
创建人
</summary>
</member>
<member name="T:WY.NewJit.EdiReceive.Dtos.ImportRecordDto">
<summary>
导入记录表
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.Factory">
<summary>
工厂
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.VehicleLocation">
<summary>
车位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.WorkLocation">
<summary>
工位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.Vin">
<summary>
底盘号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.VehicleBodyCode">
<summary>
车身号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.VehicleModelCode">
<summary>
车型代码
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.VehicleModelName">
<summary>
车型名称
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.VehicleModelDesc">
<summary>
车型描述
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.Spec">
<summary>
规格
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.SpecDesc">
<summary>
规格说明
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.Type">
<summary>
类别
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.PaintOfflineTime">
<summary>
涂装下线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.OnlineTime">
<summary>
总装上线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.InteriorColor">
<summary>
内饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.ExteriorTrimmingColor">
<summary>
外饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.SerialNum">
<summary>
序列号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.HostSN">
<summary>
流水号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.ProductLine">
<summary>
生产线:A/B
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.Target">
<summary>
目的
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.Remark">
<summary>
备注
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordDto.CreatePerson">
<summary>
创建人
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.Factory">
<summary>
工厂
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.VehicleLocation">
<summary>
车位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.WorkLocation">
<summary>
工位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.Vin">
<summary>
底盘号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.VehicleBodyCode">
<summary>
车身号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.VehicleModelCode">
<summary>
车型代码
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.VehicleModelName">
<summary>
车型名称
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.VehicleModelDesc">
<summary>
车型描述
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.Spec">
<summary>
规格
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.SpecDesc">
<summary>
规格说明
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.Type">
<summary>
类别
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.PaintOfflineTime">
<summary>
涂装下线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.OnlineTime">
<summary>
总装上线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.InteriorColor">
<summary>
内饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.ExteriorTrimmingColor">
<summary>
外饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.SerialNum">
<summary>
序列号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.HostSN">
<summary>
流水号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.ProductLine">
<summary>
生产线:A/B
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.Target">
<summary>
目的
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.Remark">
<summary>
备注
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisCreateDto.CreatePerson">
<summary>
创建人
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.Factory">
<summary>
工厂
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.VehicleLocation">
<summary>
车位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.WorkLocation">
<summary>
工位
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.Vin">
<summary>
底盘号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.VehicleBodyCode">
<summary>
车身号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.VehicleModelCode">
<summary>
车型代码
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.VehicleModelName">
<summary>
车型名称
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.VehicleModelDesc">
<summary>
车型描述
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.Spec">
<summary>
规格
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.SpecDesc">
<summary>
规格说明
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.Type">
<summary>
类别
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.PaintOfflineTime">
<summary>
涂装下线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.OnlineTime">
<summary>
总装上线时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.InteriorColor">
<summary>
内饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.ExteriorTrimmingColor">
<summary>
外饰颜色
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.SerialNum">
<summary>
序列号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.HostSN">
<summary>
流水号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.ProductLine">
<summary>
生产线:A/B
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.Target">
<summary>
目的
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.Remark">
<summary>
备注
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordHisDto.CreatePerson">
<summary>
创建人
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.Factory">
<summary>
工厂
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.Vin">
<summary>
底盘号
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.VehicleModelCode">
<summary>
车型代码
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.PaintOfflineTimeBegin">
<summary>
涂装下线时间起
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.PaintOfflineTimeEnd">
<summary>
涂装下线时间止
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.OnlineTimeBegin">
<summary>
总装上线时间起
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.OnlineTimeEnd">
<summary>
总装上线时间止
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.SerialNumBegin">
<summary>
序列号起
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.SerialNumEnd">
<summary>
序列号止
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.HostSNBegin">
<summary>
流水号起
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.HostSNEnd">
<summary>
流水号止
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.ProductLine">
<summary>
生产线:A/B
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.CreateTimeBegin">
<summary>
创建时间起
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto.CreateTimeEnd">
<summary>
创建时间止
</summary>
</member>
<!-- Badly formed XML comment ignored for member "M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.GetListAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto)" -->
<member name="M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.GetAsync(System.Guid)">
<summary>
按主键获取唯一实体
</summary>
<param name="id">主键</param>
<returns>实体信息</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.CreateAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto)">
<summary>
添加实体
</summary>
<param name="input">添加内容</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.UpdateAsync(System.Guid,WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto)">
<summary>
修改实体
</summary>
<param name="id">更新主键</param>
<param name="input">修改内容</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.DeleteAsync(System.String)">
<summary>
删除实体
</summary>
<param name="id">删除主键</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.ExportAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto)">
<summary>
导出信息
</summary>
<param name="input">导出查询条件</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.Interfaces.IImportRecordAppService.ImportAsync(Microsoft.AspNetCore.Http.IFormFileCollection)">
<summary>
导入信息
</summary>
<param name="input">导入文件流</param>
<returns>执行成功返回真</returns>
</member>
<member name="T:WY.NewJit.Extends.MenBanPackingListDto">
<summary>
门板装箱单打印主实体

476
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
{
/// <summary>
/// 零件管理应用服务实现
/// </summary>
[Microsoft.AspNetCore.Mvc.Route("api/newjit/import-record")]
[ApiExplorerSettings(GroupName = SwaggerGroupConsts.报文接收)]
public class ImportRecordAppService : ApplicationService, IImportRecordAppService
{
#region 成员
/// <summary>
/// 零件仓储
/// </summary>
private readonly IRepository<ImportRecord, Guid> _importRecordRepository;
/// <summary>
/// 日志
/// </summary>
private ILogger<ImportRecordAppService> _logger;
/// <summary>
/// Dapper仓储
/// </summary>
private readonly NewJitDapperRepository _newJitDapperRepository;
/// <summary>
/// BLOB存储
/// </summary>
private readonly IBlobContainer<OurFileContainer> _blobContainer;
/// <summary>
/// 字典领域服务
/// </summary>
private readonly DicDomainService _dicDomainService;
/// <summary>
/// 错误信息前缀
/// </summary>
private string _errorMessagePrefix
{
get
{
return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + ".";
}
}
#endregion
/// <summary>
/// 构造函数
/// </summary>
public ImportRecordAppService(
IRepository<ImportRecord, Guid> importRecordRepository,
ILogger<ImportRecordAppService> logger,
NewJitDapperRepository newJitDapperRepository,
IBlobContainer<OurFileContainer> 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;
}
/// <summary>
/// 取单表记录总数
/// </summary>
/// <param name="tableName"></param>
/// <param name="where"></param>
/// <returns></returns>
private async Task<int> GetEntityCountAsync(string tableName, string where)
{
string sql = $"select count(*) from {tableName} where 1=1 {where}";
var ret = await _newJitDapperRepository.GetSingleBySqlAsync<int>(sql);
return ret;
}
/// <summary>
/// 取单表当前页数据
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="tableName"></param>
/// <param name="where"></param>
/// <param name="orderFieldName"></param>
/// <param name="pageSize"></param>
/// <param name="pageIndex"></param>
/// <returns></returns>
private async Task<List<T>> GetEntityListAsync<T>(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<T>(sql);
return ret;
}
private async Task<List<T>> GetEntityListFromToAsync<T>(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<T>(sql);
return ret;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
private async Task<PagedResultDto<ImportRecordDto>> QueryByConditionAsync(ImportRecordInputDto input, PagedAndSortedBase page)
{
PagedResultDto<ImportRecordDto> ret = new PagedResultDto<ImportRecordDto>();
string where = GetWhere(input);
ret.TotalCount = await GetEntityCountAsync("FisImportRecord", where);
//计算分页
int skipNum = page.SkipCount;
int takeNum = page.MaxResultCount;
var lst = await GetEntityListFromToAsync<ImportRecordDto>("FisImportRecord", where, "HostSN", skipNum, takeNum);
ret.Items = lst;
return ret;
}
#endregion
#region 公有方法
/// <summary>
/// 根据筛选条件获取分页实体列表
/// </summary>
/// <param name="input">输入查询条件</param>
/// <returns>返回符合条件的排序分页列表</returns>
[HttpGet]
[UnitOfWork(false)]
[Route("list")]
public async Task<PagedResultDto<ImportRecordDto>> GetListAsync(ImportRecordInputDto input)
{
_logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入");
PagedResultDto<ImportRecordDto> ret = new PagedResultDto<ImportRecordDto>();
try
{
ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input);
return ret;
}
catch (Exception ex)
{
var msg = _errorMessagePrefix + "GetListAsync 执行出错:" + ex.Message;
_logger.LogError(msg);
return ret;
}
}
/// <summary>
/// 按主键获取唯一实体
/// </summary>
/// <param name="id">主键</param>
/// <returns>实体信息</returns>
[HttpGet]
[Route("{id}")]
public async Task<ObjectResultDto<ImportRecordDto>> GetAsync(Guid id)
{
_logger.LogDebug(_errorMessagePrefix + "GetAsync 进入");
ObjectResultDto<ImportRecordDto> ret = new ObjectResultDto<ImportRecordDto>();
try
{
ImportRecord sourceObj = await _importRecordRepository.GetAsync(id);
ImportRecordDto targetObj = ObjectMapper.Map<ImportRecord, ImportRecordDto>(sourceObj);
ret.Item = targetObj;
return ret;
}
catch (Exception ex)
{
ret.Status = false;
ret.Message = _errorMessagePrefix + "GetAsync 执行出错:" + ex.Message;
_logger.LogError(ret.Message);
return ret;
}
}
/// <summary>
/// 添加实体
/// </summary>
/// <param name="input">添加内容</param>
/// <returns>执行成功返回真</returns>
[HttpPost]
[UnitOfWork]
[Route("")]//create
public async Task<ObjectResultDto<Guid>> CreateAsync(ImportRecordCreateDto input)
{
_logger.LogDebug(_errorMessagePrefix + "CreateAsync 进入");
ObjectResultDto<Guid> ret = new ObjectResultDto<Guid>();
try
{
ImportRecord obj = ObjectMapper.Map<ImportRecordCreateDto, ImportRecord>(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;
}
}
/// <summary>
/// 修改实体
/// </summary>
/// <param name="id">更新主键</param>
/// <param name="input">修改内容</param>
/// <returns>执行成功返回真</returns>
[HttpPut]
[UnitOfWork]
[Route("{id}")]//update/
public async Task<ObjectResultDto> UpdateAsync(Guid id, ImportRecordCreateDto input)
{
_logger.LogDebug(_errorMessagePrefix + "UpdateAsync 进入");
ObjectResultDto ret = new ObjectResultDto();
try
{
ImportRecord targetObj = await _importRecordRepository.GetAsync(id);
ObjectMapper.Map<ImportRecordCreateDto, ImportRecord>(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;
}
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">删除主键</param>
/// <returns>执行成功返回真</returns>
[UnitOfWork]
[HttpDelete]
[Route("{id}")]//delete/
public async Task<ObjectResultDto> 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;
}
}
/// <summary>
/// 导出信息
/// </summary>
/// <param name="input">导出查询条件</param>
/// <returns>执行成功返回真</returns>
[UnitOfWork(false)]
[HttpPost]
[Route("export")]
public async Task<ObjectResultDto<string>> ExportAsync(ImportRecordInputDto input)
{
_logger.LogDebug(_errorMessagePrefix + "ExportAsync 进入");
ObjectResultDto<string> ret = new ObjectResultDto<string>();
try
{
PagedResultDto<ImportRecordDto> pageLst = await QueryByConditionAsync(input, (PagedAndSortedBase)input);
var items = pageLst.Items.AsEnumerable().ToList();
//将实体列表转换成excel文件流
IExporter exporter = new ExcelExporter();
byte[] byteArr = await exporter.ExportAsByteArray<ImportRecordDto>(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;
}
}
/// <summary>
/// 导入
/// </summary>
/// <param name="files">导入文件</param>
/// <returns>执行成功返回真</returns>
[HttpPost]
[Route("import")]
[DisableRequestSizeLimit]
public virtual async Task<ObjectResultDto> ImportAsync([FromForm] IFormFileCollection files)
{
_logger.LogDebug(_errorMessagePrefix + "ImportAsync 进入");
ObjectResultDto ret = new ObjectResultDto();
try
{
ImportResult<ImportRecordDto> 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<ImportRecordDto>(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<ImportRecordDto>, List<ImportRecord>>(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
}
}

9
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<WaitPrint, AlreadyPrint>().ReverseMap();
#endregion
#region 导出记录
CreateMap<ImportRecord, ImportRecordDto>().ReverseMap();
CreateMap<ImportRecord, ImportRecordCreateDto>().ReverseMap();
CreateMap<ImportRecordHis, ImportRecordHisDto>().ReverseMap();
CreateMap<ImportRecordHis, ImportRecordHisCreateDto>().ReverseMap();
#endregion
}
}
}

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

@ -9,6 +9,121 @@
BookAppService使用IObjectMapper将Book对象转换为BookDto对象, 将CreateUpdateBookDto对象转换为Book对象
</summary>
</member>
<member name="T:WY.NewJit.EdiReceive.ImportRecordAppService">
<summary>
零件管理应用服务实现
</summary>
</member>
<member name="F:WY.NewJit.EdiReceive.ImportRecordAppService._importRecordRepository">
<summary>
零件仓储
</summary>
</member>
<member name="F:WY.NewJit.EdiReceive.ImportRecordAppService._logger">
<summary>
日志
</summary>
</member>
<member name="F:WY.NewJit.EdiReceive.ImportRecordAppService._newJitDapperRepository">
<summary>
Dapper仓储
</summary>
</member>
<member name="F:WY.NewJit.EdiReceive.ImportRecordAppService._blobContainer">
<summary>
BLOB存储
</summary>
</member>
<member name="F:WY.NewJit.EdiReceive.ImportRecordAppService._dicDomainService">
<summary>
字典领域服务
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.ImportRecordAppService._errorMessagePrefix">
<summary>
错误信息前缀
</summary>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.EdiReceive.Entitys.ImportRecord,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.EdiReceive.ImportRecordAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},WY.NewJit.MsgBaseData.DicDomainService)">
<summary>
构造函数
</summary>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.GetEntityCountAsync(System.String,System.String)">
<summary>
取单表记录总数
</summary>
<param name="tableName"></param>
<param name="where"></param>
<returns></returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.GetEntityListAsync``1(System.String,System.String,System.String,System.Int32,System.Int32)">
<summary>
取单表当前页数据
</summary>
<typeparam name="T"></typeparam>
<param name="tableName"></param>
<param name="where"></param>
<param name="orderFieldName"></param>
<param name="pageSize"></param>
<param name="pageIndex"></param>
<returns></returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.QueryByConditionAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto,WY.NewJit.Common.PagedAndSortedBase)">
<summary>
根据筛选条件获取实体列表
</summary>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.GetListAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto)">
<summary>
根据筛选条件获取分页实体列表
</summary>
<param name="input">输入查询条件</param>
<returns>返回符合条件的排序分页列表</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.GetAsync(System.Guid)">
<summary>
按主键获取唯一实体
</summary>
<param name="id">主键</param>
<returns>实体信息</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.CreateAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto)">
<summary>
添加实体
</summary>
<param name="input">添加内容</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.UpdateAsync(System.Guid,WY.NewJit.EdiReceive.Dtos.ImportRecordCreateDto)">
<summary>
修改实体
</summary>
<param name="id">更新主键</param>
<param name="input">修改内容</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.DeleteAsync(System.String)">
<summary>
删除实体
</summary>
<param name="id">删除主键</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.ExportAsync(WY.NewJit.EdiReceive.Dtos.ImportRecordInputDto)">
<summary>
导出信息
</summary>
<param name="input">导出查询条件</param>
<returns>执行成功返回真</returns>
</member>
<member name="M:WY.NewJit.EdiReceive.ImportRecordAppService.ImportAsync(Microsoft.AspNetCore.Http.IFormFileCollection)">
<summary>
导入
</summary>
<param name="files">导入文件</param>
<returns>执行成功返回真</returns>
</member>
<member name="T:WY.NewJit.Extends.ProductLineAuthorityAppService">
<summary>
生产线权限管理应用服务实现

3
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.DbMigrator/appsettings.json

@ -1,6 +1,7 @@
{
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=NewJitPG_TEST_20230703;uid=sa;pwd=Microsoft2008"
"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"*/
},

10
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)
//{

1
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 = "报文接收";
}
}

139
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
{
/// <summary>
/// 导入记录
/// </summary>
public class ImportRecord : Entity<Guid>
{
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { get; set; }
/// <summary>
/// 车位
/// </summary>
public virtual string VehicleLocation { get; set; }
/// <summary>
/// 工位
/// </summary>
public virtual string WorkLocation { get; set; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string Vin { get; set; }
/// <summary>
/// 车身号
/// </summary>
public virtual string VehicleBodyCode { get; set; }
/// <summary>
/// 车型代码
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 车型描述
/// </summary>
public virtual string VehicleModelDesc { get; set; }
/// <summary>
/// 规格
/// </summary>
public virtual string Spec { get; set; }
/// <summary>
/// 规格说明
/// </summary>
public virtual string SpecDesc { get; set; }
/// <summary>
/// 类别
/// </summary>
public virtual string Type { get; set; }
/// <summary>
/// 涂装下线时间
/// </summary>
public virtual DateTime? PaintOfflineTime { get; set; }
/// <summary>
/// 总装上线时间
/// </summary>
public virtual DateTime? OnlineTime { get; set; }
/// <summary>
/// 内饰颜色
/// </summary>
public virtual string InteriorColor { get; set; }
/// <summary>
/// 外饰颜色
/// </summary>
public virtual string ExteriorTrimmingColor { get; set; }
/// <summary>
/// 序列号
/// </summary>
public virtual string SerialNum { get; set; }
/// <summary>
/// 流水号
/// </summary>
public virtual int HostSN { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 目的
/// </summary>
public virtual string Target { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
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; }
}
}

139
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
{
/// <summary>
/// 导入记录
/// </summary>
public class ImportRecordHis : Entity<Guid>
{
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { get; set; }
/// <summary>
/// 车位
/// </summary>
public virtual string VehicleLocation { get; set; }
/// <summary>
/// 工位
/// </summary>
public virtual string WorkLocation { get; set; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string Vin { get; set; }
/// <summary>
/// 车身号
/// </summary>
public virtual string VehicleBodyCode { get; set; }
/// <summary>
/// 车型代码
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 车型描述
/// </summary>
public virtual string VehicleModelDesc { get; set; }
/// <summary>
/// 规格
/// </summary>
public virtual string Spec { get; set; }
/// <summary>
/// 规格说明
/// </summary>
public virtual string SpecDesc { get; set; }
/// <summary>
/// 类别
/// </summary>
public virtual string Type { get; set; }
/// <summary>
/// 涂装下线时间
/// </summary>
public virtual DateTime? PaintOfflineTime { get; set; }
/// <summary>
/// 总装上线时间
/// </summary>
public virtual DateTime? OnlineTime { get; set; }
/// <summary>
/// 内饰颜色
/// </summary>
public virtual string InteriorColor { get; set; }
/// <summary>
/// 外饰颜色
/// </summary>
public virtual string ExteriorTrimmingColor { get; set; }
/// <summary>
/// 序列号
/// </summary>
public virtual string SerialNum { get; set; }
/// <summary>
/// 流水号
/// </summary>
public virtual int HostSN { get; set; }
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 目的
/// </summary>
public virtual string Target { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
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; }
}
}

17
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<Guid>
{
public string ProductLineCode { get; set; }
public int HostSN { get; set; }
}
}

1
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/WY.NewJit.Domain.csproj

@ -30,6 +30,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="EdiReceive\Services\" />
<Folder Include="MsgConversion\Services\" />
<Folder Include="MsgTransmission\Services\" />
</ItemGroup>

5757
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701062532_Created_NewJit_Entity2022-07-01.Designer.cs

File diff suppressed because it is too large

338
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701062532_Created_NewJit_Entity2022-07-01.cs

@ -1,338 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace WY.NewJit.Migrations
{
public partial class Created_NewJit_Entity20220701 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
//migrationBuilder.AddColumn<DateTime>(
// name: "MinOnlineTime",
// table: "FisZhuHuBanPackingList",
// type: "datetime2",
// nullable: true);
//migrationBuilder.AddColumn<int>(
// name: "ErrorCount",
// table: "FisMessageReceive",
// type: "int",
// nullable: true);
//migrationBuilder.AddColumn<string>(
// name: "ErrorMessage",
// table: "FisMessageReceive",
// type: "nvarchar(max)",
// nullable: true);
//migrationBuilder.AddColumn<DateTime>(
// name: "LastUpdateTime",
// table: "FisMessageReceive",
// type: "datetime2",
// nullable: true);
//migrationBuilder.AddColumn<DateTime>(
// name: "MinOnlineTime",
// table: "FisMenBanPackingList",
// type: "datetime2",
// nullable: true);
//migrationBuilder.AddColumn<bool>(
// name: "IsPartSwitch",
// table: "FisBillR100",
// type: "bit",
// nullable: true);
//migrationBuilder.AddColumn<int>(
// name: "HostSN2",
// table: "FisBillM100",
// type: "int",
// nullable: true);
//migrationBuilder.AddColumn<bool>(
// name: "IsPartSwitch",
// table: "FisBillM100",
// type: "bit",
// nullable: true);
//migrationBuilder.AddColumn<int>(
// name: "NeedReplenishPrint",
// table: "FisBillM100",
// type: "int",
// nullable: true);
//migrationBuilder.AddColumn<DateTime>(
// name: "PrintTime2",
// table: "FisBillM100",
// type: "datetime2",
// nullable: true);
//migrationBuilder.AlterColumn<string>(
// name: "GroupCode",
// table: "FisAssemblyCfgErp",
// type: "varchar(100)",
// maxLength: 100,
// nullable: true,
// oldClrType: typeof(string),
// oldType: "varchar(50)",
// oldMaxLength: 50,
// oldNullable: true);
//migrationBuilder.AddColumn<Guid>(
// name: "GroupId",
// table: "FisAssemblyCfgErp",
// type: "uniqueidentifier",
// nullable: false,
// defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
//migrationBuilder.CreateTable(
// name: "FisAssemblyCfgGroup",
// columns: table => new
// {
// Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
// GroupCode = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true),
// VehicleModel = table.Column<string>(type: "nvarchar(max)", nullable: true),
// IsDisable = table.Column<bool>(type: "bit", nullable: false),
// ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
// ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
// CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
// CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
// LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
// LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
// IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
// DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
// DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_FisAssemblyCfgGroup", x => x.Id);
// });
migrationBuilder.CreateTable(
name: "FisCUR_TB_BILL",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UID = table.Column<int>(type: "int", nullable: false),
BillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
State = table.Column<int>(type: "int", nullable: false),
SourceBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SourceBillNum2 = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SourceBillNum3 = table.Column<string>(type: "nvarchar(max)", nullable: true),
BillTime = table.Column<DateTime>(type: "datetime2", nullable: false),
StartTime = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
FinishTime = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
OperName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
DetailQty = table.Column<int>(type: "int", nullable: false),
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CustId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ProjectId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
TransportType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
TruckNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
GateCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
GateName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DockCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
AccountDate = table.Column<DateTime>(type: "datetime2", nullable: true),
GUID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FisCUR_TB_BILL", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FisCUR_TS_SORT_DETAIL",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UID = table.Column<long>(type: "bigint", nullable: false),
BillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
LineNum = table.Column<int>(type: "int", nullable: false),
VinCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SeqNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
PartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BarCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CustPartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ProjectId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
FyonNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Dock = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DispatchDate = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
State = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Remark = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
PlanQty = table.Column<decimal>(type: "money", nullable: false),
Qty = table.Column<decimal>(type: "money", nullable: false),
CustBarCode = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ReceiptQty = table.Column<decimal>(type: "money", nullable: false),
FullBarCode = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_FisCUR_TS_SORT_DETAIL", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FisHIS_TB_BILL",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UID = table.Column<int>(type: "int", nullable: false),
BillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
State = table.Column<int>(type: "int", nullable: false),
SourceBillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SourceBillNum2 = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SourceBillNum3 = table.Column<string>(type: "nvarchar(max)", nullable: true),
BillTime = table.Column<DateTime>(type: "datetime2", nullable: false),
StartTime = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
FinishTime = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
OperName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
DetailQty = table.Column<int>(type: "int", nullable: false),
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CustId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ProjectId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
TransportType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
TruckNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
GateCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
GateName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DockCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
AccountDate = table.Column<DateTime>(type: "datetime2", nullable: true),
GUID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FisHIS_TB_BILL", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FisHIS_TS_SORT_DETAIL",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UID = table.Column<long>(type: "bigint", nullable: false),
BillNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
LineNum = table.Column<int>(type: "int", nullable: false),
VinCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SeqNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
PartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BarCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CustPartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ProjectId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
FyonNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
VendId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Dock = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DispatchDate = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
State = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Remark = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
PlanQty = table.Column<decimal>(type: "money", nullable: false),
Qty = table.Column<decimal>(type: "money", nullable: false),
CustBarCode = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ReceiptQty = table.Column<decimal>(type: "money", nullable: false),
FullBarCode = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_FisHIS_TS_SORT_DETAIL", x => x.Id);
});
//migrationBuilder.CreateTable(
// name: "FisMessageReceiveArchive",
// columns: table => new
// {
// Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
// MessageFileName = table.Column<string>(type: "nvarchar(max)", nullable: true),
// MessageContent = table.Column<string>(type: "nvarchar(max)", nullable: true),
// ReceiveStatus = table.Column<int>(type: "int", nullable: false),
// ReceiveTime = table.Column<DateTime>(type: "datetime2", nullable: false),
// LastUpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
// MessageReceiveId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
// BillType = table.Column<string>(type: "nvarchar(max)", nullable: true),
// BillOnlineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
// BillHostSN = table.Column<int>(type: "int", nullable: true),
// ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
// ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
// },
// constraints: table =>
// {
// table.PrimaryKey("PK_FisMessageReceiveArchive", x => x.Id);
// });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
//migrationBuilder.DropTable(
// name: "FisAssemblyCfgGroup");
migrationBuilder.DropTable(
name: "FisCUR_TB_BILL");
migrationBuilder.DropTable(
name: "FisCUR_TS_SORT_DETAIL");
migrationBuilder.DropTable(
name: "FisHIS_TB_BILL");
migrationBuilder.DropTable(
name: "FisHIS_TS_SORT_DETAIL");
//migrationBuilder.DropTable(
// name: "FisMessageReceiveArchive");
//migrationBuilder.DropColumn(
// name: "MinOnlineTime",
// table: "FisZhuHuBanPackingList");
//migrationBuilder.DropColumn(
// name: "ErrorCount",
// table: "FisMessageReceive");
//migrationBuilder.DropColumn(
// name: "ErrorMessage",
// table: "FisMessageReceive");
//migrationBuilder.DropColumn(
// name: "LastUpdateTime",
// table: "FisMessageReceive");
//migrationBuilder.DropColumn(
// name: "MinOnlineTime",
// table: "FisMenBanPackingList");
//migrationBuilder.DropColumn(
// name: "IsPartSwitch",
// table: "FisBillR100");
//migrationBuilder.DropColumn(
// name: "HostSN2",
// table: "FisBillM100");
//migrationBuilder.DropColumn(
// name: "IsPartSwitch",
// table: "FisBillM100");
//migrationBuilder.DropColumn(
// name: "NeedReplenishPrint",
// table: "FisBillM100");
//migrationBuilder.DropColumn(
// name: "PrintTime2",
// table: "FisBillM100");
//migrationBuilder.DropColumn(
// name: "GroupId",
// table: "FisAssemblyCfgErp");
//migrationBuilder.AlterColumn<string>(
// name: "GroupCode",
// table: "FisAssemblyCfgErp",
// type: "varchar(50)",
// maxLength: 50,
// nullable: true,
// oldClrType: typeof(string),
// oldType: "varchar(100)",
// oldMaxLength: 100,
// oldNullable: true);
}
}
}

233
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701064724_Created_NewJit_Entity2022-07-01_2.cs

@ -1,233 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace WY.NewJit.Migrations
{
public partial class Created_NewJit_Entity20220701_2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "VinCode",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "PartCode",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "FullBarCode",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(200)",
maxLength: 200,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisHIS_TB_BILL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "VinCode",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "PartCode",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "FullBarCode",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(200)",
maxLength: 200,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisCUR_TB_BILL",
type: "nvarchar(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "VinCode",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "PartCode",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "FullBarCode",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(200)",
maxLength: 200,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisHIS_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisHIS_TB_BILL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "VinCode",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "PartCode",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "FullBarCode",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(200)",
maxLength: 200,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(200)",
oldMaxLength: 200);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisCUR_TS_SORT_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BillNum",
table: "FisCUR_TB_BILL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50);
}
}
}

1170
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20220701064724_Created_NewJit_Entity2022-07-01_2.Designer.cs → src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.Designer.cs

File diff suppressed because it is too large

3238
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/20240109072607_Add_ImportRec_Table.cs

File diff suppressed because it is too large

1166
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore.DbMigrations/Migrations/NewJitMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

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

@ -18,8 +18,4 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>

10
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
{
@ -152,6 +153,15 @@ namespace WY.NewJit.EntityFrameworkCore
public DbSet<AlreadyPrint> already_print { get; set; }
#endregion
#region 派格红旗报文接收
public DbSet<ImportRecord> ImportRecords { get; set; }
public DbSet<ImportRecordHis> ImportRecordHis { get; set; }
public DbSet<LastImportHostSN> LastImportHostSN { get; set; }
#endregion
/* Add DbSet properties for your Aggregate Roots / Entities here.
* Also map them inside NewJitDbContextModelCreatingExtensions.ConfigureNewJit
*/

83
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;
@ -600,6 +601,88 @@ namespace WY.NewJit.EntityFrameworkCore
b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它
});
#endregion
#region 派格红旗报文接收
builder.Entity<ImportRecord>(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<ImportRecordHis>(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<LastImportHostSN>(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
}
}
}

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json

@ -20,7 +20,7 @@
"Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_HQ;uid=sa;pwd=ChangkeTec@2021;",
"ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
"WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;"
//"Default": "Server=192.168.0.228;Database=NewJitPG_HQ;uid=sa;pwd=ChangkeTec@2021;",
//"Default": "Server=192.168.0.228;Database=NewJitPG_HQ_Temp;uid=sa;pwd=ChangkeTec@2021;",
//"ABP": "Server=192.168.0.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
//"WMS": "Server=192.168.0.228;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;"

Loading…
Cancel
Save