数据大屏数据更新

wushunjie
杜函宇 7 months ago
parent 148ef346b6
commit b16bda3544

@ -98,6 +98,4 @@ public class JDataScreenController extends BaseController {
public AjaxResult getAllIndustry() {
return success(jDataScreenService.getAllIndustry());
}
}

@ -0,0 +1,98 @@
package com.ruoyi.jjh.ent.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import com.ruoyi.jjh.ent.service.JProjectFundService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* (j_project_fund)
* @author du
* @since 2024/8/8 15:31
*/
@RestController
@RequestMapping("/jjh/jProjectFund")
@Api(tags = "项目资金表")
public class JProjectFundController extends BaseController {
@Resource
private JProjectFundService jProjectFundService;
/**
* id
*
* @return
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "查询该项目id下的资金情况", response = JProjectFund.class)
@GetMapping("/{id}")
public AjaxResult selectFund(@PathVariable Long id) {
return success(jProjectFundService.selectFund(id));
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 资金引导拨付情况统计", response = FundStatisticsResponse.class)
@GetMapping("/fundStatistics")
public AjaxResult fundStatistics() {
return success(jProjectFundService.fundStatistics());
}
/**
* - TOP5
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 拨付资金企业申请情况TOP5", response = JProjectFund.class)
@GetMapping("/appropriationTop5")
public AjaxResult appropriationTop5() {
return success(jProjectFundService.appropriationTop5());
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,ent')")
@ApiOperation(value = "企业端-首页企业荣誉资质 关联项目进展", response = JProject.class)
@GetMapping("/enterpriseProject")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "1企业荣誉资质 2关联项目进展", required = true),
})
public AjaxResult getEnterpriseProject(@RequestParam Integer type) {
String creditCode = null;
try {
creditCode = SecurityUtils.getUsername();
} catch (Exception ignored) {
}
return success(jProjectFundService.getEnterpriseProject(type,creditCode));
}
/**
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,ent')")
@ApiOperation(value = "企业端-首页 往年专项资金申报", response = JProjectFundResponse.class)
@GetMapping("/usualFund")
public AjaxResult usualFund() {
String username = null;
try {
username = SecurityUtils.getUsername();
} catch (Exception ignored) {
}
return success(jProjectFundService.usualFund(username));
}
}

@ -0,0 +1,55 @@
package com.ruoyi.jjh.ent.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* (j_project_fund)
* @author du
* @since 2024/8/8 15:40
*/
@ApiModel("项目表")
@TableName(value = "j_project_fund")
@Data
public class JProjectFund {
/**
* Id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
*
*/
@ApiModelProperty("企业名称")
private String qymc;
/**
*
*/
@ApiModelProperty("统一社会信用代码")
private String tyshxydm;
/**
*
*/
@ApiModelProperty("项目")
private String projectName;
/**
*
*/
@ApiModelProperty("项目金额")
private Double fundAmount;
/**
*
*/
@ApiModelProperty("拨付时间")
private String appropriationTime;
}

@ -18,7 +18,7 @@ import lombok.Data;
@Data
@ApiModel("服务业企业名单")
@TableName(value = "j_services_list")
public class JServicesList extends BaseInfoEntity {
public class JServicesList{
/**
* Id
@ -51,9 +51,9 @@ public class JServicesList extends BaseInfoEntity {
private String hydm;
/**
* 1. 2 3 4
* 1. 2 3 4
*/
@ApiModelProperty("1.生产性服务业 2生活性服务业 3新兴服务业 4限上批零住餐")
@ApiModelProperty("1.生产性服务业 2生活性服务业 3规上服务业 4限上批零住餐")
private String servicesType;
/**

@ -27,8 +27,8 @@ public class JServicesListRequest {
private String tyshxydm;
/**
* 1. 2 3 4
* 1. 2 3 4
*/
@ApiModelProperty("1.生产性服务业 2生活性服务业 3新兴服务业 4限上批零住餐")
@ApiModelProperty("1.生产性服务业 2生活性服务业 3规上服务业 4限上批零住餐")
private String servicesType;
}

@ -0,0 +1,27 @@
package com.ruoyi.jjh.ent.entity.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author du
* @since 2024/8/8 16:09
*/
@Data
@ApiModel("资金引导拨付情况统计返回体")
public class FundStatisticsResponse {
/**
*
*/
@ApiModelProperty("项目类别")
private String type;
/**
* )
*/
@ApiModelProperty("资金之和 (万元)")
private Integer fundSum;
}

@ -0,0 +1,22 @@
package com.ruoyi.jjh.ent.entity.response;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author du
* @since 2024/8/12 11:19
*/
@Data
@ApiModel("往年专项资金申报返回体")
public class JProjectFundResponse extends JProjectFund {
/**
*
*/
@ApiModelProperty("项目大类")
private Integer projectBigType;
}

@ -1,11 +1,12 @@
package com.ruoyi.jjh.ent.mapper;
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
import com.ruoyi.jjh.ent.entity.response.JAllIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JBigMiddleIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JIndustryDepthResponse;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo;
import com.ruoyi.jjh.ent.entity.JContacts;
import com.ruoyi.jjh.ent.entity.JEnterpriseContact;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.response.*;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -47,17 +48,17 @@ public interface JDataScreenMapper {
List<JIndustryDepthResponse> getIndustryDepth();
/**
*
*
*
* @return
*/
List<JBigMiddleIndustryResponse> getMiddleIndustry();
/**
*
*
*
* @return
*/
List<JAllIndustryResponse> getBigIndustry();
}

@ -0,0 +1,46 @@
package com.ruoyi.jjh.ent.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* j_policy_fund访
* @author du
* @since 2024/7/15 13:57
*/
public interface JProjectFundMapper extends BaseMapper<JProjectFund> {
/**
* id
*
* @return
*/
List<JProjectFund> selectFund(String creditCode);
/**
* -
*/
List<FundStatisticsResponse> fundStatistics();
/**
* - TOP5
*/
List<JProjectFund> appropriationTop5();
/**
* -
*/
List<JProject> getEnterpriseProject(@Param("type") Integer type,@Param("creditCode") String creditCode);
/**
* -
*/
List<JProjectFundResponse> usualFund(String username);
}

@ -26,13 +26,19 @@ public interface JServicesListMapper extends BaseMapper<JServicesList> {
*/
Page<JServicesList> page(Page<JServicesList> page, @Param("req") JServicesListRequest js);
/**
* 3
*/
Page<JServicesList> page1(Page<JServicesList> page, @Param("req")JServicesListRequest js);
/**
*
*/
List<JServicesListCountResponse> selectAllServicesCount();
/**
*
*
*/
JServicesListCountResponse selectAllZbCount();
}

@ -52,4 +52,6 @@ public interface JDataScreenService {
* @return
*/
List<JAllIndustryResponse> getAllIndustry();
}

@ -0,0 +1,44 @@
package com.ruoyi.jjh.ent.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import java.util.List;
/**
* j_policy_fund
* @author du
* @since 2024/8/8 15:36
*/
public interface JProjectFundService extends IService<JProjectFund> {
/**
* id
*
* @return
*/
List<JProjectFund> selectFund(Long id);
/**
* -
*/
List<FundStatisticsResponse> fundStatistics();
/**
* - TOP5
*/
List<JProjectFund> appropriationTop5();
/**
* -
*/
List<JProject> getEnterpriseProject(Integer type,String creditCode);
/**
* -
*/
List<JProjectFundResponse> usualFund(String username);
}

@ -1,25 +1,26 @@
package com.ruoyi.jjh.ent.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseDirectory;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseDirectoryService;
import com.ruoyi.jjh.ent.entity.JContacts;
import com.ruoyi.jjh.ent.entity.JEnterpriseContact;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.response.HonorResponse;
import com.ruoyi.jjh.ent.entity.response.JAllIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JBigMiddleIndustryResponse;
import com.ruoyi.jjh.ent.entity.response.JIndustryDepthResponse;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ProjectTrackingResponse;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.*;
import com.ruoyi.jjh.ent.mapper.JDataScreenMapper;
import com.ruoyi.jjh.ent.service.JContactsService;
import com.ruoyi.jjh.ent.service.JDataScreenService;
import com.ruoyi.jjh.ent.service.JHeadQuartersRevenueService;
import com.ruoyi.jjh.ent.service.JProjectService;
import com.ruoyi.jjh.ent.service.*;
import liquibase.pro.packaged.A;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
*
@ -39,10 +40,14 @@ public class JDataScreenImpl implements JDataScreenService {
@Resource
private IBmsEnterpriseBasicInfoService enterpriseBasicInfoService;
@Resource
private IBmsEnterpriseDirectoryService es;
@Resource
private JHeadQuartersRevenueService jHeadQuartersRevenueService;
@Resource
private JProjectFundService j1;
@Resource
private JContactsService jc;
/**
@ -128,203 +133,4 @@ public class JDataScreenImpl implements JDataScreenService {
});
return all;
}
// /**
// * 数据库脱敏
// */
// @Override
// public String sqltm() {
// //修改企业库的企业名称
//规上企业营收企业加密
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// String result = items.getQymc().substring(2, items.getQymc().length()-4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length()-4));
// be.setQymc(stringBuilder.toString());
// neList.add(be);
// }
// enterpriseBasicInfoService.updateBatchById(neList);
// //修改企业库的法人姓名
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// if(items.getFddbrxm()!=null){
// String result = items.getFddbrxm().substring(1, items.getFddbrxm().length() );
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getFddbrxm(), 0, 1);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// be.setFddbrxm(stringBuilder.toString());
// neList.add(be);
// }
// }
// enterpriseBasicInfoService.updateBatchById(neList);
// //修改企业库的法人姓名
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// if(items.getFddbrxm()!=null){
// String result = items.getFddbrxm().substring(1, items.getFddbrxm().length() );
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getFddbrxm(), 0, 1);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// be.setFddbrxm(stringBuilder.toString());
// neList.add(be);
// }
// }
// enterpriseBasicInfoService.updateBatchById(neList);
//修改企业库的手机号
// List<BmsEnterpriseBasicInfo> qyList = enterpriseBasicInfoService.list();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// if(items.getLxdh()!=null& !Objects.equals(items.getLxdh(), "")) {
// if (items.getLxdh().length() >= 10) {
// String result = items.getLxdh().substring(3, items.getLxdh().length() - 4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getLxdh(), 0, 3);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getLxdh().substring(items.getLxdh().length() - 4));
// be.setLxdh(stringBuilder.toString());
// neList.add(be);
// } else if(items.getLxdh().length() >= 4){
// String result = items.getLxdh().substring(2, items.getLxdh().length() - 2);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getLxdh(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getLxdh().substring(items.getLxdh().length() - 2));
// be.setLxdh(stringBuilder.toString());
// neList.add(be);
// }
// }
// }
// enterpriseBasicInfoService.updateBatchById(neList);
//规上企业营收企业加密
// List<BmsEnterpriseBasicInfo> jDataScreenMapper1 = jDataScreenMapper.get1();
// System.out.println(jDataScreenMapper1.size());
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : jDataScreenMapper1) {
// String result = items.getQymc().substring(2, items.getQymc().length()-4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length()-4));
// be.setQymc(stringBuilder.toString());
// neList.add(be);
// }
// for (BmsEnterpriseBasicInfo i : neList) {
// jDataScreenMapper.up(i);
// }
//联系人修改
// List<JContacts> list = jc.list();
// List<JContacts> newList = new ArrayList<>();
// for (JContacts items : list) {
// JContacts be = new JContacts();
// System.out.println(items.getDwAgencykey());
// be.setDwAgencykey(items.getDwAgencykey());
// if (items.getQymc() != null) {
// String result = items.getQymc().substring(2, items.getQymc().length() - 4);
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length() - 4));
// be.setQymc(stringBuilder.toString());
// }
// if (items.getLlrxm() != null & !Objects.equals(items.getLlrxm(), "")) {
// String result = items.getLlrxm().substring(1, items.getLlrxm().length());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getLlrxm(), 0, 1);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// be.setLlrxm(stringBuilder.toString());
// }
// if (items.getDzyx() != null & !Objects.equals(items.getDzyx(), "")) {
// StringBuilder stringBuilder = new StringBuilder();
// for (int i = 0; i < 4; i++) {
// stringBuilder.append("*");
// }
// String result = items.getDzyx().substring(4, items.getDzyx().length());
// stringBuilder.append(result);
// be.setDzyx(stringBuilder.toString());
// }
// if (items.getYddh() != null &!Objects.equals(items.getYddh(), "")) {
// if (items.getYddh().length() >= 10) {
// String result = items.getYddh().substring(3, items.getYddh().length() - 4);
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getYddh(), 0, 3);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getYddh().substring(items.getYddh().length() - 4));
// be.setYddh(stringBuilder.toString());
// } else if (items.getYddh().length() >= 4) {
// String result = items.getYddh().substring(2, items.getYddh().length() - 2);
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getYddh(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getYddh().substring(items.getYddh().length() - 2));
// be.setYddh(stringBuilder.toString());
// }
// }
// newList.add(be);
// }
// jc.updateBatchById(newList);
//
// //修改总部企业
// List<BmsEnterpriseBasicInfo> qyList = jDataScreenMapper.getjh();
// List<BmsEnterpriseBasicInfo> neList = new ArrayList<>();
// for (BmsEnterpriseBasicInfo items : qyList) {
// String result = items.getQymc().substring(2, items.getQymc().length()-4);
// BmsEnterpriseBasicInfo be = new BmsEnterpriseBasicInfo();
// be.setId(items.getId());
// StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append(items.getQymc(), 0, 2);
// for (int i = 0; i < result.length(); i++) {
// stringBuilder.append("*");
// }
// stringBuilder.append(items.getQymc().substring(items.getQymc().length()-4));
// be.setQymc(stringBuilder.toString());
// neList.add(be);
// }
// for (BmsEnterpriseBasicInfo i : neList) {
// jDataScreenMapper.upjh(i);
// }
// return null;
// }
}

