|
@@ -88,7 +88,14 @@ public class RepairSupplyService {
|
|
|
HashMap<Integer,PartLog> map = new HashMap<>();
|
|
|
if(type != 2){
|
|
|
List<PartLog> partLogs = partLogService.list(wrapper2);
|
|
|
- partLogs.forEach(entity -> map.put(entity.getPartId(),entity));
|
|
|
+ for (PartLog partLog : partLogs) {
|
|
|
+ if(map.get(partLog.getPartId()) != null){
|
|
|
+ PartLog partLog1 = map.get(partLog.getPartId());
|
|
|
+ partLog1.setCount(partLog1.getCount() + partLog.getCount());
|
|
|
+ }else {
|
|
|
+ map.put(partLog.getPartId(),partLog);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
HashMap<Integer,Integer> partPriceListMap = new HashMap<>();
|