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
a8c9e0c7
Commit
a8c9e0c7
authored
Jul 19, 2021
by
solho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,新增關帳相關
2.新增案件統計SP
parent
023fdbdf
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
49 deletions
+111
-49
WebAPI/Controllers/Esn_Subitem/Esn_todosController.cs
WebAPI/Controllers/Esn_Subitem/Esn_todosController.cs
+57
-0
WebAPI/Controllers/Esn_Subitem/Esn_todos_SettleController.cs
WebAPI/Controllers/Esn_Subitem/Esn_todos_SettleController.cs
+54
-49
No files found.
WebAPI/Controllers/Esn_Subitem/Esn_todosController.cs
View file @
a8c9e0c7
...
@@ -207,5 +207,62 @@ namespace WebAPI.Controllers
...
@@ -207,5 +207,62 @@ namespace WebAPI.Controllers
result
.
Content
=
new
StringContent
(
JsonConvert
.
SerializeObject
(
response
),
System
.
Text
.
Encoding
.
UTF8
,
"application/json"
);
result
.
Content
=
new
StringContent
(
JsonConvert
.
SerializeObject
(
response
),
System
.
Text
.
Encoding
.
UTF8
,
"application/json"
);
return
result
;
return
result
;
}
}
/// <summary>
/// 案件統計 SP測試1
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
[
Route
(
"rpt_CustCaseTot_board"
)]
[
CorsHandle
]
[
HttpPost
]
public
HttpResponseMessage
rpt_CustCaseTot_board
(
ParamModel
param
)
{
if
(
param
!=
null
&&
param
.
Input
!=
null
&&
!
string
.
IsNullOrWhiteSpace
((
param
.
Input
.
ToString
())))
{
string
input
=
param
.
Input
.
ToString
();
JObject
obj_input
=
JObject
.
Parse
(
input
.
ToString
());
try
{
using
(
SqlConnection
Conn
=
new
SqlConnection
(
connString
))
{
String
sqlstr
=
"[dbo].[rpt_CustCaseTot_board] @Start_YM,@End_YM,@RptType,@CustName,@DisplayType,@DataMode ;"
;
SqlCommand
cmd
=
new
SqlCommand
(
""
,
Conn
)
{
CommandText
=
sqlstr
};
cmd
.
Parameters
.
AddWithValue
(
"@Start_YM"
,
obj_input
[
"Start_YM"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@End_YM"
,
obj_input
[
"End_YM"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@RptType"
,
obj_input
[
"RptType"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@CustName"
,
obj_input
[
"CustName"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@DisplayType"
,
obj_input
[
"DisplayType"
].
ToString
());
cmd
.
Parameters
.
AddWithValue
(
"@DataMode"
,
obj_input
[
"DataMode"
].
ToString
());
DataTable
dt
=
SqlToDt
(
cmd
);
DataRow
dr
;
for
(
int
i
=
0
;
i
<
dt
.
Rows
.
Count
;
i
++)
{
dr
=
dt
.
Rows
[
i
];
}
response
.
Code
=
"1"
;
string
JSONString
=
string
.
Empty
;
JSONString
=
JsonConvert
.
SerializeObject
(
dt
);
response
.
Msg
=
JSONString
;
}
}
catch
(
Exception
e
)
{
response
.
Code
=
"0"
;
response
.
Msg
=
"Exception:"
+
e
.
StackTrace
;
}
}
else
{
response
.
Code
=
"0"
;
response
.
Msg
=
"no input or format error"
;
}
result
.
Content
=
new
StringContent
(
JsonConvert
.
SerializeObject
(
response
),
System
.
Text
.
Encoding
.
UTF8
,
"application/json"
);
return
result
;
}
}
}
}
}
WebAPI/Controllers/Esn_Subitem/Esn_todos_SettleController.cs
View file @
a8c9e0c7
This diff is collapsed.
Click to expand it.
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