同步-业务区域表,行政区域表,销售类型表,产品剂型表,客户表,业务员表,货品表 批量新增插入

This commit is contained in:
shih
2026-03-17 17:48:43 +08:00
parent 01a3a22efc
commit a23982cf17
7 changed files with 72 additions and 35 deletions

View File

@@ -38,11 +38,17 @@ public class GrBiPubCustomServiceImpl extends ServiceImpl<GrBiPubCustomMapper, G
//保存数据
int reNum = this.baseMapper.deleteOldCustom(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubCustom grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubCustom grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
}

View File

@@ -36,12 +36,18 @@ public class GrBiPubDosageServiceImpl extends ServiceImpl<GrBiPubDosageMapper, G
//保存数据
int reNum = this.baseMapper.deleteOldDosage(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubDosage grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubDosage grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
/**

View File

@@ -37,12 +37,17 @@ public class GrBiPubGoodsServiceImpl extends ServiceImpl<GrBiPubGoodsMapper, GrB
//保存数据
int reNum = this.baseMapper.deleteOldGoods(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubGoods grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubGoods grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
/**
* 查询货品

View File

@@ -36,12 +36,17 @@ public class GrBiPubProvinceServiceImpl extends ServiceImpl<GrBiPubProvinceMappe
//保存数据
int reNum = this.baseMapper.deleteOldProvince(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubProvince grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubProvince grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
/**

View File

@@ -37,12 +37,17 @@ public class GrBiPubSalerServiceImpl extends ServiceImpl<GrBiPubSalerMapper, GrB
//保存数据
int reNum = this.baseMapper.deleteOldSaler(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubSaler grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubSaler grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
/**

View File

@@ -36,12 +36,17 @@ public class GrBiPubSaletypeServiceImpl extends ServiceImpl<GrBiPubSaletypeMappe
//保存数据
int reNum = this.baseMapper.deleteOldSaletype(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubSaletype grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubSaletype grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
/**

View File

@@ -36,12 +36,17 @@ public class GrBiPubSalezoneServiceImpl extends ServiceImpl<GrBiPubSalezoneMappe
//保存数据
int reNum = this.baseMapper.deleteOldSalezone(lideeYunJiBaseConstant.DS_ERP_BI_DATA);
log.info("删除数量:{}", reNum);
for (GrBiPubSalezone grBiSaSetdtl : grBiSaSetdtlList) {
int re = this.baseMapper.insert(grBiSaSetdtl);
if (re < 1) {
throw new RuntimeException("批量新增异常");
}
//使用 saveBatch 批量插入
boolean success = this.saveBatch(grBiSaSetdtlList, 500);
if (!success) {
throw new RuntimeException("批量新增异常");
}
// for (GrBiPubSalezone grBiSaSetdtl : grBiSaSetdtlList) {
// int re = this.baseMapper.insert(grBiSaSetdtl);
// if (re < 1) {
// throw new RuntimeException("批量新增异常");
// }
// }
}
/**