Selaa lähdekoodia

新增获取全部的分类列表数据,并获取企业分类

littleblue55 1 kuukausi sitten
vanhempi
commit
878cf2a81e

+ 12 - 1
enteprise-admin/src/main/java/com/enteprise/score/controller/ScoreController.java

@@ -2,6 +2,8 @@ package com.enteprise.score.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.enteprise.score.dto.ScoreDto;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -23,7 +25,7 @@ import com.enteprise.common.core.page.TableDataInfo;
 
 /**
  * scoreController
- * 
+ *
  * @author ruoyi
  * @date 2024-08-30
  */
@@ -46,6 +48,15 @@ public class ScoreController extends BaseController
         return getDataTable(list);
     }
 
+    @PreAuthorize("@ss.hasPermi('score:score:listAll')")
+    @GetMapping("/list/all")
+    public TableDataInfo listAll(Score score)
+    {
+//        startPage();
+        List<ScoreDto> list = scoreService.selectScoreListWithType();
+        return getDataTable(list);
+    }
+
     /**
      * 导出score列表
      */

+ 372 - 0
enteprise-admin/src/main/java/com/enteprise/score/dto/ScoreDto.java

@@ -0,0 +1,372 @@
+package com.enteprise.score.dto;
+
+import com.enteprise.common.annotation.Excel;
+import com.enteprise.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * score对象 score
+ *
+ * @author ruoyi
+ * @date 2024-08-30
+ */
+public class ScoreDto extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 企业名称 */
+    @Excel(name = "企业名称")
+    private String enterpriseName;
+
+    /** 坐落地 */
+    @Excel(name = "坐落地")
+    private String location;
+
+    /** 行业代码 */
+    @Excel(name = "行业代码")
+    private String code;
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String mainBusinessScore;
+
+    /** 用地面积得分 */
+    @Excel(name = "用地面积得分")
+    private Double landAreaScore;
+
+    /** 工业总产值得分 */
+    @Excel(name = "工业总产值得分")
+    private Double totalIndustrialValueScore;
+
+    /** 工业增加值得分 */
+    @Excel(name = "工业增加值得分")
+    private Double gdpScore;
+
+    /** 应税收入得分 */
+    @Excel(name = "应税收入得分")
+    private Double taxableIncomeScore;
+
+    /** 实缴税金得分 */
+    @Excel(name = "实缴税金得分")
+    private Double paidTaxScore;
+
+    /** 主营业务收入得分 */
+    @Excel(name = "主营业务收入得分")
+    private Double mainBusinessIncomeScore;
+
+    /** 从业人员数得分 */
+    @Excel(name = "从业人员数得分")
+    private Double employeeNumberScore;
+
+    /** 利润总额得分 */
+    @Excel(name = "利润总额得分")
+    private Double profitScore;
+
+    /** 所有者权益得分 */
+    @Excel(name = "所有者权益得分")
+    private Double ownerEquityScore;
+
+    /** 研发经费得分 */
+    @Excel(name = "研发经费得分")
+    private Double fundingScore;
+
+    /** 能源消费量得分 */
+    @Excel(name = "能源消费量得分")
+    private Double energyConsumeScore;
+
+    @Excel(name = "电力消费量得分")
+    private Double powerConsumeScore;
+
+    /** 年份 */
+    @Excel(name = "年份")
+    private String year;
+
+    /** 月份 */
+    @Excel(name = "月份")
+    private String month;
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String totalIndustrialValueLevel;
+
+    public String getTotalIndustrialValueLevel() {
+        return totalIndustrialValueLevel;
+    }
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String taxableIncomeLevel;
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String paidTaxLevel;
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String energyConsumeLevel;
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String fundingLevel;
+
+    /** 主营业务活动得分 */
+    @Excel(name = "主营业务活动得分")
+    private String powerConsumeLevel;
+
+    @Excel(name = "分类编码")
+    private String typeNum;
+
+    public String getTypeNum() {
+        return typeNum;
+    }
+
+    public void setTypeNum(String typeNum) {
+        this.typeNum = typeNum;
+    }
+
+    public String getPaidTaxLevel() {
+        return paidTaxLevel;
+    }
+
+    public void setPaidTaxLevel(String paidTaxLevel) {
+        this.paidTaxLevel = paidTaxLevel;
+    }
+
+    public String getEnergyConsumeLevel() {
+        return energyConsumeLevel;
+    }
+
+    public void setEnergyConsumeLevel(String energyConsumeLevel) {
+        this.energyConsumeLevel = energyConsumeLevel;
+    }
+
+    public String getFundingLevel() {
+        return fundingLevel;
+    }
+
+    public void setFundingLevel(String fundingLevel) {
+        this.fundingLevel = fundingLevel;
+    }
+
+    public String getPowerConsumeLevel() {
+        return powerConsumeLevel;
+    }
+
+    public void setPowerConsumeLevel(String powerConsumeLevel) {
+        this.powerConsumeLevel = powerConsumeLevel;
+    }
+
+    public String getTaxableIncomeLevel() {
+        return taxableIncomeLevel;
+    }
+
+    public void setTaxableIncomeLevel(String taxableIncomeLevel) {
+        this.taxableIncomeLevel = taxableIncomeLevel;
+    }
+
+    public void setTotalIndustrialValueLevel(String totalIndustrialValueLevel) {
+        this.totalIndustrialValueLevel = totalIndustrialValueLevel;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setEnterpriseName(String enterpriseName)
+    {
+        this.enterpriseName = enterpriseName;
+    }
+
+    public String getEnterpriseName()
+    {
+        return enterpriseName;
+    }
+
+    public void setLocation(String location)
+    {
+        this.location = location;
+    }
+
+    public String getLocation()
+    {
+        return location;
+    }
+    public void setCode(String code)
+    {
+        this.code = code;
+    }
+
+    public String getCode()
+    {
+        return code;
+    }
+    public void setMainBusinessScore(String mainBusinessScore)
+    {
+        this.mainBusinessScore = mainBusinessScore;
+    }
+
+    public String getMainBusinessScore()
+    {
+        return mainBusinessScore;
+    }
+    public void setLandAreaScore(Double landAreaScore)
+    {
+        this.landAreaScore = landAreaScore;
+    }
+
+    public Double getLandAreaScore()
+    {
+        return landAreaScore;
+    }
+    public void setTotalIndustrialValueScore(Double totalIndustrialValueScore)
+    {
+        this.totalIndustrialValueScore = totalIndustrialValueScore;
+    }
+
+    public Double getTotalIndustrialValueScore()
+    {
+        return totalIndustrialValueScore;
+    }
+    public void setGdpScore(Double gdpScore)
+    {
+        this.gdpScore = gdpScore;
+    }
+
+    public Double getGdpScore()
+    {
+        return gdpScore;
+    }
+    public void setTaxableIncomeScore(Double taxableIncomeScore)
+    {
+        this.taxableIncomeScore = taxableIncomeScore;
+    }
+
+    public Double getTaxableIncomeScore()
+    {
+        return taxableIncomeScore;
+    }
+    public void setPaidTaxScore(Double paidTaxScore)
+    {
+        this.paidTaxScore = paidTaxScore;
+    }
+
+    public Double getPaidTaxScore()
+    {
+        return paidTaxScore;
+    }
+    public void setMainBusinessIncomeScore(Double mainBusinessIncomeScore)
+    {
+        this.mainBusinessIncomeScore = mainBusinessIncomeScore;
+    }
+
+    public Double getMainBusinessIncomeScore()
+    {
+        return mainBusinessIncomeScore;
+    }
+    public void setEmployeeNumberScore(Double employeeNumberScore)
+    {
+        this.employeeNumberScore = employeeNumberScore;
+    }
+
+    public Double getEmployeeNumberScore()
+    {
+        return employeeNumberScore;
+    }
+    public void setProfitScore(Double profitScore)
+    {
+        this.profitScore = profitScore;
+    }
+
+    public Double getProfitScore()
+    {
+        return profitScore;
+    }
+    public void setOwnerEquityScore(Double ownerEquityScore)
+    {
+        this.ownerEquityScore = ownerEquityScore;
+    }
+
+    public Double getOwnerEquityScore()
+    {
+        return ownerEquityScore;
+    }
+    public void setFundingScore(Double fundingScore)
+    {
+        this.fundingScore = fundingScore;
+    }
+
+    public Double getFundingScore()
+    {
+        return fundingScore;
+    }
+    public void setEnergyConsumeScore(Double energyConsumeScore)
+    {
+        this.energyConsumeScore = energyConsumeScore;
+    }
+
+    public Double getEnergyConsumeScore()
+    {
+        return energyConsumeScore;
+    }
+
+    public void setPowerConsumeScore(Double powerConsumeScore)
+    {
+        this.powerConsumeScore = powerConsumeScore;
+    }
+
+    public Double getPowerConsumeScore()
+    {
+        return powerConsumeScore;
+    }
+    public void setYear(String year)
+    {
+        this.year = year;
+    }
+
+    public String getYear()
+    {
+        return year;
+    }
+    public void setMonth(String month)
+    {
+        this.month = month;
+    }
+
+    public String getMonth()
+    {
+        return month;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("enterpriseName", getEnterpriseName())
+            .append("location", getLocation())
+            .append("code", getCode())
+            .append("mainBusinessScore", getMainBusinessScore())
+            .append("landAreaScore", getLandAreaScore())
+            .append("totalIndustrialValueScore", getTotalIndustrialValueScore())
+            .append("gdpScore", getGdpScore())
+            .append("taxableIncomeScore", getTaxableIncomeScore())
+            .append("paidTaxScore", getPaidTaxScore())
+            .append("mainBusinessIncomeScore", getMainBusinessIncomeScore())
+            .append("employeeNumberScore", getEmployeeNumberScore())
+            .append("profitScore", getProfitScore())
+            .append("ownerEquityScore", getOwnerEquityScore())
+            .append("fundingScore", getFundingScore())
+            .append("energyConsumeScore", getEnergyConsumeScore())
+            .append("year", getYear())
+            .append("month", getMonth())
+            .toString();
+    }
+}

