shiyue 1 年間 前
コミット
457f6f58bd

+ 0 - 1
energy-manage-service/src/main/java/com/energy/manage/service/controller/anemometertower/AnemometerTowerController.java

@@ -7,7 +7,6 @@ import com.energy.manage.common.reponse.ResultResp;
 import com.energy.manage.service.config.annotations.UserLoginToken;
 import com.energy.manage.service.controller.base.BaseServiceController;
 import com.energy.manage.service.domain.dto.anemometertower.*;
-import com.energy.manage.service.domain.dto.windfield.WindFieldPageDto;
 import com.energy.manage.service.domain.vo.anemometertower.*;
 import com.energy.manage.service.service.anemometertower.AnemometerTowerService;
 import io.swagger.annotations.Api;

+ 1 - 0
energy-manage-service/src/main/resources/mybatis/anemometertower/AnemometerTowerMapper.xml

@@ -37,6 +37,7 @@
         <if test="item.endTime != null and item.endTime != ''">
             and at.create_time <![CDATA[<= ]]> #{item.endTime}
         </if>
+        order by id desc
      </select>
 
 

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

@@ -44,6 +44,7 @@
         <if test="item.endTime != null and item.endTime != ''">
             and weg.create_time <![CDATA[<= ]]> #{item.endTime}
         </if>
+        order by id desc
     </select>
 
     <select id="selectWindEngineGroupByRoleId" parameterType="java.lang.Integer" resultType="com.energy.manage.service.domain.vo.windenginegroup.WindEngineGroupVo">

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

@@ -36,24 +36,25 @@
             and
             wf.field_name like CONCAT("%", #{item.fieldName} ,"%")
         </if>
-        <if test="item.fieldCode!=null">
-        and
-        wf.field_code = #{item.fieldCode}
-        </if>
-        <if test="item.companyCode!=null">
-        and
-        wf.company_code = #{item.companyCode}
-        </if>
         <if test="item.beginTime != null and item.beginTime != ''">
             and wf.create_time  <![CDATA[>= ]]>  #{item.beginTime}
         </if>
         <if test="item.endTime != null and item.endTime != ''">
             and wf.create_time <![CDATA[<= ]]> #{item.endTime}
         </if>
-        and
-        wf.create_by = #{item.userId}
-        and
-        wf.field_code in (select code_number from sys_organization_auth where role_id =#{item.roleId} and code_type = 'field')
+        <if test="item.fieldName!=null or item.beginTime != null or item.endTime!=null">
+            and
+            wf.create_by = #{item.userId}
+            and
+            wf.field_code in (select code_number from sys_organization_auth where role_id =#{item.roleId} and code_type = 'field')
+        </if>
+        <if test="item.fieldName == null and item.beginTime == null and item.beginTime == null">
+            and
+            wf.create_by = #{item.userId}
+            or
+            wf.field_code in (select code_number from sys_organization_auth where role_id =#{item.roleId} and code_type = 'field')
+        </if>
+        order by id desc
     </select>
 
 
@@ -66,8 +67,7 @@
         and wf.del_state = 0
         and wf.state = 1
         and wf.create_by = #{userId}
-        and
-        wf.field_code in (select code_number from sys_organization_auth where role_id = #{roleId} and code_type = 'field')
+         or wf.field_code in (select code_number from sys_organization_auth where role_id = #{roleId} and code_type = 'field')
     </select>
 
     <select id="selectByCodeNumber" parameterType="java.lang.String" resultType="com.energy.manage.service.domain.vo.windfield.WindFieldVo">