Browse Source

提交导入变更

master
赵新宇 3 weeks ago
parent
commit
9c49da2a5a
  1. 188
      API/TaskManager.Contracts/Dtos/Dtos.cs
  2. 4
      API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs
  3. 2
      API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS.cs
  4. 6
      API/TaskManager.Entity/Data/SUPPLIER_EMPLOYEE_DT.cs
  5. 2
      API/TaskManager.Entity/Data/SUPPLIER_INFO_DT.cs
  6. 5
      API/TaskManager.Entity/Data/SUPPLIER_PRO_PROCESS_EQUIPMENT_DT.cs
  7. 6
      API/TaskManager.Entity/Entitys/01_09/SUPPLIER_EMPLOYEE.cs
  8. 6
      API/TaskManager.Entity/Entitys/01_09/SUPPLIER_EMPLOYEE_LOGS.cs
  9. 2
      API/TaskManager.Entity/Entitys/01_09/SUPPLIER_INFO.cs
  10. 2
      API/TaskManager.Entity/Entitys/01_09/SUPPLIER_INFO_LOGS.cs
  11. 80
      API/TaskManager.EntityFramework/JobDbContext.cs
  12. 10317
      API/TaskManager.EntityFramework/Migrations/20250626085605_z20250620001.Designer.cs
  13. 279
      API/TaskManager.EntityFramework/Migrations/20250626085605_z20250620001.cs
  14. 10317
      API/TaskManager.EntityFramework/Migrations/20250627012246_z202506270001.Designer.cs
  15. 22
      API/TaskManager.EntityFramework/Migrations/20250627012246_z202506270001.cs
  16. 10311
      API/TaskManager.EntityFramework/Migrations/20250627014145_z202506270002.Designer.cs
  17. 267
      API/TaskManager.EntityFramework/Migrations/20250627014145_z202506270002.cs
  18. 10311
      API/TaskManager.EntityFramework/Migrations/20250627014433_z202506270003.Designer.cs
  19. 35
      API/TaskManager.EntityFramework/Migrations/20250627014433_z202506270003.cs
  20. 113
      API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs
  21. 26
      API/Wood.Service/Commons/ValidationHelper.cs
  22. 136
      API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs
  23. 1096
      API/Wood.Service/Controllers/CheryRecurringJobInputPageExtendController.cs
  24. 2
      API/Wood.Service/Controllers/CherySupplierSinvDataService.cs
  25. 1
      API/Wood.Service/Controllers/CustomLogService.cs
  26. 7
      API/Wood.Service/Controllers/RecurringJobBaseController.cs
  27. 4
      API/Wood.Service/Controllers/TaskConifgureController.cs
  28. 9
      API/Wood.Service/Datas/SupplierEmployeeDtService.cs
  29. 15
      API/Wood.Service/Datas/SupplierInfoDtService.cs
  30. 16
      API/Wood.Service/Datas/SupplierProProcessEquipmentDtService.cs

188
API/TaskManager.Contracts/Dtos/Dtos.cs

