Explorar o código

举报投诉按照火浣场所名称筛选

yq %!s(int64=4) %!d(string=hai) anos
pai
achega
090a4f898e

+ 3 - 3
mhfire-mapping/src/main/resources/mapper/mysql/ReportComplaintMapper.xml

@@ -14,7 +14,7 @@
                 and `举报时间` <= #{endTime}
             </if>
             <if test="type !=null and type != ''">
-                and `工单类型名称` = #{type}
+                and `火患场所名称` = #{type}
             </if>
             <if test="workFlag !=null and workFlag != ''">
                 and `工单状态名称` = #{workFlag}
@@ -26,8 +26,8 @@
         </where>
     </select>
     <select id="selectType" resultType="java.lang.String">
-        SELECT `工单类型名称`
+        SELECT `火患场所名称`
         FROM `jdjc-hzyhtsjbxx`
-         GROUP BY `工单类型名称`
+         GROUP BY `火患场所名称`
     </select>
 </mapper>

+ 3 - 1
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/ReportComplaintServiceImpl.java

@@ -1,6 +1,7 @@
 package com.bizmatics.mhfire.service.impl;
 
 import com.baomidou.mybatisplus.extension.api.R;
+import com.bizmatics.common.core.util.StringUtils;
 import com.bizmatics.mhfire.persistence.mapper.ReportComplaintMapper;
 import com.bizmatics.mhfire.service.ReportComplaintService;
 import com.bizmatics.mhfire.service.util.Arith;
@@ -45,7 +46,8 @@ public class ReportComplaintServiceImpl implements ReportComplaintService {
     public List<ReportComplaintVO> getReportComplaint(Date startTime, Date endTime) {
         List<ReportComplaintVO> list = new ArrayList<>();
         List<String> strings = reportComplaintMapper.selectType();
-        strings.forEach(type -> {
+        strings.stream().filter(StringUtils::isNotBlank)
+        .forEach(type -> {
             ReportComplaintVO reportComplaintVo = new ReportComplaintVO();
             reportComplaintVo.setType(type);
             reportComplaintVo.setNumber(reportComplaintMapper.selectCount(null,null,type,null,null));