|
@@ -101,20 +101,25 @@ public class PurchasePriceServiceImpl extends ServiceImpl<PurchasePriceMapper, P
|
|
// 操作主表数据
|
|
// 操作主表数据
|
|
this.insert(purchasePrice);
|
|
this.insert(purchasePrice);
|
|
|
|
|
|
|
|
+ List<PurchasePriceDetail> list = new ArrayList<>();
|
|
// 操作明细表数据
|
|
// 操作明细表数据
|
|
for (PurchasePriceDetail tmp : purchasePrice.getDetails()) {
|
|
for (PurchasePriceDetail tmp : purchasePrice.getDetails()) {
|
|
tmp.setId(IdGenerator.generateUUID());
|
|
tmp.setId(IdGenerator.generateUUID());
|
|
tmp.setCompId(compId);
|
|
tmp.setCompId(compId);
|
|
tmp.setMainId(mainId);
|
|
tmp.setMainId(mainId);
|
|
- this.purchasePriceDetailService.insert(tmp);
|
|
|
|
|
|
+ list.add(tmp);
|
|
}
|
|
}
|
|
|
|
+ this.purchasePriceDetailService.insertBatch(list);
|
|
|
|
+ List<PurchasePriceDetailPrint> list1 = new ArrayList<>();
|
|
// 操作打印表数据
|
|
// 操作打印表数据
|
|
for (PurchasePriceDetailPrint tmp : purchasePrice.getDetailPrints()) {
|
|
for (PurchasePriceDetailPrint tmp : purchasePrice.getDetailPrints()) {
|
|
tmp.setId(IdGenerator.generateUUID());
|
|
tmp.setId(IdGenerator.generateUUID());
|
|
tmp.setCompId(compId);
|
|
tmp.setCompId(compId);
|
|
tmp.setMainId(mainId);
|
|
tmp.setMainId(mainId);
|
|
- this.purchasePriceDetailPrintService.insert(tmp);
|
|
|
|
|
|
+ list1.add(tmp);
|
|
}
|
|
}
|
|
|
|
+ this.purchasePriceDetailPrintService.insertBatch(list1);
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
System.out.println("新增收购价格异常:" + e.toString());
|
|
System.out.println("新增收购价格异常:" + e.toString());
|
|
}
|
|
}
|