@ -1491,102 +1491,108 @@ public class SUPPLIER_MRP_WARNING_DETAIL_DTO : CherryReadBaseEntityDto
#region 输入
public class SUPPLIER_SINV_DATA_DETAIL_DTO:CherryReadBaseEntityDto
public class SUPPLIER_SINV_DATA_DTO
{
/// <summary>
/// 供应商共享库存
/// 供应商代码
/// </summary>
public class SUPPLIER_SINV_DATA_DTO
{
/// <summary>
/// 供应商代码
/// </summary>
[ExporterHeader(DisplayName = "供应商代码")]
[ImporterHeader(Name = "供应商代码")]
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
[ExporterHeader(DisplayName = "供应商名称")]
[ImporterHeader(Name = "供应商名称")]
public string SupplierName { get; set; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
[ImporterHeader(Name = "零件号")]
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[ExporterHeader(DisplayName = "零件名称")]
[ImporterHeader(Name = "零件名称")]
public string MaterialDescription { get; set; }
/// <summary>
/// 物料类型(成品,半成品,原材料)
/// </summary>
[ExporterHeader(DisplayName = "物料类型")]
[ImporterHeader(Name = "物料类型")]
public string MaterialType { get; set; }
/// <summary>
/// 当前库存数量
/// </summary>
[ExporterHeader(DisplayName = "当前库存数量")]
[ImporterHeader(Name = "当前库存数量")]
public decimal QuantityCurrent { get; set; }
/// <summary>
/// 原材料在途数量
/// </summary>
[ExporterHeader(DisplayName = "原材料在途数量")]
[ImporterHeader(Name = "原材料在途数量")]
public decimal QuantityPlan { get; set; }
/// <summary>
/// 库存状态(生产件,呆滞件,备件,KD件)
/// </summary>
[ExporterHeader(DisplayName = "库存状态")]
[ImporterHeader(Name = "库存状态")]
public string InventoryStatus { get; set; }
/// <summary>
/// 安全库存
/// </summary>
[ExporterHeader(DisplayName = "安全库存")]
[ImporterHeader(Name = "安全库存")]
public decimal SafetyStock { get; set; }
/// <summary>
/// 生产/采购周期:成品即半成品为生产周期(天),原材料为采购周期(天)
/// </summary>
[ExporterHeader(DisplayName = "生产/采购周期")]
[ImporterHeader(Name = "生产/采购周期")]
public string ProductionCycle { get; set; }
/// <summary>
/// 库存更新时间-格式:yyyy-MM-ddHH:mm:ss
/// </summary>
[ExporterHeader(DisplayName = "库存更新时间")]
[ImporterHeader(Name = "库存更新时间")]
public string DataUpdateTime { get; set; }
/// <summary>
/// 批次
/// </summary>
[ExporterHeader(DisplayName = "批次")]
[ImporterHeader(Name = "批次")]
public string? SupplierBatch { get; set; }
/// <summary>
/// 有效期截止日期 非必填
/// </summary>
[ExporterHeader(DisplayName = "有效期截止日期")]
[ImporterHeader(Name = "有效期截止日期")]
public string? SupplieryxqDate { get; set; }
}
[ExporterHeader(DisplayName = "供应商代码")]
[ImporterHeader(Name = "供应商代码")]
public string SupplierCode { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
[ExporterHeader(DisplayName = "供应商名称")]
[ImporterHeader(Name = "供应商名称")]
public string SupplierName { get; set; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
[ImporterHeader(Name = "零件号")]
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[ExporterHeader(DisplayName = "零件名称")]
[ImporterHeader(Name = "零件名称")]
public string MaterialDescription { get; set; }
/// <summary>
/// 物料类型(成品,半成品,原材料)
/// </summary>
[ExporterHeader(DisplayName = "物料类型")]
[ImporterHeader(Name = "物料类型")]
public string MaterialType { get; set; }
/// <summary>
/// 当前库存数量
/// </summary>
[ExporterHeader(DisplayName = "当前库存数量")]
[ImporterHeader(Name = "当前库存数量")]
public decimal QuantityCurrent { get; set; }
/// <summary>
/// 原材料在途数量
/// </summary>
[ExporterHeader(DisplayName = "原材料在途数量")]
[ImporterHeader(Name = "原材料在途数量")]
public decimal QuantityPlan { get; set; }
/// <summary>
/// 库存状态(生产件,呆滞件,备件,KD件)
/// </summary>
[ExporterHeader(DisplayName = "库存状态")]
[ImporterHeader(Name = "库存状态")]
public string InventoryStatus { get; set; }
/// <summary>
/// 安全库存
/// </summary>
[ExporterHeader(DisplayName = "安全库存")]
[ImporterHeader(Name = "安全库存")]
public decimal SafetyStock { get; set; }
/// <summary>
/// 生产/采购周期:成品即半成品为生产周期(天),原材料为采购周期(天)
/// </summary>
[ExporterHeader(DisplayName = "生产/采购周期")]
[ImporterHeader(Name = "生产/采购周期")]
public string ProductionCycle { get; set; }
/// <summary>
/// 库存更新时间-格式:yyyy-MM-ddHH:mm:ss
/// </summary>
[ExporterHeader(DisplayName = "库存更新时间")]
[ImporterHeader(Name = "库存更新时间")]
public string DataUpdateTime { get; set; }
/// <summary>
/// 批次
/// </summary>
[ExporterHeader(DisplayName = "批次")]
[ImporterHeader(Name = "批次")]
public string? SupplierBatch { get; set; }
/// <summary>
/// 有效期截止日期 非必填
/// </summary>
[ExporterHeader(DisplayName = "有效期截止日期")]
[ImporterHeader(Name = "有效期截止日期")]
public string? SupplieryxqDate { get; set; }
}
public class SUPPLIER_SINV_DATA_DTO
{
public string BatchNo { get; set; }
public int Total { get; set; }
public int PageSize { get; set; }
public int PageNum { get; set; }
public List<SUPPLIER_SINV_DATA_DETAIL_DTO> List { get; set; }
}
//public class SUPPLIER_SINV_DATA_DETAIL_DTO:CherryReadBaseEntityDto
//{
// /// <summary>
// /// 供应商共享库存
// /// </summary>
//}
//public class SUPPLIER_SINV_DATA_DTO
//{
// public string BatchNo { get; set; }
// public int Total { get; set; }
// public int PageSize { get; set; }
// public int PageNum { get; set; }
// public List<SUPPLIER_SINV_DATA_DETAIL_DTO> List { get; set; }
//}
#endregion
#region 输出
public class SUPPLIER_SINV_DATA_DETAIL_OUT_DTO

4
API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs

@ -84,7 +84,7 @@ namespace TaskManager.Entity.Entitys
/// </summary>
[ExporterHeader(DisplayName = "工艺装备制造日期")]
[ImporterHeader(Name = "工艺装备制造日期")]
public string ProductionDate { get; set; }
public DateTime? ProductionDate { get; set; }
/// <summary>
/// 主要材质
/// </summary>
@ -156,7 +156,7 @@ namespace TaskManager.Entity.Entitys
/// </summary>
[ExporterHeader(DisplayName = "最近校准日期")]
[ImporterHeader(Name = "最近校准日期")]
public string CalibrationDate { get; set; }
public DateTime? CalibrationDate { get; set; }
/// <summary>
/// 校准到期天数
/// </summary>

2
API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS.cs

@ -84,7 +84,7 @@ namespace TaskManager.Entity.Entitys
/// </summary>
[ExporterHeader(DisplayName = "工艺装备制造日期")]
[ImporterHeader(Name = "工艺装备制造日期")]
public string ProductionDate { get; set; }
public DateTime? ProductionDate { get; set; }
/// <summary>
/// 主要材质
/// </summary>

6
API/TaskManager.Entity/Data/SUPPLIER_EMPLOYEE_DT.cs

@ -97,7 +97,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "供应商修改时间")]
[ImporterHeader(Name = "供应商修改时间", Format ="yyyy-MM-dd HH:mm:ss")]
public string DataUpdateTime { get; set; }
public DateTime? DataUpdateTime { get; set; }
/// <summary>
/// 岗位代码
/// </summary>
@ -123,12 +123,12 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "资质获取时间")]
[ImporterHeader(Name = "资质获取时间", Format = "yyyy-MM-dd HH:mm:ss")]
public string CheckInTime { get; set; }
public DateTime? CheckInTime { get; set; }
/// <summary>
/// 资质失去时间
/// </summary>
[ExporterHeader(DisplayName = "资质失去时间")]
[ImporterHeader(Name = "资质失去时间", Format = "yyyy-MM-dd HH:mm:ss")]
public string CheckOutTime { get; set; }
public DateTime? CheckOutTime { get; set; }
}
}

2
API/TaskManager.Entity/Data/SUPPLIER_INFO_DT.cs

@ -85,7 +85,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "供应商修改时间")]
[ImporterHeader(Name = "供应商修改时间", Format = "yyyy-MM-dd HH:mm:ss")]
public string DataUpdateTime { get; set; }
public DateTime? DataUpdateTime { get; set; }
/// <summary>
/// 产线顺序
/// </summary>

5
API/TaskManager.Entity/Data/SUPPLIER_PRO_PROCESS_EQUIPMENT_DT.cs

@ -84,7 +84,7 @@ namespace TaskManager.Entity.Entitys
/// </summary>
[ExporterHeader(DisplayName = "工艺装备制造日期")]
[ImporterHeader(Name = "工艺装备制造日期", Format = "yyyy-MM-dd HH:mm:ss")]
public string ProductionDate { get; set; }
public DateTime? ProductionDate { get; set; }
/// <summary>
/// 主要材质
/// </summary>
@ -156,7 +156,8 @@ namespace TaskManager.Entity.Entitys
/// </summary>
[ExporterHeader(DisplayName = "最近校准日期")]
[ImporterHeader(Name = "最近校准日期", Format = "yyyy-MM-dd HH:mm:ss")]
public string CalibrationDate { get; set; }
public DateTime? CalibrationDate { get; set; }
/// <summary>
/// 校准到期天数
/// </summary>

