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
dc91ba3c
Commit
dc91ba3c
authored
Jul 06, 2022
by
charleslee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:獲取請款費用
parent
c31d321d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
1 deletion
+212
-1
WebAPI/Controllers/ProcInfoController.cs
WebAPI/Controllers/ProcInfoController.cs
+98
-1
WebAPI/Controllers/RequestController.cs
WebAPI/Controllers/RequestController.cs
+77
-0
WebAPI/Models/DataObjects/PProcFeeList.cs
WebAPI/Models/DataObjects/PProcFeeList.cs
+35
-0
WebAPI/WebAPI.csproj
WebAPI/WebAPI.csproj
+2
-0
No files found.
WebAPI/Controllers/ProcInfoController.cs
View file @
dc91ba3c
using
ExcelDataReader
;
using
Dapper
;
using
ExcelDataReader
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
...
...
@@ -26,6 +27,8 @@ namespace WebAPI.Controllers
{
public
class
ProcInfoController
:
ApiController
{
String
connectionString
=
ConfigurationManager
.
ConnectionStrings
[
"DefaultConnection"
].
ConnectionString
;
public
ProcInfoController
()
{
}
...
...
@@ -1193,6 +1196,100 @@ namespace WebAPI.Controllers
return
dt
;
}
#
region
查詢流程節點處理人
[
Route
(
"ProcInfo/Flow/Doer"
)]
[
CorsHandle
]
[
HttpPost
]
public
HttpResponseMessage
get_procinfo_flow_doer
()
{
HttpResponseMessage
result
=
new
HttpResponseMessage
(
HttpStatusCode
.
OK
);
CommonResponseMsg
response
=
new
CommonResponseMsg
();
try
{
var
case_volume
=
HttpContext
.
Current
.
Request
.
Form
[
"case_volume"
];
var
customer_name
=
HttpContext
.
Current
.
Request
.
Form
[
"customer_name"
];
var
ctrl_proc_id
=
HttpContext
.
Current
.
Request
.
Form
[
"ctrl_proc_id"
];
var
proc_status_id
=
HttpContext
.
Current
.
Request
.
Form
[
"proc_status_id"
];
var
finish_date_s
=
HttpContext
.
Current
.
Request
.
Form
[
"finish_date_s"
];
var
finish_date_e
=
HttpContext
.
Current
.
Request
.
Form
[
"finish_date_e"
];
var
node_id
=
HttpContext
.
Current
.
Request
.
Form
[
"node_id"
];
using
(
SqlConnection
conn
=
new
SqlConnection
(
connectionString
))
{
string
str_sql
=
@"select pci.case_volume,cc.customer_name,icp.ctrl_proc_zh_cn,ics.case_status_zh_cn,ips.proc_status_zh_cn,ppi.finish_date,sfn.node_name_zh_cn,sui.cn_name,sfh.audit_time,sat.audit_type_zh_cn,sfh.remark
from p_case_info pci
inner join p_proc_info ppi on pci.case_id = ppi.case_id
inner join i_ctrl_proc icp on ppi.ctrl_proc_id = icp.ctrl_proc_id
inner join c_customer cc on pci.customer_id = cc.customer_id
left join i_proc_status ips on ppi.proc_status_id = ips.proc_status_id
inner join e_filing_info efi on pci.case_id = efi.case_id and ppi.proc_id = efi.proc_id
inner join s_flow_history sfh on efi.filing_id = sfh.obj_id
inner join s_flow_node sfn on sfh.node_id = sfn.node_id
inner join s_user_info sui on sfh.audit_user_id = sui.user_id
left join s_audit_type sat on sfh.audit_type_id = sat.audit_id
left join i_case_status ics on ppi.review_stage = ics.case_status_id"
;
List
<
string
>
arr_where
=
new
List
<
string
>();
if
(
case_volume
!=
null
&&
!
string
.
IsNullOrEmpty
(
case_volume
))
{
arr_where
.
Add
(
"pci.case_volume like @case_volume"
);
case_volume
=
"%"
+
case_volume
+
"%"
;
}
if
(
customer_name
!=
null
&&
!
string
.
IsNullOrEmpty
(
customer_name
))
{
arr_where
.
Add
(
"cc.customer_name like @customer_name"
);
customer_name
=
"%"
+
customer_name
+
"%"
;
}
if
(
ctrl_proc_id
!=
null
&&
!
string
.
IsNullOrEmpty
(
ctrl_proc_id
))
{
arr_where
.
Add
(
"ppi.ctrl_proc_id = @ctrl_proc_id"
);
}
if
(
proc_status_id
!=
null
&&
!
string
.
IsNullOrEmpty
(
proc_status_id
))
{
arr_where
.
Add
(
"ppi.proc_status_id = @proc_status_id"
);
}
if
(
finish_date_s
!=
null
&&
!
string
.
IsNullOrEmpty
(
finish_date_s
))
{
arr_where
.
Add
(
"ppi.finish_date >= @finish_date_s"
);
finish_date_s
=
finish_date_s
+
" 00:00:00"
;
}
if
(
finish_date_e
!=
null
&&
!
string
.
IsNullOrEmpty
(
finish_date_e
))
{
arr_where
.
Add
(
"ppi.finish_date <= @finish_date_e"
);
finish_date_e
=
finish_date_e
+
" 23:59:59"
;
}
if
(
node_id
!=
null
&&
!
string
.
IsNullOrEmpty
(
node_id
))
{
arr_where
.
Add
(
"sfn.node_id = @node_id"
);
}
if
(
arr_where
.
Count
>
0
)
{
str_sql
+=
" where "
;
str_sql
+=
string
.
Join
(
" and "
,
arr_where
);
}
List
<
dynamic
>
list_flow_doer
=
conn
.
Query
<
dynamic
>(
str_sql
,
new
{
case_volume
=
case_volume
,
customer_name
=
customer_name
,
ctrl_proc_id
=
ctrl_proc_id
,
proc_status_id
=
proc_status_id
,
finish_date_s
=
finish_date_s
,
finish_date_e
=
finish_date_e
,
node_id
=
node_id
}).
ToList
();
response
.
Code
=
"1"
;
response
.
Msg
=
list_flow_doer
;
}
}
catch
(
Exception
e
)
{
response
.
Code
=
"0"
;
response
.
Msg
=
e
.
Message
;
}
result
.
Content
=
new
StringContent
(
JsonConvert
.
SerializeObject
(
response
),
System
.
Text
.
Encoding
.
UTF8
,
"application/json"
);
return
result
;
}
#
endregion
/// <summary>
/// 取得期限變更歷史資料
/// </summary>
...
...
WebAPI/Controllers/RequestController.cs
0 → 100644
View file @
dc91ba3c
using
Dapper
;
using
ExcelDataReader
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
using
System.Configuration
;
using
System.Data
;
using
System.Data.SqlClient
;
using
System.IO
;
using
System.Linq
;
using
System.Net
;
using
System.Net.Http
;
using
System.Reflection
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Threading
;
using
System.Web
;
using
System.Web.Http
;
using
System.Web.Http.Cors
;
using
WebAPI.Dal
;
using
WebAPI.Models
;
using
WebAPI.Tool
;
using
static
WebAPI
.
Models
.
CommonModel
;
namespace
WebAPI.Controllers
{
public
class
RequestController
:
ApiController
{
String
connectionString
=
ConfigurationManager
.
ConnectionStrings
[
"DefaultConnection"
].
ConnectionString
;
public
RequestController
()
{
}
#
region
獲取請款單費用
[
Route
(
"Request/{request_id}/FeeList"
)]
[
CorsHandle
]
[
HttpGet
]
public
HttpResponseMessage
GetProcInfo
(
string
request_id
)
{
HttpResponseMessage
result
=
new
HttpResponseMessage
(
HttpStatusCode
.
OK
);
CommonResponseMsg
response
=
new
CommonResponseMsg
();
try
{
if
(
string
.
IsNullOrWhiteSpace
(
request_id
))
{
response
.
Code
=
"0"
;
response
.
Msg
=
"no request_id"
;
}
else
{
using
(
SqlConnection
conn
=
new
SqlConnection
(
connectionString
))
{
string
sql
=
@"SELECT ppfl.fee_id, ppfl.proc_id, ppfl.currency_id, ppfl.fee_type_id, ppfl.amount, ppfl.request_id, ppfl.request_no, ppfl.pay_type, ppfl.pay_status, ppfl.coefficient, ppfl.rate, ppfl.tax_id, ppfl.tax_type, ppfl.price, ppfl.is_divided, ppfl.mid_currency_id, ppfl.mid_amount, ppfl.mid_is_divided, ppfl.ori_is_divided, ppfl.mid_rate, ppfl.ori_rate
FROM p_proc_fee_list ppfl
INNER JOIN f_request_list frl ON ppfl.fee_id = frl.fee_id
WHERE frl.request_id = @request_id"
;
var
fee_list
=
conn
.
Query
<
PProcFeeList
>(
sql
,
new
{
request_id
=
request_id
}).
ToList
();
response
.
Code
=
"1"
;
response
.
Msg
=
fee_list
;
}
}
}
catch
(
Exception
e
)
{
response
.
Code
=
"0"
;
response
.
Msg
=
e
.
Message
;
}
result
.
Content
=
new
StringContent
(
JsonConvert
.
SerializeObject
(
response
),
System
.
Text
.
Encoding
.
UTF8
,
"application/json"
);
return
result
;
}
#
endregion
}
}
\ No newline at end of file
WebAPI/Models/DataObjects/PProcFeeList.cs
0 → 100644
View file @
dc91ba3c
using
Dapper.Contrib.Extensions
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Web
;
namespace
WebAPI.Models
{
[
Table
(
"p_proc_fee_list"
)]
public
class
PProcFeeList
{
[
Key
]
public
string
fee_id
{
get
;
set
;
}
public
string
proc_id
{
get
;
set
;
}
public
string
currency_id
{
get
;
set
;
}
public
string
fee_type_id
{
get
;
set
;
}
public
decimal
amount
{
get
;
set
;
}
public
string
request_id
{
get
;
set
;
}
public
string
request_no
{
get
;
set
;
}
public
int
pay_type
{
get
;
set
;
}
public
string
pay_status
{
get
;
set
;
}
public
decimal
coefficient
{
get
;
set
;
}
public
decimal
rate
{
get
;
set
;
}
public
string
tax_id
{
get
;
set
;
}
public
string
tax_type
{
get
;
set
;
}
public
decimal
price
{
get
;
set
;
}
public
byte
is_divided
{
get
;
set
;
}
public
string
mid_currency_id
{
get
;
set
;
}
public
decimal
mid_amount
{
get
;
set
;
}
public
byte
mid_is_divided
{
get
;
set
;
}
public
byte
ori_is_divided
{
get
;
set
;
}
public
decimal
mid_rate
{
get
;
set
;
}
public
decimal
ori_rate
{
get
;
set
;
}
}
}
\ No newline at end of file
WebAPI/WebAPI.csproj
View file @
dc91ba3c
...
...
@@ -211,6 +211,7 @@
<Compile
Include=
"Controllers\CustomerController.cs"
/>
<Compile
Include=
"Controllers\FileController.cs"
/>
<Compile
Include=
"Controllers\InventorController.cs"
/>
<Compile
Include=
"Controllers\RequestController.cs"
/>
<Compile
Include=
"Controllers\SubProcInfoController.cs"
/>
<Compile
Include=
"Controllers\ProcInfoController.cs"
/>
<Compile
Include=
"Controllers\UserInfoController.cs"
/>
...
...
@@ -222,6 +223,7 @@
<Compile
Include=
"Models\DataObjects\PCaseInfo.cs"
/>
<Compile
Include=
"Models\DataObjects\SDeptInfo.cs"
/>
<Compile
Include=
"Models\DataObjects\SDeptUser.cs"
/>
<Compile
Include=
"Models\DataObjects\PProcFeeList.cs"
/>
<Compile
Include=
"Models\DataObjects\SUserInfo.cs"
/>
<Compile
Include=
"Models\EhrEmployee.cs"
/>
<Compile
Include=
"Models\SP_rpt_PerformanceMonth_FlowModel.cs"
/>
...
...
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