Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
a63ba523
Commit
a63ba523
authored
Apr 09, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
8a4e754e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
200 additions
and
15 deletions
+200
-15
performance/Performance.Api/Controllers/AccountController.cs
+1
-1
performance/Performance.Api/Controllers/AllotController.cs
+21
-4
performance/Performance.Api/Controllers/AssessController.cs
+87
-0
performance/Performance.DtoModels/Request/AssessRequest.cs
+38
-0
performance/Performance.EntityModels/Entity/as_assess.cs
+6
-1
performance/Performance.Services/AllotService.cs
+19
-4
performance/Performance.Services/AssessService.cs
+20
-0
performance/Performance.Services/UserService.cs
+8
-5
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
a63ba523
...
@@ -107,7 +107,7 @@ public ApiResponse<List<UserResponse>> List([FromBody]ApiRequest request)
...
@@ -107,7 +107,7 @@ public ApiResponse<List<UserResponse>> List([FromBody]ApiRequest request)
public
ApiResponse
<
UserResponse
>
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
UserRequest
request
)
public
ApiResponse
<
UserResponse
>
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
UserRequest
request
)
{
{
var
userIdentity
=
_claim
.
At
(
request
.
Token
);
var
userIdentity
=
_claim
.
At
(
request
.
Token
);
var
user
=
_userService
.
Insert
(
request
,
userIdentity
.
UserID
,
userIdentity
.
IsAgainAdmin
);
var
user
=
_userService
.
Insert
(
request
,
userIdentity
.
UserID
);
user
.
Role
=
request
.
Role
;
user
.
Role
=
request
.
Role
;
return
new
ApiResponse
<
UserResponse
>(
ResponseType
.
OK
,
user
);
return
new
ApiResponse
<
UserResponse
>(
ResponseType
.
OK
,
user
);
}
}
...
...
performance/Performance.Api/Controllers/AllotController.cs
View file @
a63ba523
...
@@ -178,19 +178,36 @@ public ApiResponse Pigeonhole([CustomizeValidator(RuleSet = "Delete"), FromBody]
...
@@ -178,19 +178,36 @@ public ApiResponse Pigeonhole([CustomizeValidator(RuleSet = "Delete"), FromBody]
}
}
/// <summary>
/// <summary>
/// 检索数据是否合格
///
归档时
检索数据是否合格
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"check
data
"
)]
[
Route
(
"check
record
"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Check
Data
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
public
ApiResponse
Check
Record
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在或没有上传数据文件"
);
throw
new
PerformanceException
(
"当前绩效记录不存在或没有上传数据文件"
);
var
list
=
_allotService
.
CheckData
(
allot
);
var
list
=
_allotService
.
GetAgainAllotNotSucceed
(
allot
);
return
new
ApiResponse
(
ResponseType
.
OK
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
list
);
}
}
/// <summary>
/// 绩效校验结果
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"allotcheckresult"
)]
[
HttpPost
]
public
ApiResponse
AllotCheckResult
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
AllotRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
ID
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_allotService
.
AllotCheckResult
(
allot
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
}
}
}
performance/Performance.Api/Controllers/AssessController.cs
0 → 100644
View file @
a63ba523
using
FluentValidation.AspNetCore
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Caching.Memory
;
using
Microsoft.Extensions.Options
;
using
Newtonsoft.Json.Linq
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Services
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
{
[
Route
(
"api/[controller]"
)]
public
class
AssessController
:
Controller
{
private
ClaimService
claimService
;
private
AssessService
assessService
;
public
AssessController
(
ClaimService
claimService
,
AssessService
assessService
)
{
this
.
claimService
=
claimService
;
this
.
assessService
=
assessService
;
}
//新增考核类别
[
HttpPost
]
[
Route
(
"addassess"
)]
public
ApiResponse
AddAssess
([
CustomizeValidator
(
RuleSet
=
"Add"
),
FromBody
]
AssessRequest
request
)
{
assessService
.
AddAssess
(
request
.
AllotID
,
request
.
AssessName
);
throw
new
NotImplementedException
();
}
//修改考核类别
[
HttpPost
]
[
Route
(
"editassess"
)]
public
ApiResponse
EditAssess
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
AllotRequest
request
)
{
throw
new
NotImplementedException
();
}
//删除考核类别
[
HttpPost
]
[
Route
(
"delassess"
)]
public
ApiResponse
DelAssess
([
CustomizeValidator
(
RuleSet
=
"Del"
),
FromBody
]
AssessRequest
request
)
{
throw
new
NotImplementedException
();
}
//获取所有科室列表
[
HttpPost
]
[
Route
(
"departmentlist"
)]
public
ApiResponse
DepartmentList
()
{
throw
new
NotImplementedException
();
}
//设置科室考核分类
[
HttpPost
]
[
Route
(
"setassesstype"
)]
public
ApiResponse
SetAssessType
()
{
throw
new
NotImplementedException
();
}
//新增考核项
[
HttpPost
]
[
Route
(
"addcolumn"
)]
public
ApiResponse
AddColumn
()
{
throw
new
NotImplementedException
();
}
//删除考核项
[
HttpPost
]
[
Route
(
"delcolumn"
)]
public
ApiResponse
DelColumn
()
{
throw
new
NotImplementedException
();
}
}
}
performance/Performance.DtoModels/Request/AssessRequest.cs
0 → 100644
View file @
a63ba523
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
AssessRequest
{
public
int
AssessID
{
get
;
set
;
}
public
int
AllotID
{
get
;
set
;
}
public
string
AssessName
{
get
;
set
;
}
}
public
class
AssessRequestValidator
:
AbstractValidator
<
AssessRequest
>
{
public
AssessRequestValidator
()
{
RuleSet
(
"Del"
,
()
=>
{
RuleFor
(
t
=>
t
.
AssessID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
t
=>
t
.
AssessID
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
t
=>
t
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
t
=>
t
.
AssessName
).
NotNull
().
NotEmpty
();
});
RuleSet
(
"Add"
,
()
=>
{
RuleFor
(
t
=>
t
.
AllotID
).
NotNull
().
NotEmpty
();
RuleFor
(
t
=>
t
.
AssessName
).
NotNull
().
NotEmpty
();
});
}
}
}
performance/Performance.EntityModels/Entity/as_assess.cs
View file @
a63ba523
...
@@ -22,8 +22,13 @@ public class as_assess
...
@@ -22,8 +22,13 @@ public class as_assess
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 绩效ID
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// 考核类别
/// 考核类别
/// </summary>
/// </summary>
public
string
Assess
Typ
e
{
get
;
set
;
}
public
string
Assess
Nam
e
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/AllotService.cs
View file @
a63ba523
...
@@ -29,6 +29,7 @@ public class AllotService : IAutoInjection
...
@@ -29,6 +29,7 @@ public class AllotService : IAutoInjection
private
PerforPerallotRepository
_allotRepository
;
private
PerforPerallotRepository
_allotRepository
;
private
IEmailService
emailService
;
private
IEmailService
emailService
;
private
PerforPeragainallotRepository
_againallotRepository
;
private
PerforPeragainallotRepository
_againallotRepository
;
private
PerforLogcheckRepository
perforLogcheckRepository
;
public
AllotService
(
PerforPerallotRepository
allotRepository
,
public
AllotService
(
PerforPerallotRepository
allotRepository
,
BaiscNormService
baiscNormService
,
BaiscNormService
baiscNormService
,
...
@@ -40,7 +41,8 @@ public class AllotService : IAutoInjection
...
@@ -40,7 +41,8 @@ public class AllotService : IAutoInjection
PerforLogdbugRepository
logdbug
,
PerforLogdbugRepository
logdbug
,
IHostingEnvironment
evn
,
ILogger
<
AllotService
>
logger
,
IHostingEnvironment
evn
,
ILogger
<
AllotService
>
logger
,
IEmailService
emailService
,
IEmailService
emailService
,
PerforPeragainallotRepository
againallotRepository
)
PerforPeragainallotRepository
againallotRepository
,
PerforLogcheckRepository
perforLogcheckRepository
)
{
{
_allotRepository
=
allotRepository
;
_allotRepository
=
allotRepository
;
_againallotRepository
=
againallotRepository
;
_againallotRepository
=
againallotRepository
;
...
@@ -54,6 +56,7 @@ public class AllotService : IAutoInjection
...
@@ -54,6 +56,7 @@ public class AllotService : IAutoInjection
this
.
emailService
=
emailService
;
this
.
emailService
=
emailService
;
this
.
configService
=
configService
;
this
.
configService
=
configService
;
this
.
logdbug
=
logdbug
;
this
.
logdbug
=
logdbug
;
this
.
perforLogcheckRepository
=
perforLogcheckRepository
;
}
}
#
region
基础功能
#
region
基础功能
...
@@ -265,10 +268,9 @@ public void Pigeonhole(per_allot allot)
...
@@ -265,10 +268,9 @@ public void Pigeonhole(per_allot allot)
/// 检索数据是否合格
/// 检索数据是否合格
/// </summary>
/// </summary>
/// <param name="allot"></param>
/// <param name="allot"></param>
public
List
<
AgainAllotResponse
>
CheckData
(
per_allot
allot
)
public
List
<
AgainAllotResponse
>
GetAgainAllotNotSucceed
(
per_allot
allot
)
{
{
List
<
int
>
states
=
new
List
<
int
>()
{
0
,
1
,
2
,
4
};
var
again
=
_againallotRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
(!
t
.
States
.
HasValue
||
t
.
States
.
Value
!=
3
));
var
again
=
_againallotRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
states
.
Contains
(
t
.
States
.
Value
));
List
<
AgainAllotResponse
>
result
=
Mapper
.
Map
<
List
<
AgainAllotResponse
>>(
again
);
List
<
AgainAllotResponse
>
result
=
Mapper
.
Map
<
List
<
AgainAllotResponse
>>(
again
);
if
(
result
!=
null
&&
result
.
Count
>
0
)
if
(
result
!=
null
&&
result
.
Count
>
0
)
{
{
...
@@ -276,5 +278,18 @@ public List<AgainAllotResponse> CheckData(per_allot allot)
...
@@ -276,5 +278,18 @@ public List<AgainAllotResponse> CheckData(per_allot allot)
}
}
return
result
;
return
result
;
}
}
/// <summary>
/// 绩效校验结果
/// </summary>
/// <param name="allot"></param>
/// <returns></returns>
public
List
<
log_check
>
AllotCheckResult
(
per_allot
allot
)
{
var
list
=
perforLogcheckRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
list
!=
null
)
list
=
list
.
OrderBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
ID
).
ToList
();
return
list
;
}
}
}
}
}
performance/Performance.Services/AssessService.cs
0 → 100644
View file @
a63ba523
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.Services
{
public
class
AssessService
:
IAutoInjection
{
//priv
public
AssessService
()
{
}
public
void
AddAssess
(
int
allotID
,
string
assessName
)
{
throw
new
NotImplementedException
();
}
}
}
performance/Performance.Services/UserService.cs
View file @
a63ba523
...
@@ -112,8 +112,9 @@ public List<UserResponse> GetUserList(int userID)
...
@@ -112,8 +112,9 @@ public List<UserResponse> GetUserList(int userID)
/// 新增用户
/// 新增用户
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
public
UserResponse
Insert
(
UserRequest
request
,
int
userid
,
bool
isAgainAdmin
)
public
UserResponse
Insert
(
UserRequest
request
,
int
userid
)
{
{
var
isAgainAdmin
=
new
int
[]
{
application
.
DirectorRole
,
application
.
NurseRole
}.
Contains
(
request
.
Role
);
if
(
null
!=
_userRepository
.
GetEntity
(
t
=>
t
.
Login
==
request
.
Login
))
if
(
null
!=
_userRepository
.
GetEntity
(
t
=>
t
.
Login
==
request
.
Login
))
throw
new
PerformanceException
(
"登录名重复"
);
throw
new
PerformanceException
(
"登录名重复"
);
if
(
null
!=
_userRepository
.
GetEntity
(
t
=>
t
.
Mobile
==
request
.
Mobile
))
if
(
null
!=
_userRepository
.
GetEntity
(
t
=>
t
.
Mobile
==
request
.
Mobile
))
...
@@ -136,7 +137,7 @@ public UserResponse Insert(UserRequest request, int userid, bool isAgainAdmin)
...
@@ -136,7 +137,7 @@ public UserResponse Insert(UserRequest request, int userid, bool isAgainAdmin)
//添加用户角色关联关系
//添加用户角色关联关系
_userroleRepository
.
Add
(
new
sys_user_role
{
UserID
=
user
.
ID
,
RoleID
=
request
.
Role
});
_userroleRepository
.
Add
(
new
sys_user_role
{
UserID
=
user
.
ID
,
RoleID
=
request
.
Role
});
//添加用户医院
//添加用户医院
SetHospital
(
request
.
ID
,
request
.
HosIDArray
);
SetHospital
(
user
.
ID
,
request
.
HosIDArray
);
return
Mapper
.
Map
<
UserResponse
>(
user
);
return
Mapper
.
Map
<
UserResponse
>(
user
);
}
}
...
@@ -216,7 +217,7 @@ public UserResponse Update(UserRequest request, bool isAgainAdmin)
...
@@ -216,7 +217,7 @@ public UserResponse Update(UserRequest request, bool isAgainAdmin)
//添加用户角色关联关系
//添加用户角色关联关系
_userroleRepository
.
Add
(
new
sys_user_role
{
UserID
=
request
.
ID
,
RoleID
=
request
.
Role
});
_userroleRepository
.
Add
(
new
sys_user_role
{
UserID
=
request
.
ID
,
RoleID
=
request
.
Role
});
//添加用户医院
//添加用户医院
SetHospital
(
request
.
ID
,
request
.
HosIDArray
);
SetHospital
(
user
.
ID
,
request
.
HosIDArray
);
return
Mapper
.
Map
<
UserResponse
>(
user
);
return
Mapper
.
Map
<
UserResponse
>(
user
);
}
}
...
@@ -292,8 +293,10 @@ public List<TitleValue> Department(int hospitalID)
...
@@ -292,8 +293,10 @@ public List<TitleValue> Department(int hospitalID)
var
allotList
=
_perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalID
);
var
allotList
=
_perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalID
);
if
(
allotList
!=
null
)
if
(
allotList
!=
null
)
{
{
var
department
=
_employeeRepository
.
GetEntities
(
t
=>
t
.
Department
!=
""
&&
allotList
.
Select
(
s
=>
s
.
ID
).
ToList
().
Contains
(
t
.
AllotID
.
Value
));
var
idList
=
allotList
.
Select
(
s
=>
s
.
ID
).
ToList
();
return
department
.
Select
(
t
=>
new
TitleValue
{
Title
=
t
.
Department
,
Value
=
t
.
Department
}).
OrderBy
(
t
=>
t
.
Title
).
Distinct
().
ToList
();
var
department
=
_employeeRepository
.
GetEntities
(
t
=>
t
.
Department
!=
""
&&
idList
.
Contains
(
t
.
AllotID
.
Value
));
if
(
department
!=
null
&&
department
.
Count
>
0
)
return
department
.
Select
(
t
=>
t
.
Department
).
Distinct
().
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
OrderBy
(
t
=>
t
.
Title
).
ToList
();
}
}
return
new
List
<
TitleValue
>();
return
new
List
<
TitleValue
>();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment