|
@@ -56,11 +56,6 @@ public class LogisticsAmountServiceImpl extends ServiceImpl<LogisticsAmountMappe
|
|
for (LogisticsAmountDto dto : list) {
|
|
for (LogisticsAmountDto dto : list) {
|
|
Assert.notEmpty(dto.getLogisticsCompanyId(), "物流公司不能为空!");
|
|
Assert.notEmpty(dto.getLogisticsCompanyId(), "物流公司不能为空!");
|
|
Assert.notEmpty(dto.getYear(), "年份不能为空!");
|
|
Assert.notEmpty(dto.getYear(), "年份不能为空!");
|
|
- if (ObjectUtil.isEmpty(dto.getId())) {
|
|
|
|
- if (this.count(q -> q.eq(LogisticsAmount::getYear, dto.getYear())) > 0) {
|
|
|
|
- throw new ServiceException(StrUtil.format("已存在{}年的数据记录,请直接修改不要重复添加!", dto.getYear()));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
this.saveOrUpdate(dto);
|
|
this.saveOrUpdate(dto);
|
|
}
|
|
}
|
|
}
|
|
}
|