You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
using TaskManager.Contracts.Dtos;
|
|
|
|
using TaskManager.Entity;
|
|
|
|
using TaskManager.EntityFramework;
|
|
|
|
|
|
|
|
namespace TaskManager.Controllers
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 供应商基础信息
|
|
|
|
/// </summary>
|
|
|
|
public class CherySupplierInfoService : CheryRecurringJobInputPageController<SUPPLIER_INFO, SUPPLIER_INFO_DTO, SUPPLIER_INFO_LOGS>
|
|
|
|
{
|
|
|
|
public CherySupplierInfoService(HttpClient httpClient, JobDbContext jobDbContext, LogController log, IRepository<SUPPLIER_INFO> repository) : base(httpClient, jobDbContext, log, repository)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
protected override async Task UpdateAfter(List<SUPPLIER_INFO> list)
|
|
|
|
{
|
|
|
|
|
|
|
|
var infolist =await _jobDbContext.SUPPLIER_INFO_DT.ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
var query = from itm in infolist
|
|
|
|
join itm1 in list on
|
|
|
|
new
|
|
|
|
{
|
|
|
|
itm.SupplierCode,
|
|
|
|
itm.PlantId,
|
|
|
|
itm.WorkshopId,
|
|
|
|
itm.ProductionLineId,
|
|
|
|
itm.StationId
|
|
|
|
}
|
|
|
|
equals
|
|
|
|
new
|
|
|
|
{
|
|
|
|
itm1.SupplierCode,
|
|
|
|
itm1.PlantId,
|
|
|
|
itm1.WorkshopId,
|
|
|
|
itm1.ProductionLineId,
|
|
|
|
itm1.StationId
|
|
|
|
|
|
|
|
}
|
|
|
|
select itm;
|
|
|
|
|
|
|
|
|
|
|
|
if (query.Any())
|
|
|
|
{
|
|
|
|
var entities = query.ToList();
|
|
|
|
foreach (var entity in entities)
|
|
|
|
{
|
|
|
|
entity.ReadState = true;
|
|
|
|
entity.WriteState = true;
|
|
|
|
}
|
|
|
|
_jobDbContext.BulkUpdate(entities);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|