Ver código fonte

添加公式对应的报表列数据为空的情况处理

JammeyJiang 2 meses atrás
pai
commit
aec206a0f6

+ 3 - 0
src/main/java/com/kcim/service/impl/ReportServiceImpl.java

@@ -371,6 +371,9 @@ public class ReportServiceImpl implements ReportService {
             if (Objects.isNull(o)) {
                 continue;
             }
+            if (StringUtils.isEmpty(o)) {
+                o=BigDecimal.ZERO;
+            }
             BigDecimal amount = new BigDecimal(o.toString());
             String str = expressionMap.get(i);
             if (str.equals("+")) {

+ 0 - 3
src/main/resources/mapper/ComputeDrugCostMapper.xml

@@ -58,8 +58,5 @@
            and (a.code like concat('%',#{filter,jdbcType=VARCHAR},'%') or a.name like concat('%',#{filter,jdbcType=VARCHAR},'%'))
         </if>
         GROUP BY visit_no,code,item_type_code
-
     </select>
-
-
 </mapper>