Browse Source

修改健康管理监视界面BUG

shilin 3 years atrás
parent
commit
c0db98fc9c

+ 1 - 2
web/health-hb/src/main/java/com/gyee/frame/mapper/auto/Windturbineinfodaytop2Mapper.java

@@ -4,7 +4,6 @@ import com.gyee.frame.model.auto.Windturbineinfodaytop2;
 import com.gyee.frame.model.auto.Windturbineinfodaytop2Example;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.Date;
 import java.util.List;
 
 public interface Windturbineinfodaytop2Mapper {
@@ -99,7 +98,7 @@ public interface Windturbineinfodaytop2Mapper {
     List<Windturbineinfodaytop2> getWindturbineinfodaytop2List(@Param("wpId") String wpId, @Param("year") Integer year, @Param("month") Integer month);
 
 
-    public List<Windturbineinfodaytop2> findXnfxDay(@Param(value = "wtId")String wtId,@Param(value = "beginDate") Date beginDate,@Param(value = "endDate") Date endDate);
+    public List<Windturbineinfodaytop2> findXnfxDay(@Param(value = "wtId")String wtId, @Param(value = "beginDate") String beginDate, @Param(value = "endDate") String endDate);
 
     public List<Windturbineinfodaytop2> findXnfxMonth(@Param(value = "wtId")String wtId,@Param(value = "year") String year,@Param(value = "month") String month);
 

+ 7 - 2
web/health-hb/src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java

@@ -270,7 +270,10 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 
         if(StringUtils.notEmp(beginDate) &&  StringUtils.notEmp(endDate) &&  StringUtils.isNotEmpty(wtId)){
 
-            List<Windturbineinfodaytop2> templs=  windturbineinfodaytop2Mapper.findXnfxDay(wtId,beginDate,endDate);
+            String begin=DateUtils.formatDateTime(DateUtils.truncate(beginDate));
+            String end=DateUtils.formatDateTime(DateUtils.truncate(endDate));
+
+            List<Windturbineinfodaytop2> templs= windturbineinfodaytop2Mapper.findXnfxDay(wtId,begin,end);
 
             if(!templs.isEmpty())
             {
@@ -297,7 +300,9 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 
         if(StringUtils.notEmp(beginDate) &&  StringUtils.notEmp(endDate) &&  StringUtils.isNotEmpty(wtId)){
 
-          list=  windturbineinfodaytop2Mapper.findXnfxDay(wtId,beginDate,endDate);
+            String begin=DateUtils.formatDateTime(DateUtils.truncate(beginDate));
+            String end=DateUtils.formatDateTime(DateUtils.truncate(endDate));
+          list=  windturbineinfodaytop2Mapper.findXnfxDay(wtId,begin,end);
 
 
         }else

+ 2 - 2
web/health-hb/src/main/resources/mybatis/auto/Windturbineinfodaytop2Mapper.xml

@@ -1344,10 +1344,10 @@
             and windTurbineId = #{wtId}
         </if>
         <if test="beginDate != null">
-            and recorddate >= #{beginDate}
+            and recorddate >=  to_date('${beginDate}','YYYY-MM-DD HH24:MI:SS')
         </if>
         <if test="endDate != null">
-            and recorddate &lt;= #{endDate}
+            and recorddate &lt;=  to_date('${endDate}','YYYY-MM-DD HH24:MI:SS')
         </if>
          order by Rank
     </select>