Commit fd2e4918 by zry

init

parent fe46160f
This diff was suppressed by a .gitattributes entry.
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{CA39468E-CBB1-4FE6-A410-72B2AFCA315E}" Label="" LastModificationDate="1551158678" Name="绩效" Objects="201" Symbols="27" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{CA39468E-CBB1-4FE6-A410-72B2AFCA315E}" Label="" LastModificationDate="1551161171" Name="绩效" Objects="208" Symbols="27" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
......@@ -4304,9 +4304,9 @@ DESTINATION 0 新宋体,8,N</a:FontList>
</o:ReferenceSymbol>
<o:ReferenceSymbol Id="o30">
<a:CreationDate>1551150867</a:CreationDate>
<a:ModificationDate>1551150867</a:ModificationDate>
<a:Rect>((-10886,30364), (-9636,34439))</a:Rect>
<a:ListOfPoints>((-10261,34039),(-10261,30764))</a:ListOfPoints>
<a:ModificationDate>1551160865</a:ModificationDate>
<a:Rect>((-10623,30364), (-9373,34439))</a:Rect>
<a:ListOfPoints>((-9998,34039),(-9998,30764))</a:ListOfPoints>
<a:CornerStyle>1</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
<a:LineColor>12615680</a:LineColor>
......@@ -4703,9 +4703,9 @@ LABL 0 新宋体,8,N</a:FontList>
</o:TableSymbol>
<o:TableSymbol Id="o31">
<a:CreationDate>1551150722</a:CreationDate>
<a:ModificationDate>1551150740</a:ModificationDate>
<a:ModificationDate>1551160865</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((-15637,34039), (-6113,44740))</a:Rect>
<a:Rect>((-15636,34039), (-4360,44740))</a:Rect>
<a:AutoAdjustToText>0</a:AutoAdjustToText>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
......@@ -5003,7 +5003,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>Allot</a:Code>
<a:CreationDate>1550825705</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551150546</a:ModificationDate>
<a:ModificationDate>1551160278</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:Comment>医院绩效分配</a:Comment>
<a:TotalSavingCurrency/>
......@@ -5087,6 +5087,16 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Length>100</a:Length>
</o:Column>
<o:Column Id="o79">
<a:ObjectID>A350087F-B90E-4C6F-AE42-1FD7ACD49782</a:ObjectID>
<a:Name>上传时间</a:Name>
<a:Code>UploadDate</a:Code>
<a:CreationDate>1551160155</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551160509</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>datetime</a:DataType>
</o:Column>
<o:Column Id="o80">
<a:ObjectID>BCFC7804-7101-42D4-9B8F-06D66F92520A</a:ObjectID>
<a:Name>状态</a:Name>
<a:Code>States</a:Code>
......@@ -5098,7 +5108,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o80">
<o:Key Id="o81">
<a:ObjectID>D6E42B3A-64CB-4D9E-BD24-E873771D2556</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5112,7 +5122,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o80"/>
<o:Key Ref="o81"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o48">
......@@ -5126,7 +5136,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>绩效分配明细</a:Comment>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o81">
<o:Column Id="o82">
<a:ObjectID>C3A5D5C7-52A6-4345-A469-537C6520B9CB</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5138,7 +5148,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o82">
<o:Column Id="o83">
<a:ObjectID>154E45D4-8FD5-446F-9864-1DDA5BF7B12E</a:ObjectID>
<a:Name>医院绩效分配ID</a:Name>
<a:Code>HospitalAllotID</a:Code>
......@@ -5149,7 +5159,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>医院绩效分配ID</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o83">
<o:Column Id="o84">
<a:ObjectID>784D47D3-5D09-481A-AE17-7C258078ABA5</a:ObjectID>
<a:Name>成员名称</a:Name>
<a:Code>MemberName</a:Code>
......@@ -5161,7 +5171,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(10)</a:DataType>
<a:Length>10</a:Length>
</o:Column>
<o:Column Id="o84">
<o:Column Id="o85">
<a:ObjectID>3E620D10-FA48-499E-87D6-26A345C065DA</a:ObjectID>
<a:Name>分配金额</a:Name>
<a:Code>AllotFee</a:Code>
......@@ -5174,7 +5184,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o85">
<o:Key Id="o86">
<a:ObjectID>050BFF09-97F5-40A4-B95A-20A7F3954FA6</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5183,12 +5193,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1550828826</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o81"/>
<o:Column Ref="o82"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o85"/>
<o:Key Ref="o86"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o49">
......@@ -5202,7 +5212,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>excel单元格描述信息</a:Comment>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o86">
<o:Column Id="o87">
<a:ObjectID>1EA5802C-59E5-436C-A51B-8B779387559A</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5213,7 +5223,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o87">
<o:Column Id="o88">
<a:ObjectID>EB2B661D-C19F-41BB-ABEE-D156D2F89321</a:ObjectID>
<a:Name>Sheet页ID</a:Name>
<a:Code>SheetID</a:Code>
......@@ -5224,7 +5234,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>Sheet页ID</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o88">
<o:Column Id="o89">
<a:ObjectID>BC167B89-945E-4BDB-AFB9-E45C876D7109</a:ObjectID>
<a:Name>行坐标(0开始)</a:Name>
<a:Code>PointRow</a:Code>
......@@ -5235,7 +5245,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>行坐标(0开始)</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o89">
<o:Column Id="o90">
<a:ObjectID>390AACD7-BD10-4806-9C4D-95297EB24047</a:ObjectID>
<a:Name>列坐标(0开始)</a:Name>
<a:Code>PointColumn</a:Code>
......@@ -5246,7 +5256,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>列坐标(0开始)</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o90">
<o:Column Id="o91">
<a:ObjectID>30EC75FC-8A5D-4528-8FE0-F0CAFDFB1554</a:ObjectID>
<a:Name>合并行</a:Name>
<a:Code>MergeRow</a:Code>
......@@ -5257,7 +5267,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>合并行</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o91">
<o:Column Id="o92">
<a:ObjectID>B134F06D-FD19-4190-90AD-4E05691A315D</a:ObjectID>
<a:Name>合并列</a:Name>
<a:Code>MergeColumn</a:Code>
......@@ -5268,7 +5278,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>合并列</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o92">
<o:Column Id="o93">
<a:ObjectID>F2841DC1-B8EF-4824-9206-A2BCCF062EF1</a:ObjectID>
<a:Name>单元格内容</a:Name>
<a:Code>CellContent</a:Code>
......@@ -5280,7 +5290,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(100)</a:DataType>
<a:Length>100</a:Length>
</o:Column>
<o:Column Id="o93">
<o:Column Id="o94">
<a:ObjectID>FB9099E1-7779-47A1-BEE2-7040C83E6FC0</a:ObjectID>
<a:Name>父级单元格ID</a:Name>
<a:Code>ParentID</a:Code>
......@@ -5291,7 +5301,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>父级单元格ID</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o94">
<o:Column Id="o95">
<a:ObjectID>B4A28BED-E5EC-42F5-892E-EB1EE25333D4</a:ObjectID>
<a:Name>单元格等级</a:Name>
<a:Code>Level</a:Code>
......@@ -5304,7 +5314,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o95">
<o:Key Id="o96">
<a:ObjectID>2928AEFE-EA5E-4D73-8D24-BC12B34F3609</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5313,12 +5323,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1551152004</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o86"/>
<o:Column Ref="o87"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o95"/>
<o:Key Ref="o96"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o50">
......@@ -5332,7 +5342,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>绩效分配明细</a:Comment>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o96">
<o:Column Id="o97">
<a:ObjectID>94F0619F-F7F7-4B5C-A645-F17F9B547F3C</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5344,7 +5354,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o97">
<o:Column Id="o98">
<a:ObjectID>94A74A61-9CEE-4B63-9C89-151EF9E630CD</a:ObjectID>
<a:Name>医院绩效分配ID</a:Name>
<a:Code>HospitalAllotID</a:Code>
......@@ -5355,7 +5365,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>医院绩效分配ID</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o98">
<o:Column Id="o99">
<a:ObjectID>2B7357A2-DFAE-4D0B-98DC-71FDF8FC841F</a:ObjectID>
<a:Name>成员名称</a:Name>
<a:Code>MemberName</a:Code>
......@@ -5367,7 +5377,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(10)</a:DataType>
<a:Length>10</a:Length>
</o:Column>
<o:Column Id="o99">
<o:Column Id="o100">
<a:ObjectID>BC70C352-490A-4185-8CAD-0ABDAA378AB3</a:ObjectID>
<a:Name>分配金额</a:Name>
<a:Code>AllotFee</a:Code>
......@@ -5380,7 +5390,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o100">
<o:Key Id="o101">
<a:ObjectID>D72BCA7D-06E9-4CCB-83B1-3B2493899A5C</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5389,12 +5399,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1550830983</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o96"/>
<o:Column Ref="o97"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o100"/>
<o:Key Ref="o101"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o51">
......@@ -5407,7 +5417,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o101">
<o:Column Id="o102">
<a:ObjectID>8FBBBEE8-88BB-4C04-9F25-AD71F6BC7ED8</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5418,7 +5428,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o102">
<o:Column Id="o103">
<a:ObjectID>6253DC7E-ED11-45A0-9CBE-4890E46DF135</a:ObjectID>
<a:Name>SheetID</a:Name>
<a:Code>SheetID</a:Code>
......@@ -5428,7 +5438,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o103">
<o:Column Id="o104">
<a:ObjectID>97C3CBEF-8AC9-48E7-82ED-C31CC840D0FE</a:ObjectID>
<a:Name>人员名单</a:Name>
<a:Code>StaffName</a:Code>
......@@ -5439,7 +5449,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o104">
<o:Column Id="o105">
<a:ObjectID>BB0962BD-8943-4AB1-9156-77BE149706EB</a:ObjectID>
<a:Name>绩效核算方式</a:Name>
<a:Code>PerforType</a:Code>
......@@ -5449,7 +5459,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o105">
<o:Column Id="o106">
<a:ObjectID>8E2A5AB4-DA27-43EA-BADD-BE11A7EB1D6D</a:ObjectID>
<a:Name>群体</a:Name>
<a:Code>Department</a:Code>
......@@ -5460,7 +5470,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o106">
<o:Column Id="o107">
<a:ObjectID>33BF8F72-459B-4746-A99A-D243E396A35C</a:ObjectID>
<a:Name>职称</a:Name>
<a:Code>JobTitle</a:Code>
......@@ -5473,7 +5483,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o107">
<o:Key Id="o108">
<a:ObjectID>D15BACB4-D020-406E-92C4-FABE01EF23C2</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5482,12 +5492,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1551058553</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o101"/>
<o:Column Ref="o102"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o107"/>
<o:Key Ref="o108"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o52">
......@@ -5500,7 +5510,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o108">
<o:Column Id="o109">
<a:ObjectID>73382E78-C3CE-457F-A031-0F61D6B2A12D</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5511,7 +5521,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o109">
<o:Column Id="o110">
<a:ObjectID>47683352-1032-43B5-A6A2-F024D7C2581C</a:ObjectID>
<a:Name>真实姓名</a:Name>
<a:Code>RealName</a:Code>
......@@ -5522,7 +5532,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o110">
<o:Column Id="o111">
<a:ObjectID>CCA675C4-9CEC-4493-81E6-7F3C15A54A91</a:ObjectID>
<a:Name>登录名</a:Name>
<a:Code>Login</a:Code>
......@@ -5533,7 +5543,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o111">
<o:Column Id="o112">
<a:ObjectID>D3FA5A5B-3638-4A40-9496-7F1F7A0060A6</a:ObjectID>
<a:Name>密码</a:Name>
<a:Code>Password</a:Code>
......@@ -5544,7 +5554,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o112">
<o:Column Id="o113">
<a:ObjectID>0418B6FD-1AEB-4F59-BF83-734A77003E2A</a:ObjectID>
<a:Name>邮箱</a:Name>
<a:Code>Mail</a:Code>
......@@ -5555,7 +5565,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o113">
<o:Column Id="o114">
<a:ObjectID>F56E07D1-1242-403E-8BE4-A20C7B699681</a:ObjectID>
<a:Name>手机号</a:Name>
<a:Code>Mobile</a:Code>
......@@ -5566,7 +5576,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>varchar(20)</a:DataType>
<a:Length>20</a:Length>
</o:Column>
<o:Column Id="o114">
<o:Column Id="o115">
<a:ObjectID>1BB9A78A-E2CC-4FC5-B76C-07D7674EB97B</a:ObjectID>
<a:Name>用户状态</a:Name>
<a:Code>States</a:Code>
......@@ -5578,7 +5588,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o115">
<o:Key Id="o116">
<a:ObjectID>CE4E3133-19C2-48C9-9208-F69A7864CC3A</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5587,12 +5597,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1551073604</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o108"/>
<o:Column Ref="o109"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o115"/>
<o:Key Ref="o116"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o53">
......@@ -5605,7 +5615,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o116">
<o:Column Id="o117">
<a:ObjectID>0B22ADC1-DDD0-482C-9EFC-EFF043DDE0F6</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5616,7 +5626,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o117">
<o:Column Id="o118">
<a:ObjectID>E5F739B4-A4B4-4D9A-BCE4-5DDCA829C5C3</a:ObjectID>
<a:Name>UserID</a:Name>
<a:Code>UserID</a:Code>
......@@ -5626,7 +5636,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o118">
<o:Column Id="o119">
<a:ObjectID>FEF4312F-BA20-4254-8934-9665473A779B</a:ObjectID>
<a:Name>HospitalID</a:Name>
<a:Code>HospitalID</a:Code>
......@@ -5638,7 +5648,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o119">
<o:Key Id="o120">
<a:ObjectID>FEBF592E-0005-401E-A832-641B5588BD83</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5647,12 +5657,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1551074147</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o116"/>
<o:Column Ref="o117"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o119"/>
<o:Key Ref="o120"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o54">
......@@ -5666,7 +5676,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>科室绩效分配明细</a:Comment>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o120">
<o:Column Id="o121">
<a:ObjectID>2999FA9B-43FA-4F00-A1B8-6D9F816FB4E3</a:ObjectID>
<a:Name>科室ID</a:Name>
<a:Code>DepartmentID</a:Code>
......@@ -5677,7 +5687,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>行坐标(0开始)</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o121">
<o:Column Id="o122">
<a:ObjectID>226919C2-1B5E-4267-B6C2-F3AD4D7F21BF</a:ObjectID>
<a:Name>行坐标(0开始)</a:Name>
<a:Code>PointRow</a:Code>
......@@ -5687,7 +5697,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o122">
<o:Column Id="o123">
<a:ObjectID>0E367CB5-CFAE-4458-8361-0E99892E2F8D</a:ObjectID>
<a:Name>列坐标(0开始)</a:Name>
<a:Code>PointColumn</a:Code>
......@@ -5698,7 +5708,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>列坐标(0开始)</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o123">
<o:Column Id="o124">
<a:ObjectID>00976B2B-01CC-42F5-8DC0-A713BEC2E7FB</a:ObjectID>
<a:Name>合并行</a:Name>
<a:Code>MergeRow</a:Code>
......@@ -5709,7 +5719,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>合并行</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o124">
<o:Column Id="o125">
<a:ObjectID>867EF945-1528-4B7E-8D8C-A12C9E7AC0DE</a:ObjectID>
<a:Name>合并列</a:Name>
<a:Code>MergeColumn</a:Code>
......@@ -5720,7 +5730,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Comment>合并列</a:Comment>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o125">
<o:Column Id="o126">
<a:ObjectID>D9A1CF5E-1A0B-4C59-97F3-A8FA7BD27133</a:ObjectID>
<a:Name>单元格内容</a:Name>
<a:Code>CellContent</a:Code>
......@@ -5740,11 +5750,11 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Code>Im_Expend</a:Code>
<a:CreationDate>1551150722</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551152049</a:ModificationDate>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o126">
<o:Column Id="o127">
<a:ObjectID>27000451-C897-4AE3-911A-7F98048C1B0D</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5755,7 +5765,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o127">
<o:Column Id="o128">
<a:ObjectID>67207FC3-8FFF-48A3-B276-7AA1C984C871</a:ObjectID>
<a:Name>SheetID</a:Name>
<a:Code>SheetID</a:Code>
......@@ -5765,9 +5775,74 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:DataType>int</a:DataType>
</o:Column>
<o:Column Id="o129">
<a:ObjectID>FE192FD6-564F-4623-92A2-08ACD9CEC5EB</a:ObjectID>
<a:Name>核算单元</a:Name>
<a:Code>StandardName</a:Code>
<a:CreationDate>1551160699</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o130">
<a:ObjectID>B32870A9-AEE0-47E8-B622-0D7B783E2EB8</a:ObjectID>
<a:Name>科室名称</a:Name>
<a:Code>Department</a:Code>
<a:CreationDate>1551160699</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o131">
<a:ObjectID>899D3E4E-DA0F-47AD-A920-2A538B6003D1</a:ObjectID>
<a:Name>具体成本类型</a:Name>
<a:Code>TypeName</a:Code>
<a:CreationDate>1551160699</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o132">
<a:ObjectID>4F32232C-F2B5-438D-BEDD-A715B873234F</a:ObjectID>
<a:Name>成本一级分类</a:Name>
<a:Code>ParentType</a:Code>
<a:CreationDate>1551160699</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>varchar(50)</a:DataType>
<a:Length>50</a:Length>
</o:Column>
<o:Column Id="o133">
<a:ObjectID>9D0245C3-ECC4-4A34-8648-62CF400D3361</a:ObjectID>
<a:Name></a:Name>
<a:Code>CellValue</a:Code>
<a:CreationDate>1551160699</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>decimal</a:DataType>
</o:Column>
<o:Column Id="o134">
<a:ObjectID>67530784-2AA6-41F8-BFC4-EBA6588703CA</a:ObjectID>
<a:Name>注释</a:Name>
<a:Code>Annotation</a:Code>
<a:CreationDate>1551160699</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551161171</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<a:DataType>varchar(200)</a:DataType>
<a:Length>200</a:Length>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o128">
<o:Key Id="o135">
<a:ObjectID>C0E33D1D-386A-45D4-BD7E-160B14C7337A</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5776,12 +5851,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1551152049</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o126"/>
<o:Column Ref="o127"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o128"/>
<o:Key Ref="o135"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o56">
......@@ -5794,7 +5869,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o129">
<o:Column Id="o136">
<a:ObjectID>166E8EE2-42F3-49F0-81BC-E3B112039EF2</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5806,7 +5881,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:DataType>int</a:DataType>
<a:Column.Mandatory>1</a:Column.Mandatory>
</o:Column>
<o:Column Id="o130">
<o:Column Id="o137">
<a:ObjectID>EC0EBA18-C2AF-4C74-9D9F-F70FD5F34A52</a:ObjectID>
<a:Name>SheetID</a:Name>
<a:Code>SheetID</a:Code>
......@@ -5818,7 +5893,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Column>
</c:Columns>
<c:Keys>
<o:Key Id="o131">
<o:Key Id="o138">
<a:ObjectID>2D499ED9-2C54-4260-B6D1-F1C89FF05566</a:ObjectID>
<a:Name>Key_1</a:Name>
<a:Code>Key_1</a:Code>
......@@ -5827,12 +5902,12 @@ LABL 0 新宋体,8,N</a:FontList>
<a:ModificationDate>1551152062</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Key.Columns>
<o:Column Ref="o129"/>
<o:Column Ref="o136"/>
</c:Key.Columns>
</o:Key>
</c:Keys>
<c:PrimaryKey>
<o:Key Ref="o131"/>
<o:Key Ref="o138"/>
</c:PrimaryKey>
</o:Table>
<o:Table Id="o57">
......@@ -5845,7 +5920,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o132">
<o:Column Id="o139">
<a:ObjectID>BA463675-3797-4DE1-A9FA-0A9A6806B35D</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5868,7 +5943,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:Modifier>ry</a:Modifier>
<a:TotalSavingCurrency/>
<c:Columns>
<o:Column Id="o133">
<o:Column Id="o140">
<a:ObjectID>0BAEE902-EDBB-43F4-9BE1-305B3BF8A1F5</a:ObjectID>
<a:Name>ID</a:Name>
<a:Code>ID</a:Code>
......@@ -5904,7 +5979,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o71"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o134">
<o:ReferenceJoin Id="o141">
<a:ObjectID>5BDD4961-A16A-4F60-9EE7-A09702835F83</a:ObjectID>
<a:CreationDate>1550826241</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -5937,10 +6012,10 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Table Ref="o48"/>
</c:ChildTable>
<c:ParentKey>
<o:Key Ref="o80"/>
<o:Key Ref="o81"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o135">
<o:ReferenceJoin Id="o142">
<a:ObjectID>522FBDCB-2928-4F6F-9530-844D9F1D9325</a:ObjectID>
<a:CreationDate>1550828764</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -5950,7 +6025,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o72"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o82"/>
<o:Column Ref="o83"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -5973,10 +6048,10 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Table Ref="o50"/>
</c:ChildTable>
<c:ParentKey>
<o:Key Ref="o80"/>
<o:Key Ref="o81"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o136">
<o:ReferenceJoin Id="o143">
<a:ObjectID>8E6E733B-5BA2-40D9-A6C2-F369338361C9</a:ObjectID>
<a:CreationDate>1550831317</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -5986,7 +6061,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o72"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o96"/>
<o:Column Ref="o97"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6009,20 +6084,20 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Table Ref="o53"/>
</c:ChildTable>
<c:ParentKey>
<o:Key Ref="o115"/>
<o:Key Ref="o116"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o137">
<o:ReferenceJoin Id="o144">
<a:ObjectID>3CCBB4B2-EAB9-4013-9E10-595B44048AD6</a:ObjectID>
<a:CreationDate>1551074152</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551074204</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Object1>
<o:Column Ref="o108"/>
<o:Column Ref="o109"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o117"/>
<o:Column Ref="o118"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6048,7 +6123,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o71"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o138">
<o:ReferenceJoin Id="o145">
<a:ObjectID>81C29E42-E308-42EA-AA27-FA6567D96170</a:ObjectID>
<a:CreationDate>1551074153</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6058,7 +6133,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o64"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o118"/>
<o:Column Ref="o119"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6084,7 +6159,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o63"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o139">
<o:ReferenceJoin Id="o146">
<a:ObjectID>D67BB107-1B04-426A-98A6-5864A7F34A24</a:ObjectID>
<a:CreationDate>1551090095</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6094,7 +6169,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o59"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o87"/>
<o:Column Ref="o88"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6117,20 +6192,20 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Table Ref="o54"/>
</c:ChildTable>
<c:ParentKey>
<o:Key Ref="o85"/>
<o:Key Ref="o86"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o140">
<o:ReferenceJoin Id="o147">
<a:ObjectID>7FFA1932-1E25-42E1-B7A0-AFD577386BD0</a:ObjectID>
<a:CreationDate>1551091271</a:CreationDate>
<a:Creator>ry</a:Creator>
<a:ModificationDate>1551091282</a:ModificationDate>
<a:Modifier>ry</a:Modifier>
<c:Object1>
<o:Column Ref="o81"/>
<o:Column Ref="o82"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o120"/>
<o:Column Ref="o121"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6153,10 +6228,10 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Table Ref="o45"/>
</c:ChildTable>
<c:ParentKey>
<o:Key Ref="o80"/>
<o:Key Ref="o81"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o141">
<o:ReferenceJoin Id="o148">
<a:ObjectID>3FA09F6C-786E-4A6B-B968-1A107EFD19F7</a:ObjectID>
<a:CreationDate>1551150520</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6192,7 +6267,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o63"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o142">
<o:ReferenceJoin Id="o149">
<a:ObjectID>E0FA243F-87C4-4A73-ACCE-CB34A40E45FA</a:ObjectID>
<a:CreationDate>1551150867</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6202,7 +6277,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o59"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o127"/>
<o:Column Ref="o128"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6228,7 +6303,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o63"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o143">
<o:ReferenceJoin Id="o150">
<a:ObjectID>C67CA4B0-DB70-47CC-B852-042E43B68F1B</a:ObjectID>
<a:CreationDate>1551150868</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6238,7 +6313,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o59"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o130"/>
<o:Column Ref="o137"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6264,7 +6339,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o63"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o144">
<o:ReferenceJoin Id="o151">
<a:ObjectID>18DE5428-0072-4BA5-9871-BE500805D695</a:ObjectID>
<a:CreationDate>1551150872</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6274,7 +6349,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o59"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o132"/>
<o:Column Ref="o139"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6300,7 +6375,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o63"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o145">
<o:ReferenceJoin Id="o152">
<a:ObjectID>679663BE-3543-48EE-BD01-3B87FA0A06CE</a:ObjectID>
<a:CreationDate>1551150874</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6310,7 +6385,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o59"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o133"/>
<o:Column Ref="o140"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
......@@ -6336,7 +6411,7 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Key Ref="o63"/>
</c:ParentKey>
<c:Joins>
<o:ReferenceJoin Id="o146">
<o:ReferenceJoin Id="o153">
<a:ObjectID>CB0E5792-4CB3-4EC5-BA48-4378F3D1F804</a:ObjectID>
<a:CreationDate>1551150989</a:CreationDate>
<a:Creator>ry</a:Creator>
......@@ -6346,14 +6421,14 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Ref="o59"/>
</c:Object1>
<c:Object2>
<o:Column Ref="o101"/>
<o:Column Ref="o102"/>
</c:Object2>
</o:ReferenceJoin>
</c:Joins>
</o:Reference>
</c:References>
<c:DefaultGroups>
<o:Group Id="o147">
<o:Group Id="o154">
<a:ObjectID>822E8E80-3332-40DE-B9F6-7576C50A0A64</a:ObjectID>
<a:Name>PUBLIC</a:Name>
<a:Code>PUBLIC</a:Code>
......@@ -6364,7 +6439,7 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Group>
</c:DefaultGroups>
<c:TargetModels>
<o:TargetModel Id="o148">
<o:TargetModel Id="o155">
<a:ObjectID>9E4573A5-7E2D-4C69-AFAC-BF23E7FF9609</a:ObjectID>
<a:Name>MySQL 5.0</a:Name>
<a:Code>MYSQL50</a:Code>
......
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Performance.DtoModels;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class DefaultController : ControllerBase
{
ILogger<DefaultController> _logger;
PerExcelService _excelService;
UserService _userService;
public DefaultController(PerExcelService excelService,
UserService userService,
ILogger<DefaultController> logger)
{
_excelService = excelService;
_userService = userService;
_logger = logger;
}
[HttpGet]
public ActionResult<PerExcel> Get()
{
var sd = _userService.GetUser();
_logger.LogDebug("debug", "aaaaaa");
var excel = _excelService.Analyze(@"C:\Users\ry\Desktop\文件\测试.xlsx");
return excel;
}
}
}
\ No newline at end of file
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
// GET api/values
[HttpGet]
public ActionResult<IEnumerable<string>> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/values/5
[HttpGet("{id}")]
public ActionResult<string> Get(int id)
{
return "value";
}
// POST api/values
[HttpPost]
public void Post([FromBody] string value)
{
}
// PUT api/values/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}
// DELETE api/values/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="MySql.Data" Version="8.0.15" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.15" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="NLog" Version="4.5.11" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.4.0" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Performance.DtoModels\Performance.DtoModels.csproj" />
<ProjectReference Include="..\Performance.Services\Performance.Services.csproj" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Performance.Api
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5001",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Performance.Api": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"applicationUrl": "http://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
\ No newline at end of file
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using NLog;
using NLog.Extensions.Logging;
using NLog.Web;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Repository;
using Performance.Services;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
namespace Performance.Api
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
.AddJsonOptions(json =>
{
json.SerializerSettings.Converters.Add(new IsoDateTimeConverterContent() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" });
json.SerializerSettings.Formatting = Newtonsoft.Json.Formatting.Indented;
json.SerializerSettings.ContractResolver = new LowercaseContractResolver();
json.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Include;
json.SerializerSettings.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat;
json.SerializerSettings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc;
json.SerializerSettings.Culture = new CultureInfo("it-IT");
json.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
});
services.AddPerformanceService();
services.Configure<AppConnection>(Configuration.GetSection("AppConnection"));
services.AddOptions<AppConnection>("AppConnection");
var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>();
services.AddDbContext<PerformanceDbContext>(options =>
{
options.UseMySQL(connection.Value.PerformanceConnectionString);
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddNLog();
env.ConfigureNLog("nlog.config");
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc();
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*",
"AppConnection": {
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;"
}
}
<?xml version="1.0" encoding="utf-8"?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogLevel="info"
internalLogFile="c:\Temp\GrapefruitVuCore\internal-nlog.txt">
<!-- enable asp.net core and mongodb layout renderers -->
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
<add assembly="NLog.Mongo"/>
</extensions>
<!--internal-nlog:NLog启动及加载config信息-->
<!--nlog-all:所有日志记录信息-->
<!--nlog-own:自定义日志记录信息-->
<!-- the targets to write to -->
<targets>
<!-- write logs to file -->
<target xsi:type="File" name="allfile" fileName="${basedir}/Logs/${shortdate}/${level}.log"
layout="日志记录时间:${longdate}${newline}日志级别:${uppercase:${level}}${newline}日志来源:${logger}${newline}日志信息:${message}${newline}错误信息:${exception:format=tostring}${newline}==============================================================${newline}" />
<!-- another file log, only own logs. Uses some ASP.NET core renderers -->
<target xsi:type="File" name="ownFile-web" fileName="${basedir}/Logs/${shortdate}/${level}.log"
layout="日志记录时间:${longdate}${newline}日志级别:${uppercase:${level}}${newline}日志来源:${logger}${newline}日志信息:${message}${newline}错误信息:${exception:format=tostring}${newline}url: ${aspnet-request-url}${newline}action: ${aspnet-mvc-action}${newline}==============================================================${newline}" />
<!-- write log to mongodb-->
<target xsi:type="Mongo"
name="mongo" databaseName="nlog"
collectionName="Logs"
connectionString="mongodb://172.31.216.37:27017/nlog"
cappedCollectionSize="26214400">
<property name="LongDate" layout="${longdate}" bsonType="DateTime" />
<property name="Level" layout="${level}" />
<property name="Logger" layout="${logger}"/>
<property name="Message" layout="${message}" />
<property name="Exception" layout="${exception:format=tostring}" />
<property name="Url" layout="${aspnet-request-url}" />
<property name="Action" layout="${aspnet-mvc-action}" />
<property name="UserName" layout="${windows-identity}" />
</target>
</targets>
<!-- rules to map from logger name to target -->
<rules>
<!--All logs, including from Microsoft-->
<logger name="*" minlevel="Trace" writeTo="allfile" />
<!--Skip non-critical Microsoft logs and so log only own logs-->
<logger name="Microsoft.*" maxLevel="Info" final="true" />
<!-- BlackHole without writeTo -->
<logger name="*" minlevel="Trace" writeTo="ownFile-web" />
<!--Add logs to mongodb-->
<logger name="*" minlevel="Trace" writeTo="mongo"/>
</rules>
</nlog>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Performance.DtoModels\Performance.DtoModels.csproj" />
<ProjectReference Include="..\Performance.Services\Performance.Services.csproj" />
</ItemGroup>
</Project>
using Performance.Services;
using System;
namespace Performance.ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
PerSheetService perSheetService = new PerSheetService();
PerExcelService perExcelService = new PerExcelService(perSheetService);
var excel = perExcelService.Analyze(@"C:\Users\ry\Desktop\文件\测试.xlsx");
Console.ReadKey();
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Performance.EntityModels\Performance.EntityModels.csproj" />
</ItemGroup>
</Project>
using Microsoft.EntityFrameworkCore;
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Repository
{
public class PerformanceDbContext : DbContext
{
public DbSet<Sys_User> Sys_User { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels.AppSettings
{
public class AppConnection
{
public string PerformanceConnectionString { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels.AppSettings
{
public interface IAppSetting
{
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
namespace Performance.DtoModels
{
public enum ExcelVersion
{
xlsx,
xls
}
public enum SheetType
{
[Description("无法识别")]
Unidentifiable = 1,
[Description("医院人员")]
Employee = 2,
[Description("收入")]
Income = 3,
[Description("支出")]
Expend = 4,
[Description("加班")]
Overtime = 5,
[Description("工作量")]
Workload = 6,
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerData
{
public string StandardName { get; set; }
public string Department { get; set; }
public string TypeName { get; set; }
public decimal CellValue { get; set; }
public string Annotation { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerDataExpend : PerData
{
public string ParentType { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerDataWorkload : PerData
{
public string ParentType { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace Performance.DtoModels
{
public class PerExcel
{
public string Path { get; set; }
public ExcelVersion Version { get; set; }
public string FileName { get; set; }
public List<PerSheet> PerSheet { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.DtoModels
{
public class PerHeader
{
public int PointRow { get; set; }
public int PointCell { get; set; }
public bool IsMerge => MergeRow > 1 || MergeCell > 1;
public int MergeRow { get; set; }
public int MergeCell { get; set; }
public string CellName { get; set; }
public int Level { get; set; }
public bool IsHasChildren => Children != null && Children.Any();
public List<PerHeader> Children { get; set; }
public PerHeader Parent { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerSheet
{
/// <summary>
/// sheet名称
/// </summary>
public string SheetName { get; set; }
/// <summary>
/// sheet模板类型
/// </summary>
public SheetType SheetType { get; set; }
/// <summary>
/// sheet模块名称
/// </summary>
public string ModuleName { get; set; }
/// <summary>
/// sheet数据
/// </summary>
public List<PerData> PerData { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
/// <summary>
/// excel读取数据位置信息
/// </summary>
public class PerSheetPoint
{
/// <summary>
/// 列头开始行(0开始)
/// </summary>
public int? HeaderFirstRowNum { get; set; }
/// <summary>
/// 列头结束行(0开始)
/// </summary>
public int? HeaderLastRowNum { get; set; }
/// <summary>
/// 列头开始列(0开始)
/// </summary>
public int? HeaderFirstCellNum { get; set; }
/// <summary>
/// 数据开始行
/// </summary>
public int? DataFirstRowNum { get; set; }
/// <summary>
/// 系数行号
/// </summary>
public int? FactorRow { get; set; }
/// <summary>
/// 核算单元列
/// </summary>
public int? StandardCellNum { get; set; }
public int? DeptCellNum { get; set; }
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.EntityModels
{
public class Allot
{
public int ID { get; set; }
public int HospitalId { get; set; }
public int Year { get; set; }
public int Month { get; set; }
public decimal AllocationFee { get; set; }
public DateTime CreateDatetime { get; set; }
public string Path { get; set; }
public DateTime UploadDate { get; set; }
public int States { get; set; }
}
}
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.EntityModels
{
public class PerformanceDbContext : DbContext
{
public PerformanceDbContext(DbContextOptions options) : base(options)
{
}
public DbSet<Sys_User> Sys_User { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.EntityModels
{
public class Im_Expend
{
public int ID { get; set; }
public int SheetID { get; set; }
public string StandardName { get; set; }
public string Department { get; set; }
public string TypeName { get; set; }
public string ParentType { get; set; }
public decimal CellValue { get; set; }
public string Annotation { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.EntityModels
{
public class Im_SheetData
{
public int ID { get; set; }
public int AllotID { get; set; }
public string SheetName { get; set; }
public int SheetType { get; set; }
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.EntityModels
{
public class Sys_Hosptail
{
public int ID { get; set; }
public string HospitalName { get; set; }
public string ShortName { get; set; }
public string AreaCode { get; set; }
public int HospitalLevel { get; set; }
public int HospitalType { get; set; }
public int States { get; set; }
}
}
using System;
namespace Performance.EntityModels
{
public class Sys_User
{
public int ID { get; set; }
public string RealName { get; set; }
public string Login { get; set; }
public string Password { get; set; }
public string Mail { get; set; }
public string Mobile { get; set; }
public int States { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;
namespace Performance.Infrastructure
{
public class EnumItem
{
public string Name { get; set; }
public int Value { get; set; }
public string Description { get; set; }
}
/// <summary>
/// 枚举类型操作公共类。
/// </summary>
public static class EnumHelper
{
/// <summary>
/// 获取枚举所有成员名称。
/// </summary>
/// <typeparam name="T">枚举类型</typeparam>
public static string[] GetNames<T>()
{
return Enum.GetNames(typeof(T));
}
/// <summary>
/// 返回指定枚举类型的指定值的描述。
/// </summary>
/// <param name="t">枚举类型</param>
/// <param name="v">枚举值</param>
/// <returns></returns>
public static string GetDescription(Enum value)
{
try
{
Type type = value.GetType();
FieldInfo field = type.GetField(value.ToString());
DescriptionAttribute[] attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), false);
return (attributes.Length > 0) ? attributes[0].Description : string.Empty;
}
catch
{
return string.Empty;
}
}
/// <summary>
/// 获取疾病或药品的Type和Value
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public static List<EnumItem> GetItems<T>()
{
var result = new List<EnumItem>();
Type t = typeof(T);
Array arrays = Enum.GetValues(t);
for (int i = 0; i < arrays.LongLength; i++)
{
object item = arrays.GetValue(i);
FieldInfo fieldInfo = item.GetType().GetField(item.ToString());
object[] attribArray = fieldInfo.GetCustomAttributes(false);
if (attribArray == null || attribArray.Length == 0)
{
result.Add(new EnumItem { Name = item.ToString(), Value = Convert.ToInt32(item), Description = item.ToString() });
}
else
{
DescriptionAttribute attrib = (DescriptionAttribute)attribArray[0];
result.Add(new EnumItem { Name = item.ToString(), Value = Convert.ToInt32(item), Description = attrib.Description });
}
}
return result;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Infrastructure
{
public static partial class UtilExtensions
{
public static string RemoveLineBreak(this string text)
{
return text.Replace("\n", "");
}
public static string RemoveEnter(this string text)
{
return text.Replace("\r", "");
}
}
}
using System;
using System.IO;
using System.Text;
namespace Performance.Infrastructure
{
public static class FileHelper
{
#region 检测指定目录是否存在
/// <summary>
/// 检测指定目录是否存在
/// </summary>
/// <param name="directoryPath">目录的绝对路径</param>
public static bool IsExistDirectory(string directoryPath)
{
return Directory.Exists(directoryPath);
}
#endregion
#region 检测指定文件是否存在
/// <summary>
/// 检测指定文件是否存在,如果存在则返回true。
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static bool IsExistFile(string filePath)
{
return System.IO.File.Exists(filePath);
}
#endregion
#region 检测指定目录是否为空
/// <summary>
/// 检测指定目录是否为空
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
public static bool IsEmptyDirectory(string directoryPath)
{
try
{
//判断是否存在文件
string[] fileNames = GetFileNames(directoryPath);
if (fileNames.Length > 0)
{
return false;
}
//判断是否存在文件夹
string[] directoryNames = GetDirectories(directoryPath);
return directoryNames.Length <= 0;
}
catch
{
return false;
}
}
#endregion
#region 检测指定目录中是否存在指定的文件
/// <summary>
/// 检测指定目录中是否存在指定的文件,若要搜索子目录请使用重载方法.
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
/// <param name="searchPattern">模式字符串,"*"代表0或N个字符,"?"代表1个字符。
/// 范例:"Log*.xml"表示搜索所有以Log开头的Xml文件。</param>
public static bool Contains(string directoryPath, string searchPattern)
{
try
{
//获取指定的文件列表
string[] fileNames = GetFileNames(directoryPath, searchPattern, false);
//判断指定文件是否存在
return fileNames.Length != 0;
}
catch
{
return false;
}
}
/// <summary>
/// 检测指定目录中是否存在指定的文件
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
/// <param name="searchPattern">模式字符串,"*"代表0或N个字符,"?"代表1个字符。
/// 范例:"Log*.xml"表示搜索所有以Log开头的Xml文件。</param>
/// <param name="isSearchChild">是否搜索子目录</param>
public static bool Contains(string directoryPath, string searchPattern, bool isSearchChild)
{
try
{
//获取指定的文件列表
string[] fileNames = GetFileNames(directoryPath, searchPattern, true);
//判断指定文件是否存在
return fileNames.Length != 0;
}
catch
{
return false;
}
}
#endregion
#region 创建一个目录
/// <summary>
/// 创建一个目录
/// </summary>
/// <param name="directoryPath">目录的绝对路径</param>
public static void CreateDirectory(string directoryPath)
{
//如果目录不存在则创建该目录
if (!IsExistDirectory(directoryPath))
{
Directory.CreateDirectory(directoryPath);
}
}
#endregion
#region 创建一个文件
/// <summary>
/// 创建一个文件。
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static bool CreateFile(string filePath)
{
try
{
//如果文件不存在则创建该文件
if (!IsExistFile(filePath))
{
//创建一个FileInfo对象
FileInfo file = new FileInfo(filePath);
//创建文件
FileStream fs = file.Create();
//关闭文件流
fs.Close();
}
}
catch
{
return false;
}
return true;
}
/// <summary>
/// 创建一个文件,并将字节流写入文件。
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
/// <param name="buffer">二进制流数据</param>
public static bool CreateFile(string filePath, byte[] buffer)
{
try
{
//如果文件不存在则创建该文件
if (!IsExistFile(filePath))
{
//创建一个FileInfo对象
FileInfo file = new FileInfo(filePath);
//创建文件
FileStream fs = file.Create();
//写入二进制流
fs.Write(buffer, 0, buffer.Length);
//关闭文件流
fs.Close();
}
}
catch
{
return false;
}
return true;
}
#endregion
#region 获取文本文件的行数
/// <summary>
/// 获取文本文件的行数
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static int GetLineCount(string filePath)
{
//将文本文件的各行读到一个字符串数组中
string[] rows = System.IO.File.ReadAllLines(filePath);
//返回行数
return rows.Length;
}
#endregion
#region 获取一个文件的长度
/// <summary>
/// 获取一个文件的长度,单位为Byte
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static int GetFileSize(string filePath)
{
//创建一个文件对象
FileInfo fi = new FileInfo(filePath);
//获取文件的大小
return (int)fi.Length;
}
/// <summary>
/// 获取一个文件的长度,单位为KB
/// </summary>
/// <param name="filePath">文件的路径</param>
public static double GetFileSizeByKB(string filePath)
{
//创建一个文件对象
FileInfo fi = new FileInfo(filePath);
long size = fi.Length / 1024;
//获取文件的大小
return double.Parse(size.ToString());
}
/// <summary>
/// 获取一个文件的长度,单位为MB
/// </summary>
/// <param name="filePath">文件的路径</param>
public static double GetFileSizeByMB(string filePath)
{
//创建一个文件对象
FileInfo fi = new FileInfo(filePath);
long size = fi.Length / 1024 / 1024;
//获取文件的大小
return double.Parse(size.ToString());
}
#endregion
#region 获取指定目录中的文件列表
/// <summary>
/// 获取指定目录中所有文件列表
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
public static string[] GetFileNames(string directoryPath)
{
//如果目录不存在,则抛出异常
if (!IsExistDirectory(directoryPath))
{
throw new FileNotFoundException();
}
//获取文件列表
return Directory.GetFiles(directoryPath);
}
/// <summary>
/// 获取指定目录及子目录中所有文件列表
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
/// <param name="searchPattern">模式字符串,"*"代表0或N个字符,"?"代表1个字符。
/// 范例:"Log*.xml"表示搜索所有以Log开头的Xml文件。</param>
/// <param name="isSearchChild">是否搜索子目录</param>
public static string[] GetFileNames(string directoryPath, string searchPattern, bool isSearchChild)
{
//如果目录不存在,则抛出异常
if (!IsExistDirectory(directoryPath))
{
throw new FileNotFoundException();
}
try
{
return Directory.GetFiles(directoryPath, searchPattern, isSearchChild ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
}
catch
{
return null;
}
}
#endregion
#region 获取指定目录中的子目录列表
/// <summary>
/// 获取指定目录中所有子目录列表,若要搜索嵌套的子目录列表,请使用重载方法.
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
public static string[] GetDirectories(string directoryPath)
{
try
{
return Directory.GetDirectories(directoryPath);
}
catch
{
return null;
}
}
/// <summary>
/// 获取指定目录及子目录中所有子目录列表
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
/// <param name="searchPattern">模式字符串,"*"代表0或N个字符,"?"代表1个字符。
/// 范例:"Log*.xml"表示搜索所有以Log开头的Xml文件。</param>
/// <param name="isSearchChild">是否搜索子目录</param>
public static string[] GetDirectories(string directoryPath, string searchPattern, bool isSearchChild)
{
try
{
return Directory.GetDirectories(directoryPath, searchPattern, isSearchChild ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
}
catch
{
throw null;
}
}
#endregion
#region 向文本文件写入内容
/// <summary>
/// 向文本文件中写入内容
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
/// <param name="content">写入的内容</param>
public static void WriteText(string filePath, string content)
{
//向文件写入内容
System.IO.File.WriteAllText(filePath, content);
}
#endregion
#region 向文本文件的尾部追加内容
/// <summary>
/// 向文本文件的尾部追加内容
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
/// <param name="content">写入的内容</param>
public static void AppendText(string filePath, string content)
{
System.IO.File.AppendAllText(filePath, content);
}
#endregion
#region 将现有文件的内容复制到新文件中
/// <summary>
/// 将源文件的内容复制到目标文件中
/// </summary>
/// <param name="sourceFilePath">源文件的绝对路径</param>
/// <param name="destFilePath">目标文件的绝对路径</param>
public static void Copy(string sourceFilePath, string destFilePath)
{
System.IO.File.Copy(sourceFilePath, destFilePath, true);
}
#endregion
#region 将文件移动到指定目录
/// <summary>
/// 将文件移动到指定目录
/// </summary>
/// <param name="sourceFilePath">需要移动的源文件的绝对路径</param>
/// <param name="descDirectoryPath">移动到的目录的绝对路径</param>
public static void Move(string sourceFilePath, string descDirectoryPath)
{
//获取源文件的名称
string sourceFileName = GetFileName(sourceFilePath);
if (IsExistDirectory(descDirectoryPath))
{
//如果目标中存在同名文件,则删除
if (IsExistFile(descDirectoryPath + "\\" + sourceFileName))
{
DeleteFile(descDirectoryPath + "\\" + sourceFileName);
}
//将文件移动到指定目录
System.IO.File.Move(sourceFilePath, descDirectoryPath + "\\" + sourceFileName);
}
}
#endregion
#region 将流读取到缓冲区中
/// <summary>
/// 将流读取到缓冲区中
/// </summary>
/// <param name="stream">原始流</param>
public static byte[] StreamToBytes(Stream stream)
{
try
{
//创建缓冲区
byte[] buffer = new byte[stream.Length];
//读取流
stream.Read(buffer, 0, int.Parse(stream.Length.ToString()));
//返回流
return buffer;
}
catch
{
return null;
}
finally
{
//关闭流
stream.Close();
}
}
#endregion
#region 将文件读取到缓冲区中
/// <summary>
/// 将文件读取到缓冲区中
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static byte[] FileToBytes(string filePath)
{
//获取文件的大小
int fileSize = GetFileSize(filePath);
//创建一个临时缓冲区
byte[] buffer = new byte[fileSize];
//创建一个文件流
FileInfo fi = new FileInfo(filePath);
FileStream fs = fi.Open(FileMode.Open);
try
{
//将文件流读入缓冲区
fs.Read(buffer, 0, fileSize);
return buffer;
}
catch
{
return null;
}
finally
{
//关闭文件流
fs.Close();
}
}
#endregion
#region 将文件读取到字符串中
/// <summary>
/// 将文件读取到字符串中
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static string FileToString(string filePath)
{
return FileToString(filePath, Encoding.Default);
}
/// <summary>
/// 将文件读取到字符串中
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
/// <param name="encoding">字符编码</param>
public static string FileToString(string filePath, Encoding encoding)
{
//创建流读取器
StreamReader reader = new StreamReader(filePath, encoding);
try
{
//读取流
return reader.ReadToEnd();
}
catch
{
return string.Empty;
}
finally
{
//关闭流读取器
reader.Close();
}
}
#endregion
#region 从文件的绝对路径中获取文件名( 包含扩展名 )
/// <summary>
/// 从文件的绝对路径中获取文件名( 包含扩展名 )
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static string GetFileName(string filePath)
{
//获取文件的名称
FileInfo fi = new FileInfo(filePath);
return fi.Name;
}
#endregion
#region 从文件的绝对路径中获取文件名( 不包含扩展名 )
/// <summary>
/// 从文件的绝对路径中获取文件名( 不包含扩展名 )
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static string GetFileNameNoExtension(string filePath)
{
//获取文件的名称
FileInfo fi = new FileInfo(filePath);
return fi.Name.Split('.')[0];
}
#endregion
#region 从文件的绝对路径中获取扩展名
/// <summary>
/// 从文件的绝对路径中获取扩展名
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static string GetExtension(string filePath)
{
//获取文件的名称
FileInfo fi = new FileInfo(filePath);
return fi.Extension;
}
#endregion
#region 清空指定目录
/// <summary>
/// 清空指定目录下所有文件及子目录,但该目录依然保存.
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
public static void ClearDirectory(string directoryPath)
{
if (IsExistDirectory(directoryPath))
{
//删除目录中所有的文件
string[] fileNames = GetFileNames(directoryPath);
foreach (string t in fileNames)
{
DeleteFile(t);
}
//删除目录中所有的子目录
string[] directoryNames = GetDirectories(directoryPath);
foreach (string t in directoryNames)
{
DeleteDirectory(t);
}
}
}
#endregion
#region 清空文件内容
/// <summary>
/// 清空文件内容
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static void ClearFile(string filePath)
{
//删除文件
System.IO.File.Delete(filePath);
//重新创建该文件
CreateFile(filePath);
}
#endregion
#region 删除指定文件
/// <summary>
/// 删除指定文件
/// </summary>
/// <param name="filePath">文件的绝对路径</param>
public static void DeleteFile(string filePath)
{
if (IsExistFile(filePath))
{
System.IO.File.Delete(filePath);
}
}
#endregion
#region 删除指定目录
/// <summary>
/// 删除指定目录及其所有子目录
/// </summary>
/// <param name="directoryPath">指定目录的绝对路径</param>
public static void DeleteDirectory(string directoryPath)
{
if (IsExistDirectory(directoryPath))
{
Directory.Delete(directoryPath, true);
}
}
#endregion
}
}
\ No newline at end of file
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Infrastructure
{
public class LowercaseContractResolver : Newtonsoft.Json.Serialization.DefaultContractResolver
{
protected override string ResolvePropertyName(string propertyName)
{
return propertyName.ToLower();
}
}
public class IsoDateTimeConverterContent : IsoDateTimeConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value is DateTime)
{
DateTime dateTime = (DateTime)value;
if (dateTime == default(DateTime)
|| dateTime == DateTime.MinValue
|| dateTime.ToString("yyyy-MM-dd") == "1970-01-01"
|| dateTime.ToString("yyyy-MM-dd") == "1900-01-01")
{
writer.WriteValue("");
return;
}
}
base.WriteJson(writer, value, serializer);
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
return base.ReadJson(reader, objectType, existingValue, serializer);
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Performance.Infrastructure
{
public static class ReflectionHelper
{
/// <summary>
/// 获取实现了接口的所有实例
/// </summary>
/// <typeparam name="TInterface">接口类型</typeparam>
/// <param name="assembly">在该程序集中查找</param>
public static List<TInterface> GetInstances<TInterface>(Assembly assembly)
{
var typeInterface = typeof(TInterface);
return assembly.GetTypes()
.Where(t => typeInterface.GetTypeInfo().IsAssignableFrom(t) && t != typeInterface && t.GetTypeInfo().IsAbstract == false)
.Select(t => (TInterface)Activator.CreateInstance(t)).ToList();
}
/// <summary>
/// 获取实现了接口的类型
/// </summary>
/// <typeparam name="TInterface">接口类型</typeparam>
/// <param name="assembly">在该程序集中查找</param>
public static List<Type> GetClassType<TInterface>(Assembly assembly)
{
var typeInterface = typeof(TInterface);
return assembly.GetTypes()
.Where(t => typeInterface.GetTypeInfo().IsAssignableFrom(t) && t != typeInterface && t.GetTypeInfo().IsAbstract == false).ToList(); ;
}
}
}
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace Performance.Repository
{
public abstract class BaseRepository<TEntity>
where TEntity : class, new()
{
private DbContext context;
public BaseRepository(DbContext context)
{
this.context = context;
}
public bool Add(TEntity entity)
{
context.Set<TEntity>().Add(entity);
return context.SaveChanges() > 0;
}
public async Task<bool> AddAsync(TEntity entity)
{
await context.Set<TEntity>().AddAsync(entity);
return await context.SaveChangesAsync() > 0;
}
public bool AddRange(params TEntity[] entities)
{
context.Set<TEntity>().AddRange(entities);
return context.SaveChanges() > 0;
}
public async Task<bool> AddRangeAsync(params TEntity[] entities)
{
await context.Set<TEntity>().AddRangeAsync(entities);
return await context.SaveChangesAsync() > 0;
}
public async Task<bool> Delete(TEntity entity)
{
context.Set<TEntity>().Remove(entity);
return await context.SaveChangesAsync() > 0;
}
public async Task<bool> Update(TEntity entity)
{
context.Set<TEntity>().Update(entity);
return await context.SaveChangesAsync() > 0;
}
public IEnumerable<TEntity> GetEntities()
{
return context.Set<TEntity>();
}
public IEnumerable<TEntity> GetEntities(Expression<Func<TEntity, bool>> exp)
{
return CompileQuery(exp);
}
public IEnumerable<TEntity> GetEntitiesForPaging(int Page, int pageSize, Expression<Func<TEntity, bool>> exp)
{
return CompileQuery(exp).Skip((Page - 1) * pageSize).Take(pageSize);
}
public TEntity GetEntity(Expression<Func<TEntity, bool>> exp)
{
return CompileQuerySingle(exp);
}
private IEnumerable<TEntity> CompileQuery(Expression<Func<TEntity, bool>> exp)
{
var func = EF.CompileQuery((DbContext context, Expression<Func<TEntity, bool>> exps) => context.Set<TEntity>().Where(exp));
return func(context, exp);
}
private TEntity CompileQuerySingle(Expression<Func<TEntity, bool>> exp)
{
var func = EF.CompileQuery((DbContext context, Expression<Func<TEntity, bool>> exps) => context.Set<TEntity>().FirstOrDefault(exp));
return func(context, exp);
}
}
}
using Microsoft.EntityFrameworkCore;
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Repository
{
public class PerforRepository<TEntity> : BaseRepository<TEntity> where TEntity : class, new()
{
public PerforRepository(PerformanceDbContext context) : base(context)
{
}
}
}
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Repository
{
public class PerforUserRepository : PerforRepository<Sys_User>
{
public PerforUserRepository(PerformanceDbContext context) : base(context)
{
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="MySql.Data" Version="8.0.15" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.15" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Performance.EntityModels\Performance.EntityModels.csproj" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
public interface IAutoInjection
{
}
}
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using Performance.DtoModels;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.IO;
namespace Performance.Services
{
public class PerExcelService : IAutoInjection
{
private PerSheetService _service;
public PerExcelService(PerSheetService service)
{
_service = service;
}
public PerExcel Analyze(string path)
{
PerExcel excel = new PerExcel
{
Path = path,
FileName = FileHelper.GetFileNameNoExtension(path),
Version = FileHelper.GetExtension(path) == ".xlsx" ? ExcelVersion.xlsx : ExcelVersion.xls,
PerSheet = new List<PerSheet>()
};
using (FileStream fs = new FileStream(path, FileMode.Open))
{
IWorkbook workbook = (excel.Version == ExcelVersion.xlsx)
? (IWorkbook)(new XSSFWorkbook(fs))
: (IWorkbook)(new HSSFWorkbook(fs));
for (int i = 0; i < workbook.NumberOfSheets; i++)
{
var sheet = workbook.GetSheetAt(i);
var st = _service.Sheet(sheet);
excel.PerSheet.Add(st);
}
return excel;
}
}
}
}
using NPOI.SS.UserModel;
using Performance.DtoModels;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class PerHeaderService : IAutoInjection
{
/// <summary>
/// excel列头转换为矩阵
/// </summary>
/// <param name="sheet"></param>
/// <param name="point"></param>
/// <returns></returns>
private List<List<int>> ConvertToMatrix(ISheet sheet, PerSheetPoint point)
{
point.HeaderFirstRowNum = point.HeaderFirstRowNum.HasValue ? point.HeaderFirstRowNum : sheet.FirstRowNum;
point.HeaderLastRowNum = point.HeaderLastRowNum.HasValue ? point.HeaderLastRowNum : sheet.LastRowNum;
List<List<int>> matrix = new List<List<int>>();
for (int r = point.HeaderFirstRowNum.Value; r < point.HeaderLastRowNum + 1; r++)
{
List<int> cell = new List<int>();
var row = sheet.GetRow(r);
point.HeaderFirstCellNum = point.HeaderFirstCellNum.HasValue ? point.HeaderFirstCellNum : row.FirstCellNum;
for (int c = point.HeaderFirstCellNum.Value; c < row.LastCellNum; c++)
{
cell.Add(string.IsNullOrEmpty(row.GetCell(c)?.ToString()) ? 0 : 1);
}
matrix.Add(cell);
}
return matrix;
}
/// <summary>
/// 递归 获得具有层级关系的列头
/// </summary>
/// <param name="cells"></param>
/// <param name="parentCell"></param>
/// <param name="pointRow"></param>
/// <param name="level"></param>
/// <returns></returns>
private List<PerHeader> RecursionFill(List<PerHeader> cells, PerHeader parentCell, int pointRow, int level)
{
if (cells == null || !cells.Any())
return null;
List<PerHeader> sheetHeaders = new List<PerHeader>();
var groupData = cells.GroupBy(t => t.PointRow);
//获取起始行号
if (pointRow <= 0)
{
pointRow = groupData.Min(t => t.Key);
level = 0;
}
IEnumerable<PerHeader> child = cells.Where(t => t.PointRow == pointRow);
//根据合并列的坐标及合并单元格数量,查找子集列头
if (parentCell != null)
child = child.Where(t => t.PointCell >= parentCell.PointCell && (t.PointCell + t.MergeCell - 1) <= (parentCell.PointCell + parentCell.MergeCell - 1));
foreach (var headerCell in child)
{
headerCell.Level = level;
headerCell.Parent = parentCell;
if (groupData.Any(t => t.Key > pointRow))
{
int nextpoint = groupData.Where(t => t.Key > pointRow).Min(t => t.Key);
headerCell.Children = RecursionFill(cells, headerCell, nextpoint, level + 1);
}
sheetHeaders.Add(headerCell);
}
return sheetHeaders;
}
/// <summary>
/// 读取excel列头
/// </summary>
/// <param name="sheet"></param>
/// <param name="point"></param>
/// <returns></returns>
public List<PerHeader> GetPerHeader(ISheet sheet, PerSheetPoint point)
{
List<List<int>> matrix = ConvertToMatrix(sheet, point);
var sheetHeaders = ReadHeadMatrix(sheet, point, matrix);
var result = RecursionFill(sheetHeaders, null, 0, 0);
return result;
}
/// <summary>
/// 读取excel层级最低列头
/// </summary>
/// <param name="sheet"></param>
/// <param name="point"></param>
/// <returns></returns>
public List<PerHeader> GetPerHeaderReverse(ISheet sheet, PerSheetPoint point)
{
var sheetHeaders = GetPerHeader(sheet, point);
if (sheetHeaders == null || !sheetHeaders.Any())
return null;
return LastLevel(sheetHeaders);
}
/// <summary>
/// 递归 找出层级最低列头
/// </summary>
/// <param name="sheetHeaders"></param>
/// <returns></returns>
private List<PerHeader> LastLevel(List<PerHeader> sheetHeaders)
{
if (sheetHeaders == null || !sheetHeaders.Any())
return null;
var headList = new List<PerHeader>();
foreach (var cell in sheetHeaders)
{
if (cell.IsHasChildren)
{
headList.AddRange(LastLevel(cell.Children));
}
else
{
headList.Add(cell);
}
}
return headList;
}
/// <summary>
/// 读取excel列头
/// </summary>
/// <param name="sheet"></param>
/// <param name="point"></param>
/// <returns></returns>
private List<PerHeader> ReadHeadMatrix(ISheet sheet, PerSheetPoint point, List<List<int>> matrix)
{
List<PerHeader> headerList = new List<PerHeader>();
for (int r = 0; r < matrix.Count; r++)
{
for (int c = 0; c < matrix[r].Count; c++)
{
int ri = 1, ci = 1;
if (matrix[r][c] == 1)
{
for (int i = r + 1; i < matrix.Count; i++)
{
if (matrix[i][c] == 1 || matrix[i][c] == -1)
break;
//var num = matrix[i][c];
matrix[i][c] = -1;
ri++;
}
for (int i = c + 1; i < matrix[r].Count; i++)
{
if (matrix[r][i] == 1 || matrix[r][i] == -1)
break;
//var num = matrix[r][i];
matrix[r][i] = -1;
ci++;
}
var header = new PerHeader
{
PointRow = point.HeaderFirstRowNum.Value + r,
PointCell = point.HeaderFirstCellNum.Value + c,
MergeCell = ci,
MergeRow = ri,
CellName = sheet.GetRow(point.HeaderFirstRowNum.Value + r)
?.GetCell(point.HeaderFirstCellNum.Value + c)
?.ToString()
?.RemoveLineBreak()
};
headerList.Add(header);
}
}
}
return headerList;
}
}
}
using NPOI.SS.UserModel;
using Performance.DtoModels;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class PerSheetService : IAutoInjection
{
public PerSheet Sheet(ISheet sheet)
{
PerSheet perSheet = new PerSheet();
perSheet.SheetName = sheet.SheetName;
perSheet.SheetType = GetSheetType(sheet.SheetName);
perSheet.ModuleName = EnumHelper.GetDescription(perSheet.SheetType);
IPerSheetDataRead sheetRead = PerSheetDataFactory.GetAnalyze(perSheet.SheetType);
perSheet.PerData = AnalyzeData(sheet , sheetRead);
return perSheet;
}
public SheetType GetSheetType(string sheetName)
{
if (sheetName.StartsWith("工作量"))
{
return SheetType.Expend;
}
else if (sheetName.StartsWith("生成成本"))
{
return SheetType.Workload;
}
return SheetType.Unidentifiable;
}
public List<PerData> AnalyzeData(ISheet sheet, IPerSheetDataRead sheetRead)
{
List<PerData> dataList = new List<PerData>();
PerHeaderService perHeader = new PerHeaderService();
var headList = perHeader.GetPerHeaderReverse(sheet, sheetRead.Point);
var vhead = headList.Where(t => t.PointCell != sheetRead.Point.StandardCellNum && t.PointCell != sheetRead.Point.DeptCellNum)
.OrderBy(t => t.PointCell);
for (int r = sheetRead.Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++)
{
var row = sheet.GetRow(r);
for (int c = 0; c < vhead.Count(); c++)
{
PerData data = sheetRead.GetPerData(row, vhead.ElementAt(c));
dataList.Add(data);
}
}
return dataList;
}
}
}
using NPOI.SS.UserModel;
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
public interface IPerSheetDataRead
{
PerSheetPoint Point { get; }
PerData GetPerData(IRow row, PerHeader perHeader);
}
}
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
public class PerSheetDataFactory
{
public static IPerSheetDataRead GetAnalyze(SheetType sheetType)
{
IPerSheetDataRead analyze = null;
switch (sheetType)
{
case SheetType.Employee:
break;
case SheetType.Income:
break;
case SheetType.Expend:
analyze = new PerSheetDataReadExpend();
break;
case SheetType.Overtime:
break;
case SheetType.Workload:
analyze = new PerSheetDataReadWorkload();
break;
default:
break;
}
return analyze;
}
}
}
using NPOI.SS.UserModel;
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class PerSheetDataReadExpend : IPerSheetDataRead
{
public PerSheetPoint Point => new PerSheetPoint
{
HeaderFirstRowNum = 3,
HeaderLastRowNum = 4,
HeaderFirstCellNum = 3,
DataFirstRowNum = 6,
FactorRow = 5,
StandardCellNum = 3,
DeptCellNum = 4
};
public PerData GetPerData(IRow row, PerHeader perHeader)
{
return new PerDataExpend
{
StandardName = row.GetCell(Point.StandardCellNum.Value).ToString(),
Department = row.GetCell(Point.DeptCellNum.Value).ToString(),
ParentType = perHeader.Parent?.CellName,
TypeName = perHeader.CellName,
CellValue = Convert.ToDecimal(row.GetCell(perHeader.PointCell).ToString()),
Annotation = row.GetCell(perHeader.PointCell).CellComment?.String.String,
};
}
}
}
using NPOI.SS.UserModel;
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class PerSheetDataReadWorkload : IPerSheetDataRead
{
public PerSheetPoint Point => new PerSheetPoint
{
HeaderFirstRowNum = 1,
HeaderLastRowNum = 2,
HeaderFirstCellNum = 1,
DataFirstRowNum = 3,
StandardCellNum = 1,
DeptCellNum = 2
};
public PerData GetPerData(IRow row, PerHeader perHeader)
{
return new PerDataWorkload
{
StandardName = row.GetCell(Point.StandardCellNum.Value).ToString(),
Department = row.GetCell(Point.DeptCellNum.Value).ToString(),
ParentType = perHeader.Parent?.CellName,
TypeName = perHeader.CellName,
CellValue = Convert.ToDecimal(row.GetCell(perHeader.PointCell).ToString()),
Annotation = row.GetCell(perHeader.PointCell).CellComment?.String.String,
};
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.NPOI" Version="1.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Performance.DtoModels\Performance.DtoModels.csproj" />
<ProjectReference Include="..\Performance.EntityModels\Performance.EntityModels.csproj" />
<ProjectReference Include="..\Performance.Infrastructure\Performance.Infrastructure.csproj" />
<ProjectReference Include="..\Performance.Repository\Performance.Repository.csproj" />
</ItemGroup>
</Project>
using Microsoft.Extensions.DependencyInjection;
using Performance.Infrastructure;
using Performance.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Performance.Services
{
public static class PerformanceServiceExtensions
{
public static IServiceCollection AddPerformanceService(this IServiceCollection services)
{
var types = ReflectionHelper.GetClassType<IAutoInjection>(Assembly.GetExecutingAssembly());
foreach (var type in types)
{
services.AddScoped(type);
}
var repository = typeof(PerforRepository<>).Assembly.GetTypes().Where(t => t.IsClass && !t.IsAbstract);
foreach (var type in repository)
{
services.AddScoped(type);
}
return services;
}
}
}
using Performance.EntityModels;
using Performance.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class UserService : IAutoInjection
{
PerforRepository<Sys_User> _userRepository;
public UserService(PerforRepository<Sys_User> userRepository)
{
this._userRepository = userRepository;
}
public List<Sys_User> GetUser()
{
return _userRepository.GetEntities().ToList();
}
}
}

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.ConsoleApp", "Performance.ConsoleApp\Performance.ConsoleApp.csproj", "{59218B05-5CE3-4EC1-A304-28183F191A04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.Services", "Performance.Services\Performance.Services.csproj", "{930CBA1F-A51A-4A12-897A-AA6ED02D3E70}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.Infrastructure", "Performance.Infrastructure\Performance.Infrastructure.csproj", "{5E91CFB3-D240-4E38-9E3E-398D53621387}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1.site", "1.site", "{69CFD3FA-0B61-41D4-A9E8-44B933001293}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.services", "2.services", "{2E5D3959-48C9-4BAD-89BF-9CF1DDCB453D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.repository", "3.repository", "{95E7A23D-DC0E-4C27-AD7C-EAF4917012EF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.infrastructure", "4.infrastructure", "{B132BEEE-14FF-4DDE-B8D6-7C66AD2B3433}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.Repository", "Performance.Repository\Performance.Repository.csproj", "{9F7723A3-B6BE-4690-BC56-FF93D9992621}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.DtoModels", "Performance.DtoModels\Performance.DtoModels.csproj", "{76531E3A-4BCD-4C20-A14C-5D6CCA1C9AEF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance.EntityModels", "Performance.EntityModels\Performance.EntityModels.csproj", "{F7708C0C-0B0B-4E7E-A995-E39F7044FD11}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Performance.Api", "Performance.Api\Performance.Api.csproj", "{3AE00FF5-F0BA-4D72-A23B-770186309327}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{59218B05-5CE3-4EC1-A304-28183F191A04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59218B05-5CE3-4EC1-A304-28183F191A04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59218B05-5CE3-4EC1-A304-28183F191A04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59218B05-5CE3-4EC1-A304-28183F191A04}.Release|Any CPU.Build.0 = Release|Any CPU
{930CBA1F-A51A-4A12-897A-AA6ED02D3E70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{930CBA1F-A51A-4A12-897A-AA6ED02D3E70}.Debug|Any CPU.Build.0 = Debug|Any CPU
{930CBA1F-A51A-4A12-897A-AA6ED02D3E70}.Release|Any CPU.ActiveCfg = Release|Any CPU
{930CBA1F-A51A-4A12-897A-AA6ED02D3E70}.Release|Any CPU.Build.0 = Release|Any CPU
{5E91CFB3-D240-4E38-9E3E-398D53621387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E91CFB3-D240-4E38-9E3E-398D53621387}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E91CFB3-D240-4E38-9E3E-398D53621387}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E91CFB3-D240-4E38-9E3E-398D53621387}.Release|Any CPU.Build.0 = Release|Any CPU
{9F7723A3-B6BE-4690-BC56-FF93D9992621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F7723A3-B6BE-4690-BC56-FF93D9992621}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F7723A3-B6BE-4690-BC56-FF93D9992621}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F7723A3-B6BE-4690-BC56-FF93D9992621}.Release|Any CPU.Build.0 = Release|Any CPU
{76531E3A-4BCD-4C20-A14C-5D6CCA1C9AEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76531E3A-4BCD-4C20-A14C-5D6CCA1C9AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76531E3A-4BCD-4C20-A14C-5D6CCA1C9AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76531E3A-4BCD-4C20-A14C-5D6CCA1C9AEF}.Release|Any CPU.Build.0 = Release|Any CPU
{F7708C0C-0B0B-4E7E-A995-E39F7044FD11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7708C0C-0B0B-4E7E-A995-E39F7044FD11}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7708C0C-0B0B-4E7E-A995-E39F7044FD11}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7708C0C-0B0B-4E7E-A995-E39F7044FD11}.Release|Any CPU.Build.0 = Release|Any CPU
{3AE00FF5-F0BA-4D72-A23B-770186309327}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AE00FF5-F0BA-4D72-A23B-770186309327}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AE00FF5-F0BA-4D72-A23B-770186309327}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AE00FF5-F0BA-4D72-A23B-770186309327}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{59218B05-5CE3-4EC1-A304-28183F191A04} = {69CFD3FA-0B61-41D4-A9E8-44B933001293}
{930CBA1F-A51A-4A12-897A-AA6ED02D3E70} = {2E5D3959-48C9-4BAD-89BF-9CF1DDCB453D}
{5E91CFB3-D240-4E38-9E3E-398D53621387} = {B132BEEE-14FF-4DDE-B8D6-7C66AD2B3433}
{9F7723A3-B6BE-4690-BC56-FF93D9992621} = {95E7A23D-DC0E-4C27-AD7C-EAF4917012EF}
{76531E3A-4BCD-4C20-A14C-5D6CCA1C9AEF} = {2E5D3959-48C9-4BAD-89BF-9CF1DDCB453D}
{F7708C0C-0B0B-4E7E-A995-E39F7044FD11} = {95E7A23D-DC0E-4C27-AD7C-EAF4917012EF}
{3AE00FF5-F0BA-4D72-A23B-770186309327} = {69CFD3FA-0B61-41D4-A9E8-44B933001293}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {610FC42C-1DE1-4925-93DD-F02908B9FF47}
EndGlobalSection
EndGlobal
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