fix 排除出差到本基地的人员
This commit is contained in:
@@ -80,7 +80,11 @@ public class SapBusinessTripService : ISapBusinessTripService
|
|||||||
if (deviceCodes.Any())
|
if (deviceCodes.Any())
|
||||||
{
|
{
|
||||||
var userCodes = tripInfos.Select(x => x.Code).Distinct().ToList();
|
var userCodes = tripInfos.Select(x => x.Code).Distinct().ToList();
|
||||||
var gainfos = await _dbContext.Queryable<GainfoEntity>().Where(x => userCodes.Contains(x.Code)).Select(x => new { x.No, x.Code }).ToListAsync();
|
var gainfos = await _dbContext.Queryable<GainfoEntity>()
|
||||||
|
.Where(x => x.Factory != factory) //排除本基地出差
|
||||||
|
.Where(x => userCodes.Contains(x.Code))
|
||||||
|
.Select(x => new { x.No, x.Code })
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
foreach (var gainfo in gainfos)
|
foreach (var gainfo in gainfos)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class SapBusinessTripInfoItem
|
|||||||
public double Day { get; set; }
|
public double Day { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出差目的地
|
/// 出差目的地(factory)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("OV_CCMDD")]
|
[JsonProperty("OV_CCMDD")]
|
||||||
public string Destination { get; set; }
|
public string Destination { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user