Browse Source

更新版本

master
赵新宇 2 weeks ago
parent
commit
230590d3df
  1. 2
      API/TaskManager.Entity/11-18/SUPPLIER_CON_MMRP.cs
  2. 48
      API/TaskManager.Entity/Entity.cs
  3. 3
      API/Wood.Service/Controllers/CherySupplierConDateService.cs
  4. 53
      API/Wood.Service/Controllers/CherySupplierMrpMonthService.cs

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

@ -5,7 +5,7 @@ namespace TaskManager.Entity.Entitys
/// <summary>
/// M+6月物料需求计划风险确认
/// </summary>
public class SUPPLIER_CON_MMRP : BaseEntity
public class SUPPLIER_CON_MMRP : BaseEntity
{
/// <summary>
/// 供应商代码

48
API/TaskManager.Entity/Entity.cs

@ -476,7 +476,7 @@ namespace TaskManager.Entity
/// </summary>
[JsonPropertyName("version")]
[ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; } = 1;
public int Version { get; set; } =0;
[JsonProperty("omterior")]
[ExporterHeader(DisplayName = "内外饰")] // 推测拼写错误并自定义显示名
@ -549,84 +549,84 @@ namespace TaskManager.Entity
/// </summary>
[JsonPropertyName("quantityDemand1")]
[ExporterHeader(DisplayName = "需求数量1")]
public decimal QuantityDemand1 { get; set; } = 1;
public decimal QuantityDemand1 { get; set; } = 0;
/// <summary>
/// 需求数量2
/// </summary>
[JsonPropertyName("quantityDemand2")]
[ExporterHeader(DisplayName = "需求数量2")]
public decimal QuantityDemand2 { get; set; } = 1;
public decimal QuantityDemand2 { get; set; } = 0;
/// <summary>
/// 需求数量3
/// </summary>
[JsonPropertyName("quantityDemand3")]
[ExporterHeader(DisplayName = "需求数量3")]
public decimal QuantityDemand3 { get; set; } = 1;
public decimal QuantityDemand3 { get; set; } = 0;
/// <summary>
/// 需求数量4
/// </summary>
[JsonPropertyName("quantityDemand4")]
[ExporterHeader(DisplayName = "需求数量4")]
public decimal QuantityDemand4 { get; set; } = 1;
public decimal QuantityDemand4 { get; set; } = 0;
/// <summary>
/// 需求数量5
/// </summary>
[JsonPropertyName("quantityDemand5")]
[ExporterHeader(DisplayName = "需求数量5")]
public decimal QuantityDemand5 { get; set; } = 1;
public decimal QuantityDemand5 { get; set; } = 0;
/// <summary>
/// 需求数量6
/// </summary>
[JsonPropertyName("quantityDemand6")]
[ExporterHeader(DisplayName = "需求数量6")]
public decimal QuantityDemand6 { get; set; } = 1;
public decimal QuantityDemand6 { get; set; } = 0;
/// <summary>
/// 需求数量7
/// </summary>
[JsonPropertyName("quantityDemand7")]
[ExporterHeader(DisplayName = "需求数量7")]
public decimal QuantityDemand7 { get; set; } = 1;
public decimal QuantityDemand7 { get; set; } = 0;
/// <summary>
/// 需求数量8
/// </summary>
[JsonPropertyName("quantityDemand8")]
[ExporterHeader(DisplayName = "需求数量8")]
public decimal QuantityDemand8 { get; set; } = 1;
public decimal QuantityDemand8 { get; set; } = 0;
/// <summary>
/// 需求数量9
/// </summary>
[JsonPropertyName("quantityDemand9")]
[ExporterHeader(DisplayName = "需求数量9")]
public decimal QuantityDemand9 { get; set; } = 1;
public decimal QuantityDemand9 { get; set; } =0;
/// <summary>
/// 需求数量10
/// </summary>
[JsonPropertyName("quantityDemand10")]
[ExporterHeader(DisplayName = "需求数量10")]
public decimal QuantityDemand10 { get; set; } = 1;
public decimal QuantityDemand10 { get; set; } =0;
/// <summary>
/// 需求数量11
/// </summary>
[JsonPropertyName("quantityDemand11")]
[ExporterHeader(DisplayName = "需求数量11")]
public decimal QuantityDemand11 { get; set; } = 1;
public decimal QuantityDemand11 { get; set; } =0;
/// <summary>
/// 需求数量12
/// </summary>
[JsonPropertyName("quantityDemand12")]
[ExporterHeader(DisplayName = "需求数量12")]
public int QuantityDemand12 { get; set; } = 1;
public int QuantityDemand12 { get; set; } =0;
/// <summary>
/// 当文件夹数据发生变更时(更新需求=1/否则=0)
@ -742,13 +742,13 @@ namespace TaskManager.Entity
/// 需求起始日期的需求数量
/// </summary>
[ExporterHeader(DisplayName = "第1天需求数量")]
public int QuantityDemand1 { get; set; } = 1;
public int QuantityDemand1 { get; set; } =0;
/// <summary>
/// 起始日期+1天的需求数量
/// </summary>
[ExporterHeader(DisplayName = "第2天需求数量")]
public int QuantityDemand2 { get; set; } = 1;
public int QuantityDemand2 { get; set; } =0;
/// <summary>
/// 起始日期+2天的需求数量(以此类推)
@ -876,13 +876,13 @@ namespace TaskManager.Entity
/// 删除标识(0=未删除,1=已删除)
/// </summary>
[ExporterHeader(DisplayName = "删除标识")]
public int IsDelete { get; set; } = 1; // 默认已删除(根据原始数据默认值)
public int IsDelete { get; set; } =0; // 默认已删除(根据原始数据默认值)
/// <summary>
/// 数据版本号(乐观锁控制)
/// </summary>
[ExporterHeader(DisplayName = "数据版本号")]
public int Version { get; set; } = 1;
public int Version { get; set; } =0;
@ -1145,7 +1145,7 @@ namespace TaskManager.Entity
/// 到货数量
/// </summary>
[ExporterHeader(DisplayName = "到货数量")]
public int QuantityDelivery { get; set; } = 1;
public int QuantityDelivery { get; set; } =0;
/// <summary>
/// 备注:含批次号信息
@ -1334,13 +1334,13 @@ namespace TaskManager.Entity
/// 是否删除(0:否,1是)
/// </summary>
[ExporterHeader(DisplayName = "删除标记")]
public int IsDelete { get; set; } = 1;
public int IsDelete { get; set; } =0;
/// <summary>
/// 版本号
/// </summary>
[ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; } = 1;
public int Version { get; set; } =0;
@ -1445,13 +1445,13 @@ namespace TaskManager.Entity
/// 是否删除(0:否,1是)
/// </summary>
[ExporterHeader(DisplayName = "删除标记")]
public int IsDelete { get; set; } = 1;
public int IsDelete { get; set; } =0;
/// <summary>
/// 版本号
/// </summary>
[ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; } = 1;
public int Version { get; set; } =0;
@ -1661,7 +1661,7 @@ namespace TaskManager.Entity
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public int QuantityDelivery { get; set; } = 1;
public int QuantityDelivery { get; set; } =0;
/// <summary>
/// 创建时间
@ -2093,7 +2093,7 @@ namespace TaskManager.Entity
/// 在途数量
/// </summary>
[ExporterHeader(DisplayName = "在途数量")]
public decimal? QuantityInTransit { get; set; } = 1;
public decimal? QuantityInTransit { get; set; } =0;
/// <summary>
/// 按时到货比(百分比,如:95表示95%)

3
API/Wood.Service/Controllers/CherySupplierConDateService.cs

@ -9,5 +9,8 @@ namespace TaskManager.Controllers
public SupplierConDateService(HttpClient httpClient, JobDbContext jobDbContext, LogController log, IRepository<SUPPLIER_CON_DATE> repository) : base(httpClient, jobDbContext, log, repository)
{
}
}
}