6
API/TaskManager.Entity/Entitys/01_09/SUPPLIER_EMPLOYEE.cs

@ -95,7 +95,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "供应商修改时间")]
[ImporterHeader(Name = "供应商修改时间")]
public string DataUpdateTime { get; set; }
public DateTime? DataUpdateTime { get; set; }
/// <summary>
/// 岗位代码
/// </summary>
@ -119,12 +119,12 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "资质获取时间")]
[ImporterHeader(Name = "资质获取时间")]
public string CheckInTime { get; set; }
public DateTime? CheckInTime { get; set; }
/// <summary>
/// 资质失去时间
/// </summary>
[ExporterHeader(DisplayName = "资质失去时间")]
[ImporterHeader(Name = "资质失去时间")]
public string CheckOutTime { get; set; }
public DateTime? CheckOutTime { get; set; }
}
}

6
API/TaskManager.Entity/Entitys/01_09/SUPPLIER_EMPLOYEE_LOGS.cs

@ -95,7 +95,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "供应商修改时间")]
[ImporterHeader(Name = "供应商修改时间")]
public string DataUpdateTime { get; set; }
public DateTime? DataUpdateTime { get; set; }
/// <summary>
/// 岗位代码
/// </summary>
@ -119,12 +119,12 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "资质获取时间")]
[ImporterHeader(Name = "资质获取时间")]
public string CheckInTime { get; set; }
public DateTime? CheckInTime { get; set; }
/// <summary>
/// 资质失去时间
/// </summary>
[ExporterHeader(DisplayName = "资质失去时间")]
[ImporterHeader(Name = "资质失去时间")]
public string CheckOutTime { get; set; }
public DateTime? CheckOutTime { get; set; }
}
}

2
API/TaskManager.Entity/Entitys/01_09/SUPPLIER_INFO.cs

@ -83,7 +83,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "供应商修改时间")]
[ImporterHeader(Name = "供应商修改时间")]
public string DataUpdateTime { get; set; }
public DateTime? DataUpdateTime { get; set; }
/// <summary>
/// 产线顺序
/// </summary>

2
API/TaskManager.Entity/Entitys/01_09/SUPPLIER_INFO_LOGS.cs

@ -83,7 +83,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "供应商修改时间")]
[ImporterHeader(Name = "供应商修改时间")]
public string DataUpdateTime { get; set; }
public DateTime DataUpdateTime { get; set; }
/// <summary>
/// 产线顺序
/// </summary>

80
API/TaskManager.EntityFramework/JobDbContext.cs

