|
@@ -2501,7 +2501,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
String sql = "Select * from s_contract_meter_period where contract_id=" + contractId + " and is_deleted=0" + " order by start_date";
|
|
String sql = "Select * from s_contract_meter_period where contract_id=" + contractId + " and is_deleted=0" + " order by start_date";
|
|
List<ContractMeterPeriod> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ContractMeterPeriod.class));
|
|
List<ContractMeterPeriod> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ContractMeterPeriod.class));
|
|
//获取所有excel报表源数据
|
|
//获取所有excel报表源数据
|
|
- String sqlForExcel = "SELECT p.p_key_id,e.name,e.id,p.html_url,e.file_url,p.init_table_name as tabName FROM m_wbs_tree_private as p LEFT JOIN m_excel_tab as e on p.excel_id=e.id where p.wbs_type=3 AND p.is_deleted=0 AND p.type=2" + " and p.project_id=" + projectId;
|
|
|
|
|
|
+ String sqlForExcel = "SELECT p.p_key_id,e.name,e.id,p.html_url,e.file_url FROM m_wbs_tree_private as p LEFT JOIN m_excel_tab as e on p.excel_id=e.id where p.wbs_type=3 AND p.is_deleted=0 AND p.type=2" + " and p.project_id=" + projectId;
|
|
List<ExcelTabVo1> excelTabs = jdbcTemplate.query(sqlForExcel, new BeanPropertyRowMapper<>(ExcelTabVo1.class));
|
|
List<ExcelTabVo1> excelTabs = jdbcTemplate.query(sqlForExcel, new BeanPropertyRowMapper<>(ExcelTabVo1.class));
|
|
ArrayList<ReportResult> reportResults = new ArrayList<>();
|
|
ArrayList<ReportResult> reportResults = new ArrayList<>();
|
|
//中期支付报表封面
|
|
//中期支付报表封面
|
|
@@ -2547,25 +2547,25 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
String htmlUrl6 = excel6.get().getHtmlUrl();
|
|
String htmlUrl6 = excel6.get().getHtmlUrl();
|
|
Long pKeyId6 = excel6.get().getPKeyId();
|
|
Long pKeyId6 = excel6.get().getPKeyId();
|
|
// 获取中期支付报表封面的pdfurl
|
|
// 获取中期支付报表封面的pdfurl
|
|
- ReportResult CoverOfMidtermPaymentReportPDF = getCoverOfMidtermPaymentReportPDF(url, contractId, periodId, htmlUrl, projectName, list, pKeyId, excel.get().getTabName());
|
|
|
|
|
|
+ ReportResult CoverOfMidtermPaymentReportPDF = getCoverOfMidtermPaymentReportPDF(url, contractId, periodId, htmlUrl, projectName, list, pKeyId);
|
|
|
|
|
|
//获取中间支付审核表的pdfurl
|
|
//获取中间支付审核表的pdfurl
|
|
- ReportResult intermediatePaymentPDF = getIntermediatePaymentPDF(url1, contractId, periodId, list, redisId, htmlUrl1, blReserveFundsRatioNew, projectName, changeMoneyNew, pKeyId1, excel1.get().getTabName());
|
|
|
|
|
|
+ ReportResult intermediatePaymentPDF = getIntermediatePaymentPDF(url1, contractId, periodId, list, redisId, htmlUrl1, blReserveFundsRatioNew, projectName, changeMoneyNew, pKeyId1);
|
|
|
|
|
|
//获取补助款申请支付审核表pdfUrl
|
|
//获取补助款申请支付审核表pdfUrl
|
|
- ReportResult subsidyApplicationPaymentReviewPDF = getSubsidyApplicationPaymentReviewPDF(url2, contractId, periodId, list, htmlUrl2, blReserveFundsRatioNew, projectName, projectId, reportId, pKeyId2,excel2.get().getTabName());
|
|
|
|
|
|
+ ReportResult subsidyApplicationPaymentReviewPDF = getSubsidyApplicationPaymentReviewPDF(url2, contractId, periodId, list, htmlUrl2, blReserveFundsRatioNew, projectName, projectId, reportId, pKeyId2);
|
|
|
|
|
|
//获取中间计量支付证书pdfUrl
|
|
//获取中间计量支付证书pdfUrl
|
|
- ReportResult intermediateMeasurementPaymentCertificatePDF = getIntermediateMeasurementPaymentCertificatePDF(url3, contractId, periodId, list, htmlUrl3, blReserveFundsRatioNew, projectName, pKeyId3,excel3.get().getTabName());
|
|
|
|
|
|
+ ReportResult intermediateMeasurementPaymentCertificatePDF = getIntermediateMeasurementPaymentCertificatePDF(url3, contractId, periodId, list, htmlUrl3, blReserveFundsRatioNew, projectName, pKeyId3);
|
|
|
|
|
|
//获取清单支付报表PDF
|
|
//获取清单支付报表PDF
|
|
- ReportResult inventoryPayReportPDF = getInventoryPayReportPDF(url6, contractId, periodId, projectId, list, redisId, htmlUrl6, pKeyId6, excel6.get().getTabName());
|
|
|
|
|
|
+ ReportResult inventoryPayReportPDF = getInventoryPayReportPDF(url6, contractId, periodId, projectId, list, redisId, htmlUrl6, pKeyId6);
|
|
|
|
|
|
//获取工程支付月报pdfUrl
|
|
//获取工程支付月报pdfUrl
|
|
- ReportResult monthlyReportPDF = getMonthlyReportPDF(url5, reportId, contractId, periodId, projectId, list, redisId, htmlUrl5, pKeyId5, excel5.get().getTabName());
|
|
|
|
|
|
+ ReportResult monthlyReportPDF = getMonthlyReportPDF(url5, reportId, contractId, periodId, projectId, list, redisId, htmlUrl5, pKeyId5);
|
|
|
|
|
|
//获取中间支付申请表pdfUrl
|
|
//获取中间支付申请表pdfUrl
|
|
- ReportResult intermediateApplyPDF = getIntermediateApplyPDF(url4, periodId, projectId, htmlUrl4, projectName, contractId, pKeyId4, excel4.get().getTabName());
|
|
|
|
|
|
+ ReportResult intermediateApplyPDF = getIntermediateApplyPDF(url4, periodId, projectId, htmlUrl4, projectName, contractId, pKeyId4);
|
|
|
|
|
|
reportResults.add(CoverOfMidtermPaymentReportPDF);
|
|
reportResults.add(CoverOfMidtermPaymentReportPDF);
|
|
reportResults.add(intermediatePaymentPDF);
|
|
reportResults.add(intermediatePaymentPDF);
|
|
@@ -2583,7 +2583,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
/**
|
|
/**
|
|
* 中期支付报表封面
|
|
* 中期支付报表封面
|
|
*/
|
|
*/
|
|
- private ReportResult getCoverOfMidtermPaymentReportPDF(String url, Long contractId, Long periodId, String htmlUrl, String projectName, List<ContractMeterPeriod> list, Long pkeyId, String tabName) {
|
|
|
|
|
|
+ private ReportResult getCoverOfMidtermPaymentReportPDF(String url, Long contractId, Long periodId, String htmlUrl, String projectName, List<ContractMeterPeriod> list, Long pkeyId) {
|
|
|
|
|
|
//获取本期计量期
|
|
//获取本期计量期
|
|
String sqlForMeterPeriodById = "SELECT id,period_number,start_date,end_date FROM s_contract_meter_period WHERE id=" + periodId + " and is_deleted = 0 ";
|
|
String sqlForMeterPeriodById = "SELECT id,period_number,start_date,end_date FROM s_contract_meter_period WHERE id=" + periodId + " and is_deleted = 0 ";
|
|
@@ -2634,7 +2634,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
Cell c10 = getCellByAddress(sheet, "C10");
|
|
Cell c10 = getCellByAddress(sheet, "C10");
|
|
c10.setCellValue(contractInfo.getSupervisionUnitName());
|
|
c10.setCellValue(contractInfo.getSupervisionUnitName());
|
|
}
|
|
}
|
|
- dianqian(htmlUrl, sheet, workbook, tabName);
|
|
|
|
|
|
+ dianqian(htmlUrl, sheet, workbook);
|
|
if (!periodId.equals(1867838908899852290L)) {
|
|
if (!periodId.equals(1867838908899852290L)) {
|
|
dianqianTime(htmlUrl, sheet, workbook, pkeyId, periodId, contractId);
|
|
dianqianTime(htmlUrl, sheet, workbook, pkeyId, periodId, contractId);
|
|
}
|
|
}
|
|
@@ -2670,7 +2670,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
}
|
|
}
|
|
|
|
|
|
/*设置电签ID*/
|
|
/*设置电签ID*/
|
|
- public void dianqian(String htmlUrl, Sheet sheet, Workbook workbook, String tabName) {
|
|
|
|
|
|
+ public void dianqian(String htmlUrl, Sheet sheet, Workbook workbook) {
|
|
try {
|
|
try {
|
|
InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(htmlUrl);
|
|
InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(htmlUrl);
|
|
String htmlString = IoUtil.readToString(inputStreamByUrl);
|
|
String htmlString = IoUtil.readToString(inputStreamByUrl);
|
|
@@ -2678,30 +2678,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
Element table = doc.select("table").first();
|
|
Element table = doc.select("table").first();
|
|
// 组装电签设置
|
|
// 组装电签设置
|
|
Elements dqids = table.getElementsByAttribute("dqid");
|
|
Elements dqids = table.getElementsByAttribute("dqid");
|
|
- // 电签组装2
|
|
|
|
- String dqSql = "select e_key,GROUP_CONCAT(DISTINCT concat('*✹',id)) ids from u_sign_key_role_info where tab_en_name='" + tabName + "' GROUP BY e_key";
|
|
|
|
- List<Map<String, Object>> mapList = jdbcTemplate.queryForList(dqSql);
|
|
|
|
- if(mapList!=null && mapList.size()>0){
|
|
|
|
- for(Map<String, Object> map : mapList) {
|
|
|
|
- Elements elementsBy = table.getElementsByAttributeValueStarting("keyname", map.get("e_key") + "_");
|
|
|
|
- if(elementsBy!=null && elementsBy.size()>0){
|
|
|
|
- for(Element element : elementsBy){
|
|
|
|
- String dqIds = (String) map.get("ids");
|
|
|
|
- dqIds = dqIds.replace(",","");
|
|
|
|
- dqIds = dqIds.substring(1);
|
|
|
|
- element.attr("sign_type", dqIds);
|
|
|
|
- dqids.add(element);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
for (Element element : dqids) {
|
|
for (Element element : dqids) {
|
|
- String dqid="";
|
|
|
|
- if(element.hasAttr("sign_type")){
|
|
|
|
- dqid = element.attr("sign_type");
|
|
|
|
- }else{
|
|
|
|
- dqid = element.attr("dqid");
|
|
|
|
- }
|
|
|
|
|
|
+ String dqid = element.attr("dqid");
|
|
|
|
|
|
int x1 = 0;
|
|
int x1 = 0;
|
|
int y1 = 0;
|
|
int y1 = 0;
|
|
@@ -3508,7 +3486,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
//顶部项目名称
|
|
//顶部项目名称
|
|
Cell a1 = getCellByAddress(sheet, "A1");
|
|
Cell a1 = getCellByAddress(sheet, "A1");
|
|
a1.setCellValue(projectName);
|
|
a1.setCellValue(projectName);
|
|
- dianqian(htmlUrl, sheet, workbook, tabName);
|
|
|
|
|
|
+ dianqian(htmlUrl, sheet, workbook);
|
|
if (!periodId.equals(1867838908899852290L)) {
|
|
if (!periodId.equals(1867838908899852290L)) {
|
|
dianqianTime(htmlUrl, sheet, workbook, pkeyId, periodId, contractId);
|
|
dianqianTime(htmlUrl, sheet, workbook, pkeyId, periodId, contractId);
|
|
}
|
|
}
|