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
9fadc1e0
Commit
9fadc1e0
authored
Jul 15, 2021
by
季圣华
Browse files
给财务单据增加查询条件
parent
6a4b4e27
Changes
4
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/AccountHeadMapperEx.java
View file @
9fadc1e0
...
...
@@ -17,6 +17,9 @@ public interface AccountHeadMapperEx {
@Param
(
"billNo"
)
String
billNo
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"organId"
)
Long
organId
,
@Param
(
"creator"
)
Long
creator
,
@Param
(
"handsPersonId"
)
Long
handsPersonId
,
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
...
...
@@ -25,7 +28,10 @@ public interface AccountHeadMapperEx {
@Param
(
"creatorArray"
)
String
[]
creatorArray
,
@Param
(
"billNo"
)
String
billNo
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"organId"
)
Long
organId
,
@Param
(
"creator"
)
Long
creator
,
@Param
(
"handsPersonId"
)
Long
handsPersonId
);
BigDecimal
findAllMoney
(
@Param
(
"supplierId"
)
Integer
supplierId
,
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadComponent.java
View file @
9fadc1e0
...
...
@@ -36,8 +36,10 @@ public class AccountHeadComponent implements ICommonQuery {
String
billNo
=
StringUtil
.
getInfo
(
search
,
"billNo"
);
String
beginTime
=
StringUtil
.
getInfo
(
search
,
"beginTime"
);
String
endTime
=
StringUtil
.
getInfo
(
search
,
"endTime"
);
String
order
=
QueryUtils
.
order
(
map
);
return
accountHeadService
.
select
(
type
,
roleType
,
billNo
,
beginTime
,
endTime
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
Long
organId
=
StringUtil
.
parseStrLong
(
StringUtil
.
getInfo
(
search
,
"organId"
));
Long
creator
=
StringUtil
.
parseStrLong
(
StringUtil
.
getInfo
(
search
,
"creator"
));
Long
handsPersonId
=
StringUtil
.
parseStrLong
(
StringUtil
.
getInfo
(
search
,
"handsPersonId"
));
return
accountHeadService
.
select
(
type
,
roleType
,
billNo
,
beginTime
,
endTime
,
organId
,
creator
,
handsPersonId
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
@Override
...
...
@@ -48,7 +50,10 @@ public class AccountHeadComponent implements ICommonQuery {
String
billNo
=
StringUtil
.
getInfo
(
search
,
"billNo"
);
String
beginTime
=
StringUtil
.
getInfo
(
search
,
"beginTime"
);
String
endTime
=
StringUtil
.
getInfo
(
search
,
"endTime"
);
return
accountHeadService
.
countAccountHead
(
type
,
roleType
,
billNo
,
beginTime
,
endTime
);
Long
organId
=
StringUtil
.
parseStrLong
(
StringUtil
.
getInfo
(
search
,
"organId"
));
Long
creator
=
StringUtil
.
parseStrLong
(
StringUtil
.
getInfo
(
search
,
"creator"
));
Long
handsPersonId
=
StringUtil
.
parseStrLong
(
StringUtil
.
getInfo
(
search
,
"handsPersonId"
));
return
accountHeadService
.
countAccountHead
(
type
,
roleType
,
billNo
,
beginTime
,
endTime
,
organId
,
creator
,
handsPersonId
);
}
@Override
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java
View file @
9fadc1e0
...
...
@@ -87,13 +87,14 @@ public class AccountHeadService {
return
list
;
}
public
List
<
AccountHeadVo4ListEx
>
select
(
String
type
,
String
roleType
,
String
billNo
,
String
beginTime
,
String
endTime
,
int
offset
,
int
rows
)
throws
Exception
{
public
List
<
AccountHeadVo4ListEx
>
select
(
String
type
,
String
roleType
,
String
billNo
,
String
beginTime
,
String
endTime
,
Long
organId
,
Long
creator
,
Long
handsPersonId
,
int
offset
,
int
rows
)
throws
Exception
{
List
<
AccountHeadVo4ListEx
>
resList
=
new
ArrayList
<>();
try
{
String
[]
creatorArray
=
getCreatorArray
(
roleType
);
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
List
<
AccountHeadVo4ListEx
>
list
=
accountHeadMapperEx
.
selectByConditionAccountHead
(
type
,
creatorArray
,
billNo
,
beginTime
,
endTime
,
offset
,
rows
);
List
<
AccountHeadVo4ListEx
>
list
=
accountHeadMapperEx
.
selectByConditionAccountHead
(
type
,
creatorArray
,
billNo
,
beginTime
,
endTime
,
organId
,
creator
,
handsPersonId
,
offset
,
rows
);
if
(
null
!=
list
)
{
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
if
(
ah
.
getChangeAmount
()
!=
null
)
{
...
...
@@ -114,13 +115,14 @@ public class AccountHeadService {
return
resList
;
}
public
Long
countAccountHead
(
String
type
,
String
roleType
,
String
billNo
,
String
beginTime
,
String
endTime
)
throws
Exception
{
public
Long
countAccountHead
(
String
type
,
String
roleType
,
String
billNo
,
String
beginTime
,
String
endTime
,
Long
organId
,
Long
creator
,
Long
handsPersonId
)
throws
Exception
{
Long
result
=
null
;
try
{
String
[]
creatorArray
=
getCreatorArray
(
roleType
);
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
result
=
accountHeadMapperEx
.
countsByAccountHead
(
type
,
creatorArray
,
billNo
,
beginTime
,
endTime
);
result
=
accountHeadMapperEx
.
countsByAccountHead
(
type
,
creatorArray
,
billNo
,
beginTime
,
endTime
,
organId
,
creator
,
handsPersonId
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
...
...
jshERP-boot/src/main/resources/mapper_xml/AccountHeadMapperEx.xml
View file @
9fadc1e0
...
...
@@ -30,6 +30,15 @@
<if
test=
"endTime != null"
>
and ah.bill_time
<
= #{endTime}
</if>
<if
test=
"organId != null"
>
and ah.organ_id=#{organId}
</if>
<if
test=
"handsPersonId != null"
>
and ah.hands_person_id=#{handsPersonId}
</if>
<if
test=
"creator != null"
>
and ah.creator=#{creator}
</if>
<if
test=
"creatorArray != null"
>
and ah.creator in (
<foreach
collection=
"creatorArray"
item=
"creator"
separator=
","
>
...
...
@@ -63,6 +72,15 @@
<if
test=
"endTime != null"
>
and bill_time
<
= #{endTime}
</if>
<if
test=
"organId != null"
>
and organ_id=#{organId}
</if>
<if
test=
"handsPersonId != null"
>
and hands_person_id=#{handsPersonId}
</if>
<if
test=
"creator != null"
>
and creator=#{creator}
</if>
<if
test=
"creatorArray != null"
>
and creator in (
<foreach
collection=
"creatorArray"
item=
"creator"
separator=
","
>
...
...
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