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
d1815883
Commit
d1815883
authored
Jan 25, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消二次绩效handsontable相关接口调整,添加sheettyp枚举考核,考核相关数据抽取时模板copy,添加人员字典数据时更新其allotid,hospitalid
parent
7ffa0d8c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
13 deletions
+50
-13
performance/Performance.Api/Controllers/SecondAllotController.cs
+15
-8
performance/Performance.Api/wwwroot/Performance.Api.xml
+1
-1
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+6
-0
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExcelHelper.cs
+18
-1
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+8
-1
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+2
-2
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
d1815883
...
...
@@ -401,11 +401,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
[
HttpPost
]
public
ApiResponse
OtherList
([
FromBody
]
AgOtherRequest
request
)
{
//
var result = secondAllotService.OtherList(request.SecondId, claimService.GetUserId());
var
result
=
secondAllotDetails
.
GetOtherTempData
(
claimService
.
GetUserId
(),
request
.
SecondId
,
request
.
IsArchive
,
request
.
EmployeeSource
,
out
decimal
?
realAmount
);
var
result
=
secondAllotService
.
OtherList
(
request
.
SecondId
,
claimService
.
GetUserId
());
//
var result = secondAllotDetails.GetOtherTempData(claimService.GetUserId(), request.SecondId, request.IsArchive, request.EmployeeSource, out decimal? realAmount);
var
obj
=
new
{
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
re
alAmount
??
0
),
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
re
sult
?.
Sum
(
s
=>
s
.
RealAmount
)
??
0
),
body
=
result
,
};
return
new
ApiResponse
(
ResponseType
.
OK
,
obj
);
...
...
@@ -415,14 +415,21 @@ public ApiResponse OtherList([FromBody] AgOtherRequest request)
/// 二次绩效其他绩效保存
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/other/save/{secondId}"
)]
[
HttpPost
]
public
ApiResponse
OtherSave
(
int
secondId
,
[
FromBody
]
SaveCollectData
request
)
[
Route
(
"api/second/other/save"
)]
public
ApiResponse
OtherSave
([
FromBody
]
AgOtherRequest
request
)
{
secondAllotService
.
OtherSave
(
secondId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
var
result
=
secondAllotService
.
OtherSave
(
request
.
SecondId
,
request
.
Othersources
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
//[Route("api/second/other/save/{secondId}")]
//[HttpPost]
//public ApiResponse OtherSave(int secondId, [FromBody] SaveCollectData request)
//{
// secondAllotService.OtherSave(secondId, request);
// return new ApiResponse(ResponseType.OK);
//}
#
endregion
二次绩效其他绩效
/// <summary>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
d1815883
...
...
@@ -1238,7 +1238,7 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.OtherSave(
System.Int32,Performance.DtoModels.SaveCollectData
)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.OtherSave(
Performance.DtoModels.AgOtherRequest
)"
>
<summary>
二次绩效其他绩效保存
</summary>
...
...
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
d1815883
...
...
@@ -84,6 +84,12 @@ private void Employee(per_allot allot, sys_hospitalconfig config, string sql)
{
peremployeeRepository
.
RemoveRange
(
employees
.
ToArray
());
}
data
.
ToList
().
ForEach
(
t
=>
{
t
.
AllotId
=
allot
.
ID
;
t
.
HospitalId
=
allot
.
HospitalId
;
});
peremployeeRepository
.
AddRange
(
data
.
ToArray
());
}
catch
(
Exception
ex
)
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExcelHelper.cs
View file @
d1815883
...
...
@@ -87,6 +87,7 @@ public static void SetCellValue<T>(this ICell cell, object value, T defaultValue
cell
.
SetCellValue
(
""
);
}
}
public
static
void
SetValue
(
this
ISheet
sheet
,
int
row
,
int
column
,
object
value
)
{
var
icell
=
sheet
.
GetOrCreate
(
row
).
GetOrCreate
(
column
);
...
...
@@ -97,6 +98,7 @@ public static void SetValue(this ISheet sheet, int row, int column, object value
case
string
reg
when
Regex
.
IsMatch
(
reg
,
@"^[+-]?\d*[.]?\d*$"
):
value
=
ConvertHelper
.
To
<
double
>(
value
);
break
;
case
string
reg
when
Regex
.
IsMatch
(
reg
,
@"^[+-]?\d*$"
):
value
=
ConvertHelper
.
To
<
int
>(
value
);
break
;
...
...
@@ -106,7 +108,6 @@ public static void SetValue(this ISheet sheet, int row, int column, object value
SetCellOValue
(
icell
,
value
);
}
public
static
void
SetCellOValue
(
this
ICell
cell
,
object
value
)
{
if
(
cell
==
null
)
return
;
...
...
@@ -269,5 +270,21 @@ public static List<string> GetCellValues(this IRow row)
return
pairs
;
}
/// <summary>
/// 实时更新公式的结果
/// </summary>
/// <param name="workbook"></param>
public
static
void
EvaluateAll
(
this
IWorkbook
workbook
)
{
try
{
workbook
.
GetCreationHelper
().
CreateFormulaEvaluator
().
EvaluateAll
();
}
catch
{
return
;
}
}
}
}
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
d1815883
...
...
@@ -142,9 +142,16 @@ public static void ClearSheetTemplate(ISheet sheet, PerSheetPoint point, SheetTy
if
(!
new
SheetType
[]
{
SheetType
.
Workload
,
SheetType
.
OtherWorkload
}.
Contains
(
sheetType
))
{
if
(
sheet
.
NumMergedRegions
>
0
)
{
for
(
int
mergedIndex
=
sheet
.
NumMergedRegions
-
1
;
mergedIndex
>=
0
;
mergedIndex
--)
{
sheet
.
RemoveMergedRegion
(
mergedIndex
);
}
}
var
row
=
sheet
.
GetRow
(
0
);
if
(
row
!=
null
)
sheet
.
RemoveRow
(
row
);
sheet
.
ShiftRows
(
point
.
DataFirstRowNum
.
Value
,
sheet
.
LastRowNum
+
1
,
-
1
);
}
}
...
...
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
d1815883
...
...
@@ -90,10 +90,10 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
WriteDataToFile
(
workbook
,
allotId
,
dict
,
standData
,
groupName
,
isSingle
);
logService
.
ReturnTheLog
(
allotId
,
groupName
,
2
,
"提取完成"
,
$"绩效数据提取成功"
,
5
,
isSingle
);
workbook
.
GetCreationHelper
().
CreateFormulaEvaluator
().
EvaluateAll
();
//实时更新公式的结果
allot
.
IsExtracting
=
isSingle
?
2
:
0
;
allot
.
ExtractPath
=
extractFilePath
;
workbook
.
EvaluateAll
();
}
catch
(
Exception
ex
)
{
...
...
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