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
0abd4531
Commit
0abd4531
authored
Apr 27, 2021
by
solho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正新增流程
parent
08db1d4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
+9
-5
No files found.
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
View file @
0abd4531
...
@@ -188,7 +188,7 @@ namespace WebAPI.Controllers
...
@@ -188,7 +188,7 @@ namespace WebAPI.Controllers
etfs.* FROM esn_todos et
etfs.* FROM esn_todos et
left join esn_todos_Flow etf on et.sn=etf.esn_todos_sn
left join esn_todos_Flow etf on et.sn=etf.esn_todos_sn
left join esn_todos_Flow_StepType etfs on etfs.id=etf.StepType_id
left join esn_todos_Flow_StepType etfs on etfs.id=etf.StepType_id
where
Esn_Todos_S
n in(@Esn_Todos_Sn)
where
et.s
n in(@Esn_Todos_Sn)
"
;
"
;
...
@@ -212,9 +212,9 @@ namespace WebAPI.Controllers
...
@@ -212,9 +212,9 @@ namespace WebAPI.Controllers
int
StepType_id_Previous
,
StepType_id
;
int
StepType_id_Previous
,
StepType_id
;
foreach
(
DataRow
dr
in
ds
.
Tables
[
0
].
Rows
)
foreach
(
DataRow
dr
in
ds
.
Tables
[
0
].
Rows
)
{
{
StepType_id_Previous
=
Convert
.
ToInt32
(
dr
[
"StepType_id_Previous"
]);
StepType_id_Previous
=
dr
[
"StepType_id_Previous"
]
==
DBNull
.
Value
?
0
:
Convert
.
ToInt32
(
dr
[
"StepType_id_Previous"
]);
//StepType_id_next = Convert.ToInt32(dr["StepType_id_next"]);
//StepType_id_next = Convert.ToInt32(dr["StepType_id_next"]);
StepType_id
=
Convert
.
ToInt32
(
dr
[
"StepType_id"
]);
StepType_id
=
dr
[
"StepType_id"
]
==
DBNull
.
Value
?
0
:
Convert
.
ToInt32
(
dr
[
"StepType_id"
]);
Esn_Todos_Flow_StepTypeModel
CStepTypeNext
=
new
Esn_Todos_Flow_StepTypeModel
(),
CStepTypeCur
=
new
Esn_Todos_Flow_StepTypeModel
();
Esn_Todos_Flow_StepTypeModel
CStepTypeNext
=
new
Esn_Todos_Flow_StepTypeModel
(),
CStepTypeCur
=
new
Esn_Todos_Flow_StepTypeModel
();
if
(
dr
[
"esn_todos_sn"
]
==
DBNull
.
Value
)
//insert
if
(
dr
[
"esn_todos_sn"
]
==
DBNull
.
Value
)
//insert
{
{
...
@@ -224,7 +224,7 @@ namespace WebAPI.Controllers
...
@@ -224,7 +224,7 @@ namespace WebAPI.Controllers
Tsql
=
@"insert into esn_todos_Flow(esn_todos_sn,[StepType_id],["
+
CStepTypeCur
.
Map_Class
Tsql
=
@"insert into esn_todos_Flow(esn_todos_sn,[StepType_id],["
+
CStepTypeCur
.
Map_Class
+
@"_IsConfirm],StepType_id_Previous,Description,[create_user_id],[Create_time],update_user_id,update_time) "
+
@"_IsConfirm],StepType_id_Previous,Description,[create_user_id],[Create_time],update_user_id,update_time) "
+
" OUTPUT Inserted.id into @TempTable "
+
" OUTPUT Inserted.id into @TempTable "
+
" values ("
+
dr
[
"
esn_todos_
sn"
]
+
",'"
+
CStepTypeNext
.
id
+
"',"
+
IsConfirm
+
",'"
+
1
+
" values ("
+
dr
[
"sn"
]
+
",'"
+
CStepTypeNext
.
id
+
"',"
+
IsConfirm
+
",'"
+
1
+
"','"
+
Reject_Description
+
"','"
+
Wade_User_ID
+
"'"
+
",'"
+
date0
+
"'"
+
",'"
+
Wade_User_ID
+
"'"
+
",'"
+
date0
+
"'"
+
"); "
+
"','"
+
Reject_Description
+
"','"
+
Wade_User_ID
+
"'"
+
",'"
+
date0
+
"'"
+
",'"
+
Wade_User_ID
+
"'"
+
",'"
+
date0
+
"'"
+
"); "
;
;
...
@@ -258,8 +258,12 @@ namespace WebAPI.Controllers
...
@@ -258,8 +258,12 @@ namespace WebAPI.Controllers
{
{
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
StepType_id_Previous
).
FirstOrDefault
();
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
StepType_id_Previous
).
FirstOrDefault
();
CStepTypeCur
.
id
=
CStepTypeNext
.
id
;
//回復與下一步 同ID
CStepTypeCur
.
id
=
CStepTypeNext
.
id
;
//回復與下一步 同ID
Tsql
=
Tsql
+
CStepTypeCur
.
Map_Class
+
"_IsConfirm ="
+
IsConfirm
+
","
;
}
else
{
Tsql
=
Tsql
+
CStepTypeCur
.
Map_Class
+
"_IsConfirm ="
+
IsConfirm
+
","
;
}
}
Tsql
=
Tsql
+
CStepTypeCur
.
Map_Class
+
"_IsConfirm ="
+
IsConfirm
+
","
;
Tsql
=
Tsql
+
" StepType_id = '"
+
CStepTypeNext
.
id
+
"',StepType_id_Previous = '"
+
CStepTypeCur
.
id
+
Tsql
=
Tsql
+
" StepType_id = '"
+
CStepTypeNext
.
id
+
"',StepType_id_Previous = '"
+
CStepTypeCur
.
id
+
"',Description = '"
+
Reject_Description
+
"',update_user_id='"
+
Wade_User_ID
+
"',update_time='"
+
date0
+
"' "
"',Description = '"
+
Reject_Description
+
"',update_user_id='"
+
Wade_User_ID
+
"',update_time='"
+
date0
+
"' "
+
" output Inserted.id into @TempTable where id ="
+
dr
[
"Flowid"
]
+
";"
+
" output Inserted.id into @TempTable where id ="
+
dr
[
"Flowid"
]
+
";"
...
...
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