Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit aa840dcb
authored
May 31, 2014
by
Liv Haapala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
barcode fix
1 parent
1a1dec84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/BarcodeBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/BarcodeBean.java
View file @
aa840dc
...
@@ -328,6 +328,12 @@ public class BarcodeBean implements BarcodeBeanLocal {
...
@@ -328,6 +328,12 @@ public class BarcodeBean implements BarcodeBeanLocal {
Place
place
=
placeFacade
.
find
(
id
);
Place
place
=
placeFacade
.
find
(
id
);
return
place
;
return
place
;
}
else
if
(
barcode
.
contains
(
PLACE_TEXTCODEPREFIX
))
{
String
trimmedBarcode
=
barcode
.
substring
(
barcode
.
indexOf
(
PLACE_TEXTCODEPREFIX
));
int
id
=
Integer
.
parseInt
(
trimmedBarcode
.
substring
(
PLACE_TEXTCODEPREFIX
.
length
(),
trimmedBarcode
.
length
()));
Place
place
=
placeFacade
.
find
(
id
);
return
place
;
}
}
}
catch
(
NumberFormatException
x
)
{
}
catch
(
NumberFormatException
x
)
{
}
}
...
@@ -347,6 +353,13 @@ public class BarcodeBean implements BarcodeBeanLocal {
...
@@ -347,6 +353,13 @@ public class BarcodeBean implements BarcodeBeanLocal {
if
(
card
!=
null
)
if
(
card
!=
null
)
return
card
;
return
card
;
}
else
if
(
barcode
.
contains
(
PRINTED_CARD_BARCODEPREFIX
))
{
String
trimmedBarcode
=
barcode
.
substring
(
barcode
.
indexOf
(
PRINTED_CARD_BARCODEPREFIX
));
int
id
=
Integer
.
parseInt
(
trimmedBarcode
.
substring
(
3
,
trimmedBarcode
.
length
()
-
1
));
PrintedCard
card
=
printedCardFacade
.
find
(
id
);
if
(
card
!=
null
)
return
card
;
}
}
}
catch
(
NumberFormatException
x
)
{
}
catch
(
NumberFormatException
x
)
{
}
}
...
@@ -375,6 +388,13 @@ public class BarcodeBean implements BarcodeBeanLocal {
...
@@ -375,6 +388,13 @@ public class BarcodeBean implements BarcodeBeanLocal {
EventUser
user
=
userBean
.
findByEventUserId
(
id
);
EventUser
user
=
userBean
.
findByEventUserId
(
id
);
return
user
;
return
user
;
}
else
if
(
barcode
.
contains
(
EVENTUSER_BARCODEPREFIX
))
{
String
trimmedBarcode
=
barcode
.
substring
(
barcode
.
indexOf
(
EVENTUSER_BARCODEPREFIX
));
int
id
=
Integer
.
parseInt
(
trimmedBarcode
.
substring
(
3
,
trimmedBarcode
.
length
()
-
1
));
logger
.
debug
(
"finding user with barcode {} and id {}"
,
trimmedBarcode
,
id
);
EventUser
user
=
userBean
.
findByEventUserId
(
id
);
return
user
;
}
}
// try if it is our Eticket -code
// try if it is our Eticket -code
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment