Selaa lähdekoodia

自来水预测数据接口 增加检查机制修改数据

1037015548@qq.com 1 vuosi sitten
vanhempi
commit
a4119be90f

+ 17 - 0
src/main/java/com/shkpr/service/aimodelpower/bizmgr/KprAimTapWaterBizFun.java

@@ -445,6 +445,23 @@ public class KprAimTapWaterBizFun {
                                                                                 FastJsonUtil.toJSON(recordAllEntity)));
                                                                                 FastJsonUtil.toJSON(recordAllEntity)));
                                                             }
                                                             }
                                                         }
                                                         }
+                                                    }else{
+                                                        //TODO 说明存在,进行修改
+                                                        if(!ObjectUtils.isEmpty(recordAllEntity.get("value"))) {
+                                                            int updateCode = getWaterTapWaterApi().updateWaterCollectionRecordAll(String.valueOf(value)," WHERE " +
+                                                                    "(" +
+                                                                    " org_name = '" + recordAllEntity.get("org_name") + "' and" +
+                                                                    " \"time\" = '" + recordAllEntity.get("time") + "' and" +
+                                                                    " value_tag = '" + recordAllEntity.get("value_tag") + "'" +
+                                                                    ") ");
+                                                            if (updateCode < 0) {
+                                                                LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_ERROR
+                                                                        , mStrClassName
+                                                                        , mStrClassName
+                                                                        , String.format("Batch updateWaterCollectionRecordAll 未成功:{%s} ",
+                                                                                FastJsonUtil.toJSON(recordAllEntity)));
+                                                            }
+                                                        }
                                                     }
                                                     }
                                                 }
                                                 }
                                                 latch2.countDown();
                                                 latch2.countDown();