指挥部大屏bug和其他bug修复

This commit is contained in:
guoshengxiong 2024-05-15 15:37:37 +08:00
parent d8d08dc1dd
commit 7d8f4d1575
6 changed files with 27 additions and 8 deletions

View File

@ -2,6 +2,7 @@ package com.zhgd.xmgl.base.entity.vo;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.http.HttpUtil;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.zhgd.xmgl.enums.BaseEnum;
import com.zhgd.xmgl.modules.basicdata.entity.DictionaryItem;
import io.swagger.annotations.ApiModelProperty;
@ -19,9 +20,12 @@ import java.util.stream.Collectors;
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SectorVo {
@ApiModelProperty("总数")
private String count;
@ApiModelProperty("影响天数")
private Integer dayNum;
private List<SectorOneVo> data;

View File

@ -141,8 +141,6 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl<AiAnaly
DictionaryItem item = typeMap.get(record.getAlarmType() + "");
if (item != null) {
record.setAlarmTypeName(item.getName());
} else {
record.setAlarmTypeName("其他类型");
}
}
return dictList;

View File

@ -119,8 +119,6 @@ public class AiStatisticServiceImpl implements IAiStatisticService {
DictionaryItem item = typeMap.get(record.getAlarmType() + "");
if (item != null) {
record.setAlarmTypeName(item.getName());
} else {
record.setAlarmTypeName("其他类型");
}
}
AiAnalyseHardWareAlarmTypeCountVO vo = new AiAnalyseHardWareAlarmTypeCountVO();

View File

@ -31,4 +31,6 @@ public interface XzTaskProgressContentMapper extends BaseMapper<XzTaskProgressCo
IPage<XzTaskProgressContent> queryList(Page<XzTaskProgressContent> page, @Param(Constants.WRAPPER) QueryWrapper<XzTaskProgressContent> queryWrapper);
ArrayList<SectorOneVo> statsDelayEventType(Map<String, Object> paramMap);
Integer countDayNum(Map<String, Object> paramMap);
}

View File

@ -13,9 +13,6 @@
<select id="statsDelayEventType" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select count(*) count,c.delay_event_type as enumType
from xz_task_progress_content c
join xz_task_progress xtp on c.task_progress_id = xtp.id
left join quality_region qr on xtp.quality_region_id = qr.id
left join enterprise_info ei on ei.id=c.enterprise_id
where 1=1
<if test="projectSn != null and projectSn != ''">
and c.project_sn = #{projectSn}
@ -29,4 +26,20 @@
and c.delay_event_type != ''
group by c.delay_event_type
</select>
<select id="countDayNum" resultType="java.lang.Integer">
select count(distinct DATE_FORMAT(c.upload_date, '%Y-%m-%d')) count
from xz_task_progress_content c
where 1=1
<if test="projectSn != null and projectSn != ''">
and c.project_sn = #{projectSn}
</if>
<if test="month != null and month != ''">
and c.upload_date >= #{month}
and c.upload_date &lt;= concat(#{month},'-31 23:59:59')
</if>
and c.audit_type=2
and c.has_delay_event=1
and c.delay_event_type != ''
</select>
</mapper>

View File

@ -122,7 +122,11 @@ public class XzTaskProgressContentServiceImpl extends ServiceImpl<XzTaskProgress
o1.setCount(String.valueOf(Integer.parseInt(o1.getCount()) + Integer.parseInt(o2.getCount())));
return o1;
})).values());
return SectorVo.getSectorVoByEnum(result, ParamEnum.DelayEventTypeEnum.values(), false);
SectorVo vo = SectorVo.getSectorVoByEnum(result, ParamEnum.DelayEventTypeEnum.values(), false);
Integer c = baseMapper.countDayNum(paramMap);
vo.setDayNum(c);
return vo;
}
private QueryWrapper<XzTaskProgressContent> getQueryWrapper(HashMap<String, Object> paramMap) {