@ -66,18 +66,18 @@ namespace TaskManager.EntityFramework
// // 配置SQL Server连接
// optionsBuilder.UseSqlServer("Server=192.168.1.228;Database=TaskManager;User ID=sa;Password=ChangkeTec@2021;TrustServerCertificate=True");
//}
//#if DEBUG
// optionsBuilder.UseSqlServer("Server = 192.168.1.228; Database = TaskManager2; User ID = sa; Password = ChangkeTec@2021; TrustServerCertificate = True");
//#else
// optionsBuilder.UseSqlServer(GlobalContext.SystemConfig.CustomerDb);
//#if DEBUG
// optionsBuilder.UseSqlServer("Server = 192.168.1.228; Database = TaskManager2; User ID = sa; Password = ChangkeTec@2021; TrustServerCertificate = True");
//#else
// optionsBuilder.UseSqlServer(GlobalContext.SystemConfig.CustomerDb);
//#endif
//#endif
optionsBuilder.UseSqlServer(GlobalContext.SystemConfig.CustomerDb);
//optionsBuilder.UseSqlServer(GlobalContext.SystemConfig.CustomerDb);
optionsBuilder.UseSqlServer("Server = 192.168.1.228; Database = TaskManager2; User ID = sa; Password = ChangkeTec@2021; TrustServerCertificate = True");
}
@ -602,7 +602,7 @@ namespace TaskManager.EntityFramework
//是否关键工位(Y/N)
b.Property(e => e.KeyStation).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//产线顺序
b.Property(e => e.ProductionLineOrder).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//工位顺序
@ -655,7 +655,7 @@ namespace TaskManager.EntityFramework
//是否有资质(Y,N)
b.Property(e => e.HaveQuantity).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//岗位代码
b.Property(e => e.PositionId).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//岗位名称
@ -663,9 +663,9 @@ namespace TaskManager.EntityFramework
//资质等级(Level_4,Level_3,Level_2,Level_1)
b.Property(e => e.QualificationLevel).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//资质获取时间
b.Property(e => e.CheckInTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CheckInTime).IsRequired();
//资质失去时间
b.Property(e => e.CheckOutTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
@ -1316,7 +1316,7 @@ namespace TaskManager.EntityFramework
//芯片MPN标识名称
b.Property(e => e.MpnName).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired(false);
//物料有效期(天)
b.Property(e => e.ValidDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
b.Property(e => e.ValidDays).HasColumnType("VARCHAR").HasMaxLength(12).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
@ -1402,23 +1402,23 @@ namespace TaskManager.EntityFramework
//工艺装备序列号
b.Property(e => e.SerialNumber).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备制造日期,格式(yyyy-MM-dd)
b.Property(e => e.ProductionDate).HasColumnType("CHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.ProductionDate).IsRequired();
//主要材质
b.Property(e => e.Material).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//当前存放地点
b.Property(e => e.CurrentLocation).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备状态
b.Property(e => e.DeviceStatus).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.DeviceStatus).HasColumnType("VARCHAR").HasMaxLength(30).IsRequired();
//穴腔数量
b.Property(e => e.CavityCount).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//模具尺寸规格
b.Property(e => e.MoldSize).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//设计寿命单位
b.Property(e => e.DesignLifeUnits).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.DesignLifeUnits).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//设计寿命
b.Property(e => e.DesignLifeValue).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.DesignLifeValue).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//当前剩余寿命,
b.Property(e => e.CurrentUsageCount).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.CurrentUsageCount).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//模具大修次数
b.Property(e => e.OverhaulCount).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//图纸编号描述
@ -1426,9 +1426,9 @@ namespace TaskManager.EntityFramework
//检测精度
b.Property(e => e.DetectionAccuracy).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//最近校准日期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.CalibrationDate).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CalibrationDate).IsRequired();
//校准到期天数
b.Property(e => e.CalibrationDueDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
b.Property(e => e.CalibrationDueDays).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//允许误差范围
b.Property(e => e.ToleranceRange).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//磨损阈值
@ -1702,7 +1702,7 @@ namespace TaskManager.EntityFramework
//生产/采购周期:成品即半成品为生产周期(天),原材料为采购周期(天)
b.Property(e => e.ProductionCycle).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired();
//库存更新时间-格式:yyyy-MM-ddHH:mm:ss
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).HasColumnType("VarChar").HasMaxLength(30).IsRequired();
//批次
b.Property(e => e.SupplierBatch).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(false);
//有效期截止日期 非必填
@ -1745,7 +1745,7 @@ namespace TaskManager.EntityFramework
//是否关键工位(Y/N)
b.Property(e => e.KeyStation).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//产线顺序
b.Property(e => e.ProductionLineOrder).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//工位顺序
@ -1797,7 +1797,7 @@ namespace TaskManager.EntityFramework
//是否有资质(Y,N)
b.Property(e => e.HaveQuantity).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//岗位代码
b.Property(e => e.PositionId).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//岗位名称
@ -1805,9 +1805,9 @@ namespace TaskManager.EntityFramework
//资质等级(Level_4,Level_3,Level_2,Level_1)
b.Property(e => e.QualificationLevel).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//资质获取时间
b.Property(e => e.CheckInTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CheckInTime).IsRequired();
//资质失去时间
b.Property(e => e.CheckOutTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CheckOutTime).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
@ -1891,7 +1891,7 @@ namespace TaskManager.EntityFramework
//工艺装备序列号
b.Property(e => e.SerialNumber).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备制造日期,格式(yyyy-MM-dd)
b.Property(e => e.ProductionDate).HasColumnType("CHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.ProductionDate).IsRequired();
//主要材质
b.Property(e => e.Material).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//当前存放地点
@ -1915,7 +1915,7 @@ namespace TaskManager.EntityFramework
//检测精度
b.Property(e => e.DetectionAccuracy).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//最近校准日期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.CalibrationDate).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CalibrationDate).IsRequired();
//校准到期天数
b.Property(e => e.CalibrationDueDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
//允许误差范围
@ -2090,7 +2090,7 @@ namespace TaskManager.EntityFramework
//是否关键工位(Y/N)
b.Property(e => e.KeyStation).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//产线顺序
b.Property(e => e.ProductionLineOrder).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//工位顺序
@ -2143,7 +2143,7 @@ namespace TaskManager.EntityFramework
//是否有资质(Y,N)
b.Property(e => e.HaveQuantity).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//岗位代码
b.Property(e => e.PositionId).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//岗位名称
@ -2151,9 +2151,9 @@ namespace TaskManager.EntityFramework
//资质等级(Level_4,Level_3,Level_2,Level_1)
b.Property(e => e.QualificationLevel).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//资质获取时间
b.Property(e => e.CheckInTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CheckInTime).IsRequired();
//资质失去时间
b.Property(e => e.CheckOutTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
@ -2890,7 +2890,7 @@ namespace TaskManager.EntityFramework
//工艺装备序列号
b.Property(e => e.SerialNumber).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备制造日期,格式(yyyy-MM-dd)
b.Property(e => e.ProductionDate).HasColumnType("CHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.ProductionDate).IsRequired();
//主要材质
b.Property(e => e.Material).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//当前存放地点
@ -2914,9 +2914,9 @@ namespace TaskManager.EntityFramework
//检测精度
b.Property(e => e.DetectionAccuracy).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//最近校准日期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.CalibrationDate).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CalibrationDate).IsRequired();
//校准到期天数
b.Property(e => e.CalibrationDueDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
b.Property(e => e.CalibrationDueDays).HasColumnType("VARCHAR").HasMaxLength(12).IsRequired();
//允许误差范围
b.Property(e => e.ToleranceRange).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//磨损阈值
@ -3233,7 +3233,7 @@ namespace TaskManager.EntityFramework
//是否关键工位(Y/N)
b.Property(e => e.KeyStation).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//产线顺序
b.Property(e => e.ProductionLineOrder).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 0).IsRequired();
//工位顺序
@ -3285,7 +3285,7 @@ namespace TaskManager.EntityFramework
//是否有资质(Y,N)
b.Property(e => e.HaveQuantity).HasColumnType("CHAR").HasMaxLength(1).IsRequired();
//供应商修改时间,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.DataUpdateTime).IsRequired();
//岗位代码
b.Property(e => e.PositionId).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//岗位名称
@ -3293,9 +3293,9 @@ namespace TaskManager.EntityFramework
//资质等级(Level_4,Level_3,Level_2,Level_1)
b.Property(e => e.QualificationLevel).HasColumnType("VARCHAR").HasMaxLength(16).IsRequired();
//资质获取时间
b.Property(e => e.CheckInTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CheckInTime).IsRequired();
//资质失去时间
b.Property(e => e.CheckOutTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired();
b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false);
b.Property(e => e.ReadState).HasDefaultValue(false);
@ -3379,7 +3379,7 @@ namespace TaskManager.EntityFramework
//工艺装备序列号
b.Property(e => e.SerialNumber).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//工艺装备制造日期,格式(yyyy-MM-dd)
b.Property(e => e.ProductionDate).HasColumnType("CHAR").HasMaxLength(16).IsRequired();
b.Property(e => e.ProductionDate).IsRequired();
//主要材质
b.Property(e => e.Material).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//当前存放地点
@ -3403,9 +3403,9 @@ namespace TaskManager.EntityFramework
//检测精度
b.Property(e => e.DetectionAccuracy).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired();
//最近校准日期,格式(yyyy-MM-ddHH:mm:ss)
b.Property(e => e.CalibrationDate).HasColumnType("CHAR").HasMaxLength(19).IsRequired();
b.Property(e => e.CalibrationDate).IsRequired();
//校准到期天数
b.Property(e => e.CalibrationDueDays).HasColumnType("CHAR").HasMaxLength(12).IsRequired();
b.Property(e => e.CalibrationDueDays).HasColumnType("VARCHAR").HasMaxLength(12).IsRequired();
//允许误差范围
b.Property(e => e.ToleranceRange).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired();
//磨损阈值

10317
API/TaskManager.EntityFramework/Migrations/20250626085605_z20250620001.Designer.cs

File diff suppressed because it is too large

279
API/TaskManager.EntityFramework/Migrations/20250626085605_z20250620001.cs

@ -0,0 +1,279 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z20250620001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_SINV_DATA",
type: "VarChar(30)",
maxLength: 30,
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<string>(
name: "ValidDays",
table: "SUPPLIER_PRO_MATERIAL_DATA",
type: "VARCHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<DateTime>(
name: "DataUpdateTime",
table: "SUPPLIER_INFO_LOGS",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "DataUpdateTime",
table: "SUPPLIER_INFO_DT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "DataUpdateTime",
table: "SUPPLIER_INFO",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "DataUpdateTime",
table: "SUPPLIER_EMPLOYEE_LOGS",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "CheckOutTime",
table: "SUPPLIER_EMPLOYEE_LOGS",
type: "datetime2",
nullable: true,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "CheckInTime",
table: "SUPPLIER_EMPLOYEE_LOGS",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "DataUpdateTime",
table: "SUPPLIER_EMPLOYEE_DT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "CheckOutTime",
table: "SUPPLIER_EMPLOYEE_DT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "CheckInTime",
table: "SUPPLIER_EMPLOYEE_DT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "DataUpdateTime",
table: "SUPPLIER_EMPLOYEE",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "CheckOutTime",
table: "SUPPLIER_EMPLOYEE",
type: "datetime2",
nullable: true,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "CheckInTime",
table: "SUPPLIER_EMPLOYEE",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_SINV_DATA",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(string),
oldType: "VarChar(30)",
oldMaxLength: 30);
migrationBuilder.AlterColumn<string>(
name: "ValidDays",
table: "SUPPLIER_PRO_MATERIAL_DATA",
type: "CHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_INFO_LOGS",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_INFO_DT",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_INFO",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_EMPLOYEE_LOGS",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "CheckOutTime",
table: "SUPPLIER_EMPLOYEE_LOGS",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
defaultValue: "",
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CheckInTime",
table: "SUPPLIER_EMPLOYEE_LOGS",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_EMPLOYEE_DT",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "CheckOutTime",
table: "SUPPLIER_EMPLOYEE_DT",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "CheckInTime",
table: "SUPPLIER_EMPLOYEE_DT",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "DataUpdateTime",
table: "SUPPLIER_EMPLOYEE",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "CheckOutTime",
table: "SUPPLIER_EMPLOYEE",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
defaultValue: "",
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CheckInTime",
table: "SUPPLIER_EMPLOYEE",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
}
}
}

10317
API/TaskManager.EntityFramework/Migrations/20250627012246_z202506270001.Designer.cs

File diff suppressed because it is too large

22
API/TaskManager.EntityFramework/Migrations/20250627012246_z202506270001.cs

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506270001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

10311
API/TaskManager.EntityFramework/Migrations/20250627014145_z202506270002.Designer.cs

File diff suppressed because it is too large

267
API/TaskManager.EntityFramework/Migrations/20250627014145_z202506270002.cs

@ -0,0 +1,267 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506270002 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDueDays",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "VARCHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_DT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDueDays",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_DT",
type: "VARCHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<DateTime>(
name: "CalibrationDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_DT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
migrationBuilder.AlterColumn<DateTime>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "DeviceStatus",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(30)",
maxLength: 30,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "DesignLifeValue",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "DesignLifeUnits",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "CurrentUsageCount",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(16)",
oldMaxLength: 16);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDueDays",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(32)",
maxLength: 32,
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<DateTime>(
name: "CalibrationDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "CHAR(19)",
oldMaxLength: 19);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "CHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "CalibrationDueDays",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "CHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_DT",
type: "CHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "CalibrationDueDays",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_DT",
type: "CHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(12)",
oldMaxLength: 12);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_DT",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "CHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<string>(
name: "DeviceStatus",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(30)",
oldMaxLength: 30);
migrationBuilder.AlterColumn<string>(
name: "DesignLifeValue",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(32)",
oldMaxLength: 32);
migrationBuilder.AlterColumn<string>(
name: "DesignLifeUnits",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(32)",
oldMaxLength: 32);
migrationBuilder.AlterColumn<string>(
name: "CurrentUsageCount",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "VARCHAR(16)",
maxLength: 16,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(32)",
oldMaxLength: 32);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDueDays",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "CHAR(12)",
maxLength: 12,
nullable: false,
oldClrType: typeof(string),
oldType: "VARCHAR(32)",
oldMaxLength: 32);
migrationBuilder.AlterColumn<string>(
name: "CalibrationDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT",
type: "CHAR(19)",
maxLength: 19,
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
}
}
}

