parent
71a772091f
commit
112d7ac85b
@ -0,0 +1,34 @@
|
|||||||
|
package com.ruoyi.jjh.ent.entity.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业获得资金拨付排名TOP5请求体
|
||||||
|
* @author du
|
||||||
|
* @since 2024/8/28 13:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("企业获得资金拨付排名TOP5请求体")
|
||||||
|
public class JTop5FundRequest {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年份 1.当前 2.近三年
|
||||||
|
*/
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty("年份 1.当前 2.近三年 ")
|
||||||
|
private Integer yearsChange;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类 1.总部专项 2.服务业专项
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("分类 1.总部专项 2.服务业专项")
|
||||||
|
private Integer type;
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ruoyi.jjh.ent.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.jjh.ent.entity.JMemorandum;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProject;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProjectFund;
|
||||||
|
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端工作台表数据层
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/5/6 13:57
|
||||||
|
*/
|
||||||
|
public interface JChiefWorkMapper{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 服务业发展总览
|
||||||
|
*/
|
||||||
|
List<JServicesDevelopResponse> servicesDevelop();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 企业获得资金拨付排名TOP5
|
||||||
|
*/
|
||||||
|
List<JProjectFund> getTop5Fund(@Param("req") JTop5FundRequest a);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 当年已申报完成的项目
|
||||||
|
*/
|
||||||
|
List<JProject> currentYearFinish();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 项目追踪情况
|
||||||
|
*/
|
||||||
|
List<JProject> projectTrace();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 备忘录更新情况
|
||||||
|
*/
|
||||||
|
List<JMemorandum> memorandum();
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.ruoyi.jjh.ent.service;
|
||||||
|
|
||||||
|
import com.ruoyi.jjh.ent.entity.JMemorandum;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProject;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProjectFund;
|
||||||
|
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端工作台表业务层
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/31 15:16
|
||||||
|
*/
|
||||||
|
public interface JChiefWorkService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 服务业发展总览
|
||||||
|
*/
|
||||||
|
List<JServicesDevelopResponse> servicesDevelop();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 企业获得资金拨付排名TOP5
|
||||||
|
*/
|
||||||
|
List<JProjectFund> getTop5Fund(JTop5FundRequest a);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 当年已申报完成的项目
|
||||||
|
*/
|
||||||
|
List<JProject> currentYearFinish();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 项目追踪情况
|
||||||
|
*/
|
||||||
|
List<JProject> projectTrace();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 备忘录更新情况
|
||||||
|
*/
|
||||||
|
List<JMemorandum> memorandum();
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
package com.ruoyi.jjh.ent.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JMemorandum;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProject;
|
||||||
|
import com.ruoyi.jjh.ent.entity.JProjectFund;
|
||||||
|
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
|
||||||
|
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
|
||||||
|
import com.ruoyi.jjh.ent.mapper.JChiefWorkMapper;
|
||||||
|
import com.ruoyi.jjh.ent.service.JChiefWorkService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端工作台表业务处理层
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/5/13 9:58
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class JChiefWorkImpl implements JChiefWorkService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private JChiefWorkMapper jChiefWorkMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 服务业发展总览
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<JServicesDevelopResponse> servicesDevelop() {
|
||||||
|
return jChiefWorkMapper.servicesDevelop();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 企业获得资金拨付排名TOP5
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<JProjectFund> getTop5Fund(JTop5FundRequest a) {
|
||||||
|
List<JProjectFund> top5Fund = jChiefWorkMapper.getTop5Fund(a);
|
||||||
|
if(a.getYearsChange() == 1){
|
||||||
|
top5Fund.forEach(x-> x.setAppropriationTime(String.valueOf(LocalDate.now().getYear()-1)));
|
||||||
|
}else {
|
||||||
|
top5Fund.forEach(x-> x.setAppropriationTime(LocalDate.now().getYear() - 3 +"-"+
|
||||||
|
(LocalDate.now().getYear() - 1)));
|
||||||
|
}
|
||||||
|
return top5Fund;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 当年已申报完成的项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<JProject> currentYearFinish() {
|
||||||
|
return jChiefWorkMapper.currentYearFinish();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 项目追踪情况
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<JProject> projectTrace() {
|
||||||
|
return jChiefWorkMapper.projectTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端-工作台 备忘录更新情况
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<JMemorandum> memorandum() {
|
||||||
|
List<JMemorandum> memorandum = jChiefWorkMapper.memorandum();
|
||||||
|
memorandum.forEach(x->{
|
||||||
|
if(x.getContent().length()>10){
|
||||||
|
x.setContent(x.getContent().substring(0, 10)+"***");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return memorandum;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.jjh.ent.mapper.JChiefWorkMapper">
|
||||||
|
|
||||||
|
<select id="servicesDevelop" resultType="com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse">
|
||||||
|
SELECT
|
||||||
|
a.develop_year,
|
||||||
|
a.quarterly AS quarterly,
|
||||||
|
IFNULL( a.value_added, 0 ) AS valueAdded,
|
||||||
|
IFNULL( a.increase_speed, 0 ) AS increaseSpeed,
|
||||||
|
IFNULL( a.gdp_proportion, 0 ) AS gdpProportion
|
||||||
|
FROM
|
||||||
|
j_services_develop a
|
||||||
|
WHERE
|
||||||
|
YEAR (
|
||||||
|
NOW()) - 1 = a.develop_year
|
||||||
|
AND a.quarterly IS NULL UNION
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
c.develop_year,
|
||||||
|
c.quarterly AS quarterly,
|
||||||
|
IFNULL( c.value_added, 0 ) AS valueAdded,
|
||||||
|
IFNULL( c.increase_speed, 0 ) AS increaseSpeed,
|
||||||
|
IFNULL( c.gdp_proportion, 0 ) AS gdpProportion
|
||||||
|
FROM
|
||||||
|
j_services_develop c
|
||||||
|
WHERE
|
||||||
|
YEAR (
|
||||||
|
NOW()) = c.develop_year
|
||||||
|
AND c.quarterly IS NOT NULL
|
||||||
|
ORDER BY
|
||||||
|
c.quarterly DESC
|
||||||
|
LIMIT 1)
|
||||||
|
</select>
|
||||||
|
<select id="getTop5Fund" resultType="com.ruoyi.jjh.ent.entity.JProjectFund">
|
||||||
|
SELECT
|
||||||
|
IFNULL(ROUND(SUM(a.fund_amount) / 10000, 1 ),'-') AS fundAmount,
|
||||||
|
a.qymc,
|
||||||
|
a.project_name
|
||||||
|
FROM
|
||||||
|
j_project_fund a
|
||||||
|
<where>
|
||||||
|
<if test="req.type == 1 ">
|
||||||
|
and a.project_name = '区级总部'
|
||||||
|
</if>
|
||||||
|
<if test="req.type != 1 ">
|
||||||
|
and a.project_name != '区级总部'
|
||||||
|
</if>
|
||||||
|
<if test="req.yearsChange == 1 ">
|
||||||
|
and a.appropriation_time like concat('%',YEAR(NOW())-1,'%')
|
||||||
|
</if>
|
||||||
|
<if test="req.yearsChange != 1 ">
|
||||||
|
and SUBSTRING(a.appropriation_time, 1, 4) BETWEEN YEAR(DATE_SUB(CURDATE(), INTERVAL 3 YEAR)) AND YEAR(NOW())-1
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
group by
|
||||||
|
a.qymc,a.project_name
|
||||||
|
ORDER BY a.fund_amount DESC
|
||||||
|
limit 5
|
||||||
|
</select>
|
||||||
|
<select id="currentYearFinish" resultType="com.ruoyi.jjh.ent.entity.JProject">
|
||||||
|
select *
|
||||||
|
from j_project
|
||||||
|
where status = 5 and project_year = YEAR(NOW())
|
||||||
|
order by update_time desc
|
||||||
|
limit 10;
|
||||||
|
</select>
|
||||||
|
<select id="projectTrace" resultType="com.ruoyi.jjh.ent.entity.JProject">
|
||||||
|
select *
|
||||||
|
from j_project
|
||||||
|
where status in(1,2,3)
|
||||||
|
order by create_time desc
|
||||||
|
limit 10;
|
||||||
|
</select>
|
||||||
|
<select id="memorandum" resultType="com.ruoyi.jjh.ent.entity.JMemorandum">
|
||||||
|
select *
|
||||||
|
from j_memorandum
|
||||||
|
order by create_time desc
|
||||||
|
limit 10;
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue