Commit 6f4ec3e8 authored by tianyiming's avatar tianyiming

大瓶隐患折线图添加orgCode筛选

parent 68c6fed4
......@@ -25,7 +25,7 @@ public interface SafetyProblemTracingMapper extends BaseMapper<SafetyProblemTrac
List<Map<String, Object>> queryOutOfMaintenanceRecord();
List<String> getBusinessType(@Param("sourceTypeCode") String sourceTypeCode);
List<String> getBusinessType(@Param("sourceTypeCode") String sourceTypeCode, @Param("orgCode") String orgCode);
List<Map<String, Object>> getBusinessCount(@Param("sourceTypeCode") String sourceTypeCode);
List<Map<String, Object>> getBusinessCount(@Param("sourceTypeCode") String sourceTypeCode, @Param("orgCode") String orgCode);
}
......@@ -144,6 +144,9 @@
tzs_safety_problem_tracing
where
is_delete = '0'
<if test="orgCode != null and orgCode != ''">
and governing_body_org_code like CONCAT(#{orgCode}, '%')
</if>
<if test="sourceTypeCode != null and sourceTypeCode != ''">
and source_type_code = #{sourceTypeCode}
</if>
......@@ -159,6 +162,9 @@
tzs_safety_problem_tracing
WHERE
is_delete = '0'
<if test="orgCode != null and orgCode != ''">
and governing_body_org_code like CONCAT(#{orgCode}, '%')
</if>
<if test="sourceTypeCode != null and sourceTypeCode != ''">
and source_type_code = #{sourceTypeCode}
</if>
......
......@@ -68,6 +68,7 @@ import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.io.IOException;
import java.lang.reflect.Field;
import java.math.BigDecimal;
......@@ -79,10 +80,10 @@ import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
/**
......@@ -3251,13 +3252,17 @@ public class JGDPStatisticsServiceImpl {
}
public Map<String, Object> getProblemChart(SafetyProblemTracingDto problemModel) {
String orgCode = stCommonService.getAndSetOrgCode(problemModel.getCityCode());
if (ObjectUtils.isEmpty(orgCode)){
return new HashMap<>();
}
Map<String,Object> resultMap = new HashMap<>();
String sourceTypeCode = problemModel.getSourceTypeCode();
List<String> xdata = safetyProblemTracingMapper.getBusinessType(sourceTypeCode);
List<String> xdata = safetyProblemTracingMapper.getBusinessType(sourceTypeCode,orgCode);
if(ObjectUtils.isEmpty(xdata)){
return resultMap;
}
List<Map<String, Object>> countMap = safetyProblemTracingMapper.getBusinessCount(sourceTypeCode);
List<Map<String, Object>> countMap = safetyProblemTracingMapper.getBusinessCount(sourceTypeCode, orgCode);
List<String> redCount = new ArrayList<>();
List<String> yellowCount = new ArrayList<>();
List<String> greenCount = new ArrayList<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment