|
@@ -187,6 +187,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
* @param map orderId, oldMaterialMapList, newMaterialMapList
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public int updateSteelTruckWeightResult(Map<String, Object> map){
|
|
|
BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
List<Map<String, Object>> newMaterialMapList = (List<Map<String, Object>>) map.get("newMaterialMapList");
|
|
@@ -240,7 +241,6 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -303,7 +303,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
for (Map<String, Object> map : oldMaterialMapList) {
|
|
|
String materialId = String.valueOf(map.get("materialId"));
|
|
|
|
|
|
- Map<String, Object> newMap = getNewMap(materialId, newMaterialMapList);
|
|
|
+ Map<String, Object> newMap = getNewMap(Integer.parseInt(materialId), newMaterialMapList);
|
|
|
if(newMap == null){
|
|
|
|
|
|
delete.add(DataChange.dataToBigDecimal(map.get("materialId")));
|
|
@@ -322,7 +322,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
|
|
|
for (Map<String, Object> map : newMaterialMapList) {
|
|
|
String materialId = String.valueOf(map.get("materialId"));
|
|
|
- Map<String, Object> oldMaps = getNewMap(materialId, oldMaterialMapList);
|
|
|
+ Map<String, Object> oldMaps = getNewMap(Integer.parseInt(materialId), oldMaterialMapList);
|
|
|
if(oldMaps == null){
|
|
|
|
|
|
add.add(map);
|
|
@@ -340,7 +340,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
* @param mapList
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, Object> getNewMap(String key, List<Map<String, Object>> mapList){
|
|
|
+ public Map<String, Object> getNewMap(int key, List<Map<String, Object>> mapList){
|
|
|
for (Map<String, Object> map : mapList) {
|
|
|
if(map.containsValue(key)){
|
|
|
return map;
|