@ -0,0 +1,76 @@
package com.ruoyi.jjh.ent.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse;
import com.ruoyi.jjh.ent.entity.response.JProjectFundResponse;
import com.ruoyi.jjh.ent.mapper.JProjectFundMapper;
import com.ruoyi.jjh.ent.service.JProjectFundService;
import com.ruoyi.jjh.ent.service.JProjectService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* j_policy_fund
* @author du
* @since 2024/8/8 15:36
*/
@Service
public class JProjectFundServiceImpl extends ServiceImpl<JProjectFundMapper, JProjectFund> implements JProjectFundService {
@Resource
private JProjectService jProjectService;
/**
* id
*
* @return
*/
@Override
public List<JProjectFund> selectFund(Long id) {
JProject jp = jProjectService.getById(id);
if(jp.getProjectSmallType()!=3&jp.getProjectSmallType()!=7){
throw new ServiceException("暂无资金拨付!");
}else {
return baseMapper.selectFund(jp.getCreditCode());
}
}
/**
* -
*/
@Override
public List<FundStatisticsResponse> fundStatistics() {
return baseMapper.fundStatistics();
}
/**
* - TOP5
*/
@Override
public List<JProjectFund> appropriationTop5() {
return baseMapper.appropriationTop5();
}
/**
* -
*/
@Override
public List<JProject> getEnterpriseProject(Integer type,String creditCode) {
return baseMapper.getEnterpriseProject(type,creditCode);
}
/**
* -
*/
@Override
public List<JProjectFundResponse> usualFund(String username) {
return baseMapper.usualFund(username);
}
}

