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
a4625ed8
Commit
a4625ed8
authored
Apr 01, 2015
by
TongZuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init create CheckQuqueWorkflow
parent
e56debe3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
2 deletions
+50
-2
CscConnection.java
com/csc/library/database/CscConnection.java
+1
-1
WorkflowProcess.java
com/csc/library/process/WorkflowProcess.java
+0
-1
GenProcessQuque.java
com/csc/library/service/GenProcessQuque.java
+49
-0
No files found.
com/csc/library/database/CscConnection.java
View file @
a4625ed8
...
...
@@ -1050,7 +1050,7 @@ public class CscConnection implements Connection {
}
public
NClob
createNClob
()
throws
SQLException
{
// TODO Auto-generated method stub
// TODO Auto-generated meth
t
od stub
return
null
;
}
...
...
com/csc/library/process/WorkflowProcess.java
View file @
a4625ed8
...
...
@@ -49,5 +49,4 @@ public class WorkflowProcess extends MyProcess {
workflow_data
.
save
();
}
}
}
com/csc/library/service/GenProcessQuque.java
View file @
a4625ed8
...
...
@@ -7,13 +7,17 @@ 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
;
import
com.csc.library.database.StaticProperties
;
import
com.csc.library.process.DbProcess
;
import
com.csc.library.session.DbInquiry
;
import
com.csc.library.session.DbRecord
;
import
com.csc.library.session.InitialEnvironment
;
import
com.csc.library.session.InitialInquiry
;
import
com.csc.library.session.InitialProcess
;
import
com.csc.library.session.InitialRecord
;
import
com.csc.library.utilities.CscCalendar
;
...
...
@@ -324,6 +328,9 @@ 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
)
){
return
""
;
}
DbRecord
db
=
new
InitialRecord
(
upf
).
getDbRecord
(
"com.csc.entity.CSC_Quque"
);
CscCalendar
d
=
new
CscCalendar
();
InitialEnvironment
inv
=
new
InitialEnvironment
(
"GLOBAL"
);
...
...
@@ -362,4 +369,46 @@ public class GenProcessQuque extends ThreadProcess {
return
processID
;
}
private
boolean
isDuplicateProcessWorkflow
(
UProfile
up
,
HashMap
param
,
String
processType
){
if
(
processType
.
equalsIgnoreCase
(
"W"
)){
if
(
param
.
containsKey
(
"wf_seq_no"
)
&&
param
.
containsKey
(
"step_id"
)){
String
wf_seq_no
=
param
.
get
(
"wf_seq_no"
).
toString
();
String
step_id
=
param
.
get
(
"step_id"
).
toString
();
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
.
setColumn
(
"ququeid,referkey,companyid"
);
inqQ
.
setFilter
(
filter
);
DbRecord
workflow_data
=
new
InitialRecord
(
this
.
getUProfile
()).
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
){
workflow_data
.
set
(
"q_status"
,
"W"
);
workflow_data
.
setWFOff
();
if
(
workflow_data
.
save
()
>
0
){
return
false
;
}
}
}
}
catch
(
Exception
e
){
MyLog
.
error
(
this
,
up
,
e
);
}
finally
{
if
(
inqQ
!=
null
){
inqQ
.
closeConnection
();
}
}
}
}
else
{
return
false
;
}
return
true
;
}
}
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