|
@@ -7,6 +7,7 @@ import cn.hutool.core.util.HashUtil;
|
|
|
import cn.hutool.log.StaticLog;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
@@ -21,14 +22,17 @@ import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.ss.util.CellReference;
|
|
|
import org.apache.poi.util.IOUtils;
|
|
|
+import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
|
|
import org.jsoup.Jsoup;
|
|
|
import org.jsoup.nodes.Document;
|
|
|
import org.jsoup.nodes.Element;
|
|
|
import org.jsoup.select.Elements;
|
|
|
import org.springblade.common.constant.CommonConstant;
|
|
|
+import org.springblade.common.constant.MeasurementStorage;
|
|
|
import org.springblade.common.utils.BaseUtils;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
+import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.mp.base.BaseEntity;
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
@@ -88,6 +92,8 @@ import java.util.stream.Collectors;
|
|
|
import java.util.stream.IntStream;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
+import static org.springblade.manager.utils.TableCoordinates.*;
|
|
|
+
|
|
|
/**
|
|
|
* @author yangyj
|
|
|
* @Date 2022/6/9 14:29
|
|
@@ -5489,6 +5495,36 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
boolean nonNumeric = values.stream().filter(StringUtils::isNotEmpty).anyMatch(e -> !StringUtils.isNumber(e));
|
|
|
/*保留小数位,去除*/
|
|
|
values = values.stream().map(e -> StringUtils.number2StringZero(e,8)).collect(Collectors.toList());
|
|
|
+ //boolean nonNumeric = values.stream().filter(StringUtils::isNotEmpty).anyMatch(e -> !StringUtils.isNumber(e));
|
|
|
+ boolean nonNumeric = values.stream()
|
|
|
+ .filter(StringUtils::isNotEmpty)
|
|
|
+ .anyMatch(e -> {
|
|
|
+ String str = e.toString().trim();
|
|
|
+ // 检查包含的分隔符类型,按优先级处理
|
|
|
+ String[] parts;
|
|
|
+ if (str.contains("、")) {
|
|
|
+ parts = str.split("、");
|
|
|
+ } else if (str.contains(",")) {
|
|
|
+ parts = str.split(",");
|
|
|
+ } else if (str.contains(",")) {
|
|
|
+ parts = str.split(",");
|
|
|
+ } else if (str.contains("/")) {
|
|
|
+ parts = str.split("/");
|
|
|
+ } else if (str.contains(" ")) {
|
|
|
+ parts = str.split("\\s+");
|
|
|
+ } else {
|
|
|
+ // 不包含分隔符的情况,直接判断
|
|
|
+ return !StringUtils.isNumber(str);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 对拆分后的每个部分进行数字判断
|
|
|
+ for (String part : parts) {
|
|
|
+ if (!StringUtils.isNumber(part.trim())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ });
|
|
|
if (nonNumeric) {
|
|
|
data = values.stream().filter(StringUtils::isNotEmpty).count();
|
|
|
} else if (designFd != null) {
|