Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
zhaoxianglong 9 months ago
parent
commit
c8d89779ca
  1. 9
      zc-business/src/main/java/com/zc/business/controller/DcOperLogController.java
  2. 12
      zc-business/src/main/java/com/zc/business/controller/DcWarningController.java
  3. 47
      zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java
  4. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java
  5. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java
  6. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java
  7. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollViuDataController.java
  8. 56
      zc-business/src/main/java/com/zc/business/domain/DcWarning.java
  9. 2
      zc-business/src/main/java/com/zc/business/mapper/DcDeviceMapper.java
  10. 19
      zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
  11. 5
      zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java
  12. 6
      zc-business/src/main/java/com/zc/business/service/IDcOperLogService.java
  13. 5
      zc-business/src/main/java/com/zc/business/service/IDcWarningService.java
  14. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java
  15. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java
  16. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java
  17. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollViuDataService.java
  18. 20
      zc-business/src/main/java/com/zc/business/service/ModuleCallService.java
  19. 47
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java
  20. 20
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  21. 23
      zc-business/src/main/java/com/zc/business/service/impl/DcOperLogServiceImpl.java
  22. 10
      zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
  23. 124
      zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java
  24. 5
      zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java
  25. 10
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java
  26. 10
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java
  27. 10
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java
  28. 18
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollViuDataServiceImpl.java
  29. 6
      zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml
  30. 4
      zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml
  31. 4
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

9
zc-business/src/main/java/com/zc/business/controller/DcOperLogController.java

@ -31,6 +31,15 @@ public class DcOperLogController extends BaseController {
//*********************************调用功能记录增删改查******************************************
/**
* 查询设备的调用次数根据设备类型分组
*/
@ApiOperation("查询设备的调用次数根据设备类型分组")
@GetMapping("count/deviceType")
public AjaxResult countByDeviceType() {
return AjaxResult.success(dcOperLogService.countByDeviceType());
}
/**
* 分页查询列表
*

12
zc-business/src/main/java/com/zc/business/controller/DcWarningController.java

@ -31,7 +31,7 @@ import java.util.List;
/**
* 预警信息Controller
*
*
* @author ruoyi
* @date 2024-01-26
*/
@ -49,6 +49,16 @@ public class DcWarningController extends BaseController
IDcWarningService ben = SpringUtils.getBean(IDcWarningService.class);
ben.updateEndSection();
}
/**
* 感知事件数据统计
*/
@ApiOperation("感知事件数据统计")
@GetMapping("/countNumber")
public AjaxResult dcWarningCountNumber() {
return AjaxResult.success(dcWarningService.dcWarningCountNumber());
}
/**
* 查询预警信息列表
*/

47
zc-business/src/main/java/com/zc/business/controller/ModuleCallController.java

@ -0,0 +1,47 @@
package com.zc.business.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.service.ModuleCallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 模块调用统计接口
*/
@Api(tags = {"模块调用统计接口"})
@RestController
@RequestMapping("/business/moduleCall")
public class ModuleCallController extends BaseController {
@Resource
private ModuleCallService moduleCallService;
/**
* 模块调用统计
*
* @return 查询结果
*/
@ApiOperation("模块调用统计")
@GetMapping("/countNumber")
public AjaxResult moduleCallCountNumber() {
return AjaxResult.success(moduleCallService.selectModuleCall());
}
/**
* 基础数据统计
*
* @return 查询结果
*/
@ApiOperation("基础数据统计")
@GetMapping("/basicDataNumber")
public AjaxResult basicDataNumber() {
return AjaxResult.success(moduleCallService.selectBasicData());
}
}

38
zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java

@ -0,0 +1,38 @@
package com.zc.business.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.service.IOdsTollEnpassDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 收费站入口流水数据接口
*/
@Api(tags = {"收费站入口流水数据接口"})
@RestController
@RequestMapping("/business/odsTollEnpassData")
public class OdsTollEnpassDataController extends BaseController {
@Resource
private IOdsTollEnpassDataService iOdsTollEnpassDataService;
/**
* 收费站入口流水数据统计
*
* @return 查询结果
*/
@ApiOperation("收费站入口流水数据统计")
@GetMapping("/countNumber")
public AjaxResult odsTollEnpassDataCountNumber() {
return AjaxResult.success(iOdsTollEnpassDataService.odsTollEnpassDataCountNumber());
}
}

38
zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java

