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
69aaa15b
Commit
69aaa15b
authored
Jan 15, 2020
by
季圣华
Browse files
解决首页销售额统计的bug
parent
6465b966
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
69aaa15b
...
...
@@ -479,11 +479,11 @@ public class DepotHeadController {
String
firstDay
=
Tools
.
getCurrentMonth
()
+
"-01 00:00:00"
;
BigDecimal
todaySale
=
depotHeadService
.
getBuyAndSaleStatistics
(
"出库"
,
"销售"
,
1
,
today
,
getNow3
());
//今日销售出库
BigDecimal
todayRetailSale
=
depotHeadService
.
getBuyAndSaleStatistics
(
"出库"
,
"
销
售"
,
BigDecimal
todayRetailSale
=
depotHeadService
.
getBuyAndSale
Retail
Statistics
(
"出库"
,
"
零
售"
,
0
,
today
,
getNow3
());
//今日零售出库
BigDecimal
monthSale
=
depotHeadService
.
getBuyAndSaleStatistics
(
"出库"
,
"销售"
,
1
,
firstDay
,
getNow3
());
//本月销售出库
BigDecimal
monthRetailSale
=
depotHeadService
.
getBuyAndSaleStatistics
(
"出库"
,
"
销
售"
,
BigDecimal
monthRetailSale
=
depotHeadService
.
getBuyAndSale
Retail
Statistics
(
"出库"
,
"
零
售"
,
0
,
firstDay
,
getNow3
());
//本月零售出库
BigDecimal
monthBuy
=
depotHeadService
.
getBuyAndSaleStatistics
(
"入库"
,
"采购"
,
1
,
firstDay
,
getNow3
());
//本月采购入库
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
69aaa15b
...
...
@@ -125,4 +125,11 @@ public interface DepotHeadMapperEx {
@Param
(
"hasSupplier"
)
Integer
hasSupplier
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
BigDecimal
getBuyAndSaleRetailStatistics
(
@Param
(
"type"
)
String
type
,
@Param
(
"subType"
)
String
subType
,
@Param
(
"hasSupplier"
)
Integer
hasSupplier
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
}
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
69aaa15b
...
...
@@ -642,4 +642,8 @@ public class DepotHeadService {
public
BigDecimal
getBuyAndSaleStatistics
(
String
type
,
String
subType
,
Integer
hasSupplier
,
String
beginTime
,
String
endTime
)
{
return
depotHeadMapperEx
.
getBuyAndSaleStatistics
(
type
,
subType
,
hasSupplier
,
beginTime
,
endTime
);
}
public
BigDecimal
getBuyAndSaleRetailStatistics
(
String
type
,
String
subType
,
Integer
hasSupplier
,
String
beginTime
,
String
endTime
)
{
return
depotHeadMapperEx
.
getBuyAndSaleRetailStatistics
(
type
,
subType
,
hasSupplier
,
beginTime
,
endTime
);
}
}
src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
69aaa15b
...
...
@@ -424,4 +424,30 @@
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
<select
id=
"getBuyAndSaleRetailStatistics"
resultType=
"java.math.BigDecimal"
>
SELECT
ifnull(sum(TotalPrice),0)
FROM jsh_depothead
WHERE 1=1
<if
test=
"type != null"
>
and Type='${type}'
</if>
<if
test=
"subType != null"
>
and SubType='${subType}'
</if>
<if
test=
"hasSupplier == 1"
>
and OrganId is not null
</if>
<if
test=
"hasSupplier == 0"
>
and OrganId is null
</if>
<if
test=
"beginTime != null"
>
and OperTime >= '${beginTime}'
</if>
<if
test=
"endTime != null"
>
and OperTime
<
= '${endTime}'
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
</mapper>
\ No newline at end of file
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