luobang há 1 ano atrás
pai
commit
f6f357cbd9

+ 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;