ServiceImpl删除注解

develop
Angel 11 months ago
parent 3918aee047
commit 576a2ecd95

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

@ -35,7 +35,7 @@ public class PeopleVehicleHourFlowController extends BaseController {
try {
// 创建一个 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) {
String countString = flow.getStatisticCount();
String timeString = flow.getStatisticTime();

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