|
|
@@ -35,6 +35,7 @@ import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import javax.persistence.criteria.CriteriaBuilder;
|
|
|
@@ -167,7 +168,12 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
|
|
|
seekPurchaseByBatchList.add(seekPurchaseByBatch);
|
|
|
}
|
|
|
}
|
|
|
- seekPurchaseByBatchDao.save(seekPurchaseByBatchList);
|
|
|
+ if (CollectionUtils.isEmpty(seekPurchaseByBatchList)) {
|
|
|
+ seekPurchaseBomDao.delete(seekPurchaseBom.getId());
|
|
|
+ return new ResultMap(CodeType.PARAMETER_ERROR, "上传的excel内容为空,请填写完整后上传");
|
|
|
+ } else {
|
|
|
+ seekPurchaseByBatchDao.save(seekPurchaseByBatchList);
|
|
|
+ }
|
|
|
}
|
|
|
return ResultMap.success(seekPurchaseBom.getId());
|
|
|
}
|