Some checks failed
viewshanghai-ui-admin CI / build (14.x) (push) Has been cancelled
viewshanghai-ui-admin CI / build (16.x) (push) Has been cancelled
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
29 lines
1.4 KiB
XML
29 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.viewshanghai.module.erp.dal.mysql.statistics.ErpSaleStatisticsMapper">
|
|
|
|
<select id="getSalePrice" resultType="java.math.BigDecimal">
|
|
SELECT
|
|
(SELECT IFNULL(SUM(total_price), 0)
|
|
FROM erp_sale_out
|
|
WHERE out_time >= #{beginTime}
|
|
<if test="endTime != null">
|
|
AND out_time < #{endTime}
|
|
</if>
|
|
<if test="@com.viewshanghai.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
|
|
AND tenant_id = ${@com.viewshanghai.framework.tenant.core.context.TenantContextHolder@getTenantId()}
|
|
</if>
|
|
AND deleted = 0) -
|
|
(SELECT IFNULL(SUM(total_price), 0)
|
|
FROM erp_sale_return
|
|
WHERE return_time >= #{beginTime}
|
|
<if test="endTime != null">
|
|
AND return_time < #{endTime}
|
|
</if>
|
|
<if test="@com.viewshanghai.framework.tenant.core.context.TenantContextHolder@getTenantId() != null">
|
|
AND tenant_id = ${@com.viewshanghai.framework.tenant.core.context.TenantContextHolder@getTenantId()}
|
|
</if>
|
|
AND deleted = 0)
|
|
</select>
|
|
|
|
</mapper> |