|
@@ -2616,13 +2616,14 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<ReportResult> execute3(Long contractId,Long periodId ,Integer type) {
|
|
|
|
|
|
+ /*合同段id,报表Id,报表类型中间计量0,材料1,开工2*/
|
|
|
|
+ public List<ReportResult> execute3(Long contractId,Long reportId ,Integer type) {
|
|
ContractInfo contractInfo = this.contractInfoService.getById(contractId);
|
|
ContractInfo contractInfo = this.contractInfoService.getById(contractId);
|
|
MeterType meterType = MeterType.getByIndex(type);
|
|
MeterType meterType = MeterType.getByIndex(type);
|
|
|
|
|
|
/*元素创建*/
|
|
/*元素创建*/
|
|
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 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= 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"));
|
|
Map<String,Map<String,String>> coordinateMap=tableList.stream().collect(Collectors.toMap(NodeTable::getInitTableName,m->FormulaUtils.getElementCell(m.getHtmlUrl()),(v1,v2)->v2));
|
|
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(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"));
|
|
@@ -2631,7 +2632,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
TableElementConverter tec = new TableElementConverter(processFds,coordinateMap,tableList);
|
|
TableElementConverter tec = new TableElementConverter(processFds,coordinateMap,tableList);
|
|
tec.setProjectId(Long.parseLong(contractInfo.getPId()));
|
|
tec.setProjectId(Long.parseLong(contractInfo.getPId()));
|
|
tec.setContractId(contractInfo.getId());
|
|
tec.setContractId(contractInfo.getId());
|
|
- tec.setPeriodId(periodId);
|
|
|
|
|
|
+ tec.setReportId(reportId);
|
|
tec.setLog(new FormulaLog());
|
|
tec.setLog(new FormulaLog());
|
|
tec.setMeterType(meterType);
|
|
tec.setMeterType(meterType);
|
|
tec.before();
|
|
tec.before();
|