|
@@ -11,7 +11,9 @@ import com.ruoyi.common.core.utils.file.FilePrefixUtils;
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
|
|
import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
|
|
import com.ruoyi.common.redis.service.RedisService;
|
|
import com.ruoyi.common.redis.service.RedisService;
|
|
|
|
+import com.ruoyi.system.api.RemoteDeptService;
|
|
import com.ruoyi.system.api.RemoteFileService;
|
|
import com.ruoyi.system.api.RemoteFileService;
|
|
|
|
+import com.ruoyi.system.api.domain.SysDept;
|
|
import com.ruoyi.system.api.domain.SysFile;
|
|
import com.ruoyi.system.api.domain.SysFile;
|
|
import com.ruoyi.system.api.domain.SysUser;
|
|
import com.ruoyi.system.api.domain.SysUser;
|
|
import com.sooka.sponest.event.base.service.impl.BaseServiceImpl;
|
|
import com.sooka.sponest.event.base.service.impl.BaseServiceImpl;
|
|
@@ -188,7 +190,7 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
// 构建待确认事件对象
|
|
// 构建待确认事件对象
|
|
EventUnconfirmed eventUnconfirmed = new EventUnconfirmed(
|
|
EventUnconfirmed eventUnconfirmed = new EventUnconfirmed(
|
|
sensorEventVo.getEventId(), sensorEventVo.getEventType(), sensorEventVo.getReportor() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, sensorEventVo.getReportTime()) + sensorEventVo.getEventTypeName(),
|
|
sensorEventVo.getEventId(), sensorEventVo.getEventType(), sensorEventVo.getReportor() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, sensorEventVo.getReportTime()) + sensorEventVo.getEventTypeName(),
|
|
- sensorEventVo.getEventDescription(), REPORTING_SOURCE_2, sensorEventVo.getLongitude(), sensorEventVo.getLatitude(), sensorEventVo.getReportor(), sensorEventVo.getReportTime(),
|
|
|
|
|
|
+ sensorEventVo.getEventDescription(), REPORTING_SOURCE_4, sensorEventVo.getLongitude(), sensorEventVo.getLatitude(), sensorEventVo.getReportor(), sensorEventVo.getReportTime(),
|
|
sensorEventVo.getSensorId(), EVENT_STATUS_1, sensorEventVo.getAddress(), IS_URGE_0, sensorEventVo.getSensorId(), sensorEventVo.getReportTime());
|
|
sensorEventVo.getSensorId(), EVENT_STATUS_1, sensorEventVo.getAddress(), IS_URGE_0, sensorEventVo.getSensorId(), sensorEventVo.getReportTime());
|
|
|
|
|
|
// 插入事件信息
|
|
// 插入事件信息
|
|
@@ -198,13 +200,47 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
eventDeptService.insertEventDept(sensorEventVo.getEventId(), listDept);
|
|
eventDeptService.insertEventDept(sensorEventVo.getEventId(), listDept);
|
|
|
|
|
|
// 插入事件日志
|
|
// 插入事件日志
|
|
- String logId = eventLogService.insertEventLog( sensorEventVo.getEventId(), eventUnconfirmed.getEventName() + System.getProperty("line.separator") + eventUnconfirmed.getEventDescription(), EVENT_LOG_TYPE_1, EVENT_LOG_SOURCE_1, sensorEventVo.getSensorId(), sensorEventVo.getReportTime());
|
|
|
|
|
|
+ String logId = eventLogService.insertEventLog( sensorEventVo.getEventId(), eventUnconfirmed.getEventName() + System.getProperty("line.separator") + eventUnconfirmed.getEventDescription(), EVENT_LOG_TYPE_1, EVENT_LOG_SOURCE_4, sensorEventVo.getSensorId(), sensorEventVo.getReportTime());
|
|
|
|
|
|
// 插入事件图片(待确认附件表)
|
|
// 插入事件图片(待确认附件表)
|
|
eventAttachService.batchInsertEventAttachUnconfirmed(logId, sensorEventVo.getEventId(), Arrays.asList(sensorEventVo.getPicture().split(",")), EVENT_LOG_FILE_SOURCE_4, FILE_URL);
|
|
eventAttachService.batchInsertEventAttachUnconfirmed(logId, sensorEventVo.getEventId(), Arrays.asList(sensorEventVo.getPicture().split(",")), EVENT_LOG_FILE_SOURCE_4, FILE_URL);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+ public void insertHousingEvent(SensorEventVo sensorEventVo) {
|
|
|
|
+ // 验证是否配置市级住建局
|
|
|
|
+ SysDept sysDept = new SysDept();
|
|
|
|
+ sysDept.setDeptId(Long.valueOf("365"));
|
|
|
|
+ sysDept.setDeptType(sensorEventVo.getDeptType());// 住建:sys_dept_type_31,执法:
|
|
|
|
+ List<SysDept> deptList = SpringUtils.getBean(RemoteDeptService.class).getDeptsByDeptType(sysDept).getData();
|
|
|
|
+ if (deptList.isEmpty()) {
|
|
|
|
+ logger.info("数字住建-无法匹配相关部门!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // 构建待确认事件对象
|
|
|
|
+ EventUnconfirmed eventUnconfirmed = new EventUnconfirmed(
|
|
|
|
+ sensorEventVo.getEventId(), sensorEventVo.getEventType(), sensorEventVo.getReportor() + DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, sensorEventVo.getReportTime()) + sensorEventVo.getEventTypeName(),
|
|
|
|
+ sensorEventVo.getEventDescription(), REPORTING_SOURCE_5, sensorEventVo.getLongitude(), sensorEventVo.getLatitude(), sensorEventVo.getReportor(), sensorEventVo.getReportTime(),
|
|
|
|
+ sensorEventVo.getSensorId(), EVENT_STATUS_6, sensorEventVo.getAddress(), IS_URGE_0, sensorEventVo.getReportor(), sensorEventVo.getReportTime());
|
|
|
|
+
|
|
|
|
+ // 插入事件信息
|
|
|
|
+ eventProcessMapper.insertEventInfo(eventUnconfirmed);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<CenterdataTAidevicedept> listDept = new ArrayList<>();
|
|
|
|
+ deptList.forEach(dept->{
|
|
|
|
+ listDept.add(new CenterdataTAidevicedept(dept.getDeptId(), dept.getDeptName()));
|
|
|
|
+ });
|
|
|
|
+ // 插入事件指挥中心
|
|
|
|
+ eventDeptService.insertEventDept(sensorEventVo.getEventId(), listDept);
|
|
|
|
+
|
|
|
|
+ // 插入事件日志
|
|
|
|
+ eventLogService.insertEventLog( sensorEventVo.getEventId(), eventUnconfirmed.getEventName() + System.getProperty("line.separator") + eventUnconfirmed.getEventDescription(), EVENT_LOG_TYPE_6, EVENT_LOG_SOURCE_5, sensorEventVo.getReportor(), sensorEventVo.getReportTime());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
@DataScopeMutiDept(deptAlias = "d")
|
|
@DataScopeMutiDept(deptAlias = "d")
|
|
public List<EventInfoBO> selectUnConfirmedList(EventInfo eventInfo) {
|
|
public List<EventInfoBO> selectUnConfirmedList(EventInfo eventInfo) {
|
|
setSookaDataBase(eventInfo);
|
|
setSookaDataBase(eventInfo);
|