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
283b4ef9
Commit
283b4ef9
authored
Jun 10, 2021
by
季圣华
Browse files
解决单据查询的时候仓库参数bug
parent
c32c11f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
283b4ef9
...
...
@@ -27,7 +27,7 @@ public interface DepotHeadMapperEx {
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"materialParam"
)
String
materialParam
,
@Param
(
"depot
Ids
"
)
String
depot
Ids
,
@Param
(
"depot
Array
"
)
String
[]
depot
Array
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
...
...
@@ -40,7 +40,7 @@ public interface DepotHeadMapperEx {
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"materialParam"
)
String
materialParam
,
@Param
(
"depot
Ids
"
)
String
depot
Ids
);
@Param
(
"depot
Array
"
)
String
[]
depot
Array
);
String
findMaterialsListByHeaderId
(
@Param
(
"id"
)
Long
id
);
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
283b4ef9
...
...
@@ -99,12 +99,13 @@ public class DepotHeadService {
List
<
DepotHeadVo4List
>
list
=
new
ArrayList
<>();
try
{
String
depotIds
=
depotService
.
findDepotStrByCurrentUser
();
String
[]
depotArray
=
depotIds
.
split
(
","
);
String
[]
creatorArray
=
getCreatorArray
(
roleType
);
Map
<
Long
,
String
>
personMap
=
personService
.
getPersonMap
();
Map
<
Long
,
String
>
accountMap
=
accountService
.
getAccountMap
();
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
list
=
depotHeadMapperEx
.
selectByConditionDepotHead
(
type
,
subType
,
creatorArray
,
status
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Ids
,
offset
,
rows
);
list
=
depotHeadMapperEx
.
selectByConditionDepotHead
(
type
,
subType
,
creatorArray
,
status
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Array
,
offset
,
rows
);
if
(
null
!=
list
)
{
for
(
DepotHeadVo4List
dh
:
list
)
{
if
(
accountMap
!=
null
&&
StringUtil
.
isNotEmpty
(
dh
.
getAccountIdList
())
&&
StringUtil
.
isNotEmpty
(
dh
.
getAccountMoneyList
()))
{
...
...
@@ -146,10 +147,11 @@ public class DepotHeadService {
Long
result
=
null
;
try
{
String
depotIds
=
depotService
.
findDepotStrByCurrentUser
();
String
[]
depotArray
=
depotIds
.
split
(
","
);
String
[]
creatorArray
=
getCreatorArray
(
roleType
);
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
result
=
depotHeadMapperEx
.
countsByDepotHead
(
type
,
subType
,
creatorArray
,
status
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Ids
);
result
=
depotHeadMapperEx
.
countsByDepotHead
(
type
,
subType
,
creatorArray
,
status
,
number
,
beginTime
,
endTime
,
materialParam
,
depot
Array
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
283b4ef9
...
...
@@ -74,8 +74,12 @@
<bind
name=
"bindKey"
value=
"'%'+materialParam+'%'"
/>
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
</if>
<if
test=
"depotIds != null and depotIds !=''"
>
and di.depot_id in (#{depotIds})
<if
test=
"depotArray != null and depotArray !=''"
>
and di.depot_id in (
<foreach
collection=
"depotArray"
item=
"depotId"
separator=
","
>
#{depotId}
</foreach>
)
</if>
<if
test=
"creatorArray != null"
>
and dh.creator in (
...
...
@@ -120,8 +124,12 @@
<bind
name=
"bindKey"
value=
"'%'+materialParam+'%'"
/>
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
</if>
<if
test=
"depotIds != null and depotIds !=''"
>
and di.depot_id in (#{depotIds})
<if
test=
"depotArray != null and depotArray !=''"
>
and di.depot_id in (
<foreach
collection=
"depotArray"
item=
"depotId"
separator=
","
>
#{depotId}
</foreach>
)
</if>
<if
test=
"creatorArray != null"
>
and dh.creator in (
...
...
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