53
API/Wood.Service/Controllers/CherySupplierMrpMonthService.cs

@ -1,15 +1,64 @@
using TaskManager.Contracts.Dtos;
using Magicodes.ExporterAndImporter.Core;
using TaskManager.Contracts.Dtos;
using TaskManager.Controllers;
using TaskManager.Entity;
using TaskManager.Entity.Entitys;
using TaskManager.EntityFramework;
using TaskManager.EntityFramework;
using Z.BulkOperations;
namespace TaskManager.Controllers
{
/// <summary>
/// M+6月物料需求计划风险确认
/// </summary>
public class CherySupplierMrpMonthService : CheryRecurringJobOutPageController<SUPPLIER_MRP_MONTH, SUPPLIER_MRP_MONTH_DETAIL_DTO>
{
public CherySupplierMrpMonthService(HttpClient httpClient, JobDbContext jobDbContext, LogController log, IRepository<SUPPLIER_MRP_MONTH> repository) : base(httpClient, jobDbContext, log, repository)
{
}
protected override async Task CreateTaskAsync(List<SUPPLIER_MRP_MONTH> plist, JobDbContext dbContext)
{
var taskId = Guid.NewGuid();
var task = new TaskSub();
task.TaskId = taskId;
task.TaskName = TaskName;
task.Subscriber = Client;
task.TableName = "SUPPLIER_CON_MMRP";
if (plist.Count > 0)
{
List<SUPPLIER_CON_MMRP> list = new List<SUPPLIER_CON_MMRP>();
plist.ForEach(p =>
{
var con = new SUPPLIER_CON_MMRP();
con.SupplierCode = "8EG";
con.ReleaseEdition = p.ReleaseEdition;
con.MaterialCode = p.MaterialCode;
con.PlantId = p.PlantId;
con.FeedbackResults = "0";
con.VentureType = "1";
con.VentureSpecific = "1";
con.Measures = "1";
con.StartMonth = p.StartMonth;
con.QuantityMeet1 = p.QuantityDemand1;
con.QuantityMeet2 = p.QuantityDemand2;
con.QuantityMeet3 = p.QuantityDemand3;
con.QuantityMeet4 = p.QuantityDemand4;
con.QuantityMeet5 = p.QuantityDemand5;
con.QuantityMeet6 = p.QuantityDemand6;
con.QuantityMeet7 = p.QuantityDemand7;
con.QuantityMeet8 = p.QuantityDemand8;
con.QuantityMeet9 = p.QuantityDemand9;
con.QuantityMeet10 = p.QuantityDemand10;
con.QuantityMeet11 = p.QuantityDemand11;
con.QuantityMeet12 = p.QuantityDemand12;
list.Add(con);
});
dbContext.BulkInsert(list, new BulkOperationOptions<SUPPLIER_CON_MMRP>() { UseTableLock = false });
}
return;
}
}
}

Loading…
Cancel
Save