|
@@ -107,18 +107,18 @@ public class DistributionServiceImpl implements DistributionService {
|
107
|
107
|
// 重新获取ID,第一次配车的时候会出现没有ID的情况
|
108
|
108
|
Distribution distribution1 = distributionMapper.selectByTruckNo(distribution.getTruckNo(), belongId);
|
109
|
109
|
for (int i = 0; i < list.size(); i++) {
|
110
|
|
- Store store = storeMapper.selectByPrimaryKey(list.get(i).getId());
|
111
|
|
- if (!store.getLockFlag().equals("1") && distribution1.getId()!= null && !distribution1.getId().equals("")){
|
112
|
|
- list.get(i).setLockFlag("1");
|
113
|
|
- num += storeMapper.updateByPrimaryKey(list.get(i));
|
114
|
|
- DistributionDetail detail = getDistributionDetail(distribution1, list.get(i), userId, belongId);
|
115
|
|
- num += distributionDetailMapper.insert(detail);
|
116
|
|
- DistributionRecord record = getDistributionRecord(distribution1, list.get(i), "1",userId, belongId);
|
117
|
|
- num += distributionRecordMapper.insert(record);
|
118
|
|
- }
|
|
110
|
+ Store store = storeMapper.selectByPrimaryKey(list.get(i).getId());
|
|
111
|
+ if (!store.getLockFlag().equals("1") && distribution1.getId()!= null && !distribution1.getId().equals("")){
|
|
112
|
+ list.get(i).setLockFlag("1");
|
|
113
|
+ num += storeMapper.updateByPrimaryKey(list.get(i));
|
|
114
|
+ DistributionDetail detail = getDistributionDetail(distribution1, list.get(i), userId, belongId);
|
|
115
|
+ num += distributionDetailMapper.insert(detail);
|
|
116
|
+ DistributionRecord record = getDistributionRecord(distribution1, list.get(i), "1",userId, belongId);
|
|
117
|
+ num += distributionRecordMapper.insert(record);
|
|
118
|
+ }
|
119
|
119
|
|
|
120
|
+ }
|
120
|
121
|
}
|
121
|
|
-}
|
122
|
122
|
public DistributionDetail getDistributionDetail(Distribution distribution, Store store, String userId, String belongId) {
|
123
|
123
|
DistributionDetail detail = new DistributionDetail();
|
124
|
124
|
detail.setDistributionId(distribution.getId());
|