|
|
@@ -12,11 +12,13 @@ import com.mixsmart.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.springblade.common.utils.BaseUtils;
|
|
|
+import org.springblade.core.tool.utils.CollectionUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.core.tool.utils.StringPool;
|
|
|
import org.springblade.manager.bean.TableInfo;
|
|
|
import org.springblade.manager.dto.*;
|
|
|
import org.springblade.manager.entity.Formula;
|
|
|
+import org.springblade.manager.entity.WbsTreeContractExtend;
|
|
|
import org.springblade.manager.enums.ExecuteType;
|
|
|
import org.springblade.manager.formula.FormulaLog;
|
|
|
import org.springblade.manager.formula.ITableElementConverter;
|
|
|
@@ -44,6 +46,7 @@ public class TableElementConverter implements ITableElementConverter {
|
|
|
public static String JOIN_REG = "__\\d+_\\d+,?";
|
|
|
public static Pattern RP = Pattern.compile("(?<=E\\[)[^]]+(?=])");
|
|
|
|
|
|
+ private WbsTreeContractExtend contractExtend;
|
|
|
private List<TableInfo> tableInfoList;
|
|
|
private Long contractId;
|
|
|
private Long projectId;
|
|
|
@@ -296,9 +299,19 @@ public class TableElementConverter implements ITableElementConverter {
|
|
|
/*备份原始数据,用于更新比较*/
|
|
|
fd.init();
|
|
|
formDataMap.put(fd.getCode(), fd);
|
|
|
+
|
|
|
if (fd.getFormula() != null) {
|
|
|
- /*只有需要执行公式的才放这里*/
|
|
|
- formDataList.add(fd);
|
|
|
+ if (contractExtend != null && StringUtils.isNotEmpty(contractExtend.getFormulaConfig())) {
|
|
|
+ List<String> list = Arrays.asList(contractExtend.getFormulaConfig().split(","));
|
|
|
+ if(CollectionUtil.isEmpty(list) || !list.contains(fd.getCode())){
|
|
|
+ /*只有需要执行公式的才放这里*/
|
|
|
+ formDataList.add(fd);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ /*只有需要执行公式的才放这里*/
|
|
|
+ formDataList.add(fd);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|