|
@@ -9,8 +9,11 @@ import com.aspose.cells.*;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.rongwei.bscommon.sys.config.api.ResponseVO;
|
|
|
import com.rongwei.bscommon.sys.dao.LuckysheetDao;
|
|
|
+import com.rongwei.bscommon.sys.feign.LuckySheetService;
|
|
|
import com.rongwei.bscommon.sys.service.*;
|
|
|
+import com.rongwei.bscommon.sys.utils.JsonUtil;
|
|
|
import com.rongwei.bscommon.sys.utils.LuckySheet4SummaryHelp;
|
|
|
import com.rongwei.bscommon.sys.utils.ProjectSummaryExcelHelp;
|
|
|
import com.rongwei.bscommon.sys.utils.XlsSheetUtil;
|
|
@@ -81,6 +84,8 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
|
|
|
private ExcelUtils excelUtils;
|
|
|
@Autowired
|
|
|
private ZhcxProjectManageDao zhcxProjectManageDao;
|
|
|
+ @Autowired
|
|
|
+ private LuckySheetService luckySheetFeignService;
|
|
|
|
|
|
/**
|
|
|
* 生成汇总文件
|
|
@@ -332,17 +337,33 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
|
|
|
@Override
|
|
|
public int exportRectifyReportData(Map<String, Object> map, HttpServletResponse response) {
|
|
|
|
|
|
- if(!excelUtils.GetLicense()) {
|
|
|
+// if(!excelUtils.GetLicense()) {
|
|
|
+// return 0;
|
|
|
+// }
|
|
|
+//
|
|
|
+// Workbook workbook = new Workbook();
|
|
|
+// WorksheetCollection worksheets = workbook.getWorksheets();
|
|
|
+// Worksheet worksheet = worksheets.get(0);
|
|
|
+//
|
|
|
+// return exportRectifyReportDataBySheet(workbook, worksheet, map, response);
|
|
|
+ Object summaryfiles = map.get("summaryfiles");
|
|
|
+ Object projectIdobj = map.get("projectId");
|
|
|
+ if (ObjectUtil.isEmpty(summaryfiles) || ObjectUtil.isEmpty(projectIdobj)) {
|
|
|
return 0;
|
|
|
}
|
|
|
-
|
|
|
- Workbook workbook = new Workbook();
|
|
|
- WorksheetCollection worksheets = workbook.getWorksheets();
|
|
|
- Worksheet worksheet = worksheets.get(0);
|
|
|
-
|
|
|
- return exportRectifyReportDataBySheet(workbook, worksheet, map, response);
|
|
|
+ String listId = (String) summaryfiles;
|
|
|
+ String projectId = (String) projectIdobj;
|
|
|
+ ResponseVO responseVO = luckySheetFeignService.getLuckySheetJson(listId);
|
|
|
+ List<JSONObject> jsonObjects = JsonUtil.convertToJsonObjectList(responseVO.getData());
|
|
|
+ ExportProjectSummaryDto dto = new ExportProjectSummaryDto();
|
|
|
+ dto.setSheetList(jsonObjects);
|
|
|
+ dto.setProjectId(projectId);
|
|
|
+ dto.setFileName("整改清单");
|
|
|
+ this.exportRectifyReportDataInSummary(dto, response);
|
|
|
+ return 1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 在整改页导出报表
|
|
|
*
|