Przeglądaj źródła

判断是否存在服务收费金额

xzc 1 tydzień temu
rodzic
commit
4208503d67

+ 4 - 1
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/orderreport/OrderReportServiceImpl.java

@@ -48,6 +48,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.transaction.annotation.Transactional;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -233,7 +234,9 @@ public class OrderReportServiceImpl extends ServiceImpl<OrderReportMapper, Order
         String code = configApi.getConfigValueByKey("boiler_legal_service_code").getCheckedData();
         if (code != null && !code.isEmpty()) {
             // 判断是否存在服务收费项目
-            if (list.stream().noneMatch(item -> "2".equals(item.getType()))) return;
+            // 判断是否存在服务收费金额
+            if (list.stream().noneMatch(item -> "2".equals(item.getType()) && item.getFee() != null && item.getFee().compareTo(BigDecimal.ZERO) > 0))
+                return;
             // 生成服务单
             DynamicTbDO reportTemplateDO = dynamicTbService.list(new LambdaQueryWrapper<DynamicTbDO>().eq(DynamicTbDO::getTbCode, code)).get(0);
             if (reportTemplateDO == null) return;