fix 脏数据处理
This commit is contained in:
@@ -95,28 +95,35 @@ public class GainfoOutsourceService : IGainfoOutsourceService
|
|||||||
|
|
||||||
public async Task<GainfoOutSourceExternalInfoResponse> GetExternalInfoAsync(string userNo)
|
public async Task<GainfoOutSourceExternalInfoResponse> GetExternalInfoAsync(string userNo)
|
||||||
{
|
{
|
||||||
var data = await _dbContext.Queryable<OutsourceEntity>()
|
try
|
||||||
.LeftJoin<GainfoEntity>((a, b) => a.Code == b.Code)
|
{
|
||||||
.LeftJoin<GainfoEntity>((a, b, c) => a.SapCode == c.Code)
|
var data = await _dbContext.Queryable<OutsourceEntity>()
|
||||||
.Where((a, b, c) => b.No == userNo)
|
.LeftJoin<GainfoEntity>((a, b) => a.Code == b.Code)
|
||||||
.Select((a, b, c) => new GainfoOutSourceExternalInfoResponse
|
.LeftJoin<GainfoEntity>((a, b, c) => a.SapCode == c.Code)
|
||||||
{
|
.Where((a, b, c) => b.No == userNo)
|
||||||
UserCode = b.Code,
|
.Select((a, b, c) => new GainfoOutSourceExternalInfoResponse
|
||||||
Supplier = a.Supplier,
|
{
|
||||||
SapCode = a.SapCode,
|
UserCode = b.Code,
|
||||||
SapPhone = a.SapPhone,
|
Supplier = a.Supplier,
|
||||||
SapName = c.Name,
|
SapCode = a.SapCode,
|
||||||
EntryDate = b.EntryDate,
|
SapPhone = a.SapPhone,
|
||||||
ResignationDate = b.ResignationDate,
|
SapName = c.Name,
|
||||||
Factory = b.Factory
|
EntryDate = b.EntryDate,
|
||||||
})
|
ResignationDate = b.ResignationDate,
|
||||||
.SingleAsync();
|
Factory = b.Factory
|
||||||
|
})
|
||||||
|
.SingleAsync();
|
||||||
|
|
||||||
data.IsWhiteListInAutoResign = await _dbContext.Queryable<OutsourceWhiteListEntity>()
|
data.IsWhiteListInAutoResign = await _dbContext.Queryable<OutsourceWhiteListEntity>()
|
||||||
.Where(x => x.UserCode == data.UserCode)
|
.Where(x => x.UserCode == data.UserCode)
|
||||||
.AnyAsync();
|
.AnyAsync();
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user