|
@@ -93,35 +93,18 @@ public class SealMaterialController extends BaseController{
|
|
|
//添加查询类型
|
|
|
String fileName = "盖章材料表"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
|
//根据id查出所有与盖章关联的项目id
|
|
|
- List<String> projectIdList = applyForService.getProjectIdById(sealMaterialInfoExport.getId());
|
|
|
- if (projectIdList.contains(sealMaterialInfoExport.getProjectId())){
|
|
|
- projectIdList.remove(sealMaterialInfoExport.getProjectId());
|
|
|
- }
|
|
|
- //根据项目id查询项目信息
|
|
|
- String proName = "";
|
|
|
- String reportNum = "";
|
|
|
- for (int i=0;i<projectIdList.size();i++) {
|
|
|
- SealApplyForInfo forInfo = applyForService.getProjectInfoByProId(projectIdList.get(i));
|
|
|
- if (StringUtils.isBlank(proName)){
|
|
|
- proName = forInfo.getProjectName();
|
|
|
- } else {
|
|
|
- proName = proName + "," + forInfo.getProjectName();
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(reportNum)){
|
|
|
- reportNum = forInfo.getReportDataNum();
|
|
|
- } else {
|
|
|
- reportNum = reportNum + "," + forInfo.getReportDataNum();
|
|
|
- }
|
|
|
+// List<String> projectIdList = applyForService.getProjectIdById(sealMaterialInfoExport.getId());
|
|
|
+// if (projectIdList.contains(sealMaterialInfoExport.getProjectId())){
|
|
|
+// projectIdList.remove(sealMaterialInfoExport.getProjectId());
|
|
|
+// }
|
|
|
+// //根据项目id查询项目信息
|
|
|
+// for (int i=0;i<projectIdList.size();i++) {
|
|
|
+// SealApplyForInfo forInfo = applyForService.getProjectInfoByProId(projectIdList.get(i));
|
|
|
+// }
|
|
|
+ //根据报告号查导出信息
|
|
|
+// List<SealMaterialInfoExport> list = sealMaterialService.findPageExport(new Page<SealMaterialInfoExport>(request, response, -1), sealMaterialInfoExport);
|
|
|
+ List<SealMaterialInfoExport> list = sealMaterialService.findPageExport2(new Page<SealMaterialInfoExport>(request, response, -1), sealMaterialInfoExport);
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
- List<SealMaterialInfoExport> list = sealMaterialService.findPageExport(new Page<SealMaterialInfoExport>(request, response, -1), sealMaterialInfoExport);
|
|
|
- String finalProName = proName;
|
|
|
- String finalReportNum = reportNum;
|
|
|
- list.forEach(li->{
|
|
|
- li.setProjectName(li.getProjectName() + "," + finalProName);
|
|
|
- li.setProjectReportNum(li.getProjectReportNum() + "," + finalReportNum);
|
|
|
- });
|
|
|
new ExportExcel("盖章材料", SealMaterialInfoExport.class).setDataList(list).write(response, fileName).dispose();
|
|
|
return null;
|
|
|
} catch (Exception e) {
|
|
@@ -145,15 +128,16 @@ public class SealMaterialController extends BaseController{
|
|
|
String fileName = "盖章材料表"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
|
|
|
|
|
|
//根据id查出所有与盖章关联的项目的报告号
|
|
|
- List<String> reportNum = new ArrayList<>();
|
|
|
- for (int i=0;i<idList.size();i++){
|
|
|
- List<String> projectIdById = applyForService.getReportNumById(idList.get(i));
|
|
|
- reportNum.addAll(projectIdById);
|
|
|
- }
|
|
|
+// List<String> reportNum = new ArrayList<>();
|
|
|
+// for (int i=0;i<idList.size();i++){
|
|
|
+// List<String> projectIdById = applyForService.getReportNumById(idList.get(i));
|
|
|
+// reportNum.addAll(projectIdById);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
- List<SealMaterialInfoExport> list = sealMaterialService.findPageExportAll(idList);
|
|
|
- for (int i=0;i<list.size();i++){
|
|
|
+ List<SealMaterialInfoExport> list = sealMaterialService.findPageExportAll2(idList);
|
|
|
+// List<SealMaterialInfoExport> list = sealMaterialService.findPageExportAll(idList);
|
|
|
+ /*for (int i=0;i<list.size();i++){
|
|
|
//根据报告号去查与盖章关联的项目信息
|
|
|
String id = applyForService.getProjectInfoByReportNum(list.get(i).getProjectReportNum());
|
|
|
//根据id查其他关联的项目id
|
|
@@ -175,13 +159,7 @@ public class SealMaterialController extends BaseController{
|
|
|
}
|
|
|
list.get(i).setProjectName(proName);
|
|
|
list.get(i).setProjectReportNum(reportNumber);
|
|
|
- }
|
|
|
-// String finalProName = proName;
|
|
|
-// String finalReportNum = reportNum;
|
|
|
-// list.forEach(li->{
|
|
|
-// li.setProjectName(li.getProjectName() + "," + finalProName);
|
|
|
-// li.setProjectReportNum(li.getProjectReportNum() + "," + finalReportNum);
|
|
|
-// });
|
|
|
+ }*/
|
|
|
new ExportExcel("盖章材料", SealMaterialInfoExport.class).setDataList(list).write(response, fileName).dispose();
|
|
|
return null;
|
|
|
} catch (Exception e) {
|