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
e0a6aeca
Commit
e0a6aeca
authored
Dec 17, 2021
by
solho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:程序撤回加入重置運營辦參數流程
parent
ff39772e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
+11
-8
No files found.
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
View file @
e0a6aeca
...
...
@@ -348,7 +348,7 @@ namespace WebAPI.Controllers
ds
=
SqlToDs
(
cmd
);
#
endregion
String
Wade_User_ID
=
obj_input
[
"Wade_User_ID"
].
ToString
(),
Reject_Description
=
""
,
date0
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Tsql
=
""
,
RJTOp
=
""
;
String
Wade_User_ID
=
obj_input
[
"Wade_User_ID"
].
ToString
(),
Reject_Description
=
""
,
date0
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Tsql
=
""
,
TOopExecSP
=
""
;
//List<String> sql = new List<string>();
...
...
@@ -364,7 +364,7 @@ namespace WebAPI.Controllers
dsr
=
ds
.
Tables
[
0
].
Rows
[
i
];
try
{
RJTOp
=
""
;
TOopExecSP
=
""
;
Reject_Description
=
obj_input
[
"Reject_Description"
].
ToString
();
StepType_id_Previous
=
dsr
[
"StepType_id_Previous"
]
==
DBNull
.
Value
?
0
:
Convert
.
ToInt32
(
dsr
[
"StepType_id_Previous"
]);
//StepType_id_next = Convert.ToInt32(dsr["StepType_id_next"]);
...
...
@@ -409,7 +409,6 @@ namespace WebAPI.Controllers
else
//update
{
String
Map_Class
=
dsr
[
"Map_Class"
].
ToString
();
//String Step_Value_previous = dsr["Step_Value_previous"].ToString(), Step_Value_Next = dsr["Step_Value_Next"].ToString();
Tsql
=
Tsql
+
"update esn_todos_Flow set "
;
CStepTypeCur
=
AllStepType
.
Where
(
p
=>
p
.
id
==
StepType_id
).
FirstOrDefault
();
...
...
@@ -446,9 +445,13 @@ namespace WebAPI.Controllers
if
(
JtSn
[
"validclass"
].
ToString
()
==
"PG"
||
JtSn
[
"validclass"
].
ToString
()
==
"Leader"
)
{
RJTOp
+=
String
.
Format
(
@"update esn_todos_points set date_points_settlement=null where sn="
+
dsr
[
"sn"
]
+
";"
);
RJTOp
+=
String
.
Format
(
@"update esn_todos_Flow set Is_Settlement=0 where esn_todos_sn="
+
dsr
[
"sn"
]
+
";"
);
TOopExecSP
+=
String
.
Format
(
@"update esn_todos_points set date_points_settlement=null where sn="
+
dsr
[
"sn"
]
+
";"
);
TOopExecSP
+=
String
.
Format
(
@"update esn_todos_Flow set Is_Settlement=0 where esn_todos_sn="
+
dsr
[
"sn"
]
+
";"
);
if
(
JtSn
[
"validclass"
].
ToString
()
==
"PG"
)
{
TOopExecSP
+=
String
.
Format
(
@"exec [dbo].esp_esn_Todos_V3_AssignStatus 'AS05Back' ,"
+
dsr
[
"sn"
]
+
@",'',@Reject_Description_{0},'',@Wade_User_ID ;"
,
i
);
//強制拉回需重置運營辦狀態
}
}
#
endregion
}
else
if
(
Confirm_Method
==
"RJTOp"
)
...
...
@@ -457,7 +460,7 @@ namespace WebAPI.Controllers
Reject_DescriptionRJTOp
=
"承辦人:"
+
JtSn
[
"todos_Reject_Desc"
].
ToString
()
+
"<br>主管:"
+
Reject_Description
;
//Tsql = Tsql + "PG_IsConfirm =" + IsConfirm + "," + "PE_IsConfirm =" + IsConfirm + "," + "Leader_IsConfirm =" + IsConfirm + ","; //退回後,改為更新所有Flow狀態確認
//CStepTypeNext = AllStepType.Where(p => p.Step_Value == Step_Value_previous).FirstOrDefault();
RJTOp
=
String
.
Format
(
@"exec [dbo].esp_esn_Todos_V3_AssignStatus 'AS05' ,"
+
dsr
[
"sn"
]
+
@",'',@todos_Reject_Desc_{0},'',@Wade_User_ID ;"
,
i
);
//轉運營辦訊息改為與傳給SP同步
TOopExecSP
=
String
.
Format
(
@"exec [dbo].esp_esn_Todos_V3_AssignStatus 'AS05' ,"
+
dsr
[
"sn"
]
+
@",'',@todos_Reject_Desc_{0},'',@Wade_User_ID ;"
,
i
);
//轉運營辦訊息改為與傳給SP同步
cmd
.
Parameters
.
AddWithValue
(
string
.
Format
(
"@todos_Reject_Desc_{0}"
,
i
),
Reject_DescriptionRJTOp
);
//Reject_Description = Reject_DescriptionRJTOp;
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
CStepTypeCur
.
Step_Id_previous
).
FirstOrDefault
();
...
...
@@ -482,7 +485,7 @@ namespace WebAPI.Controllers
Tsql
+=
@"select @FlowId=id from @TempTable;
insert into esn_todos_Flow_his (Flow_id,ConfirmTime,FromType_id,ToType_id,ConfirmUserId,ConfirmUserClass,ConfirmMethod,Description,Create_User_id,Create_time) "
+
" values (@FlowId,'"
+
date0
+
"','"
+
StepType_idHis
+
"','"
+
CStepTypeNext
.
id
+
"',@Wade_User_ID,'"
+
CStepTypeCur
.
Map_Class
+
"','"
+
Confirm_Method
+
"',"
+
string
.
Format
(
"@Reject_Description_{0}"
,
i
)
+
",@Wade_User_ID,'"
+
date0
+
"'"
+
") ;"
;
Tsql
+=
RJTOp
;
Tsql
+=
TOopExecSP
;
}
catch
(
Exception
e
)
...
...
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