|
@@ -64,6 +64,7 @@ import java.util.*;
|
|
|
import java.util.concurrent.CountDownLatch;
|
|
|
import java.util.concurrent.Executor;
|
|
|
import java.util.concurrent.Executors;
|
|
|
+import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
@@ -1475,14 +1476,152 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
|
|
|
+ private HashMap fillMainProjectRowData(Integer projectMainId, Integer companyId, String startDate, String endDate, Integer stateKey, List<String> userIdList, List<Map<String, Object>> list,
|
|
|
+ List<UserCustom> userCustoms, List<SysRichFunction> functionTimeList, List<SysRichFunction> functionCostList,
|
|
|
+ String exportContent, List<User> userList, List<Integer> deptIds, List<Integer> deptRelatedProjectIds,
|
|
|
+ List<Integer> filterDeptIds, Boolean projectSum, WxCorpInfo wxCorpInfo) {
|
|
|
+ List<List<String>> allList = new ArrayList<List<String>>();
|
|
|
+ BigDecimal totalMoneyCost = new BigDecimal(0);
|
|
|
+ double totalCostTime = 0;
|
|
|
+ for (Map<String, Object> map : list) {
|
|
|
+ //只查找和当前主项目相关的项目
|
|
|
+ Integer pmid = (Integer)map.get("projectMainId");
|
|
|
+ if (projectMainId == null) {
|
|
|
+ if (pmid != null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (pmid == null || !pmid.equals(projectMainId)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!map.containsKey("cost")) {
|
|
|
+ map.put("cost", 0);
|
|
|
+ }
|
|
|
+ if (!map.containsKey("costMoney")) {
|
|
|
+ map.put("costMoney", 0);
|
|
|
+ } else {
|
|
|
+ totalMoneyCost = totalMoneyCost.add((BigDecimal)map.get("costMoney"));
|
|
|
+ }
|
|
|
+ totalCostTime += (Double)map.get("cost");
|
|
|
+ List<String> rowData = new ArrayList<String>();
|
|
|
+ //空出两类主项目编号和名称
|
|
|
+ rowData.add("");
|
|
|
+ rowData.add("");
|
|
|
+ rowData.add((String)map.get("projectCode"));
|
|
|
+ rowData.add((String)map.get("project"));
|
|
|
+ rowData.add((String)map.get("categoryName"));
|
|
|
+ rowData.add("");
|
|
|
+ rowData.add("");
|
|
|
+ //针对项目合计行,自定义的字段要空出来
|
|
|
+ for (UserCustom userCustom : userCustoms) {
|
|
|
+ rowData.add("");
|
|
|
+ }
|
|
|
+ if ("hours".equals(exportContent) && functionTimeList.size()>0){
|
|
|
+ rowData.add(((Double)map.get("cost")).toString());
|
|
|
+ }else if ("cost".equals(exportContent) && functionCostList.size()>0){
|
|
|
+ rowData.add(((BigDecimal)map.get("costMoney")).toString());
|
|
|
+ }else {
|
|
|
+ if(functionTimeList.size()>0){
|
|
|
+ rowData.add(((Double)map.get("cost")).toString());
|
|
|
+ }
|
|
|
+ if (functionCostList.size()>0){
|
|
|
+ rowData.add(((BigDecimal)map.get("costMoney")).toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (projectSum != null && projectSum == true) {
|
|
|
+ allList.add(rowData);
|
|
|
+ }
|
|
|
+ //统计每个项目中的人员时间成本投入
|
|
|
+ int curProjectId = (Integer)map.get("id");
|
|
|
+ //判断是否是当前项目的所属部门的主要或者其他负责人
|
|
|
+ List<Integer> finalDeptIds = null;
|
|
|
+ if (deptRelatedProjectIds.contains(curProjectId)) {
|
|
|
+ //有权限看该项目的全部参与人员,不需要按照部门过滤了
|
|
|
+ } else {
|
|
|
+ finalDeptIds = deptIds;
|
|
|
+ }
|
|
|
+ List<Map<String, Object>> membList = projectMapper.getProjectCost(companyId,startDate, endDate, curProjectId,stateKey, userIdList,finalDeptIds,filterDeptIds, true);
|
|
|
+ map.put("membList", membList);
|
|
|
+ for (Map<String, Object> membMap : membList) {
|
|
|
+ double pTotalTime = 0;
|
|
|
+ BigDecimal pTotalMoney = new BigDecimal(0);
|
|
|
+ List<String> membRowData = new ArrayList<String>();
|
|
|
+ if (projectSum == null || projectSum == false) {
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add((String)map.get("projectCode"));
|
|
|
+ membRowData.add((String)map.get("project"));
|
|
|
+ membRowData.add((String)map.get("categoryName"));
|
|
|
+ } else {
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+ }
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ membRowData.add((String)("$userName="+membMap.get("corpwxUserId")+"$"));
|
|
|
+ if(membMap.get("departmentName").equals("未分配")){
|
|
|
+ membRowData.add("未分配");
|
|
|
+ }else {
|
|
|
+ membRowData.add((String)("$departmentName="+membMap.get("corpwxDeptId")+"$"));
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ membRowData.add((String)membMap.get("name"));
|
|
|
+ membRowData.add((String)membMap.get("departmentName"));
|
|
|
+ }
|
|
|
+ String creatorId = (String)membMap.get("creatorId");
|
|
|
+ User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
|
|
|
+ for (int i = 0; i < userCustoms.size(); i++) {
|
|
|
+ switch (i){
|
|
|
+ case 0:
|
|
|
+ membRowData.add(us.getPlate1()==null?"":us.getPlate1());
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ membRowData.add(us.getPlate2()==null?"":us.getPlate2());
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ membRowData.add(us.getPlate3()==null?"":us.getPlate3());
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ membRowData.add(us.getPlate4()==null?"":us.getPlate4());
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ membRowData.add(us.getPlate5()==null?"":us.getPlate5());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ("hours".equals(exportContent) && functionTimeList.size()>0){
|
|
|
+ membRowData.add(((Double)membMap.get("cost")).toString());
|
|
|
+ }else if ("cost".equals(exportContent) && functionCostList.size()>0){
|
|
|
+ membRowData.add(((BigDecimal)membMap.get("costMoney")).toString());
|
|
|
+ }else {
|
|
|
+ if(functionTimeList.size()>0){
|
|
|
+ membRowData.add(((Double)membMap.get("cost")).toString());
|
|
|
+ }
|
|
|
+ if (functionCostList.size()>0){
|
|
|
+ membRowData.add(((BigDecimal)membMap.get("costMoney")).toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ allList.add(membRowData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ HashMap map = new HashMap();
|
|
|
+ map.put("totalMoneyCost", totalMoneyCost);
|
|
|
+ map.put("totalCostTime", totalCostTime);
|
|
|
+ map.put("allList", allList);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
//导出查询者所在公司每个项目的工时成本,包括项目人员明细统计
|
|
|
@Override
|
|
|
- public HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate,Integer projectId, String userIds,
|
|
|
+ public HttpRespMsg exportTimeCost(Integer withMainProject, String exportContent,String startDate, String endDate,Integer projectId, String userIds,
|
|
|
Boolean projectSum,Integer type,Integer deptId, Integer stateKey, Integer withPercent, HttpServletRequest request) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
try {
|
|
|
User targetUser = userMapper.selectById(request.getHeader("Token"));
|
|
|
- Integer companyId =targetUser.getCompanyId();
|
|
|
+ Integer companyId = targetUser.getCompanyId();
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
//当前用户管理部门
|
|
@@ -1562,8 +1701,24 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<List<String>> allList=null ;
|
|
|
List<String> sumRow = null;
|
|
|
List<UserCustom> userCustoms = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
|
|
|
- if(type==0){
|
|
|
+ //按主项目导出时,项目固定在行上
|
|
|
+ if(type==0 || withMainProject == 1){
|
|
|
+ //取主项目
|
|
|
+ List<Integer> mainPidList = list.stream().map(m -> (Integer)m.get("projectMainId")).distinct().collect(Collectors.toList());
|
|
|
+ //查找有没有未分类的
|
|
|
+ boolean hasNoMainProject = list.stream().anyMatch(m -> m.get("projectMainId") == null);
|
|
|
+ List<ProjectMain> mainProjectList = new ArrayList<>();
|
|
|
+ if (mainPidList.size() > 0) {
|
|
|
+ mainProjectList = projectMainMapper.selectList(new QueryWrapper<ProjectMain>().in("id", mainPidList));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
List<String> headList = new ArrayList<String>();
|
|
|
+ if (withMainProject == 1) {
|
|
|
+ //增加主项目合计的一行
|
|
|
+ headList.add("主项目编号");
|
|
|
+ headList.add("主项目名称");
|
|
|
+ }
|
|
|
//headList.add("项目编号");
|
|
|
headList.add(MessageUtils.message("entry.projectId"));
|
|
|
//headList.add("项目名称");
|
|
@@ -1598,119 +1753,165 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
allList=new ArrayList<>();
|
|
|
allList.add(headList);
|
|
|
double totalCostTime = 0;
|
|
|
- for (Map<String, Object> map : list) {
|
|
|
- if (!map.containsKey("cost")) {
|
|
|
- map.put("cost", 0);
|
|
|
- }
|
|
|
- if (!map.containsKey("costMoney")) {
|
|
|
- map.put("costMoney", 0);
|
|
|
- } else {
|
|
|
- totalMoneyCost = totalMoneyCost.add((BigDecimal)map.get("costMoney"));
|
|
|
- }
|
|
|
- totalCostTime += (Double)map.get("cost");
|
|
|
- List<String> rowData = new ArrayList<String>();
|
|
|
- rowData.add((String)map.get("projectCode"));
|
|
|
- rowData.add((String)map.get("project"));
|
|
|
- rowData.add((String)map.get("categoryName"));
|
|
|
- rowData.add("");
|
|
|
- rowData.add("");
|
|
|
- //针对项目合计行,自定义的字段要空出来
|
|
|
- for (UserCustom userCustom : userCustoms) {
|
|
|
- rowData.add("");
|
|
|
- }
|
|
|
- if ("hours".equals(exportContent) && functionTimeList.size()>0){
|
|
|
- rowData.add(((Double)map.get("cost")).toString());
|
|
|
- }else if ("cost".equals(exportContent) && functionCostList.size()>0){
|
|
|
- rowData.add(((BigDecimal)map.get("costMoney")).toString());
|
|
|
- }else {
|
|
|
+ if (withMainProject == 1) {
|
|
|
+ //主项目模式下的导出数据
|
|
|
+ //存在无主项目的数据,放在最后
|
|
|
+ if (hasNoMainProject) {
|
|
|
+ ProjectMain noMainProject = new ProjectMain();
|
|
|
+ noMainProject.setName("无主项目");
|
|
|
+ mainProjectList.add(noMainProject);
|
|
|
+ }
|
|
|
+ for (ProjectMain mainP : mainProjectList) {
|
|
|
+ HashMap sumData = fillMainProjectRowData(mainP.getId(), companyId, startDate, endDate, stateKey, userIdList, list, userCustoms, functionTimeList, functionCostList, exportContent, userList, deptIds, deptRelatedProjectIds, filterDeptIds, projectSum, wxCorpInfo);
|
|
|
+ totalMoneyCost = totalMoneyCost.add((BigDecimal)sumData.get("totalMoneyCost"));
|
|
|
+ totalCostTime += (double)sumData.get("totalCostTime");
|
|
|
+ //增加主项目合计的一行
|
|
|
+ List<String> mainProjectRowData = new ArrayList<String>();
|
|
|
+ mainProjectRowData.add(mainP.getCode());
|
|
|
+ mainProjectRowData.add(mainP.getName());
|
|
|
+ mainProjectRowData.add("");//项目编号
|
|
|
+ mainProjectRowData.add("");//项目名称
|
|
|
+ mainProjectRowData.add("");//项目分类
|
|
|
+ mainProjectRowData.add("");//姓名
|
|
|
+ mainProjectRowData.add("");//部门
|
|
|
+ //针对项目合计行,自定义的字段要空出来
|
|
|
+ for (UserCustom userCustom : userCustoms) {
|
|
|
+ mainProjectRowData.add("");
|
|
|
+ }
|
|
|
+
|
|
|
if(functionTimeList.size()>0){
|
|
|
- rowData.add(((Double)map.get("cost")).toString());
|
|
|
+ mainProjectRowData.add(((Double)sumData.get("totalCostTime")).toString());
|
|
|
}
|
|
|
if (functionCostList.size()>0){
|
|
|
- rowData.add(((BigDecimal)map.get("costMoney")).toString());
|
|
|
+ mainProjectRowData.add(((BigDecimal)sumData.get("totalMoneyCost")).toString());
|
|
|
}
|
|
|
+ allList.add(mainProjectRowData);
|
|
|
+ //增加主项目下的项目列表
|
|
|
+ allList.addAll((List<List<String>>)sumData.get("allList"));
|
|
|
}
|
|
|
- if (projectSum != null && projectSum == true) {
|
|
|
- allList.add(rowData);
|
|
|
- }
|
|
|
- //统计每个项目中的人员时间成本投入
|
|
|
- int curProjectId = (Integer)map.get("id");
|
|
|
- //判断是否是当前项目的所属部门的主要或者其他负责人
|
|
|
- List<Integer> finalDeptIds = null;
|
|
|
- if (deptRelatedProjectIds.contains(curProjectId)) {
|
|
|
- //有权限看该项目的全部参与人员,不需要按照部门过滤了
|
|
|
- } else {
|
|
|
- finalDeptIds = deptIds;
|
|
|
- }
|
|
|
- List<Map<String, Object>> membList = projectMapper.getProjectCost(companyId,startDate, endDate, curProjectId,stateKey, userIdList,finalDeptIds,filterDeptIds, true);
|
|
|
- map.put("membList", membList);
|
|
|
- for (Map<String, Object> membMap : membList) {
|
|
|
- double pTotalTime = 0;
|
|
|
- BigDecimal pTotalMoney = new BigDecimal(0);
|
|
|
- List<String> membRowData = new ArrayList<String>();
|
|
|
- if (projectSum == null || projectSum == false) {
|
|
|
- membRowData.add((String)map.get("projectCode"));
|
|
|
- membRowData.add((String)map.get("project"));
|
|
|
- membRowData.add((String)map.get("categoryName"));
|
|
|
-
|
|
|
+ } else {
|
|
|
+ //常规项目的工时导出
|
|
|
+ for (Map<String, Object> map : list) {
|
|
|
+ if (!map.containsKey("cost")) {
|
|
|
+ map.put("cost", 0);
|
|
|
+ }
|
|
|
+ if (!map.containsKey("costMoney")) {
|
|
|
+ map.put("costMoney", 0);
|
|
|
} else {
|
|
|
- membRowData.add("");
|
|
|
- membRowData.add("");
|
|
|
- membRowData.add("");
|
|
|
-
|
|
|
+ totalMoneyCost = totalMoneyCost.add((BigDecimal)map.get("costMoney"));
|
|
|
}
|
|
|
- if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
- membRowData.add((String)("$userName="+membMap.get("corpwxUserId")+"$"));
|
|
|
- if(membMap.get("departmentName").equals("未分配")){
|
|
|
- membRowData.add("未分配");
|
|
|
- }else {
|
|
|
- membRowData.add((String)("$departmentName="+membMap.get("corpwxDeptId")+"$"));
|
|
|
- }
|
|
|
- }else {
|
|
|
- membRowData.add((String)membMap.get("name"));
|
|
|
- membRowData.add((String)membMap.get("departmentName"));
|
|
|
- }
|
|
|
- String creatorId = (String)membMap.get("creatorId");
|
|
|
- User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
|
|
|
- for (int i = 0; i < userCustoms.size(); i++) {
|
|
|
- switch (i){
|
|
|
- case 0:
|
|
|
- membRowData.add(us.getPlate1()==null?"":us.getPlate1());
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- membRowData.add(us.getPlate2()==null?"":us.getPlate2());
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- membRowData.add(us.getPlate3()==null?"":us.getPlate3());
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- membRowData.add(us.getPlate4()==null?"":us.getPlate4());
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- membRowData.add(us.getPlate5()==null?"":us.getPlate5());
|
|
|
- break;
|
|
|
- }
|
|
|
+ totalCostTime += (Double)map.get("cost");
|
|
|
+ List<String> rowData = new ArrayList<String>();
|
|
|
+ rowData.add((String)map.get("projectCode"));
|
|
|
+ rowData.add((String)map.get("project"));
|
|
|
+ rowData.add((String)map.get("categoryName"));
|
|
|
+ rowData.add("");
|
|
|
+ rowData.add("");
|
|
|
+ //针对项目合计行,自定义的字段要空出来
|
|
|
+ for (UserCustom userCustom : userCustoms) {
|
|
|
+ rowData.add("");
|
|
|
}
|
|
|
if ("hours".equals(exportContent) && functionTimeList.size()>0){
|
|
|
- membRowData.add(((Double)membMap.get("cost")).toString());
|
|
|
+ rowData.add(((Double)map.get("cost")).toString());
|
|
|
}else if ("cost".equals(exportContent) && functionCostList.size()>0){
|
|
|
- membRowData.add(((BigDecimal)membMap.get("costMoney")).toString());
|
|
|
+ rowData.add(((BigDecimal)map.get("costMoney")).toString());
|
|
|
}else {
|
|
|
if(functionTimeList.size()>0){
|
|
|
- membRowData.add(((Double)membMap.get("cost")).toString());
|
|
|
+ rowData.add(((Double)map.get("cost")).toString());
|
|
|
}
|
|
|
if (functionCostList.size()>0){
|
|
|
- membRowData.add(((BigDecimal)membMap.get("costMoney")).toString());
|
|
|
+ rowData.add(((BigDecimal)map.get("costMoney")).toString());
|
|
|
}
|
|
|
}
|
|
|
+ if (projectSum != null && projectSum == true) {
|
|
|
+ allList.add(rowData);
|
|
|
+ }
|
|
|
+ //统计每个项目中的人员时间成本投入
|
|
|
+ int curProjectId = (Integer)map.get("id");
|
|
|
+ //判断是否是当前项目的所属部门的主要或者其他负责人
|
|
|
+ List<Integer> finalDeptIds = null;
|
|
|
+ if (deptRelatedProjectIds.contains(curProjectId)) {
|
|
|
+ //有权限看该项目的全部参与人员,不需要按照部门过滤了
|
|
|
+ } else {
|
|
|
+ finalDeptIds = deptIds;
|
|
|
+ }
|
|
|
+ List<Map<String, Object>> membList = projectMapper.getProjectCost(companyId,startDate, endDate, curProjectId,stateKey, userIdList,finalDeptIds,filterDeptIds, true);
|
|
|
+ map.put("membList", membList);
|
|
|
+ for (Map<String, Object> membMap : membList) {
|
|
|
+ double pTotalTime = 0;
|
|
|
+ BigDecimal pTotalMoney = new BigDecimal(0);
|
|
|
+ List<String> membRowData = new ArrayList<String>();
|
|
|
+ if (projectSum == null || projectSum == false) {
|
|
|
+ membRowData.add((String)map.get("projectCode"));
|
|
|
+ membRowData.add((String)map.get("project"));
|
|
|
+ membRowData.add((String)map.get("categoryName"));
|
|
|
|
|
|
- allList.add(membRowData);
|
|
|
+ } else {
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+ membRowData.add("");
|
|
|
+
|
|
|
+ }
|
|
|
+ if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
+ membRowData.add((String)("$userName="+membMap.get("corpwxUserId")+"$"));
|
|
|
+ if(membMap.get("departmentName").equals("未分配")){
|
|
|
+ membRowData.add("未分配");
|
|
|
+ }else {
|
|
|
+ membRowData.add((String)("$departmentName="+membMap.get("corpwxDeptId")+"$"));
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ membRowData.add((String)membMap.get("name"));
|
|
|
+ membRowData.add((String)membMap.get("departmentName"));
|
|
|
+ }
|
|
|
+ String creatorId = (String)membMap.get("creatorId");
|
|
|
+ User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
|
|
|
+ for (int i = 0; i < userCustoms.size(); i++) {
|
|
|
+ switch (i){
|
|
|
+ case 0:
|
|
|
+ membRowData.add(us.getPlate1()==null?"":us.getPlate1());
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ membRowData.add(us.getPlate2()==null?"":us.getPlate2());
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ membRowData.add(us.getPlate3()==null?"":us.getPlate3());
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ membRowData.add(us.getPlate4()==null?"":us.getPlate4());
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ membRowData.add(us.getPlate5()==null?"":us.getPlate5());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ("hours".equals(exportContent) && functionTimeList.size()>0){
|
|
|
+ membRowData.add(((Double)membMap.get("cost")).toString());
|
|
|
+ }else if ("cost".equals(exportContent) && functionCostList.size()>0){
|
|
|
+ membRowData.add(((BigDecimal)membMap.get("costMoney")).toString());
|
|
|
+ }else {
|
|
|
+ if(functionTimeList.size()>0){
|
|
|
+ membRowData.add(((Double)membMap.get("cost")).toString());
|
|
|
+ }
|
|
|
+ if (functionCostList.size()>0){
|
|
|
+ membRowData.add(((BigDecimal)membMap.get("costMoney")).toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ allList.add(membRowData);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//合计
|
|
|
sumRow=new ArrayList<>();
|
|
|
//sumRow.add("合计");
|
|
|
sumRow.add(MessageUtils.message("entry.total"));
|
|
|
+ if (withMainProject == 1) {
|
|
|
+ //多两列
|
|
|
+ sumRow.add("");
|
|
|
+ sumRow.add("");
|
|
|
+ }
|
|
|
sumRow.add("");
|
|
|
sumRow.add("");
|
|
|
sumRow.add("");
|
|
@@ -1891,7 +2092,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
//生成excel文件导出
|
|
|
//String fileName = "项目成本工时统计_"+System.currentTimeMillis();
|
|
|
- String fileName = MessageUtils.message("fileName.projectCost")+System.currentTimeMillis();
|
|
|
+ String fileName = null;
|
|
|
+ if (withMainProject == 1) {
|
|
|
+ fileName = "主项目成本工时统计"+System.currentTimeMillis();
|
|
|
+ } else {
|
|
|
+ fileName = MessageUtils.message("fileName.projectCost")+System.currentTimeMillis();
|
|
|
+ }
|
|
|
+
|
|
|
return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
|
|
|
} catch (NullPointerException e) {
|
|
|
e.printStackTrace();
|