|
@@ -81,6 +81,20 @@ import java.util.stream.Stream;
|
|
@Lazy
|
|
@Lazy
|
|
public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> implements IFormulaService {
|
|
public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> implements IFormulaService {
|
|
|
|
|
|
|
|
+ public final static String WP="WP";
|
|
|
|
+ public final static String CHAIN="trees";
|
|
|
|
+ public final static String FC="FC.";
|
|
|
|
+ public final static String TABLE_LIST="TBL";
|
|
|
|
+ public final static String CHECK_ITEMS="CKI";
|
|
|
|
+ public static final Pattern AP=Pattern.compile("(E|WP)\\[([^]']+)]");
|
|
|
|
+ public static final String FC_REG="T\\(com.mixsmart.utils.CustomFunction\\)\\.";
|
|
|
|
+ public final static String CTI="ContractInfo";
|
|
|
|
+ /**元素标识*/
|
|
|
|
+ public final static String E="E";
|
|
|
|
+ /**公式参数*/
|
|
|
|
+ public final static String FMOT="OP";
|
|
|
|
+ /**是否使用表单公式*/
|
|
|
|
+ public final static boolean isForm=true;
|
|
private final IWbsParamService wpService;
|
|
private final IWbsParamService wpService;
|
|
private final FormulaStrategyFactory formulaStrategyFactory;
|
|
private final FormulaStrategyFactory formulaStrategyFactory;
|
|
private final IWbsTreeContractService wbsTreeContractService;
|
|
private final IWbsTreeContractService wbsTreeContractService;
|
|
@@ -95,26 +109,10 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
private final WbsTreeContractMapper wbsTreeContractMapper;
|
|
private final WbsTreeContractMapper wbsTreeContractMapper;
|
|
private final IFormulaDao formulaDao;
|
|
private final IFormulaDao formulaDao;
|
|
private final CertificateItemClient certificateItemClient;
|
|
private final CertificateItemClient certificateItemClient;
|
|
|
|
+ private final NewIOSSClient newIOSSClient;
|
|
@Lazy
|
|
@Lazy
|
|
@Autowired
|
|
@Autowired
|
|
private IExcelTabService excelTabService;
|
|
private IExcelTabService excelTabService;
|
|
- public final static String WP="WP";
|
|
|
|
- public final static String CHAIN="trees";
|
|
|
|
- public final static String FC="FC.";
|
|
|
|
- public final static String TABLE_LIST="TBL";
|
|
|
|
- public final static String CHECK_ITEMS="CKI";
|
|
|
|
- public static final Pattern AP=Pattern.compile("(E|WP)\\[([^]']+)]");
|
|
|
|
- public static final String FC_REG="T\\(com.mixsmart.utils.CustomFunction\\)\\.";
|
|
|
|
- public final static String CTI="ContractInfo";
|
|
|
|
- /**元素标识*/
|
|
|
|
- public final static String E="E";
|
|
|
|
- /**公式参数*/
|
|
|
|
- public final static String FMOT="OP";
|
|
|
|
-
|
|
|
|
- /**是否使用表单公式*/
|
|
|
|
- public final static boolean isForm=true;
|
|
|
|
-
|
|
|
|
- private final NewIOSSClient newIOSSClient;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void execute(TableElementConverter tec) {
|
|
public void execute(TableElementConverter tec) {
|
|
@@ -1165,6 +1163,25 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
}else{
|
|
}else{
|
|
putEle(f,ele,currentMap,fd);
|
|
putEle(f,ele,currentMap,fd);
|
|
Object data =Expression.parse(formula.getFormula()).calculate(currentMap);
|
|
Object data =Expression.parse(formula.getFormula()).calculate(currentMap);
|
|
|
|
+ //如果有空串,也要加进data不然表格数据顺序会混乱
|
|
|
|
+ try {
|
|
|
|
+ Object e = currentMap.get("E");
|
|
|
|
+ if(e instanceof HashMap){
|
|
|
|
+ if(data instanceof List){
|
|
|
|
+ List<Object>e1 = (List<Object>)((HashMap<?, ?>) e).get(ele.get(0).getCode());
|
|
|
|
+ List<Object> values = (List<Object>) data;
|
|
|
|
+ if(e1.size()!=values.size()){
|
|
|
|
+ for (int i = 0; i < e1.size(); i++) {
|
|
|
|
+ if(e1.get(i).equals("")){
|
|
|
|
+ values.add(i,"");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception ee){
|
|
|
|
+ ee.printStackTrace();
|
|
|
|
+ }
|
|
write(tec,fd,data);
|
|
write(tec,fd,data);
|
|
}
|
|
}
|
|
/*错位计算偏移量重置*/
|
|
/*错位计算偏移量重置*/
|
|
@@ -2122,6 +2139,11 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<ReportResult> execute4(Long contractId, Long periodId, Integer type) {
|
|
|
|
+
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
public void updateRecord(Long id, Map<String, Object> fieldValues,String tableName) {
|
|
public void updateRecord(Long id, Map<String, Object> fieldValues,String tableName) {
|