Browse Source

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

develop
wangsixiang 6 months ago
parent
commit
443bd48e1e
  1. 10
      zc-business/src/main/java/com/zc/business/controller/DcWarningController.java
  2. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollEnpassDataController.java
  3. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollEtctuDataController.java
  4. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollExpassDataController.java
  5. 38
      zc-business/src/main/java/com/zc/business/controller/OdsTollViuDataController.java
  6. 5
      zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java
  7. 5
      zc-business/src/main/java/com/zc/business/service/IDcWarningService.java
  8. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollEnpassDataService.java
  9. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollEtctuDataService.java
  10. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollExpassDataService.java
  11. 5
      zc-business/src/main/java/com/zc/business/service/IOdsTollViuDataService.java
  12. 11
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  13. 10
      zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java
  14. 10
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollEnpassDataServiceImpl.java
  15. 10
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollEtctuDataImpl.java
  16. 10
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollExpassDataServiceImpl.java
  17. 18
      zc-business/src/main/java/com/zc/business/service/impl/OdsTollViuDataServiceImpl.java
  18. 4
      zc-business/src/main/resources/mapper/business/DcWarningMapper.xml

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

@ -49,6 +49,16 @@ public class DcWarningController extends BaseController
IDcWarningService ben = SpringUtils.getBean(IDcWarningService.class); IDcWarningService ben = SpringUtils.getBean(IDcWarningService.class);
ben.updateEndSection(); ben.updateEndSection();
} }
/**
* 感知事件数据统计
*/
@ApiOperation("感知事件数据统计")
@GetMapping("/countNumber")
public AjaxResult dcWarningCountNumber() {
return AjaxResult.success(dcWarningService.dcWarningCountNumber());
}
/** /**
* 查询预警信息列表 * 查询预警信息列表
*/ */

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());
}
}

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 public interface DcWarningMapper
{ {
/**
* 感知事件统计
*/
int dcWarningCountNumber();
/** /**
* 查询预警信息 * 查询预警信息
* *

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 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); 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 返回一个包含各门架统计数据的列表如果输入列表为空则返回空列表 * @return 返回一个包含各门架统计数据的列表如果输入列表为空则返回空列表
*/ */
List<DcGantryStatisticsData> calculateGantryStatistics(List<OdsTollEtctuData> odsTollEtctuDataList); 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 返回一个包含各收费站统计数据的列表如果输入列表为空则返回空列表 * @return 返回一个包含各收费站统计数据的列表如果输入列表为空则返回空列表
*/ */
List<DcTollStationStatisticsData> calculateTollStationStatistics(List<OdsTollExpassData> list); 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 * @author xiepufeng
*/ */
public interface IOdsTollViuDataService extends IService<OdsTollViuData> { public interface IOdsTollViuDataService extends IService<OdsTollViuData> {
/**
* 当天门架牌识流水数据统计
*/
int odsTollViuDataCountNumber();
} }

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

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

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 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 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 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; package com.zc.business.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.common.enums.DataSourceType;
@ -8,6 +9,9 @@ import com.zc.business.mapper.OdsTollViuDataMapper;
import com.zc.business.service.IOdsTollViuDataService; import com.zc.business.service.IOdsTollViuDataService;
import org.springframework.stereotype.Service; 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)//切换数据源 @DataSource(value = DataSourceType.SLAVE)//切换数据源
public class OdsTollViuDataServiceImpl extends ServiceImpl<OdsTollViuDataMapper, OdsTollViuData> public class OdsTollViuDataServiceImpl extends ServiceImpl<OdsTollViuDataMapper, OdsTollViuData>
implements IOdsTollViuDataService { 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);
}
} }

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

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

Loading…
Cancel
Save