You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using Models;
|
|
using SlnMesnac.Model.domain;
|
|
using SlnMesnac.Repository.service.@base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SlnMesnac.Repository.service.Impl
|
|
{
|
|
|
|
public class DatastationLocalServiceImpl : BaseServiceImpl<DatastationLocal>, IDatastationLocalService
|
|
{
|
|
private Repository<DatastationLocal> _repository;
|
|
public DatastationLocalServiceImpl(Repository<DatastationLocal> rep) : base(rep)
|
|
{
|
|
_repository = rep;
|
|
}
|
|
public DatastationLocal GetDatastationLocal(string barcode)
|
|
{
|
|
DatastationLocal materialInfo = null;
|
|
try
|
|
{
|
|
materialInfo = base._rep.GetFirst(x => x.Partsns == barcode);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
//_logger.LogError($"根据SAP物料编号获取物料信息异常:{ex.Message}");
|
|
}
|
|
return materialInfo;
|
|
}
|
|
|
|
public async Task<bool> AddDatastationLocalAsync(DatastationLocal record)
|
|
{
|
|
bool result = await _rep.InsertAsync(record);
|
|
return result;
|
|
}
|
|
|
|
public async Task<bool> UpdateDatastationLocalAsync(DatastationLocal record)
|
|
{
|
|
bool result = await _rep.UpdateAsync(record);
|
|
return result;
|
|
}
|
|
}
|
|
}
|