同步-业务区域表,行政区域表,销售类型表,产品剂型表,客户表,业务员表,货品表 批量新增插入
This commit is contained in:
@@ -38,11 +38,17 @@ public class GrBiPubCustomServiceImpl extends ServiceImpl<GrBiPubCustomMapper, G
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldCustom(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldCustom(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubCustom grBiSaSetdtl : grBiSaSetdtlList) {
|
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
//使用 saveBatch 批量插入
|
||||||
if (re < 1) {
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
throw new RuntimeException("批量新增异常");
|
if (!success) {
|
||||||
}
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubCustom grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,12 +36,18 @@ public class GrBiPubDosageServiceImpl extends ServiceImpl<GrBiPubDosageMapper, G
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldDosage(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldDosage(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubDosage grBiSaSetdtl : grBiSaSetdtlList) {
|
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
//使用 saveBatch 批量插入
|
||||||
if (re < 1) {
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
throw new RuntimeException("批量新增异常");
|
if (!success) {
|
||||||
}
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubDosage grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -37,12 +37,17 @@ public class GrBiPubGoodsServiceImpl extends ServiceImpl<GrBiPubGoodsMapper, GrB
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldGoods(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldGoods(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubGoods grBiSaSetdtl : grBiSaSetdtlList) {
|
//使用 saveBatch 批量插入
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
if (re < 1) {
|
if (!success) {
|
||||||
throw new RuntimeException("批量新增异常");
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubGoods grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 查询货品
|
* 查询货品
|
||||||
|
|||||||
@@ -36,12 +36,17 @@ public class GrBiPubProvinceServiceImpl extends ServiceImpl<GrBiPubProvinceMappe
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldProvince(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldProvince(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubProvince grBiSaSetdtl : grBiSaSetdtlList) {
|
//使用 saveBatch 批量插入
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
if (re < 1) {
|
if (!success) {
|
||||||
throw new RuntimeException("批量新增异常");
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubProvince grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -37,12 +37,17 @@ public class GrBiPubSalerServiceImpl extends ServiceImpl<GrBiPubSalerMapper, GrB
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldSaler(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldSaler(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubSaler grBiSaSetdtl : grBiSaSetdtlList) {
|
//使用 saveBatch 批量插入
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
if (re < 1) {
|
if (!success) {
|
||||||
throw new RuntimeException("批量新增异常");
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubSaler grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,12 +36,17 @@ public class GrBiPubSaletypeServiceImpl extends ServiceImpl<GrBiPubSaletypeMappe
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldSaletype(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldSaletype(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubSaletype grBiSaSetdtl : grBiSaSetdtlList) {
|
//使用 saveBatch 批量插入
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
if (re < 1) {
|
if (!success) {
|
||||||
throw new RuntimeException("批量新增异常");
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubSaletype grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,12 +36,17 @@ public class GrBiPubSalezoneServiceImpl extends ServiceImpl<GrBiPubSalezoneMappe
|
|||||||
//保存数据
|
//保存数据
|
||||||
int reNum = this.baseMapper.deleteOldSalezone(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
int reNum = this.baseMapper.deleteOldSalezone(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
|
||||||
log.info("删除数量:{}", reNum);
|
log.info("删除数量:{}", reNum);
|
||||||
for (GrBiPubSalezone grBiSaSetdtl : grBiSaSetdtlList) {
|
//使用 saveBatch 批量插入
|
||||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
|
||||||
if (re < 1) {
|
if (!success) {
|
||||||
throw new RuntimeException("批量新增异常");
|
throw new RuntimeException("批量新增异常");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// for (GrBiPubSalezone grBiSaSetdtl : grBiSaSetdtlList) {
|
||||||
|
// int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||||
|
// if (re < 1) {
|
||||||
|
// throw new RuntimeException("批量新增异常");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user