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
3457384b
Commit
3457384b
authored
Aug 20, 2021
by
solho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入關帳比對
parent
12b8398f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
+14
-8
No files found.
WebAPI/Controllers/Esn_Subitem/Esn_Todos_FlowController.cs
View file @
3457384b
...
@@ -398,11 +398,14 @@ namespace WebAPI.Controllers
...
@@ -398,11 +398,14 @@ namespace WebAPI.Controllers
#
endregion
#
endregion
//Confirm_Class.Add("PG"); Confirm_Class.Add("Leader"); //test
//Confirm_Class.Add("PG"); Confirm_Class.Add("Leader"); //test
#
region
取得
FLOW
相關
#
region
取得
FLOW
相關
cmd
.
CommandText
=
@"select et.*,etf.id AS Flowid,etf.*,
cmd
.
CommandText
=
@"select et
s.Settle_Date,case when ets.isClosed=1 then 1 else 0 end SettleisClosed,et
.*,etf.id AS Flowid,etf.*,
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 et.sn in(@Esn_Todos_Sn)
left join esn_todos_points etp on etp.sn=et.sn
left join evw_Employee eel on eel.user_id=et.AssignedTo_userid
left join esn_todos_Settle ets on ets.DSNum =eel.Emp_DSNum and DATEDIFF(MONTH,etp.date_points_settlement,ets.Settle_Date)=0
where et.sn in(@Esn_Todos_Sn)
"
;
"
;
...
@@ -426,6 +429,7 @@ namespace WebAPI.Controllers
...
@@ -426,6 +429,7 @@ namespace WebAPI.Controllers
JToken
JtSn
;
JToken
JtSn
;
//List<String> sql = new List<string>();
//List<String> sql = new List<string>();
int
StepType_id_Previous
,
StepType_id
,
StepType_idHis
;
int
StepType_id_Previous
,
StepType_id
,
StepType_idHis
;
Boolean
SettleisClosed
=
false
;
DataRow
dsr
;
DataRow
dsr
;
//foreach (DataRow dr in ds.Tables[0].Rows)
//foreach (DataRow dr in ds.Tables[0].Rows)
for
(
int
i
=
0
;
i
<
ds
.
Tables
[
0
].
Rows
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
ds
.
Tables
[
0
].
Rows
.
Count
;
i
++)
...
@@ -441,10 +445,10 @@ namespace WebAPI.Controllers
...
@@ -441,10 +445,10 @@ namespace WebAPI.Controllers
if
(
dsr
[
"esn_todos_sn"
]
==
DBNull
.
Value
)
//insert
if
(
dsr
[
"esn_todos_sn"
]
==
DBNull
.
Value
)
//insert
{
{
CStepTypeCur
=
AllStepType
.
Where
(
p
=>
p
.
Map_Class
.
Contains
(
JtSn
[
"
valid
class"
].
ToString
())).
FirstOrDefault
();
CStepTypeCur
=
AllStepType
.
Where
(
p
=>
p
.
Map_Class
.
Contains
(
JtSn
[
"
target
class"
].
ToString
())).
FirstOrDefault
();
StepType_idHis
=
CStepTypeCur
.
id
;
StepType_idHis
=
CStepTypeCur
.
id
;
if
(!
string
.
IsNullOrEmpty
(
JtSn
[
"targetclass"
].
ToString
()))
if
(
JtSn
[
"targetclass"
]
!=
null
&&
!
string
.
IsNullOrEmpty
(
JtSn
[
"targetclass"
].
ToString
()))
{
{
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
AllStepType
.
Where
(
p2
=>
p2
.
Map_Class
==
JtSn
[
"targetclass"
].
ToString
()).
FirstOrDefault
().
id
).
FirstOrDefault
();
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
AllStepType
.
Where
(
p2
=>
p2
.
Map_Class
==
JtSn
[
"targetclass"
].
ToString
()).
FirstOrDefault
().
id
).
FirstOrDefault
();
}
}
...
@@ -467,12 +471,14 @@ namespace WebAPI.Controllers
...
@@ -467,12 +471,14 @@ namespace WebAPI.Controllers
//{
//{
// return_msg_error.Add(dsr["esn_todos_sn"] + ":該流程已異動, 不可變更");
// return_msg_error.Add(dsr["esn_todos_sn"] + ":該流程已異動, 不可變更");
//}
//}
SettleisClosed
=
dsr
[
"SettleisClosed"
].
ToString
()
==
"1"
?
true
:
false
;
if
(
SettleisClosed
)
return_msg_error
.
Add
(
dsr
[
"esn_todos_sn"
]
+
":該流程 "
+
Convert
.
ToDateTime
(
dsr
[
"Settle_Date"
]).
ToString
(
" yyyy年MM月 "
)
+
"已關帳, 不可變更"
);
#
endregion
#
endregion
CStepTypeCur
=
AllStepType
.
Where
(
p
=>
p
.
id
==
StepType_id
).
FirstOrDefault
();
CStepTypeCur
=
AllStepType
.
Where
(
p
=>
p
.
id
==
StepType_id
).
FirstOrDefault
();
if
(!
string
.
IsNullOrEmpty
(
JtSn
[
"targetclass"
].
ToString
()))
if
(
JtSn
[
"targetclass"
]
!=
null
&&
!
string
.
IsNullOrEmpty
(
JtSn
[
"targetclass"
].
ToString
()))
{
{
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
AllStepType
.
Where
(
p2
=>
p2
.
Map_Class
==
JtSn
[
"targetclass"
].
ToString
()).
FirstOrDefault
().
id
).
FirstOrDefault
();
CStepTypeNext
=
AllStepType
.
Where
(
p
=>
p
.
id
==
AllStepType
.
Where
(
p2
=>
p2
.
Map_Class
==
JtSn
[
"targetclass"
].
ToString
()).
FirstOrDefault
().
id
).
FirstOrDefault
();
}
}
...
@@ -521,7 +527,7 @@ namespace WebAPI.Controllers
...
@@ -521,7 +527,7 @@ namespace WebAPI.Controllers
}
}
else
else
{
{
Tsql
=
Tsql
+
CStepTypeCur
.
Map_Class
+
"_IsConfirm ="
+
IsConfirm
+
","
;
//
Tsql = Tsql + CStepTypeCur.Map_Class + "_IsConfirm =" + IsConfirm + ",";
StepType_idHis
=
CStepTypeCur
.
id
;
StepType_idHis
=
CStepTypeCur
.
id
;
}
}
Tsql
=
Tsql
+
" StepType_id = '"
+
CStepTypeNext
.
id
+
"',StepType_id_Previous = '"
+
CStepTypeCur
.
id
+
Tsql
=
Tsql
+
" StepType_id = '"
+
CStepTypeNext
.
id
+
"',StepType_id_Previous = '"
+
CStepTypeCur
.
id
+
...
...
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