Browse Source

修改统计功能

jyj_dev2
zhouhaibin 2 weeks ago
parent
commit
2dea6c0d47
  1. 15
      zaojiaManagement/zaojia-productManagement/src/main/resources/mapper/productManagement/ContractualProductInfoMapper.xml

15
zaojiaManagement/zaojia-productManagement/src/main/resources/mapper/productManagement/ContractualProductInfoMapper.xml

@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectModelStatistics" resultType="map">
SELECT
CONCAT(p.brand) AS name,
CONCAT(p.brand_abbreviation) AS name,
SUM(p.quantity) AS value
FROM
contractual_product_info p
@ -156,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE 1=1
END
AND p.del_flag = '0'
AND p.brand_abbreviation IS NOT NULL
<if test="bo.fileName != null and bo.fileName != ''">
AND ci.file_name = #{bo.fileName}
</if>
@ -163,14 +164,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND ci.purchaser_name = #{bo.purchaserName}
</if>
GROUP BY
p.brand
p.brand_abbreviation
ORDER BY
value DESC
</select>
<select id="selectCpuStatistics" resultType="map">
SELECT
p.cpu_model AS name,
p.cpu_abbreviation AS name,
SUM(p.quantity) AS value
FROM
contractual_product_info p
@ -186,6 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND p.cpu_model IS NOT NULL
AND p.cpu_model != ''
AND p.del_flag = '0'
and p.cpu_abbreviation IS NOT NULL
<if test="bo.fileName != null and bo.fileName != ''">
AND ci.file_name = #{bo.fileName}
</if>
@ -193,14 +195,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND ci.purchaser_name = #{bo.purchaserName}
</if>
GROUP BY
p.cpu_model
p.cpu_abbreviation
ORDER BY
value DESC
</select>
<select id="selectOsStatistics" resultType="map">
SELECT
p.os AS name,
p.os_abbreviation AS name,
SUM(p.quantity) AS value
FROM
contractual_product_info p
@ -216,6 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND p.os IS NOT NULL
AND p.os != ''
AND p.del_flag = '0'
and p.os_abbreviation IS NOT NULL
<if test="bo.fileName != null and bo.fileName != ''">
AND ci.file_name = #{bo.fileName}
</if>
@ -223,7 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND ci.purchaser_name = #{bo.purchaserName}
</if>
GROUP BY
p.os
p.os_abbreviation
ORDER BY
value DESC
</select>

Loading…
Cancel
Save