iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/video/hikvision/utils/MessageCode.java
@@ -9,8 +9,8 @@ public static final String JsonSavePath = "D:/hk-project/json";//海康威视抓取图片上传路径 // public static final String JsonSavePath = "D:/DLUT/json";//海康威视抓取图片上传路径 public static final String HIK_WIN_PATH = "hikvision/win64/HCNetSDK.dll"; // public static final String HIK_WIN_PATH = "D:\\DLUT\\lib\\HCNetSDK.dll"; // public static final String HIK_WIN_PATH = "hikvision/win64/HCNetSDK.dll"; public static final String HIK_WIN_PATH = "D:\\DLUT\\lib\\HCNetSDK.dll"; public static final String ModelCode = "Image_feature";//模型代码 iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java
@@ -42,7 +42,7 @@ @PostMapping(PREFIX + "/predict-data/cur") @Operation(summary = "获取当前预测数据") Map<String, List<Object[]>> getPreDataCur(PreDataJsonReqVO reqVO); Map<String, List<Object[]>> getPreDataCur(@RequestBody PreDataJsonReqVO reqVO); @PostMapping(PREFIX + "/plan-data/single-chart") @Operation(summary = "计划数据图表") @@ -54,11 +54,11 @@ @GetMapping(PREFIX + "/alarm-message/list") @Operation(summary = "获取预警信息列表") List<AlarmMessageRespDTO> listAlarmMessage(@RequestParam("params") Map<String, Object> params); List<AlarmMessageRespDTO> listAlarmMessage(@RequestParam Map<String, Object> params); @GetMapping(PREFIX + "/alarm-config/list") @Operation(summary = "获取预警配置列表") List<AlarmConfigRespDTO> listAlarmConfig(@RequestParam("params") Map<String, Object> params); List<AlarmConfigRespDTO> listAlarmConfig(@RequestParam Map<String, Object> params); @GetMapping(PREFIX + "/alarm-message/last-one") @Operation(summary = "获取最新预警信息") @@ -70,7 +70,7 @@ @GetMapping(PREFIX + "/schedule-suggest/list") @Operation(summary = "获取调度建议列表") List<ScheduleSuggestRespDTO> listScheduleSuggest(@RequestParam("params") ScheduleSuggestReqDTO params); List<ScheduleSuggestRespDTO> listScheduleSuggest(@RequestParam Map<String, Object> params); @PostMapping(PREFIX + "/predict-model-setting/modify") @Operation(summary = "修改预测模型设置参数") @@ -84,4 +84,8 @@ @PostMapping(PREFIX + "/schedule-model-setting/modify") @Operation(summary = "修改调度模型设置参数") Boolean modifyScheduleModelSetting(@RequestBody List<ScheduleModelSettingReqDTO> dtos); @GetMapping(PREFIX + "/schedule-scheme/list") @Operation(summary = "获取调度方案列表") List<StScheduleSchemeDTO> listScheduleScheme(@RequestParam Map<String, Object> params); } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/StScheduleSchemeDTO.java
对比新文件 @@ -0,0 +1,81 @@ package com.iailab.module.model.api.mcs.dto; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * @author lirm * @date 2024年12月04日 */ @Data public class StScheduleSchemeDTO implements Serializable { private static final long serialVersionUID = 1L; /** * 主键 */ private String id; /** * 编号 */ private String code; /** * 名称 */ private String name; /** * 触发方式 */ private String triggerMethod; /** * 触发条件 */ private String triggerCondition; /** * 调整对象 */ private String scheduleObj; /** * 调整类型 */ private String scheduleType; /** * 调整策略 */ private String scheduleStrategy; /** * 调度模型 */ private String modelId; /** * 调度时间 */ private Date scheduleTime; /** * 状态(0正常 1停用) */ private Integer status; /** * 备注 */ private String remark; /** * 项目ID */ private String mpkprojectid; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java
@@ -19,6 +19,7 @@ import com.iailab.module.model.mcs.pre.service.*; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessageSaveReqVO; import com.iailab.module.model.mcs.sche.entity.StScheduleSuggestEntity; import com.iailab.module.model.mcs.sche.service.StScheduleSchemeService; import com.iailab.module.model.mcs.sche.service.StScheduleSuggestService; import com.iailab.module.model.mdk.vo.ItemVO; import com.iailab.module.model.mpk.service.ChartService; @@ -79,6 +80,8 @@ @Autowired private MmPredictAlarmConfigService mmPredictAlarmConfigService; @Autowired private StScheduleSchemeService stScheduleSchemeService; private int HOUR_MINS = 60; @@ -516,7 +519,7 @@ } @Override public List<ScheduleSuggestRespDTO> listScheduleSuggest(ScheduleSuggestReqDTO params) { public List<ScheduleSuggestRespDTO> listScheduleSuggest(Map<String, Object> params) { return Collections.emptyList(); } @@ -536,6 +539,11 @@ return true; } @Override public List<StScheduleSchemeDTO> listScheduleScheme(Map<String, Object> params) { return stScheduleSchemeService.list(params); } private Date[] calResultTime(ItemVO predictItem, Date startTimeReq, Date endTimeReq, int lengthLeft, int lengthRight) { Date[] result = new Date[3]; iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictAlarmConfigServiceImpl.java
@@ -5,6 +5,7 @@ import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.framework.common.util.object.ConvertUtils; import com.iailab.framework.security.core.util.SecurityFrameworkUtils; import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO; import com.iailab.module.model.mcs.pre.dao.MmPredictAlarmConfigDao; @@ -66,6 +67,7 @@ public List<AlarmConfigRespDTO> list(Map<String, Object> params) { QueryWrapper<MmPredictAlarmConfigEntity> wrapper = new QueryWrapper<>(); wrapper.eq("is_enable", 1); return BeanUtils.toBean(baseDao.selectList(wrapper), AlarmConfigRespDTO.class); List<MmPredictAlarmConfigEntity> list = baseDao.selectList(wrapper); return ConvertUtils.sourceToTarget(list, AlarmConfigRespDTO.class); } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/StScheduleSchemeService.java
@@ -2,11 +2,14 @@ import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.BaseService; import com.iailab.module.model.api.mcs.dto.StScheduleSchemeDTO; import com.iailab.module.model.mcs.sche.entity.StScheduleSchemeEntity; import com.iailab.module.model.mcs.sche.vo.StScheduleSchemePageReqVO; import com.iailab.module.model.mcs.sche.vo.StScheduleSchemeSaveReqVO; import java.util.Date; import java.util.List; import java.util.Map; /** * @author PanZhibao @@ -27,4 +30,6 @@ void updateTime(String id, Date scheduleTime); StScheduleSchemeEntity getByCode(String code); List<StScheduleSchemeDTO> list(Map<String, Object> params); } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleSchemeServiceImpl.java
@@ -4,6 +4,10 @@ import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.framework.common.util.object.ConvertUtils; import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO; import com.iailab.module.model.api.mcs.dto.StScheduleSchemeDTO; import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmConfigEntity; import com.iailab.module.model.mcs.sche.dao.StScheduleSchemeDao; import com.iailab.module.model.mcs.sche.entity.StScheduleSchemeEntity; import com.iailab.module.model.mcs.sche.service.StScheduleSchemeService; @@ -11,8 +15,7 @@ import com.iailab.module.model.mcs.sche.vo.StScheduleSchemeSaveReqVO; import org.springframework.stereotype.Service; import java.util.Date; import java.util.UUID; import java.util.*; /** * @author PanZhibao @@ -58,6 +61,15 @@ } @Override public List<StScheduleSchemeDTO> list(Map<String, Object> params) { QueryWrapper<StScheduleSchemeEntity> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("trigger_method", "1"); queryWrapper.eq("trigger_condition", params.get("trigger_condition")); List<StScheduleSchemeEntity> list = baseDao.selectList(queryWrapper); return ConvertUtils.sourceToTarget(list, StScheduleSchemeDTO.class); } @Override public void updateTime(String id, Date scheduleTime) { StScheduleSchemeEntity entity = new StScheduleSchemeEntity(); entity.setId(id);