master
杜函宇 4 weeks ago
parent c6387f598f
commit 67d51a0e9a

@ -92,7 +92,11 @@ public class ChiefController {
ChiefResponse bean = JSONUtil.toBean(dataJson, ChiefResponse.class); ChiefResponse bean = JSONUtil.toBean(dataJson, ChiefResponse.class);
//判断几个政务端用户,等待商量结果 //判断几个政务端用户,等待商量结果
//lj 102 其他是100 //要给dept部门id //lj 102 其他是100 //要给dept部门id
bean.setToken(singleLoginService.singleLogin(bean.getAccountName(), bean.getName(), null, "02", bean.getMobile(),bean.getEmail())); bean.setToken(
singleLoginService.singleLogin(
bean.getAccountName(),
bean.getName(), null,
"02", bean.getMobile(),bean.getEmail()));
return AjaxResult.success(bean); return AjaxResult.success(bean);
} else { } else {
throw new ServiceException("登陆失败"); throw new ServiceException("登陆失败");

@ -49,32 +49,44 @@ public class JHeadQuartersRevenue {
private String hydm; private String hydm;
/** /**
* * 2022
*/ */
@ApiModelProperty("营收") @ApiModelProperty("2022年营收 (单位:千元)")
private String revenue; private String revenue;
/** /**
* * 2022
*/ */
@ApiModelProperty("税收") @ApiModelProperty("2022年税收(单位:千元)")
private String taxation; private String taxation;
/** // /**
* // * 年份
*/ // */
@ApiModelProperty("年份") // @ApiModelProperty("年份")
private String years; // private String years;
/** /**
* * 2023
*/ */
@ApiModelProperty("产值") @ApiModelProperty("2023产值")
private String output; private String output;
/** /**
* * 2023
*/ */
@ApiModelProperty("销售额") @ApiModelProperty("2023销售额")
private String sales; private String sales;
/**
* 2024
*/
@ApiModelProperty("2024产值")
private String output2024;
/**
* 2024
*/
@ApiModelProperty("2024销售额")
private String sales2024;
} }

@ -13,7 +13,7 @@
c.dict_label AS projectSmallName, c.dict_label AS projectSmallName,
c.dict_value AS projectSmallType, c.dict_value AS projectSmallType,
IFNULL(us.count, '-') AS count3, IFNULL(us.count, '-') AS count3,
IFNULL(ns.count, '-') AS currentYearAdd IFNULL(ns.count, '-' ) AS currentYearAdd
FROM sys_dict_data a FROM sys_dict_data a
JOIN sys_dict_data b ON a.remark = b.dict_type JOIN sys_dict_data b ON a.remark = b.dict_type
JOIN sys_dict_data c ON b.remark = c.dict_type JOIN sys_dict_data c ON b.remark = c.dict_type

@ -5,7 +5,7 @@
<mapper namespace="com.ruoyi.jjh.ent.mapper.JHeadQuartersRevenueMapper"> <mapper namespace="com.ruoyi.jjh.ent.mapper.JHeadQuartersRevenueMapper">
<select id="page" resultType="com.ruoyi.jjh.ent.entity.JHeadQuartersRevenue"> <select id="page" resultType="com.ruoyi.jjh.ent.entity.JHeadQuartersRevenue">
SELECT SELECT
DISTINCT credit_code as tyshxydm, a.tyshxydm,
a.qymc, a.qymc,
CASE CASE
WHEN a.hydm REGEXP WHEN a.hydm REGEXP
@ -18,22 +18,17 @@
a.hydm, a.hydm,
IFNULL( ROUND( a.revenue / 10000, 1 ), '-' ) AS revenue, IFNULL( ROUND( a.revenue / 10000, 1 ), '-' ) AS revenue,
IFNULL( ROUND( a.taxation / 10000, 1 ), '-' ) AS taxation, IFNULL( ROUND( a.taxation / 10000, 1 ), '-' ) AS taxation,
a.years,
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
j_project b left join j_headquarters_revenue a on b.credit_code = a.tyshxydm j_headquarters_revenue a
<where> <where>
b.status = 5 and b.project_big_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>
<if test="req.tyshxydm != null and req.tyshxydm != '' "> <if test="req.tyshxydm != null and req.tyshxydm != '' ">
and a.tyshxydm = #{req.tyshxydm} and a.tyshxydm = #{req.tyshxydm}
</if> </if>
<if test="req.years != null and req.years != '' ">
and a.years = #{req.years}
</if>
<if test="req.type == 1"> <if test="req.type == 1">
and a.hydm REGEXP and a.hydm REGEXP
'^(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)' '^(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)'
@ -55,34 +50,32 @@
<select id="page1" resultType="com.ruoyi.jjh.ent.entity.JHeadQuartersRevenue"> <select id="page1" resultType="com.ruoyi.jjh.ent.entity.JHeadQuartersRevenue">
SELECT SELECT
a.qymc, a.qymc,
b.credit_code as tyshxydm, b.credit_code AS tyshxydm,
CASE CASE
WHEN a.hydm REGEXP WHEN a.hydm REGEXP '^(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)'
'^(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)'
THEN '制造业总部' THEN '制造业总部'
WHEN a.hydm REGEXP '^(47|48|49|50)' THEN '建筑业总部' WHEN a.hydm REGEXP '^(47|48|49|50)' THEN '建筑业总部'
WHEN a.hydm REGEXP '^(51|52|61|62)' THEN '批零住餐总部' WHEN a.hydm REGEXP '^(51|52|61|62)' THEN '批零住餐总部'
ELSE '服务业总部' ELSE '服务业总部'
END as type, END AS type,
a.hydm, a.hydm,
IFNULL( ROUND( a.revenue / 10000, 1 ), '-' ) AS revenue, MAX(IFNULL(ROUND(a.revenue / 10000, 1), '-')) AS revenue,
IFNULL( ROUND( a.taxation / 10000, 1 ), '-' ) AS taxation, MAX(IFNULL(ROUND(a.taxation / 10000, 1), '-')) AS taxation,
a.years, MAX(IFNULL(ROUND(a.output / 10000, 1), '-')) AS output,
IFNULL( ROUND( a.output / 10000, 1 ), '-' ) AS output, MAX(IFNULL(ROUND(a.sales / 10000, 1), '-')) AS sales
IFNULL( ROUND( a.sales / 10000, 1 ), '-' ) AS sales
FROM FROM
j_headquarters_revenue a j_headquarters_revenue a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code LEFT JOIN (
SELECT DISTINCT credit_code, project_small_type
FROM j_project
WHERE project_middle_type = 1 AND status = 5
) b ON a.tyshxydm = b.credit_code
<where> <where>
b.project_middle_type = 1 and b.status = 5
<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>
<if test="req.tyshxydm != null and req.tyshxydm != '' "> <if test="req.tyshxydm != null and req.tyshxydm != '' ">
and a.tyshxydm = #{req.tyshxydm} AND a.tyshxydm = #{req.tyshxydm}
</if>
<if test="req.years != null and req.years != '' ">
and a.years = #{req.years}
</if> </if>
<if test="req.type == 1"> <if test="req.type == 1">
and a.hydm REGEXP and a.hydm REGEXP
@ -104,8 +97,7 @@
and b.project_small_type = #{req.projectSmallType} and b.project_small_type = #{req.projectSmallType}
</if> </if>
</where> </where>
group by b.credit_code,a.qymc,type, a.hydm, GROUP BY a.qymc,b.credit_code, type, a.hydm
a.years,a.revenue,a.taxation,a.output,a.sales
</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 SELECT
@ -122,8 +114,7 @@
</select> </select>
<select id="selectAllCount" resultType="java.lang.Integer"> <select id="selectAllCount" resultType="java.lang.Integer">
SELECT SELECT
COUNT(DISTINCT credit_code) COUNT(*)
FROM j_project FROM j_headquarters_revenue
where status = 5 and project_big_type = 1
</select> </select>
</mapper> </mapper>

@ -84,6 +84,5 @@ ORDER BY FIELD(result.servicesType, 3, 1, 2, 4);
IFNULL(ROUND(SUM(IFNULL(revenue, 0)) / 100000, 1) + ROUND(SUM(IFNULL(output, 0)) / 100000, 1) + IFNULL(ROUND(SUM(IFNULL(revenue, 0)) / 100000, 1) + ROUND(SUM(IFNULL(output, 0)) / 100000, 1) +
ROUND(SUM(IFNULL(sales, 0)) / 100000, 1), '-') AS addValue ROUND(SUM(IFNULL(sales, 0)) / 100000, 1), '-') AS addValue
FROM j_headquarters_revenue FROM j_headquarters_revenue
where years = YEAR(NOW()) - 1
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save