Prechádzať zdrojové kódy

pms 线上运营会议 3个公司不累计财务数据

zhangcl 17 hodín pred
rodič
commit
50b5def804

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotoperationmeeting/vo/IotOperationMeetingRespVO.java

@@ -120,4 +120,7 @@ public class IotOperationMeetingRespVO {
 
     @Schema(description = "设备利用率 是否需要必填", example = "true必填 false非必填")
     private boolean mandatory;
+
+    @Schema(description = "是否累计财务数据", example = "true累计 false不累计")
+    private boolean cumulative;
 }

+ 11 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotoperationmeeting/IotOperationMeetingServiceImpl.java

@@ -346,8 +346,13 @@ public class IotOperationMeetingServiceImpl implements IotOperationMeetingServic
         if (CollUtil.isEmpty(companyNames)) {
             return resultMeetings;
         }
+        Set<Long> nonCumulativeDeptIds = new HashSet<>();
         companyNames.forEach(name -> {
             companyPair.put(name.getId(), name.getName());
+            // 查询部门对应的字段 phone 设置是否需要累加财务数据
+            if ("18000000000".equals(name.getPhone())) {
+                nonCumulativeDeptIds.add(name.getId());
+            }
         });
         summarizedDetails.forEach(detail -> {
             meetingIds.add(detail.getMeetingId());
@@ -407,6 +412,12 @@ public class IotOperationMeetingServiceImpl implements IotOperationMeetingServic
                 if (companyPair.containsKey(existMeeting.getDeptId())) {
                     tempMeeting.setCompanyName(companyPair.get(existMeeting.getDeptId()));
                 }
+                // 判断公司的财务数据是否需要累计 新业务开发 非洲地区 中东地区 3个公司不累计
+                if (nonCumulativeDeptIds.contains(existMeeting.getDeptId())) {
+                    tempMeeting.setCumulative(false);
+                } else {
+                    tempMeeting.setCumulative(true);
+                }
                 List<IotOperationMeetingDetailRespVO> meetingDetails = BeanUtils.toBean(details, IotOperationMeetingDetailRespVO.class);
                 tempMeeting.setDetails(meetingDetails);
                 resultMeetings.add(tempMeeting);