|
@ -196,17 +196,18 @@ public class ItembasicServiceImpl implements ItembasicService { |
|
|
if(StrUtil.isNotEmpty(massage)){ |
|
|
if(StrUtil.isNotEmpty(massage)){ |
|
|
massage.substring(0,massage.length()-1); |
|
|
massage.substring(0,massage.length()-1); |
|
|
errorList.add(importItembasic); |
|
|
errorList.add(importItembasic); |
|
|
return; |
|
|
|
|
|
} |
|
|
} |
|
|
// 判断如果不存在,在进行插入
|
|
|
if(errorList != null){ |
|
|
ItembasicDO existItembasic = itembasicMapper.selectByCode(importItembasic.getCode()); |
|
|
// 判断如果不存在,在进行插入
|
|
|
if (existItembasic == null&& mode != 3) { |
|
|
ItembasicDO existItembasic = itembasicMapper.selectByCode(importItembasic.getCode()); |
|
|
itembasicMapper.insert(ItembasicConvert.INSTANCE.convert(importItembasic)); |
|
|
if (existItembasic == null&& mode != 3) { |
|
|
} |
|
|
itembasicMapper.insert(ItembasicConvert.INSTANCE.convert(importItembasic)); |
|
|
else if (existItembasic != null && mode != 2) {// 如果存在,判断是否允许更新
|
|
|
} |
|
|
ItembasicDO itembasicDO = ItembasicConvert.INSTANCE.convert(importItembasic); |
|
|
else if (existItembasic != null && mode != 2) {// 如果存在,判断是否允许更新
|
|
|
itembasicDO.setId(existItembasic.getId()); |
|
|
ItembasicDO itembasicDO = ItembasicConvert.INSTANCE.convert(importItembasic); |
|
|
itembasicMapper.updateById(itembasicDO); |
|
|
itembasicDO.setId(existItembasic.getId()); |
|
|
|
|
|
itembasicMapper.updateById(itembasicDO); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
//错误不为空并非部分更新,手工回滚
|
|
|
//错误不为空并非部分更新,手工回滚
|
|
|