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
9ff1d99a
Commit
9ff1d99a
authored
Jun 03, 2022
by
季圣华
Browse files
给应收应付的计算里面增加订金字段,解决计算逻辑bug
parent
abdf93a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
9ff1d99a
...
...
@@ -148,6 +148,12 @@ public interface DepotHeadMapperEx {
@Param
(
"subType"
)
String
subType
,
@Param
(
"endTime"
)
String
endTime
);
BigDecimal
findDepositMoney
(
@Param
(
"supplierId"
)
Integer
supplierId
,
@Param
(
"type"
)
String
type
,
@Param
(
"subType"
)
String
subType
,
@Param
(
"endTime"
)
String
endTime
);
List
<
DepotHeadVo4List
>
getDetailByNumber
(
@Param
(
"number"
)
String
number
);
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
9ff1d99a
...
...
@@ -580,11 +580,13 @@ public class DepotHeadService {
public
BigDecimal
findAllMoney
(
Integer
supplierId
,
String
type
,
String
subType
,
String
mode
,
String
endTime
)
throws
Exception
{
String
modeName
=
""
;
BigDecimal
allOtherMoney
=
BigDecimal
.
ZERO
;
BigDecimal
allDepositMoney
=
BigDecimal
.
ZERO
;
if
(
mode
.
equals
(
"实际"
))
{
modeName
=
"change_amount"
;
}
else
if
(
mode
.
equals
(
"合计"
))
{
modeName
=
"discount_last_money"
;
allOtherMoney
=
depotHeadMapperEx
.
findAllOtherMoney
(
supplierId
,
type
,
subType
,
endTime
);
allDepositMoney
=
depotHeadMapperEx
.
findDepositMoney
(
supplierId
,
type
,
subType
,
endTime
);
}
BigDecimal
result
=
BigDecimal
.
ZERO
;
try
{
...
...
@@ -595,6 +597,9 @@ public class DepotHeadService {
if
(
allOtherMoney
!=
null
)
{
result
=
result
.
add
(
allOtherMoney
);
}
if
(
allDepositMoney
!=
null
)
{
result
=
result
.
subtract
(
allDepositMoney
);
}
return
result
;
}
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
9ff1d99a
...
...
@@ -534,6 +534,12 @@
and ifnull(delete_flag,'0') !='1'
</select>
<select
id=
"findDepositMoney"
resultType=
"java.math.BigDecimal"
>
select ifnull(sum(deposit),0) as allDepositMoney from jsh_depot_head where type=#{type} and sub_type = #{subType}
and organ_id =#{supplierId} and oper_time
<
=#{endTime}
and ifnull(delete_flag,'0') !='1'
</select>
<select
id=
"getDetailByNumber"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"ResultMapEx"
>
select dh.*, concat(dh.sub_type,dh.type) as depotHeadType, a.name AccountName,
s.supplier OrganName, s.contacts, s.telephone, s.address
...
...
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