Ver Fonte

根据文档修改增加属性查询

shiyue há 4 meses atrás
pai
commit
1b764c726e

+ 5 - 0
energy-manage-service/src/main/java/com/energy/manage/service/domain/dto/windfield/WindFieldPageDto.java

@@ -22,6 +22,11 @@ public class WindFieldPageDto extends BaseDto {
     @ApiModelProperty("企业编号")
     private String companyCode;
     /**
+     * 所属公司名称
+     */
+    @ApiModelProperty("所属公司名称")
+    private String companyName;
+    /**
      * 省编号
      */
     @ApiModelProperty("省编号")

+ 3 - 0
energy-manage-service/src/main/java/com/energy/manage/service/domain/vo/windenginegroup/WindEngineGroupPageVo.java

@@ -25,6 +25,9 @@ public class WindEngineGroupPageVo {
 
     @ApiModelProperty("风场名称")
     private String fieldName;
+
+    @ApiModelProperty("所属公司")
+    private String companyName;
     /**
      * 风机编号
      */

+ 4 - 0
energy-manage-service/src/main/resources/mybatis/windenginegroup/WindEngineGroupMapper.xml

@@ -7,6 +7,7 @@
         SELECT
         wf.field_code as fieldCode,
         wf.field_name as fieldName,
+        wc.company_name as companyName,
         weg.engine_code AS engineCode,
         weg.engine_name as engineName,
         weg.rated_capacity as ratedCapacity,
@@ -20,6 +21,9 @@
         wem.manufacturer_name as manufacturerName,
         weg.create_time as createTime
         from
+        wind_company wc
+        inner join
+        wind_field wf on wc.company_code = wf.company_code
         wind_field wf
         inner join
         wind_engine_group weg on wf.field_code = weg.field_code

+ 12 - 0
energy-manage-service/src/main/resources/mybatis/windfield/WindFieldMapper.xml

@@ -41,6 +41,18 @@
             and
             wf.field_name like CONCAT("%", #{item.fieldName} ,"%")
         </if>
+        <if test="item.companyName!=null">
+            and
+            wc.company_name like CONCAT("%", #{item.companyName} ,"%")
+        </if>
+        <if test="item.provinceId!=null">
+            and
+            wf.province_id = #{item.provinceId}
+        </if>
+        <if test="item.cityId!=null">
+            and
+            wf.city_id = #{item.cityId}
+        </if>
         <if test="item.beginTime != null and item.beginTime != ''">
             and wf.create_time  <![CDATA[>= ]]>  #{item.beginTime}
         </if>