10311
API/TaskManager.EntityFramework/Migrations/20250627014433_z202506270003.Designer.cs

File diff suppressed because it is too large

35
API/TaskManager.EntityFramework/Migrations/20250627014433_z202506270003.cs

@ -0,0 +1,35 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506270003 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "datetime2",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ProductionDate",
table: "SUPPLIER_PRO_PROCESS_EQUIPMENT_LOGS",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
}
}
}

113
API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs

@ -1958,7 +1958,7 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<string>("ValidDays")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("CHAR");
.HasColumnType("VARCHAR");
b.Property<string>("VendorHardwareRevision")
.HasMaxLength(32)
@ -2827,15 +2827,14 @@ namespace TaskManager.EntityFramework.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("UId"));
b.Property<string>("CalibrationDate")
b.Property<DateTime?>("CalibrationDate")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("CalibrationDueDays")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("CHAR");
.HasMaxLength(32)
.HasColumnType("VARCHAR");
b.Property<decimal>("CavityCount")
.HasPrecision(16)
@ -2866,17 +2865,17 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<string>("CurrentUsageCount")
.IsRequired()
.HasMaxLength(16)
.HasMaxLength(32)
.HasColumnType("VARCHAR");
b.Property<string>("DesignLifeUnits")
.IsRequired()
.HasMaxLength(16)
.HasMaxLength(32)
.HasColumnType("VARCHAR");
b.Property<string>("DesignLifeValue")
.IsRequired()
.HasMaxLength(16)
.HasMaxLength(32)
.HasColumnType("VARCHAR");
b.Property<string>("DetectionAccuracy")
@ -2901,7 +2900,7 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<string>("DeviceStatus")
.IsRequired()
.HasMaxLength(16)
.HasMaxLength(30)
.HasColumnType("VARCHAR");
b.Property<decimal>("DeviceType")
@ -2936,10 +2935,9 @@ namespace TaskManager.EntityFramework.Migrations
.HasPrecision(16)
.HasColumnType("DECIMAL");
b.Property<string>("ProductionDate")
b.Property<DateTime?>("ProductionDate")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<bool>("ReadState")
.ValueGeneratedOnAdd()
@ -3017,15 +3015,14 @@ namespace TaskManager.EntityFramework.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("UId"));
b.Property<string>("CalibrationDate")
b.Property<DateTime?>("CalibrationDate")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("CalibrationDueDays")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("CHAR");
.HasColumnType("VARCHAR");
b.Property<decimal>("CavityCount")
.HasPrecision(16)
@ -3122,10 +3119,9 @@ namespace TaskManager.EntityFramework.Migrations
.HasPrecision(16)
.HasColumnType("DECIMAL");
b.Property<string>("ProductionDate")
b.Property<DateTime?>("ProductionDate")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<bool>("ReadState")
.ValueGeneratedOnAdd()
@ -3196,13 +3192,12 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<string>("CalibrationDate")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("nvarchar(max)");
b.Property<string>("CalibrationDueDays")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("CHAR");
.HasColumnType("VARCHAR");
b.Property<decimal>("CavityCount")
.HasPrecision(16)
@ -3303,10 +3298,9 @@ namespace TaskManager.EntityFramework.Migrations
.HasPrecision(16)
.HasColumnType("DECIMAL");
b.Property<string>("ProductionDate")
b.Property<DateTime?>("ProductionDate")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<bool>("ReadState")
.ValueGeneratedOnAdd()
@ -3980,23 +3974,19 @@ namespace TaskManager.EntityFramework.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("UId"));
b.Property<string>("CheckInTime")
b.Property<DateTime?>("CheckInTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("CheckOutTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
b.Property<DateTime?>("CheckOutTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("DataUpdateTime")
b.Property<DateTime?>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("HaveQuantity")
.IsRequired()
@ -4118,23 +4108,20 @@ namespace TaskManager.EntityFramework.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("UId"));
b.Property<string>("CheckInTime")
b.Property<DateTime?>("CheckInTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("CheckOutTime")
b.Property<DateTime?>("CheckOutTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("DataUpdateTime")
b.Property<DateTime?>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("HaveQuantity")
.IsRequired()
@ -4243,23 +4230,19 @@ namespace TaskManager.EntityFramework.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("UId"));
b.Property<string>("CheckInTime")
b.Property<DateTime?>("CheckInTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("CheckOutTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
b.Property<DateTime?>("CheckOutTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("DataUpdateTime")
b.Property<DateTime?>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("HaveQuantity")
.IsRequired()
@ -4392,10 +4375,9 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("DataUpdateTime")
b.Property<DateTime?>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("Id")
.HasMaxLength(50)
@ -4523,10 +4505,9 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("DataUpdateTime")
b.Property<DateTime?>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasColumnType("datetime2");
b.Property<string>("KeyStation")
.IsRequired()
@ -4641,10 +4622,8 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
b.Property<DateTime>("DataUpdateTime")
.HasColumnType("datetime2");
b.Property<string>("Id")
.HasMaxLength(50)
@ -9895,8 +9874,8 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<string>("DataUpdateTime")
.IsRequired()
.HasMaxLength(19)
.HasColumnType("CHAR");
.HasMaxLength(30)
.HasColumnType("VarChar");
b.Property<string>("Id")
.HasMaxLength(50)

26
API/Wood.Service/Commons/ValidationHelper.cs

@ -32,20 +32,20 @@ namespace Wood.Service
errors.Add($"第{rowNum}行数据错误:字段 {(title.IsNullOrEmpty() ? property.Name : title)} 的长度超过限制 ({value.Length} > {maxLength})");
}
}
string format = property.GetImporterHeader_Format();
if (format.HasValue())
{
if (format == "yyyy-MM-dd" || format == "yyyy-MM-dd HH:mm:ss")
{
var value = property.PropertyInfo.GetValue(data) as string;
if (DateTime.TryParse(value, out DateTime result) == false)
{
string title = property.GetImporterHeader_Name();
errors.Add($"第{rowNum}行数据错误:字段 {(title.IsNullOrEmpty() ? property.Name : title)} 的格式错误 (格式:{format},字段值:{value})");
}
//string format = property.GetImporterHeader_Format();
//if (format.HasValue())
//{
// if (format == "yyyy-MM-dd" || format == "yyyy-MM-dd HH:mm:ss")
// {
// var value = property.PropertyInfo.GetValue(data) as string;
// if (DateTime.TryParse(value, out DateTime result) == false)
// {
// string title = property.GetImporterHeader_Name();
// errors.Add($"第{rowNum}行数据错误:字段 {(title.IsNullOrEmpty() ? property.Name : title)} 的格式错误 (格式:{format},字段值:{value})");
// }
}
}
// }
//}
}
rowNum++;
}

