Bladeren bron

新增工业库三个数组数据代码优化

wangmiaomiao 11 maanden geleden
bovenliggende
commit
64e03c075e
1 gewijzigde bestanden met toevoegingen van 13 en 13 verwijderingen
  1. 13 13
      slibra-quartz/src/main/java/com/slibra/quartz/task/RyTask.java

+ 13 - 13
slibra-quartz/src/main/java/com/slibra/quartz/task/RyTask.java

@@ -267,21 +267,21 @@ public class RyTask
                     }else if ("信义污水厂除磷加药瞬时流量".equals(type)) {
                         industry.setCLJYSSLL(value);
                     }
-                    //2024年4月22日15:45:24  额外保存两个字段 数组
-                    List<BigDecimal> extraList = new ArrayList<>();
-                    extraList.add(industry.getOneHymdDo());
-                    extraList.add(industry.getTwoHymdDo());
-                    industry.setHycRjyAll(JSON.toJSONString(extraList));
-                    extraList.clear();
-                    extraList.add(industry.getOneHyzdDo());
-                    extraList.add(industry.getTwoHyzdDo());
-                    industry.setHycRjyZdAll(JSON.toJSONString(extraList));
-                    extraList.clear();
-                    extraList.add(industry.getOneMlss());
-                    extraList.add(industry.getTwoMlss());
-                    industry.setHycWnndAll(JSON.toJSONString(extraList));
                     //只有最后一次才执行数据库添加
                     if(finalJ == list.size()-1){
+                        //2024年4月22日15:45:24  额外保存两个字段 数组
+                        List<BigDecimal> extraList = new ArrayList<>();
+                        extraList.add(industry.getOneHymdDo());
+                        extraList.add(industry.getTwoHymdDo());
+                        industry.setHycRjyAll(JSON.toJSONString(extraList));
+                        extraList.clear();
+                        extraList.add(industry.getOneHyzdDo());
+                        extraList.add(industry.getTwoHyzdDo());
+                        industry.setHycRjyZdAll(JSON.toJSONString(extraList));
+                        extraList.clear();
+                        extraList.add(industry.getOneMlss());
+                        extraList.add(industry.getTwoMlss());
+                        industry.setHycWnndAll(JSON.toJSONString(extraList));
                         //插入数据库
                         xinyiIndustryMapper.insertTXinyiIndustry(industry);
                     }