@ -29,7 +29,11 @@ public class JServicesListServiceImpl extends ServiceImpl<JServicesListMapper, J
*/
@Override
public Page<JServicesList> page(Page<JServicesList> page, JServicesListRequest js) {
return baseMapper.page(page, js);
if("3".equals(js.getServicesType())){
return baseMapper.page1(page, js);
}else {
return baseMapper.page(page, js);
}
}
/**

@ -88,42 +88,34 @@
SELECT a.years,
a.industry_categories,
IFNULL(ROUND(a.year_revenue / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(a.add_value / 10000, 1), '-') AS addValue,
IFNULL(ROUND(a.growth / 10000, 1), '-') AS growth,
IFNULL(ROUND(a.gdp_proportion / 10000, 1), '-') AS gdpProportion
IFNULL(ROUND(a.add_value, 1) , '-') AS addValue,
IFNULL(ROUND(a.growth, 1), '-') AS growth,
IFNULL(ROUND(a.gdp_proportion, 4), '-') AS gdpProportion
FROM j_industry_depth a
WHERE a.years = YEAR(NOW()) - 1
</select>
<select id="getMiddleIndustry"
resultType="com.ruoyi.jjh.ent.entity.response.JBigMiddleIndustryResponse">
SELECT a.categories,
a.middle AS nameType,
IFNULL(ROUND(SUM(b.year_revenue) / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(SUM(b.add_value) / 10000, 1), '-') AS addValue,
IFNULL(b.growth, '-') AS growth,
IFNULL(b.gdp_proportion, '-') AS gdpProportion
FROM j_industry_dictionary a
LEFT JOIN j_small_industry b ON a.middle_code = LEFT(b.small_code, 2)
WHERE b.years = YEAR(
NOW()) - 1 || b.years IS NULL
GROUP BY a.middle,
a.categories,
b.growth,
b.gdp_proportion
a.medium AS nameType,
IFNULL(ROUND(a.year_revenue / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(a.add_value, 1), '-') AS addValue,
IFNULL(a.growth, '-') AS growth,
IFNULL(a.gdp_proportion, '-') AS gdpProportion
FROM j_medium_revenue a
WHERE a.years = YEAR( NOW()) - 1 and a.medium != ''
</select>
<select id="getBigIndustry" resultType="com.ruoyi.jjh.ent.entity.response.JAllIndustryResponse">
SELECT a.categories AS nameType,
IFNULL(ROUND(SUM(b.year_revenue) / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(SUM(b.add_value) / 10000, 1), '-') AS addValue,
IFNULL(b.growth, '-') AS growth,
IFNULL(b.gdp_proportion, '-') AS gdpProportion
FROM j_industry_dictionary a
LEFT JOIN j_small_industry b ON a.middle_code = LEFT(b.small_code, 2)
WHERE b.years = YEAR(
NOW()) - 1 || b.years IS NULL
GROUP BY a.categories,
b.growth,
b.gdp_proportion
ORDER BY a.middle_code ASC
SELECT a.categories AS nameType,
IFNULL(ROUND(SUM(a.year_revenue) / 10000, 1), '-') AS yearRevenue,
IFNULL(ROUND(SUM(a.add_value), 1), '-') AS addValue,
IFNULL(ROUND(AVG(a.growth), 1), '-') AS growth,
IFNULL(ROUND(SUM(a.gdp_proportion), 1), '-') AS gdpProportion
FROM j_medium_revenue a
WHERE a.years = YEAR( NOW()) - 1
GROUP BY
a.categories_code
</select>
</mapper>

@ -0,0 +1,76 @@
<?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.JProjectFundMapper">
<select id="selectFund" resultType="com.ruoyi.jjh.ent.entity.JProjectFund">
SELECT
a.*
FROM
j_project_fund a
WHERE
( a.project_name = '区级总部' or a.project_name = '市级服务业领军')
and a.tyshxydm=#{creditCode}
</select>
<select id="fundStatistics" resultType="com.ruoyi.jjh.ent.entity.response.FundStatisticsResponse">
SELECT
b.type,
ROUND( sum( a.fund_amount / 100000000 ), 1 ) AS fundSum
FROM
j_project_fund a
LEFT JOIN ( SELECT id, IF ( project_name = '区级总部' || project_name = '市级服务业领军', project_name, '其他' ) AS type FROM j_project_fund ) b ON a.id = b.id
GROUP BY
b.type
</select>
<select id="appropriationTop5" resultType="com.ruoyi.jjh.ent.entity.JProjectFund">
SELECT
ROUND( a.fund_amount / 100000000 , 1 ) AS fundAmount,
a.id,
a.qymc,
a.tyshxydm,
a.project_name,
a.appropriation_time
FROM
j_project_fund a
ORDER BY
a.fund_amount DESC
LIMIT 5
</select>
<select id="getEnterpriseProject" resultType="com.ruoyi.jjh.ent.entity.JProject">
SELECT
a.*
FROM
j_project a
<where>
<if test="creditCode != null and creditCode != '' ">
and a.credit_code = #{creditCode}
</if>
<if test="type == 1 ">
and a.status = 5
</if>
<if test="type == 2">
and a.status != 5
</if>
</where>
</select>
<select id="usualFund" resultType="com.ruoyi.jjh.ent.entity.response.JProjectFundResponse">
SELECT
a.fund_amount,
a.id,
a.qymc,
a.tyshxydm,
a.project_name,
a.appropriation_time,
IF
( a.project_name = '区级总部' || a.project_name = '市级服务业领军', b.project_big_type, NULL ) AS projectBigType
FROM
j_project_fund a
LEFT JOIN j_project b ON a.tyshxydm = b.credit_code
WHERE
a.tyshxydm = #{username}
GROUP BY
a.ID
LIMIT 10
</select>
</mapper>

@ -5,9 +5,13 @@
<mapper namespace="com.ruoyi.jjh.ent.mapper.JServicesListMapper">
<select id="page" resultType="com.ruoyi.jjh.ent.entity.JServicesList">
SELECT
a.*,
IFNULL( ROUND( b.revenue/ 100000, 1 ), '-' )
AS revenue,
a.id,
a.qymc,
a.tyshxydm,
a.djzctjlb,
a.hydm,
a.services_type,
IFNULL( ROUND( b.revenue/ 100000, 1 ), '-' ) AS revenue,
b.years
FROM
j_services_list a
@ -26,30 +30,41 @@
ORDER BY
a.id
</select>
<select id="page1" resultType="com.ruoyi.jjh.ent.entity.JServicesList">
SELECT
a.id,
a.qymc,
a.tyshxydm,
a.hydm,
'3' AS servicesType,
IFNULL( ROUND( b.revenue / 100000, 1 ), '-' ) AS revenue,
b.years
FROM
bms_enterprise_basic_info a
LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm COLLATE utf8mb4_general_ci
WHERE
a.type = 1
</select>
<select id="selectAllServicesCount"
resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
# SELECT a.services_type,
# count(*) AS qyCount,
# IFNULL(b.add_value, '-') AS addValue,
# IFNULL(ROUND(SUM(b.revenue) / 100000, 1), '-') AS allRevenue
# FROM j_services_list a
# LEFT JOIN j_business_revenue b ON a.tyshxydm = b.tyshxydm
# GROUP BY a.services_type
# ORDER BY a.services_type
SELECT
IFNULL( ROUND( SUM( a.revenue ) / 100000, 1 ), '-' ) AS allRevenue,
'-' AS addValue,
IFNULL( ROUND( a.revenue / 100000, 1 ), '-' ) AS allRevenue,
a.add_value AS addValue,
a.type AS servicesType,
b.qyCount AS qyCount
CASE
WHEN a.type = 3 THEN
( SELECT COUNT(*) FROM bms_enterprise_basic_info WHERE type = 1 ) ELSE b.qyCount
END AS qyCount
FROM
j_total_revenue a
LEFT JOIN ( SELECT a.services_type, count( * ) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
LEFT JOIN ( SELECT a.services_type, COUNT(*) AS qyCount FROM j_services_list a GROUP BY a.services_type ) AS b ON a.type = b.services_type
WHERE
a.years = YEAR (NOW()) - 1
GROUP BY
a.type,
b.qyCount
ORDER BY FIELD(a.type, 3, 1, 2, 4);
</select>
<select id="selectAllZbCount" resultType="com.ruoyi.jjh.ent.entity.response.JServicesListCountResponse">
SELECT 5 AS services_type,
count(*) AS qyCount,

Loading…
Cancel
Save