|
@@ -100,6 +100,7 @@ public class OutServiceImpl implements OutService {
|
100
|
100
|
});
|
101
|
101
|
int currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(stack.getId(), belongId));
|
102
|
102
|
Store store;
|
|
103
|
+ Distribution distribution;
|
103
|
104
|
String noUserParam = "a";
|
104
|
105
|
if (stack.getIsLayer().equals("0")) {
|
105
|
106
|
for (int i = 0; i < listOutRecord.size(); i++) {
|
|
@@ -115,6 +116,12 @@ public class OutServiceImpl implements OutService {
|
115
|
116
|
OutRecord outRecord = getOutRecord(store, "", "0", userId);
|
116
|
117
|
num += outRecordMapper.insert(outRecord);
|
117
|
118
|
num += storeMapper.insert(store);
|
|
119
|
+
|
|
120
|
+ distribution = distributionMapper.selectByPrimaryKey(listOutRecord.get(i).getDistributionId());
|
|
121
|
+ distribution.setSumWeight(distribution.getSumWeight()- store.getWeight());
|
|
122
|
+ distribution.setSumCount(distribution.getSumCount()- store.getCount());
|
|
123
|
+ num += distributionMapper.updateByPrimaryKey(distribution);
|
|
124
|
+
|
118
|
125
|
}
|
119
|
126
|
result = Tools.moreThanZeroResultJSON(num);
|
120
|
127
|
} else {
|
|
@@ -131,6 +138,11 @@ public class OutServiceImpl implements OutService {
|
131
|
138
|
OutRecord outRecord = getOutRecord(store, "", "0", userId);
|
132
|
139
|
num += outRecordMapper.insert(outRecord);
|
133
|
140
|
num += storeMapper.insert(store);
|
|
141
|
+
|
|
142
|
+ distribution = distributionMapper.selectByPrimaryKey(listOutRecord.get(i).getDistributionId());
|
|
143
|
+ distribution.setSumWeight(distribution.getSumWeight()- store.getWeight());
|
|
144
|
+ distribution.setSumCount(distribution.getSumCount()- store.getCount());
|
|
145
|
+ num += distributionMapper.updateByPrimaryKey(distribution);
|
134
|
146
|
}
|
135
|
147
|
result = Tools.moreThanZeroResultJSON(num);
|
136
|
148
|
}
|