|
@@ -1978,6 +1978,21 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
|
|
|
return Result.OK(new StorageBill());
|
|
|
}
|
|
|
|
|
|
+ // 查询 StorageBillPrint 中该装运单对应的最新记录
|
|
|
+ LambdaQueryWrapper<StorageBillPrint> printWrapper = new LambdaQueryWrapper<>();
|
|
|
+ printWrapper.eq(StorageBillPrint::getStorageBillId, latestStorageBill.getId())
|
|
|
+ .orderByDesc(StorageBillPrint::getCreateTime)
|
|
|
+ .last("LIMIT 1");
|
|
|
+ StorageBillPrint latestPrint = storageBillPrintService.getOne(printWrapper);
|
|
|
+
|
|
|
+ // 如果找到打印记录,则将对应字段覆盖到 StorageBill 上
|
|
|
+ if (latestPrint != null) {
|
|
|
+ latestStorageBill.setDestination(latestPrint.getDestination());
|
|
|
+ latestStorageBill.setAmountTotal(latestPrint.getAmountTotal());
|
|
|
+ latestStorageBill.setSize(latestPrint.getSize());
|
|
|
+ latestStorageBill.setBrandNum(latestPrint.getBrandNum());
|
|
|
+ }
|
|
|
+
|
|
|
return Result.OK(latestStorageBill);
|
|
|
}
|
|
|
|