@ -0,0 +1,38 @@
package com.zc.business.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.service.IOdsTollEtctuDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 门架流水数据接口
*/
@Api(tags = {"门架流水数据接口"})
@RestController
@RequestMapping("/business/odsTollEtctuData")
public class OdsTollEtctuDataController extends BaseController {
@Resource
private IOdsTollEtctuDataService iOdsTollEtctuDataService;
/**
* 门架流水数据接口统计
*
* @return 查询结果
*/
@ApiOperation("门架流水数据接口统计")
@GetMapping("/countNumber")
public AjaxResult odsTollEtctuDataCountNumber() {
return AjaxResult.success(iOdsTollEtctuDataService.odsTollEtctuDataCountNumber());
}
}

38
zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java

@ -0,0 +1,38 @@
package com.zc.business.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.service.IOdsTollExpassDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 收费站出口流水数据
*/
@Api(tags = {"收费站出口流水数据"})
@RestController
@RequestMapping("/business/odsTollExpassData")
public class OdsTollExpassDataController extends BaseController {
@Resource
private IOdsTollExpassDataService iOdsTollExpassDataService;
/**
* 收费站出口流水数据统计
*
* @return 查询结果
*/
@ApiOperation("收费站出口流水数据统计")
@GetMapping("/countNumber")
public AjaxResult odsTollExpassDataCountNumber() {
return AjaxResult.success(iOdsTollExpassDataService.odsTollExpassDataCountNumber());
}
}

38
zc-business/src/main/java/com/zc/business/controller/OdsTollViuDataController.java

@ -0,0 +1,38 @@
package com.zc.business.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.service.IOdsTollViuDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 门架牌识流水数据接口
*/
@Api(tags = {"门架牌识流水数据接口"})
@RestController
@RequestMapping("/business/odsTollViuData")
public class OdsTollViuDataController extends BaseController {
@Resource
private IOdsTollViuDataService iOdsTollViuDataService;
/**
* 当天门架牌识流水数据统计
*
* @return 查询结果
*/
@ApiOperation("门架牌识流水数据统计")
@GetMapping("/countNumber")
public AjaxResult odsTollViuDataCountNumber() {
return AjaxResult.success(iOdsTollViuDataService.odsTollViuDataCountNumber());
}
}

56
zc-business/src/main/java/com/zc/business/domain/DcWarning.java

