Commit 022a4b06 authored by charleslee's avatar charleslee

feat:添加國別篩選條件

parent c84f5c1e
...@@ -1208,6 +1208,8 @@ namespace WebAPI.Controllers ...@@ -1208,6 +1208,8 @@ namespace WebAPI.Controllers
try try
{ {
var case_volume = HttpContext.Current.Request.Form["case_volume"]; var case_volume = HttpContext.Current.Request.Form["case_volume"];
var country_id = HttpContext.Current.Request.Form["country_id"];
List<string> list_country_id = null;
var customer_name = HttpContext.Current.Request.Form["customer_name"]; var customer_name = HttpContext.Current.Request.Form["customer_name"];
var ctrl_proc_id = HttpContext.Current.Request.Form["ctrl_proc_id"]; var ctrl_proc_id = HttpContext.Current.Request.Form["ctrl_proc_id"];
var proc_status_id = HttpContext.Current.Request.Form["proc_status_id"]; var proc_status_id = HttpContext.Current.Request.Form["proc_status_id"];
...@@ -1235,6 +1237,11 @@ namespace WebAPI.Controllers ...@@ -1235,6 +1237,11 @@ namespace WebAPI.Controllers
arr_where.Add("pci.case_volume like @case_volume"); arr_where.Add("pci.case_volume like @case_volume");
case_volume = "%" + case_volume + "%"; case_volume = "%" + case_volume + "%";
} }
if (country_id != null && !string.IsNullOrEmpty(country_id))
{
list_country_id = country_id.Split(',').ToList();
arr_where.Add("pci.country_id in @list_country_id");
}
if (customer_name != null && !string.IsNullOrEmpty(customer_name)) if (customer_name != null && !string.IsNullOrEmpty(customer_name))
{ {
arr_where.Add("cc.customer_name like @customer_name"); arr_where.Add("cc.customer_name like @customer_name");
...@@ -1269,6 +1276,7 @@ namespace WebAPI.Controllers ...@@ -1269,6 +1276,7 @@ namespace WebAPI.Controllers
} }
List<dynamic> list_flow_doer = conn.Query<dynamic>(str_sql, List<dynamic> list_flow_doer = conn.Query<dynamic>(str_sql,
new { case_volume = case_volume, new { case_volume = case_volume,
list_country_id = list_country_id,
customer_name = customer_name, customer_name = customer_name,
ctrl_proc_id = ctrl_proc_id, ctrl_proc_id = ctrl_proc_id,
proc_status_id = proc_status_id, proc_status_id = proc_status_id,
......
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