|
|
|
@ -22,19 +22,10 @@
|
|
|
|
|
IFNULL( ROUND( a.output / 10000, 1 ), '-' ) AS output,
|
|
|
|
|
IFNULL( ROUND( a.sales / 10000, 1 ), '-' ) AS sales
|
|
|
|
|
FROM
|
|
|
|
|
(
|
|
|
|
|
SELECT
|
|
|
|
|
a.*,
|
|
|
|
|
b.project_small_type
|
|
|
|
|
FROM
|
|
|
|
|
j_headquarters_revenue a
|
|
|
|
|
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
|
|
|
|
|
WHERE
|
|
|
|
|
b.project_middle_type = 1
|
|
|
|
|
GROUP BY
|
|
|
|
|
a.tyshxydm
|
|
|
|
|
) a
|
|
|
|
|
<where>
|
|
|
|
|
b.project_middle_type = 1
|
|
|
|
|
<if test="req.qymc != null and req.qymc != '' ">
|
|
|
|
|
and a.qymc like concat('%',#{req.qymc},'%')
|
|
|
|
|
</if>
|
|
|
|
@ -61,25 +52,25 @@
|
|
|
|
|
'^(51|52|61|62|47|48|49|50|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46)'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="req.projectSmallType != null">
|
|
|
|
|
and a.project_small_type = #{req.projectSmallType}
|
|
|
|
|
and b.project_small_type = #{req.projectSmallType}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JHqCountResponse">
|
|
|
|
|
SELECT DISTINCT SUM(
|
|
|
|
|
IF
|
|
|
|
|
(a.project_small_type = 1, 1, 0)) AS count1,
|
|
|
|
|
SUM(
|
|
|
|
|
IF
|
|
|
|
|
(a.project_small_type = 2, 1, 0)) AS count2,
|
|
|
|
|
sum(
|
|
|
|
|
IF
|
|
|
|
|
(a.project_small_type = 3, 1, 0)) AS count3
|
|
|
|
|
FROM (SELECT a.*,
|
|
|
|
|
b.project_small_type
|
|
|
|
|
FROM j_headquarters_revenue a
|
|
|
|
|
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
|
|
|
|
|
WHERE b.project_middle_type = 1
|
|
|
|
|
GROUP BY a.tyshxydm) AS a
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
|
SUM(
|
|
|
|
|
IF
|
|
|
|
|
( b.project_small_type = 1, 1, 0 )) AS count1,
|
|
|
|
|
SUM(
|
|
|
|
|
IF
|
|
|
|
|
( b.project_small_type = 2, 1, 0 )) AS count2,
|
|
|
|
|
sum(
|
|
|
|
|
IF
|
|
|
|
|
( b.project_small_type = 3, 1, 0 )) AS count3
|
|
|
|
|
FROM
|
|
|
|
|
j_headquarters_revenue a
|
|
|
|
|
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
|
|
|
|
|
WHERE
|
|
|
|
|
b.project_middle_type = 1
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|