Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
code
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
solho
code
Commits
fcada1d3
Commit
fcada1d3
authored
May 04, 2022
by
charleslee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.epurplevineip.com/sol/code
parents
41defe66
a3c8d153
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
328 additions
and
70 deletions
+328
-70
WebAPI/Controllers/CustomerController.cs
WebAPI/Controllers/CustomerController.cs
+1
-3
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
+29
-32
WebAPI/Controllers/Esn_Subitem/Esn_todosController.cs
WebAPI/Controllers/Esn_Subitem/Esn_todosController.cs
+180
-35
WebAPI/Models/Esn_TodosModel.cs
WebAPI/Models/Esn_TodosModel.cs
+80
-0
WebAPI/Models/SP_rpt_PerformanceMonth_FlowModel.cs
WebAPI/Models/SP_rpt_PerformanceMonth_FlowModel.cs
+9
-0
WebAPI/Web.config
WebAPI/Web.config
+15
-0
WebAPI/WebAPI.csproj
WebAPI/WebAPI.csproj
+12
-0
WebAPI/packages.config
WebAPI/packages.config
+2
-0
No files found.
WebAPI/Controllers/CustomerController.cs
View file @
fcada1d3
...
...
@@ -168,9 +168,7 @@ namespace WebAPI.Controllers
CommandText
=
@"MERGE INTO essen_customer WITH(HOLDLOCK) as target USING(
select @request_customer_id as request_customer_id, @customer_id as customer_id ) as source (request_id,customer_id)
on(target.customer_id = source.customer_id )
WHEN MATCHED THEN UPDATE SET request_customer_id = @request_customer_id
WHEN NOT MATCHED THEN INSERT(request_customer_id,customer_id)
VALUES(@request_customer_id,@customer_id );"
WHEN MATCHED THEN UPDATE SET request_customer_id = @request_customer_id ;"
};
...
...
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
View file @
fcada1d3
...
...
@@ -11,6 +11,7 @@ using System.Net;
using
System.Net.Http
;
using
System.Web.Http
;
using
WebAPI.Models
;
using
WebAPI.Tool
;
using
static
WebAPI
.
Models
.
CommonModel
;
using
static
WebAPI
.
Tool
.
Common
;
...
...
@@ -28,7 +29,7 @@ namespace WebAPI.Controllers
HttpResponseMessage
result
;
CommonResponseMsg
response
;
MessageList_ETF
Outmsg
;
String
connString
;
static
String
connString
;
public
Esn_Todos_FlowController
()
{
...
...
@@ -62,17 +63,8 @@ namespace WebAPI.Controllers
Esn_Todos_FlowModel
hisT
=
new
Esn_Todos_FlowModel
();
SqlCommand
cmd
=
new
SqlCommand
(
""
,
Conn
)
{
CommandText
=
@" select a.ConfirmTime,Case When isnull(e.Names,'')='' then '其他' else e.Names End as ConfirmUserClass
,Case When isnull(f.Names,'')='' then '其他' else f.Names end as ConfirmMethod
,a.Create_time,d.cn_name as Create_User_Name,b.Step_Text as ""From"",c.Step_Text as ""To"",a.Description
from esn_Todos_flow_his a
left join esn_todos_Flow_StepType b on a.FromType_id = b.id
left join esn_todos_Flow_StepType c on a.ToType_id = c.id
left join evw_Employee d on a.Create_User_id = d.user_id
left join esn_category e on e.ParentId='Flow_Role' and a.ConfirmUserClass = e.QryKey1
left join esn_category f on f.ParentId='Flow_Method' and a.ConfirmMethod = f.QryKey1
where a.Flow_id = @Flow_id
"
CommandText
=
@"select ConfirmTime,ConfirmUserClass,ConfirmMethod,Create_time,Create_User_Name,""From"", ""To"",
Description from dbo.efn_Get_Flow_editing_log(@Flow_id)"
};
cmd
.
Parameters
.
AddWithValue
(
"@Flow_id"
,
obj_input
[
"Flowid"
].
ToString
());
DataSet
ds
=
SqlToDs
(
cmd
);
...
...
@@ -142,9 +134,12 @@ namespace WebAPI.Controllers
{
CommandText
=
@"select b.cn_name, a.* from esn_todos_SettleLog a
left join s_user_info b on a.Create_user_id=b.user_id
where a.Create_user_id=@Create_user_id "
where a.Create_user_id=@Create_user_id
@wherecase
"
};
String
wherecase
=
obj_input
[
"gUserID_wade"
]
==
null
||
string
.
IsNullOrEmpty
(
obj_input
[
"gUserID_wade"
].
ToString
())
?
" or 1=1"
:
""
;
cmd
.
Parameters
.
AddWithValue
(
"@Create_user_id"
,
obj_input
[
"gUserID_wade"
].
ToString
());
cmd
.
CommandText
=
cmd
.
CommandText
.
Replace
(
"@wherecase"
,
wherecase
);
DataSet
ds
=
SqlToDs
(
cmd
);
foreach
(
DataRow
dr
in
ds
.
Tables
[
0
].
Rows
)
{
...
...
@@ -443,11 +438,11 @@ namespace WebAPI.Controllers
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
StepType_id_Previous
).
FirstOrDefault
();
#
region
重置結算日期
,
是否已解算
if
(
JtSn
[
"validclass"
].
ToString
()
==
"PG"
||
JtSn
[
"validclass"
].
ToString
()
==
"Leader"
)
if
(
JtSn
[
"validclass"
].
ToString
()
==
"PG"
||
JtSn
[
"validclass"
].
ToString
()
==
"Leader"
)
//強制撤回
{
TOopExecSP
+=
String
.
Format
(
@"update esn_todos_points set date_points_settlement=null where sn="
+
dsr
[
"sn"
]
+
";"
);
TOopExecSP
+=
String
.
Format
(
@"update esn_todos_Flow set Is_Settlement=0 where esn_todos_sn="
+
dsr
[
"sn"
]
+
";"
);
if
(
JtSn
[
"validclass"
].
ToString
()
==
"PG"
)
//
if (JtSn["validclass"].ToString() == "PG")
{
TOopExecSP
+=
String
.
Format
(
@"exec [dbo].esp_esn_Todos_V3_AssignStatus 'AS05Back' ,"
+
dsr
[
"sn"
]
+
@",'',@Reject_Description_{0},'',@Wade_User_ID ;"
,
i
);
//強制拉回需重置運營辦狀態
}
}
...
...
@@ -542,23 +537,10 @@ namespace WebAPI.Controllers
try
{
JObject
obj_input
=
JObject
.
Parse
(
input
.
ToString
());
JArray
obj_input_data
=
JArray
.
Parse
(
obj_input
[
"SaveData"
].
ToString
());
using
(
SqlConnection
Conn
=
new
SqlConnection
(
connString
))
{
SqlCommand
cmd
=
new
SqlCommand
(
""
,
Conn
)
{
CommandText
=
@"Insert into esn_todos_SettleLog([SaveData],[Country],[update_time],[update_user_id],Create_time,Create_user_id)
values(@SaveData,@Country,getdate(),@gUserID_wade,getdate(),@gUserID_wade)"
};
cmd
.
Parameters
.
AddWithValue
(
"@SaveData"
,
obj_input
[
"SaveData"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@gUserID_wade"
,
obj_input
[
"gUserID_wade"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@Country"
,
obj_input
[
"Country"
].
ToString
());
DataTable
dt
=
SqlToDt
(
cmd
);
DataTable
dt
=
Save_PointSettlement_Log_Base
(
obj_input
);
response
.
Code
=
"1"
;
response
.
Msg
=
"匯出完畢"
;
}
}
catch
(
Exception
e
)
{
response
.
Code
=
"0"
;
...
...
@@ -574,7 +556,22 @@ namespace WebAPI.Controllers
result
.
Content
=
new
StringContent
(
JsonConvert
.
SerializeObject
(
response
),
System
.
Text
.
Encoding
.
UTF8
,
"application/json"
);
return
result
;
}
public
static
DataTable
Save_PointSettlement_Log_Base
(
JObject
obj_input
)
{
DataTable
dt
=
null
;
JArray
obj_input_data
=
JArray
.
Parse
(
obj_input
[
"SaveData"
].
ToString
());
SqlServerHelper
sql_server_helper
=
new
SqlServerHelper
();
SqlCommand
cmd
=
new
SqlCommand
(
""
)
{
CommandText
=
@"Insert into esn_todos_SettleLog([SaveData],[Country],[update_time],[update_user_id],Create_time,Create_user_id)
values(@SaveData,(select Emp_DSContury from evw_Employee a where a.user_id =@gUserID_wade),getdate(),@gUserID_wade,getdate(),@gUserID_wade)"
};
cmd
.
Parameters
.
AddWithValue
(
"@SaveData"
,
obj_input
[
"SaveData"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@gUserID_wade"
,
obj_input
[
"gUserID_wade"
].
ToString
());
dt
=
sql_server_helper
.
GetTable
(
cmd
);
return
dt
;
}
}
...
...
WebAPI/Controllers/Esn_Subitem/Esn_todosController.cs
View file @
fcada1d3
This diff is collapsed.
Click to expand it.
WebAPI/Models/Esn_TodosModel.cs
View file @
fcada1d3
...
...
@@ -25,4 +25,84 @@ namespace WebAPI.Models
public
String
Create_User_Name
{
get
;
set
;
}
}
/// <summary>
/// 檢核扣點
/// </summary>
public
class
validpointModel
{
public
String
attr_userID
{
get
;
set
;
}
public
String
attr_UserName
{
get
;
set
;
}
public
long
aaa
{
get
;
set
;
}
public
long
ID
{
get
;
set
;
}
public
int
vInt
{
get
;
set
;
}
}
/// <summary>
/// 審核點數SP
/// </summary>
public
class
SP_rpt_PerformanceMonth_FlowModel
{
public
String
attr_userID
{
get
;
set
;
}
public
String
承辦人
{
get
;
set
;
}
public
String
管理中心
{
get
;
set
;
}
public
int
attr_DStargetid
{
get
;
set
;
}
public
String
所別
{
get
;
set
;
}
public
String
一級部門
{
get
;
set
;
}
public
String
attr_DeptGroupTargetID
{
get
;
set
;
}
public
String
二級部門
{
get
;
set
;
}
public
String
attr_todos2
{
get
;
set
;
}
public
String
attr_RejectCount
{
get
;
set
;
}
public
String
attr_nn_toConfirmAll
{
get
;
set
;
}
public
String
處理事項數
{
get
;
set
;
}
public
String
attr_todos3
{
get
;
set
;
}
public
String
attr_MapClasslist
{
get
;
set
;
}
public
String
可結算事項數
{
get
;
set
;
}
public
int
attr_points0
{
get
;
set
;
}
public
int
原始提成
{
get
;
set
;
}
public
int
檢核扣點
{
get
;
set
;
}
public
int
attr_actingpoints
{
get
;
set
;
}
public
int
attr_nonactingpoints
{
get
;
set
;
}
public
int
attr_
加成點數
{
get
;
set
;
}
public
int
attr_pointssum
{
get
;
set
;
}
public
int
加成後總提成
{
get
;
set
;
}
public
String
attr_1_type
{
get
;
set
;
}
public
String
attr_AllConfirm
{
get
;
set
;
}
public
String
審核完畢
{
get
;
set
;
}
public
String
attr_2_type
{
get
;
set
;
}
public
String
attr_IsSettlement
{
get
;
set
;
}
public
String
結算完畢
{
get
;
set
;
}
public
String
結算月份
{
get
;
set
;
}
public
String
薪資類型
{
get
;
set
;
}
public
String
attr_deptmanager
{
get
;
set
;
}
public
String
attr_programmer
{
get
;
set
;
}
public
String
attr_engineer
{
get
;
set
;
}
public
String
工號
{
get
;
set
;
}
public
String
姓名
{
get
;
set
;
}
public
String
月份
{
get
;
set
;
}
public
String
Emp_DSContury
{
get
;
set
;
}
public
int
前三个月平均绩效
{
get
;
set
;
}
}
/// <summary>
/// 輸出 Ehr
/// </summary>
public
class
ExportEhrModel
{
public
String
所別
{
get
;
set
;
}
public
String
管理中心
{
get
;
set
;
}
public
String
一級部門
{
get
;
set
;
}
public
String
二級部門
{
get
;
set
;
}
public
String
國別
{
get
;
set
;
}
public
String
Badge
{
get
;
set
;
}
public
String
姓名
{
get
;
set
;
}
public
String
Term
{
get
;
set
;
}
public
int
Per_Agent_Amount
{
get
;
set
;
}
public
int
Non_Agent_Amount
{
get
;
set
;
}
public
int
PAverage
{
get
;
set
;
}
public
int
Points
{
get
;
set
;
}
}
}
\ No newline at end of file
WebAPI/Models/SP_rpt_PerformanceMonth_FlowModel.cs
0 → 100644
View file @
fcada1d3
using
System
;
using
System.Collections.Generic
;
namespace
WebAPI.Models
{
/// <summary>
/// 處理事項子項相關
/// </summary>
}
\ No newline at end of file
WebAPI/Web.config
View file @
fcada1d3
...
...
@@ -4,11 +4,16 @@
https
://
go
.
microsoft
.
com
/
fwlink
/?
LinkId
=
301879
-->
<
configuration
>
<
configSections
>
<!--
For
more
information
on
Entity
Framework
configuration
,
visit
http
://
go
.
microsoft
.
com
/
fwlink
/?
LinkID
=
237468
-->
<
section
name
=
"entityFramework"
type
=
"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission
=
"false"
/>
</
configSections
>
<
connectionStrings
>
<!--報價規則-->
<
add
name
=
"DefaultConnection"
connectionString
=
"Data Source=47.91.213.74,6002;Initial Catalog=IPEasy_test;Persist Security Info=True;User ID=ipeasy;Password=ipeasy.123"
providerName
=
"System.Data.SqlClient"
/>
<!--核稿歷史-->
<
add
name
=
"eflow_cur"
connectionString
=
"Data Source=47.91.213.74,6002;Initial Catalog=IPEasy_test;Persist Security Info=True;User ID=ipeasyTest;Password=ipeasy.123"
providerName
=
"System.Data.SqlClient"
/>
<
add
name
=
"essenConnection"
connectionString
=
"server=192.168.1.174;port=3306;user id=sol; password=FK35cnvbeH3BNAxV; database=essen_test "
/>
</
connectionStrings
>
<
appSettings
>
<
add
key
=
"webpages:Version"
value
=
"3.0.0.0"
/>
...
...
@@ -93,4 +98,14 @@
<
compiler
language
=
"vb;vbs;visualbasic;vbscript"
extension
=
".vb"
type
=
"Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel
=
"4"
compilerOptions
=
"/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"
/>
</
compilers
>
</
system
.
codedom
>
<
entityFramework
>
<
defaultConnectionFactory
type
=
"System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"
>
<
parameters
>
<
parameter
value
=
"mssqllocaldb"
/>
</
parameters
>
</
defaultConnectionFactory
>
<
providers
>
<
provider
invariantName
=
"System.Data.SqlClient"
type
=
"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"
/>
</
providers
>
</
entityFramework
>
</
configuration
>
\ No newline at end of file
WebAPI/WebAPI.csproj
View file @
fcada1d3
...
...
@@ -64,6 +64,12 @@
<Reference
Include=
"EastAsiaNumericFormatter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e1e67937c016e5b2, processorArchitecture=MSIL"
>
<HintPath>
packages\EastAsiaNumericFormatter.1.0.0\lib\net40\EastAsiaNumericFormatter.dll
</HintPath>
</Reference>
<Reference
Include=
"EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
>
<HintPath>
packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll
</HintPath>
</Reference>
<Reference
Include=
"EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
>
<HintPath>
packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll
</HintPath>
</Reference>
<Reference
Include=
"ExcelDataReader, Version=3.6.0.0, Culture=neutral, PublicKeyToken=93517dbe6a4012fa, processorArchitecture=MSIL"
>
<HintPath>
.\packages\ExcelDataReader.3.6.0\lib\net45\ExcelDataReader.dll
</HintPath>
</Reference>
...
...
@@ -122,6 +128,7 @@
<Reference
Include=
"System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
>
<HintPath>
packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll
</HintPath>
</Reference>
<Reference
Include=
"System.Security"
/>
<Reference
Include=
"System.Transactions"
/>
<Reference
Include=
"System.Web.Cors, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
>
<HintPath>
packages\Microsoft.AspNet.Cors.5.2.7\lib\net45\System.Web.Cors.dll
</HintPath>
...
...
@@ -225,6 +232,7 @@
<Compile
Include=
"Dal\DalProcInfo.cs"
/>
<Compile
Include=
"Models\DataObjects\PCaseInfo.cs"
/>
<Compile
Include=
"Models\EhrEmployee.cs"
/>
<Compile
Include=
"Models\SP_rpt_PerformanceMonth_FlowModel.cs"
/>
<Compile
Include=
"Models\Esn_todos_SettleModel.cs"
/>
<Compile
Include=
"Models\AnnualInfo.cs"
/>
<Compile
Include=
"Models\Esn_Todos_FlowModel.cs"
/>
...
...
@@ -320,6 +328,7 @@
<Content
Include=
"log4net.config"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"libman.json"
/>
<None
Include=
"Properties\PublishProfiles\FolderProfile.pubxml"
/>
<None
Include=
"Scripts\jquery-3.4.1.intellisense.js"
/>
<Content
Include=
"Scripts\jquery-3.4.1.js"
/>
...
...
@@ -378,6 +387,9 @@
<Content
Include=
"Scripts\jquery-3.4.1.slim.min.map"
/>
<Content
Include=
"Scripts\jquery-3.4.1.min.map"
/>
</ItemGroup>
<ItemGroup>
<Service
Include=
"{508349B6-6B84-4DF5-91F0-309BEEBAD82D}"
/>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion
Condition=
"'$(VisualStudioVersion)' == ''"
>
10.0
</VisualStudioVersion>
<VSToolsPath
Condition=
"'$(VSToolsPath)' == ''"
>
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
</VSToolsPath>
...
...
WebAPI/packages.config
View file @
fcada1d3
...
...
@@ -8,6 +8,8 @@
<
package
id
=
"Dapper.Contrib"
version
=
"2.0.78"
targetFramework
=
"net48"
/>
<
package
id
=
"DocumentFormat.OpenXml"
version
=
"2.7.2"
targetFramework
=
"net46"
/>
<
package
id
=
"EastAsiaNumericFormatter"
version
=
"1.0.0"
targetFramework
=
"net46"
/>
<
package
id
=
"EntityFramework"
version
=
"6.2.0"
targetFramework
=
"net48"
/>
<
package
id
=
"EntityFramework.zh-Hant"
version
=
"6.2.0"
targetFramework
=
"net48"
/>
<
package
id
=
"ExcelDataReader"
version
=
"3.6.0"
targetFramework
=
"net46"
/>
<
package
id
=
"ExcelDataReader.DataSet"
version
=
"3.6.0"
targetFramework
=
"net46"
/>
<
package
id
=
"ExcelNumberFormat"
version
=
"1.0.10"
targetFramework
=
"net46"
/>
...
...
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