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
dd4fedc9
Commit
dd4fedc9
authored
Sep 25, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
其他工作量
parent
99b93088
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
21 deletions
+70
-21
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+3
-0
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+5
-0
performance/Performance.Services/DFExtractService.cs
+25
-0
performance/Performance.Services/ExConfigService.cs
+36
-20
performance/Performance.Services/LogManageService.cs
+1
-1
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
dd4fedc9
...
...
@@ -677,6 +677,9 @@
<member
name=
"F:Performance.DtoModels.SheetType.AccountScoreAverage"
>
<summary>
科室材料考核
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.OtherWorkload"
>
<summary>
其他工作量(不参与核算)
</summary>
</member>
<member
name=
"T:Performance.DtoModels.AccountUnitType"
>
<summary>
核算单元类型
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
dd4fedc9
...
...
@@ -119,6 +119,11 @@ public enum SheetType
/// <summary> 科室材料考核 </summary>
[
Description
(
"科室考核"
)]
AccountScoreAverage
=
25
,
/// <summary> 其他工作量(不参与核算) </summary>
[
Description
(
"其他工作量"
)]
OtherWorkload
=
26
,
}
/// <summary>
...
...
performance/Performance.Services/DFExtractService.cs
View file @
dd4fedc9
...
...
@@ -424,6 +424,7 @@ public string TemplateExecute(string email, sys_hospital hospital, List<sys_hosp
WriteExpend
(
sheet
,
sheetRead
,
modules
,
items
,
data
);
break
;
case
SheetType
.
Workload
:
case
SheetType
.
OtherWorkload
:
WriteWorkload
(
sheet
,
sheetRead
,
modules
,
items
,
data
);
break
;
//case SheetType.AccountBasic:
...
...
@@ -519,6 +520,7 @@ public string AlllotExecute(string email, sys_hospital hospital, List<sys_hospit
WriteExpend
(
sheet
,
sheetRead
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
Workload
:
case
SheetType
.
OtherWorkload
:
ClearData
(
sheet
,
3
,
3
);
WriteWorkload
(
sheet
,
sheetRead
,
modules
,
items
,
extracts
,
false
);
break
;
...
...
@@ -824,6 +826,29 @@ private void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook workbook
}
}
}
sheetIndex
=
0
;
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
OtherWorkload
)?.
OrderBy
(
t
=>
t
.
ModuleName
))
{
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
);
if
(
sheet
==
null
)
{
logger
.
LogInformation
(
$"CreateNotExistSheet:
{
module
.
ModuleName
}
"
);
string
key
=
"工作量"
;
if
(
module
.
ModuleName
.
Contains
(
key
))
{
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"3."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
if
(
sheetIndex
==
0
)
sheetIndex
=
item
.
Value
+
1
;
var
copysheet
=
workbook
.
GetSheet
(
item
.
Key
);
var
newSheet
=
copysheet
.
CopySheet
(
item
.
Key
+
Guid
.
NewGuid
().
ToString
(
"N"
),
true
);
logger
.
LogInformation
(
$"newSheet:
{
newSheet
.
SheetName
}
"
);
workbook
.
SetSheetOrder
(
newSheet
.
SheetName
,
sheetIndex
);
workbook
.
SetSheetName
(
sheetIndex
,
module
.
ModuleName
);
sheetIndex
++;
}
}
}
}
private
void
ClearData
(
ISheet
sheet
,
int
beginRowNum
,
int
beginCellNum
,
bool
isIncome
=
false
,
int
?
endCellNum
=
null
)
...
...
performance/Performance.Services/ExConfigService.cs
View file @
dd4fedc9
...
...
@@ -100,33 +100,49 @@ private void DefaultModules(int hospitalId)
public
ex_module
AddModule
(
ModModuleRequest
request
)
{
if
(
request
.
SheetType
!=
(
int
)
SheetType
.
Income
)
if
(
!
new
int
[]
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherWorkload
}.
Contains
(
request
.
SheetType
.
Value
)
)
throw
new
PerformanceException
(
"模块类型错误,只支持收入模板配置"
);
string
[]
array
=
new
string
[]
{
"开单收入"
,
"执行收入"
};
if
(
request
.
ModuleName
.
IndexOf
(
"开单收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"执行收入"
)
==
-
1
)
throw
new
PerformanceException
(
"模块名称规则错误"
);
//if (!Regex.IsMatch(request.ModuleName, @"^[\u4e00-\u9fa5]+$"))
// throw new PerformanceException("模块名称规则错误,请使用全中文命名");
string
addname
=
""
;
if
(
request
.
SheetType
==
(
int
)
SheetType
.
Income
)
{
string
[]
array
=
new
string
[]
{
"开单收入"
,
"执行收入"
};
if
(
request
.
ModuleName
.
IndexOf
(
"开单收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"执行收入"
)
==
-
1
)
throw
new
PerformanceException
(
"模块名称规则错误"
);
//if (!Regex.IsMatch(request.ModuleName, @"^[\u4e00-\u9fa5]+$"))
// throw new PerformanceException("模块名称规则错误,请使用全中文命名");
var
incomeList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
SheetType
==
(
int
)
SheetType
.
Income
);
var
incomeList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
SheetType
==
(
int
)
SheetType
.
Income
);
if
(
incomeList
.
Any
(
t
=>
Regex
.
Replace
(
t
.
ModuleName
,
@"\d"
,
""
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
)
==
request
.
ModuleName
))
throw
new
PerformanceException
(
"绩效模板已存在!"
);
if
(
incomeList
.
Any
(
t
=>
Regex
.
Replace
(
t
.
ModuleName
,
@"\d"
,
""
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
)
==
request
.
ModuleName
))
throw
new
PerformanceException
(
"绩效模板已存在!"
);
string
addname
=
""
;
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
string
name
=
request
.
ModuleName
.
Replace
(
"开单收入"
,
""
).
Replace
(
"执行收入"
,
""
);
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
if
(
exist
!=
null
&&
exist
.
Any
())
{
string
modulename
=
exist
.
OrderByDescending
(
t
=>
t
.
ModuleName
).
First
().
ModuleName
;
int
[]
sort
=
Array
.
ConvertAll
(
modulename
.
Split
(
' '
)[
0
].
Split
(
new
string
[]
{
"."
},
StringSplitOptions
.
RemoveEmptyEntries
),
t
=>
ConvertHelper
.
TryInt
(
t
));
sort
[
2
]
+=
1
;
addname
=
string
.
Join
(
"."
,
sort
)
+
" "
+
request
.
ModuleName
;
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
string
name
=
request
.
ModuleName
.
Replace
(
"开单收入"
,
""
).
Replace
(
"执行收入"
,
""
);
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
if
(
exist
!=
null
&&
exist
.
Any
())
{
string
modulename
=
exist
.
OrderByDescending
(
t
=>
t
.
ModuleName
).
First
().
ModuleName
;
int
[]
sort
=
Array
.
ConvertAll
(
modulename
.
Split
(
' '
)[
0
].
Split
(
new
string
[]
{
"."
},
StringSplitOptions
.
RemoveEmptyEntries
),
t
=>
ConvertHelper
.
TryInt
(
t
));
sort
[
2
]
+=
1
;
addname
=
string
.
Join
(
"."
,
sort
)
+
" "
+
request
.
ModuleName
;
}
else
{
string
modulename
=
moduleList
.
OrderByDescending
(
t
=>
t
.
ModuleName
).
First
().
ModuleName
;
int
[]
sort
=
Array
.
ConvertAll
(
modulename
.
Split
(
' '
)[
0
].
Split
(
new
string
[]
{
"."
},
StringSplitOptions
.
RemoveEmptyEntries
),
t
=>
ConvertHelper
.
TryInt
(
t
));
sort
[
1
]
+=
1
;
addname
=
$"
{
sort
[
0
]}
.
{
sort
[
1
]}
.1 "
+
request
.
ModuleName
;
}
}
else
else
if
(
request
.
SheetType
==
(
int
)
SheetType
.
OtherWorkload
)
{
var
incomeList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
SheetType
==
(
int
)
SheetType
.
OtherWorkload
);
if
(
incomeList
.
Any
(
t
=>
Regex
.
Replace
(
t
.
ModuleName
,
@"\d"
,
""
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
)
==
request
.
ModuleName
))
throw
new
PerformanceException
(
"绩效模板已存在!"
);
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"3."
)
!=
-
1
);
string
modulename
=
moduleList
.
OrderByDescending
(
t
=>
t
.
ModuleName
).
First
().
ModuleName
;
int
[]
sort
=
Array
.
ConvertAll
(
modulename
.
Split
(
' '
)[
0
].
Split
(
new
string
[]
{
"."
},
StringSplitOptions
.
RemoveEmptyEntries
),
t
=>
ConvertHelper
.
TryInt
(
t
));
sort
[
1
]
+=
1
;
...
...
performance/Performance.Services/LogManageService.cs
View file @
dd4fedc9
...
...
@@ -83,7 +83,7 @@ public void ReturnTheLog(int allotId, string groupName, int type, string tag, ob
var
http
=
url
.
ImportFile
+
$"/template/returnlog?type=
{
type
}
&tag=
{
tag
}
&message=
{
message
}
&level=
{
level
}
&groupName=
{
groupName
}
"
;
//logger.LogInformation("发送日志:" + http);
logdbug
.
Add
(
allotId
,
tag
,
message
.
ToString
(),
level
,
type
);
HttpHelper
.
HttpPost
(
http
);
//
HttpHelper.HttpPost(http);
}
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