Browse Source

投资效益系统-公司车流量查询处理

LHB 3 months ago
parent
commit
3033176af3

+ 2 - 1
src/main/java/org/springblade/modules/investment/controller/IbaProjectController.java

@@ -1,6 +1,7 @@
 package org.springblade.modules.investment.controller;
 
 
+import com.alibaba.druid.util.StringUtils;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.core.tool.api.R;
 import org.springblade.modules.investment.pojo.entity.IbaProject;
@@ -155,7 +156,7 @@ public class IbaProjectController {
         if(query.getType() == 1 && query.getId() == null){
             return R.fail("项目id为空");
         }
-        if(query.getType() == 2 && query.getOperationCompany() == null){
+        if(query.getType() == 2 && StringUtils.isEmpty(query.getOperationCompany())){
             return R.fail("公司为空");
         }
 

+ 4 - 4
src/main/java/org/springblade/modules/investment/mapper/IbaProjectMapper.xml

@@ -167,7 +167,7 @@
                     a.id = #{id}
                 </when>
                 <otherwise>
-                    a.operationCompany = #{operationCompany}
+                    a.operation_company = #{operationCompany}
                 </otherwise>
             </choose>
             <if test="year != null and year != ''">
@@ -181,7 +181,7 @@
                     a.id,
                 </when>
                 <otherwise>
-                    a.operationCompany,
+                    a.operation_company,
                 </otherwise>
             </choose>
             b.`month`
@@ -200,8 +200,8 @@
             LEFT JOIN blade_dict_biz d ON d.code = 'ibaProjectStage' and  a.stage = d.dict_key
         <where>
             a.is_deleted = 0
-            <if test="query.projectName != null and query.projectName != ''">
-                AND a.project_name LIKE CONCAT('%',#{query.projectName},'%')
+            <if test="query.name != null and query.name != ''">
+                AND a.project_name LIKE CONCAT('%',#{query.name},'%')
             </if>
             <if test="query.type != null and query.type != ''">
                 AND a.type = #{query.type}

+ 1 - 1
src/main/java/org/springblade/modules/investment/pojo/query/IbaProjectQuery.java

@@ -14,7 +14,7 @@ public class IbaProjectQuery extends Query {
     /**
      * 基础信息
      */
-    private String projectName;
+    private String name;
     /**
      * 类型(下拉选择框)
      */

+ 1 - 2
src/main/java/org/springblade/modules/investment/pojo/query/IbaProjectVolumeQuery.java

@@ -1,7 +1,6 @@
 package org.springblade.modules.investment.pojo.query;
 
 import lombok.Data;
-import scala.Int;
 
 /**
  * 收益统计
@@ -21,7 +20,7 @@ public class IbaProjectVolumeQuery {
     /**
      *  公司名称
      */
-    private Long operationCompany;
+    private String operationCompany;
 
     /**
      *  年份