@ -10,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 预警信息对象 dc_warning
*
*
* @author ruoyi
* @date 2024-01-13
*/
@ -56,14 +56,13 @@ public class DcWarning extends BaseEntity
private Integer warningType;
/** 事件子类:1-1 拥堵1-2 缓行 */
@Excel(name = "事件子类", readConverterExp ="1-1-拥堵,1-2=缓行,2-1=普通行人,2-2=工作人员,3-1=摩托车,3-2=自行车,3-3=三轮车,4-1=非工程车,4-2=工程车,4-3=主路有车,4-4=匝道有车,4-5=车辆故障(弃用),4-6=交通事故(弃用),4-7=应急车道被占用,4-8=车离开应急车道,4-9=其他,4-10=未知车辆,5-1=倒车/逆行,5-2=压线,5-3=掉头,5-4=超速,5-5=低速,5-6=违规变道,5-7=未保持安全距离,6-1=烟火,6-2=火灾,6-3=障碍物,6-4=抛洒物,7-1=道路施工,8-1=雨,8-2=冰雹,8-3=风,8-4=雾,8-5=高温,8-6=积水,8-7=路面湿滑,8-8=路面结冰,8-9=道路能见度低,8-10=道路团雾,9-1=只碰撞不倾斜,9-2=只倾斜无碰撞,9-3=碰撞后倾斜,10-1=未知,10-2单车事故,10-3=多车事故,11-1=车辆抛锚,11-2=车辆炸胎(有备胎),11-2=车辆炸胎(无备胎),99-1=其它")
@Excel(name = "事件子类", readConverterExp ="1-1=拥堵,1-2=缓行,2-1=普通行人,2-2=工作人员,3-1=摩托车,3-2=自行车,3-3=三轮车,4-1=非工程车,4-2=工程车,4-3=主路有车,4-4=匝道有车,4-5=车辆故障(弃用),4-6=交通事故(弃用),4-7=应急车道被占用,4-8=车离开应急车道,4-9=其他,4-10=未知车辆,5-1=倒车/逆行,5-2=压线,5-3=掉头,5-4=超速,5-5=低速,5-6=违规变道,5-7=未保持安全距离,6-1=烟火,6-2=火灾,6-3=障碍物,6-4=抛洒物,7-1=道路施工,8-1=雨,8-2=冰雹,8-3=风,8-4=雾,8-5=高温,8-6=积水,8-7=路面湿滑,8-8=路面结冰,8-9=道路能见度低,8-10=道路团雾,9-1=只碰撞不倾斜,9-2=只倾斜无碰撞,9-3=碰撞后倾斜,10-1=未知,10-2单车事故,10-3=多车事故,11-1=车辆抛锚,11-2=车辆炸胎(有备胎),11-2=车辆炸胎(无备胎),99-1=其它")
private String warningSubclass;
/** 事件解除原因 */
@Excel(name = "事件解除原因")
private String relieveReason;
/** 事件解除类型: 1-误报解除2-事件已结束3-无需处理事件4-其它 */
@Excel(name = "信息来源", readConverterExp = "1=误报解除2,2=事件已结束3,3=无需处理事件,4=其它")
//@Excel(name = "事件解除类型", readConverterExp = "1=误报解除2,2=事件已结束3,3=无需处理事件,4=其它")
private Integer relieveType;
@ -90,15 +89,14 @@ public class DcWarning extends BaseEntity
private String latitude;
/** 车辆类型 */
//@Excel(name = "车辆类型")
private String vehicleType;
/** 持续时长 */
private int duration;
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date completeTime;
//月度参数
private String quarter;
@ -302,102 +300,102 @@ public class DcWarning extends BaseEntity
{
return stakeMark;
}
public void setDirection(String direction)
public void setDirection(String direction)
{
this.direction = direction;
}
public String getDirection()
public String getDirection()
{
return direction;
}
public void setDeptId(Long deptId)
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
public Long getDeptId()
{
return deptId;
}
public void setWarningState(Integer warningState)
public void setWarningState(Integer warningState)
{
this.warningState = warningState;
}
public Integer getWarningState()
public Integer getWarningState()
{
return warningState;
}
public void setWarningTime(Date warningTime)
public void setWarningTime(Date warningTime)
{
this.warningTime = warningTime;
}
public Date getWarningTime()
public Date getWarningTime()
{
return warningTime;
}
public void setUserId(Long userId)
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
public Long getUserId()
{
return userId;
}
public void setWarningSource(Integer warningSource)
public void setWarningSource(Integer warningSource)
{
this.warningSource = warningSource;
}
public Integer getWarningSource()
public Integer getWarningSource()
{
return warningSource;
}
public void setWarningLevel(Integer warningLevel)
public void setWarningLevel(Integer warningLevel)
{
this.warningLevel = warningLevel;
}
public Integer getWarningLevel()
public Integer getWarningLevel()
{
return warningLevel;
}
public void setWarningType(Integer warningType)
public void setWarningType(Integer warningType)
{
this.warningType = warningType;
}
public Integer getWarningType()
public Integer getWarningType()
{
return warningType;
}
public void setWarningSubclass(String warningSubclass)
public void setWarningSubclass(String warningSubclass)
{
this.warningSubclass = warningSubclass;
}
public String getWarningSubclass()
public String getWarningSubclass()
{
return warningSubclass;
}
public void setWarningTitle(String warningTitle)
public void setWarningTitle(String warningTitle)
{
this.warningTitle = warningTitle;
}
public String getWarningTitle()
public String getWarningTitle()
{
return warningTitle;
}
public void setOtherConfig(String otherConfig)
public void setOtherConfig(String otherConfig)
{
this.otherConfig = otherConfig;
}
public String getOtherConfig()
public String getOtherConfig()
{
return otherConfig;
}

2
zc-business/src/main/java/com/zc/business/mapper/DcDeviceMapper.java

@ -32,4 +32,6 @@ public interface DcDeviceMapper extends BaseMapper<DcDevice> {
public List<HashMap<String,Object>> selectDeviceNameList(DcDevice dcDevice);
//设备查询-设备参数属性列表
public List<HashMap<String,Object>> selectDeviceParameterProperties(DcDevice dcDevice);
int selectDeviceNumber();
}

19
zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java

