Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CSCFrameWorkV4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
TongZuu
CSCFrameWorkV4
Commits
f94d69c4
Commit
f94d69c4
authored
May 13, 2015
by
TongZuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complete feature
parent
a4625ed8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
GenProcessQuque.java
com/csc/library/service/GenProcessQuque.java
+13
-14
No files found.
com/csc/library/service/GenProcessQuque.java
View file @
f94d69c4
...
...
@@ -7,8 +7,6 @@ import java.rmi.RemoteException;
import
java.util.HashMap
;
import
java.util.Vector
;
import
koala.dynamicjava.tree.ThisExpression
;
import
org.apache.commons.lang.StringUtils
;
import
com.csc.entity.CSC_Quque
;
...
...
@@ -243,7 +241,6 @@ public class GenProcessQuque extends ThreadProcess {
public
String
createQuque
(
UProfile
upf
,
String
engName
,
String
thaiName
,
String
className
,
String
screenName
,
String
remark
,
String
priority
,
HashMap
condition
,
String
export_type
,
String
process_group
,
String
process_type
,
String
conName
)
throws
Exception
{
DbRecord
db
=
new
InitialRecord
(
upf
).
getDbRecord
(
"com.csc.entity.CSC_Quque"
);
this
.
param
.
put
(
conName
,
condition
);
CscCalendar
d
=
new
CscCalendar
();
...
...
@@ -328,7 +325,7 @@ public class GenProcessQuque extends ThreadProcess {
}
public
String
createImmediateQueue
(
UProfile
upf
,
HashMap
paramdata
,
String
engName
,
String
thaiName
,
String
screenName
,
String
remark
,
String
classname
,
String
process_type
,
String
referkey
)
throws
RemoteException
{
if
(
this
.
isDuplicateProcessWorkflow
(
upf
,
param
,
process_type
)
){
if
(
this
.
isDuplicateProcessWorkflow
(
upf
,
param
data
,
process_type
,
referkey
)
){
return
""
;
}
DbRecord
db
=
new
InitialRecord
(
upf
).
getDbRecord
(
"com.csc.entity.CSC_Quque"
);
...
...
@@ -369,33 +366,35 @@ public class GenProcessQuque extends ThreadProcess {
return
processID
;
}
private
boolean
isDuplicateProcessWorkflow
(
UProfile
up
,
HashMap
param
,
String
processType
){
private
boolean
isDuplicateProcessWorkflow
(
UProfile
up
,
HashMap
param
,
String
processType
,
String
referkey
){
if
(
processType
.
equalsIgnoreCase
(
"W"
)){
if
(
param
.
containsKey
(
"
wf_seq_
no"
)
&&
param
.
containsKey
(
"step_id"
)){
String
wf_seq_no
=
param
.
get
(
"
wf_seq_
no"
).
toString
();
if
(
param
.
containsKey
(
"
run
no"
)
&&
param
.
containsKey
(
"step_id"
)){
String
wf_seq_no
=
param
.
get
(
"
run
no"
).
toString
();
String
step_id
=
param
.
get
(
"step_id"
).
toString
();
String
referkey
=
up
.
getEmployee
()+
"$"
+
wf_seq_no
+
"$"
+
step_id
;
//
String referkey = up.getEmployee()+"$"+wf_seq_no+"$"+step_id;
String
filter
=
"referkey='"
+
referkey
+
"'"
;
if
(
param
.
containsKey
(
"transfer_id"
)){
filter
=
"("
+
referkey
+
" or TR"
+
param
.
get
(
"transfer_id"
).
toString
()+
"$"
+
wf_seq_no
+
"$"
+
step_id
+
")"
;
}
DbInquiry
inqQ
=
null
;
try
{
inqQ
=
new
InitialInquiry
(
this
.
getUProfile
()
).
getDbInquiry
(
"com.csc.entity.CSC_Quque"
);
inqQ
=
new
InitialInquiry
(
up
).
getDbInquiry
(
"com.csc.entity.CSC_Quque"
);
inqQ
.
setColumn
(
"ququeid,referkey,companyid"
);
inqQ
.
setFilter
(
filter
);
DbRecord
workflow_data
=
new
InitialRecord
(
this
.
getUProfile
()
).
getDbRecord
(
"Workflow_data_notrigger"
);
DbRecord
workflow_data
=
new
InitialRecord
(
up
).
getDbRecord
(
"Workflow_data_notrigger"
);
workflow_data
.
setWFOff
();
workflow_data
.
setColumn
(
workflow_data
.
getListKey
()
+
",q_status"
);
workflow_data
.
set
(
"runno"
,
wf_seq_no
);
if
(
workflow_data
.
search
(
"runno"
)
==
1
){
if
(
workflow_data
.
getString
(
"q_status"
).
equalsIgnoreCase
(
"F"
)
&&
inqQ
.
recCount
()
==
0
){
if
(
(!
workflow_data
.
getString
(
"q_status"
).
equalsIgnoreCase
(
"R"
)
&&
!
workflow_data
.
getString
(
"q_status"
).
equalsIgnoreCase
(
"W"
)
&&
!
workflow_data
.
getString
(
"q_status"
).
equalsIgnoreCase
(
"E"
))
&&
inqQ
.
recCount
()
==
0
){
// óշ͡ ͡ʶҹоӧҹ q ѧӧҹ
workflow_data
.
set
(
"q_status"
,
"W"
);
workflow_data
.
setWFOff
();
if
(
workflow_data
.
save
()
>
0
){
return
false
;
}
}
else
{
// ó͡ ͡ӧҹ Q ӧҹ
return
true
;
}
}
}
catch
(
Exception
e
){
...
...
@@ -406,9 +405,9 @@ public class GenProcessQuque extends ThreadProcess {
}
}
}
}
else
{
return
fals
e
;
}
else
{
// óշ Workflow
return
tru
e
;
}
return
tru
e
;
return
fals
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