Browse Source

ljx:benefit增加分类编码返回

ljx 1 month ago
parent
commit
edccfa8d6f

+ 10 - 0
enteprise-admin/src/main/java/com/enteprise/benefit_monitor_assess/domain/BenefitMonitorAssess.java

@@ -37,6 +37,16 @@ public class BenefitMonitorAssess extends BaseEntity {
 
     private Integer pageNum;
 
+    private String typeNum;
+
+    public String getTypeNum() {
+        return typeNum;
+    }
+
+    public void setTypeNum(String typeNum) {
+        this.typeNum = typeNum;
+    }
+
     public Integer getPageSize() {
         return pageSize;
     }

+ 8 - 7
enteprise-admin/src/main/java/com/enteprise/benefit_monitor_assess/service/impl/BusinessMonitorAssessService.java

@@ -5,6 +5,7 @@ import com.enteprise.benefit_monitor_assess.domain.BenefitMonitorAssess;
 import com.enteprise.benefit_monitor_assess.domain.IndustrySummary;
 import com.enteprise.benefit_monitor_assess.service.IBusinessMonitorAssessService;
 import com.enteprise.industry_run.domain.EnterpriseBaseDataTotal;
+import com.enteprise.industry_run.mapper.EnterpriseBaseDataTotalMapper;
 import com.enteprise.industry_run.service.IEnterpriseBaseDataTotalService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -18,7 +19,7 @@ import java.util.stream.Collectors;
 public class BusinessMonitorAssessService implements IBusinessMonitorAssessService {
 
     @Autowired
-    IEnterpriseBaseDataTotalService service;
+    EnterpriseBaseDataTotalMapper mapper;
 
     private static final Logger LOGGER = Logger.getLogger(BusinessMonitorAssessService.class.getName());
     @Override
@@ -48,10 +49,10 @@ public class BusinessMonitorAssessService implements IBusinessMonitorAssessServi
             if (season != null && !season.isEmpty()) {
                 //精确到季度
                 setDataWithYearAndSeason(year, season, dataTotal);
-                currentDataTotal = service.selectEnterpriseBaseDataTotalList(dataTotal);
+                currentDataTotal = mapper.selectWithType(dataTotal);
                 getPreviousQuarter(businessMonitorAssess, dataTotal);
-                previousDataTotal = service.selectEnterpriseBaseDataTotalList(dataTotal);
-                _previousDataTotal = service.selectEnterpriseBaseDataTotalList(_dataTotal);
+                previousDataTotal = mapper.selectWithType(dataTotal);
+                _previousDataTotal = mapper.selectWithType(_dataTotal);
                 //判断分析方式
                 if (businessMonitorAssess.getMode().equals("trendAnalysis")) {
                     compareTrendAnalysis(currentDataTotal, previousDataTotal, list);
@@ -69,7 +70,7 @@ public class BusinessMonitorAssessService implements IBusinessMonitorAssessServi
                 dataTotal.setSeason(String.valueOf(i));
                 _dataTotal.setYear(year);
                 _dataTotal.setSeason(String.valueOf(i));
-                currentDataTotal = service.selectEnterpriseBaseDataTotalList(dataTotal);
+                currentDataTotal = mapper.selectWithType(dataTotal);
                 if (i==1){
                     //第一季度特殊处理
                     int _year = Integer.parseInt(year) - 1;
@@ -81,8 +82,8 @@ public class BusinessMonitorAssessService implements IBusinessMonitorAssessServi
                     dataTotal.setSeason(String.valueOf(i - 1));
                     _dataTotal.setSeason(String.valueOf(i - 1));
                 }
-                previousDataTotal = service.selectEnterpriseBaseDataTotalList(dataTotal);
-                _previousDataTotal = service.selectEnterpriseBaseDataTotalList(_dataTotal);
+                previousDataTotal = mapper.selectWithType(dataTotal);
+                _previousDataTotal = mapper.selectWithType(_dataTotal);
                 //判断分析方式
                 if (businessMonitorAssess.getMode().equals("trendAnalysis")) {
                     compareTrendAnalysis(currentDataTotal, previousDataTotal, list);

+ 1 - 0
enteprise-admin/src/main/java/com/enteprise/industry_run/mapper/EnterpriseBaseDataTotalMapper.java

@@ -31,6 +31,7 @@ public interface EnterpriseBaseDataTotalMapper
 
     public List<EnterpriseBaseDataTotal> selectEnterpriseBaseDataTotalListMOHU(EnterpriseBaseDataTotal enterpriseBaseDataTotal);
 
+    List<EnterpriseBaseDataTotal> selectWithType(EnterpriseBaseDataTotal enterpriseBaseDataTotal);
     /**
      * 新增industry_run
      * 

+ 29 - 0
enteprise-admin/src/main/resources/mapper/industry_run/EnterpriseBaseDataTotalMapper.xml

@@ -75,6 +75,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where enterprise_name = #{enterpriseName}
     </select>
 
+    <select id="selectWithType" parameterType="EnterpriseBaseDataTotal">
+        select a.id,
+               a.enterprise_name enterpriseName,
+               a.location,
+               a.industry_name industryName,
+               a.code,
+               a.main_business mainBusiness,
+               a.land_area landArea,
+               a.total_industrial_value totalIndustrialValue,
+               a.gdp,
+               a.taxable_income taxableIncome,
+               a.paid_tax paidTax,
+               a.main_business_income mainBusinessIncome,
+               a.employee_number employeeNumber,
+               a.profit,
+               a.owner_equity ownerEquity,
+               a.funding,
+               a.energy_consume energyConsume,
+               a.power_consume powerConsume,
+               a.year,
+               a.season,
+               a.month,
+               b.type_num typeNum
+        from
+            enterprise_base_data_total a
+        left join enterprise b
+            on a.enterprise_name = b.enterprise_name
+    </select>
+
     <insert id="insertEnterpriseBaseDataTotal" parameterType="EnterpriseBaseDataTotal">
         insert into enterprise_base_data_total
         <trim prefix="(" suffix=")" suffixOverrides=",">