ソースを参照

修改企业微信导出

yurk 2 年 前
コミット
d7dad7caa1

+ 11 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -4689,6 +4689,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 //        headList.add("创建日期");
         if(timeType.getMainProjectState()==1){
             headList.add(MessageUtils.message("entry.mainProject"));
+            headList.add(MessageUtils.message("entry.mainProjectCode"));
         }
         headList.add(MessageUtils.message("entry.projectId"));
         headList.add(MessageUtils.message("entry.projectType"));
@@ -4764,13 +4765,22 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         collect.add(-1);
         List<ProjectSeparate> projectSeparateList= projectSeparateMapper.selectList(new QueryWrapper<ProjectSeparate>().in("id", collect));
         List<ProjectKeyNodes> nodesList = projectKeyNodesMapper.selectList(new QueryWrapper<ProjectKeyNodes>().in("project_id", collect));
+        List<ProjectMain> projectMainList = projectMainMapper.selectList(new QueryWrapper<ProjectMain>().eq("company_id", company.getId()));
         LocalDateTime d=LocalDateTime.now();
         Duration between1 = Duration.between(c, d);
         System.out.println("此处耗时----------------"+between1.toMillis());
         for (ProjectVO projectVO : projectVOList) {
             List<String> rowData = new ArrayList<>();
             if(timeType.getMainProjectState()==1){
-                rowData.add(projectVO.getProjectMainName());
+                Optional<ProjectMain> first = projectMainList.stream().filter(pl -> pl.getId().equals(projectVO.getProjectMainId())).findFirst();
+                if(first.isPresent()){
+                    rowData.add(first.get().getName());
+                    rowData.add(first.get().getCode());
+                }else {
+                    rowData.add("");
+                    rowData.add("");
+                }
+
             }
             rowData.add(projectVO.getProjectCode());
             rowData.add(projectVO.getCategoryName());

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties

@@ -397,6 +397,7 @@ entry.projectCost=项目外包费
 entry.labourCost=劳务外包费
 entry.OtherOutsourceCost=其他外包费
 entry.mainProject=主项目
+entry.mainProjectCode=主项目编号
 entry.projectId=项目编号
 entry.contractNo=合同编号
 entry.projectType=项目分类

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties

@@ -397,6 +397,7 @@ entry.projectCost=Project outsourcing fee
 entry.labourCost=Labor outsourcing fee
 entry.OtherOutsourceCost=Other outsourcing fees
 entry.mainProject=Main project
+entry.mainProjectCode=Main project code
 entry.projectId=project No
 entry.contractNo=Contract No
 entry.projectType=Project classification