修改bug
This commit is contained in:
parent
51b0b6f003
commit
c8d2f73f8e
@ -29,7 +29,9 @@ import java.util.Map;
|
||||
public class DictionaryItemController {
|
||||
@Autowired
|
||||
private IDictionaryItemService dictionaryItemService;
|
||||
/*
|
||||
|
||||
*/
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
||||
@ -225,7 +225,8 @@
|
||||
group_concat( DISTINCT a.project_sn ),
|
||||
group_concat( DISTINCT cp.company_sn ),
|
||||
group_concat( DISTINCT b.company_sn ),
|
||||
group_concat( DISTINCT f.company_sn ))
|
||||
group_concat( DISTINCT f.company_sn ),
|
||||
group_concat( DISTINCT f.headquarters_sn ))
|
||||
FROM
|
||||
project a
|
||||
INNER JOIN company cp ON a.company_sn = cp.company_sn
|
||||
|
||||
@ -23,6 +23,8 @@ import com.zhgd.xmgl.modules.project.entity.Project;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProjectExternalSystemService;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectExternalSystemServiceMapper;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityRegion;
|
||||
import com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper;
|
||||
import com.zhgd.xmgl.modules.worker.entity.UserEnterprise;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||
@ -61,6 +63,8 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements ISystemUserService {
|
||||
@Autowired
|
||||
private QualityRegionMapper qualityRegionMapper;
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
@Autowired
|
||||
@ -970,6 +974,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
throw new OpenAlertException(MessageUtil.get("notFindErr"));
|
||||
} else {
|
||||
removeById(id);
|
||||
qualityRegionMapper.updateDutyNull(id);
|
||||
baseRoleUserMapper.delete(new LambdaQueryWrapper<BaseRoleUser>().eq(BaseRoleUser::getUserId, id));
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ public class QualityInspectionRecordController {
|
||||
@ApiOperation(value = "通过id查询质量检查记录信息", notes = "通过id查询质量检查记录信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "质量检查记录ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/selectQualityInspectionRecordById")
|
||||
public Result<EntityMap> selectQualityInspectionRecordById(@RequestBody Map<String, Object> map) {
|
||||
public Result<QualityInspectionRecordVo> selectQualityInspectionRecordById(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(qualityInspectionRecordService.selectQualityInspectionRecordById(map));
|
||||
}
|
||||
|
||||
|
||||
@ -9,10 +9,12 @@ public class QualityInspectionRecordVo extends QualityInspectionRecord {
|
||||
private String inspectManName;
|
||||
private String createEnterpriseName;
|
||||
private String verifyManName;
|
||||
private String subentryname;
|
||||
@ApiModelProperty("分项名称")
|
||||
private String subentryName;
|
||||
private String notifyPersonName;
|
||||
private String enterpriseName;
|
||||
private String subsectionname;
|
||||
@ApiModelProperty("分部名称")
|
||||
private String subsectionName;
|
||||
private String fullName;
|
||||
private String routineCheckName;
|
||||
private String changeName;
|
||||
@ -21,5 +23,7 @@ public class QualityInspectionRecordVo extends QualityInspectionRecord {
|
||||
private Boolean overTime;
|
||||
@ApiModelProperty("问题描述")
|
||||
private String problemDescription;
|
||||
private String dangerName;
|
||||
private String dangerItemName;
|
||||
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface QualityInspectionRecordMapper extends BaseMapper<QualityInspectionRecord> {
|
||||
|
||||
EntityMap selectQualityInspectionRecordById(Map<String, Object> map);
|
||||
QualityInspectionRecordVo selectQualityInspectionRecordById(Map<String, Object> map);
|
||||
|
||||
List<QualityInspectionRecordVo> selectQualityInspectionRecordPage(Page<QualityInspectionRecordVo> page, @Param("param") Map<String, Object> map);
|
||||
|
||||
|
||||
@ -22,4 +22,6 @@ public interface QualityRegionMapper extends BaseMapper<QualityRegion> {
|
||||
List<EntityMap> selectChildQualityRegionList(Map<String, Object> map);
|
||||
|
||||
QualityRegion getPeerNewQualityRegion(Map<String, Object> param);
|
||||
|
||||
void updateDutyNull(String id);
|
||||
}
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.quality.mapper.QualityInspectionRecordMapper">
|
||||
<select id="selectQualityInspectionRecordById" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
<select id="selectQualityInspectionRecordById"
|
||||
resultType="com.zhgd.xmgl.modules.quality.entity.vo.QualityInspectionRecordVo">
|
||||
SELECT a.*,
|
||||
b.enterprise_name,
|
||||
c.full_name,
|
||||
@ -14,7 +15,9 @@
|
||||
r.danger_name danger_item_name,
|
||||
(SELECT GROUP_CONCAT(real_name)
|
||||
FROM system_user
|
||||
WHERE FIND_IN_SET(system_user.user_id, a.notify_person)) notify_person_name
|
||||
WHERE FIND_IN_SET(system_user.user_id, a.notify_person)) notify_person_name,
|
||||
subsection.subdivision_project_name subsectionName,
|
||||
subentry.subdivision_project_name subentryName
|
||||
from quality_inspection_record a
|
||||
LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn
|
||||
LEFT JOIN danger_type_record c ON a.danger_type_id = c.id
|
||||
@ -24,6 +27,8 @@
|
||||
LEFT JOIN system_user f ON a.verify_man_id = f.user_id
|
||||
LEFT JOIN system_user g ON a.inspect_man_id = g.user_id
|
||||
LEFT JOIN routine_inspect h ON a.routine_id = h.id
|
||||
LEFT join subdivision_project subsection on subsection.id = a.subsection_id
|
||||
LEFT join subdivision_project subentry on subentry.id = a.subentry_id
|
||||
WHERE a.id = #{id}
|
||||
</select>
|
||||
<select id="selectQualityInspectionRecordPage"
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper">
|
||||
|
||||
<select id="selectQualityRegionList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT *
|
||||
from quality_region
|
||||
@ -24,4 +23,11 @@
|
||||
order by create_time desc
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<update id="updateDutyNull">
|
||||
update quality_region
|
||||
set duty_id = null,
|
||||
duty_name = null
|
||||
where duty_id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
*/
|
||||
public interface IQualityInspectionRecordService extends IService<QualityInspectionRecord> {
|
||||
|
||||
EntityMap selectQualityInspectionRecordById(Map<String, Object> map);
|
||||
QualityInspectionRecordVo selectQualityInspectionRecordById(Map<String, Object> map);
|
||||
|
||||
RecordVo selectQualityInspectionRecordPage(Map<String, Object> map);
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.quality.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -58,8 +57,10 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
private INoticeService noticeService;
|
||||
|
||||
@Override
|
||||
public EntityMap selectQualityInspectionRecordById(Map<String, Object> map) {
|
||||
return qualityInspectionRecordMapper.selectQualityInspectionRecordById(map);
|
||||
public QualityInspectionRecordVo selectQualityInspectionRecordById(Map<String, Object> map) {
|
||||
QualityInspectionRecordVo vo = qualityInspectionRecordMapper.selectQualityInspectionRecordById(map);
|
||||
setProblemDescription(vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -81,8 +82,7 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
Page<QualityInspectionRecordVo> page = new Page<>(pageNo, pageSize);
|
||||
List<QualityInspectionRecordVo> list = qualityInspectionRecordMapper.selectQualityInspectionRecordPage(page, map);
|
||||
for (QualityInspectionRecordVo vo : list) {
|
||||
String problemDescription = StringUtils.substringAfterLast(vo.getDangerItemContent(), "/");
|
||||
vo.setProblemDescription(StringUtils.isNotBlank(problemDescription) ? problemDescription : vo.getDangerItemContent());
|
||||
setProblemDescription(vo);
|
||||
}
|
||||
page.setRecords(list);
|
||||
QualityInspectionRecordTotalVo total = qualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
|
||||
@ -92,6 +92,11 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
return data;
|
||||
}
|
||||
|
||||
private void setProblemDescription(QualityInspectionRecordVo vo) {
|
||||
String problemDescription = StringUtils.substringAfterLast(vo.getDangerItemContent(), "/");
|
||||
vo.setProblemDescription(StringUtils.isNotBlank(problemDescription) ? problemDescription : vo.getDangerItemContent());
|
||||
}
|
||||
|
||||
private static List<Long> getChildrenByQualityRegionId(Long regionId, List<QualityRegion> all) {
|
||||
ArrayList<Long> list = new ArrayList<>();
|
||||
for (QualityRegion qualityRegion : all) {
|
||||
@ -147,14 +152,10 @@ public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspe
|
||||
map.put("inspectStartTime", DateUtil.today());
|
||||
map.put("inspectEndTime", DateUtil.format(DateUtil.endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss"));
|
||||
QualityInspectionRecordTotalVo todayTotal = qualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
|
||||
DateTime d = DateUtil.offsetDay(date, -1);
|
||||
map.put("inspectStartTime", DateUtil.format(d, "yyyy-MM-dd"));
|
||||
map.put("inspectEndTime", DateUtil.format(DateUtil.endOfDay(d), "yyyy-MM-dd HH:mm:ss"));
|
||||
QualityInspectionRecordTotalVo yesterdayTotal = qualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
|
||||
total.setTotalNumDifferYesterday(Integer.parseInt(todayTotal.getTotalNum()) - Integer.parseInt(yesterdayTotal.getTotalNum()));
|
||||
total.setCloseNumDifferYesterday(todayTotal.getCloseNum() - yesterdayTotal.getCloseNum());
|
||||
total.setNotCloseNumDifferYesterday(todayTotal.getNotCloseNum() - yesterdayTotal.getNotCloseNum());
|
||||
total.setOverdueNotCloseNumDifferYesterday(todayTotal.getOverdueNotCloseNum() - yesterdayTotal.getOverdueNotCloseNum());
|
||||
total.setTotalNumDifferYesterday(Integer.parseInt(todayTotal.getTotalNum()));
|
||||
total.setCloseNumDifferYesterday(todayTotal.getCloseNum());
|
||||
total.setNotCloseNumDifferYesterday(todayTotal.getNotCloseNum());
|
||||
total.setOverdueNotCloseNumDifferYesterday(todayTotal.getOverdueNotCloseNum());
|
||||
map.put("inspectStartTime", null);
|
||||
map.put("inspectEndTime", null);
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class QualityRectifyRecordServiceImpl extends ServiceImpl<QualityRectifyR
|
||||
//核验合格时候则该记录合格
|
||||
if (qualityRectifyRecord.getStatus() == 2) {
|
||||
qualityInspectionRecord.setStatus(5);
|
||||
noticeService.addUserNotice(tempQualityInspectionRecord.getChangeId(), "您提交的质量检查的整改结果已通过复查。", "质量管理整改结果核验通知", "11");
|
||||
noticeService.addUserNotice(tempQualityInspectionRecord.getChangeId(), "您提交的质量检查的整改结果已通过核验。", "质量管理整改结果核验通知", "11");
|
||||
} else {
|
||||
qualityInspectionRecord.setStatus(2);
|
||||
noticeService.addUserNotice(tempQualityInspectionRecord.getChangeId(), "您提交的质量检查的整改结果核验不通过,请及时重新整改。", "质量管理整改结果核验通知", "11");
|
||||
|
||||
@ -84,6 +84,7 @@ public class TaskProgressContentController {
|
||||
@ApiOperation(value = "列表查询任务进度甘特图-内容信息", notes = "列表查询任务进度甘特图-内容信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "taskProgressId", value = "任务进度甘特图id", paramType = "query", required = true, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<TaskProgressContent>> queryList(TaskProgressContent taskProgressContent,
|
||||
|
||||
@ -33,10 +33,10 @@ public class TaskProgressContent implements Serializable {
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* taskProgressId
|
||||
* 任务进度甘特图id
|
||||
*/
|
||||
@Excel(name = "taskProgressId", width = 15)
|
||||
@ApiModelProperty(value = "taskProgressId")
|
||||
@Excel(name = "任务进度甘特图id", width = 15)
|
||||
@ApiModelProperty(value = "任务进度甘特图id")
|
||||
private java.lang.Long taskProgressId;
|
||||
/**
|
||||
* 上报时间
|
||||
|
||||
@ -51,11 +51,13 @@ public class TaskProgressContentServiceImpl extends ServiceImpl<TaskProgressCont
|
||||
QueryWrapper<TaskProgressContent> queryWrapper = QueryGenerator.initQueryWrapper(taskProgressContent, req.getParameterMap());
|
||||
List<TaskProgressContent> taskProgressContents = baseMapper.queryList(taskProgressContent, queryWrapper);
|
||||
List<Long> ids = taskProgressContents.stream().map(TaskProgressContent::getId).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
List<TaskProgressMaterialRel> detailList = taskProgressMaterialRelMapper.queryDetailListByContentIds(ids);
|
||||
Map<Long, List<TaskProgressMaterialRel>> contentIdMap = detailList.stream().collect(Collectors.groupingBy(TaskProgressMaterialRel::getTaskProgressContentId));
|
||||
for (TaskProgressContent progressContent : taskProgressContents) {
|
||||
progressContent.setTypeDataList(contentIdMap.get(progressContent.getId()));
|
||||
}
|
||||
}
|
||||
return taskProgressContents;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,9 +7,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.enums.ParamEnum;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.video.entity.AiAnalyseHardWareAlarmRecord;
|
||||
import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTotalVo;
|
||||
import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTrendVo;
|
||||
import com.zhgd.xmgl.modules.video.service.IAiAnalyseHardWareAlarmRecordService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
@ -20,10 +22,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@ -120,7 +119,7 @@ public class AiAnalyseHardWareAlarmRecordController {
|
||||
return Result.success(aiAnalyseHardWareAlarmRecordService.selectAiAnalyseHardWareAlarmList(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询所有各预警类型预警数(不同天数)", notes = "查询所有各预警类型预警数(不同天数)", httpMethod = "POST")
|
||||
@ApiOperation(value = "查询所有各预警类型预警数(不同天数今日、近七天、最近30天)", notes = "查询所有各预警类型预警数(不同天数今日、近七天、最近30天)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "selectType", value = "查询类型,1近七天,2最近30天,3今日,4、24小时", paramType = "query", required = false, dataType = "String"),
|
||||
@ -130,6 +129,15 @@ public class AiAnalyseHardWareAlarmRecordController {
|
||||
return Result.success(aiAnalyseHardWareAlarmRecordService.getAiAnalyseHardWareAlarmTotal(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询所有预警数(不同天数)", notes = "查询所有预警数(不同天数)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countAiAnalyseHardWareAlarmTotal")
|
||||
public Result<AiAnalyseHardWareAlarmTotalVo> countAiAnalyseHardWareAlarmTotal(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(aiAnalyseHardWareAlarmRecordService.countAiAnalyseHardWareAlarmTotal(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据ID获取预警详情信息", notes = "根据ID获取预警详情信息", httpMethod = "POST")
|
||||
@ApiImplicitParams(@ApiImplicitParam(name = "id", value = "预警ID", paramType = "query", dataType = "Long"))
|
||||
@PostMapping(value = "/getDetails")
|
||||
@ -194,5 +202,4 @@ public class AiAnalyseHardWareAlarmRecordController {
|
||||
return Result.error("参数错误 ").data(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -56,10 +56,10 @@ public class AiAnalyseHardWareAlarmRecord implements Serializable {
|
||||
@ApiModelProperty(value = "图片路径")
|
||||
private java.lang.String imageUrl;
|
||||
/**
|
||||
* 类型 1-烟感报警,2-明火报警,3-人员到底报警,4-未带安全帽报警,5-区域入侵报警,6-越界入侵报警,7-人员聚集报警
|
||||
* 类型 1-烟感报警,2-明火报警,3-人员到底报警,4-未带安全帽报警,5-区域入侵报警,6-越界入侵报警,7-人员聚集报警, 8-反光衣、9-裸土覆盖,13口罩识别,14徘徊预警,15物体滞留监测,16绊线监测
|
||||
*/
|
||||
@Excel(name = "类型 1-烟感报警,2-明火报警,3-人员到底报警,4-未带安全帽报警,5-区域入侵报警,6-越界入侵报警,7-人员聚集报警", width = 15)
|
||||
@ApiModelProperty(value = "类型 1-烟感报警,2-明火报警,3-人员到底报警,4-未带安全帽报警,5-区域入侵报警,6-越界入侵报警,7-人员聚集报警")
|
||||
@Excel(name = "类型 1-烟感报警,2-明火报警,3-人员到底报警,4-未带安全帽报警,5-区域入侵报警,6-越界入侵报警,7-人员聚集报警, 8-反光衣、9-裸土覆盖,13口罩识别,14徘徊预警,15物体滞留监测,16绊线监测", width = 15)
|
||||
@ApiModelProperty(value = "类型 1-烟感报警,2-明火报警,3-人员到底报警,4-未带安全帽报警,5-区域入侵报警,6-越界入侵报警,7-人员聚集报警, 8-反光衣、9-裸土覆盖,13口罩识别,14徘徊预警,15物体滞留监测,16绊线监测")
|
||||
private java.lang.Integer alarmType;
|
||||
/**
|
||||
* 位置
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.zhgd.xmgl.modules.video.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AiAnalyseHardWareAlarmTotalVo {
|
||||
@ApiModelProperty("今日告警数量")
|
||||
private Integer todayAlarmNum;
|
||||
@ApiModelProperty("近7日告警数量")
|
||||
private Integer past7AlarmNum;
|
||||
@ApiModelProperty("近30日告警数量")
|
||||
private Integer past30AlarmNum;
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.video.entity.AiAnalyseHardWareAlarmRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTotalVo;
|
||||
import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTrendVo;
|
||||
|
||||
import java.util.List;
|
||||
@ -34,4 +35,6 @@ public interface IAiAnalyseHardWareAlarmRecordService extends IService<AiAnalyse
|
||||
void sendMessageToPhone(AiAnalyseHardWareAlarmRecord record);
|
||||
|
||||
void saveJQMAlarm(JSONObject jsonObject);
|
||||
|
||||
AiAnalyseHardWareAlarmTotalVo countAiAnalyseHardWareAlarmTotal(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ import com.zhgd.xmgl.modules.project.service.IProjectService;
|
||||
import com.zhgd.xmgl.modules.project.service.ProjectJqmDevService;
|
||||
import com.zhgd.xmgl.modules.video.entity.AiAnalyseHardWareAlarmRecord;
|
||||
import com.zhgd.xmgl.modules.video.entity.AiAnalyseHardWareRecord;
|
||||
import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTotalVo;
|
||||
import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTrendVo;
|
||||
import com.zhgd.xmgl.modules.video.mapper.AiAnalyseHardWareAlarmRecordMapper;
|
||||
import com.zhgd.xmgl.modules.video.mapper.AiAnalyseHardWareRecordMapper;
|
||||
@ -129,9 +130,9 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl<AiAnaly
|
||||
List<String> dayList;
|
||||
//获取时间段内所有天数
|
||||
if ("1".equals(MapUtils.getString(map, "selectType"))) {
|
||||
dayList = DateUtil.getNowFewDaysAgoList(7);
|
||||
dayList = DateUtil.getNowFewDaysAgoList(6);
|
||||
} else if ("2".equals(MapUtils.getString(map, "selectType"))) {
|
||||
dayList = DateUtil.getNowFewDaysAgoList(30);
|
||||
dayList = DateUtil.getNowFewDaysAgoList(29);
|
||||
} else if ("3".equals(MapUtils.getString(map, "selectType"))) {
|
||||
dayList = DateUtil.getAllHourInDay();
|
||||
} else {
|
||||
@ -335,4 +336,16 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl<AiAnaly
|
||||
log.info("告警信息:{}", alarmRecord.toString());
|
||||
aiAnalyseHardWareAlarmRecordMapper.insert(alarmRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AiAnalyseHardWareAlarmTotalVo countAiAnalyseHardWareAlarmTotal(Map<String, Object> map) {
|
||||
AiAnalyseHardWareAlarmTotalVo vo = new AiAnalyseHardWareAlarmTotalVo();
|
||||
map.put("selectType", 3);
|
||||
vo.setTodayAlarmNum(this.getAiAnalyseHardWareAlarmTotal(map).getTotalNum());
|
||||
map.put("selectType", 1);
|
||||
vo.setPast7AlarmNum(this.getAiAnalyseHardWareAlarmTotal(map).getTotalNum());
|
||||
map.put("selectType", 2);
|
||||
vo.setPast30AlarmNum(this.getAiAnalyseHardWareAlarmTotal(map).getTotalNum());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,6 +47,8 @@ spring.servlet.multipart.file-size-threshold=0
|
||||
spring.servlet.multipart.max-file-size=1024MB
|
||||
spring.servlet.multipart.max-request-size=1024MB
|
||||
spring.servlet.multipart.resolve-lazily=false
|
||||
#POST上传参数限制
|
||||
server.tomcat.max-http-post-size=100MB
|
||||
# mqtt服务器配置
|
||||
mqtt.username=admin
|
||||
mqtt.password=public
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user