|
@@ -2612,6 +2612,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
for(Map.Entry<String,Object> entry:map.entrySet()){
|
|
for(Map.Entry<String,Object> entry:map.entrySet()){
|
|
result.put(entry.getKey(),StringUtils.handleNull(entry.getValue()));
|
|
result.put(entry.getKey(),StringUtils.handleNull(entry.getValue()));
|
|
}
|
|
}
|
|
|
|
+ result.put("projectId",projectId);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2623,7 +2624,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
|
|
|
/*元素创建*/
|
|
/*元素创建*/
|
|
Map<String,String> parent= getWtpParent(meterType.getName(),contractInfo.getPId());
|
|
Map<String,String> parent= getWtpParent(meterType.getName(),contractInfo.getPId());
|
|
- List<NodeTable> tableList= this.getSqlList("select p_key_id pkeyId, node_name nodeName ,init_table_name initTableName,html_url htmlUrl ,excel_id excelId from m_wbs_tree_private where ancestors like ? and LENGTH(html_url)>0 and is_deleted=0 and project_id=? and wbs_id=?",NodeTable.class,parent.get("path")+"%",contractInfo.getPId(),parent.get("wbsId"));
|
|
|
|
|
|
+ List<NodeTable> tableList=getTableListMeter(parent);
|
|
Map<String,Map<String,String>> coordinateMap=tableList.parallelStream().collect(Collectors.toMap(NodeTable::getInitTableName,m->FormulaUtils.getElementCell(m.getHtmlUrl()),(v1,v2)->v2));
|
|
Map<String,Map<String,String>> coordinateMap=tableList.parallelStream().collect(Collectors.toMap(NodeTable::getInitTableName,m->FormulaUtils.getElementCell(m.getHtmlUrl()),(v1,v2)->v2));
|
|
List<FormData> processFds = this.createFormDataByTableName(tableList.stream().map(NodeTable::getInitTableName).collect(Collectors.joining("','")));
|
|
List<FormData> processFds = this.createFormDataByTableName(tableList.stream().map(NodeTable::getInitTableName).collect(Collectors.joining("','")));
|
|
listForMeter(processFds,contractInfo.getPId(),parent.get("id"));
|
|
listForMeter(processFds,contractInfo.getPId(),parent.get("id"));
|
|
@@ -2641,18 +2642,20 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
List<FormulaHandleChain> formulaHandleChains = new ArrayList<>();
|
|
List<FormulaHandleChain> formulaHandleChains = new ArrayList<>();
|
|
/*初始化*/
|
|
/*初始化*/
|
|
ExecutorInit init= new ExecutorInit(tec);
|
|
ExecutorInit init= new ExecutorInit(tec);
|
|
- init.setBaseInfoFc(this.formulaDao.getBaseInfoFc());
|
|
|
|
|
|
+/* init.setBaseInfoFc(this.formulaDao.getBaseInfoFc());
|
|
init.setMeterPeriodFc(this.formulaDao.getMeterPeriodFc());
|
|
init.setMeterPeriodFc(this.formulaDao.getMeterPeriodFc());
|
|
- init .setMeterTreeFc(this.formulaDao.getMeterTreeFc());
|
|
|
|
|
|
+ init .setMeterTreeFc(this.formulaDao.getMeterTreeFc());*/
|
|
|
|
+ BeanUtils.copyProperties(this.formulaDao,init);
|
|
formulaHandleChains.add(init);
|
|
formulaHandleChains.add(init);
|
|
formulaHandleChains.add(new ExecutorSort(tec));
|
|
formulaHandleChains.add(new ExecutorSort(tec));
|
|
formulaHandleChains.add(new ExecutorPre(tec));
|
|
formulaHandleChains.add(new ExecutorPre(tec));
|
|
/*特殊公式*/
|
|
/*特殊公式*/
|
|
ExecutorSpecial special = new ExecutorSpecial(tec);
|
|
ExecutorSpecial special = new ExecutorSpecial(tec);
|
|
- special.setMaterialFormFc(this.formulaDao.getMaterialFormFc());
|
|
|
|
|
|
+/* special.setMaterialFormFc(this.formulaDao.getMaterialFormFc());
|
|
special.setInterimMeterPeriodFc(this.formulaDao.getInterimMeterPeriodFc());
|
|
special.setInterimMeterPeriodFc(this.formulaDao.getInterimMeterPeriodFc());
|
|
special.setPaymentListFc(this.formulaDao.getPaymentListFc());
|
|
special.setPaymentListFc(this.formulaDao.getPaymentListFc());
|
|
- special.setMeterApplyFc(this.formulaDao.getMeterApplyFc());
|
|
|
|
|
|
+ special.setMeterApplyFc(this.formulaDao.getMeterApplyFc());*/
|
|
|
|
+ BeanUtils.copyProperties(this.formulaDao,special);
|
|
formulaHandleChains.add(special);
|
|
formulaHandleChains.add(special);
|
|
/*通用计算*/
|
|
/*通用计算*/
|
|
formulaHandleChains.add(new ExecutorCalc(tec));
|
|
formulaHandleChains.add(new ExecutorCalc(tec));
|
|
@@ -2663,7 +2666,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
return tec.getReportResults();
|
|
return tec.getReportResults();
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ public List<NodeTable> getTableListMeter(Map<String,String> parent){
|
|
|
|
+ return this.getSqlList("select p_key_id pkeyId, node_name nodeName ,init_table_name initTableName,html_url htmlUrl ,excel_id excelId from m_wbs_tree_private where ancestors like ? and LENGTH(html_url)>0 and is_deleted=0 and project_id=? and wbs_id=?",NodeTable.class,parent.get("path")+"%",parent.get("projectId"),parent.get("wbsId"));
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|