2 Revize 38f6dc83bd ... c71eb40b47

Autor SHA1 Zpráva Datum
  hfxc226 c71eb40b47 完善电度采集,负值都取绝对值然后计算 před 6 měsíci
  hfxc226 ebd1479595 完善电度采集 před 6 měsíci

+ 3 - 3
platform-dao/src/main/resources/mapper/remote/RemoteDegreeLogMapper.xml

@@ -115,12 +115,12 @@
         </if>
         <if test="keyword != null and keyword != ''">
             and (
-                degree.sb_name like concat(concat('%',#{keyword}),'%')
-                or degree_log.position_num like concat(concat('%',#{keyword}),'%')
+                degree.sb_name like concat('%',#{keyword},'%')
+                or degree_log.position_num like concat('%',#{keyword},'%')
             )
         </if>
         <if test="sbName != null and sbName != ''">
-            and degree.sb_name like concat(concat('%',#{sbName}),'%')
+            and degree.sb_name like concat('%',#{sbName},'%')
         </if>
         <if test="line != null">
             and degree.line = #{line}

+ 3 - 3
platform-dao/src/main/resources/mapper/remote/RemoteDegreeMapper.xml

@@ -96,9 +96,9 @@
         </if>
         <if test="keyword != null and keyword != ''">
             and (
-            degree.id like concat(concat('%',#{keyword}),'%')
-            or degree.position_num like concat(concat('%',#{keyword}),'%')
-            }
+                degree.position_num like concat('%',#{keyword},'%')
+                or degree.sb_name like concat('%',#{keyword},'%')
+            )
         </if>
     </sql>
     <select id="selectList" parameterType="com.platform.dao.dto.remote.RemoteDegreeDTO"

+ 6 - 0
platform-service/src/main/java/com/platform/service/big/impl/BigScreenSbInfoServiceImpl.java

@@ -222,6 +222,12 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
             record.setHour(0);
         }
         List<RemoteDegreeLogVO> list = remoteDegreeLogMapper.selectList(record);
+
+        // 全部取绝对值,有负数的去掉
+        for (RemoteDegreeLogVO degreeLog : list) {
+            degreeLog.setResult(degreeLog.getResult().replace("-", ""));
+        }
+
         JSONArray jSONArray = new JSONArray();
         if (isDay) {// 日报,需要减去上个小时的
             // 找到前天晚上23点的