Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

$ hexo new "My New Post"

More info: Writing

Run server

$ hexo server

More info: Server

Generate static files

$ hexo generate

More info: Generating

Deploy to remote sites

$ hexo deploy

Test Java Code

package org.jeecg.modules.quartz.job;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.aatb.entity.*;
import org.jeecg.modules.aatb.entity.vo.AatbGwNotificationChargeOrderUseTotalVO;
import org.jeecg.modules.aatb.entity.vo.BetweenTimeDTO;
import org.jeecg.modules.aatb.mapper.*;
import org.jeecg.modules.aatb.service.GuDianTotalService;
import org.jeecg.modules.aatb.util.AlipayUtil;
import org.jeecg.modules.aatb.util.PercentageUtils;
import org.jeecg.utils.SmsUtils;
import org.jetbrains.annotations.NotNull;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;

//import static sun.audio.AudioDevice.device;

//@Component
@RequestMapping
@RestController
public class DaemonJob implements Job {


    @Autowired
    private AatbGwNotificationChargeOrderUseTotalMapper aatbGwNotificationChargeOrderUseTotalMapper;

    @Autowired
    private ChargeUsePercentageJob chargeUsePercentageJob;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        String lastDay = "";
        try {
            lastDay = LocalDate.now().toString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            Long count = aatbGwNotificationChargeOrderUseTotalMapper.selectCount(new LambdaQueryWrapper<AatbGwNotificationChargeOrderUseTotal>()
                    .eq(StrUtil.isNotBlank(lastDay), AatbGwNotificationChargeOrderUseTotal::getDataDay, lastDay)
                    .eq(AatbGwNotificationChargeOrderUseTotal::getIsAll, 1)
            );
            // 判断今日是否已经正常生成
            if (count < 1) {

            }
        } catch (Exception e) {
            SmsUtils.sendSmsTaskError("统计每个场站场站维度的用电统计任务");
        }

    }


}

More info: Deployment