wushunjie
杜函宇 3 months ago
parent d5dc052624
commit 148ef346b6

@ -194,6 +194,9 @@ public class TimeChange {
if (total > 0) {
// 直接转换第一个元素为BmsEnterpriseBasicInfo对象
BmsEnterpriseBasicInfo res = JSONUtil.toBean(arr.getJSONObject(0).toString(), BmsEnterpriseBasicInfo.class);
if(items.getType() != 1){
res.setQygm("其他");
}
res.setId(items.getId());
res.setMultiple(total);
allList.add(res);

@ -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>

Loading…
Cancel
Save