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
863f9506
Commit
863f9506
authored
Dec 26, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效审核通过,绩效下发 增加人员和核算单元是否匹配判断
parent
e7ee7bcb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
16 deletions
+47
-16
performance/Performance.Api/Controllers/AllotController.cs
+14
-5
performance/Performance.Api/wwwroot/Performance.Api.xml
+1
-0
performance/Performance.DtoModels/CheckBase.cs
+19
-0
performance/Performance.Services/AllotService.cs
+13
-11
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
863f9506
...
@@ -465,6 +465,15 @@ public ApiResponse Issued([FromBody] AllotRequest request)
...
@@ -465,6 +465,15 @@ public ApiResponse Issued([FromBody] AllotRequest request)
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
res
=
_allotService
.
GetCheckBase
(
request
.
ID
);
string
error
=
""
;
if
(
res
.
CheckEmp
.
Body
?.
Any
()
!=
true
)
error
+=
"测算表人员信息与「人员字典」无法匹配,"
;
if
(
res
.
CheckDept
.
Body
?.
Any
()
!=
true
)
error
+=
"测算表核算单元与「核算单元及组别」信息无法匹配"
;
if
(!
string
.
IsNullOrEmpty
(
error
))
throw
new
PerformanceException
(
error
);
var
seconds
=
_resultComputeService
.
GetSeconds
(
allot
);
var
seconds
=
_resultComputeService
.
GetSeconds
(
allot
);
if
(
request
.
isIssued
==
1
)
if
(
request
.
isIssued
==
1
)
{
{
...
@@ -509,7 +518,7 @@ public ApiResponse Issued([FromBody] AllotRequest request)
...
@@ -509,7 +518,7 @@ public ApiResponse Issued([FromBody] AllotRequest request)
/// <returns></returns>
/// <returns></returns>
[
Route
(
"getCheckBase"
)]
[
Route
(
"getCheckBase"
)]
[
HttpGet
]
[
HttpGet
]
public
ApiResponse
GetCheckBase
([
FromQuery
]
int
allotId
)
public
ApiResponse
GetCheckBase
([
FromQuery
]
int
allotId
)
{
{
var
res
=
_allotService
.
GetCheckBase
(
allotId
);
var
res
=
_allotService
.
GetCheckBase
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
res
);
return
new
ApiResponse
(
ResponseType
.
OK
,
res
);
...
@@ -581,14 +590,14 @@ public IActionResult ReservedDownload([FromBody] ReservedRequest request)
...
@@ -581,14 +590,14 @@ public IActionResult ReservedDownload([FromBody] ReservedRequest request)
if
(
request
.
Source
==
1
)
if
(
request
.
Source
==
1
)
{
{
name
=
"预留金额(按人员字典)"
;
name
=
"预留金额(按人员字典)"
;
ignoreColumns
=
new
string
[]
{
"hospitalid"
,
"source"
,
"newunittype"
,
"newaccountingunit"
};
ignoreColumns
=
new
string
[]
{
"hospitalid"
,
"source"
,
"newunittype"
,
"newaccountingunit"
};
}
}
else
else
{
{
name
=
"预留金额(按发放科室)"
;
name
=
"预留金额(按发放科室)"
;
ignoreColumns
=
new
string
[]{
"hospitalid"
,
"newunittype"
,
"newaccountingunit"
};
ignoreColumns
=
new
string
[]
{
"hospitalid"
,
"newunittype"
,
"newaccountingunit"
};
}
}
var
filepath
=
_allotService
.
ExcelDownload
(
rows
,
name
,
excelDownloadHeads
,
ignoreColumns
);
var
filepath
=
_allotService
.
ExcelDownload
(
rows
,
name
,
excelDownloadHeads
,
ignoreColumns
);
var
memoryStream
=
new
MemoryStream
();
var
memoryStream
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
...
@@ -687,7 +696,7 @@ private void LogAllotAction(int allotId, string path, string actionName)
...
@@ -687,7 +696,7 @@ private void LogAllotAction(int allotId, string path, string actionName)
AllotId
=
allotId
,
AllotId
=
allotId
,
CreateDate
=
DateTime
.
Now
,
CreateDate
=
DateTime
.
Now
,
CreateUser
=
_claim
.
GetUserId
(),
CreateUser
=
_claim
.
GetUserId
(),
FilePath
=
path
??
""
,
FilePath
=
path
??
""
,
ActionName
=
actionName
ActionName
=
actionName
};
};
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
863f9506
...
@@ -244,6 +244,7 @@
...
@@ -244,6 +244,7 @@
<summary>
<summary>
查询CheckBase
查询CheckBase
</summary>
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.UpdateAllotShowFormula(Performance.DtoModels.AllotRequest)"
>
<member
name=
"M:Performance.Api.Controllers.AllotController.UpdateAllotShowFormula(Performance.DtoModels.AllotRequest)"
>
...
...
performance/Performance.DtoModels/CheckBase.cs
0 → 100644
View file @
863f9506
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Performance.DtoModels
{
public
class
EmpDeptCheckBase
{
public
CheckBase
CheckEmp
{
get
;
set
;
}
public
CheckBase
CheckDept
{
get
;
set
;
}
}
public
class
CheckBase
{
public
IEnumerable
<
dynamic
>
Body
{
get
;
set
;
}
public
IEnumerable
<
dynamic
>
Columns
{
get
;
set
;
}
}
}
performance/Performance.Services/AllotService.cs
View file @
863f9506
...
@@ -484,21 +484,23 @@ public void Generate(per_allot allot)
...
@@ -484,21 +484,23 @@ public void Generate(per_allot allot)
}
}
}
}
public
Dictionary
<
string
,
object
>
GetCheckBase
(
int
allotid
)
public
EmpDeptCheckBase
GetCheckBase
(
int
allotid
)
{
{
var
views
=
new
[]
{
"view_check_base_emp"
,
"view_check_base_dept"
};
var
empDeptCheckBase
=
new
EmpDeptCheckBase
()
var
names
=
new
[]
{
"CheckEmp"
,
"CheckDept"
};
var
dics
=
new
Dictionary
<
string
,
object
>();
for
(
int
i
=
0
;
i
<
views
.
Length
;
i
++)
{
{
var
dic
=
new
Dictionary
<
string
,
object
>
()
CheckEmp
=
new
CheckBase
()
{
{
{
"body"
,
_service
.
QueryView
(
views
[
i
],
allotid
)},
Body
=
_service
.
QueryView
(
"view_check_base_emp"
,
allotid
),
{
"columns"
,
_service
.
QueryTableStructure
(
views
[
i
])}
Columns
=
_service
.
QueryTableStructure
(
"view_check_base_emp"
)
},
CheckDept
=
new
CheckBase
()
{
Body
=
_service
.
QueryView
(
"view_check_base_dept"
,
allotid
),
Columns
=
_service
.
QueryTableStructure
(
"view_check_base_dept"
)
},
};
};
dics
.
Add
(
names
[
i
],
dic
);
}
return
empDeptCheckBase
;
return
dics
;
}
}
/// <summary>
/// <summary>
...
...
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