136
API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs

@ -357,141 +357,7 @@ namespace TaskManager.Controllers
}
}
//public async Task SyncTaskSubTable(string taskName, string client)
//{
// var version = DateTime.Now.ToString("yyyyMMdd");
// var requestDate = DateTime.Now.ToString("yyyy-MM-dd");
// if (string.IsNullOrEmpty(taskName) || string.IsNullOrEmpty(client))
// {
// await _logger.AddError("任务名称或客户端不能为空", taskName, Guid.NewGuid(), version);
// return;
// }
// var sublist = _jobDbContext.TaskSub.Where(p => taskName.Contains(p.TaskName) && p.WriteState == false && p.Subscriber == client).ToList();
// int pageSize = CPageSize;
// if (sublist.Any())
// {
// foreach (var sub in sublist)
// {
// string querystr = $"select * from {sub.TableName} where TaskId='{sub.TaskId}' and WriteState=0 and ReadState=1 order by uid";//任务表
// var entites = _jobDbContext.Database.GetDbConnection().Query<T>(querystr);//明细表
// if (entites.Any())
// {
// var total = entites.Count();
// sub.DataCount = total;
// int totalPages = (int)Math.Ceiling((double)total / pageSize);
// int startPage = sub.SyncedPageCount == 0 ? 1 : sub.SyncedPageCount;
// int errorNumber = 0;
// List<string> errorlist=new List<string>();
// for (int i = startPage; i <= totalPages; i++)
// {
// var records = entites.Skip((i - 1) * pageSize)
// .Take(pageSize).ToList();
// #region dto转换作为参数发给客户API 因为实体比DTO字段多
// List<TDTO> dtos = new List<TDTO>();
// foreach (var itm in records)
// {
// TDTO dto = new TDTO();
// dto.InjectFrom(itm);
// dtos.Add(dto);
// }
// PagedRequest<TDTO> pagedRequest = new PagedRequest<TDTO>()
// {
// batchNo = GenerateRandomStringWith8EG(),
// total = entites.Count(),
// pageSize = pageSize,
// list = dtos,
// pageNum = i
// };
// #endregion
// foreach (var itm in records)
// {
// itm.WriteState = true;
// itm.RequestDate = requestDate;
// }
// var result = await PostPageAsync(pagedRequest, sub.TaskId, version);
// if (result.code == 200)
// {
// await _logger.AddSuccess($"第 {i} 页奇瑞数据保存成功", TaskName, sub.TaskId, version);
// _jobDbContext.BulkUpdate(records, options => options.UseTableLock = true);
// List<TLOGS> logs = new List<TLOGS>();
// foreach (var itm in records)
// {
// TLOGS log = new TLOGS();
// log.InjectFrom(itm);
// log.RequestDate = requestDate;
// log.TaskId = sub.TaskId;
// log.WriteState = true;
// log.ReadState = true;
// logs.Add(log);
// }
// _jobDbContext.BulkInsert(logs, options => options.UseTableLock = true);
// sub.SyncedPageCount = i;
// if (i == totalPages)
// {
// sub.WriteState = true;
// _jobDbContext.Set<TaskSub>().Update(sub);
// _jobDbContext.SaveChanges();
// await _logger.AddSuccess($"奇瑞{sub.TaskId}任务完成据保存成功", TaskName, sub.TaskId, version);
// }
// }
// else
// {
// //sub.FailedCount = i * pageSize;
// //sub.FailedInfo = $"第 {i} 页奇瑞数据保存失败 {result.message}。";
// errorNumber++;
// string inputjson = string.Empty;
// if (TaskName == "日物料需求计划风险确认")//格式特殊处理
// {
// inputjson = JsonSerializer.Serialize(pagedRequest,
// new JsonSerializerOptions
// {
// PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
// Converters =
// {
// new DecimalTrimConverter(),
// new InputCustomDateTimeConverter(),
// new InputCustomNullableDateTimeConverter()
// },
// WriteIndented = false,// 可选,用于格式化输出
// Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(System.Text.Unicode.UnicodeRanges.All)
// }
// );
// }
// else
// {
// inputjson = JsonSerializer.Serialize(pagedRequest,
// new JsonSerializerOptions
// {
// PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
// Converters =
// {
// new DecimalTrimConverter(),
// },
// WriteIndented = false,// 可选,用于格式化输出
// Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(System.Text.Unicode.UnicodeRanges.All)
// }
// );
// }
// errorlist.Add($"第 {i} 页奇瑞数据保存失败 {result.message}");
// await _logger.AddError($"第 {i} 页奇瑞数据保存失败 {result.message}。", TaskName, sub.TaskId, version,inputjson);
// }
// }
// if (errorNumber> 0)
// {
// await _logger.AddError($"奇瑞{sub.TaskId}任务失败,请检查数据。", TaskName, sub.TaskId, version);
// sub.FailedCount = errorNumber>totalPages? totalPages* pageSize: errorNumber * pageSize;
// sub.FailedInfo = $"奇瑞{sub.TaskId}任务失败{errorlist.FirstOrDefault()},请检查数据。";
// sub.WriteState = true;
// _jobDbContext.Set<TaskSub>().Update(sub);
// _jobDbContext.SaveChanges();
// }
// }
// }
// }
//}
[HttpGet]
public async Task<ActionResult<IEnumerable<T>>> GetAll()

1096
API/Wood.Service/Controllers/CheryRecurringJobInputPageExtendController.cs

File diff suppressed because it is too large

2
API/Wood.Service/Controllers/CherySupplierSinvDataService.cs

@ -6,7 +6,7 @@ using TaskManager.EntityFramework;
namespace TaskManager.Controllers
{
public class CherySupplierSinvDataService : CheryRecurringJobInputPageController<SUPPLIER_SINV_DATA, SUPPLIER_SINV_DATA_DETAIL_DTO, SUPPLIER_SINV_DATA_LOGS>
public class CherySupplierSinvDataService : CheryRecurringJobInputPageExtendController<SUPPLIER_SINV_DATA, SUPPLIER_SINV_DATA_DTO, SUPPLIER_SINV_DATA_LOGS>
{
public CherySupplierSinvDataService(HttpClient httpClient, JobDbContext jobDbContext, LogController log, IRepository<SUPPLIER_SINV_DATA> repository) : base(httpClient, jobDbContext, log, repository)
{

1
API/Wood.Service/Controllers/CustomLogService.cs

@ -62,7 +62,6 @@ namespace Wood.Service.Controllers
{
case "来料检验数据":
var stockService = _builder.GetRequiredService<SupplierProMaterialStockService>();
requestInputBase.Condition.Filters.Add(new Filter() { Action = "==", Column = "TaskId", Value = first.TaskId.ToString(), Logic="and" });
var stockResult = await stockService.GetTaskDataPaged(requestInputBase);
return Ok(stockResult);

7
API/Wood.Service/Controllers/RecurringJobBaseController.cs

@ -74,7 +74,12 @@ namespace TaskManager.Controllers
var request = new HttpRequestMessage(HttpMethod.Post, url);
request.Content = new StringContent(jsonData, Encoding.UTF8, "application/json");
var str3 = request.Content.ToString();
var requestContent = await request.Content.ReadAsStringAsync();
bool isEqual = jsonData == requestContent;
if (isEqual == false)
{
await _logger.AddError($"请求数据不一致body:{jsonData},singed:{requestContent}", TaskName, taskid, version, jsonData);
}

4
API/Wood.Service/Controllers/TaskConifgureController.cs

@ -248,14 +248,14 @@ namespace TaskManager.Controllers
case "供应商共享库存-上午":
BackgroundJob.Schedule<CherySupplierSinvDataService>(
// "process",
x => x.CustomInvokeAsync(taskName, client),
x => x.CustomInvokeAsync(taskName, client,taskId),
TimeSpan.FromSeconds(10)
);
break;
case "供应商共享库存-下午":
BackgroundJob.Schedule<CherySupplierSinvDataService>(
// "process",
x => x.CustomInvokeAsync(taskName, client),
x => x.CustomInvokeAsync(taskName, client,taskId),
TimeSpan.FromSeconds(10)
);
break;

9
API/Wood.Service/Datas/SupplierEmployeeDtService.cs

@ -17,6 +17,7 @@ using Magicodes.ExporterAndImporter.Core.Models;
using Wood.Util;
using static Dapper.SqlMapper;
using System.Transactions;
using Omu.ValueInjecter;
namespace Wood.Service.Datas
{
@ -89,9 +90,13 @@ namespace Wood.Service.Datas
//添加任务明细
foreach (var empDtObj in entityLst)
{
SUPPLIER_EMPLOYEE empObj = EntityMapper<SUPPLIER_EMPLOYEE_DT, SUPPLIER_EMPLOYEE>.Trans(empDtObj);
empDtObj.SupplierCode = VendCode;
SUPPLIER_EMPLOYEE empObj = new SUPPLIER_EMPLOYEE();
empObj.InjectFrom(empDtObj);
//SUPPLIER_EMPLOYEE empObj = EntityMapper<SUPPLIER_EMPLOYEE_DT, SUPPLIER_EMPLOYEE>.Trans(empDtObj);
empObj.TaskId = taskSubObj.TaskId;
await _supplierEmployeeRepository.AddAsync(empObj);
}

15
API/Wood.Service/Datas/SupplierInfoDtService.cs

@ -16,6 +16,7 @@ using Wood.Service.Controllers;
using Magicodes.ExporterAndImporter.Core.Models;
using System.Transactions;
using Wood.Util;
using Omu.ValueInjecter;
namespace Wood.Service.Datas
{
@ -88,10 +89,10 @@ namespace Wood.Service.Datas
//添加任务明细
foreach (var empDtObj in entityLst)
{
SUPPLIER_INFO empObj = EntityMapper<SUPPLIER_INFO_DT, SUPPLIER_INFO>.Trans(empDtObj);
empObj.TaskId = taskSubObj.TaskId;
empDtObj.SupplierCode = VendCode;
SUPPLIER_INFO empObj = new SUPPLIER_INFO();
empObj.InjectFrom(empDtObj);
empObj.TaskId = taskSubObj.TaskId;
await _supplierInfoRepository.AddAsync(empObj);
}
@ -141,7 +142,9 @@ namespace Wood.Service.Datas
await _taskSubRepository.AddAsync(taskSubObj);
//添加任务明细
SUPPLIER_INFO empObj = EntityMapper<SUPPLIER_INFO_DT, SUPPLIER_INFO>.Trans(entity);
SUPPLIER_INFO empObj = new SUPPLIER_INFO();
empObj.InjectFrom(entity);
//EntityMapper<SUPPLIER_INFO_DT, SUPPLIER_INFO>.Trans(entity);
empObj.TaskId = taskSubObj.TaskId;
await _supplierInfoRepository.AddAsync(empObj);
@ -182,7 +185,9 @@ namespace Wood.Service.Datas
TaskSub taskSubObj = _commonService.BuildTaskSub(1, _taskName);
await _taskSubRepository.AddAsync(taskSubObj);
//添加任务明细
SUPPLIER_INFO empObj = EntityMapper<SUPPLIER_INFO_DT, SUPPLIER_INFO>.Trans(entity);
//SUPPLIER_INFO empObj = EntityMapper<SUPPLIER_INFO_DT, SUPPLIER_INFO>.Trans(entity);
SUPPLIER_INFO empObj = new SUPPLIER_INFO();
empObj.InjectFrom(entity);
empObj.TaskId = taskSubObj.TaskId;
await _supplierInfoRepository.AddAsync(empObj);

16
API/Wood.Service/Datas/SupplierProProcessEquipmentDtService.cs

@ -17,6 +17,7 @@ using Magicodes.ExporterAndImporter.Core.Models;
using TaskManager.Entity.Entitys;
using System.Transactions;
using Wood.Util;
using Omu.ValueInjecter;
namespace Wood.Service.Datas
{
@ -89,9 +90,9 @@ namespace Wood.Service.Datas
//添加任务明细
foreach (var empDtObj in entityLst)
{
SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = EntityMapper<SUPPLIER_PRO_PROCESS_EQUIPMENT_DT, SUPPLIER_PRO_PROCESS_EQUIPMENT>.Trans(empDtObj);
SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = new SUPPLIER_PRO_PROCESS_EQUIPMENT();
empObj.InjectFrom(empDtObj);
empObj.TaskId = taskSubObj.TaskId;
empObj.SupplierCode = VendCode;
await _supplierProProcessEquipmentRepository.AddAsync(empObj);
}
@ -139,7 +140,10 @@ namespace Wood.Service.Datas
TaskSub taskSubObj = _commonService.BuildTaskSub(1, _taskName);
await _taskSubRepository.AddAsync(taskSubObj);
//添加任务明细
SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = EntityMapper<SUPPLIER_PRO_PROCESS_EQUIPMENT_DT, SUPPLIER_PRO_PROCESS_EQUIPMENT>.Trans(entity);
SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = new SUPPLIER_PRO_PROCESS_EQUIPMENT();
empObj.InjectFrom(entity);
empObj.SupplierCode = VendCode;
//EntityMapper<SUPPLIER_PRO_PROCESS_EQUIPMENT_DT, SUPPLIER_PRO_PROCESS_EQUIPMENT>.Trans(entity);
empObj.TaskId = taskSubObj.TaskId;
await _supplierProProcessEquipmentRepository.AddAsync(empObj);
@ -179,8 +183,12 @@ namespace Wood.Service.Datas
TaskSub taskSubObj = _commonService.BuildTaskSub(1, _taskName);
await _taskSubRepository.AddAsync(taskSubObj);
//添加任务明细
SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = EntityMapper<SUPPLIER_PRO_PROCESS_EQUIPMENT_DT, SUPPLIER_PRO_PROCESS_EQUIPMENT>.Trans(entity);
SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = new SUPPLIER_PRO_PROCESS_EQUIPMENT();
empObj.InjectFrom(entity);
empObj.SupplierCode = VendCode;
empObj.TaskId = taskSubObj.TaskId;
//SUPPLIER_PRO_PROCESS_EQUIPMENT empObj = EntityMapper<SUPPLIER_PRO_PROCESS_EQUIPMENT_DT, SUPPLIER_PRO_PROCESS_EQUIPMENT>.Trans(entity);
//empObj.TaskId = taskSubObj.TaskId;
await _supplierProProcessEquipmentRepository.AddAsync(empObj);
var firstObj = _context.Set<SUPPLIER_PRO_PROCESS_EQUIPMENT_DT>().FirstOrDefault(

Loading…
Cancel
Save