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
c84f5c1e
Commit
c84f5c1e
authored
Jul 19, 2022
by
solho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:改以 i_request_info 為主表
parent
3ce48f60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
WebAPI/Controllers/EssenToCrmController.cs
WebAPI/Controllers/EssenToCrmController.cs
+5
-3
No files found.
WebAPI/Controllers/EssenToCrmController.cs
View file @
c84f5c1e
...
...
@@ -44,13 +44,15 @@ namespace WebAPI.Controllers
JObject
obj_input
=
JObject
.
Parse
(
input
.
ToString
());
using
(
SqlConnection
Conn
=
new
SqlConnection
(
connString
))
{
var
dysql
=
Conn
.
QueryBuilder
(
$@" select eri.request_id,eri.customer_id,iri.invoice_title, cc.customer_name from essen_request_info eri
left join i_request_info iri on eri.request_id=iri.request_id
var
dysql
=
Conn
.
QueryBuilder
(
$@" select eri.request_id,eri.customer_id,iri.invoice_title
,case when cc.customer_name is null then iri.invoice_title else cc.customer_name end as customer_name
from essen_request_info eri
right join i_request_info iri on eri.request_id=iri.request_id
left join c_customer cc on cc.customer_id=eri.customer_id
/**where**/ "
);
if
(
obj_input
[
"request_id"
]
!=
null
)
{
dysql
.
Where
(
$"
e
ri.request_id =
{
obj_input
[
"request_id"
].
ToString
()}
"
);
dysql
.
Where
(
$"
i
ri.request_id =
{
obj_input
[
"request_id"
].
ToString
()}
"
);
}
if
(
obj_input
[
"customer_id"
]
!=
null
)
{
...
...
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