fix 恢复ToDateJsonConverter,增加获取设备的人员列表,数据权限移除
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
using Dlhis.Basic.Device.Dtos;
|
using Dlhis.Basic.Device.Dtos;
|
||||||
using Dlhis.Basic.Device.Request;
|
using Dlhis.Basic.Device.Request;
|
||||||
using Dlhis.Basic.Device.Services;
|
using Dlhis.Basic.Device.Services;
|
||||||
|
using Dlhis.Basic.Organization.Dto;
|
||||||
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@@ -91,4 +93,15 @@ public class DevicePermissionsController : ControllerBase
|
|||||||
{
|
{
|
||||||
return await _devicePermissionService.ReGeneratePermissionUsersInfoAsync(beforeDto);
|
return await _devicePermissionService.ReGeneratePermissionUsersInfoAsync(beforeDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取设备下人员分页
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("gainfos/page")]
|
||||||
|
public async Task<Pagination<GainfoDto>> GetGainfoPageByDeviceAsync([FromQuery] DeviceWithGainfoRequest request)
|
||||||
|
{
|
||||||
|
return await _devicePermissionService.GetGainfoPageByDeviceAsync(request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
13
Src/Dlhis.Basic/Device/Request/DeviceWithGainfoRequest.cs
Normal file
13
Src/Dlhis.Basic/Device/Request/DeviceWithGainfoRequest.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||||
|
|
||||||
|
namespace Dlhis.Basic.Device.Request;
|
||||||
|
|
||||||
|
public class DeviceWithGainfoRequest : PageDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 设备号
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "设备号不能为空")]
|
||||||
|
public string DeviceUniqueNo { get; set; }
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
using Dlhis.Basic.Device.Dtos;
|
using Dlhis.Basic.Device.Dtos;
|
||||||
using Dlhis.Basic.Device.Request;
|
using Dlhis.Basic.Device.Request;
|
||||||
|
using Dlhis.Basic.Organization.Dto;
|
||||||
using Dlhis.Entity.Device.Enums;
|
using Dlhis.Entity.Device.Enums;
|
||||||
using Dlhis.Entity.Sys.Enums;
|
using Dlhis.Entity.Sys.Enums;
|
||||||
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||||
|
|
||||||
namespace Dlhis.Basic.Device.Services;
|
namespace Dlhis.Basic.Device.Services;
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ public interface IDevicePermissionService : IScopeDependency
|
|||||||
/// <param name="taskType"></param>
|
/// <param name="taskType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task GenerateDeviceTasksAsync(string userNo, DeviceTaskEnumType taskType);
|
Task GenerateDeviceTasksAsync(string userNo, DeviceTaskEnumType taskType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取用户所有设备权限
|
/// 获取用户所有设备权限
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -64,4 +66,7 @@ public interface IDevicePermissionService : IScopeDependency
|
|||||||
|
|
||||||
|
|
||||||
Task<int> ReGeneratePermissionUsersInfoAsync(PermissionUsersInfoDto beforeDto);
|
Task<int> ReGeneratePermissionUsersInfoAsync(PermissionUsersInfoDto beforeDto);
|
||||||
}
|
|
||||||
|
|
||||||
|
Task<Pagination<GainfoDto>> GetGainfoPageByDeviceAsync(DeviceWithGainfoRequest request);
|
||||||
|
}
|
||||||
@@ -5,12 +5,16 @@ using Dlhis.Entity.Device.Entities;
|
|||||||
using Dlhis.Entity.Device.Enums;
|
using Dlhis.Entity.Device.Enums;
|
||||||
using Dlhis.Entity.Sys.Entities;
|
using Dlhis.Entity.Sys.Entities;
|
||||||
using Dlhis.Entity.Sys.Enums;
|
using Dlhis.Entity.Sys.Enums;
|
||||||
|
using Dlhis.Scheduled.Api;
|
||||||
using Kurisu.AspNetCore.Authentication.Abstractions;
|
using Kurisu.AspNetCore.Authentication.Abstractions;
|
||||||
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||||
using Kurisu.AspNetCore.DataAccess.Entity;
|
using Kurisu.AspNetCore.DataAccess.Entity;
|
||||||
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
||||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||||
using Kurisu.AspNetCore.Utils;
|
using Kurisu.AspNetCore.Utils;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using GeneratePermissionIdRequest = Dlhis.Scheduled.Api.Request.GeneratePermissionIdRequest;
|
||||||
|
|
||||||
namespace Dlhis.Basic.Device.Services.Implements;
|
namespace Dlhis.Basic.Device.Services.Implements;
|
||||||
|
|
||||||
@@ -19,12 +23,14 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
private readonly IDbContext _dbContext;
|
private readonly IDbContext _dbContext;
|
||||||
private readonly ICurrentUser _currentUser;
|
private readonly ICurrentUser _currentUser;
|
||||||
private readonly RedisCache _redisCache;
|
private readonly RedisCache _redisCache;
|
||||||
|
private readonly IHangfireApi _hangfireApi;
|
||||||
|
|
||||||
public DevicePermissionService(IDbContext dbContext, ICurrentUser currentUser, RedisCache redisCache)
|
public DevicePermissionService(IDbContext dbContext, ICurrentUser currentUser, RedisCache redisCache)
|
||||||
{
|
{
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_currentUser = currentUser;
|
_currentUser = currentUser;
|
||||||
_redisCache = redisCache;
|
_redisCache = redisCache;
|
||||||
|
_hangfireApi = hangfireApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
public async Task AssignAsync(DevicePermissionSaveRequest request)
|
||||||
@@ -303,6 +309,60 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
return waitTasks.Count;
|
return waitTasks.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<Pagination<GainfoDto>> GetGainfoPageByDeviceAsync(DeviceWithGainfoRequest request)
|
||||||
|
{
|
||||||
|
var device = await _dbContext.Queryable<DeviceEntity>().Where(x => x.UniqueNo == request.DeviceUniqueNo).SingleAsync();
|
||||||
|
|
||||||
|
//当前设备的分组
|
||||||
|
var groups = await _dbContext.Queryable<DeviceGroupRelationshipEntity>()
|
||||||
|
.Where(x => x.DeviceCode == device.Code)
|
||||||
|
.Select(x => x.GroupCode)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
var permissions = await _dbContext.Queryable<DevicePermissionEntity>()
|
||||||
|
.Where(x => (x.UniqueType == DeviceAssignmentTypeEnumType.Device && x.UniqueValue == device.Code) || (x.UniqueType == DeviceAssignmentTypeEnumType.Group && groups.Contains(x.UniqueValue)))
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
var ids = new List<long>();
|
||||||
|
foreach (var permission in permissions)
|
||||||
|
{
|
||||||
|
switch (permission.AssignType)
|
||||||
|
{
|
||||||
|
case AssignTypeEnumType.User:
|
||||||
|
ids.Add(await _dbContext.Queryable<GainfoEntity>().Where(x => x.No == permission.AssignValue).Select(x => x.Id).SingleAsync());
|
||||||
|
break;
|
||||||
|
case AssignTypeEnumType.Group:
|
||||||
|
{
|
||||||
|
var code = Guid.Parse(permission.AssignValue);
|
||||||
|
ids.AddRange(await _dbContext.Queryable<GainfoGroupEntity>().Where(x => x.Code == code)
|
||||||
|
.LeftJoin<GainfoGroupRelationshipEntity>((a, b) => a.Code == b.GroupCode)
|
||||||
|
.LeftJoin<GainfoEntity>((a, b, c) => b.UserNo == c.No)
|
||||||
|
.Select((a, b, c) => c.Id).ToListAsync());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case AssignTypeEnumType.Department:
|
||||||
|
{
|
||||||
|
ids.AddRange(await _dbContext.Queryable<GainfoEntity>().Where(x => x.DepartmentNo == permission.AssignValue).Select(x => x.Id).ToListAsync());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case AssignTypeEnumType.Tenant:
|
||||||
|
{
|
||||||
|
ids.AddRange(await _dbContext.Queryable<GainfoEntity>().Where(x => x.Factory == permission.AssignValue).Select(x => x.Id).ToListAsync());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return await _dbContext.Queryable<GainfoEntity>()
|
||||||
|
.Where(x => ids.Contains(x.Id))
|
||||||
|
.WhereIF(request.Search.IsPresent(), x => x.Code == request.Search || x.Name.Contains(request.Search))
|
||||||
|
.Select<GainfoDto>()
|
||||||
|
.ToPageListAsync(request);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task GenerateDeviceTasksAsync(string userNo, DeviceTaskEnumType taskType)
|
public async Task GenerateDeviceTasksAsync(string userNo, DeviceTaskEnumType taskType)
|
||||||
{
|
{
|
||||||
var deviceCodes = await GetAssignDeviceCodesAsync(userNo);
|
var deviceCodes = await GetAssignDeviceCodesAsync(userNo);
|
||||||
@@ -311,12 +371,12 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var devices = await _dbContext.Queryable<DeviceEntity>()
|
var deivces = await _dbContext.Queryable<DeviceEntity>()
|
||||||
.Where(x => x.Enable)
|
.Where(x => x.Enable)
|
||||||
.Where(x => deviceCodes.Contains(x.Code))
|
.Where(x => deviceCodes.Contains(x.Code))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var tasks = devices.Select(x => new DeviceTaskEntity
|
var tasks = deivces.Select(x => new DeviceTaskEntity
|
||||||
{
|
{
|
||||||
DeviceUniqueNo = x.UniqueNo,
|
DeviceUniqueNo = x.UniqueNo,
|
||||||
Status = DeviceTaskStatusEnumType.Wait,
|
Status = DeviceTaskStatusEnumType.Wait,
|
||||||
@@ -324,7 +384,6 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
DeviceType = x.Type,
|
DeviceType = x.Type,
|
||||||
UserNo = userNo,
|
UserNo = userNo,
|
||||||
CancellationId = 0,
|
CancellationId = 0,
|
||||||
Priority = 0,
|
|
||||||
Version = 0,
|
Version = 0,
|
||||||
TenantId = x.TenantId
|
TenantId = x.TenantId
|
||||||
}).ToList();
|
}).ToList();
|
||||||
@@ -406,7 +465,7 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
.Where(x => x.AssignType == assignType)
|
.Where(x => x.AssignType == assignType)
|
||||||
.Where(x => x.AssignValue == assignValue)
|
.Where(x => x.AssignValue == assignValue)
|
||||||
.GroupBy(x => x.TenantId)
|
.GroupBy(x => x.TenantId)
|
||||||
.Select(x => new UserTenantDeviceCodeDto { Tenant = x.Key, Codes = x.Select(p => p.UniqueValue).ToList() })
|
.Select(x => new UserTenantDeviceCodeDto { Tenant = x.Key, Codes = x.Select(x => x.UniqueValue).ToList() })
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
//处理获取设备分组的情况
|
//处理获取设备分组的情况
|
||||||
@@ -428,9 +487,9 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
};
|
};
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
void RecursionGetNext(DeviceGroupEntity current, List<DeviceGroupEntity> internalDeviceGroups, List<UserTenantDeviceCodeDto> result, bool add)
|
void RecursionGetNext(DeviceGroupEntity current, List<DeviceGroupEntity> deviceGroups, List<UserTenantDeviceCodeDto> result, bool add)
|
||||||
{
|
{
|
||||||
var next = internalDeviceGroups.Where(x => x.PCode == current.Code).ToList();
|
var next = deviceGroups.Where(x => x.PCode == current.Code).ToList();
|
||||||
foreach (var item in next)
|
foreach (var item in next)
|
||||||
{
|
{
|
||||||
if (add)
|
if (add)
|
||||||
@@ -438,7 +497,7 @@ public class DevicePermissionService : IDevicePermissionService
|
|||||||
result.Add(new UserTenantDeviceCodeDto { Tenant = item.TenantId, Codes = new List<Guid> { item.Code } });
|
result.Add(new UserTenantDeviceCodeDto { Tenant = item.TenantId, Codes = new List<Guid> { item.Code } });
|
||||||
}
|
}
|
||||||
|
|
||||||
RecursionGetNext(item, internalDeviceGroups, result, result.SelectMany(x => x.Codes).Contains(item.Code));
|
RecursionGetNext(item, deviceGroups, result, result.SelectMany(x => x.Codes).Contains(item.Code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
Src/Dlhis.Basic/Organization/Dto/GainfoDto.cs
Normal file
10
Src/Dlhis.Basic/Organization/Dto/GainfoDto.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Dlhis.Basic.Organization.Dto;
|
||||||
|
|
||||||
|
public class GainfoDto
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public string Code { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Workplace { get; set; }
|
||||||
|
public string Factory { get; set; }
|
||||||
|
}
|
||||||
@@ -45,7 +45,7 @@ public class GainfoCurrentResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出生日期/生日
|
/// 出生日期/生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class GainfoDetailResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出生日期
|
/// 出生日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class GainfoPageResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生日
|
/// 生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -127,4 +127,4 @@ public class BusinessPlacesController : ControllerBase
|
|||||||
{
|
{
|
||||||
await _businessPlaceShiftService.DispositionDeviceAsync(request);
|
await _businessPlaceShiftService.DispositionDeviceAsync(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
using Dlhis.Basic.Places.Request;
|
using Dlhis.Basic.Places.Request;
|
||||||
using Dlhis.Basic.Places.Response;
|
using Dlhis.Basic.Places.Response;
|
||||||
using Dlhis.Entity.Basic.Entity;
|
using Dlhis.Entity.Basic.Entity;
|
||||||
|
using Dlhis.Entity.Canteen.Entities;
|
||||||
using Dlhis.Entity.Canteen.Enums;
|
using Dlhis.Entity.Canteen.Enums;
|
||||||
|
using Kurisu.AspNetCore.CustomClass;
|
||||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||||
|
using Kurisu.AspNetCore.DataAccess.Entity;
|
||||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Extensions;
|
||||||
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
||||||
using Kurisu.AspNetCore.Utils.Extensions;
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
@@ -112,6 +115,11 @@ public class BusinessPlaceService : IBusinessPlaceService
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var entity = await _dbContext.Queryable<BusinessPlaceEntity>().FirstAsync(x => x.Id == request.Id);
|
var entity = await _dbContext.Queryable<BusinessPlaceEntity>().FirstAsync(x => x.Id == request.Id);
|
||||||
|
if (await _dbContext.Queryable<BalanceRecordEntity>().AnyAsync(x => x.BusinessPlaceCode == entity.Code) && request.CustomCode != entity.CustomCode)
|
||||||
|
{
|
||||||
|
throw new UserFriendlyException("设备已产生消费记录,不可编辑编码");
|
||||||
|
}
|
||||||
|
|
||||||
request.Adapt(entity);
|
request.Adapt(entity);
|
||||||
|
|
||||||
await _dbContext.UpdateAsync(entity);
|
await _dbContext.UpdateAsync(entity);
|
||||||
@@ -149,12 +157,15 @@ public class BusinessPlaceService : IBusinessPlaceService
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task CheckExistsCustomCodeAsync(BusinessPlaceSaveRequest request)
|
private async Task CheckExistsCustomCodeAsync(BusinessPlaceSaveRequest request)
|
||||||
{
|
{
|
||||||
var existsSameCustomCode = await _dbContext.Queryable<BusinessPlaceEntity>()
|
await _dbContext.IgnoreAsync<ITenantId>(async () =>
|
||||||
.Where(x => x.CustomCode == request.CustomCode)
|
{
|
||||||
.WhereIF(request.Id.HasValue, x => x.Id != request.Id)
|
var existsSameCustomCode = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||||
.AnyAsync();
|
.Where(x => x.CustomCode == request.CustomCode)
|
||||||
|
.WhereIF(request.Id.HasValue, x => x.Id != request.Id)
|
||||||
|
.AnyAsync();
|
||||||
|
|
||||||
existsSameCustomCode.ThrowIfTrue($"自定义手工号[{request.CustomCode}]存在重复,请检查.");
|
existsSameCustomCode.ThrowIfTrue($"自定义手工号[{request.CustomCode}]存在重复,请检查.");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class MealSupplementRecordItemResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 餐补日期
|
/// 餐补日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class MealSupplementRecordResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 考勤日期
|
/// 考勤日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ public class BalancesController : ControllerBase
|
|||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[Authorize(Roles = "admin,tenant-admin")]
|
[Authorize(Roles = "admin,tenant-admin")]
|
||||||
[DataPermission]
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<Pagination<BalanceRecordResponse>> GetPageAsync([FromQuery] BalanceRecordPageRequest request)
|
public async Task<Pagination<BalanceRecordResponse>> GetPageAsync([FromQuery] BalanceRecordPageRequest request)
|
||||||
{
|
{
|
||||||
@@ -139,7 +138,6 @@ public class BalancesController : ControllerBase
|
|||||||
return await _balanceService.GetConsumeDeviceAsync(request);
|
return await _balanceService.GetConsumeDeviceAsync(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 海宁餐补数据写入
|
/// 海宁餐补数据写入
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class BalanceRecordDeviceResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属成本日期
|
/// 所属成本日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime CostDate { get; set; }
|
public DateTime CostDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class BalanceRecordResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属成本日期
|
/// 所属成本日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime CostDate { get; set; }
|
public DateTime CostDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class OrderBookingResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订餐日期
|
/// 订餐日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
//[JsonConverter(typeof(ToDateJsonConverter))]
|
[JsonConverter(typeof(ToDateJsonConverter))]
|
||||||
public DateTime BookingDate { get; set; }
|
public DateTime BookingDate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public class BalanceService : IBalanceService
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
//ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
|
|||||||
@@ -17,9 +17,8 @@ public class BusinessPlaceGroupEntity : SugarBaseEntity, ITenantId
|
|||||||
[SugarColumn(ColumnDescription = "名称")]
|
[SugarColumn(ColumnDescription = "名称")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[SugarColumn(ColumnDescription = "备注")]
|
[SugarColumn(ColumnDescription = "备注")]
|
||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
|
|
||||||
public string TenantId { get; set; }
|
public string TenantId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Kurisu.AspNetCore" Version="0.9.13" />
|
<PackageReference Include="Kurisu.AspNetCore" Version="0.9.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ public class DeviceTaskAssignmentsController : ControllerBase
|
|||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("page")]
|
[HttpGet("page")]
|
||||||
[DataPermission]
|
|
||||||
public async Task<Pagination<DeviceTaskAssignmentResponse>> GetPageAsync([FromQuery] DeviceTaskAssignmentRequest request)
|
public async Task<Pagination<DeviceTaskAssignmentResponse>> GetPageAsync([FromQuery] DeviceTaskAssignmentRequest request)
|
||||||
{
|
{
|
||||||
return await _deviceTaskAssignmentService.GetPageAsync(request);
|
return await _deviceTaskAssignmentService.GetPageAsync(request);
|
||||||
@@ -44,4 +43,4 @@ public class DeviceTaskAssignmentsController : ControllerBase
|
|||||||
{
|
{
|
||||||
await _deviceTaskAssignmentService.ResetAsync(request);
|
await _deviceTaskAssignmentService.ResetAsync(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user