+ 11 - 8
enteprise-admin/src/main/java/com/enteprise/score/mapper/ScoreMapper.java

@@ -2,18 +2,19 @@ package com.enteprise.score.mapper;
 
 import java.util.List;
 import com.enteprise.score.domain.Score;
+import com.enteprise.score.dto.ScoreDto;
 
 /**
  * scoreMapper接口
- * 
+ *
  * @author ruoyi
  * @date 2024-08-30
  */
-public interface ScoreMapper 
+public interface ScoreMapper
 {
     /**
      * 查询score
-     * 
+     *
      * @param id score主键
      * @return score
      */
@@ -21,15 +22,17 @@ public interface ScoreMapper
 
     /**
      * 查询score列表
-     * 
+     *
      * @param score score
      * @return score集合
      */
     public List<Score> selectScoreList(Score score);
 
+    public List<ScoreDto> selectScoreListWithType();
+
     /**
      * 新增score
-     * 
+     *
      * @param score score
      * @return 结果
      */
@@ -37,7 +40,7 @@ public interface ScoreMapper
 
     /**
      * 修改score
-     * 
+     *
      * @param score score
      * @return 结果
      */
@@ -45,7 +48,7 @@ public interface ScoreMapper
 
     /**
      * 删除score
-     * 
+     *
      * @param id score主键
      * @return 结果
      */
@@ -53,7 +56,7 @@ public interface ScoreMapper
 
     /**
      * 批量删除score
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 10 - 8
enteprise-admin/src/main/java/com/enteprise/score/service/IScoreService.java

@@ -2,18 +2,19 @@ package com.enteprise.score.service;
 
 import java.util.List;
 import com.enteprise.score.domain.Score;
+import com.enteprise.score.dto.ScoreDto;
 
 /**
  * scoreService接口
- * 
+ *
  * @author ruoyi
  * @date 2024-08-30
  */
-public interface IScoreService 
+public interface IScoreService
 {
     /**
      * 查询score
-     * 
+     *
      * @param id score主键
      * @return score
      */
@@ -21,15 +22,16 @@ public interface IScoreService
 
     /**
      * 查询score列表
-     * 
+     *
      * @param score score
      * @return score集合
      */
     public List<Score> selectScoreList(Score score);
 
+    public List<ScoreDto>  selectScoreListWithType();
     /**
      * 新增score
-     * 
+     *
      * @param score score
      * @return 结果
      */
@@ -37,7 +39,7 @@ public interface IScoreService
 
     /**
      * 修改score
-     * 
+     *
      * @param score score
      * @return 结果
      */
@@ -45,7 +47,7 @@ public interface IScoreService
 
     /**
      * 批量删除score
-     * 
+     *
      * @param ids 需要删除的score主键集合
      * @return 结果
      */
@@ -53,7 +55,7 @@ public interface IScoreService
 
     /**
      * 删除score信息
-     * 
+     *
      * @param id score主键
      * @return 结果
      */

+ 15 - 8
enteprise-admin/src/main/java/com/enteprise/score/service/impl/ScoreServiceImpl.java

@@ -1,6 +1,8 @@
 package com.enteprise.score.service.impl;
 
 import java.util.List;
+
+import com.enteprise.score.dto.ScoreDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.enteprise.score.mapper.ScoreMapper;
@@ -9,19 +11,19 @@ import com.enteprise.score.service.IScoreService;
 
 /**
  * scoreService业务层处理
- * 
+ *
  * @author ruoyi
  * @date 2024-08-30
  */
 @Service
-public class ScoreServiceImpl implements IScoreService 
+public class ScoreServiceImpl implements IScoreService
 {
     @Autowired
     private ScoreMapper scoreMapper;
 
     /**
      * 查询score
-     * 
+     *
      * @param id score主键
      * @return score
      */
@@ -33,7 +35,7 @@ public class ScoreServiceImpl implements IScoreService
 
     /**
      * 查询score列表
-     * 
+     *
      * @param score score
      * @return score
      */
@@ -43,9 +45,14 @@ public class ScoreServiceImpl implements IScoreService
         return scoreMapper.selectScoreList(score);
     }
 
+    @Override
+    public List<ScoreDto> selectScoreListWithType() {
+        return scoreMapper.selectScoreListWithType();
+    }
+
     /**
      * 新增score
-     * 
+     *
      * @param score score
      * @return 结果
      */
@@ -57,7 +64,7 @@ public class ScoreServiceImpl implements IScoreService
 
     /**
      * 修改score
-     * 
+     *
      * @param score score
      * @return 结果
      */
@@ -69,7 +76,7 @@ public class ScoreServiceImpl implements IScoreService
 
     /**
      * 批量删除score
-     * 
+     *
      * @param ids 需要删除的score主键
      * @return 结果
      */
@@ -81,7 +88,7 @@ public class ScoreServiceImpl implements IScoreService
 
     /**
      * 删除score信息
-     * 
+     *
      * @param id score主键
      * @return 结果
      */

+ 20 - 1
enteprise-admin/src/main/resources/mapper/score/ScoreMapper.xml

@@ -41,7 +41,26 @@
     <sql id="selectScoreVo">
         select id, enterprise_name, location, code, main_business_score, land_area_score, total_industrial_value_score, gdp_score, taxable_income_score, paid_tax_score, main_business_income_score, employee_number_score, profit_score, owner_equity_score, funding_score, power_consume_score, energy_consume_score, total_industrial_value_precent, taxable_income_precent, paid_tax_precent, funding_precent, power_consume_precent, energy_consume_precent, total_industrial_value_level, taxable_income_level, paid_tax_level, energy_consume_level, funding_level, power_consume_level, year, month from score
     </sql>
-
+    <select id="selectScoreListWithType" parameterType="Score">
+        select a.id, a.enterprise_name enterpriseName, a.location, a.code,
+               a.main_business_score mainBusinessScore, a.land_area_score landAreaScore,
+               a.total_industrial_value_score totalIndustrialValueScore, a.gdp_score gdpScore,
+               a.taxable_income_score taxableIncomeScore, a.paid_tax_score paidTaxScore,
+               a.main_business_income_score mainBusinessIncomeScore, a.employee_number_score employeeNumberScore,
+               a.profit_score profitScore, a.owner_equity_score ownerEquityScore, a.funding_score fundingScore,
+               a.power_consume_score powerConsumeScore, a.energy_consume_score energyConsumeScore,
+               a.total_industrial_value_precent totalIndustrialValuePrecent, a.taxable_income_precent taxableIncomePrecent,
+               a.paid_tax_precent paidTaxPrecent, a.funding_precent fundingPrecent,
+               a.power_consume_precent powerConsumePrecent, a.energy_consume_precent energyConsumePrecent,
+               a.total_industrial_value_level totalIndustrialValueLevel, a.taxable_income_level taxableIncomeLevel,
+               a.paid_tax_level paidTaxLevel, a.energy_consume_level energyConsumeLevel,
+               a.funding_level fundingLevel, a.power_consume_level powerConsumeLevel,
+               b.type_num typeNum,
+                a.year, a.month
+            from score a
+            left join enterprise b
+            on a.enterprise_name = b.enterprise_name
+    </select>
     <select id="selectScoreList" parameterType="Score" resultMap="ScoreResult">
         <include refid="selectScoreVo"/>
         <where>