|
@@ -2261,68 +2261,72 @@ 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";
|
|
|
List<ContractMeterPeriod> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ContractMeterPeriod.class));
|
|
|
//获取所有excel报表源数据
|
|
|
- String sqlForExcel = "SELECT 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 project_id="+projectId;
|
|
|
+ String sqlForExcel = "SELECT p.p_key_id,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));
|
|
|
- for (ExcelTabVo1 excelTab : excelTabs) {
|
|
|
- System.out.println(excelTab.getFileUrl());
|
|
|
- }
|
|
|
ArrayList<ReportResult> reportResults = new ArrayList<>();
|
|
|
//中期支付报表封面
|
|
|
Optional<ExcelTabVo1> excel = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876698961629186")).findFirst();
|
|
|
//String url = "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240828/3ee50ef54005c95bd724bcabae54058c.XLSX";
|
|
|
String url = excel.get().getFileUrl();
|
|
|
String htmlUrl=excel.get().getHtmlUrl();
|
|
|
+ Long pKeyId = excel.get().getPKeyId();
|
|
|
//中间支付审核表
|
|
|
Optional<ExcelTabVo1> excel1 = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876742800494593")).findFirst();
|
|
|
//String url1 = "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20241120/ea6c945827dd2990a9c7b1957fe201c4.XLSX";
|
|
|
String url1 = excel1.get().getFileUrl();
|
|
|
String htmlUrl1=excel1.get().getHtmlUrl();
|
|
|
+ Long pKeyId1 = excel1.get().getPKeyId();
|
|
|
//补助款申请支付审核表
|
|
|
Optional<ExcelTabVo1> excel2 = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876780238852097")).findFirst();
|
|
|
//String url2 = "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20241120/970eec0eb3cf3d215263a0e2f24c142e.xlsx";
|
|
|
String url2 = excel2.get().getFileUrl();
|
|
|
String htmlUrl2=excel2.get().getHtmlUrl();
|
|
|
+ Long pKeyId2 = excel2.get().getPKeyId();
|
|
|
//中间计量支付证书
|
|
|
Optional<ExcelTabVo1> excel3 = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876814359515138")).findFirst();
|
|
|
//String url3 = "https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240828/fb1110ae6aab7295759775206e5b44b8.XLSX";
|
|
|
String url3 = excel3.get().getFileUrl();
|
|
|
String htmlUrl3=excel3.get().getHtmlUrl();
|
|
|
+ Long pKeyId3 = excel3.get().getPKeyId();
|
|
|
//中间计量支付申请表
|
|
|
Optional<ExcelTabVo1> excel4 = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876859939016705")).findFirst();
|
|
|
//String url4="https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240828/bff82dd0a1b7394f5fdab1322a3e6023.XLSX";
|
|
|
String url4=excel4.get().getFileUrl();
|
|
|
String htmlUrl4=excel4.get().getHtmlUrl();
|
|
|
+ Long pKeyId4 = excel4.get().getPKeyId();
|
|
|
//工程支付月报
|
|
|
Optional<ExcelTabVo1> excel5 = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876896593039362")).findFirst();
|
|
|
//String url5="https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240903/c8a5b424eace6c26b2edf9b9b33f088a.XLSX";
|
|
|
String url5=excel5.get().getFileUrl();
|
|
|
String htmlUrl5=excel5.get().getHtmlUrl();
|
|
|
+ Long pKeyId5 = excel5.get().getPKeyId();
|
|
|
//清单支付报表
|
|
|
Optional<ExcelTabVo1> excel6 = excelTabs.stream().filter(e -> e.getId().toString().equals("1780876940398350338")).findFirst();
|
|
|
//String url6="https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20241120/e168f024c8055362664a276ad3721cb7.XLSX";
|
|
|
String url6=excel6.get().getFileUrl();
|
|
|
String htmlUrl6=excel6.get().getHtmlUrl();
|
|
|
+ Long pKeyId6 = excel6.get().getPKeyId();
|
|
|
// 获取中期支付报表封面的pdfurl
|
|
|
- ReportResult CoverOfMidtermPaymentReportPDF = getCoverOfMidtermPaymentReportPDF(url,contractId,periodId,htmlUrl, projectName,list);
|
|
|
- CoverOfMidtermPaymentReportPDF.setPkeyId(1816648920839749640L);
|
|
|
+ ReportResult CoverOfMidtermPaymentReportPDF = getCoverOfMidtermPaymentReportPDF(url,contractId,periodId,htmlUrl, projectName,list,pKeyId);
|
|
|
+
|
|
|
//获取中间支付审核表的pdfurl
|
|
|
- ReportResult intermediatePaymentPDF = getIntermediatePaymentPDF(url1,contractId,periodId,list,redisId,htmlUrl1,blReserveFundsRatioNew,projectName,changeMoneyNew);
|
|
|
- intermediatePaymentPDF.setPkeyId(1816648920839749634L);
|
|
|
+ ReportResult intermediatePaymentPDF = getIntermediatePaymentPDF(url1,contractId,periodId,list,redisId,htmlUrl1,blReserveFundsRatioNew,projectName,changeMoneyNew,pKeyId1);
|
|
|
+
|
|
|
//获取补助款申请支付审核表pdfUrl
|
|
|
- ReportResult subsidyApplicationPaymentReviewPDF = getSubsidyApplicationPaymentReviewPDF(url2,contractId,periodId,list,htmlUrl2,blReserveFundsRatioNew,projectName,projectId,reportId);
|
|
|
- subsidyApplicationPaymentReviewPDF.setPkeyId(1816648920839749642L);
|
|
|
+ ReportResult subsidyApplicationPaymentReviewPDF = getSubsidyApplicationPaymentReviewPDF(url2,contractId,periodId,list,htmlUrl2,blReserveFundsRatioNew,projectName,projectId,reportId,pKeyId2);
|
|
|
+
|
|
|
//获取中间计量支付证书pdfUrl
|
|
|
- ReportResult intermediateMeasurementPaymentCertificatePDF = getIntermediateMeasurementPaymentCertificatePDF(url3,contractId,periodId,list,htmlUrl3,blReserveFundsRatioNew,projectName);
|
|
|
- intermediateMeasurementPaymentCertificatePDF.setPkeyId(1816648920839749643L);
|
|
|
+ ReportResult intermediateMeasurementPaymentCertificatePDF = getIntermediateMeasurementPaymentCertificatePDF(url3,contractId,periodId,list,htmlUrl3,blReserveFundsRatioNew,projectName,pKeyId3);
|
|
|
+
|
|
|
//获取清单支付报表PDF
|
|
|
- ReportResult inventoryPayReportPDF=getInventoryPayReportPDF(url6,contractId,periodId,projectId,list,redisId,htmlUrl6);
|
|
|
- inventoryPayReportPDF.setPkeyId(1816648920839749646L);
|
|
|
+ ReportResult inventoryPayReportPDF=getInventoryPayReportPDF(url6,contractId,periodId,projectId,list,redisId,htmlUrl6,pKeyId6);
|
|
|
+
|
|
|
//获取工程支付月报pdfUrl
|
|
|
- ReportResult monthlyReportPDF=getMonthlyReportPDF(url5,reportId,contractId,periodId,projectId,list,redisId,htmlUrl5);
|
|
|
- monthlyReportPDF.setPkeyId(1816648920839749645L);
|
|
|
+ ReportResult monthlyReportPDF=getMonthlyReportPDF(url5,reportId,contractId,periodId,projectId,list,redisId,htmlUrl5,pKeyId5);
|
|
|
+
|
|
|
//获取中间支付申请表pdfUrl
|
|
|
- ReportResult intermediateApplyPDF=getIntermediateApplyPDF(url4,periodId,projectId,htmlUrl4,projectName,contractId);
|
|
|
- intermediateApplyPDF.setPkeyId(1816648920839749644L);
|
|
|
+ ReportResult intermediateApplyPDF=getIntermediateApplyPDF(url4,periodId,projectId,htmlUrl4,projectName,contractId,pKeyId4);
|
|
|
+
|
|
|
reportResults.add(CoverOfMidtermPaymentReportPDF);
|
|
|
reportResults.add(intermediatePaymentPDF);
|
|
|
reportResults.add(subsidyApplicationPaymentReviewPDF);
|
|
@@ -2337,7 +2341,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/**
|
|
|
* 中期支付报表封面
|
|
|
*/
|
|
|
- private ReportResult getCoverOfMidtermPaymentReportPDF(String url, Long contractId, Long periodId,String htmlUrl,String projectName,List<ContractMeterPeriod> list) {
|
|
|
+ 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 ";
|
|
@@ -2379,20 +2383,19 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
c11.setCellValue(formattedDate);
|
|
|
}
|
|
|
if(ObjectUtil.isNotEmpty(contractId)){
|
|
|
- CellStyle cellStyle = c11.getCellStyle();
|
|
|
//获取合同段信息
|
|
|
ContractInfo contractInfo = getContractInfo(contractId);
|
|
|
//施工单位
|
|
|
Cell c9 = getCellByAddress(sheet, "C9");
|
|
|
- c9.setCellStyle(cellStyle);
|
|
|
c9.setCellValue(contractInfo.getConstructionUnitName());
|
|
|
//监理单位
|
|
|
Cell c10 = getCellByAddress(sheet, "C10");
|
|
|
- c10.setCellStyle(cellStyle);
|
|
|
c10.setCellValue(contractInfo.getContractorUnitName());
|
|
|
}
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1816648920839749640L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
for (Sheet sheet1 : workbook) {
|
|
|
for (Row row : sheet1) {
|
|
|
// 遍历所有单元格
|
|
@@ -2423,6 +2426,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
reportResult.setName("中期支付报表封面");
|
|
|
return reportResult;
|
|
|
}
|
|
|
+ /*设置电签ID*/
|
|
|
public void dianqian(String htmlUrl,Sheet sheet, Workbook workbook ) {
|
|
|
try {
|
|
|
InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(htmlUrl);
|
|
@@ -2442,21 +2446,6 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
if (row != null) {
|
|
|
Cell cell = row.getCell(x1 - 1);
|
|
|
if (cell != null || Func.isNotEmpty(cell)) {
|
|
|
-// short fontIndex = cell.getCellStyle().getFontIndex();
|
|
|
-// Font oldfontAt = workbook.getFontAt(fontIndex);
|
|
|
-// Font redFont = workbook.createFont();
|
|
|
-// redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
|
|
|
-// redFont.setFontHeightInPoints(Short.valueOf("1"));//设置字体大小
|
|
|
-// redFont.setFontName(oldfontAt.getFontName());//设置字体
|
|
|
-// String CellValue = cell.getStringCellValue().trim();
|
|
|
-// CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
|
|
|
-// newStyle.cloneStyleFrom(cell.getCellStyle());
|
|
|
-// newStyle.setFont(redFont);
|
|
|
-// newStyle.setShrinkToFit(true);
|
|
|
-// cell.setCellStyle(newStyle);
|
|
|
-// String value=CellValue+dqid;
|
|
|
-// cell.setCellValue(value);
|
|
|
-
|
|
|
// 获取单元格的现有值
|
|
|
String existingValue = cell.getStringCellValue();
|
|
|
if(StringUtils.isNotEmpty(existingValue)&&!existingValue.equals("")){
|
|
@@ -2465,9 +2454,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
// 创建一个新的副文本字符串
|
|
|
RichTextString richTextString = workbook.getCreationHelper().createRichTextString(existingValue + dqid);
|
|
|
// 设置原有部分的字体
|
|
|
- Font originalFont = workbook.createFont();
|
|
|
- originalFont.setColor(IndexedColors.BLACK.getIndex());
|
|
|
- richTextString.applyFont(0, existingValue.length(), originalFont);
|
|
|
+// Font originalFont = workbook.createFont();
|
|
|
+// originalFont.setColor(IndexedColors.BLACK.getIndex());
|
|
|
+// richTextString.applyFont(0, existingValue.length(), originalFont);
|
|
|
// 设置新增部分的字体
|
|
|
Font newFont = workbook.createFont();
|
|
|
newFont.setColor(IndexedColors.WHITE.getIndex());
|
|
@@ -2483,6 +2472,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ /*设置电签时间*/
|
|
|
private void dianqianTime(String htmlUrl, Sheet sheet, Workbook workbook,Long pkeyId,Long perId,Long contractId) {
|
|
|
String timeSql = "SELECT DISTINCT a.time_col_key,DATE_FORMAT(c.create_time, '%Y年%m月%d日') as create_time from m_textdict_info a ,m_project_assignment_user b,u_task_parallel c ,u_task d where a.sig_role_id=b.role_id and b.user_id=c.task_user and c.process_instance_id=d.process_instance_id and b.contract_id="+contractId+" and LENGTH(a.time_col_key)>=2 " +
|
|
|
"and d.form_data_id="+perId+" and a.tab_id="+pkeyId+"";
|
|
@@ -2498,9 +2488,19 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
Elements elements = table.getElementsByAttributeValue("keyname", da.get("time_col_key")+"");
|
|
|
for (Element element :elements){
|
|
|
if(element.hasAttr("y1") && element.hasAttr("x1")){
|
|
|
- String keky = element.attr("y1")+"_"+element.attr("x1");
|
|
|
- String time = da.get("create_time")+"";
|
|
|
-
|
|
|
+ Elements x11 = element.getElementsByAttribute("x1");
|
|
|
+ if (x11 != null && x11.size() >= 1) {
|
|
|
+ Element element1 = x11.get(x11.size() - 1);
|
|
|
+ int x1 = Func.toInt(element1.attr("x1"));
|
|
|
+ int y1 = Func.toInt(element1.attr("y1"));
|
|
|
+ Row row = sheet.getRow(y1 - 1);
|
|
|
+ if (row != null) {
|
|
|
+ Cell cell = row.getCell(x1 - 1);
|
|
|
+ if (cell != null || Func.isNotEmpty(cell)){
|
|
|
+ cell.setCellValue(da.get("create_time") + "");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2520,7 +2520,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/**
|
|
|
*中间计量支付证书获取PDFurl
|
|
|
*/
|
|
|
- private ReportResult getIntermediateMeasurementPaymentCertificatePDF(String url3, Long contractId, Long periodId, List<ContractMeterPeriod> list,String htmlUrl,BigDecimal blReserveFundsRatioNew,String projectName) {
|
|
|
+ private ReportResult getIntermediateMeasurementPaymentCertificatePDF(String url3, Long contractId, Long periodId, List<ContractMeterPeriod> list,String htmlUrl,BigDecimal blReserveFundsRatioNew,String projectName,Long pkeyId) {
|
|
|
//判断当前是否是第一期
|
|
|
Boolean isOnePeriod = false;
|
|
|
ContractMeterPeriod contractMeterPeriod = list.get(0);
|
|
@@ -2602,7 +2602,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
c3.setCellValue(projectName);
|
|
|
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
for (Sheet sheet1 : workbook) {
|
|
|
for (Row row : sheet1) {
|
|
|
// 遍历所有单元格
|
|
@@ -2645,7 +2647,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/**
|
|
|
*补助款申请支付审核表获取PDFurl
|
|
|
*/
|
|
|
- private ReportResult getSubsidyApplicationPaymentReviewPDF(String url2, Long contractId, Long periodId, List<ContractMeterPeriod> list,String htmlUrl,BigDecimal blReserveFundsRatioNew,String projectName,Long projectId,Long reportId) {
|
|
|
+ private ReportResult getSubsidyApplicationPaymentReviewPDF(String url2, Long contractId, Long periodId, List<ContractMeterPeriod> list,String htmlUrl,BigDecimal blReserveFundsRatioNew,String projectName,Long projectId,Long reportId,Long pkeyId) {
|
|
|
//判断当前是否是只有1期计量
|
|
|
Boolean isOnePeriod = false;
|
|
|
ContractMeterPeriod contractMeterPeriod = list.get(0);
|
|
@@ -2909,7 +2911,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
Cell a2 = getCellByAddress(sheet, "A2");
|
|
|
a2.setCellValue(projectName);
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
for (Sheet sheet1 : workbook) {
|
|
|
for (Row row : sheet1) {
|
|
|
// 遍历所有单元格
|
|
@@ -2946,7 +2950,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
/**
|
|
|
* 中间支付审核表获取PDFurl
|
|
|
*/
|
|
|
- public ReportResult getIntermediatePaymentPDF(String url,Long contractId,Long periodId,List<ContractMeterPeriod> list,Long redisId,String htmlUrl,BigDecimal blReserveFundsRatioNew,String projectName,BigDecimal changeMoneyNew) {
|
|
|
+ public ReportResult getIntermediatePaymentPDF(String url,Long contractId,Long periodId,List<ContractMeterPeriod> list,Long redisId,String htmlUrl,BigDecimal blReserveFundsRatioNew,String projectName,BigDecimal changeMoneyNew,Long pkeyId) {
|
|
|
//判断当前是否是只有1期计量
|
|
|
Boolean isOnePeriod = false;
|
|
|
ContractMeterPeriod contractMeterPeriod1 = list.get(0);
|
|
@@ -3200,7 +3204,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
Cell a1 = getCellByAddress(sheet, "A1");
|
|
|
a1.setCellValue(projectName);
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
for (Sheet sheet1 : workbook) {
|
|
|
for (Row row : sheet1) {
|
|
|
// 遍历所有单元格
|
|
@@ -3341,8 +3347,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
* @param url
|
|
|
* @return
|
|
|
*/
|
|
|
- public ReportResult getIntermediateApplyPDF(String url,Long periodId,Long projectId,String htmlUrl,String projectName,Long contractId){
|
|
|
-
|
|
|
+ public ReportResult getIntermediateApplyPDF(String url,Long periodId,Long projectId,String htmlUrl,String projectName,Long contractId,Long pkeyId){
|
|
|
InputStream modInput = null;
|
|
|
FileInputStream excelFileInput = null;
|
|
|
FileOutputStream outputStream = null;
|
|
@@ -3353,7 +3358,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
workbook = WorkbookFactory.create(modInput);
|
|
|
Sheet sheet = workbook.getSheetAt(0);
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
Cell c3=getCellByAddress(sheet,"C3");
|
|
|
c3.setCellValue(projectName);
|
|
|
Cell d5=getCellByAddress(sheet,"D5");
|
|
@@ -3420,7 +3427,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
* @param url
|
|
|
* @return
|
|
|
*/
|
|
|
- public ReportResult getMonthlyReportPDF(String url, Long reportId,Long contractId, Long periodId, Long projectId,List<ContractMeterPeriod> list,Long redisId,String htmlUrl) throws IllegalAccessException {
|
|
|
+ public ReportResult getMonthlyReportPDF(String url, Long reportId,Long contractId, Long periodId, Long projectId,List<ContractMeterPeriod> list,Long redisId,String htmlUrl,Long pkeyId) throws IllegalAccessException {
|
|
|
//获取本期计量期
|
|
|
String sqlForMeterPeriodById = "SELECT id,period_number,start_date,end_date FROM s_contract_meter_period WHERE id="+periodId+" and is_deleted = 0 ";
|
|
|
ContractMeterPeriod contractMeterPeriodNow = jdbcTemplate.queryForObject(sqlForMeterPeriodById, new BeanPropertyRowMapper<>(ContractMeterPeriod.class));
|
|
@@ -3863,7 +3870,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
}
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
String file_path = FileUtils.getSysLocalFileUrl();
|
|
|
String locationFile = file_path + SnowFlakeUtil.getId() + ".xlsx";
|
|
|
outputStream = new FileOutputStream(locationFile);
|
|
@@ -3897,7 +3906,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
* @return
|
|
|
*/
|
|
|
|
|
|
- public ReportResult getInventoryPayReportPDF(String url,Long contractId, Long periodId, Long projectId,List<ContractMeterPeriod> list,Long redisId,String htmlUrl) throws FileNotFoundException, IllegalAccessException {
|
|
|
+ public ReportResult getInventoryPayReportPDF(String url,Long contractId, Long periodId, Long projectId,List<ContractMeterPeriod> list,Long redisId,String htmlUrl,Long pkeyId) throws FileNotFoundException, IllegalAccessException {
|
|
|
MiddleMeterApply middleMeterApply=new MiddleMeterApply();
|
|
|
middleMeterApply.setContractId(contractId);
|
|
|
middleMeterApply.setContractPeriodId(periodId);
|
|
@@ -4040,9 +4049,6 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
//处理跨期 到上期末完成金额和工程量
|
|
|
for (MeterInventoryVO1 vo1 : list1) {
|
|
|
if(vo1.getBeforeEndMoney()==null){
|
|
|
- if(vo1.getFormNumber().equals("419-1-a")){
|
|
|
- System.out.println("111");
|
|
|
- }
|
|
|
if(list.size()>0){
|
|
|
OptionalInt index=IntStream.range(0, list.size())
|
|
|
.filter(i -> list.get(i).getId().equals(periodId))
|
|
@@ -4255,7 +4261,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
l4.setCellValue(contractInfo.getSupervisionUnitName());
|
|
|
}
|
|
|
dianqian(htmlUrl,sheet,workbook);
|
|
|
- //dianqianTime(htmlUrl,sheet,workbook,1L,periodId,contractId);
|
|
|
+ if(!periodId.equals(1867838908899852290L)){
|
|
|
+ dianqianTime(htmlUrl,sheet,workbook,pkeyId,periodId,contractId);
|
|
|
+ }
|
|
|
String file_path = FileUtils.getSysLocalFileUrl();
|
|
|
String locationFile = file_path + SnowFlakeUtil.getId() + ".xlsx";
|
|
|
outputStream = new FileOutputStream(locationFile);
|