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

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

@ -22,19 +22,10 @@
IFNULL( ROUND( a.output / 10000, 1 ), '-' ) AS output, IFNULL( ROUND( a.output / 10000, 1 ), '-' ) AS output,
IFNULL( ROUND( a.sales / 10000, 1 ), '-' ) AS sales IFNULL( ROUND( a.sales / 10000, 1 ), '-' ) AS sales
FROM FROM
(
SELECT
a.*,
b.project_small_type
FROM
j_headquarters_revenue a j_headquarters_revenue a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE
b.project_middle_type = 1
GROUP BY
a.tyshxydm
) a
<where> <where>
b.project_middle_type = 1
<if test="req.qymc != null and req.qymc != '' "> <if test="req.qymc != null and req.qymc != '' ">
and a.qymc like concat('%',#{req.qymc},'%') and a.qymc like concat('%',#{req.qymc},'%')
</if> </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)' '^(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>
<if test="req.projectSmallType != null"> <if test="req.projectSmallType != null">
and a.project_small_type = #{req.projectSmallType} and b.project_small_type = #{req.projectSmallType}
</if> </if>
</where> </where>
</select> </select>
<select id="selectZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JHqCountResponse"> <select id="selectZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JHqCountResponse">
SELECT DISTINCT SUM( SELECT DISTINCT
SUM(
IF IF
(a.project_small_type = 1, 1, 0)) AS count1, ( b.project_small_type = 1, 1, 0 )) AS count1,
SUM( SUM(
IF IF
(a.project_small_type = 2, 1, 0)) AS count2, ( b.project_small_type = 2, 1, 0 )) AS count2,
sum( sum(
IF IF
(a.project_small_type = 3, 1, 0)) AS count3 ( b.project_small_type = 3, 1, 0 )) AS count3
FROM (SELECT a.*, FROM
b.project_small_type j_headquarters_revenue a
FROM j_headquarters_revenue a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE b.project_middle_type = 1 WHERE
GROUP BY a.tyshxydm) AS a b.project_middle_type = 1
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save