处理 综合销售 数据可能为空,还处理了其他维度的字段都添加了默认值
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.lideeyunji.core.framework.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -100,6 +101,24 @@ public class NewGrBiSaAggServiceImpl extends ServiceImpl<NewGrBiSaAggMapper, New
|
||||
log.info("删除数量:{}", reNum);
|
||||
int result = 0;
|
||||
for (NewGrBiSaAgg grBiSaSetdtl : grBiSaSetdtlList) {
|
||||
if(StrUtil.isBlank(grBiSaSetdtl.getStdGoodsName())){
|
||||
grBiSaSetdtl.setStdGoodsName("其他");
|
||||
}
|
||||
if(StrUtil.isBlank(grBiSaSetdtl.getCustomName())){
|
||||
grBiSaSetdtl.setCustomName("-");
|
||||
}
|
||||
if(StrUtil.isBlank(grBiSaSetdtl.getSalerName())){
|
||||
grBiSaSetdtl.setSalerName("-");
|
||||
}
|
||||
if(StrUtil.isBlank(grBiSaSetdtl.getZoneName())){
|
||||
grBiSaSetdtl.setZoneName("-");
|
||||
}
|
||||
if(StrUtil.isBlank(grBiSaSetdtl.getDosageName())){
|
||||
grBiSaSetdtl.setDosageName("-");
|
||||
}
|
||||
if(StrUtil.isBlank(grBiSaSetdtl.getSaleTypeName())){
|
||||
grBiSaSetdtl.setSaleTypeName("-");
|
||||
}
|
||||
int re = this.baseMapper.insert(grBiSaSetdtl);
|
||||
if (re < 1) {
|
||||
throw new RuntimeException("批量新增异常");
|
||||
|
||||
Reference in New Issue
Block a user