|
@@ -2460,13 +2460,18 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
return R.fail("无数据");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ String[] tabArr=new String[]{"计量报表","动员预付款报表","材料预付款报表"};
|
|
|
@Override
|
|
|
- public void execute3(Long periodId ,Integer type) {
|
|
|
+ public void execute3(Long contractId,Long periodId ,Integer type) {
|
|
|
/*封面、支付申请单、付款申请表*/
|
|
|
- String[] tableNum=new String[]{"m_20231213111323_1734773480894758912","m_20231213111431_1734773767856455680","m_20231213111707_1734774423547805696"};
|
|
|
- List<FormData> processFds = this.createFormDataByTableName(String.join(",", tableNum));
|
|
|
- TableElementConverter tec = new TableElementConverter();
|
|
|
+ ContractInfo contractInfo = this.contractInfoService.getById(contractId);
|
|
|
+ Map<String,String> parent= this.getSqlOne("select wbs_id wbsId,CONCAT(ancestors,',',id) path from m_wbs_tree_private a where a.node_name='?' and a.project_id=?",Map.class,tabArr[type],contractInfo.getPId());
|
|
|
+ List<NodeTable> tableList= this.getSqlList("select p_key_id pkeyId, node_name nodeName ,init_table_name initTableName,html_url htmlUrl 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"));
|
|
|
+ Map<String,Map<String,String>> coordinateMap=tableList.stream().collect(Collectors.toMap(NodeTable::getInitTableName,m->FormulaUtils.getElementCell(m.getHtmlUrl()),(v1,v2)->v2));
|
|
|
+ List<FormData> processFds = this.createFormDataByTableName(String.join(",", ""));
|
|
|
+ TableElementConverter tec = new TableElementConverter(processFds,coordinateMap,tableList);
|
|
|
+ tec.setProjectId(Long.parseLong(contractInfo.getPId()));
|
|
|
+ tec.setContractId(contractInfo.getId());
|
|
|
tec.before();
|
|
|
List<FormulaHandleChain> formulaHandleChains = new ArrayList<>();
|
|
|
ExecutorInit init= new ExecutorInit(tec);
|