fix 增加部门名称,数据权限控制
This commit is contained in:
@@ -30,6 +30,7 @@ public class DevicePermissionsController : ControllerBase
|
||||
[HttpPost("assign")]
|
||||
[Transactional]
|
||||
[IgnoreTenant]
|
||||
[DataPermission]
|
||||
[AssignPermissionLimit]
|
||||
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,11 @@ public class GainfoFacePageResponse
|
||||
/// </summary>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
/// </summary>
|
||||
public string DepartmentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在人脸
|
||||
/// </summary>
|
||||
|
||||
@@ -50,13 +50,15 @@ public class GainfoFaceService : IGainfoFaceService
|
||||
var existsFaceCodes = await _faceDbContext.Queryable<GainfoFaceEntity>().Where(x => userCodes.Contains(x.UserCode)).Select(x => x.UserCode).ToListAsync();
|
||||
|
||||
var list = await _dbContext.Queryable<GainfoEntity>()
|
||||
.LeftJoin<DepartmentEntity>((x, d) => x.DepartmentNo == d.No)
|
||||
.Where(x => x.Factory == request.Factory)
|
||||
.WhereIF(request.Exists.HasValue && request.Exists.Value, x => existsFaceCodes.Contains(x.Code))
|
||||
.WhereIF(request.Exists.HasValue && !request.Exists.Value, x => !existsFaceCodes.Contains(x.Code))
|
||||
.Select(x => new GainfoFacePageResponse
|
||||
.Select((x, d) => new GainfoFacePageResponse
|
||||
{
|
||||
UserCode = x.Code,
|
||||
UserName = x.Name,
|
||||
DepartmentName = d.Name,
|
||||
Exists = false
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Kurisu.AspNetCore" Version="0.9.14" />
|
||||
<PackageReference Include="Kurisu.AspNetCore" Version="0.9.15" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -137,25 +137,6 @@ public class MealSupplementHandlerJob : BaseJob
|
||||
.ExecuteCommandThrowVersionAsync();
|
||||
}, 5);
|
||||
|
||||
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
||||
{
|
||||
new()
|
||||
{
|
||||
UniqueId = mealSupplement.UniqueId,
|
||||
Status = "SUCCESS",
|
||||
Msg = "操作成功"
|
||||
}
|
||||
});
|
||||
|
||||
//更新餐补信息为成功(同步成功)
|
||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
||||
.SetColumns(x => x.Result == r)
|
||||
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Success)
|
||||
.SetColumns(x => x.Sync == true)
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
await DbContext.InsertAsync(new BalanceRecordEntity
|
||||
{
|
||||
Amount = mealSupplement.Amount,
|
||||
@@ -189,6 +170,25 @@ public class MealSupplementHandlerJob : BaseJob
|
||||
ModifiedBy = 1,
|
||||
ModifiedTime = DateTime.Now,
|
||||
});
|
||||
|
||||
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
||||
{
|
||||
new()
|
||||
{
|
||||
UniqueId = mealSupplement.UniqueId,
|
||||
Status = "SUCCESS",
|
||||
Msg = "操作成功"
|
||||
}
|
||||
});
|
||||
|
||||
//更新餐补信息为成功(同步成功)
|
||||
await DbContext.Updateable<MealSupplementRecordEntity>()
|
||||
.SetColumns(x => x.Result == r)
|
||||
.SetColumns(x => x.Status == MealSupplementStatusEnumtype.Success)
|
||||
.SetColumns(x => x.Sync == true)
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => x.UniqueId == mealSupplement.UniqueId)
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
await DbContext.Client.Ado.CommitTranAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user