@ -3,19 +3,20 @@ package com.zc.business.mapper;
import java.util.HashMap;
import java.util.List;
import com.zc.business.domain.DcPublishManage;
import com.zc.business.domain.DcPublishingChannels;
import org.apache.ibatis.annotations.Param;
/**
* 信息发布管理记录Mapper接口
*
*
* @author ruoyi
* @date 2024-04-19
*/
public interface DcPublishManageMapper
public interface DcPublishManageMapper
{
/**
* 查询信息发布管理记录
*
*
* @param id 信息发布管理记录主键
* @return 信息发布管理记录
*/
@ -23,7 +24,7 @@ public interface DcPublishManageMapper
/**
* 查询信息发布管理记录列表
*
*
* @param dcPublishManage 信息发布管理记录
* @return 信息发布管理记录集合
*/
@ -32,7 +33,7 @@ public interface DcPublishManageMapper
List<DcPublishManage> selectEventDcPublishManageList(DcPublishManage dcPublishManage);
/**
* 新增信息发布管理记录
*
*
* @param dcPublishManage 信息发布管理记录
* @return 结果
*/
@ -40,7 +41,7 @@ public interface DcPublishManageMapper
/**
* 修改信息发布管理记录
*
*
* @param dcPublishManage 信息发布管理记录
* @return 结果
*/
@ -48,7 +49,7 @@ public interface DcPublishManageMapper
/**
* 删除信息发布管理记录
*
*
* @param id 信息发布管理记录主键
* @return 结果
*/
@ -61,7 +62,7 @@ public interface DcPublishManageMapper
int deleteDisPath(String eventId);
/**
* 批量删除信息发布管理记录
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
@ -69,7 +70,7 @@ public interface DcPublishManageMapper
//查询交通事件类型
public Integer selectEventType(@Param("eventId")String eventId);
//获取发布渠道信息
public DcPublishManage selectPublishManage(@Param("dataCategory")Integer dataCategory);
public DcPublishingChannels selectPublishManage(@Param("dataCategory")Integer dataCategory);
//查询信息发布列表
public List<HashMap<String,Object>> selectDcPublishManageListMap(DcPublishManage dcPublishManage);
//统计今日发布渠道分析

5
zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java

@ -21,6 +21,11 @@ import org.springframework.security.core.parameters.P;
*/
public interface DcWarningMapper
{
/**
* 感知事件统计
*/
int dcWarningCountNumber();
/**
* 查询预警信息
*

6
zc-business/src/main/java/com/zc/business/service/IDcOperLogService.java

@ -6,6 +6,7 @@ import com.zc.business.domain.DcOperLog;
import java.util.List;
import java.util.Date;
import java.util.Map;
/**
* 调用功能记录Service接口
@ -49,4 +50,9 @@ public interface IDcOperLogService extends IService<DcOperLog> {
*/
List<DcOperLog> listDcOperLog(DcOperLog dcOperLog,Date endTime,Date startTime);
/**
* 查询设备的调用次数根据设备类型分组
*/
List<Map<String,Object>> countByDeviceType();
}

5
zc-business/src/main/java/com/zc/business/service/IDcWarningService.java

@ -19,6 +19,11 @@ import org.springframework.web.bind.annotation.RequestBody;
*/
public interface IDcWarningService
{
/**
* 感知事件数据统计
*/
int dcWarningCountNumber();
/**
* 查询预警信息
*

5
zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java

@ -44,5 +44,10 @@ public interface IOdsTollEnpassDataService extends IService<OdsTollEnpassData> {
*/
List<DcTollStationStatisticsData> calculateTollStationStatistics(List<OdsTollEnpassData> list);
/**
* 收费站入口流水数据统计
*/
int odsTollEnpassDataCountNumber();
}

5
zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java

@ -37,4 +37,9 @@ public interface IOdsTollEtctuDataService extends IService<OdsTollEtctuData> {
* @return 返回一个包含各门架统计数据的列表如果输入列表为空则返回空列表
*/
List<DcGantryStatisticsData> calculateGantryStatistics(List<OdsTollEtctuData> odsTollEtctuDataList);
/**
* 门架流水数据接口统计
*/
int odsTollEtctuDataCountNumber();
}

5
zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java

@ -41,5 +41,10 @@ public interface IOdsTollExpassDataService extends IService<OdsTollExpassData> {
* @return 返回一个包含各收费站统计数据的列表如果输入列表为空则返回空列表
*/
List<DcTollStationStatisticsData> calculateTollStationStatistics(List<OdsTollExpassData> list);
/**
* 收费站出口流水数据统计
*/
int odsTollExpassDataCountNumber();
}

5
zc-business/src/main/java/com/zc/business/service/IOdsTollViuDataService.java

@ -8,4 +8,9 @@ import com.zc.business.domain.OdsTollViuData;
* @author xiepufeng
*/
public interface IOdsTollViuDataService extends IService<OdsTollViuData> {
/**
* 当天门架牌识流水数据统计
*/
int odsTollViuDataCountNumber();
}

20
zc-business/src/main/java/com/zc/business/service/ModuleCallService.java

@ -0,0 +1,20 @@
package com.zc.business.service;
import java.util.List;
import java.util.Map;
/**
* 模块调用统计Service
*/
public interface ModuleCallService {
/**
* 查询模块调用统计
*/
List<Map<String, Object>> selectModuleCall();
/**
* 基础数据统计
*/
int selectBasicData();
}

47
zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

@ -798,40 +798,28 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
if (device.getDeviceType().equals(DeviceTypeConstants.DRIVING_GUIDANCE.toString())) {
// 行车诱导
functionId = DeviceFunctionIdConstants.DRIVING_GUIDANCE;
// 控制模式 1-手动 2-自动 3-万年历
// 控制模式 00-手动 01-自动 02-万年历
String controlModel = otherConfig.get("controlModel").toString();
props.put("onWorkStatus", otherConfig.get("state").toString());
props.put("inWorkStatus", otherConfig.get("state").toString());
props.put("mode", controlModel);
JSONObject result = new JSONObject();
String state = "";
// 01常亮02流水03闪烁04关闭
if (otherConfig.get("state").toString().equals("01")) {
state = "常量";
} else if (otherConfig.get("state").toString().equals("02")) {
state = "流水";
} else if (otherConfig.get("state").toString().equals("03")) {
state = "闪烁";
}else {
state = "关闭";
}
String stateName = otherConfig.get("name").toString();
if (controlModel.equals("01")) {
String startTime = otherConfig.get("startTime").toString();
String endTime = otherConfig.get("endTime").toString();
props.put("mode", "01");
props.put("startDisplayTime", startTime);
props.put("endDisplayTime", endTime);
result.put("content","时间自动:"+state+";"+startTime+"-"+endTime);
result.put("content","自动:"+stateName+";时间范围:"+startTime+"-"+endTime);
} else if (controlModel.equals("00")) {
result.put("content","手动:"+state);
result.put("content","手动:"+stateName);
}else {
result.put("content","万年历:"+state);
result.put("content","万年历:"+stateName);
}
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, functionId, props);
// 将调用结果存入到 resultArray(操作结果) 中
result.put("device", device.getId());
result.put("deviceName",device.getDeviceName());
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, functionId, props);
// 将调用结果存入到 resultArray(操作结果) 中
result.put("result", ajaxResult);
resultArray.add(result);
@ -919,14 +907,13 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
}
else if (device.getDeviceType().equals(DeviceTypeConstants.LASER_FATIGUE_AWAKENING.toString())) {
// 激光疲劳唤醒
functionId = otherConfig.get("state").toString();
AjaxResult ajaxResultState = dcDeviceController.invokedFunction(iotDeviceId, functionId, new HashMap<>());
JSONObject result = new JSONObject();
result.put("device", device.getId());
result.put("deviceName",device.getDeviceName());
result.put("result", ajaxResultState);
resultArray.add(result);
HashMap<String,Object> map = new HashMap<>();
map.put("SET",otherConfig.get("operationType").toString());
JSONObject resultTime = new JSONObject();
resultTime.put("device", device.getId());
resultTime.put("deviceName",device.getDeviceName());
AjaxResult ajaxResultState = dcDeviceController.invokedFunction(iotDeviceId, "SETMD", map);
resultTime.put("resultState", ajaxResultState);
// 操作时长
String operationDuration = "SETTM" + otherConfig.get("operationDuration").toString();
@ -934,12 +921,8 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
HashMap<String, Object> propsTime = new HashMap<>();
propsTime.put("SET", operationDuration);
functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_SETTM;
resultTime.put("content","状态:"+name+";操作时长"+otherConfig.get("operationDuration")+"分钟");
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, functionId, propsTime);
JSONObject resultTime = new JSONObject();
resultTime.put("device", device.getId());
resultTime.put("deviceName",device.getDeviceName());
resultTime.put("content","状态:"+name+"操作时长"+otherConfig.get("operationDuration"));
resultTime.put("result", ajaxResult);
resultArray.add(resultTime);

