ServiceImpl删除注解

develop
Angel 11 months ago
parent 3918aee047
commit 576a2ecd95

@ -32,19 +32,19 @@ public class PeopleVehicleFlowController extends BaseController {
@ApiOperation("查询人车记录表") @ApiOperation("查询人车记录表")
public AjaxResult list(PeopleVehicleFlow peopleVehicleFlow) { public AjaxResult list(PeopleVehicleFlow peopleVehicleFlow) {
try { try {
// 创建一个 TreeMap 用于存储每天的数据量 // 创建一个 TreeMap 用于存储每天的数据量
Map<LocalDate, Long> dailyCountsMap = new TreeMap<>(); Map<LocalDate, Long> dailyCountsMap = new TreeMap<>();
List<PeopleVehicleFlow> list = peopleVehicleFlowService.list(new QueryWrapper<>(peopleVehicleFlow)); List<PeopleVehicleFlow> list = peopleVehicleFlowService.list(new QueryWrapper<>(peopleVehicleFlow));
for (PeopleVehicleFlow flow : list) { for (PeopleVehicleFlow flow : list) {
String countString = flow.getStatisticCount(); String countString = flow.getStatisticCount();
String timeString = flow.getStatisticTime(); String timeString = flow.getStatisticTime();
// 将时间字符串转换为 LocalDate // 将时间字符串转换为 LocalDate
LocalDate time = LocalDate.parse(timeString, DateTimeFormatter.ofPattern("yyyy-MM-dd")); LocalDate time = LocalDate.parse(timeString, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
// 将计数字符串转换为 Long // 将计数字符串转换为 Long
Long count = Long.parseLong(countString); Long count = Long.parseLong(countString);
dailyCountsMap.put(time, count); dailyCountsMap.put(time, count);
} }
return AjaxResult.success(dailyCountsMap); return AjaxResult.success(dailyCountsMap);
} catch (Exception e) { } catch (Exception e) {
logger.info(StringKit.toString(e)); logger.info(StringKit.toString(e));

@ -35,7 +35,7 @@ public class PeopleVehicleHourFlowController extends BaseController {
try { try {
// 创建一个 TreeMap 用于存储每天的数据量 // 创建一个 TreeMap 用于存储每天的数据量
Map<LocalDate, Long> dailyCountsMap = new TreeMap<>(); Map<LocalDate, Long> dailyCountsMap = new TreeMap<>();
List<PeopleVehicleHourFlow> list = peopleVehicleHourFlowService.list(new QueryWrapper<>(peopleVehicleHFlow)); List<PeopleVehicleHourFlow> list = peopleVehicleHourFlowService.list(new QueryWrapper<>(peopleVehicleHFlow));
for (PeopleVehicleHourFlow flow : list) { for (PeopleVehicleHourFlow flow : list) {
String countString = flow.getStatisticCount(); String countString = flow.getStatisticCount();
String timeString = flow.getStatisticTime(); String timeString = flow.getStatisticTime();

@ -9,6 +9,5 @@ import com.ruoyi.database.service.PeopleVehicleHourFlowService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
@DS("mysql")
public class PeopleVehicleHourFlowServiceImpl extends ServiceImpl<PeopleVehicleHourFlowMapper, PeopleVehicleHourFlow> implements PeopleVehicleHourFlowService { public class PeopleVehicleHourFlowServiceImpl extends ServiceImpl<PeopleVehicleHourFlowMapper, PeopleVehicleHourFlow> implements PeopleVehicleHourFlowService {
} }
Loading…
Cancel
Save