Browse Source

设备运行查询返回参数过滤TIME

sl 2 months ago
parent
commit
cf95633773

+ 6 - 0
module_tpm/src/main/java/org/jeecg/modules/equipmentOnoff/service/impl/EquipmentOnoffServiceImpl.java

@@ -156,6 +156,12 @@ public class EquipmentOnoffServiceImpl extends ServiceImpl<EquipmentOnoffMapper,
         }catch (NullPointerException e){}
         for(Collectdata collectdata:orgDataList){
             Map<String, Object> dataMap = new ObjectMapper().convertValue(collectdata.getProperties(), Map.class);
+            if(dataMap.containsKey("TIME")){
+                dataMap.remove("TIME");
+            }
+            if(dataMap.containsKey("time")){
+                dataMap.remove("time");
+            }
             dataMap.put("logtime", collectdata.getLogtime());
             historyList.add(dataMap);
         }

+ 1 - 1
module_tpm/src/main/java/org/jeecg/modules/tpmparams/mapper/xml/TpmParamsMapper.xml

@@ -30,7 +30,7 @@
     </select>
 
     <select id="queryByEquipId" resultMap="TpmParamsResult">
-        select t2.* from tpm_params t2 where t2.equipmentcode=(select equipmentcode from tpm_equipment where id=#{equipmentid});
+        select t2.* from tpm_params t2 where t2.equipmentcode=(select equipmentcode from tpm_equipment where id=#{equipmentid}) and t2.symbol != "TIME";
     </select>
 
 </mapper>