浏览代码

1.大中型统计报表-订单列表查询报错

GouGengquan 4 月之前
父节点
当前提交
679cb3daa9
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      dao/src/main/resources/mapper/MajorStatisticalStatementMapper.xml

+ 1 - 2
dao/src/main/resources/mapper/MajorStatisticalStatementMapper.xml

@@ -1160,12 +1160,11 @@
         SELECT
         major.order_id AS orderId,
         financial,
-        major.name AS projectName,
         <if test="dto != null and dto.efficiencyType == 'statement'">
             statement.name AS projectName,
         </if>
         <if test="dto != null and dto.efficiencyType != 'statement'">
-            report.name AS projectName,
+            IF(report.name IS NULL, major.name, report.name) AS projectName,
         </if>
         customer.name AS customerName,
         (SELECT customer_company.name FROM customer_company WHERE customer_company.id = clientele_sub_id) AS customerSubName,