|
@@ -22,6 +22,23 @@ import org.jeecg.modules.costModelProductPrice.mapper.KzksCostModelProductPriceM
|
|
|
import org.jeecg.modules.costModelXmxqCl.entity.CostModelXmxqCl;
|
|
|
import org.jeecg.modules.dataSourceSwitch.annotation.TargetDataSource;
|
|
|
import org.jeecg.modules.dataSourceSwitch.enums.DataSourceType;
|
|
|
+import org.jeecg.modules.projectChbGlf.entity.ProjectChbGlf;
|
|
|
+import org.jeecg.modules.projectChbGlf.service.IKzksProjectChbGlfService;
|
|
|
+import org.jeecg.modules.projectChbRdf.entity.ProjectChbRdf;
|
|
|
+import org.jeecg.modules.projectChbRdf.service.IKzksProjectChbRdfService;
|
|
|
+import org.jeecg.modules.projectChbRgf.entity.ProjectChbRgf;
|
|
|
+import org.jeecg.modules.projectChbRgf.service.IKzksProjectChbRgfService;
|
|
|
+import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
|
|
|
+import org.jeecg.modules.projectChbSwf.service.IProjectChbSwfService;
|
|
|
+import org.jeecg.modules.projectChbSxf.entity.ProjectChbSxf;
|
|
|
+import org.jeecg.modules.projectChbSxf.service.IProjectChbSxfService;
|
|
|
+import org.jeecg.modules.projectChbWxf.entity.ProjectChbWxf;
|
|
|
+import org.jeecg.modules.projectChbWxf.service.IProjectChbWxfService;
|
|
|
+import org.jeecg.modules.projectChbZjf.entity.ProjectChbZjf;
|
|
|
+import org.jeecg.modules.projectChbZjf.service.IKzksProjectChbZjfService;
|
|
|
+import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyf;
|
|
|
+import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyfExpoet;
|
|
|
+import org.jeecg.modules.projectChbZyf.service.IProjectChbZyfService;
|
|
|
import org.jeecg.modules.projectCost.entity.ProjectCost;
|
|
|
import org.jeecg.modules.projectCost.entity.ProjectCostSumVo;
|
|
|
import org.jeecg.modules.projectCost.vo.ProjectCostVO;
|
|
@@ -33,10 +50,14 @@ import org.jeecg.modules.projectCostHuiji.vo.ProjectCostHuijiExportVO;
|
|
|
import org.jeecg.modules.projectCostHuiji.vo.ProjectCostHuijiListVO;
|
|
|
import org.jeecg.modules.system.mapper.SysDepartMapper;
|
|
|
import org.jeecg.modules.system.service.ISysUserService;
|
|
|
+import org.jeecg.modules.wzOutboundOrder.service.IWzOutboundOrderHService;
|
|
|
+import org.jeecg.modules.wzOutboundOrder.vo.WzOutboundOrderBDetailListVO;
|
|
|
+import org.jeecg.modules.wzOutboundOrderBNew.entity.WzOutboundOrderBNewExport;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -56,6 +77,7 @@ import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.IntStream;
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
/**
|
|
|
* @Description: 项目成本汇集表
|
|
@@ -84,6 +106,44 @@ public class ProjectCostHuijiServiceImpl extends ServiceImpl<ProjectCostHuijiMap
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IWzOutboundOrderHService wzOutboundOrderHService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IProjectChbZyfService zyfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IKzksProjectChbZjfService zjfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IProjectChbWxfService wxfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IProjectChbSxfService sxfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IProjectChbSwfService swfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IKzksProjectChbRdfService rdfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IKzksProjectChbRgfService rgfService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
+ private IKzksProjectChbGlfService glfService;
|
|
|
+
|
|
|
+ @Value("${jeecg.path.upload}")
|
|
|
+ private String upLoadPath;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 分页查询
|
|
@@ -327,4 +387,106 @@ public class ProjectCostHuijiServiceImpl extends ServiceImpl<ProjectCostHuijiMap
|
|
|
return mv;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ModelAndView exportZcbDetail(List<String> tasknoList, HttpServletRequest request) {
|
|
|
+ // 材料费
|
|
|
+ List<WzOutboundOrderBDetailListVO> wzList = wzOutboundOrderHService.getClfListByTasknos(tasknoList);
|
|
|
+ // 专用费
|
|
|
+ List<ProjectChbZyf> zyfList = zyfService.getZYFDetailListByTasknos(tasknoList);
|
|
|
+ // 事务费
|
|
|
+ List<ProjectChbSwf> swfList = swfService.getSWFDetailListByTasknos(tasknoList);
|
|
|
+ // 外协费
|
|
|
+ List<ProjectChbWxf> wxfList = wxfService.getWXFDetailListByTasknos(tasknoList);
|
|
|
+ // 燃料动力费
|
|
|
+ List<ProjectChbRdf> rdfList = rdfService.getRDFDetailListByTasknos(tasknoList);
|
|
|
+ // 折旧费
|
|
|
+ List<ProjectChbZjf> zjfList = zjfService.getZJFDetailListByTasknos(tasknoList);
|
|
|
+ // 工资及劳务费
|
|
|
+ List<ProjectChbRgf> rgfList = rgfService.getRGFDetailListByTasknos(tasknoList);
|
|
|
+ // 管理费
|
|
|
+ List<ProjectChbGlf> glfList = glfService.getGLFDetailListByTasknos(tasknoList);
|
|
|
+ // 筛选费
|
|
|
+ List<ProjectChbSxf> sxfList = sxfService.getSXFDetailListByTasknos(tasknoList);
|
|
|
+
|
|
|
+ // 调用导出excel的方法 一个费用一个sheet
|
|
|
+ return exportZcbExcel(wzList,zyfList,swfList,wxfList,rdfList,zjfList,rgfList,glfList,sxfList);
|
|
|
+ }
|
|
|
+
|
|
|
+ private ModelAndView exportZcbExcel(List<WzOutboundOrderBDetailListVO> wzList, List<ProjectChbZyf> zyfList, List<ProjectChbSwf> swfList, List<ProjectChbWxf> wxfList, List<ProjectChbRdf> rdfList, List<ProjectChbZjf> zjfList, List<ProjectChbRgf> rgfList, List<ProjectChbGlf> glfList, List<ProjectChbSxf> sxfList) {
|
|
|
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ String title = "成本额明细";
|
|
|
+
|
|
|
+ Map<String, Object> sheet1Map = new HashMap<>();
|
|
|
+ sheet1Map.put(NormalExcelConstants.CLASS, WzOutboundOrderBNewExport.class);
|
|
|
+ ExportParams exportParam1=new ExportParams( "材料费报表", "导出人:" + sysUser.getRealname(), "材料费");
|
|
|
+ exportParam1.setImageBasePath(upLoadPath);
|
|
|
+ sheet1Map.put(NormalExcelConstants.PARAMS,exportParam1);
|
|
|
+ sheet1Map.put(NormalExcelConstants.DATA_LIST,wzList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet2Map = new HashMap<>();
|
|
|
+ sheet2Map.put(NormalExcelConstants.CLASS, ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam2=new ExportParams( "专用费报表", "导出人:" + sysUser.getRealname(), "专用费");
|
|
|
+ exportParam2.setImageBasePath(upLoadPath);
|
|
|
+ sheet2Map.put(NormalExcelConstants.PARAMS,exportParam2);
|
|
|
+ sheet2Map.put(NormalExcelConstants.DATA_LIST,zyfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet3Map = new HashMap<>();
|
|
|
+ sheet3Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam3=new ExportParams( "事务费报表", "导出人:" + sysUser.getRealname(), "事务费");
|
|
|
+ exportParam3.setImageBasePath(upLoadPath);
|
|
|
+ sheet3Map.put(NormalExcelConstants.PARAMS,exportParam3);
|
|
|
+ sheet3Map.put(NormalExcelConstants.DATA_LIST,swfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet4Map = new HashMap<>();
|
|
|
+ sheet4Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam4=new ExportParams( "外协费报表", "导出人:" + sysUser.getRealname(), "外协费");
|
|
|
+ exportParam4.setImageBasePath(upLoadPath);
|
|
|
+ sheet4Map.put(NormalExcelConstants.PARAMS,exportParam4);
|
|
|
+ sheet4Map.put(NormalExcelConstants.DATA_LIST,wxfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet5Map = new HashMap<>();
|
|
|
+ sheet5Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam5=new ExportParams( "燃料动力费报表", "导出人:" + sysUser.getRealname(), "燃料动力费");
|
|
|
+ exportParam5.setImageBasePath(upLoadPath);
|
|
|
+ sheet5Map.put(NormalExcelConstants.PARAMS,exportParam5);
|
|
|
+ sheet5Map.put(NormalExcelConstants.DATA_LIST,rdfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet6Map = new HashMap<>();
|
|
|
+ sheet6Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam6=new ExportParams( "固定资产折旧费报表", "导出人:" + sysUser.getRealname(), "固定资产折旧费");
|
|
|
+ exportParam6.setImageBasePath(upLoadPath);
|
|
|
+ sheet6Map.put(NormalExcelConstants.PARAMS,exportParam6);
|
|
|
+ sheet6Map.put(NormalExcelConstants.DATA_LIST,zjfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet7Map = new HashMap<>();
|
|
|
+ sheet7Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam7=new ExportParams( "工资及劳务费报表", "导出人:" + sysUser.getRealname(), "工资及劳务费");
|
|
|
+ exportParam7.setImageBasePath(upLoadPath);
|
|
|
+ sheet7Map.put(NormalExcelConstants.PARAMS,exportParam7);
|
|
|
+ sheet7Map.put(NormalExcelConstants.DATA_LIST,rgfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet8Map = new HashMap<>();
|
|
|
+ sheet8Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam8=new ExportParams( "管理费报表", "导出人:" + sysUser.getRealname(), "管理费");
|
|
|
+ exportParam8.setImageBasePath(upLoadPath);
|
|
|
+ sheet8Map.put(NormalExcelConstants.PARAMS,exportParam8);
|
|
|
+ sheet8Map.put(NormalExcelConstants.DATA_LIST,glfList);
|
|
|
+
|
|
|
+ Map<String, Object> sheet9Map = new HashMap<>();
|
|
|
+ sheet9Map.put(NormalExcelConstants.CLASS,ProjectChbZyfExpoet.class);
|
|
|
+ ExportParams exportParam9=new ExportParams( "筛选费报表", "导出人:" + sysUser.getRealname(), "筛选费");
|
|
|
+ exportParam9.setImageBasePath(upLoadPath);
|
|
|
+ sheet9Map.put(NormalExcelConstants.PARAMS,exportParam9);
|
|
|
+ sheet9Map.put(NormalExcelConstants.DATA_LIST,sxfList);
|
|
|
+
|
|
|
+ List<Map<String, Object>> sheetList = Stream.of(sheet1Map, sheet2Map, sheet3Map, sheet4Map, sheet5Map, sheet6Map, sheet7Map, sheet8Map, sheet9Map).collect(Collectors.toList());
|
|
|
+
|
|
|
+ ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
|
|
+ mv.addObject(NormalExcelConstants.FILE_NAME,title);
|
|
|
+ mv.addObject(NormalExcelConstants.MAP_LIST,sheetList);
|
|
|
+
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
}
|