Browse Source

清空当日重复数据

master
fkf 2 years ago
parent
commit
582332a66a
  1. 5
      yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/stock/ReportStockDayService.java

5
yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/stock/ReportStockDayService.java

@ -102,6 +102,11 @@ public class ReportStockDayService extends ServiceImpl<ReportStockDayMapper, Rep
countAmount = countAmount + amount;
}
rsd.setCountAmount(countAmount);
//清空当日数据
baseMapper.delete(new QueryWrapper<ReportStockDay>().eq("orderDate",orderDate).eq("projectSid",projectSid));
reportStockDayStoreService.remove(new QueryWrapper<ReportStockDayStore>().eq("orderDate",orderDate).eq("projectSid",projectSid));
reportStockDayProductService.remove(new QueryWrapper<ReportStockDayProduct>().eq("orderDate",orderDate).eq("projectSid",projectSid));
//清空之后在添加数据
baseMapper.insert(rsd);
reportStockDayStoreService.saveBatch(insertStoreList);
reportStockDayProductService.saveBatch(insertProductList);

Loading…
Cancel
Save