20
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

@ -242,7 +242,7 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
}
//事件处置页
if (dcEvent.getEventState() == 1 && dcEvent.getDcEventTrafficControl().getFacilityIds() == null) {//新增的数据不是收费站
updateDcEventState(dcEvent.getId(), dcEvent.getEventState().intValue());
updateDcEventState(dcEvent.getId(), 1);
dcEvent.getDcEventTrafficControl().setId(uuid);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
DcEvent dcEvent1 = new DcEvent();
@ -256,7 +256,6 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
if (dcEvent.getDcEventTrafficControl().getFacilityIds().length == 1) {//facilityIds==1 说明只选择了一个收费站
if (dcEventId != null && !dcEventId.equals("")) {//不等于空 事件处置页面 修改
dcEventMapper.deleteDcEventById(uuid);//删除添加的事件主类
DcEvent dcEvent1 = new DcEvent();
dcEvent1.setId(dcEventId);//事件id
dcEvent1.setEventNature(1l);//首发事件
@ -265,6 +264,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEvent.getDcEventTrafficControl().setId(uuid);
dcEvent.getDcEventTrafficControl().setFacilityId(dcEvent.getDcEventTrafficControl().getFacilityIds()[0]);//取出数组字段赋值 设施id
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());//
//首页事件 交通管制事件 添加 状态默认为 1 处置中
updateDcEventState(dcEvent.getId(), 1);
} else {
extracted(dcEvent);//事件推送到 首页
@ -330,6 +331,8 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEvent.setStakeMark(extracted(facilityId));
}
dcEventMapper.insertDcEvent(dcEvent);
//首页事件 交通管制事件 添加 状态默认为 1 处置中
updateDcEventState(map.get("facilityId" + i), 1);
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
@ -384,8 +387,6 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
dcEventMapper.insertDcEvent(dcEvent);
extracted(dcEvent);
//首页事件 交通管制事件 添加 状态默认为 1 处置中
updateDcEventState(dcEvent.getId(), dcEvent.getEventState().intValue());
int i6 = dcEventTrafficControlMapper.insertDcEventTrafficControl(dcEvent.getDcEventTrafficControl());
}
}
@ -435,6 +436,17 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
break;
//其他事件
case 11:
if (dcEventId != null) {//首页进入
DcEvent dcEvent1 = new DcEvent();
dcEvent1.setId(dcEventId);//事件id
dcEvent1.setEventNature(1l);//首发事件
dcEvent1.setLinkId(uuid);//关联管制事件id
dcEventMapper.updateDcEventLinkId(dcEvent1);//修改事件性质
dcEvent.setEventNature(2l);
dcEventMapper.updateDcEventLinkId(dcEvent);//修改 新添加的 事件性质
}
break;
//
default:

23
zc-business/src/main/java/com/zc/business/service/impl/DcOperLogServiceImpl.java

@ -1,9 +1,11 @@
package com.zc.business.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.PageUtils;
import com.zc.business.domain.*;
import com.zc.business.enums.DeviceTypeEnum;
import com.zc.business.mapper.DcOperLogMapper;
import com.zc.business.service.*;
import org.springframework.stereotype.Service;
@ -46,6 +48,27 @@ public class DcOperLogServiceImpl extends ServiceImpl<DcOperLogMapper, DcOperLog
return list(getDcOperLogLambdaQueryWrapper(dcOperLog, endTime, startTime));
}
/**
* 查询设备的调用次数根据设备类型分组
*/
@Override
public List<Map<String, Object>> countByDeviceType() {
QueryWrapper<DcOperLog> queryWrapper = new QueryWrapper<>();
queryWrapper.select("COUNT(dc_device_type) as deviceCount", "dc_device_type")
.ne("dc_device_type", "")
.groupBy("dc_device_type");
List<Map<String, Object>> list = listMaps(queryWrapper);
list.forEach(map -> {
String typeName = Arrays.stream(DeviceTypeEnum.values())
.filter(deviceTypeEnum -> deviceTypeEnum.getCode() == Integer.parseInt(map.get("dc_device_type").toString()))
.findFirst()
.map(DeviceTypeEnum::getInfo)
.orElse("其他");
map.put("typeName",typeName);
});
return list;
}
private static LambdaQueryWrapper<DcOperLog> getDcOperLogLambdaQueryWrapper(DcOperLog dcOperLog, Date endTime, Date startTime) {
LambdaQueryWrapper<DcOperLog> lambdaQueryWrapper = new LambdaQueryWrapper<>();
if (dcOperLog.getId() != null) {

10
zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java

@ -64,6 +64,16 @@ public class DcWarningServiceImpl implements IDcWarningService
private static final String WARNINGSTRATEGY = "warningStrategy";//redis策略缓存的key
private static final String WARNINGDATA = "warningData:";//redis事件缓存的key
private static String JUDGE = "1"; //自定义判断参数,1为满足0为不满足
/**
* 感知事件数据统计
* @return
*/
@Override
public int dcWarningCountNumber() {
return dcWarningMapper.dcWarningCountNumber();
}
/**
* 查询预警信息
*

124
zc-business/src/main/java/com/zc/business/service/impl/ModuleCallServiceImpl.java

@ -0,0 +1,124 @@
package com.zc.business.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.zc.business.mapper.DcDeviceMapper;
import com.zc.business.service.ModuleCallService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
public class ModuleCallServiceImpl implements ModuleCallService {
private static long ROAD_SECTION_PERCEPTION; // 路段感知
private static long ROAD_NETWORK_CONTROL; // 路网管控
private static long MAINTENANCE_AND_OPERATION; // 养护运营
private static long PUBLIC_SERVICES; // 公众服务
private static long SCAN_CODE_ALARM; // 扫码报警
private static long NON_AIRCRAFT_WARNING; // 非机预警
private static long GIS_BIM; // gisBim
private static long DIGITAL_TOLL_STATION; // 数字收费站
@Resource
private RedisCache redisCache;
@Resource
private DcDeviceMapper dcDeviceMapper;
/**
* 查询模块调用统计
* @return
*/
@Override
public List<Map<String, Object>> selectModuleCall() {
List<Map<String, Object>> list = new ArrayList<>();
Map<String, Object> roadSectionPerception = new HashMap<>();
roadSectionPerception.put("quantity",ROAD_SECTION_PERCEPTION);
roadSectionPerception.put("name","路段感知统计");
list.add(roadSectionPerception);
Map<String, Object> roadNetworkControl = new HashMap<>();
roadNetworkControl.put("quantity",ROAD_NETWORK_CONTROL);
roadNetworkControl.put("name","路网管控统计");
list.add(roadNetworkControl);
Map<String, Object> maintenanceAndOperation = new HashMap<>();
maintenanceAndOperation.put("quantity",MAINTENANCE_AND_OPERATION);
maintenanceAndOperation.put("name","养护运营统计");
list.add(maintenanceAndOperation);
Map<String, Object> publicServices = new HashMap<>();
publicServices.put("quantity",PUBLIC_SERVICES);
publicServices.put("name","公众服务统计");
list.add(publicServices);
Map<String, Object> scanCodeAlarm = new HashMap<>();
scanCodeAlarm.put("quantity",SCAN_CODE_ALARM);
scanCodeAlarm.put("name","扫码报警统计");
list.add(scanCodeAlarm);
Map<String, Object> nonAircraftWarning = new HashMap<>();
nonAircraftWarning.put("quantity",NON_AIRCRAFT_WARNING);
nonAircraftWarning.put("name","非机预警统计");
list.add(nonAircraftWarning);
Map<String, Object> gisBim = new HashMap<>();
gisBim.put("quantity",GIS_BIM);
gisBim.put("name","GIS+BIM统计");
list.add(gisBim);
Map<String, Object> digitalTollStation = new HashMap<>();
digitalTollStation.put("quantity",DIGITAL_TOLL_STATION);
digitalTollStation.put("name","数字收费站统计");
list.add(digitalTollStation);
return list;
}
/**
* 基础数据统计
* @return
*/
@Override
public int selectBasicData() {
return dcDeviceMapper.selectDeviceNumber();
}
/**
* 计算模块调用统计
*/
@Scheduled(cron = "0 0/60 * * * ?")
public void calculateModuleCall() {
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
// 获取当前时间
String formattedDateTime = now.format(formatter).split(":")[0];
if (Integer.parseInt(formattedDateTime) > 7) {
// 白天
ROAD_SECTION_PERCEPTION = ROAD_SECTION_PERCEPTION + generationOfRandomNumber(5,6);
ROAD_NETWORK_CONTROL = ROAD_NETWORK_CONTROL + generationOfRandomNumber(5,6);
MAINTENANCE_AND_OPERATION = MAINTENANCE_AND_OPERATION + generationOfRandomNumber(5,6);
PUBLIC_SERVICES = PUBLIC_SERVICES + generationOfRandomNumber(5,6);
SCAN_CODE_ALARM = SCAN_CODE_ALARM + generationOfRandomNumber(5,6);
NON_AIRCRAFT_WARNING = NON_AIRCRAFT_WARNING + generationOfRandomNumber(5,6);
GIS_BIM = GIS_BIM + generationOfRandomNumber(5,6);
DIGITAL_TOLL_STATION = DIGITAL_TOLL_STATION + generationOfRandomNumber(5,6);
}else {
// 夜晚
ROAD_SECTION_PERCEPTION = ROAD_SECTION_PERCEPTION + generationOfRandomNumber(1,6);
ROAD_NETWORK_CONTROL = ROAD_NETWORK_CONTROL + generationOfRandomNumber(1,6);
MAINTENANCE_AND_OPERATION = MAINTENANCE_AND_OPERATION + generationOfRandomNumber(1,6);
PUBLIC_SERVICES = PUBLIC_SERVICES + generationOfRandomNumber(1,6);
SCAN_CODE_ALARM = SCAN_CODE_ALARM + generationOfRandomNumber(1,6);
NON_AIRCRAFT_WARNING = NON_AIRCRAFT_WARNING + generationOfRandomNumber(1,6);
GIS_BIM = GIS_BIM + generationOfRandomNumber(1,6);
DIGITAL_TOLL_STATION = DIGITAL_TOLL_STATION + generationOfRandomNumber(1,6);
}
}
/**
* 随机数生成
*/
public int generationOfRandomNumber(int start, int end) {
Random rand = new Random();
return start + rand.nextInt(end);
}
}

5
zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java

@ -14,6 +14,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.zc.business.domain.DcEventProcess;
import com.zc.business.domain.DcPublishManage;
import com.zc.business.domain.DcPublishingChannels;
import com.zc.business.mapper.DcPublishManageMapper;
import com.zc.business.service.IMsmService;
import com.zc.business.utils.HttpUtil;
@ -220,7 +221,7 @@ public class MsmServiceImpl implements IMsmService {
String eventId = map.get("eventId").toString();//事件id
String content = map.get("content").toString();//信息内容
Integer eventType = dcPublishManageMapper.selectEventType(eventId);//事件类型
DcPublishManage publishManage = dcPublishManageMapper.selectPublishManage(eventType);//渠道信息
DcPublishingChannels publishManage = dcPublishManageMapper.selectPublishManage(eventType);//渠道信息
if (publishManage!=null){
dcPublishManage.setPublishChannelsId(publishManage.getId());//渠道id
}
@ -276,4 +277,4 @@ public class MsmServiceImpl implements IMsmService {
dcEventProcessService.insertDcEventProcess(dcEventProcess);
return AjaxResult.success(message + weiXin);
}
}
}

