Commit ef210c57 by ruyun.zhang

科室大屏绩效发放占比支持核算组别

parent af3f7dc9
using System.Collections.Generic;
using System.Linq;
using Dapper;
using Dapper;
using GraphQL.Types;
using Performance.Infrastructure;
using Performance.Repository;
using Performance.Services;
using System.Collections.Generic;
using System.Linq;
namespace Performance.Api
{
public class PerformanceQuery : ObjectGraphType
{
public PerformanceQuery(GraphQLService service)
public PerformanceQuery(GraphQLService service, ClaimService claimService, PerforUserRepository userRepository)
{
Field<ListGraphType<ReportDataType>>("info",
resolve: context =>
......@@ -57,7 +58,17 @@ public PerformanceQuery(GraphQLService service)
int reportId = context.Arguments.ContainsKey(QueryParams.reportId)
? ConvertHelper.To<int>(context.Arguments[QueryParams.reportId])
: 0;
var parameters = GetDynamicParameters(context.Arguments, QueryParams.hospitalId, QueryParams.year, QueryParams.month, QueryParams.accountingUnit, QueryParams.category, QueryParams.itemName);
var userId = claimService.GetUserId();
var userInfo = userRepository.GetUser(userId);
if (userInfo?.URole != null)
{
var unitTypes = UnitTypeUtil.GetMaps(userInfo?.URole.Type ?? 0);
if (unitTypes.Any())
parameters.Add("unittype", unitTypes);
}
return service.GetReportPerformance(reportId, parameters);
}
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment