zhangy 2 anni fa
parent
commit
54670cadff

+ 9 - 3
src/main/java/com/steerinfo/ems/trmcalpoint/service/impl/TRmCalpointServiceImpl.java

@@ -943,10 +943,16 @@ public class TRmCalpointServiceImpl extends BaseServiceImpl<TRmCalpoint, String>
                 EmsPAiHourSumTab1 po = new EmsPAiHourSumTab1();
                 po.setClock(clock1);
                 po.setVal(hval.doubleValue(), tag);
-                if (emsPAiHourSumTab1Mapper.updateByPrimaryKeySelective(po) == 0) {
-                    po.setInsertTime(new Date());
-                    emsPAiHourSumTab1Mapper.insert(po);
+                try{
+                    if (emsPAiHourSumTab1Mapper.updateByPrimaryKeySelective(po) == 0) {
+                        po.setInsertTime(new Date());
+                        emsPAiHourSumTab1Mapper.insert(po);
+                    }
+                }catch (Exception e){
+                    logger.info("小时数据出错:" + itemid);
+                    e.printStackTrace();
                 }
+
             } else {
                 EmsWAiHourSumTab1 wo = new EmsWAiHourSumTab1();
                 wo.setClock(clock1);