fix 修改营业点返回体
This commit is contained in:
@@ -10,8 +10,4 @@
|
||||
<PackageReference Include="Kurisu.RemoteCall" Version="0.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Response\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Kurisu.Core.Result;
|
||||
using Dlhis.Basic.Api.Response;
|
||||
using Kurisu.Core.Result;
|
||||
using Kurisu.RemoteCall.Attributes;
|
||||
|
||||
namespace Dlhis.Basic.Api;
|
||||
@@ -8,5 +9,5 @@ public interface IBusinessPlacePermissionsApi
|
||||
{
|
||||
[Auth]
|
||||
[Get("/api/businessplacepermissions/my")]
|
||||
Task<DefaultApiResult<List<Guid>>> GetMyBussinessPlacesAsync();
|
||||
Task<DefaultApiResult<GetMyResponse>> GetMyAsync();
|
||||
}
|
||||
|
||||
14
Src/Dlhis.Basic.Api/Response/BusinessPlaceDto.cs
Normal file
14
Src/Dlhis.Basic.Api/Response/BusinessPlaceDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dlhis.Basic.Api.Response
|
||||
{
|
||||
public class BusinessPlaceDto
|
||||
{
|
||||
public Guid Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
13
Src/Dlhis.Basic.Api/Response/GetMyResponse.cs
Normal file
13
Src/Dlhis.Basic.Api/Response/GetMyResponse.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dlhis.Basic.Api.Response
|
||||
{
|
||||
public class GetMyResponse
|
||||
{
|
||||
public List<BusinessPlaceDto> dtos { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class BusinessPlacePermissionsController
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("my")]
|
||||
public async Task<List<Guid>> GetMy()
|
||||
public async Task<GetMyResponse> GetMy()
|
||||
{
|
||||
return await _businessPlacePermissionsService.GetMyAsync();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Dlhis.Basic.BusinessPlace.Response
|
||||
{
|
||||
public class BusinessPlaceDto
|
||||
{
|
||||
public Guid Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
7
Src/Dlhis.Basic/BusinessPlace/Response/GetMyResponse.cs
Normal file
7
Src/Dlhis.Basic/BusinessPlace/Response/GetMyResponse.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Dlhis.Basic.BusinessPlace.Response
|
||||
{
|
||||
public class GetMyResponse
|
||||
{
|
||||
public List<BusinessPlaceDto> dtos { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,5 +10,5 @@ public interface IBusinessPlacePermissionsService : IScopeDependency
|
||||
|
||||
Task SaveBusinessPlacePermissionAsync(SaveBusinessPlacePermissionRequest request);
|
||||
|
||||
Task<List<Guid>> GetMyAsync();
|
||||
Task<GetMyResponse> GetMyAsync();
|
||||
}
|
||||
|
||||
@@ -24,15 +24,25 @@ public class BusinessPlacePermissionsService : IBusinessPlacePermissionsService
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<List<Guid>> GetMyAsync()
|
||||
public async Task<GetMyResponse> GetMyAsync()
|
||||
{
|
||||
var userId = _currentUser.GetIntSubjectId();
|
||||
|
||||
return await _dbContext.Queryable<BusinessPlaceManagerRelationshipEntity>()
|
||||
var guids = await _dbContext.Queryable<BusinessPlaceManagerRelationshipEntity>()
|
||||
.Where(x => x.ManagerUserId == userId)
|
||||
.Select(x => x.BusinessPlaceCode)
|
||||
.Distinct()
|
||||
.ToListAsync();
|
||||
|
||||
var dtos = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||
.Where(x => guids.Contains(x.Code))
|
||||
.Select<BusinessPlaceDto>()
|
||||
.ToListAsync();
|
||||
var myResponse = new GetMyResponse
|
||||
{
|
||||
dtos = dtos
|
||||
};
|
||||
return myResponse;
|
||||
}
|
||||
|
||||
public async Task SaveBusinessPlacePermissionAsync(SaveBusinessPlacePermissionRequest request)
|
||||
|
||||
@@ -9,6 +9,7 @@ using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Mapster;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Dlhis.Basic.Dishes.Services.Implements;
|
||||
|
||||
@@ -67,7 +68,7 @@ public class DishesService : IDishesService
|
||||
|
||||
// 读取配置中的时间
|
||||
var eightThirtyPmStr = _configuration["EightThirtyPM"];
|
||||
DateTime.TryParseExact(eightThirtyPmStr, "HH:mm:ss", null, System.Globalization.DateTimeStyles.None, out var dateTime);
|
||||
DateTime.TryParseExact(eightThirtyPmStr, "HH:mm:ss", null, DateTimeStyles.None, out var dateTime);
|
||||
|
||||
var payTypes = new List<BalanceRecordSourceEnumType> { BalanceRecordSourceEnumType.Cash };
|
||||
if (shift.TenantId == request.Factory)
|
||||
|
||||
Reference in New Issue
Block a user