优化首页统计

This commit is contained in:
季圣华
2021-11-09 00:35:48 +08:00
parent a923700c0e
commit 3ad93e20e5
8 changed files with 78 additions and 25 deletions

View File

@@ -518,12 +518,6 @@
<if test="subType != null">
and sub_type=#{subType}
</if>
<if test="hasSupplier == 1">
and organ_id is not null
</if>
<if test="hasSupplier == 0">
and organ_id is null
</if>
<if test="beginTime != null">
and oper_time >= #{beginTime}
</if>

View File

@@ -269,6 +269,15 @@
and ifnull(dh.delete_flag,'0') !='1'
</select>
<select id="inOrOutRetailPrice" resultType="java.math.BigDecimal">
select ifnull(sum(total_price),0) as allMoney from jsh_depot_head dh
where 1=1
and dh.type=#{type} and dh.sub_type=#{subType}
and dh.oper_time &gt;= #{beginTime}
and dh.oper_time &lt;= #{endTime}
and ifnull(dh.delete_flag,'0') !='1'
</select>
<select id="getStockCheckSum" resultType="java.math.BigDecimal">
select ifnull(sum(di.basic_number),0) stockCheckSum from jsh_depot_head dh
left JOIN jsh_depot_item di on dh.id=di.header_id