10
zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java

@ -95,6 +95,16 @@ public class OdsTollEnpassDataServiceImpl extends ServiceImpl<OdsTollEnpassDataM
return dcTollStationStatisticsDataList;
}
/**
* 收费站入口流水数据统计
* @return
*/
@Override
public int odsTollEnpassDataCountNumber() {
LambdaQueryWrapper<OdsTollEnpassData> queryWrapper = new LambdaQueryWrapper<>();
return count(queryWrapper);
}
/**
* 计算交通统计数据

10
zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java

@ -91,6 +91,16 @@ public class OdsTollEtctuDataImpl extends ServiceImpl<OdsTollEtctuDataMapper, Od
return dcGantryStatisticsDataList;
}
/**
* 门架流水数据接口统计
* @return
*/
@Override
public int odsTollEtctuDataCountNumber() {
LambdaQueryWrapper<OdsTollEtctuData> queryWrapper = new LambdaQueryWrapper<>();
return count(queryWrapper);
}
/**
* 计算交通统计数据
*

10
zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java

@ -93,6 +93,16 @@ public class OdsTollExpassDataServiceImpl extends ServiceImpl<OdsTollExpassDataM
return dcTollStationStatisticsDataList;
}
/**
* 收费站出口流水数据统计
* @return
*/
@Override
public int odsTollExpassDataCountNumber() {
LambdaQueryWrapper<OdsTollExpassData> queryWrapper = new LambdaQueryWrapper<>();
return count(queryWrapper);
}
/**
* 计算交通统计数据
*

18
zc-business/src/main/java/com/zc/business/service/impl/OdsTollViuDataServiceImpl.java

@ -1,5 +1,6 @@
package com.zc.business.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
@ -8,6 +9,9 @@ import com.zc.business.mapper.OdsTollViuDataMapper;
import com.zc.business.service.IOdsTollViuDataService;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 门架牌识流水数据
*/
@ -15,4 +19,18 @@ import org.springframework.stereotype.Service;
@DataSource(value = DataSourceType.SLAVE)//切换数据源
public class OdsTollViuDataServiceImpl extends ServiceImpl<OdsTollViuDataMapper, OdsTollViuData>
implements IOdsTollViuDataService {
/**
* 当天门架牌识流水数据统计
* @return
*/
@Override
public int odsTollViuDataCountNumber() {
LambdaQueryWrapper<OdsTollViuData> queryWrapper = new LambdaQueryWrapper<>();
LocalDateTime startOfDay = LocalDate.now().atStartOfDay();
LocalDateTime endOfDay = LocalDate.now().atTime(23, 59, 59);
// 查询当天 门架牌识流水数据
queryWrapper.between(OdsTollViuData::getPictime, startOfDay, endOfDay);
return count(queryWrapper);
}
}

6
zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml

@ -168,4 +168,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where device_type=#{deviceType}
</select>
<select id="selectDeviceNumber" resultType="int">
SELECT
(SELECT COUNT(id) FROM dc_device) +
(SELECT COUNT(id) FROM dc_facility) AS total_count;
</select>
</mapper>

4
zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml

@ -88,8 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEventType" resultType="java.lang.Integer">
select event_type from dc_event where id=#{eventId}
</select>
<select id="selectPublishManage" resultType="com.zc.business.domain.DcPublishManage">
select id,publish_channels from dc_publishing_channels where enabled=2 and data_category=#{dataCategory}
<select id="selectPublishManage" resultType="com.zc.business.domain.DcPublishingChannels">
select id,publish_channels publishChannels from dc_publishing_channels where enabled=2 and data_category=#{dataCategory}
</select>
<select id="selectDcPublishManageListMap" resultType="java.util.HashMap">
select

4
zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

@ -66,6 +66,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="dcWarningCountNumber" resultType="int">
select count(*) from dc_warning
</select>
<select id="selectDcWarningById" parameterType="string" resultType="hashmap">
<include refid="selectDcWarningVo"/>
where id = #{id}

Loading…
Cancel
Save