Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
fdfd69c2
Commit
fdfd69c2
authored
Dec 13, 2021
by
季圣华
Browse files
优化解决接口中仓库排序的bug
parent
da275197
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/depot/DepotService.java
View file @
fdfd69c2
...
@@ -231,7 +231,7 @@ public class DepotService {
...
@@ -231,7 +231,7 @@ public class DepotService {
public
List
<
Depot
>
findUserDepot
()
throws
Exception
{
public
List
<
Depot
>
findUserDepot
()
throws
Exception
{
DepotExample
example
=
new
DepotExample
();
DepotExample
example
=
new
DepotExample
();
example
.
createCriteria
().
andTypeEqualTo
(
0
).
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
createCriteria
().
andTypeEqualTo
(
0
).
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
example
.
setOrderByClause
(
"
S
ort"
);
example
.
setOrderByClause
(
"
s
ort"
);
List
<
Depot
>
list
=
null
;
List
<
Depot
>
list
=
null
;
try
{
try
{
list
=
depotMapper
.
selectByExample
(
example
);
list
=
depotMapper
.
selectByExample
(
example
);
...
@@ -241,19 +241,6 @@ public class DepotService {
...
@@ -241,19 +241,6 @@ public class DepotService {
return
list
;
return
list
;
}
}
public
List
<
Depot
>
findGiftByType
(
Integer
type
)
throws
Exception
{
DepotExample
example
=
new
DepotExample
();
example
.
createCriteria
().
andTypeEqualTo
(
type
);
example
.
setOrderByClause
(
"Sort"
);
List
<
Depot
>
list
=
null
;
try
{
list
=
depotMapper
.
selectByExample
(
example
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
list
;
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateIsDefault
(
Long
depotId
)
throws
Exception
{
public
int
updateIsDefault
(
Long
depotId
)
throws
Exception
{
int
result
=
0
;
int
result
=
0
;
...
@@ -309,16 +296,16 @@ public class DepotService {
...
@@ -309,16 +296,16 @@ public class DepotService {
if
(
StringUtil
.
isNotEmpty
(
depotStr
)){
if
(
StringUtil
.
isNotEmpty
(
depotStr
)){
depotStr
=
depotStr
.
replaceAll
(
"\\["
,
""
).
replaceAll
(
"]"
,
","
);
depotStr
=
depotStr
.
replaceAll
(
"\\["
,
""
).
replaceAll
(
"]"
,
","
);
String
[]
depotArr
=
depotStr
.
split
(
","
);
String
[]
depotArr
=
depotStr
.
split
(
","
);
for
(
String
depotId:
depotArr
)
{
for
(
Depot
depot
:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
for
(
String
depotId:
depotArr
)
{
item
.
put
(
"id"
,
Long
.
parseLong
(
depotId
));
for
(
Depot
depot
:
dataList
)
{
if
(
depot
.
getId
()
==
Long
.
parseLong
(
depotId
)){
if
(
depot
.
getId
()
==
Long
.
parseLong
(
depotId
)){
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"id"
,
depot
.
getId
());
item
.
put
(
"depotName"
,
depot
.
getName
());
item
.
put
(
"depotName"
,
depot
.
getName
());
item
.
put
(
"isDefault"
,
depot
.
getIsDefault
());
item
.
put
(
"isDefault"
,
depot
.
getIsDefault
());
arr
.
add
(
item
);
}
}
}
}
arr
.
add
(
item
);
}
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
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