Эх сурвалжийг харах

1、修改模型指标查询bug

Gogs 2 сар өмнө
parent
commit
661af6abaf

+ 5 - 5
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/ghss/ZbmxJcpgyjServiceImpl.java

@@ -123,13 +123,13 @@ public class ZbmxJcpgyjServiceImpl implements IZbmxJcpgyjService {
             //监测值(趋势分析)
             ZbmxZbjczDTO qsfx = zbmxJcpgyjMapper.SeletQSFX(page.getXzqdm(), page.getZbbh(), page.getYear());
             //监测值(环比分析)
-            Calendar calendar = Calendar.getInstance();
-            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
-            String jcsj = dateFormat.format(calendar.getTime());
-            ZbmxZbjczDTO hbfx = zbmxJcpgyjMapper.SelectHBFX(page.getXzqdm(), page.getZbbh(), jcsj);
+//            Calendar calendar = Calendar.getInstance();
+//            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
+//            String jcsj = dateFormat.format(calendar.getTime());
+            ZbmxZbjczDTO hbfx = zbmxJcpgyjMapper.SelectHBFX(page.getXzqdm(), page.getZbbh(), page.getYear());
             //监测值(目标对比)
             String timejczmbdb = "";
-            if (page.getYear() == null || page.getYear() == "") {
+            if (page.getYear() == null || Objects.equals(page.getYear(), "")) {
                 Calendar cal = Calendar.getInstance();
                 timejczmbdb = Integer.toString(cal.get(Calendar.YEAR));
             } else {

+ 3 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/oracle/ghss/ZbmxJcyjMapper.xml

@@ -141,6 +141,9 @@
         <if test="zbbh != null and zbbh != ''">
             and t.zbbh = #{zbbh}
         </if>
+        <if test="jcsj != null and jcsj != ''">
+            and t.jcsj = #{jcsj})
+        </if>
 
         order by t.jcsj desc) a
     </select>