"...jquery.serializeJSON/git@ustchcs.com:gujinli1118/MCMS.git" did not exist on "49d2a620737be00cb8d40668303c47cee8466618"
Commit 69aaa15b authored by 季圣华's avatar 季圣华
Browse files

解决首页销售额统计的bug

parent 6465b966
...@@ -479,11 +479,11 @@ public class DepotHeadController { ...@@ -479,11 +479,11 @@ public class DepotHeadController {
String firstDay = Tools.getCurrentMonth() + "-01 00:00:00"; String firstDay = Tools.getCurrentMonth() + "-01 00:00:00";
BigDecimal todaySale = depotHeadService.getBuyAndSaleStatistics("出库", "销售", BigDecimal todaySale = depotHeadService.getBuyAndSaleStatistics("出库", "销售",
1, today, getNow3()); //今日销售出库 1, today, getNow3()); //今日销售出库
BigDecimal todayRetailSale = depotHeadService.getBuyAndSaleStatistics("出库", "售", BigDecimal todayRetailSale = depotHeadService.getBuyAndSaleRetailStatistics("出库", "售",
0, today, getNow3()); //今日零售出库 0, today, getNow3()); //今日零售出库
BigDecimal monthSale = depotHeadService.getBuyAndSaleStatistics("出库", "销售", BigDecimal monthSale = depotHeadService.getBuyAndSaleStatistics("出库", "销售",
1,firstDay, getNow3()); //本月销售出库 1,firstDay, getNow3()); //本月销售出库
BigDecimal monthRetailSale = depotHeadService.getBuyAndSaleStatistics("出库", "售", BigDecimal monthRetailSale = depotHeadService.getBuyAndSaleRetailStatistics("出库", "售",
0,firstDay, getNow3()); //本月零售出库 0,firstDay, getNow3()); //本月零售出库
BigDecimal monthBuy = depotHeadService.getBuyAndSaleStatistics("入库", "采购", BigDecimal monthBuy = depotHeadService.getBuyAndSaleStatistics("入库", "采购",
1, firstDay, getNow3()); //本月采购入库 1, firstDay, getNow3()); //本月采购入库
......
...@@ -125,4 +125,11 @@ public interface DepotHeadMapperEx { ...@@ -125,4 +125,11 @@ public interface DepotHeadMapperEx {
@Param("hasSupplier") Integer hasSupplier, @Param("hasSupplier") Integer hasSupplier,
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime); @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);
} }
...@@ -642,4 +642,8 @@ public class DepotHeadService { ...@@ -642,4 +642,8 @@ public class DepotHeadService {
public BigDecimal getBuyAndSaleStatistics(String type, String subType, Integer hasSupplier, String beginTime, String endTime) { public BigDecimal getBuyAndSaleStatistics(String type, String subType, Integer hasSupplier, String beginTime, String endTime) {
return depotHeadMapperEx.getBuyAndSaleStatistics(type, subType, hasSupplier, beginTime, 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);
}
} }
...@@ -424,4 +424,30 @@ ...@@ -424,4 +424,30 @@
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_Flag,'0') !='1'
</select> </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 &lt;= '${endTime}'
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
</mapper> </mapper>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment