luobang 1 年之前
父节点
当前提交
f6f357cbd9
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

+ 6 - 3
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -325,9 +325,11 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 weightMapList.add(codeMap);
             }
             if(weightMapList.size() > 1) {
-                weightMapList.get(weightMapList.size() - 1).put("resultNetWeight",0);
-                weightMapList.get(weightMapList.size() - 1).put("resultTareWeight",0);
-                weightMapList.get(weightMapList.size() - 1).put("resultCrossWeight",0);
+                for(int k = 0 ; k < weightMapList.size() - 1 ; k ++) {
+                    weightMapList.get(k).put("resultNetWeight",0);
+                    weightMapList.get(k).put("resultTareWeight",0);
+                    weightMapList.get(k).put("resultCrossWeight",0);
+                }
             }
             map.put("weightMapList",weightMapList);
             addWeightBatchResult(map);
@@ -412,6 +414,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 }
             }
             utilsService.updateOrderLineSequence(codeMap);
+            tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
         }
 
         return tmstruckWeightResult;